Changeset 276
- Timestamp:
- Jan 13, 2004, 12:41:53 AM (20 years ago)
- Location:
- branches/release-1_3
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/release-1_3/admin/comments.php
r180 r276 165 165 $vtp->setGlobalVar( $sub, 'user_template', $user['template'] ); 166 166 //--------------------------------------------------- number of days to display 167 if ( isset( $_GET['last_days'] ) ) define( MAX_DAYS, $_GET['last_days'] );168 else define( MAX_DAYS, 0 );167 if ( isset( $_GET['last_days'] ) ) define( 'MAX_DAYS', $_GET['last_days'] ); 168 else define( 'MAX_DAYS', 0 ); 169 169 //----------------------------------------- non specific section initialization 170 170 $array_cat_directories = array(); -
branches/release-1_3/admin/include/functions.php
r270 r276 870 870 else 871 871 $query.= 'NULL'; 872 $quer ies .= ' WHERE id = '.$row['id'];872 $query .= ' WHERE id = $user_id'; 873 873 $query.= ';'; 874 874 mysql_query( $query ); -
branches/release-1_3/admin/update.php
r272 r276 25 25 26 26 $uppercats = ''; 27 27 $output = ''; 28 28 // 0. retrieving informations on the category to display 29 29 $cat_directory = '../galleries'; … … 293 293 // inserting the pictures found in the directory 294 294 foreach ( $pictures as $picture ) { 295 $name = ''; 296 $author = ''; 297 $comment = ''; 298 if (isset ($picture['name'])) $name = $picture['name']; 299 if (isset ($picture['author'])) $author = $picture['author']; 300 if (isset ($picture['comment'])) $comment = $picture['comment']; 301 295 302 $query = 'INSERT INTO '.PREFIX_TABLE.'images'; 296 303 $query.= ' (file,storage_category_id,date_available,tn_ext'; … … 301 308 $query.= ",'".$picture['date']."','".$picture['tn_ext']."'"; 302 309 $query.= ",'".$picture['filesize']."','".$picture['width']."'"; 303 $query.= ",'".$picture['height']."','".$picture['name']."'"; 304 $query.= ",'".$picture['author']."','".$picture['comment']."'"; 305 if ( $picture['date_creation'] != '' ) 310 $query.= ",'".$picture['height']."','$name', '$author', '$comment'"; 311 if ( isset ($picture['date_creation'])) 306 312 { 307 313 $query.= ",'".$picture['date_creation']."'"; … … 588 594 //-------------------------------------------- introduction : choices of update 589 595 // Display choice if "update" var is not specified 590 check_cat_id( $_GET['update'] ); 591 if ( !isset( $_GET['update'] ) 592 and !( isset( $page['cat'] ) 593 or $_GET['update'] == 'cats' 594 or $_GET['update'] == 'all' ) ) 596 if (!isset( $_GET['update'] )) 595 597 { 596 598 $vtp->addSession( $sub, 'introduction' ); … … 606 608 else 607 609 { 610 check_cat_id( $_GET['update'] ); 608 611 $start = get_moment(); 609 612 $count_new = 0; -
branches/release-1_3/category.php
r274 r276 35 35 } 36 36 //-------------------------------------------------- access authorization check 37 if ( isset( $_GET[' act'] ))37 if ( isset( $_GET['cat'] )) 38 38 check_cat_id( $_GET['cat'] ); 39 39 check_login_authorization(); … … 270 270 { 271 271 // retrieving the storage dir of the picture 272 if ( $array_cat_directories[$row['storage_category_id']] == '')272 if ( !isset($array_cat_directories[$row['storage_category_id']])) 273 273 { 274 274 $array_cat_directories[$row['storage_category_id']] = -
branches/release-1_3/include/functions_category.inc.php
r271 r276 110 110 $category = array(); 111 111 foreach ( $infos as $info ) { 112 $category[$info] = $row[$info]; 113 if ( $info == 'date_last' ) 114 { 115 list($year,$month,$day) = explode( '-', $row[$info] ); 116 $category[$info] = mktime(0,0,0,$month,$day,$year); 117 } 112 if ( $info == 'uc.date_last' ) 113 { 114 list($year,$month,$day) = explode( '-', $row['date_last'] ); 115 $category['date_last'] = mktime(0,0,0,$month,$day,$year); 116 } 117 else 118 { 119 $category[$info] = $row[$info]; 120 } 118 121 } 119 122 $plain_structure[$row['id']] = $category; … … 412 415 $page['nb_image_page'] = $user['nb_image_page']; 413 416 // $url is used to create the navigation bar 414 $url = './category.php?cat='.$page['cat'].'&expand='.$page['expand']; 417 $url = './category.php?cat='.$page['cat']; 418 if ( isset($page['expand']) ) 419 { 420 $url.= '&expand='.$page['expand']; 421 } 415 422 // simple category 416 423 if ( is_numeric( $page['cat'] ) ) -
branches/release-1_3/include/functions_user.inc.php
r245 r276 208 208 global $user,$lang,$conf,$page; 209 209 210 if ( $user['is_the_guest'] 211 and ( $conf['access'] == 'restricted' or $page['cat'] == 'fav' ) ) 210 if ( $user['is_the_guest']) 211 { 212 if ( $conf['access'] == 'restricted' || (isset($page['cat']) && $page['cat'] == 'fav' ) ) 212 213 { 213 214 echo '<div style="text-align:center;">'.$lang['only_members'].'<br />'; … … 215 216 exit(); 216 217 } 218 } 217 219 } 218 220 ?> -
branches/release-1_3/profile.php
r263 r276 28 28 exit(); 29 29 } 30 //-------------------------------------------------------------- initialization31 check_cat_id( $_GET['cat'] );32 30 //------------------------------------------------------ update & customization 33 31 $infos = array( 'nb_image_line', 'nb_line_page', 'language', -
branches/release-1_3/search.php
r57 r276 82 82 $vtp->setVar( $handle, 'text.size', '40' ); 83 83 $vtp->setVar( $handle, 'text.name', 'search' ); 84 if (isset($_POST['search'])) 84 85 $vtp->setVar( $handle, 'text.value', $_POST['search'] ); 85 86 $vtp->closeSession( $handle, 'text' ); … … 93 94 $vtp->setVar( $handle, 'radio.value', 'OR' ); 94 95 $vtp->setVar( $handle, 'radio.option', $lang['search_mode_or'] ); 95 if ( $_POST['mode'] == 'OR' or $_POST['mode'] == '')96 if (isset($_POST['mode']) && ($_POST['mode'] == 'OR' or $_POST['mode'] == '' )) 96 97 { 97 98 $vtp->setVar( $handle, 'radio.checked', ' checked="checked"' ); … … 103 104 $vtp->setVar( $handle, 'radio.value', 'AND' ); 104 105 $vtp->setVar( $handle, 'radio.option', $lang['search_mode_and'] ); 105 if ( $_POST['mode'] == 'AND' )106 if ( isset($_POST['mode']) && $_POST['mode'] == 'AND' ) 106 107 { 107 108 $vtp->setVar( $handle, 'radio.checked', ' checked="checked"' ); -
branches/release-1_3/template/default/htmlfunctions.inc.php
r246 r276 189 189 { 190 190 $vtp->addSession( $handle, 'bullet_w_link' ); 191 $url = './category.php?cat='.$page['cat']; 191 $url = './category.php'; 192 if (isset($page['cat'])) 193 { 194 $url .='?cat='.$page['cat']; 192 195 $url.= '&expand='.$category['expand_string']; 193 196 if ( $page['cat'] == 'search' ) … … 195 198 $url.= '&search='.$_GET['search'].'&mode='.$_GET['mode']; 196 199 } 200 } 197 201 $vtp->setVar( $handle, 'bullet_w_link.bullet_link', add_session_id($url) ); 198 202 if ( $category['expanded'] )
Note: See TracChangeset
for help on using the changeset viewer.