Changeset 405
- Timestamp:
- Mar 31, 2004, 10:43:09 PM (21 years ago)
- Location:
- trunk
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/category.php
r403 r405 37 37 setcookie( 'id', '', 0, cookie_path() ); 38 38 $url = 'category.php'; 39 header( 'Request-URI: '.$url ); 40 header( 'Content-Location: '.$url ); 41 header( 'Location: '.$url ); 42 exit(); 39 redirect( $url ); 43 40 } 44 41 //-------------------------------------------------- access authorization check -
trunk/identification.php
r404 r405 43 43 $session_id = session_create( $_POST['username'] ); 44 44 $url = 'category.php?id='.$session_id; 45 header( 'Request-URI: '.$url ); 46 header( 'Content-Location: '.$url ); 47 header( 'Location: '.$url ); 48 exit(); 45 redirect( $url ); 49 46 } 50 47 else -
trunk/include/functions.inc.php
r394 r405 25 25 // | USA. | 26 26 // +-----------------------------------------------------------------------+ 27 27 28 include_once( PHPWG_ROOT_PATH .'include/functions_user.inc.php' ); 28 29 include_once( PHPWG_ROOT_PATH .'include/functions_session.inc.php' ); … … 463 464 } 464 465 466 /** 467 * Redirects to the given URL 468 * 469 * Note : once this function called, the execution doesn't go further 470 * (presence of an exit() instruction. 471 * 472 * @param string $url 473 * @return void 474 */ 475 function redirect( $url ) 476 { 477 global $user, $template, $lang_info, $conf, $lang, $t2; 478 479 // $refresh, $url_link and $title are required for creating an automated 480 // refresh page in header.tpl 481 $refresh = 5; 482 $url_link = $url; 483 $title = 'redirection'; 484 include( PHPWG_ROOT_PATH.'include/page_header.php' ); 485 486 $template->set_filenames( array( 'redirect' => 'redirect.tpl' ) ); 487 $template->pparse('redirect'); 488 489 include( PHPWG_ROOT_PATH.'include/page_tail.php' ); 490 491 exit(); 492 } 465 493 ?> -
trunk/include/page_header.php
r398 r405 31 31 $template->set_filenames(array('header'=>'header.tpl')); 32 32 33 $css = PHPWG_ROOT_PATH.'template/'.$user['template'].'/'.$user['template'].'.css'; 34 $template->assign_vars(array( 35 'CONTENT_ENCODING' => $lang_info['charset'], 36 'PAGE_TITLE' => $title, 37 'LANG'=>$lang_info['code'], 38 'DIR'=>$lang_info['direction'], 39 40 'T_STYLE' => $css 41 )); 33 $css = PHPWG_ROOT_PATH.'template/'.$user['template']; 34 $css.= '/'.$user['template'].'.css'; 35 36 $template->assign_vars( 37 array( 38 'CONTENT_ENCODING' => $lang_info['charset'], 39 'PAGE_TITLE' => $title, 40 'LANG'=>$lang_info['code'], 41 'DIR'=>$lang_info['direction'], 42 43 'T_STYLE' => $css 44 )); 42 45 43 46 // refresh 44 if ( isset( $refresh ) && $refresh >0 && isset($url_link))47 if ( isset( $refresh ) and $refresh > 0 and isset( $url_link ) ) 45 48 { 46 $ url = $url_link.'&slideshow='.$refresh;47 $template->assign_vars(array(48 49 'U_REFRESH' => add_session_id( $url)50 49 $template->assign_vars( 50 array( 51 'REFRESH_TIME' => $refresh, 52 'U_REFRESH' => add_session_id( $url_link ) 53 )); 51 54 $template->assign_block_vars('refresh', array()); 52 55 } 53 56 54 // Work around for "current" Apache 2 + PHP module which seems to not55 // cope with private cache control setting56 if (!empty( $_SERVER['SERVER_SOFTWARE'] )57 and strstr( $_SERVER['SERVER_SOFTWARE'], 'Apache/2'))58 {59 header( 'Cache-Control: no-cache, pre-check=0, post-check=0, max-age=0' );60 }61 else62 {63 header( 'Cache-Control: private, pre-check=0, post-check=0, max-age=0' );64 }65 header( 'Expires: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT' );66 header( 'Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT' );67 68 57 $template->pparse('header'); 69 58 ?> -
trunk/include/user.inc.php
r397 r405 46 46 setcookie( 'id', '', 0, cookie_path() ); 47 47 $url = 'category.php'; 48 header( 'Request-URI: '.$url ); 49 header( 'Content-Location: '.$url ); 50 header( 'Location: '.$url ); 51 exit(); 48 redirect( $url ); 52 49 } 53 50 -
trunk/index.php
r364 r405 37 37 // redirection 38 38 $url.= '.php'; 39 header( 'Request-URI: '.$url ); 40 header( 'Content-Location: '.$url ); 41 header( 'Location: '.$url ); 42 exit(); 39 redirect( $url ); 43 40 ?> -
trunk/install.php
r400 r405 181 181 // Is phpBB already installed? Yes? Redirect to the index 182 182 if (defined("PHPWG_INSTALLED")) 183 { 184 header( 'Location: index.php' ); 185 exit; 183 { 184 die( 'PhpWebGallery is already installed' ); 186 185 } 187 186 -
trunk/picture.php
r402 r405 181 181 // category page 182 182 $url = add_session_id( $url_home ); 183 header( 'Request-URI: '.$url ); 184 header( 'Content-Location: '.$url ); 185 header( 'Location: '.$url ); 186 exit(); 183 redirect( $url ); 187 184 } 188 185 else if ( $prev < 0 ) … … 196 193 $url = add_session_id( $url, true); 197 194 } 198 header( 'Request-URI: '.$url ); 199 header( 'Content-Location: '.$url ); 200 header( 'Location: '.$url ); 201 exit(); 195 redirect( $url ); 202 196 } 203 197 } … … 297 291 { 298 292 $refresh= $_GET['slideshow']; 299 $url_link = $picture['next']['url'] ;293 $url_link = $picture['next']['url'].'&slideshow='.$refresh; 300 294 } 301 295 -
trunk/profile.php
r393 r405 121 121 $url = 'category.php'; 122 122 if ( !isset($_POST['create_cookie']) ) $url = add_session_id( $url,true ); 123 header( 'Request-URI: '.$url ); 124 header( 'Content-Location: '.$url ); 125 header( 'Location: '.$url ); 126 exit(); 123 redirect( $url ); 127 124 } 128 125 } -
trunk/register.php
r393 r405 45 45 $session_id = session_create( $_POST['login'] ); 46 46 $url = 'category.php?id='.$session_id; 47 header( 'Request-URI: '.$url ); 48 header( 'Content-Location: '.$url ); 49 header( 'Location: '.$url ); 50 exit(); 47 redirect( $url ); 51 48 } 52 49 } -
trunk/search.php
r393 r405 56 56 $url = 'category.php?cat=search&search='.$search.'&mode='.$_POST['mode']; 57 57 $url = add_session_id( $url, true ); 58 header( 'Request-URI: '.$url ); 59 header( 'Content-Location: '.$url ); 60 header( 'Location: '.$url ); 61 exit(); 58 redirect( $url ); 62 59 } 63 60 }
Note: See TracChangeset
for help on using the changeset viewer.