Changeset 300 for branches/release-1_3
- Timestamp:
- Jan 19, 2004, 12:46:57 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/release-1_3/picture.php
r290 r300 493 493 $vtp->closeSession( $handle, 'info_line' ); 494 494 //------------------------------------------------------- favorite manipulation 495 if ( $page['cat'] != 'fav' and !$user['is_the_guest'] ) 495 if ( !$user['is_the_guest'] ) 496 { 497 // verify if the picture is already in the favorite of the user 498 $query = 'SELECT COUNT(*) AS nb_fav FROM '.PREFIX_TABLE.'favorites WHERE image_id = '.$page['id']; 499 $query.= ' AND user_id = '.$user['id'].';'; 500 $result = mysql_query( $query ); 501 $row = mysql_fetch_array( $result ); 502 if (!$row['nb_fav']) 496 503 { 497 504 $url = './picture.php?cat='.$page['cat'].'&image_id='.$page['id']; … … 511 518 $vtp->closeSession( $handle, 'favorite' ); 512 519 } 513 if ( $page['cat'] == 'fav' ) 520 else 514 521 { 515 522 $url = './picture.php?cat='.$page['cat'].'&image_id='.$page['id']; … … 522 529 $vtp->setVar( $handle, 'favorite.alt','[ '.$lang['del_favorites_alt'].' ]' ); 523 530 $vtp->closeSession( $handle, 'favorite' ); 531 } 524 532 } 525 533 //------------------------------------ admin link for information modifications
Note: See TracChangeset
for help on using the changeset viewer.