Changeset 1609 for trunk/admin
- Timestamp:
- Nov 15, 2006, 5:25:12 AM (18 years ago)
- Location:
- trunk/admin
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/cat_modify.php
r1500 r1609 389 389 { 390 390 $query = ' 391 SELECT tn_ext,path391 SELECT id,tn_ext,path 392 392 FROM '.IMAGES_TABLE.' 393 393 WHERE id = '.$category['representative_picture_id'].' 394 394 ;'; 395 395 $row = mysql_fetch_array(pwg_query($query)); 396 $src = get_thumbnail_ src($row['path'], @$row['tn_ext']);396 $src = get_thumbnail_url($row); 397 397 $url = PHPWG_ROOT_PATH.'admin.php?page=picture_modify'; 398 398 $url.= '&image_id='.$category['representative_picture_id']; -
trunk/admin/element_set_global.php
r1314 r1609 123 123 '; 124 124 pwg_query($query); 125 125 126 126 update_category($_POST['dissociate']); 127 127 } … … 400 400 } 401 401 402 while ($row = mysql_fetch_a rray($result))403 { 404 $src = get_thumbnail_ src($row['path'], @$row['tn_ext']);402 while ($row = mysql_fetch_assoc($result)) 403 { 404 $src = get_thumbnail_url($row); 405 405 406 406 $template->assign_block_vars( -
trunk/admin/element_set_unit.php
r1314 r1609 29 29 * Management of elements set. Elements can belong to a category or to the 30 30 * user caddie. 31 * 31 * 32 32 */ 33 33 34 34 if (!defined('PHPWG_ROOT_PATH')) 35 35 { … … 51 51 { 52 52 $collection = explode(',', $_POST['list']); 53 53 54 54 $datas = array(); 55 55 56 56 $query = ' 57 57 SELECT id, date_creation … … 76 76 } 77 77 } 78 78 79 79 if ($conf['allow_html_descriptions']) 80 80 { … … 104 104 $data{'date_creation'} = $row['date_creation']; 105 105 } 106 106 107 107 array_push($datas, $data); 108 108 … … 113 113 } 114 114 } 115 115 116 116 mass_updates( 117 117 IMAGES_TABLE, … … 122 122 $datas 123 123 ); 124 124 125 125 array_push($page['infos'], l10n('Picture informations updated')); 126 126 } … … 142 142 143 143 'L_SUBMIT'=>$lang['submit'], 144 144 145 145 'U_ELEMENTS_PAGE' 146 146 =>$base_url.get_query_string_diff(array('display','start')), 147 147 148 148 'U_GLOBAL_MODE' 149 149 => … … 151 151 .get_query_string_diff(array('mode','display')) 152 152 .'&mode=global', 153 153 154 154 'F_ACTION'=>$base_url.get_query_string_diff(array()), 155 155 ) … … 191 191 // tags 192 192 $all_tags = get_all_tags(); 193 193 194 194 $element_ids = array(); 195 195 … … 203 203 $result = pwg_query($query); 204 204 205 while ($row = mysql_fetch_a rray($result))205 while ($row = mysql_fetch_assoc($result)) 206 206 { 207 207 // echo '<pre>'; print_r($row); echo '</pre>'; 208 208 array_push($element_ids, $row['id']); 209 210 $src = get_thumbnail_ src($row['path'], @$row['tn_ext']);209 210 $src = get_thumbnail_url($row); 211 211 212 212 $query = ' … … 216 216 ;'; 217 217 $selected_tags = array_from_query($query, 'tag_id'); 218 218 219 219 // creation date 220 220 if (!empty($row['date_creation'])) … … 242 242 '</p>'; 243 243 } 244 244 245 245 $template->assign_block_vars( 246 246 'element', … … 259 259 'DESCRIPTION' => @$row['comment'], 260 260 'DATE_CREATION_YEAR' => $year, 261 261 262 262 'TAG_SELECTION' => $tag_selection, 263 263 ) 264 264 ); 265 265 266 266 get_day_list('element.date_creation_day', $day); 267 267 get_month_list('element.date_creation_month', $month); -
trunk/admin/picture_modify.php
r1571 r1609 142 142 '; 143 143 pwg_query($query); 144 144 145 145 update_category($_POST['cat_associated']); 146 146 } … … 224 224 '</p>'; 225 225 } 226 226 227 227 $template->assign_vars( 228 228 array( … … 235 235 'PATH'=>$row['path'], 236 236 237 'TN_SRC' => get_thumbnail_ src($row['path'], @$row['tn_ext']),237 'TN_SRC' => get_thumbnail_url($row), 238 238 239 239 'NAME' => -
trunk/admin/waiting.php
r1458 r1609 43 43 $to_validate = array(); 44 44 $to_reject = array(); 45 45 46 46 if (isset($_POST['submit'])) 47 { 47 { 48 48 foreach (explode(',', $_POST['list']) as $waiting_id) 49 49 { … … 107 107 $dir = get_complete_dir($row['storage_category_id']); 108 108 unlink($dir.$row['file']); 109 if (isset($row['tn_ext']) and $row['tn_ext'] != '') 109 $element_info = array( 110 'path' => $dir.$row['file'], 111 'tn_ext' => 112 (isset($row['tn_ext']) and $row['tn_ext']!='') ? $row['tn_ext']:'jpg' 113 ); 114 $tn_path = get_thumbnail_path( $element_info ); 115 116 if ( @is_file($tn_path) ) 110 117 { 111 unlink( 112 get_thumbnail_src( 113 $dir.$row['file'], 114 $row['tn_ext'] 115 ) 116 ); 117 } 118 else if (@is_file(get_thumbnail_src($dir.$row['file'], 'jpg'))) 119 { 120 unlink( 121 get_thumbnail_src( 122 $dir.$row['file'], 123 'jpg' 124 ) 125 ); 118 unlink( $tn_path ); 126 119 } 127 120 } 128 121 129 122 $query = ' 130 123 DELETE … … 155 148 'L_RESET'=>$lang['reset'], 156 149 'L_DELETE'=>$lang['delete'], 157 150 158 151 'F_ACTION'=>str_replace( '&', '&', $_SERVER['REQUEST_URI']) 159 152 )); 160 153 161 154 //---------------------------------------------------------------- form display 162 155 $cat_names = array(); … … 183 176 $class='row1'; 184 177 if ( $i++ % 2== 0 ) $class='row2'; 185 178 186 179 $template->assign_block_vars( 187 180 'picture', … … 195 188 (strlen($row['file']) > 10) ? 196 189 (substr($row['file'], 0, 10)).'...' : $row['file'], 197 'PREVIEW_URL_IMG'=>$preview_url, 190 'PREVIEW_URL_IMG'=>$preview_url, 198 191 'UPLOAD_EMAIL'=>get_email_address_as_display_text($row['mail_address']), 199 192 'UPLOAD_USERNAME'=>$row['username'] … … 209 202 $url = $cat_names[$row['storage_category_id']]['dir']; 210 203 $url.= 'thumbnail/'.$thumbnail; 211 204 212 205 $template->assign_block_vars( 213 206 'picture.thumbnail', … … 230 223 ) 231 224 ); 232 225 233 226 //----------------------------------------------------------- sending html code 234 227 $template->assign_var_from_handle('ADMIN_CONTENT', 'waiting');
Note: See TracChangeset
for help on using the changeset viewer.