mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:19:00 +01:00
update msgbox
This commit is contained in:
parent
19ee0cd939
commit
fed918c353
13
login.php
13
login.php
@ -38,8 +38,10 @@
|
||||
$GLOBALS['phpgw_info']['login_theme'] = 'submarine';
|
||||
}
|
||||
|
||||
$GLOBALS['phpgw']->common = CreateObject('phpgwapi.common');
|
||||
|
||||
$GLOBALS['phpgw']->xslttpl = CreateObject('phpgwapi.xslttemplates',$GLOBALS['phpgw_info']['server']['template_dir']);
|
||||
$GLOBALS['phpgw']->xslttpl->add_file(array('login'));
|
||||
$GLOBALS['phpgw']->xslttpl->add_file('login');
|
||||
|
||||
$data = array
|
||||
(
|
||||
@ -76,7 +78,6 @@
|
||||
|
||||
function check_logoutcode()
|
||||
{
|
||||
$GLOBALS['phpgw']->common = CreateObject('phpgwapi.common');
|
||||
switch($GLOBALS['HTTP_GET_VARS']['code'])
|
||||
{
|
||||
case 1:
|
||||
@ -259,8 +260,12 @@
|
||||
/*$GLOBALS['phpgw']->template->set_var('phpgw_head_base',$GLOBALS['phpgw_info']['server']['webserver_url'].'/');
|
||||
$GLOBALS['phpgw']->template->set_var('registration_url','registration/');*/
|
||||
|
||||
if($GLOBALS['phpgw_info']['flags']['msgbox_data'])
|
||||
{
|
||||
$data['login_standard']['msgbox_data'] = $GLOBALS['phpgw']->common->msgbox('',False,True);
|
||||
}
|
||||
|
||||
$data['login_standard']['website_title'] = $GLOBALS['phpgw_info']['server']['site_title'];
|
||||
$data['login_standard']['msgbox'] = $GLOBALS['phpgw']->common->msgbox('',False);
|
||||
$data['login_standard']['login_url'] = 'login.php' . $extra_vars;
|
||||
$data['login_standard']['cookie'] = show_cookie();
|
||||
$data['login_standard']['lang_username'] = lang('username');
|
||||
@ -270,6 +275,8 @@
|
||||
$data['login_standard']['lang_password'] = lang('password');
|
||||
$data['login_standard']['lang_login'] = lang('login');
|
||||
|
||||
//_debug_array($data);
|
||||
|
||||
$GLOBALS['phpgw']->xslttpl->set_var('login',$data);
|
||||
$GLOBALS['phpgw']->xslttpl->pp();
|
||||
?>
|
||||
|
@ -993,7 +993,7 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info'
|
||||
@discussion makes it easier and more consistant to generate message boxes
|
||||
*/
|
||||
|
||||
function msgbox($text='',$type=True)
|
||||
function msgbox($text='',$type=True,$xslt=False)
|
||||
{
|
||||
if ($text=='' && @isset($GLOBALS['phpgw_info']['flags']['msgbox_data']))
|
||||
{
|
||||
@ -1005,8 +1005,7 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info'
|
||||
return;
|
||||
}
|
||||
|
||||
// $GLOBALS['phpgw']->xslttpl->add_file(array('msgbox'));
|
||||
$GLOBALS['phpgw']->xslttpl->add_file(array($GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP . 'msgbox'));
|
||||
$GLOBALS['phpgw']->xslttpl->add_file($GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default') . SEP . 'msgbox');
|
||||
|
||||
$prev_helper = $GLOBALS['phpgw']->translation->translator_helper;
|
||||
$GLOBALS['phpgw']->translation->translator_helper = '';
|
||||
@ -1015,7 +1014,6 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info'
|
||||
{
|
||||
reset($text);
|
||||
|
||||
//_debug_array($text);
|
||||
while (list($key,$value) = each($text))
|
||||
{
|
||||
if ($value == True)
|
||||
@ -1029,7 +1027,7 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info'
|
||||
$alt = lang('ERROR');
|
||||
}
|
||||
|
||||
$data['msgbox_data'][] = array
|
||||
$data[] = array
|
||||
(
|
||||
'msgbox_text' => lang($key),
|
||||
'msgbox_img' => $img,
|
||||
@ -1037,9 +1035,6 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info'
|
||||
'lang_msgbox_statustext' => $alt
|
||||
);
|
||||
}
|
||||
|
||||
//_debug_array($data);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1054,7 +1049,7 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info'
|
||||
$alt = lang('ERROR');
|
||||
}
|
||||
|
||||
$data['msgbox_data'] = array
|
||||
$data = array
|
||||
(
|
||||
'msgbox_text' => lang($text),
|
||||
'msgbox_img' => $img,
|
||||
@ -1064,9 +1059,18 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info'
|
||||
}
|
||||
|
||||
$GLOBALS['phpgw']->translation->translator_helper = $prev_helper;
|
||||
$GLOBALS['phpgw']->xslttpl->set_var('msgbox',$data);
|
||||
|
||||
return $GLOBALS['phpgw']->xslttpl->parse();
|
||||
if ($xslt)
|
||||
{
|
||||
return $data;
|
||||
}
|
||||
else
|
||||
{
|
||||
$parse_data['msgbox_data'] = $data;
|
||||
|
||||
$GLOBALS['phpgw']->xslttpl->set_var('msgbox',$parse_data);
|
||||
return $GLOBALS['phpgw']->xslttpl->parse();
|
||||
}
|
||||
}
|
||||
|
||||
/*function msgbox($text='',$type=True,$output='return')
|
||||
|
Loading…
Reference in New Issue
Block a user