updated wit new msgbox

This commit is contained in:
seek3r 2002-05-27 08:22:12 +00:00
parent 60a0c1ac74
commit de3fcb1c70
2 changed files with 12 additions and 4 deletions

View File

@ -83,6 +83,7 @@
function show_cookie() function show_cookie()
{ {
global $code, $last_loginid, $login; global $code, $last_loginid, $login;
//echo '$GLOBALS: <pre>';print_r($GLOBALS);echo '</pre>';
/* This needs to be this way, because if someone doesnt want to use cookies, we shouldnt sneak one in */ /* This needs to be this way, because if someone doesnt want to use cookies, we shouldnt sneak one in */
if ($code != 5 && (isset($GLOBALS['phpgw_info']['server']['usecookies']) && $GLOBALS['phpgw_info']['server']['usecookies'])) if ($code != 5 && (isset($GLOBALS['phpgw_info']['server']['usecookies']) && $GLOBALS['phpgw_info']['server']['usecookies']))
{ {
@ -92,22 +93,24 @@
function check_logoutcode($code) function check_logoutcode($code)
{ {
$GLOBALS['phpgw']->template = CreateObject('phpgwapi.Template');
$GLOBALS['phpgw']->common = CreateObject('phpgwapi.common');
switch($code) switch($code)
{ {
case 1: case 1:
return lang('You have been successfully logged out'); return $GLOBALS['phpgw']->common->msgbox('You have been successfully logged out', True);
break; break;
case 2: case 2:
return lang('Sorry, your login has expired'); return $GLOBALS['phpgw']->common->msgbox('Sorry, your login has expired', False);
break; break;
case 5: case 5:
return '<font color="FF0000">' . lang('Bad login or password') . '</font>'; return $GLOBALS['phpgw']->common->msgbox('Bad login or password', False);
break; break;
case 10: case 10:
Setcookie('sessionid'); Setcookie('sessionid');
Setcookie('kp3'); Setcookie('kp3');
Setcookie('domain'); Setcookie('domain');
return '<font color=FF0000>' . lang('Your session could not be verified.') . '</font>'; return $GLOBALS['phpgw']->common->msgbox('Your session could not be verified.',False);
break; break;
default: default:
return '&nbsp;'; return '&nbsp;';

View File

@ -61,6 +61,11 @@
$this->set_root(PHPGW_TEMPLATE_DIR); $this->set_root(PHPGW_TEMPLATE_DIR);
$this->set_file('common', 'common.tpl'); $this->set_file('common', 'common.tpl');
} }
else
{
$this->set_root(PHPGW_INCLUDE_ROOT.'/phpgwapi/templates/default');
$this->set_file('common', 'common.tpl');
}
/* This covers setting the theme values so that each app doesnt have to */ /* This covers setting the theme values so that each app doesnt have to */
$theme_data = $GLOBALS['phpgw_info']['theme']; $theme_data = $GLOBALS['phpgw_info']['theme'];