Changeset 25 for trunk/login.php
- Timestamp:
- 05/10/07 17:16:06 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/login.php
r16 r25 5 5 * Originaly written by Dan Kuykendall <seek3r@phpgroupware.org> * 6 6 * Joseph Engo <jengo@phpgroupware.org> * 7 * --------------------------------------------*7 * Updated by Nilton Emilio Buhrer Neto <niltonneto@celepar.pr.gov.br> * 8 8 * This program is free software; you can redistribute it and/or modify it * 9 9 * under the terms of the GNU General Public License as published by the * … … 80 80 // whoooo scaring 81 81 82 if($GLOBALS['phpgw_info']['server']['usecookies'] == True) 83 { 84 $GLOBALS['phpgw']->session->phpgw_setcookie('serverID', '1024'); 85 //GLOBALS['phpgw']->session->phpgw_setcookie('eGroupWareLoginTime', time()); 86 } 87 88 /* 89 if($_GET['cd'] != 10 && $GLOBALS['phpgw_info']['server']['usecookies'] == False) 90 { 91 $GLOBALS['phpgw']->session->setcookie('sessionid'); 92 $GLOBALS['phpgw']->session->setcookie('kp3'); 93 $GLOBALS['phpgw']->session->setcookie('domain'); 94 } 95 */ 96 97 /* This is not working yet because I need to figure out a way to clear the $cd =1 98 if(isset($_SERVER['PHP_AUTH_USER']) && $_GET['cd'] == '1') 99 { 100 Header('HTTP/1.0 401 Unauthorized'); 101 Header('WWW-Authenticate: Basic realm="phpGroupWare"'); 102 echo 'You have to re-authentificate yourself'; 103 exit; 104 } 105 */ 82 // ServerID => Identify the Apache Frontend. 83 if($GLOBALS['phpgw_info']['server']['usecookies'] == True && $GLOBALS['phpgw_info']['server']['use_frontend_id']) 84 { 85 $GLOBALS['phpgw']->session->phpgw_setcookie('serverID', $GLOBALS['phpgw_info']['server']['use_frontend_id']); 86 } 87 106 88 107 89 function check_logoutcode($code) … … 111 93 case 1: 112 94 return lang('You have been successfully logged out'); 113 break;95 114 96 case 2: 115 97 return lang('Sorry, your login has expired'); 116 break;98 117 99 case 4: 118 100 return lang('Cookies are required to login to this site.'); 119 break;101 120 102 case 5: 121 103 return '<font color="FF0000">' . lang('Bad login or password') . '</font>'; 122 break;104 123 105 case 98: 124 106 return '<font color="FF0000">' . lang('Account is expired') . '</font>'; 125 break;107 126 108 case 99: 127 109 return '<font color="FF0000">' . lang('Blocked, too many attempts') . '</font>'; 128 break;110 129 111 case 10: 130 112 $GLOBALS['phpgw']->session->phpgw_setcookie('sessionid'); … … 139 121 140 122 return '<font color="#FF0000">' . lang('Your session could not be verified.') . '</font>'; 141 break;123 142 124 default: 143 125 return ' '; … … 195 177 if(isset($passwd_type) || $_POST['submitit_x'] || $_POST['submitit_y'] || $submit) 196 178 { 197 // TEMPORÁRIO, Login com ou sem organização ////////////////////////////////////////////////////198 /*$common = CreateObject('phpgwapi.common');179 ///// Início - Código temporário: Para renomeação de login com organização para sem. ////// 180 /* $common = CreateObject('phpgwapi.common'); 199 181 $ldap_conn = $common->ldapConnect(); 200 182 $justthese = array("uid"); … … 202 184 $ldap_search = ldap_search($ldap_conn, $GLOBALS['phpgw_info']['server']['ldap_context'], $filter, $justthese); 203 185 $ldap_info = ldap_get_entries($ldap_conn, $ldap_search); 204 if ($ldap_info['count'] != 0) // Usuário SEM ORG EXISTE.186 if ($ldap_info['count'] != 0) // Verifica se o login existe sem organização. 205 187 { 206 188 $_POST['login'] = $_POST['user']; 207 189 } 208 ldap_close($ldap_conn); 209 */ 210 // TEMPORÁRIO, Login com ou sem organização //////////////////////////////////////////////////// 211 190 ldap_close($ldap_conn);*/ 191 /// Fim - Código temporário: Para renomeação de login com organização para sem. ////// 212 192 if(getenv('REQUEST_METHOD') != 'POST' && $_SERVER['REQUEST_METHOD'] != 'POST' && 213 193 !isset($_SERVER['PHP_AUTH_USER']) && !isset($_SERVER['SSL_CLIENT_S_DN'])) … … 215 195 $GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/login.php','cd=5')); 216 196 } 217 #if(!isset($_COOKIE['eGroupWareLoginTime']))218 #{219 # $GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/login.php','cd=4'));220 #}221 197 222 198 // don't get login data again when $submit is true … … 320 296 if($GLOBALS['phpgw_info']['server']['use_prefix_organization']) 321 297 { 298 // Início - Temporário: Para período de adaptação dos usuários, usando sem organização. 299 // $organization_select = "<tr><td width='96' class='loginLabel' align='right'>".lang("organization").": </td>". 300 // $organization_select .= "<td align='left' style='font-weight:bold' class='loginLabel' colspan=2><a style='font-weight:normal;font-decoration:none;text-decoration:none' href='javascript:void(0)' onclick='alert(\"Não é preciso mais selecionar a Organização.\\r\\n Digite apenas o usuário e a senha!\")' onmouseover='this.style.cursor=\"help\"'> automático</a></td></tr>"; 301 // Fim - Temporário: Para período de adaptação dos usuários, usando sem organização. 322 302 $organization_select = "<tr><td width=\"66\" class=\"loginLabel\">"; 323 303 $organization_select .= lang("organization").":</td>"; … … 351 331 $tmpl->set_var('select_organization',$organization_select); 352 332 } 353 333 354 334 $domain_select = ' '; 355 335 $last_loginid = $_COOKIE['last_loginid']; … … 427 407 $tmpl->set_var('bg_color_title',($GLOBALS['phpgw_info']['server']['login_bg_color_title']?$GLOBALS['phpgw_info']['server']['login_bg_color_title']:'486591')); 428 408 409 if($GLOBALS['phpgw_info']['server']['use_frontend_name']) 410 $tmpl->set_var('frontend_name', " - ".$GLOBALS['phpgw_info']['server']['use_frontend_name']); 411 429 412 if (substr($GLOBALS['phpgw_info']['server']['login_logo_file'],0,4) == 'http') 430 413 {
Note: See TracChangeset
for help on using the changeset viewer.