mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-25 12:21:26 +02:00
Formatting cleanup; Removed stray whitespace, especially from the end of some files; Convert api arrays to egw/egw_info
This commit is contained in:
parent
7d720dc5ea
commit
a1e8f71b22
276
about.php
276
about.php
@ -11,139 +11,137 @@
|
|||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
$GLOBALS['phpgw_info'] = array();
|
$GLOBALS['egw_info'] = array();
|
||||||
$app = $_GET['app'];
|
$app = $_GET['app'];
|
||||||
if(isset($app) && $_GET['app'] != "eGroupWare")
|
if(isset($app) && $_GET['app'] != 'eGroupWare')
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw_info']['flags']['currentapp'] = $app;
|
$GLOBALS['egw_info']['flags']['currentapp'] = $app;
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
$GLOBALS['phpgw_info']['flags']['currentapp'] = 'about';
|
{
|
||||||
}
|
$GLOBALS['egw_info']['flags']['currentapp'] = 'about';
|
||||||
|
}
|
||||||
|
|
||||||
$GLOBALS['phpgw_info']['flags']['disable_Template_class'] = True;
|
$GLOBALS['egw_info']['flags']['disable_Template_class'] = True;
|
||||||
$GLOBALS['phpgw_info']['flags']['noheader'] = True;
|
$GLOBALS['egw_info']['flags']['noheader'] = True;
|
||||||
include('header.inc.php');
|
include('header.inc.php');
|
||||||
|
|
||||||
if ($app)
|
if ($app)
|
||||||
{
|
{
|
||||||
if (!($included = $GLOBALS['phpgw']->hooks->single('about',$app)))
|
if (!($included = $GLOBALS['egw']->hooks->single('about',$app)))
|
||||||
{
|
{
|
||||||
$api_only = !($included = file_exists(PHPGW_INCLUDE_ROOT . "/$app/setup/setup.inc.php"));
|
$api_only = !($included = file_exists(EGW_INCLUDE_ROOT . "/$app/setup/setup.inc.php"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$api_only = True;
|
$api_only = True;
|
||||||
}
|
}
|
||||||
|
|
||||||
$tpl = CreateObject('phpgwapi.Template',$GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi'));
|
$tpl = CreateObject('phpgwapi.Template',$GLOBALS['egw']->common->get_tpl_dir('phpgwapi'));
|
||||||
$tpl->set_file(array(
|
$tpl->set_file(array(
|
||||||
'phpgw_about' => 'about.tpl',
|
'phpgw_about' => 'about.tpl',
|
||||||
'phpgw_about_unknown' => 'about_unknown.tpl'
|
'phpgw_about_unknown' => 'about_unknown.tpl'
|
||||||
));
|
));
|
||||||
|
|
||||||
$title = isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : 'eGroupWare';
|
$title = isset($GLOBALS['egw_info']['apps'][$app]) ? $GLOBALS['egw_info']['apps'][$app]['title'] : 'eGroupWare';
|
||||||
$GLOBALS['phpgw_info']['flags']['app_header'] = lang('About %1',$title);
|
$GLOBALS['egw_info']['flags']['app_header'] = lang('About %1',$title);
|
||||||
$GLOBALS['phpgw']->common->phpgw_header();
|
$GLOBALS['egw']->common->phpgw_header();
|
||||||
|
|
||||||
$tpl->set_block('phpgw_about', 'egroupware','egroupware');
|
$tpl->set_block('phpgw_about', 'egroupware','egroupware');
|
||||||
$tpl->set_block('phpgw_about', 'application','application');
|
$tpl->set_block('phpgw_about', 'application','application');
|
||||||
|
|
||||||
|
if ($included)
|
||||||
if ($included)
|
{
|
||||||
{
|
$tpl->set_var('phpgw_app_about', about_app());
|
||||||
$tpl->set_var('phpgw_app_about', about_app());
|
|
||||||
$tpl->pparse('phpgw_about', 'application', True);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ($api_only)
|
|
||||||
{
|
|
||||||
$tpl->set_var('phpgw_logo',$GLOBALS['phpgw']->common->image('phpgwapi','logo.gif'));
|
|
||||||
$tpl->set_var('phpgw_version',lang('eGroupWare API version %1',$GLOBALS['phpgw_info']['server']['versions']['phpgwapi']));
|
|
||||||
$tpl->set_var('phpgw_message',lang('%1eGroupWare%2 is a multi-user, web-based groupware suite written in %3PHP%4.',
|
|
||||||
'<a href="http://www.eGroupWare.org" target="_blank">','</a>','<a href="http://www.php.net" target="_blank">','</a>'));
|
|
||||||
$tpl->pparse('out', 'egroupware');
|
|
||||||
|
|
||||||
$tpl->set_var('phpgw_app_about',about_template());
|
|
||||||
$tpl->pparse('phpgw_about', 'application', True);
|
$tpl->pparse('phpgw_about', 'application', True);
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$tpl->set_var('app_header',$app);
|
|
||||||
|
|
||||||
$tpl->pparse('out','phpgw_about_unknown');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$GLOBALS['phpgw']->common->phpgw_footer();
|
|
||||||
|
|
||||||
function about_app()
|
|
||||||
{
|
|
||||||
global $app;
|
|
||||||
include (PHPGW_INCLUDE_ROOT . "/$app/setup/setup.inc.php");
|
|
||||||
$info = $setup_info[$app];
|
|
||||||
$info['icon'] = $GLOBALS['phpgw']->common->image($app,array('navbar','nonav'));
|
|
||||||
$info['title'] = $GLOBALS['phpgw_info']['apps'][$app]['title'];
|
|
||||||
return about_display($info);
|
|
||||||
}
|
|
||||||
|
|
||||||
function about_template()
|
|
||||||
{
|
|
||||||
$template = $GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi');
|
|
||||||
|
|
||||||
include ($template . "/setup/setup.inc.php");
|
|
||||||
$s = "";
|
|
||||||
$template_info[] = $GLOBALS['egw_info']['template'][$GLOBALS['phpgw_info']['user']['preferences']['common']['template_set']];
|
|
||||||
foreach($template_info as $info)
|
|
||||||
{
|
|
||||||
$s .= about_display($info);
|
|
||||||
}
|
}
|
||||||
return $s;
|
else
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function about_display($info)
|
|
||||||
{
|
|
||||||
$other_infos = array(
|
|
||||||
'author' => lang('Author'),
|
|
||||||
'maintainer' => lang('Maintainer'),
|
|
||||||
'version' => lang('Version'),
|
|
||||||
'license' => lang('License'),
|
|
||||||
);
|
|
||||||
if($info[icon])
|
|
||||||
{
|
{
|
||||||
$icon = $info[icon];
|
if ($api_only)
|
||||||
}
|
{
|
||||||
$s = "<table width='70%' cellpadding='4'>\n";
|
$tpl->set_var('phpgw_logo',$GLOBALS['egw']->common->image('phpgwapi','logo.gif'));
|
||||||
if(trim($icon) != "")
|
$tpl->set_var('phpgw_version',lang('eGroupWare API version %1',$GLOBALS['egw_info']['server']['versions']['phpgwapi']));
|
||||||
{
|
$tpl->set_var('phpgw_message',lang('%1eGroupWare%2 is a multi-user, web-based groupware suite written in %3PHP%4.',
|
||||||
$s.= "<tr>
|
'<a href="http://www.eGroupWare.org" target="_blank">','</a>','<a href="http://www.php.net" target="_blank">','</a>'));
|
||||||
<td align='left'><img src='$icon' alt=\"$info[title]\" /></td><td align='left'><h2>$info[title]</h2></td></tr>";
|
$tpl->pparse('out', 'egroupware');
|
||||||
|
|
||||||
|
$tpl->set_var('phpgw_app_about',about_template());
|
||||||
|
$tpl->pparse('phpgw_about', 'application', True);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$s .= "<tr>
|
$tpl->set_var('app_header',$app);
|
||||||
<td align='left'></td><td align='left'><h2>$info[title]</h2></td></tr>";
|
|
||||||
}
|
|
||||||
if ($info['description'])
|
|
||||||
{
|
|
||||||
$info['description'] = lang($info['description']);
|
|
||||||
$s .= "<tr><td colspan='2' align='left'>$info[description]</td></tr>\n";
|
|
||||||
if ($info['note'])
|
|
||||||
{
|
|
||||||
$info['note'] = lang($info['note']);
|
|
||||||
$s .= "<tr><td colspan='2' align='left'><i>$info[note]</i></td></tr>\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
$tpl->pparse('out','phpgw_about_unknown');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
foreach ($other_infos as $key => $val)
|
|
||||||
|
$GLOBALS['egw']->common->phpgw_footer();
|
||||||
|
|
||||||
|
function about_app()
|
||||||
{
|
{
|
||||||
if (isset($info[$key]))
|
global $app;
|
||||||
|
include(EGW_INCLUDE_ROOT . "/$app/setup/setup.inc.php");
|
||||||
|
$info = $setup_info[$app];
|
||||||
|
$info['icon'] = $GLOBALS['egw']->common->image($app,array('navbar','nonav'));
|
||||||
|
$info['title'] = $GLOBALS['egw_info']['apps'][$app]['title'];
|
||||||
|
return about_display($info);
|
||||||
|
}
|
||||||
|
|
||||||
|
function about_template()
|
||||||
|
{
|
||||||
|
$template = $GLOBALS['egw']->common->get_tpl_dir('phpgwapi');
|
||||||
|
|
||||||
|
include ($template . "/setup/setup.inc.php");
|
||||||
|
$s = "";
|
||||||
|
$template_info[] = $GLOBALS['egw_info']['template'][$GLOBALS['egw_info']['user']['preferences']['common']['template_set']];
|
||||||
|
foreach($template_info as $info)
|
||||||
{
|
{
|
||||||
$s .= "<tr><td width='1%' align='left'>$val</td><td>";
|
$s .= about_display($info);
|
||||||
|
}
|
||||||
|
return $s;
|
||||||
|
}
|
||||||
|
|
||||||
|
function about_display($info)
|
||||||
|
{
|
||||||
|
$other_infos = array(
|
||||||
|
'author' => lang('Author'),
|
||||||
|
'maintainer' => lang('Maintainer'),
|
||||||
|
'version' => lang('Version'),
|
||||||
|
'license' => lang('License'),
|
||||||
|
);
|
||||||
|
if($info[icon])
|
||||||
|
{
|
||||||
|
$icon = $info[icon];
|
||||||
|
}
|
||||||
|
$s = "<table width='70%' cellpadding='4'>\n";
|
||||||
|
if(trim($icon) != "")
|
||||||
|
{
|
||||||
|
$s.= "<tr>
|
||||||
|
<td align='left'><img src='$icon' alt=\"$info[title]\" /></td><td align='left'><h2>$info[title]</h2></td></tr>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$s .= "<tr>
|
||||||
|
<td align='left'></td><td align='left'><h2>$info[title]</h2></td></tr>";
|
||||||
|
}
|
||||||
|
if ($info['description'])
|
||||||
|
{
|
||||||
|
$info['description'] = lang($info['description']);
|
||||||
|
$s .= "<tr><td colspan='2' align='left'>$info[description]</td></tr>\n";
|
||||||
|
if ($info['note'])
|
||||||
|
{
|
||||||
|
$info['note'] = lang($info['note']);
|
||||||
|
$s .= "<tr><td colspan='2' align='left'><i>$info[note]</i></td></tr>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
foreach ($other_infos as $key => $val)
|
||||||
|
{
|
||||||
|
if (isset($info[$key]))
|
||||||
|
{
|
||||||
|
$s .= "<tr><td width='1%' align='left'>$val</td><td>";
|
||||||
$infos = $info[$key];
|
$infos = $info[$key];
|
||||||
for ($n = 0; is_array($info[$key][$n]) && ($infos = $info[$key][$n]) || !$n; ++$n)
|
for ($n = 0; is_array($info[$key][$n]) && ($infos = $info[$key][$n]) || !$n; ++$n)
|
||||||
{
|
{
|
||||||
@ -151,10 +149,10 @@ function about_display($info)
|
|||||||
{
|
{
|
||||||
$infos = array('email' => $info[$key.'_email'],'name' => $infos);
|
$infos = array('email' => $info[$key.'_email'],'name' => $infos);
|
||||||
}
|
}
|
||||||
elseif(!is_array($infos) && isset($info[$key.'_url']))
|
elseif(!is_array($infos) && isset($info[$key.'_url']))
|
||||||
{
|
{
|
||||||
$infos = array('url' => $info[$key.'_url'],'name' => $infos);
|
$infos = array('url' => $info[$key.'_url'],'name' => $infos);
|
||||||
}
|
}
|
||||||
if (is_array($infos))
|
if (is_array($infos))
|
||||||
{
|
{
|
||||||
if ($infos['email'])
|
if ($infos['email'])
|
||||||
@ -163,26 +161,26 @@ function about_display($info)
|
|||||||
$emails = split('@|<br>',$infos['email']);
|
$emails = split('@|<br>',$infos['email']);
|
||||||
if (count($names) < count($emails)/2)
|
if (count($names) < count($emails)/2)
|
||||||
{
|
{
|
||||||
$names = '';
|
$names = '';
|
||||||
}
|
}
|
||||||
$infos = '';
|
$infos = '';
|
||||||
while (list($user,$domain) = $emails)
|
while (list($user,$domain) = $emails)
|
||||||
{
|
{
|
||||||
if ($infos) $infos .= '<br>';
|
if ($infos) $infos .= '<br>';
|
||||||
$name = $names ? array_shift($names) : $user;
|
$name = $names ? array_shift($names) : $user;
|
||||||
$infos .= "<a href='mailto:$user at $domain'><span onClick=\"document.location='mailto:$user'+'@'+'$domain'; return false;\">$name</span></a>";
|
$infos .= "<a href='mailto:$user at $domain'><span onClick=\"document.location='mailto:$user'+'@'+'$domain'; return false;\">$name</span></a>";
|
||||||
array_shift($emails); array_shift($emails);
|
array_shift($emails); array_shift($emails);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif($infos['url'])
|
elseif($infos['url'])
|
||||||
{
|
{
|
||||||
$img = $info[$key.'_img'];
|
$img = $info[$key.'_img'];
|
||||||
if ($img)
|
if ($img)
|
||||||
{
|
{
|
||||||
$img_url = $GLOBALS['phpgw']->common->image('phpgwapi',$img);
|
$img_url = $GLOBALS['egw']->common->image('phpgwapi',$img);
|
||||||
if (!$img_url)
|
if (!$img_url)
|
||||||
{
|
{
|
||||||
$img_url = $GLOBALS['phpgw']->common->image($info['name'],$img);
|
$img_url = $GLOBALS['egw']->common->image($info['name'],$img);
|
||||||
}
|
}
|
||||||
$infos = '<table border="0"><tr><td style="text-align:center;"><a href="'.$infos['url'].'"><img src="'.$img_url.'" border="0"><br>'.$infos['name'].'</a></td></tr></table>';
|
$infos = '<table border="0"><tr><td style="text-align:center;"><a href="'.$infos['url'].'"><img src="'.$img_url.'" border="0"><br>'.$infos['name'].'</a></td></tr></table>';
|
||||||
}
|
}
|
||||||
@ -195,16 +193,16 @@ function about_display($info)
|
|||||||
$s .= ($n ? '<br>' : '') . $infos;
|
$s .= ($n ? '<br>' : '') . $infos;
|
||||||
}
|
}
|
||||||
$s .= "</td></tr>\n";
|
$s .= "</td></tr>\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($info['extra_untranslated'])
|
||||||
|
{
|
||||||
|
$s .= "<tr><td colspan='2' align='left'>$info[extra_untranslated]</td></tr>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
$s .= "</table>\n";
|
||||||
|
|
||||||
|
return $s;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($info['extra_untranslated'])
|
|
||||||
{
|
|
||||||
$s .= "<tr><td colspan='2' align='left'>$info[extra_untranslated]</td></tr>\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
$s .= "</table>\n";
|
|
||||||
|
|
||||||
return $s;
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
$login = 'anonymous';
|
$login = 'anonymous';
|
||||||
$passwd = 'anonymous';
|
$passwd = 'anonymous';
|
||||||
|
|
||||||
$GLOBALS['phpgw_info']['flags'] = array(
|
$GLOBALS['egw_info']['flags'] = array(
|
||||||
'disable_Template_class' => True,
|
'disable_Template_class' => True,
|
||||||
'login' => True,
|
'login' => True,
|
||||||
'currentapp' => 'login',
|
'currentapp' => 'login',
|
||||||
@ -35,6 +35,6 @@
|
|||||||
$login = 'anonymous';
|
$login = 'anonymous';
|
||||||
$passwd = 'anonymous';
|
$passwd = 'anonymous';
|
||||||
|
|
||||||
$sessionid = $GLOBALS['phpgw']->session->create($login,$passwd,'text');
|
$sessionid = $GLOBALS['egw']->session->create($login,$passwd,'text');
|
||||||
$GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/index.php'));
|
$GLOBALS['egw']->redirect($GLOBALS['egw']->link('/index.php'));
|
||||||
?>
|
?>
|
||||||
|
71
index.php
71
index.php
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/**************************************************************************\
|
/**************************************************************************\
|
||||||
* phpGroupWare *
|
* eGroupWare *
|
||||||
* http://www.phpgroupware.org *
|
* http://www.egroupware.org *
|
||||||
* -------------------------------------------- *
|
* -------------------------------------------- *
|
||||||
* This program is free software; you can redistribute it and/or modify it *
|
* This program is free software; you can redistribute it and/or modify it *
|
||||||
* under the terms of the GNU General Public License as published by the *
|
* under the terms of the GNU General Public License as published by the *
|
||||||
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
$phpgw_info = array();
|
$egw_info = array();
|
||||||
if(!file_exists('header.inc.php'))
|
if(!file_exists('header.inc.php'))
|
||||||
{
|
{
|
||||||
Header('Location: setup/index.php');
|
Header('Location: setup/index.php');
|
||||||
@ -27,8 +27,8 @@
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(isset($_GET['hasupdates']) && $_GET['hasupdates'] == 'yes')
|
||||||
if(isset($_GET['hasupdates']) && $_GET['hasupdates'] == "yes") {
|
{
|
||||||
$hasupdates = True;
|
$hasupdates = True;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,22 +45,20 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//$phpgw->log->message('W-BadmenuactionVariable, menuaction missing or corrupt: %1',$menuaction);
|
//$egw->log->message('W-BadmenuactionVariable, menuaction missing or corrupt: %1',$menuaction);
|
||||||
//$phpgw->log->commit();
|
//$egw->log->commit();
|
||||||
|
|
||||||
$app = 'home';
|
$app = 'home';
|
||||||
$invalid_data = True;
|
$invalid_data = True;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if($app == 'phpgwapi')
|
if($app == 'phpgwapi')
|
||||||
{
|
{
|
||||||
$app = 'home';
|
$app = 'home';
|
||||||
$api_requested = True;
|
$api_requested = True;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$GLOBALS['egw_info']['flags'] = array(
|
||||||
$GLOBALS['phpgw_info']['flags'] = array(
|
|
||||||
'noheader' => True,
|
'noheader' => True,
|
||||||
'nonavbar' => True,
|
'nonavbar' => True,
|
||||||
'enable_network_class' => True,
|
'enable_network_class' => True,
|
||||||
@ -72,42 +70,39 @@
|
|||||||
|
|
||||||
// Check if we are using windows or normal webpage
|
// Check if we are using windows or normal webpage
|
||||||
$windowed = false;
|
$windowed = false;
|
||||||
$tpl_info = PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info']['user']['preferences']['common']['template_set'] . '/setup/setup.inc.php';
|
$tpl_info = EGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['egw_info']['user']['preferences']['common']['template_set'] . '/setup/setup.inc.php';
|
||||||
|
|
||||||
if(@file_exists($tpl_info))
|
if(@file_exists($tpl_info))
|
||||||
{
|
{
|
||||||
include_once($tpl_info);
|
include_once($tpl_info);
|
||||||
// if(isset($template_info))
|
// if(isset($template_info))
|
||||||
// {
|
// {
|
||||||
if($GLOBALS['egw_info']['template'][$GLOBALS['phpgw_info']['user']['preferences']['common']['template_set']]['windowed'])
|
if($GLOBALS['egw_info']['template'][$GLOBALS['egw_info']['user']['preferences']['common']['template_set']]['windowed'])
|
||||||
{
|
{
|
||||||
$windowed = true;
|
$windowed = true;
|
||||||
}
|
}
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if($app == 'home' && !$api_requested && !$windowed)
|
if($app == 'home' && !$api_requested && !$windowed)
|
||||||
{
|
{
|
||||||
if ($GLOBALS['phpgw_info']['server']['force_default_app'] && $GLOBALS['phpgw_info']['server']['force_default_app'] != 'user_choice')
|
if ($GLOBALS['egw_info']['server']['force_default_app'] && $GLOBALS['egw_info']['server']['force_default_app'] != 'user_choice')
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw_info']['user']['preferences']['common']['default_app'] = $GLOBALS['phpgw_info']['server']['force_default_app'];
|
$GLOBALS['egw_info']['user']['preferences']['common']['default_app'] = $GLOBALS['egw_info']['server']['force_default_app'];
|
||||||
|
|
||||||
}
|
}
|
||||||
if($GLOBALS['phpgw_info']['user']['preferences']['common']['default_app'] && !$hasupdates) {
|
if($GLOBALS['egw_info']['user']['preferences']['common']['default_app'] && !$hasupdates)
|
||||||
|
{
|
||||||
$GLOBALS['phpgw']->redirect_link('/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['default_app'].'/index.php');
|
$GLOBALS['egw']->redirect_link('/'.$GLOBALS['egw_info']['user']['preferences']['common']['default_app'].'/index.php');
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
$GLOBALS['phpgw']->redirect_link('/home/index.php');
|
{
|
||||||
|
$GLOBALS['egw']->redirect_link('/home/index.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($windowed && $_GET['cd'] == "yes")
|
if($windowed && $_GET['cd'] == 'yes')
|
||||||
{
|
{
|
||||||
|
$GLOBALS['egw_info']['flags'] = array(
|
||||||
$GLOBALS['phpgw_info']['flags'] = array(
|
|
||||||
'noheader' => False,
|
'noheader' => False,
|
||||||
'nonavbar' => False,
|
'nonavbar' => False,
|
||||||
'enable_network_class' => True,
|
'enable_network_class' => True,
|
||||||
@ -115,14 +110,14 @@
|
|||||||
'enable_nextmatchs_class' => True,
|
'enable_nextmatchs_class' => True,
|
||||||
'currentapp' => 'eGroupWare'
|
'currentapp' => 'eGroupWare'
|
||||||
);
|
);
|
||||||
$GLOBALS['phpgw']->common->phpgw_header();
|
$GLOBALS['egw']->common->phpgw_header();
|
||||||
$GLOBALS['phpgw']->common->phpgw_footer();
|
$GLOBALS['egw']->common->phpgw_footer();
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
if($api_requested)
|
if($api_requested)
|
||||||
{
|
{
|
||||||
|
|
||||||
$app = 'phpgwapi';
|
$app = 'phpgwapi';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -140,9 +135,9 @@
|
|||||||
{
|
{
|
||||||
if(!$app || !$class || !$method)
|
if(!$app || !$class || !$method)
|
||||||
{
|
{
|
||||||
if(@is_object($GLOBALS['phpgw']->log))
|
if(@is_object($GLOBALS['egw']->log))
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->log->message(array(
|
$GLOBALS['egw']->log->message(array(
|
||||||
'text' => 'W-BadmenuactionVariable, menuaction missing or corrupt: %1',
|
'text' => 'W-BadmenuactionVariable, menuaction missing or corrupt: %1',
|
||||||
'p1' => $menuaction,
|
'p1' => $menuaction,
|
||||||
'line' => __LINE__,
|
'line' => __LINE__,
|
||||||
@ -153,9 +148,9 @@
|
|||||||
|
|
||||||
if(!is_array($GLOBALS[$class]->public_functions) || ! $$GLOBALS[$class]->public_functions[$method] && $method)
|
if(!is_array($GLOBALS[$class]->public_functions) || ! $$GLOBALS[$class]->public_functions[$method] && $method)
|
||||||
{
|
{
|
||||||
if(@is_object($GLOBALS['phpgw']->log))
|
if(@is_object($GLOBALS['egw']->log))
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->log->message(array(
|
$GLOBALS['egw']->log->message(array(
|
||||||
'text' => 'W-BadmenuactionVariable, attempted to access private method: %1',
|
'text' => 'W-BadmenuactionVariable, attempted to access private method: %1',
|
||||||
'p1' => $method,
|
'p1' => $method,
|
||||||
'line' => __LINE__,
|
'line' => __LINE__,
|
||||||
@ -163,17 +158,17 @@
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(@is_object($GLOBALS['phpgw']->log))
|
if(@is_object($GLOBALS['egw']->log))
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->log->commit();
|
$GLOBALS['egw']->log->commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
$GLOBALS['phpgw']->redirect_link('/home/index.php');
|
$GLOBALS['egw']->redirect_link('/home/index.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!isset($GLOBALS['phpgw_info']['nofooter']))
|
if(!isset($GLOBALS['egw_info']['nofooter']))
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->common->phpgw_footer();
|
$GLOBALS['egw']->common->phpgw_footer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
69
login.php
69
login.php
@ -161,7 +161,6 @@
|
|||||||
$submit = True;
|
$submit = True;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Apache + mod_ssl style SSL certificate authentication
|
# Apache + mod_ssl style SSL certificate authentication
|
||||||
@ -203,7 +202,7 @@
|
|||||||
if(getenv('REQUEST_METHOD') != 'POST' && $_SERVER['REQUEST_METHOD'] != 'POST' &&
|
if(getenv('REQUEST_METHOD') != 'POST' && $_SERVER['REQUEST_METHOD'] != 'POST' &&
|
||||||
!isset($_SERVER['PHP_AUTH_USER']) && !isset($_SERVER['SSL_CLIENT_S_DN']))
|
!isset($_SERVER['PHP_AUTH_USER']) && !isset($_SERVER['SSL_CLIENT_S_DN']))
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->session->phpgw_setcookie('eGW_remember');
|
$GLOBALS['egw']->session->phpgw_setcookie('eGW_remember');
|
||||||
$GLOBALS['egw']->redirect($GLOBALS['egw']->link('/login.php','cd=5'));
|
$GLOBALS['egw']->redirect($GLOBALS['egw']->link('/login.php','cd=5'));
|
||||||
}
|
}
|
||||||
#if(!isset($_COOKIE['eGroupWareLoginTime']))
|
#if(!isset($_COOKIE['eGroupWareLoginTime']))
|
||||||
@ -245,7 +244,7 @@
|
|||||||
|
|
||||||
if(!isset($GLOBALS['sessionid']) || ! $GLOBALS['sessionid'])
|
if(!isset($GLOBALS['sessionid']) || ! $GLOBALS['sessionid'])
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->session->phpgw_setcookie('eGW_remember');
|
$GLOBALS['egw']->session->phpgw_setcookie('eGW_remember');
|
||||||
$GLOBALS['egw']->redirect($GLOBALS['egw_info']['server']['webserver_url'] . '/login.php?cd=' . $GLOBALS['egw']->session->cd_reason);
|
$GLOBALS['egw']->redirect($GLOBALS['egw_info']['server']['webserver_url'] . '/login.php?cd=' . $GLOBALS['egw']->session->cd_reason);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -280,7 +279,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST['lang'] && preg_match('/^[a-z]{2}(-[a-z]{2}){0,1}$/',$_POST['lang']) &&
|
if ($_POST['lang'] && preg_match('/^[a-z]{2}(-[a-z]{2}){0,1}$/',$_POST['lang']) &&
|
||||||
$_POST['lang'] != $GLOBALS['egw_info']['user']['preferences']['common']['lang'])
|
$_POST['lang'] != $GLOBALS['egw_info']['user']['preferences']['common']['lang'])
|
||||||
{
|
{
|
||||||
$GLOBALS['egw']->preferences->add('common','lang',$_POST['lang'],'session');
|
$GLOBALS['egw']->preferences->add('common','lang',$_POST['lang'],'session');
|
||||||
}
|
}
|
||||||
@ -388,8 +387,8 @@
|
|||||||
|
|
||||||
if(!$GLOBALS['egw_info']['server']['show_domain_selectbox'])
|
if(!$GLOBALS['egw_info']['server']['show_domain_selectbox'])
|
||||||
{
|
{
|
||||||
/* trick to make domain section disapear */
|
/* trick to make domain section disapear */
|
||||||
$tmpl->set_var('domain_selection','');
|
$tmpl->set_var('domain_selection','');
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($_GET as $name => $value)
|
foreach($_GET as $name => $value)
|
||||||
@ -416,34 +415,34 @@
|
|||||||
|
|
||||||
if($config_reg[enable_registration]=='True')
|
if($config_reg[enable_registration]=='True')
|
||||||
{
|
{
|
||||||
if ($config_reg[register_link]=='True')
|
if ($config_reg[register_link]=='True')
|
||||||
{
|
{
|
||||||
$reg_link=' <a href="registration/">'.lang('Not a user yet? Register now').'</a><br/>';
|
$reg_link=' <a href="registration/">'.lang('Not a user yet? Register now').'</a><br/>';
|
||||||
}
|
}
|
||||||
if ($config_reg[lostpassword_link]=='True')
|
if ($config_reg[lostpassword_link]=='True')
|
||||||
{
|
{
|
||||||
$lostpw_link=' <a href="registration/main.php?menuaction=registration.boreg.lostpw1">'.lang('Lost password').'</a><br/>';
|
$lostpw_link=' <a href="registration/main.php?menuaction=registration.boreg.lostpw1">'.lang('Lost password').'</a><br/>';
|
||||||
}
|
}
|
||||||
if ($config_reg[lostid_link]=='True')
|
if ($config_reg[lostid_link]=='True')
|
||||||
{
|
{
|
||||||
$lostid_link=' <a href="registration/main.php?menuaction=registration.boreg.lostid1">'.lang('Lost Login Id').'</a><br/>';
|
$lostid_link=' <a href="registration/main.php?menuaction=registration.boreg.lostid1">'.lang('Lost Login Id').'</a><br/>';
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if at least one option of "registration" is activated display the registration section */
|
/* if at least one option of "registration" is activated display the registration section */
|
||||||
if($config_reg[register_link]=='True' || $config_reg[lostpassword_link]=='True' || $config_reg[lostid_link]=='True')
|
if($config_reg[register_link]=='True' || $config_reg[lostpassword_link]=='True' || $config_reg[lostid_link]=='True')
|
||||||
{
|
{
|
||||||
$tmpl->set_var('register_link',$reg_link);
|
$tmpl->set_var('register_link',$reg_link);
|
||||||
$tmpl->set_var('lostpassword_link',$lostpw_link);
|
$tmpl->set_var('lostpassword_link',$lostpw_link);
|
||||||
$tmpl->set_var('lostid_link',$lostid_link) ;
|
$tmpl->set_var('lostid_link',$lostid_link) ;
|
||||||
|
|
||||||
//$tmpl->set_var('registration_url',$GLOBALS['egw_info']['server']['webserver_url'] . '/registration/');
|
//$tmpl->set_var('registration_url',$GLOBALS['egw_info']['server']['webserver_url'] . '/registration/');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* trick to make registration section disapear */
|
/* trick to make registration section disapear */
|
||||||
$tmpl->set_block('login_form','registration');
|
$tmpl->set_block('login_form','registration');
|
||||||
$tmpl->set_var('registration','');
|
$tmpl->set_var('registration','');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// add a content-type header to overwrite an existing default charset in apache (AddDefaultCharset directiv)
|
// add a content-type header to overwrite an existing default charset in apache (AddDefaultCharset directiv)
|
||||||
@ -525,9 +524,9 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* trick to make remember_me section disapear */
|
/* trick to make remember_me section disapear */
|
||||||
$tmpl->set_block('login_form','remember_me_selection');
|
$tmpl->set_block('login_form','remember_me_selection');
|
||||||
$tmpl->set_var('remember_me_selection','');
|
$tmpl->set_var('remember_me_selection','');
|
||||||
}
|
}
|
||||||
|
|
||||||
$tmpl->set_var('autocomplete', ($GLOBALS['egw_info']['server']['autocomplete_login'] ? 'autocomplete="off"' : ''));
|
$tmpl->set_var('autocomplete', ($GLOBALS['egw_info']['server']['autocomplete_login'] ? 'autocomplete="off"' : ''));
|
||||||
|
36
logout.php
36
logout.php
@ -12,8 +12,8 @@
|
|||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
$phpgw_info = array();
|
$egw_info = array();
|
||||||
$GLOBALS['phpgw_info']['flags'] = array(
|
$GLOBALS['egw_info']['flags'] = array(
|
||||||
'disable_Template_class' => True,
|
'disable_Template_class' => True,
|
||||||
'currentapp' => 'logout',
|
'currentapp' => 'logout',
|
||||||
'noheader' => True,
|
'noheader' => True,
|
||||||
@ -25,44 +25,44 @@
|
|||||||
$GLOBALS['sessionid'] = get_var('sessionid',array('GET','COOKIE'));
|
$GLOBALS['sessionid'] = get_var('sessionid',array('GET','COOKIE'));
|
||||||
$GLOBALS['kp3'] = get_var('kp3',array('GET','COOKIE'));
|
$GLOBALS['kp3'] = get_var('kp3',array('GET','COOKIE'));
|
||||||
|
|
||||||
$verified = $GLOBALS['phpgw']->session->verify();
|
$verified = $GLOBALS['egw']->session->verify();
|
||||||
if ($verified)
|
if ($verified)
|
||||||
{
|
{
|
||||||
if (file_exists($GLOBALS['phpgw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid']))
|
if (file_exists($GLOBALS['egw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid']))
|
||||||
{
|
{
|
||||||
$dh = opendir($GLOBALS['phpgw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid']);
|
$dh = opendir($GLOBALS['egw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid']);
|
||||||
while ($file = readdir($dh))
|
while ($file = readdir($dh))
|
||||||
{
|
{
|
||||||
if ($file != '.' && $file != '..')
|
if ($file != '.' && $file != '..')
|
||||||
{
|
{
|
||||||
unlink($GLOBALS['phpgw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid'] . SEP . $file);
|
unlink($GLOBALS['egw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid'] . SEP . $file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
closedir($dh);
|
closedir($dh);
|
||||||
rmdir($GLOBALS['phpgw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid']);
|
rmdir($GLOBALS['egw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid']);
|
||||||
}
|
}
|
||||||
$GLOBALS['phpgw']->hooks->process('logout');
|
$GLOBALS['egw']->hooks->process('logout');
|
||||||
$GLOBALS['phpgw']->session->destroy($GLOBALS['sessionid'],$GLOBALS['kp3']);
|
$GLOBALS['egw']->session->destroy($GLOBALS['sessionid'],$GLOBALS['kp3']);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(is_object($GLOBALS['phpgw']->log))
|
if(is_object($GLOBALS['egw']->log))
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->log->write(array(
|
$GLOBALS['egw']->log->write(array(
|
||||||
'text' => 'W-VerifySession, could not verify session during logout',
|
'text' => 'W-VerifySession, could not verify session during logout',
|
||||||
'line' => __LINE__,
|
'line' => __LINE__,
|
||||||
'file' => __FILE__
|
'file' => __FILE__
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$GLOBALS['phpgw']->session->phpgw_setcookie('eGW_remember');
|
$GLOBALS['egw']->session->phpgw_setcookie('eGW_remember');
|
||||||
$GLOBALS['phpgw']->session->phpgw_setcookie('sessionid');
|
$GLOBALS['egw']->session->phpgw_setcookie('sessionid');
|
||||||
$GLOBALS['phpgw']->session->phpgw_setcookie('kp3');
|
$GLOBALS['egw']->session->phpgw_setcookie('kp3');
|
||||||
$GLOBALS['phpgw']->session->phpgw_setcookie('domain');
|
$GLOBALS['egw']->session->phpgw_setcookie('domain');
|
||||||
if($GLOBALS['phpgw_info']['server']['sessions_type'] == 'php4')
|
if($GLOBALS['egw_info']['server']['sessions_type'] == 'php4')
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->session->phpgw_setcookie(PHPGW_PHPSESSID);
|
$GLOBALS['egw']->session->phpgw_setcookie(EGW_PHPSESSID);
|
||||||
}
|
}
|
||||||
|
|
||||||
$GLOBALS['phpgw']->redirect($GLOBALS['phpgw_info']['server']['webserver_url'].'/login.php?cd=1');
|
$GLOBALS['egw']->redirect($GLOBALS['egw_info']['server']['webserver_url'].'/login.php?cd=1');
|
||||||
?>
|
?>
|
||||||
|
12
notify.php
12
notify.php
@ -11,15 +11,15 @@
|
|||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
$phpgw_info = array();
|
$egw_info = array();
|
||||||
$GLOBALS['phpgw_info']['flags'] = array(
|
$GLOBALS['egw_info']['flags'] = array(
|
||||||
'noheader' => True,
|
'noheader' => True,
|
||||||
'nonavbar' => True,
|
'nonavbar' => True,
|
||||||
'disable_Template_class' => True,
|
'disable_Template_class' => True,
|
||||||
'currentapp' => 'notifywindow'
|
'currentapp' => 'notifywindow'
|
||||||
);
|
);
|
||||||
include('header.inc.php');
|
include('header.inc.php');
|
||||||
$charSet = $GLOBALS['phpgw']->translation->charset();
|
$charSet = $GLOBALS['egw']->translation->charset();
|
||||||
?>
|
?>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@ -29,11 +29,11 @@
|
|||||||
?>
|
?>
|
||||||
<title>Notify Window</title>
|
<title>Notify Window</title>
|
||||||
</head>
|
</head>
|
||||||
<body bgcolor="<?php echo $GLOBALS['phpgw_info']['theme']['bg_color']; ?>" alink="blue" vlink="blue" link="blue">
|
<body bgcolor="<?php echo $GLOBALS['egw_info']['theme']['bg_color']; ?>" alink="blue" vlink="blue" link="blue">
|
||||||
<table>
|
<table>
|
||||||
<tr><td><a href="<?php echo $GLOBALS['phpgw']->link('/notify.php'); ?>"><?php print lang('Check Now'); ?></a></td></tr>
|
<tr><td><a href="<?php echo $GLOBALS['egw']->link('/notify.php'); ?>"><?php print lang('Check Now'); ?></a></td></tr>
|
||||||
<?php
|
<?php
|
||||||
$GLOBALS['phpgw']->hooks->process('notifywindow');
|
$GLOBALS['egw']->hooks->process('notifywindow');
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
</body>
|
</body>
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
$phpgw_info = array();
|
$egw_info = array();
|
||||||
$GLOBALS['phpgw_info']['flags'] = array(
|
$GLOBALS['egw_info']['flags'] = array(
|
||||||
'noheader' => True,
|
'noheader' => True,
|
||||||
'nonavbar' => True,
|
'nonavbar' => True,
|
||||||
'disable_Template_class' => True,
|
'disable_Template_class' => True,
|
||||||
@ -21,6 +21,6 @@
|
|||||||
include('./header.inc.php');
|
include('./header.inc.php');
|
||||||
|
|
||||||
echo '<html><body>';
|
echo '<html><body>';
|
||||||
$GLOBALS['phpgw']->hooks->process('notifywindow_simple',array('email'));
|
$GLOBALS['egw']->hooks->process('notifywindow_simple',array('email'));
|
||||||
echo '</body></html>';
|
echo '</body></html>';
|
||||||
?>
|
?>
|
||||||
|
@ -12,38 +12,35 @@
|
|||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
$phpgw_info = array();
|
$egw_info = array();
|
||||||
$GLOBALS['phpgw_info']['flags'] = array(
|
$GLOBALS['egw_info']['flags'] = array(
|
||||||
'noheader' => True,
|
'noheader' => True,
|
||||||
'nonavbar' => True,
|
'nonavbar' => True,
|
||||||
'disable_Template_class' => True,
|
'disable_Template_class' => True,
|
||||||
'currentapp' => 'notifywindow'
|
'currentapp' => 'notifywindow'
|
||||||
);
|
);
|
||||||
include('header.inc.php');
|
include('header.inc.php');
|
||||||
header("Content-type: text/xml");
|
header("Content-type: text/xml");
|
||||||
|
|
||||||
header( "Expires: Mon, 26 Jul 1997 05:00:00 GMT" );
|
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
|
||||||
header( "Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . "GMT" );
|
header("Last-Modified: " . gmdate( "D, d M Y H:i:s") . "GMT");
|
||||||
header( "Cache-Control: no-cache, must-revalidate" );
|
header("Cache-Control: no-cache, must-revalidate");
|
||||||
header( "Pragma: no-cache" );
|
header("Pragma: no-cache");
|
||||||
|
|
||||||
echo '<?xml version="1.0" encoding="UTF-8"
|
echo '<?xml version="1.0" encoding="UTF-8"
|
||||||
standalone="yes"?>';
|
standalone="yes"?>';
|
||||||
$apps = $GLOBALS['phpgw']->hooks->process('notify');
|
$apps = $GLOBALS['egw']->hooks->process('notify');
|
||||||
echo "\r\n<response>\r\n";
|
echo "\r\n<response>\r\n";
|
||||||
foreach($apps as $app => $message) {
|
foreach($apps as $app => $message)
|
||||||
|
{
|
||||||
if($message != "")
|
if($message != '')
|
||||||
{
|
{
|
||||||
$title = $GLOBALS['phpgw_info']['apps'][$app]['title'];
|
$title = $GLOBALS['egw_info']['apps'][$app]['title'];
|
||||||
|
|
||||||
echo " <title>".$title."</title>
|
|
||||||
<url>".$GLOBALS['phpgw']->link("/".$app."/index.php")."</url>
|
|
||||||
<message>".$message." </message>\r\n";
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
echo "</response>";
|
|
||||||
|
|
||||||
|
echo " <title>".$title."</title>
|
||||||
|
<url>".$GLOBALS['egw']->link("/".$app."/index.php")."</url>
|
||||||
|
<message>".$message." </message>\r\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
echo "</response>";
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
59
set_box.php
59
set_box.php
@ -12,69 +12,69 @@
|
|||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
$GLOBALS['phpgw_info']['flags'] = Array(
|
$GLOBALS['egw_info']['flags'] = Array(
|
||||||
'noheader' => True,
|
'noheader' => True,
|
||||||
'nofooter' => True,
|
'nofooter' => True,
|
||||||
'currentapp' => 'home'
|
'currentapp' => 'home'
|
||||||
);
|
);
|
||||||
include('header.inc.php');
|
include('header.inc.php');
|
||||||
|
|
||||||
// if(basename($HTTP_REFERER) != 'home.php')
|
// if(basename($HTTP_REFERER) != 'home.php')
|
||||||
// {
|
// {
|
||||||
// Header('Location: '.$GLOBALS['phpgw']->link('/home.php'));
|
// Header('Location: '.$GLOBALS['egw']->link('/home.php'));
|
||||||
// $GLOBALS['phpgw']->common->phpgw_exit();
|
// $GLOBALS['egw']->common->phpgw_exit();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@reset($GLOBALS['phpgw_info']['user']['preferences']);
|
@reset($GLOBALS['egw_info']['user']['preferences']);
|
||||||
//_debug_array($GLOBALS['phpgw_info']['user']['preferences']['portal_order']);
|
//_debug_array($GLOBALS['egw_info']['user']['preferences']['portal_order']);
|
||||||
// $GLOBALS['phpgw']->preferences->delete('portal_order');
|
// $GLOBALS['egw']->preferences->delete('portal_order');
|
||||||
// unset($GLOBALS['phpgw_info']['user']['preferences']['portal_order']);
|
// unset($GLOBALS['egw_info']['user']['preferences']['portal_order']);
|
||||||
// $GLOBALS['phpgw']->preferences->save_repository();
|
// $GLOBALS['egw']->preferences->save_repository();
|
||||||
|
|
||||||
function move_boxes($curr_position,$new_order,$offset,$value_to_check,$max_num)
|
function move_boxes($curr_position,$new_order,$offset,$value_to_check,$max_num)
|
||||||
{
|
{
|
||||||
//echo "MOVE: $curr_position,$new_order,$offset,$value_to_check,$max_num<br>";
|
//echo "MOVE: $curr_position,$new_order,$offset,$value_to_check,$max_num<br>";
|
||||||
if(isset($GLOBALS['phpgw_info']['user']['preferences']['portal_order'][$new_order]))
|
if(isset($GLOBALS['egw_info']['user']['preferences']['portal_order'][$new_order]))
|
||||||
{
|
{
|
||||||
if($new_order == $max_num)
|
if($new_order == $max_num)
|
||||||
{
|
{
|
||||||
if($offset < 0)
|
if($offset < 0)
|
||||||
{
|
{
|
||||||
@ksort($GLOBALS['phpgw_info']['user']['preferences']['portal_order']);
|
@ksort($GLOBALS['egw_info']['user']['preferences']['portal_order']);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@krsort($GLOBALS['phpgw_info']['user']['preferences']['portal_order']);
|
@krsort($GLOBALS['egw_info']['user']['preferences']['portal_order']);
|
||||||
}
|
}
|
||||||
while(list($seq_order,$appid) = each($GLOBALS['phpgw_info']['user']['preferences']['portal_order']))
|
while(list($seq_order,$appid) = each($GLOBALS['egw_info']['user']['preferences']['portal_order']))
|
||||||
{
|
{
|
||||||
if($seq_order != $value_to_check)
|
if($seq_order != $value_to_check)
|
||||||
{
|
{
|
||||||
$prev_seq = $seq_order + $offset;
|
$prev_seq = $seq_order + $offset;
|
||||||
$GLOBALS['phpgw']->preferences->delete('portal_order',$prev_seq);
|
$GLOBALS['egw']->preferences->delete('portal_order',$prev_seq);
|
||||||
$GLOBALS['phpgw']->preferences->add('portal_order',$prev_seq,$appid);
|
$GLOBALS['egw']->preferences->add('portal_order',$prev_seq,$appid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw']->preferences->delete('portal_order',$curr_position);
|
$GLOBALS['egw']->preferences->delete('portal_order',$curr_position);
|
||||||
$GLOBALS['phpgw']->preferences->add('portal_order',$curr_position,(int)$GLOBALS['phpgw_info']['user']['preferences']['portal_order'][$new_order]);
|
$GLOBALS['egw']->preferences->add('portal_order',$curr_position,(int)$GLOBALS['egw_info']['user']['preferences']['portal_order'][$new_order]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$GLOBALS['phpgw']->preferences->delete('portal_order',$new_order);
|
$GLOBALS['egw']->preferences->delete('portal_order',$new_order);
|
||||||
$GLOBALS['phpgw']->preferences->add('portal_order',$new_order,(int)$_GET['app']);
|
$GLOBALS['egw']->preferences->add('portal_order',$new_order,(int)$_GET['app']);
|
||||||
|
|
||||||
$GLOBALS['phpgw']->preferences->save_repository();
|
$GLOBALS['egw']->preferences->save_repository();
|
||||||
}
|
}
|
||||||
|
|
||||||
//error_reporting(E_ALL);
|
//error_reporting(E_ALL);
|
||||||
switch($_GET['control'])
|
switch($_GET['control'])
|
||||||
{
|
{
|
||||||
//print_debug('set_box', $GLOBALS['phpgw_info']['user']['preferences']['portal_order']),'app',5);
|
//print_debug('set_box', $GLOBALS['egw_info']['user']['preferences']['portal_order']),'app',5);
|
||||||
case 'up':
|
case 'up':
|
||||||
$curr_position = $GLOBALS['phpgw']->common->find_portal_order((int)$_GET['app']);
|
$curr_position = $GLOBALS['egw']->common->find_portal_order((int)$_GET['app']);
|
||||||
$max_count = count($GLOBALS['phpgw_info']['user']['preferences']['portal_order']) - 1;
|
$max_count = count($GLOBALS['egw_info']['user']['preferences']['portal_order']) - 1;
|
||||||
$offset = -1;
|
$offset = -1;
|
||||||
if($curr_position <= 0)
|
if($curr_position <= 0)
|
||||||
{
|
{
|
||||||
@ -87,8 +87,8 @@
|
|||||||
move_boxes($curr_position,$new_order,$offset,0,$max_count);
|
move_boxes($curr_position,$new_order,$offset,0,$max_count);
|
||||||
break;
|
break;
|
||||||
case 'down':
|
case 'down':
|
||||||
$curr_position = $GLOBALS['phpgw']->common->find_portal_order((int)$_GET['app']);
|
$curr_position = $GLOBALS['egw']->common->find_portal_order((int)$_GET['app']);
|
||||||
$max_count = count($GLOBALS['phpgw_info']['user']['preferences']['portal_order']) - 1;
|
$max_count = count($GLOBALS['egw_info']['user']['preferences']['portal_order']) - 1;
|
||||||
$offset = 1;
|
$offset = 1;
|
||||||
if($curr_position >= $max_count)
|
if($curr_position >= $max_count)
|
||||||
{
|
{
|
||||||
@ -106,7 +106,6 @@
|
|||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
|
|
||||||
header('Location: '.$GLOBALS['phpgw']->link('/home.php'));
|
header('Location: '.$GLOBALS['egw']->link('/home.php'));
|
||||||
$GLOBALS['phpgw']->common->phpgw_exit();
|
$GLOBALS['egw']->common->phpgw_exit();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
10
soap.php
10
soap.php
@ -12,8 +12,8 @@
|
|||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
$phpgw_info = array();
|
$egw_info = array();
|
||||||
$GLOBALS['phpgw_info']['flags'] = array(
|
$GLOBALS['egw_info']['flags'] = array(
|
||||||
'disable_Template_class' => True,
|
'disable_Template_class' => True,
|
||||||
'currentapp' => 'login',
|
'currentapp' => 'login',
|
||||||
'noheader' => True,
|
'noheader' => True,
|
||||||
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
$GLOBALS['server'] = CreateObject('phpgwapi.soap_server');
|
$GLOBALS['server'] = CreateObject('phpgwapi.soap_server');
|
||||||
/* _debug_array($GLOBALS['server']);exit; */
|
/* _debug_array($GLOBALS['server']);exit; */
|
||||||
/* include(PHPGW_API_INC . '/soaplib.soapinterop.php'); */
|
/* include(EGW_API_INC . '/soaplib.soapinterop.php'); */
|
||||||
|
|
||||||
/* Note: this command only available under Apache */
|
/* Note: this command only available under Apache */
|
||||||
$headers = getallheaders();
|
$headers = getallheaders();
|
||||||
@ -36,11 +36,11 @@
|
|||||||
$auth = base64_decode(trim($tmp));
|
$auth = base64_decode(trim($tmp));
|
||||||
list($sessionid,$kp3) = split(':',$auth);
|
list($sessionid,$kp3) = split(':',$auth);
|
||||||
|
|
||||||
if($GLOBALS['phpgw']->session->verify($sessionid,$kp3))
|
if($GLOBALS['egw']->session->verify($sessionid,$kp3))
|
||||||
{
|
{
|
||||||
$GLOBALS['server']->authed = True;
|
$GLOBALS['server']->authed = True;
|
||||||
}
|
}
|
||||||
elseif($GLOBALS['phpgw']->session->verify_server($sessionid,$kp3))
|
elseif($GLOBALS['egw']->session->verify_server($sessionid,$kp3))
|
||||||
{
|
{
|
||||||
$GLOBALS['server']->authed = True;
|
$GLOBALS['server']->authed = True;
|
||||||
}
|
}
|
||||||
|
12
xmlrpc.php
12
xmlrpc.php
@ -15,8 +15,8 @@
|
|||||||
/*list($usec, $sec) = explode(" ", microtime());
|
/*list($usec, $sec) = explode(" ", microtime());
|
||||||
$GLOBALS['concisus']['script_start'] = ((float)$usec + (float)$sec);*/
|
$GLOBALS['concisus']['script_start'] = ((float)$usec + (float)$sec);*/
|
||||||
|
|
||||||
$GLOBALS['phpgw_info'] = array();
|
$GLOBALS['egw_info'] = array();
|
||||||
$GLOBALS['phpgw_info']['flags'] = array(
|
$GLOBALS['egw_info']['flags'] = array(
|
||||||
'currentapp' => 'login',
|
'currentapp' => 'login',
|
||||||
'noheader' => True,
|
'noheader' => True,
|
||||||
'disable_Template_class' => True
|
'disable_Template_class' => True
|
||||||
@ -24,12 +24,12 @@
|
|||||||
include('header.inc.php');
|
include('header.inc.php');
|
||||||
|
|
||||||
//viniciuscb: a secure way to know if we're in a xmlrpc call...
|
//viniciuscb: a secure way to know if we're in a xmlrpc call...
|
||||||
$GLOBALS['phpgw_info']['server']['xmlrpc'] = true;
|
$GLOBALS['egw_info']['server']['xmlrpc'] = true;
|
||||||
|
|
||||||
$server = CreateObject('phpgwapi.xmlrpc_server');
|
$server = CreateObject('phpgwapi.xmlrpc_server');
|
||||||
|
|
||||||
/* uncomment here if you want to show all of the testing functions for compatibility */
|
/* uncomment here if you want to show all of the testing functions for compatibility */
|
||||||
//include(PHPGW_API_INC . '/xmlrpc.interop.php');
|
//include(EGW_API_INC . '/xmlrpc.interop.php');
|
||||||
|
|
||||||
/* Note: this command only available under Apache */
|
/* Note: this command only available under Apache */
|
||||||
$headers = getallheaders();
|
$headers = getallheaders();
|
||||||
@ -49,11 +49,11 @@
|
|||||||
$sessionid = get_var('sessionid',array('COOKIE','GET'));
|
$sessionid = get_var('sessionid',array('COOKIE','GET'));
|
||||||
$kp3 = get_var('kp3',array('COOKIE','GET'));
|
$kp3 = get_var('kp3',array('COOKIE','GET'));
|
||||||
}
|
}
|
||||||
$server->authed = $GLOBALS['phpgw']->session->verify($sessionid,$kp3);
|
$server->authed = $GLOBALS['egw']->session->verify($sessionid,$kp3);
|
||||||
|
|
||||||
if (!$server->authed and isset($_SERVER['PHP_AUTH_USER']) and isset($_SERVER['PHP_AUTH_PW']))
|
if (!$server->authed and isset($_SERVER['PHP_AUTH_USER']) and isset($_SERVER['PHP_AUTH_PW']))
|
||||||
{
|
{
|
||||||
$authed = $GLOBALS['phpgw']->session->create($login.'@'.$domain, $_SERVER['PHP_AUTH_PW'], 'text');
|
$authed = $GLOBALS['egw']->session->create($login.'@'.$domain, $_SERVER['PHP_AUTH_PW'], 'text');
|
||||||
|
|
||||||
if ($authed)
|
if ($authed)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user