Changeset 1052
- Timestamp:
- Feb 23, 2006, 6:12:32 AM (18 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/identification.php
r1029 r1052 32 32 //-------------------------------------------------------------- identification 33 33 $errors = array(); 34 35 $redirect_to = ''; 36 if ( !empty($_GET['redirect']) ) 37 { 38 $redirect_to = $_GET['redirect']; 39 if ( $user['is_the_guest'] ) 40 { 41 array_push($errors, $lang['access_forbiden']); 42 } 43 } 44 34 45 if (isset($_POST['login'])) 35 46 { 47 $redirect_to = $_POST['redirect']; 36 48 $username = mysql_escape_string($_POST['username']); 37 49 // retrieving the encrypted password of the login submitted … … 55 67 session_start(); 56 68 $_SESSION['id'] = $row['id']; 57 redirect( 'category.php');69 redirect(empty($redirect_to) ? 'category.php' : $redirect_to); 58 70 } 59 71 else … … 86 98 'U_LOST_PASSWORD' => PHPWG_ROOT_PATH.'password.php', 87 99 'U_HOME' => PHPWG_ROOT_PATH.'category.php', 100 'U_REDIRECT' => $redirect_to, 88 101 89 102 'F_LOGIN_ACTION' => PHPWG_ROOT_PATH.'identification.php' -
trunk/include/common.inc.php
r1036 r1052 201 201 if ($conf['gallery_locked']) 202 202 { 203 ob_start(); // make sure we can send cookies 203 204 echo 204 205 '<div style="text-align:center;">' 205 .$lang['gallery_locked_message'] 206 .'</div>'; 207 208 if ($user['status'] != 'admin') 206 .$lang['gallery_locked_message']; 207 echo '<a href="'.PHPWG_ROOT_PATH.'identification.php">.</a>'; 208 echo '</div>'; 209 210 if ( basename($_SERVER["PHP_SELF"]) != 'identification.php' 211 and $user['status'] != 'admin' ) 209 212 { 210 213 exit(); -
trunk/include/functions_category.inc.php
r1046 r1052 47 47 if (in_array($category_id, explode(',', $user['forbidden_categories']))) 48 48 { 49 echo '<div style="text-align:center;">'.$lang['access_forbiden'].'<br />'; 50 echo '<a href="./category.php">'; 51 echo $lang['thumbnails'].'</a></div>'; 52 exit(); 49 $login_url = './identification.php?redirect='. 50 htmlentities(htmlentities($_SERVER['REQUEST_URI'])); 51 if ( ! $user['is_the_guest'] ) 52 { 53 echo '<div style="text-align:center;">'; 54 echo $lang['hello'].' '.$user['username'].'! '; 55 echo $lang['access_forbiden'].'<br />'; 56 echo '<a href="./category.php">'.$lang['thumbnails'].'</a> '; 57 echo '</div>'; 58 exit(); 59 } 60 else 61 { 62 redirect($login_url); 63 } 53 64 } 54 65 } -
trunk/include/user.inc.php
r1036 r1052 59 59 $user['is_the_guest'] = false; 60 60 } 61 62 61 $user = array_merge( 63 62 $user, 64 63 getuserdata( 65 64 $user['id'], 66 defined('IN_ADMIN') and IN_ADMIN? false : true // use cache ?65 ( defined('IN_ADMIN') and IN_ADMIN ) ? false : true // use cache ? 67 66 ) 68 67 ); -
trunk/language/en_UK.iso-8859-1/common.lang.php
r1050 r1052 114 114 $lang['Weekly'] = 'Weekly'; 115 115 $lang['about_page_title'] = 'About PhpWebGallery'; 116 $lang['access_forbiden'] = 'You are not authorized to access th ispage';116 $lang['access_forbiden'] = 'You are not authorized to access the requested page'; 117 117 $lang['add to caddie'] = 'add to caddie'; 118 118 $lang['add_favorites_alt'] = 'Add to favorites'; … … 137 137 $lang['calendar_picture_hint'] = 'displays pictures added on '; 138 138 $lang['categories'] = 'Categories'; 139 $lang['click_to_redirect'] = 'Click here if your browser does not automatically forward you'; 139 140 $lang['comment date'] = 'comment date'; 140 141 $lang['comment'] = 'Comment'; -
trunk/language/fr_FR.iso-8859-1/common.lang.php
r1050 r1052 113 113 $lang['Weekly'] = 'Hebdomadaire'; 114 114 $lang['about_page_title'] = 'À propos de PhpWebGallery'; 115 $lang['access_forbiden'] = 'Vous n\'êtes pas autorisé sur cette page';115 $lang['access_forbiden'] = 'Vous n\'êtes pas autorisé sur la page demandée'; 116 116 $lang['add to caddie'] = 'ajouter au panier'; 117 117 $lang['add_favorites_alt'] = 'Ajouter aux favoris'; … … 136 136 $lang['calendar_picture_hint'] = 'affiche les images du '; 137 137 $lang['categories'] = 'Catégories'; 138 $lang['click_to_redirect'] = 'Cliquez ici si votre navigateur ne vous redirige pas.'; 138 139 $lang['comment date'] = 'date du commentaire'; 139 140 $lang['comment'] = 'Commentaire'; -
trunk/picture.php
r1051 r1052 30 30 define('PHPWG_ROOT_PATH','./'); 31 31 include_once(PHPWG_ROOT_PATH.'include/common.inc.php'); 32 33 include(PHPWG_ROOT_PATH.'include/section_init.inc.php'); 32 34 //-------------------------------------------------- access authorization check 33 35 if (isset($page['cat']) and is_numeric($page['cat'])) … … 36 38 } 37 39 //-------------------------------------------------------------- initialization 38 include(PHPWG_ROOT_PATH.'include/section_init.inc.php');39 40 40 // if this image_id doesn't correspond to this category, an error message is 41 41 // displayed, and execution is stopped -
trunk/template/yoga/identification.tpl
r960 r1052 24 24 <fieldset> 25 25 <legend>{lang:Connection settings}</legend> 26 26 <input type="hidden" name="redirect" value="{U_REDIRECT}"> 27 27 <ul> 28 28 <li> -
trunk/template/yoga/redirect.tpl
r1041 r1052 1 redirection<br/>2 < a href="{U_REFRESH}">{U_REFRESH}</a>1 <p>Redirection...</p> 2 <p><a href="{U_REFRESH}">{lang:click_to_redirect}</a></p>
Note: See TracChangeset
for help on using the changeset viewer.