Changeset 4805 for extensions/upload_form
- Timestamp:
- Jan 30, 2010, 11:50:34 PM (15 years ago)
- Location:
- extensions/upload_form
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/upload_form/include/functions_upload.inc.php
r4783 r4805 26 26 $page['source_file'] = '/home/pierrick/public_html/test/resize/phpthumb/examples/statue_small.jpg'; 27 27 28 function add_uploaded_file($source_filepath, $original_filename=null, $categories=null )28 function add_uploaded_file($source_filepath, $original_filename=null, $categories=null, $level=null) 29 29 { 30 30 global $page; … … 96 96 $insert['high_filesize'] = $high_infos['filesize']; 97 97 } 98 99 if (isset($level)) 100 { 101 $insert['level'] = $level; 102 } 98 103 99 104 mass_inserts( -
extensions/upload_form/upload.php
r4796 r4805 81 81 $source_filepath = $_FILES['image_upload']['tmp_name'][$idx]; 82 82 $original_filename = $_FILES['image_upload']['name'][$idx]; 83 add_uploaded_file($source_filepath, $original_filename, array($category_id) );83 add_uploaded_file($source_filepath, $original_filename, array($category_id), $_POST['level']); 84 84 } 85 85 } … … 117 117 'category_options' 118 118 ); 119 120 // image level options 121 $tpl_options = array(); 122 foreach ($conf['available_permission_levels'] as $level) 123 { 124 $tpl_options[$level] = l10n( sprintf('Level %d', $level) ).' ('.$level.')'; 125 } 126 $selected_level = isset($_POST['level']) ? $_POST['level'] : 0; 127 $template->assign( 128 array( 129 'level_options'=> $tpl_options, 130 'level_options_selected' => array($selected_level) 131 ) 132 ); 133 119 134 120 135 // +-----------------------------------------------------------------------+ -
extensions/upload_form/upload.tpl
r4796 r4805 45 45 <table> 46 46 <tr> 47 <t d>{'Drop into category'|@translate}</td>47 <th>{'Drop into category'|@translate}</th> 48 48 <td> 49 49 <label><input type="radio" name="category_type" value="existing" checked="checked"> {'existing category'|@translate}</label> … … 80 80 81 81 <tr> 82 <th>{'Minimum privacy level'|@translate}</th> 83 <td> 84 <select name="level" size="1"> 85 {html_options options=$level_options selected=$level_options_selected} 86 </select> 87 </td> 88 </tr> 89 90 <tr> 82 91 <td colspan="2"> 83 92 <div id="uploadBoxes">
Note: See TracChangeset
for help on using the changeset viewer.