Changeset 45 for trunk/profile.php
- Timestamp:
- Jul 27, 2003, 10:24:10 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/profile.php
r26 r45 104 104 mysql_query( $query ); 105 105 } 106 if ( $_POST['create_cookie'] == 1 ) 107 { 108 setcookie( 'id',$page['session_id'],$_POST['cookie_expiration'], 109 cookie_path() ); 110 } 106 111 // redirection 107 112 $url = 'category.php?cat='.$page['cat'].'&expand='.$_GET['expand']; … … 110 115 $url.= '&search='.$_GET['search'].'&mode='.$_GET['mode']; 111 116 } 112 $url = add_session_id( $url, true );117 if ( $_POST['create_cookie'] != 1 ) $url = add_session_id( $url, true ); 113 118 header( 'Request-URI: '.$url ); 114 119 header( 'Content-Location: '.$url ); … … 122 127 initialize_template(); 123 128 $tpl = array( 'customize_page_title','customize_title','password','new', 124 'reg_confirm','submit' );129 'reg_confirm','submit','create_cookie' ); 125 130 templatize_array( $tpl, 'lang', $handle ); 126 131 //----------------------------------------------------------------- form action … … 341 346 $vtp->closeSession( $handle, 'line' ); 342 347 } 348 //--------------------------------------------------------------- create cookie 349 if ( $conf['authorize_cookies'] ) 350 { 351 $vtp->addSession( $handle, 'cookie' ); 352 $options = array( 353 array( 'message' => '1 '.$lang['customize_day'], 354 'value' => time() + 24*60*60 ), 355 array( 'message' => '1 '.$lang['customize_week'], 356 'value' => time() + 7*24*60*60 ), 357 array( 'message' => '1 '.$lang['customize_month'], 358 'value' => time() + 30*24*60*60 ), 359 array( 'message' => '1 '.$lang['customize_year'], 360 'value' => time() + 365*24*60*60 ) 361 ); 362 foreach ( $options as $option ) { 363 $vtp->addSession( $handle, 'expiration_option' ); 364 $vtp->setVar( $handle, 'expiration_option.option', $option['message'] ); 365 $vtp->setVar( $handle, 'expiration_option.value', $option['value'] ); 366 $vtp->closeSession( $handle, 'expiration_option' ); 367 } 368 $vtp->closeSession( $handle, 'cookie' ); 369 } 343 370 //----------------------------------------------------------- html code display 344 371 $code = $vtp->Display( $handle, 0 );
Note: See TracChangeset
for help on using the changeset viewer.