Ignore:
Timestamp:
Jun 8, 2006 5:36:10 AM (18 years ago)
Author:
scdev
Message:

${1}

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/module_maker/module.cli.php

    r151 r154  
    223223if ($upload_file_capability) {
    224224    // Form arguments
    225     $replace['admin_form_tag_init'] = "<form enctype=\"multipart/form-data\" method=\"post\" action=\"<\x3fphp echo \$_SERVER['PHP_SELF']; \x3f>\" class=\"sc-form\">\n<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"<##>\" />";
     225    $replace['admin_form_tag_init'] = "<form enctype=\"multipart/form-data\" method=\"post\" action=\"<\x3fphp echo \$_SERVER['PHP_SELF']; \x3f>\" class=\"sc-form\">\n<input type=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"__///__\" />";
    226226
    227227    // Include statement.
     
    234234\$upload = new Upload();
    235235\$upload->setParam(array(
    236     'upload_path' => COMMON_BASE . '/html/_db_files/<##>',
     236    'upload_path' => COMMON_BASE . '/html/_db_files/__///__',
    237237    'dest_file_perms' => 0666,
    238238    'allow_overwriting' => false,
     
    246246
    247247// Copy uploaded image name into form data.
    248 \$_POST['<##>'] = isset(\$_FILES['<##>']) ? \$_FILES['<##>']['name'] : '';
     248\$_POST['__///__'] = isset(\$_FILES['__///__']) ? \$_FILES['__///__']['name'] : '';
    249249
    250250
     
    264264
    265265        // Upload files with prepended primary key.
    266         \$new_file = \$upload->process('<##>',  \$%PRIMARY_KEY% . '_' . getFormData('<##>'));
     266        \$new_file = \$upload->process('__///__',  \$%PRIMARY_KEY% . '_' . getFormData('__///__'));
    267267
    268268        // If file upload errors, redirect to edit operation for the inserted record.
     
    276276
    277277        // Upload new files.
    278         if (getFormData('<##>')) {
     278        if (getFormData('__///__')) {
    279279            // Get old file names for deletion.
    280280            \$old_file = \$upload->getFilenameGlob(getFormData('%PRIMARY_KEY%') . '_*');
    281281            // Process new file upload with prepended primary key.
    282             \$new_file = \$upload->process('<##>',  getFormData('%PRIMARY_KEY%') . '_' . getFormData('<##>'));
     282            \$new_file = \$upload->process('__///__',  getFormData('%PRIMARY_KEY%') . '_' . getFormData('__///__'));
    283283            if (false === \$new_file || \$upload->anyErrors()) {
    284284                // Upload failed. Reload form. Display errors.
Note: See TracChangeset for help on using the changeset viewer.