Changeset 640 for trunk/admin/picture_modify.php
- Timestamp:
- Dec 6, 2004, 11:28:32 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/picture_modify.php
r635 r640 112 112 pwg_query($query); 113 113 update_category($_POST['cat_associated']); 114 } 115 // elect the element to represent the given categories 116 if (isset($_POST['elect']) 117 and isset($_POST['cat_dismissed']) 118 and count($_POST['cat_dismissed']) > 0) 119 { 120 $datas = array(); 121 foreach ($_POST['cat_dismissed'] as $category_id) 122 { 123 array_push($datas, 124 array('id' => $category_id, 125 'representative_picture_id' => $_GET['image_id'])); 126 } 127 $fields = array('primary' => array('id'), 128 'update' => array('representative_picture_id')); 129 mass_updates(CATEGORIES_TABLE, $fields, $datas); 130 } 131 // dismiss the element as representant of the given categories 132 if (isset($_POST['dismiss']) 133 and isset($_POST['cat_elected']) 134 and count($_POST['cat_elected']) > 0) 135 { 136 set_random_representant($_POST['cat_elected']); 114 137 } 115 138 … … 184 207 'L_PATH'=>$lang['path'], 185 208 'L_STORAGE_CATEGORY'=>$lang['storage_category'], 209 'L_REPRESENTS'=>$lang['represents'], 210 'L_DOESNT_REPRESENT'=>$lang['doesnt_represent'], 186 211 187 212 'F_ACTION'=>add_session_id(PHPWG_ROOT_PATH.'admin.php?'.$_SERVER['QUERY_STRING']) … … 220 245 ;'; 221 246 display_select_cat_wrapper($query,array(),'dissociated_option'); 247 // representing 248 $query = ' 249 SELECT id,name,uppercats,global_rank 250 FROM '.CATEGORIES_TABLE.' 251 WHERE representative_picture_id = '.$_GET['image_id'].' 252 ;'; 253 display_select_cat_wrapper($query,array(),'elected_option'); 254 255 $query = ' 256 SELECT id,name,uppercats,global_rank 257 FROM '.CATEGORIES_TABLE.' 258 WHERE id IN ('.implode(',', $associateds).') 259 AND representative_picture_id != '.$_GET['image_id'].' 260 ;'; 261 display_select_cat_wrapper($query,array(),'dismissed_option'); 222 262 //----------------------------------------------------------- sending html code 223 263 $template->assign_var_from_handle('ADMIN_CONTENT', 'picture_modify');
Note: See TracChangeset
for help on using the changeset viewer.