Changeset 312
- Timestamp:
- Jan 22, 2004, 11:46:46 PM (20 years ago)
- Location:
- branches/release-1_3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/release-1_3/picture.php
r303 r312 181 181 $next_lien_thumbnail.= $conf['prefix_thumbnail'].$file.".".$row['tn_ext']; 182 182 183 if ( $row['name'] != "")183 if ( isset( $row['name'] ) and $row['name'] != '' ) 184 184 { 185 185 $next_alt_thumbnail = $row['name']; … … 191 191 $next_title = $lang['next_image']." : ".$next_alt_thumbnail; 192 192 193 $next_url_link = './picture.php?image_id='.$row['id'].'&cat='.$page['cat']; 194 $next_url_link.= '&expand='.$_GET['expand']; 193 $next_url_link = './picture.php?image_id='.$row['id']; 194 $next_url_link.= '&cat='.$page['cat']; 195 if ( isset( $_GET['expand'] ) ) 196 $next_url_link.= '&expand='.$_GET['expand']; 195 197 if ( $page['cat'] == 'search' ) 196 198 { … … 291 293 292 294 $prev_title = $lang['previous_image'].' : '; 293 $alt_thumbnaill = ''; 294 if ( $row['name'] != '' ) $alt_thumbnail = $row['name']; 295 else $alt_thumbnail = $file; 295 296 if ( isset( $row['name'] ) and $row['name'] != '' ) 297 $alt_thumbnail = $row['name']; 298 else 299 $alt_thumbnail = $file; 300 296 301 $prev_title.= $alt_thumbnail; 297 302 298 303 $url_link = './picture.php?image_id='.$row['id'].'&cat='.$page['cat']; 299 $url_link.= '&expand='.$_GET['expand'];304 if ( isset( $_GET['expand'] ) ) $url_link.= '&expand='.$_GET['expand']; 300 305 if ( $page['cat'] == 'search' ) 301 306 { … … 471 476 $keywords = explode( ',', $page['keywords'] ); 472 477 $content = ''; 473 $url = './category.php?cat=search&expand='.$_GET['expand']; 478 $url = './category.php?cat=search'; 479 if ( isset( $_GET['expand'] ) ) $url.= '&expand='.$_GET['expand']; 474 480 $url.= '&mode=OR&search='; 475 481 foreach ( $keywords as $i => $keyword ) { … … 490 496 { 491 497 // verify if the picture is already in the favorite of the user 492 $query = 'SELECT COUNT(*) AS nb_fav FROM '.PREFIX_TABLE.'favorites WHERE image_id = '.$page['id']; 498 $query = 'SELECT COUNT(*) AS nb_fav'; 499 $query.= ' FROM '.PREFIX_TABLE.'favorites'; 500 $query.= ' WHERE image_id = '.$page['id']; 493 501 $query.= ' AND user_id = '.$user['id'].';'; 494 502 $result = mysql_query( $query ); 495 503 $row = mysql_fetch_array( $result ); 496 504 if (!$row['nb_fav']) 497 {498 $url = './picture.php?cat='.$page['cat'].'&image_id='.$page['id'];499 if (isset($_GET['expand']))500 501 $url.='&add_fav=1';502 if ( $page['cat'] == 'search' )503 {504 $url.= '&search='.$_GET['search'].'&mode='.$_GET['mode'];505 }506 $vtp->addSession( $handle, 'favorite' );507 $vtp->setVar( $handle, 'favorite.link', add_session_id( $url ) );508 $vtp->setVar( $handle, 'favorite.title', $lang['add_favorites_hint'] );509 $vtp->setVar( $handle, 'favorite.src',510 './template/'.$user['template'].'/theme/favorite.gif' );511 $vtp->setVar( $handle, 'favorite.alt','[ '.$lang['add_favorites_alt'].' ]');512 $vtp->closeSession( $handle, 'favorite' );513 }514 else515 {516 $url = './picture.php?cat='.$page['cat'].'&image_id='.$page['id'];517 $url.= '&expand='.$_GET['expand'].'&add_fav=0';518 $vtp->addSession( $handle, 'favorite' );519 $vtp->setVar( $handle, 'favorite.link', add_session_id( $url ) );520 $vtp->setVar( $handle, 'favorite.title', $lang['del_favorites_hint'] );521 $vtp->setVar( $handle, 'favorite.src',522 './template/'.$user['template'].'/theme/del_favorite.gif' );523 $vtp->setVar( $handle, 'favorite.alt','[ '.$lang['del_favorites_alt'].' ]');524 $vtp->closeSession( $handle, 'favorite' );525 }505 { 506 $url = './picture.php?cat='.$page['cat'].'&image_id='.$page['id']; 507 if (isset($_GET['expand'])) 508 $url.= '&expand='.$_GET['expand']; 509 $url.='&add_fav=1'; 510 if ( $page['cat'] == 'search' ) 511 { 512 $url.= '&search='.$_GET['search'].'&mode='.$_GET['mode']; 513 } 514 $vtp->addSession( $handle, 'favorite' ); 515 $vtp->setVar( $handle, 'favorite.link', add_session_id( $url ) ); 516 $vtp->setVar( $handle, 'favorite.title', $lang['add_favorites_hint'] ); 517 $vtp->setVar( $handle, 'favorite.src', 518 './template/'.$user['template'].'/theme/favorite.gif' ); 519 $vtp->setVar($handle,'favorite.alt','[ '.$lang['add_favorites_alt'].' ]'); 520 $vtp->closeSession( $handle, 'favorite' ); 521 } 522 else 523 { 524 $url = './picture.php?cat='.$page['cat'].'&image_id='.$page['id']; 525 $url.= '&expand='.$_GET['expand'].'&add_fav=0'; 526 $vtp->addSession( $handle, 'favorite' ); 527 $vtp->setVar( $handle, 'favorite.link', add_session_id( $url ) ); 528 $vtp->setVar( $handle, 'favorite.title', $lang['del_favorites_hint'] ); 529 $vtp->setVar( $handle, 'favorite.src', 530 './template/'.$user['template'].'/theme/del_favorite.gif' ); 531 $vtp->setVar($handle,'favorite.alt','[ '.$lang['del_favorites_alt'].' ]'); 532 $vtp->closeSession( $handle, 'favorite' ); 533 } 526 534 } 527 535 //------------------------------------ admin link for information modifications -
branches/release-1_3/profile.php
r290 r312 68 68 } 69 69 $mail_error = validate_mail_address( $_POST['mail_address'] ); 70 if ( $mail_error != '' ) 71 { 72 array_push( $errors, $mail_error ); 73 } 74 if ( $_POST['use_new_pwd'] == 1 ) 75 { 76 // password must be the same as its confirmation 77 if ( $_POST['password'] != $_POST['passwordConf'] ) 78 { 79 array_push( $errors, $lang['reg_err_pass'] ); 80 } 81 } 82 70 if ( $mail_error != '' ) array_push( $errors, $mail_error ); 71 // password must be the same as its confirmation 72 if ( isset( $_POST['use_new_pwd'] ) 73 and $_POST['password'] != $_POST['passwordConf'] ) 74 array_push( $errors, $lang['reg_err_pass'] ); 75 83 76 if ( count( $errors ) == 0 ) 84 77 { … … 96 89 mysql_query( $query ); 97 90 98 if ( $_POST['use_new_pwd'] == 1)91 if ( isset( $_POST['use_new_pwd'] ) ) 99 92 { 100 93 $query = 'UPDATE '.PREFIX_TABLE.'users'; … … 104 97 mysql_query( $query ); 105 98 } 106 if ( $_POST['create_cookie'] == 1)99 if ( isset( $_POST['create_cookie'] ) ) 107 100 { 108 101 setcookie( 'id',$page['session_id'],$_POST['cookie_expiration'], … … 117 110 // redirection 118 111 $url = 'category.php'; 119 if ( $_POST['create_cookie'] != 1 ) $url = add_session_id( $url,true );112 if ( isset( $_POST['create_cookie'] ) ) $url = add_session_id( $url,true ); 120 113 header( 'Request-URI: '.$url ); 121 114 header( 'Content-Location: '.$url );
Note: See TracChangeset
for help on using the changeset viewer.