Changeset 587 for trunk/admin/include/functions.php
- Timestamp:
- Oct 30, 2004, 5:42:29 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/functions.php
r563 r587 168 168 WHERE site_id = '.$id.' 169 169 ;'; 170 $result = mysql_query($query);170 $result = pwg_query($query); 171 171 $category_ids = array(); 172 172 while ($row = mysql_fetch_array($result)) … … 181 181 WHERE id = '.$id.' 182 182 ;'; 183 mysql_query($query);183 pwg_query($query); 184 184 } 185 185 … … 206 206 WHERE storage_category_id IN ('.implode(',', $ids).') 207 207 ;'; 208 $result = mysql_query($query);208 $result = pwg_query($query); 209 209 $element_ids = array(); 210 210 while ($row = mysql_fetch_array($result)) … … 219 219 WHERE category_id IN ('.implode(',', $ids).') 220 220 ;'; 221 mysql_query($query);221 pwg_query($query); 222 222 223 223 // destruction of the access linked to the category … … 226 226 WHERE cat_id IN ('.implode(',', $ids).') 227 227 ;'; 228 mysql_query($query);228 pwg_query($query); 229 229 $query = ' 230 230 DELETE FROM '.GROUP_ACCESS_TABLE.' 231 231 WHERE cat_id IN ('.implode(',', $ids).') 232 232 ;'; 233 mysql_query($query);233 pwg_query($query); 234 234 235 235 // destruction of the sub-categories … … 239 239 WHERE id_uppercat IN ('.implode(',', $ids).') 240 240 ;'; 241 $result = mysql_query($query);241 $result = pwg_query($query); 242 242 $subcat_ids = array(); 243 243 while($row = mysql_fetch_array($result)) … … 255 255 WHERE id IN ('.implode(',', $ids).') 256 256 ;'; 257 mysql_query($query);257 pwg_query($query); 258 258 259 259 if (isset($counts['del_categories'])) … … 283 283 '.wordwrap(implode(', ', $ids), 80, "\n").') 284 284 ;'; 285 mysql_query($query);285 pwg_query($query); 286 286 287 287 // destruction of the links between images and this category … … 291 291 '.wordwrap(implode(', ', $ids), 80, "\n").') 292 292 ;'; 293 mysql_query($query);293 pwg_query($query); 294 294 295 295 // destruction of the favorites associated with the picture … … 299 299 '.wordwrap(implode(', ', $ids), 80, "\n").') 300 300 ;'; 301 mysql_query($query);301 pwg_query($query); 302 302 303 303 // destruction of the rates associated to this element … … 307 307 '.wordwrap(implode(', ', $ids), 80, "\n").') 308 308 ;'; 309 mysql_query($query);309 pwg_query($query); 310 310 311 311 // destruction of the image … … 315 315 '.wordwrap(implode(', ', $ids), 80, "\n").') 316 316 ;'; 317 mysql_query($query);317 pwg_query($query); 318 318 319 319 if (isset($counts['del_elements'])) … … 336 336 $query.= ' WHERE user_id = '.$user_id; 337 337 $query.= ';'; 338 mysql_query( $query );338 pwg_query( $query ); 339 339 340 340 // destruction of the group links for this user … … 342 342 $query.= ' WHERE user_id = '.$user_id; 343 343 $query.= ';'; 344 mysql_query( $query );344 pwg_query( $query ); 345 345 346 346 // destruction of the favorites associated with the user … … 348 348 $query.= ' WHERE user_id = '.$user_id; 349 349 $query.= ';'; 350 mysql_query( $query );350 pwg_query( $query ); 351 351 352 352 // destruction of the sessions linked with the user … … 354 354 $query.= ' WHERE user_id = '.$user_id; 355 355 $query.= ';'; 356 mysql_query( $query );356 pwg_query( $query ); 357 357 358 358 // destruction of the user … … 360 360 $query.= ' WHERE id = '.$user_id; 361 361 $query.= ';'; 362 mysql_query( $query );362 pwg_query( $query ); 363 363 } 364 364 … … 373 373 $query.= ' WHERE group_id = '.$group_id; 374 374 $query.= ';'; 375 mysql_query( $query );375 pwg_query( $query ); 376 376 377 377 // synchronize all users linked to the group … … 382 382 $query.= ' WHERE group_id = '.$group_id; 383 383 $query.= ';'; 384 mysql_query( $query );384 pwg_query( $query ); 385 385 386 386 // destruction of the group … … 388 388 $query.= ' WHERE id = '.$group_id; 389 389 $query.= ';'; 390 mysql_query( $query );390 pwg_query( $query ); 391 391 } 392 392 … … 400 400 $query.= ' WHERE id = '.$user_id; 401 401 $query.= ';'; 402 $row = mysql_fetch_array( mysql_query( $query ) );402 $row = mysql_fetch_array( pwg_query( $query ) ); 403 403 $status = $row['status']; 404 404 // retrieving all the restricted categories for this user … … 413 413 $query.= ' WHERE user_id = '.$user_id; 414 414 $query.= ';'; 415 $result = mysql_query ( $query );415 $result = pwg_query ( $query ); 416 416 while ( $row = mysql_fetch_array( $result ) ) 417 417 { … … 424 424 $query.= ' WHERE image_id = '.$row['image_id']; 425 425 $query.= ';'; 426 $picture_result = mysql_query( $query );426 $picture_result = pwg_query( $query ); 427 427 $picture_cat = array(); 428 428 while ( $picture_row = mysql_fetch_array( $picture_result ) ) … … 436 436 $query.= ' AND user_id = '.$user_id; 437 437 $query.= ';'; 438 mysql_query( $query );438 pwg_query( $query ); 439 439 } 440 440 } … … 465 465 GROUP BY category_id 466 466 ;'; 467 $result = mysql_query( $query );467 $result = pwg_query( $query ); 468 468 while ( $row = mysql_fetch_array( $result ) ) 469 469 { … … 475 475 WHERE id = '.$row['category_id'].' 476 476 ;'; 477 mysql_query($query);477 pwg_query($query); 478 478 } 479 479 … … 486 486 AND id IN ('.implode(',', $cat_ids).') 487 487 ;'; 488 $result = mysql_query( $query );488 $result = pwg_query( $query ); 489 489 while ( $row = mysql_fetch_array( $result ) ) 490 490 { … … 495 495 AND image_id = '.$row['representative_picture_id'].' 496 496 ;'; 497 $result = mysql_query( $query );497 $result = pwg_query( $query ); 498 498 if (mysql_num_rows($result) == 0) 499 499 { … … 503 503 WHERE id = '.$row['id'].' 504 504 ;'; 505 mysql_query( $query );505 pwg_query( $query ); 506 506 } 507 507 } … … 599 599 $query.= " WHERE status = 'private'"; 600 600 $query.= ';'; 601 $result = mysql_query( $query );601 $result = pwg_query( $query ); 602 602 $privates = array(); 603 603 while ( $row = mysql_fetch_array( $result ) ) … … 612 612 $query.= ' WHERE user_id = '.$user_id; 613 613 $query.= ';'; 614 $result = mysql_query( $query );614 $result = pwg_query( $query ); 615 615 while ( $row = mysql_fetch_array( $result ) ) 616 616 { … … 627 627 $query.= ' AND ug.user_id = '.$user_id; 628 628 $query.= ';'; 629 $result = mysql_query( $query );629 $result = pwg_query( $query ); 630 630 while ( $row = mysql_fetch_array( $result ) ) 631 631 { … … 650 650 $query = 'SELECT id FROM '.CATEGORIES_TABLE; 651 651 $query.= " WHERE visible = 'false';"; 652 $result = mysql_query( $query );652 $result = pwg_query( $query ); 653 653 while ( $row = mysql_fetch_array( $result ) ) 654 654 { … … 680 680 $query .= ' WHERE id = '.$user_id; 681 681 $query.= ';'; 682 mysql_query( $query );682 pwg_query( $query ); 683 683 684 684 return $restrictions; … … 699 699 $query.= ' WHERE id = '.$user_id; 700 700 $query.= ';'; 701 $row = mysql_fetch_array( mysql_query( $query ) );701 $row = mysql_fetch_array( pwg_query( $query ) ); 702 702 703 703 $base_restrictions=get_user_restrictions($user_id,$row['status'],true,true); … … 728 728 $query.= ' WHERE id = '.$category_id; 729 729 $query.= ';'; 730 $row = mysql_fetch_array( mysql_query( $query ) );730 $row = mysql_fetch_array( pwg_query( $query ) ); 731 731 $uppercats = explode( ',', $row['uppercats'] ); 732 732 foreach ( $uppercats as $category_id ) {
Note: See TracChangeset
for help on using the changeset viewer.