Changeset 154 for trunk/bin/module_maker/module.cli.php
- Timestamp:
- Jun 8, 2006 5:36:10 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/module_maker/module.cli.php
r151 r154 223 223 if ($upload_file_capability) { 224 224 // 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=\"__///__\" />"; 226 226 227 227 // Include statement. … … 234 234 \$upload = new Upload(); 235 235 \$upload->setParam(array( 236 'upload_path' => COMMON_BASE . '/html/_db_files/ <##>',236 'upload_path' => COMMON_BASE . '/html/_db_files/__///__', 237 237 'dest_file_perms' => 0666, 238 238 'allow_overwriting' => false, … … 246 246 247 247 // Copy uploaded image name into form data. 248 \$_POST[' <##>'] = isset(\$_FILES['<##>']) ? \$_FILES['<##>']['name'] : '';248 \$_POST['__///__'] = isset(\$_FILES['__///__']) ? \$_FILES['__///__']['name'] : ''; 249 249 250 250 … … 264 264 265 265 // Upload files with prepended primary key. 266 \$new_file = \$upload->process(' <##>', \$%PRIMARY_KEY% . '_' . getFormData('<##>'));266 \$new_file = \$upload->process('__///__', \$%PRIMARY_KEY% . '_' . getFormData('__///__')); 267 267 268 268 // If file upload errors, redirect to edit operation for the inserted record. … … 276 276 277 277 // Upload new files. 278 if (getFormData(' <##>')) {278 if (getFormData('__///__')) { 279 279 // Get old file names for deletion. 280 280 \$old_file = \$upload->getFilenameGlob(getFormData('%PRIMARY_KEY%') . '_*'); 281 281 // 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('__///__')); 283 283 if (false === \$new_file || \$upload->anyErrors()) { 284 284 // Upload failed. Reload form. Display errors.
Note: See TracChangeset
for help on using the changeset viewer.