Changeset 782 for branches/branch-1_4/admin
- Timestamp:
- May 1, 2005, 4:16:43 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/branch-1_4/admin/picture_modify.php
r732 r782 160 160 161 161 $url_img = PHPWG_ROOT_PATH.'picture.php?image_id='.$_GET['image_id']; 162 $url_img .= '&cat='.$row['storage_category_id']; 162 163 $query = ' 164 SELECT category_id 165 FROM '.IMAGE_CATEGORY_TABLE.' 166 WHERE image_id = '.$_GET['image_id']; 167 168 if (isset($user['forbidden_categories']) 169 and !empty($user['forbidden_categories'])) 170 { 171 $query.= ' 172 AND category_id NOT IN ('.$user['forbidden_categories'].')'; 173 } 174 $query.= ' 175 ORDER BY RAND() 176 ;'; 177 $result = pwg_query($query); 178 179 if (mysql_num_rows($result) > 0) 180 { 181 list($category_id) = mysql_fetch_array($result); 182 $url_img .= '&cat='.$category_id; 183 } 184 else 185 { 186 $url_img .= '&cat='.$row['storage_category_id']; 187 } 188 163 189 $date = isset($_POST['date_creation']) && empty($errors) 164 190 ?$_POST['date_creation']:date_convert_back(@$row['date_creation']);
Note: See TracChangeset
for help on using the changeset viewer.