mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 17:04:14 +01:00
phpgw --> egw
This commit is contained in:
parent
3d4049d873
commit
aac9ec7d10
@ -22,14 +22,14 @@
|
||||
|
||||
function admin_db_backup()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method for sheduled backups, called via asynservice
|
||||
*/
|
||||
function do_backup()
|
||||
{
|
||||
$this->db_backup = CreateObject('phpgwapi.db_backup');
|
||||
$this->db_backup =& CreateObject('phpgwapi.db_backup');
|
||||
|
||||
if ($f = $this->db_backup->fopen_backup())
|
||||
{
|
||||
@ -43,12 +43,12 @@
|
||||
*/
|
||||
function index()
|
||||
{
|
||||
$tpl_root = PHPGW_SERVER_ROOT.'/setup/templates/default';
|
||||
$self = $GLOBALS['phpgw']->link('/index.php',array('menuaction'=>'admin.admin_db_backup.index'));
|
||||
$GLOBALS['phpgw']->translation->add_app('setup');
|
||||
$tpl_root = EGW_SERVER_ROOT.'/setup/templates/default';
|
||||
$self = $GLOBALS['egw']->link('/index.php',array('menuaction'=>'admin.admin_db_backup.index'));
|
||||
$GLOBALS['egw']->translation->add_app('setup');
|
||||
|
||||
include PHPGW_SERVER_ROOT.'/setup/db_backup.php';
|
||||
include EGW_SERVER_ROOT.'/setup/db_backup.php';
|
||||
|
||||
$GLOBALS['phpgw']->common->phpgw_footer();
|
||||
$GLOBALS['egw']->common->egw_footer();
|
||||
}
|
||||
}
|
@ -15,7 +15,7 @@
|
||||
{
|
||||
function boaccess_history()
|
||||
{
|
||||
$this->so = createobject('admin.soaccess_history');
|
||||
$this->so =& CreateObject('admin.soaccess_history');
|
||||
}
|
||||
|
||||
function list_history($account_id,$start,$order,$sort)
|
||||
@ -42,12 +42,12 @@
|
||||
|
||||
if ($record['li'])
|
||||
{
|
||||
$record['li'] = $GLOBALS['phpgw']->common->show_date($record['li']);
|
||||
$record['li'] = $GLOBALS['egw']->common->show_date($record['li']);
|
||||
}
|
||||
|
||||
if ($record['lo'])
|
||||
{
|
||||
$record['lo'] = $GLOBALS['phpgw']->common->show_date($record['lo']);
|
||||
$record['lo'] = $GLOBALS['egw']->common->show_date($record['lo']);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -35,15 +35,15 @@
|
||||
|
||||
function boaccounts()
|
||||
{
|
||||
$this->so = createobject('admin.soaccounts');
|
||||
$this->so =& CreateObject('admin.soaccounts');
|
||||
}
|
||||
|
||||
function DONTlist_methods($_type='xmlrpc')
|
||||
{
|
||||
/*
|
||||
This handles introspection or discovery by the logged in client,
|
||||
in which case the input might be an array. The server always calls
|
||||
this function to fill the server dispatch map using a string.
|
||||
This handles introspection or discovery by the logged in client,
|
||||
in which case the input might be an array. The server always calls
|
||||
this function to fill the server dispatch map using a string.
|
||||
*/
|
||||
if (is_array($_type))
|
||||
{
|
||||
@ -77,7 +77,7 @@
|
||||
|
||||
function delete_group()
|
||||
{
|
||||
if (!@isset($_POST['account_id']) || !@$_POST['account_id'] || $GLOBALS['phpgw']->acl->check('group_access',32,'admin'))
|
||||
if (!@isset($_POST['account_id']) || !@$_POST['account_id'] || $GLOBALS['egw']->acl->check('group_access',32,'admin'))
|
||||
{
|
||||
ExecMethod('admin.uiaccounts.list_groups');
|
||||
return False;
|
||||
@ -85,7 +85,7 @@
|
||||
|
||||
$account_id = (int)$_POST['account_id'];
|
||||
|
||||
$GLOBALS['phpgw']->db->lock(
|
||||
$GLOBALS['egw']->db->lock(
|
||||
Array(
|
||||
'phpgw_accounts',
|
||||
'phpgw_app_sessions',
|
||||
@ -93,18 +93,18 @@
|
||||
)
|
||||
);
|
||||
|
||||
$old_group_list = $GLOBALS['phpgw']->acl->get_ids_for_location($account_id,1,'phpgw_group');
|
||||
$old_group_list = $GLOBALS['egw']->acl->get_ids_for_location($account_id,1,'phpgw_group');
|
||||
|
||||
@reset($old_group_list);
|
||||
while($old_group_list && $id = each($old_group_list))
|
||||
{
|
||||
$GLOBALS['phpgw']->acl->delete_repository('phpgw_group',$account_id,(int)$id[1]);
|
||||
$GLOBALS['phpgw']->session->delete_cache((int)$id[1]);
|
||||
$GLOBALS['egw']->acl->delete_repository('phpgw_group',$account_id,(int)$id[1]);
|
||||
$GLOBALS['egw']->session->delete_cache((int)$id[1]);
|
||||
}
|
||||
|
||||
$GLOBALS['phpgw']->acl->delete_repository('%%','run',$account_id);
|
||||
$GLOBALS['egw']->acl->delete_repository('%%','run',$account_id);
|
||||
|
||||
if (! @rmdir($GLOBALS['phpgw_info']['server']['files_dir'].SEP.'groups'.SEP.$GLOBALS['phpgw']->accounts->id2name($account_id)))
|
||||
if (! @rmdir($GLOBALS['egw_info']['server']['files_dir'].SEP.'groups'.SEP.$GLOBALS['egw']->accounts->id2name($account_id)))
|
||||
{
|
||||
$cd = 38;
|
||||
}
|
||||
@ -113,17 +113,17 @@
|
||||
$cd = 32;
|
||||
}
|
||||
|
||||
$GLOBALS['phpgw']->accounts->delete($account_id);
|
||||
$GLOBALS['egw']->accounts->delete($account_id);
|
||||
|
||||
$GLOBALS['phpgw']->db->unlock();
|
||||
$GLOBALS['egw']->db->unlock();
|
||||
|
||||
Header('Location: '.$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.list_groups'));
|
||||
$GLOBALS['phpgw']->common->phpgw_exit();
|
||||
Header('Location: '.$GLOBALS['egw']->link('/index.php','menuaction=admin.uiaccounts.list_groups'));
|
||||
$GLOBALS['egw']->common->egw_exit();
|
||||
}
|
||||
|
||||
function delete_user()
|
||||
{
|
||||
if (isset($_POST['cancel']) || $GLOBALS['phpgw']->acl->check('account_access',32,'admin'))
|
||||
if (isset($_POST['cancel']) || $GLOBALS['egw']->acl->check('account_access',32,'admin'))
|
||||
{
|
||||
ExecMethod('admin.uiaccounts.list_users');
|
||||
return False;
|
||||
@ -134,14 +134,14 @@
|
||||
settype($account_id,'integer');
|
||||
$account_id = get_account_id($accountid);
|
||||
// make this information also in hook available
|
||||
$lid = $GLOBALS['phpgw']->accounts->id2name($account_id);
|
||||
$lid = $GLOBALS['egw']->accounts->id2name($account_id);
|
||||
|
||||
$GLOBALS['hook_values']['account_id'] = $account_id;
|
||||
$GLOBALS['hook_values']['account_lid'] = $lid;
|
||||
|
||||
$singleHookValues = $GLOBALS['hook_values']+array('location' => 'deleteaccount');
|
||||
|
||||
$db = $GLOBALS['phpgw']->db;
|
||||
$db = clone($GLOBALS['egw']->db);
|
||||
$db->query('SELECT app_name,app_order FROM phpgw_applications WHERE app_enabled!=0 ORDER BY app_order',__LINE__,__FILE__);
|
||||
if($db->num_rows())
|
||||
{
|
||||
@ -151,15 +151,15 @@
|
||||
|
||||
if($appname <> 'admin' || $appname <> 'preferences')
|
||||
{
|
||||
$GLOBALS['phpgw']->hooks->single($singleHookValues, $appname);
|
||||
$GLOBALS['egw']->hooks->single($singleHookValues, $appname);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$GLOBALS['phpgw']->hooks->single('deleteaccount','preferences');
|
||||
$GLOBALS['phpgw']->hooks->single('deleteaccount','admin');
|
||||
$GLOBALS['egw']->hooks->single('deleteaccount','preferences');
|
||||
$GLOBALS['egw']->hooks->single('deleteaccount','admin');
|
||||
|
||||
$basedir = $GLOBALS['phpgw_info']['server']['files_dir'] . SEP . 'users' . SEP;
|
||||
$basedir = $GLOBALS['egw_info']['server']['files_dir'] . SEP . 'users' . SEP;
|
||||
|
||||
if (! @rmdir($basedir . $lid))
|
||||
{
|
||||
@ -177,7 +177,7 @@
|
||||
|
||||
function add_group()
|
||||
{
|
||||
if ($GLOBALS['phpgw']->acl->check('group_access',4,'admin'))
|
||||
if ($GLOBALS['egw']->acl->check('group_access',4,'admin'))
|
||||
{
|
||||
ExecMethod('admin.uiaccounts.list_groups');
|
||||
return False;
|
||||
@ -213,7 +213,7 @@
|
||||
|
||||
$this->validate_group($group_info);
|
||||
|
||||
$GLOBALS['phpgw']->db->lock(
|
||||
$GLOBALS['egw']->db->lock(
|
||||
Array(
|
||||
'phpgw_accounts',
|
||||
'phpgw_nextid',
|
||||
@ -226,7 +226,7 @@
|
||||
)
|
||||
);
|
||||
|
||||
$group = CreateObject('phpgwapi.accounts',$group_info['account_id'],'g');
|
||||
$group =& CreateObject('phpgwapi.accounts',$group_info['account_id'],'g');
|
||||
$group->acct_type = 'g';
|
||||
$account_info = array(
|
||||
'account_type' => 'g',
|
||||
@ -242,7 +242,7 @@
|
||||
// do the following only if we got an id - the create succided
|
||||
if ($group_info['account_id'])
|
||||
{
|
||||
$apps = CreateObject('phpgwapi.applications',$group_info['account_id']);
|
||||
$apps =& CreateObject('phpgwapi.applications',$group_info['account_id']);
|
||||
$apps->update_data(Array());
|
||||
reset($group_info['account_apps']);
|
||||
while(list($app,$value) = each($group_info['account_apps']))
|
||||
@ -252,7 +252,7 @@
|
||||
}
|
||||
$apps->save_repository();
|
||||
|
||||
$acl = CreateObject('phpgwapi.acl',$group_info['account_id']);
|
||||
$acl =& CreateObject('phpgwapi.acl',$group_info['account_id']);
|
||||
$acl->read_repository();
|
||||
|
||||
@reset($group_info['account_user']);
|
||||
@ -265,14 +265,14 @@
|
||||
$acl->add_repository('phpgw_group',$group_info['account_id'],$user_id,1);
|
||||
|
||||
$docommit = False;
|
||||
$GLOBALS['pref'] = CreateObject('phpgwapi.preferences',$user_id);
|
||||
$GLOBALS['pref'] =& CreateObject('phpgwapi.preferences',$user_id);
|
||||
$t = $GLOBALS['pref']->read_repository();
|
||||
@reset($new_apps);
|
||||
while(is_array($new_apps) && list($app_key,$app_name) = each($new_apps))
|
||||
{
|
||||
if (!$t[($app_name=='admin'?'common':$app_name)])
|
||||
{
|
||||
$GLOBALS['phpgw']->hooks->single('add_def_pref', $app_name);
|
||||
$GLOBALS['egw']->hooks->single('add_def_pref', $app_name);
|
||||
$docommit = True;
|
||||
}
|
||||
}
|
||||
@ -284,7 +284,7 @@
|
||||
|
||||
$acl->save_repository();
|
||||
|
||||
$basedir = $GLOBALS['phpgw_info']['server']['files_dir'] . SEP . 'groups' . SEP;
|
||||
$basedir = $GLOBALS['egw_info']['server']['files_dir'] . SEP . 'groups' . SEP;
|
||||
$cd = 31;
|
||||
umask(000);
|
||||
if (! @mkdir ($basedir . $group_info['account_name'], 0707))
|
||||
@ -292,7 +292,7 @@
|
||||
$cd = 37;
|
||||
}
|
||||
|
||||
$GLOBALS['phpgw']->db->unlock();
|
||||
$GLOBALS['egw']->db->unlock();
|
||||
}
|
||||
ExecMethod('admin.uiaccounts.list_groups');
|
||||
|
||||
@ -301,16 +301,16 @@
|
||||
|
||||
function add_user()
|
||||
{
|
||||
if ($GLOBALS['phpgw']->acl->check('account_access',4,'admin'))
|
||||
if ($GLOBALS['egw']->acl->check('account_access',4,'admin'))
|
||||
{
|
||||
ExecMethod('admin.uiaccounts.list_users');
|
||||
return False;
|
||||
}
|
||||
|
||||
$accountPrefix = '';
|
||||
if(isset($GLOBALS['phpgw_info']['server']['account_prefix']))
|
||||
if(isset($GLOBALS['egw_info']['server']['account_prefix']))
|
||||
{
|
||||
$accountPrefix = $GLOBALS['phpgw_info']['server']['account_prefix'];
|
||||
$accountPrefix = $GLOBALS['egw_info']['server']['account_prefix'];
|
||||
}
|
||||
|
||||
if ($_POST['submit'])
|
||||
@ -354,7 +354,7 @@
|
||||
// when does the account expire
|
||||
if ($_POST['expires'] !== '' && !$_POST['never_expires'])
|
||||
{
|
||||
$jscal = CreateObject('phpgwapi.jscalendar',False);
|
||||
$jscal =& CreateObject('phpgwapi.jscalendar',False);
|
||||
$userData += $jscal->input2date($_POST['expires'],False,'account_expires_day','account_expires_month','account_expires_year');
|
||||
}
|
||||
|
||||
@ -364,15 +364,15 @@
|
||||
{
|
||||
if ($userData['anonymous'])
|
||||
{
|
||||
$GLOBALS['phpgw']->acl->add_repository('phpgwapi','anonymous',$account_id,1);
|
||||
$GLOBALS['egw']->acl->add_repository('phpgwapi','anonymous',$account_id,1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$GLOBALS['phpgw']->acl->delete_repository('phpgwapi','anonymous',$account_id);
|
||||
$GLOBALS['egw']->acl->delete_repository('phpgwapi','anonymous',$account_id);
|
||||
}
|
||||
// make this information for the hooks available
|
||||
$GLOBALS['hook_values'] = $userData + array('new_passwd' => $userData['account_passwd']);
|
||||
$GLOBALS['phpgw']->hooks->process($GLOBALS['hook_values']+array(
|
||||
$GLOBALS['egw']->hooks->process($GLOBALS['hook_values']+array(
|
||||
'location' => 'addaccount'
|
||||
),False,True); // called for every app now, not only enabled ones
|
||||
|
||||
@ -381,7 +381,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
$ui = createobject('admin.uiaccounts');
|
||||
$ui =& CreateObject('admin.uiaccounts');
|
||||
$ui->create_edit_user($userData['account_id'],$userData,$errors);
|
||||
}
|
||||
}
|
||||
@ -394,7 +394,7 @@
|
||||
|
||||
function edit_group()
|
||||
{
|
||||
if ($GLOBALS['phpgw']->acl->check('group_access',16,'admin'))
|
||||
if ($GLOBALS['egw']->acl->check('group_access',16,'admin'))
|
||||
{
|
||||
ExecMethod('admin.uiaccounts.list_groups');
|
||||
return False;
|
||||
@ -431,7 +431,7 @@
|
||||
$this->validate_group($group_info);
|
||||
|
||||
// Lock tables
|
||||
$GLOBALS['phpgw']->db->lock(
|
||||
$GLOBALS['egw']->db->lock(
|
||||
Array(
|
||||
'phpgw_accounts',
|
||||
'phpgw_preferences',
|
||||
@ -444,11 +444,11 @@
|
||||
)
|
||||
);
|
||||
|
||||
$group = CreateObject('phpgwapi.accounts',$group_info['account_id'],'g');
|
||||
$group =& CreateObject('phpgwapi.accounts',$group_info['account_id'],'g');
|
||||
$old_group_info = $group->read_repository();
|
||||
|
||||
// Set group apps
|
||||
$apps = CreateObject('phpgwapi.applications',$group_info['account_id']);
|
||||
$apps =& CreateObject('phpgwapi.applications',$group_info['account_id']);
|
||||
$apps_before = $apps->read_account_specific();
|
||||
$apps->update_data(Array());
|
||||
$new_apps = Array();
|
||||
@ -472,7 +472,7 @@
|
||||
$group->data['account_lid'] = $group_info['account_name'];
|
||||
$group->data['firstname'] = $group_info['account_name'];
|
||||
|
||||
$basedir = $GLOBALS['phpgw_info']['server']['files_dir'] . SEP . 'groups' . SEP;
|
||||
$basedir = $GLOBALS['egw_info']['server']['files_dir'] . SEP . 'groups' . SEP;
|
||||
if (! @rename($basedir . $old_group_info['account_lid'], $basedir . $group_info['account_name']))
|
||||
{
|
||||
$cd = 39;
|
||||
@ -488,7 +488,7 @@
|
||||
}
|
||||
|
||||
// Set group acl
|
||||
$acl = CreateObject('phpgwapi.acl',$group_info['account_id']);
|
||||
$acl =& CreateObject('phpgwapi.acl',$group_info['account_id']);
|
||||
$old_group_list = $acl->get_ids_for_location($group_info['account_id'],1,'phpgw_group');
|
||||
@reset($old_group_list);
|
||||
while($old_group_list && list($key,$user_id) = each($old_group_list))
|
||||
@ -497,10 +497,10 @@
|
||||
if(!$group_info['account_user'][$user_id])
|
||||
{
|
||||
// If the user is logged in, it will force a refresh of the session_info
|
||||
$GLOBALS['phpgw']->db->query("update phpgw_sessions set session_action='' "
|
||||
."where session_lid='" . $GLOBALS['phpgw']->accounts->id2name($user_id)
|
||||
. '@' . $GLOBALS['phpgw_info']['user']['domain'] . "'",__LINE__,__FILE__);
|
||||
$GLOBALS['phpgw']->session->delete_cache($user_id);
|
||||
$GLOBALS['egw']->db->query("update phpgw_sessions set session_action='' "
|
||||
."where session_lid='" . $GLOBALS['egw']->accounts->id2name($user_id)
|
||||
. '@' . $GLOBALS['egw_info']['user']['domain'] . "'",__LINE__,__FILE__);
|
||||
$GLOBALS['egw']->session->delete_cache($user_id);
|
||||
}
|
||||
}
|
||||
|
||||
@ -514,25 +514,25 @@
|
||||
$acl->add_repository('phpgw_group',$group_info['account_id'],$user_id,1);
|
||||
|
||||
// If the user is logged in, it will force a refresh of the session_info
|
||||
$GLOBALS['phpgw']->db->query("update phpgw_sessions set session_action='' "
|
||||
."where session_lid='" . $GLOBALS['phpgw']->accounts->id2name($user_id)
|
||||
. '@' . $GLOBALS['phpgw_info']['user']['domain'] . "'",__LINE__,__FILE__);
|
||||
$GLOBALS['egw']->db->query("update phpgw_sessions set session_action='' "
|
||||
."where session_lid='" . $GLOBALS['egw']->accounts->id2name($user_id)
|
||||
. '@' . $GLOBALS['egw_info']['user']['domain'] . "'",__LINE__,__FILE__);
|
||||
|
||||
$GLOBALS['phpgw']->session->delete_cache($user_id);
|
||||
$GLOBALS['egw']->session->delete_cache($user_id);
|
||||
|
||||
// The following sets any default preferences needed for new applications..
|
||||
// This is smart enough to know if previous preferences were selected, use them.
|
||||
$docommit = False;
|
||||
if($new_apps)
|
||||
{
|
||||
$GLOBALS['pref'] = CreateObject('phpgwapi.preferences',$user_id);
|
||||
$GLOBALS['pref'] =& CreateObject('phpgwapi.preferences',$user_id);
|
||||
$t = $GLOBALS['pref']->read_repository();
|
||||
@reset($new_apps);
|
||||
while(list($app_key,$app_name) = each($new_apps))
|
||||
{
|
||||
if (!$t[($app_name=='admin'?'common':$app_name)])
|
||||
{
|
||||
$GLOBALS['phpgw']->hooks->single('add_def_pref', $app_name);
|
||||
$GLOBALS['egw']->hooks->single('add_def_pref', $app_name);
|
||||
$docommit = True;
|
||||
}
|
||||
}
|
||||
@ -547,7 +547,7 @@
|
||||
// for LDAP to update the memberuid attribute
|
||||
$group->save_repository();
|
||||
|
||||
$GLOBALS['phpgw']->db->unlock();
|
||||
$GLOBALS['egw']->db->unlock();
|
||||
|
||||
ExecMethod('admin.uiaccounts.list_groups');
|
||||
return False;
|
||||
@ -555,16 +555,16 @@
|
||||
|
||||
function edit_user()
|
||||
{
|
||||
if ($GLOBALS['phpgw']->acl->check('account_access',16,'admin'))
|
||||
if ($GLOBALS['egw']->acl->check('account_access',16,'admin'))
|
||||
{
|
||||
ExecMethod('admin.uiaccounts.list_users');
|
||||
return False;
|
||||
}
|
||||
|
||||
$accountPrefix = '';
|
||||
if(isset($GLOBALS['phpgw_info']['server']['account_prefix']))
|
||||
if(isset($GLOBALS['egw_info']['server']['account_prefix']))
|
||||
{
|
||||
$accountPrefix = $GLOBALS['phpgw_info']['server']['account_prefix'];
|
||||
$accountPrefix = $GLOBALS['egw_info']['server']['account_prefix'];
|
||||
}
|
||||
|
||||
if ($_POST['submit'])
|
||||
@ -596,14 +596,14 @@
|
||||
}
|
||||
if ($_POST['expires'] !== '' && !$_POST['never_expires'])
|
||||
{
|
||||
$jscal = CreateObject('phpgwapi.jscalendar',False);
|
||||
$jscal =& CreateObject('phpgwapi.jscalendar',False);
|
||||
$userData += $jscal->input2date($_POST['expires'],False,'account_expires_day','account_expires_month','account_expires_year');
|
||||
}
|
||||
if (!($errors = $this->validate_user($userData)))
|
||||
{
|
||||
$this->save_user($userData);
|
||||
$GLOBALS['hook_values'] = $userData;
|
||||
$GLOBALS['phpgw']->hooks->process($GLOBALS['hook_values']+array(
|
||||
$GLOBALS['egw']->hooks->process($GLOBALS['hook_values']+array(
|
||||
'location' => 'editaccount'
|
||||
),False,True); // called for every app now, not only enabled ones)
|
||||
|
||||
@ -636,7 +636,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
$ui = createobject('admin.uiaccounts');
|
||||
$ui =& CreateObject('admin.uiaccounts');
|
||||
$ui->create_edit_user($userData['account_id'],$userData,$errors);
|
||||
}
|
||||
}
|
||||
@ -644,16 +644,16 @@
|
||||
|
||||
function set_group_managers()
|
||||
{
|
||||
if($GLOBALS['phpgw']->acl->check('group_access',16,'admin') || $_POST['cancel'])
|
||||
if($GLOBALS['egw']->acl->check('group_access',16,'admin') || $_POST['cancel'])
|
||||
{
|
||||
$GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.list_groups'));
|
||||
$GLOBALS['phpgw']->common->phpgw_exit();
|
||||
$GLOBALS['egw']->redirect($GLOBALS['egw']->link('/index.php','menuaction=admin.uiaccounts.list_groups'));
|
||||
$GLOBALS['egw']->common->egw_exit();
|
||||
}
|
||||
elseif($_POST['submit'])
|
||||
{
|
||||
$acl = CreateObject('phpgwapi.acl',(int)$_POST['account_id']);
|
||||
$acl =& CreateObject('phpgwapi.acl',(int)$_POST['account_id']);
|
||||
|
||||
$users = $GLOBALS['phpgw']->accounts->member($_POST['account_id']);
|
||||
$users = $GLOBALS['egw']->accounts->member($_POST['account_id']);
|
||||
@reset($users);
|
||||
while($managers && list($key,$user) = each($users))
|
||||
{
|
||||
@ -663,18 +663,18 @@
|
||||
@reset($managers);
|
||||
while($managers && list($key,$manager) = each($managers))
|
||||
{
|
||||
$acl->add_repository('phpgw_group',(int)$_POST['account_id'],$manager,(1 + PHPGW_ACL_GROUP_MANAGERS));
|
||||
$acl->add_repository('phpgw_group',(int)$_POST['account_id'],$manager,(1 + EGW_ACL_GROUP_MANAGERS));
|
||||
}
|
||||
}
|
||||
$GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.list_groups'));
|
||||
$GLOBALS['phpgw']->common->phpgw_exit();
|
||||
$GLOBALS['egw']->redirect($GLOBALS['egw']->link('/index.php','menuaction=admin.uiaccounts.list_groups'));
|
||||
$GLOBALS['egw']->common->egw_exit();
|
||||
}
|
||||
|
||||
function validate_group($group_info)
|
||||
{
|
||||
$errors = Array();
|
||||
|
||||
$group = CreateObject('phpgwapi.accounts',$group_info['account_id'],'g');
|
||||
$group =& CreateObject('phpgwapi.accounts',$group_info['account_id'],'g');
|
||||
$group->read_repository();
|
||||
|
||||
if(!$group_info['account_name'])
|
||||
@ -698,9 +698,9 @@
|
||||
*/
|
||||
if(count($errors))
|
||||
{
|
||||
$ui = createobject('admin.uiaccounts');
|
||||
$ui =& CreateObject('admin.uiaccounts');
|
||||
$ui->create_edit_group($group_info,$errors);
|
||||
$GLOBALS['phpgw']->common->phpgw_exit();
|
||||
$GLOBALS['egw']->common->egw_exit();
|
||||
}
|
||||
}
|
||||
|
||||
@ -712,7 +712,7 @@
|
||||
{
|
||||
$totalerrors = 0;
|
||||
|
||||
if ($GLOBALS['phpgw_info']['server']['account_repository'] == 'ldap' &&
|
||||
if ($GLOBALS['egw_info']['server']['account_repository'] == 'ldap' &&
|
||||
(!$_userData['account_lastname'] && !$_userData['lastname']))
|
||||
{
|
||||
$error[$totalerrors] = lang('You must enter a lastname');
|
||||
@ -733,17 +733,17 @@
|
||||
|
||||
if ($_userData['old_loginid'] != $_userData['account_lid'])
|
||||
{
|
||||
if ($GLOBALS['phpgw']->accounts->exists($_userData['account_lid']))
|
||||
if ($GLOBALS['egw']->accounts->exists($_userData['account_lid']))
|
||||
{
|
||||
if ($GLOBALS['phpgw']->accounts->exists($_userData['account_lid']) && $GLOBALS['phpgw']->accounts->get_type($_userData['account_lid'])=='g')
|
||||
{
|
||||
$error[$totalerrors] = lang('There already is a group with this name. Userid\'s can not have the same name as a groupid');
|
||||
}
|
||||
else
|
||||
{
|
||||
$error[$totalerrors] = lang('That loginid has already been taken');
|
||||
}
|
||||
$totalerrors++;
|
||||
if ($GLOBALS['egw']->accounts->exists($_userData['account_lid']) && $GLOBALS['egw']->accounts->get_type($_userData['account_lid'])=='g')
|
||||
{
|
||||
$error[$totalerrors] = lang('There already is a group with this name. Userid\'s can not have the same name as a groupid');
|
||||
}
|
||||
else
|
||||
{
|
||||
$error[$totalerrors] = lang('That loginid has already been taken');
|
||||
}
|
||||
$totalerrors++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -811,23 +811,23 @@
|
||||
/* stores the userdata */
|
||||
function save_user($_userData)
|
||||
{
|
||||
$account = CreateObject('phpgwapi.accounts',$_userData['account_id'],'u');
|
||||
$account =& CreateObject('phpgwapi.accounts',$_userData['account_id'],'u');
|
||||
$account->update_data($_userData);
|
||||
$account->save_repository();
|
||||
if ($_userData['account_passwd'])
|
||||
{
|
||||
$auth = CreateObject('phpgwapi.auth');
|
||||
$auth =& CreateObject('phpgwapi.auth');
|
||||
$auth->change_password($old_passwd, $_userData['account_passwd'], $_userData['account_id']);
|
||||
$GLOBALS['hook_values']['account_id'] = $_userData['account_id'];
|
||||
$GLOBALS['hook_values']['old_passwd'] = $old_passwd;
|
||||
$GLOBALS['hook_values']['new_passwd'] = $_userData['account_passwd'];
|
||||
|
||||
$GLOBALS['phpgw']->hooks->process($GLOBALS['hook_values']+array(
|
||||
$GLOBALS['egw']->hooks->process($GLOBALS['hook_values']+array(
|
||||
'location' => 'changepassword'
|
||||
),False,True); // called for every app now, not only enabled ones)
|
||||
}
|
||||
|
||||
$apps = CreateObject('phpgwapi.applications',(int)$_userData['account_id']);
|
||||
$apps =& CreateObject('phpgwapi.applications',(int)$_userData['account_id']);
|
||||
if ($_userData['account_permissions'])
|
||||
{
|
||||
foreach($_userData['account_permissions'] as $app => $enabled)
|
||||
@ -840,7 +840,7 @@
|
||||
}
|
||||
$apps->save_repository();
|
||||
|
||||
$account = CreateObject('phpgwapi.accounts',$_userData['account_id'],'u');
|
||||
$account =& CreateObject('phpgwapi.accounts',$_userData['account_id'],'u');
|
||||
$allGroups = $account->get_list('groups');
|
||||
|
||||
if ($_userData['account_groups'])
|
||||
@ -852,7 +852,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
$acl = CreateObject('phpgwapi.acl',$_userData['account_id']);
|
||||
$acl =& CreateObject('phpgwapi.acl',$_userData['account_id']);
|
||||
|
||||
reset($allGroups);
|
||||
while (list($key,$groupData) = each($allGroups))
|
||||
@ -879,18 +879,18 @@
|
||||
}
|
||||
if ($_userData['changepassword'])
|
||||
{
|
||||
$GLOBALS['phpgw']->acl->add_repository('preferences','changepassword',$_userData['account_id'],1);
|
||||
$GLOBALS['egw']->acl->add_repository('preferences','changepassword',$_userData['account_id'],1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$GLOBALS['phpgw']->acl->delete_repository('preferences','changepassword',$_userData['account_id']);
|
||||
$GLOBALS['egw']->acl->delete_repository('preferences','changepassword',$_userData['account_id']);
|
||||
}
|
||||
$GLOBALS['phpgw']->session->delete_cache((int)$_userData['account_id']);
|
||||
$GLOBALS['egw']->session->delete_cache((int)$_userData['account_id']);
|
||||
}
|
||||
|
||||
function load_group_users($account_id)
|
||||
{
|
||||
$temp_user = $GLOBALS['phpgw']->acl->get_ids_for_location($account_id,1,'phpgw_group');
|
||||
$temp_user = $GLOBALS['egw']->acl->get_ids_for_location($account_id,1,'phpgw_group');
|
||||
if(!$temp_user)
|
||||
{
|
||||
return Array();
|
||||
@ -910,7 +910,7 @@
|
||||
|
||||
function load_group_managers($account_id)
|
||||
{
|
||||
$temp_user = $GLOBALS['phpgw']->acl->get_ids_for_location($account_id,PHPGW_ACL_GROUP_MANAGERS,'phpgw_group');
|
||||
$temp_user = $GLOBALS['egw']->acl->get_ids_for_location($account_id,EGW_ACL_GROUP_MANAGERS,'phpgw_group');
|
||||
if(!$temp_user)
|
||||
{
|
||||
return Array();
|
||||
@ -930,7 +930,7 @@
|
||||
|
||||
function load_group_apps($account_id)
|
||||
{
|
||||
$apps = CreateObject('phpgwapi.applications',(int)$account_id);
|
||||
$apps =& CreateObject('phpgwapi.applications',(int)$account_id);
|
||||
$app_list = $apps->read_account_specific();
|
||||
$account_apps = Array();
|
||||
while(list($key,$app) = each($app_list))
|
||||
|
@ -21,8 +21,8 @@
|
||||
|
||||
function boaclmanager()
|
||||
{
|
||||
//$this->so = createobject('admin.soaclmanager');
|
||||
$this->ui = createobject('admin.uiaclmanager');
|
||||
//$this->so =& CreateObject('admin.soaclmanager');
|
||||
$this->ui =& CreateObject('admin.uiaclmanager');
|
||||
}
|
||||
|
||||
function submit()
|
||||
@ -41,7 +41,7 @@
|
||||
$total_rights += $rights;
|
||||
}
|
||||
|
||||
$GLOBALS['phpgw']->acl->add_repository($GLOBALS['acl_app'], $location, $GLOBALS['account_id'], $total_rights);
|
||||
$GLOBALS['egw']->acl->add_repository($GLOBALS['acl_app'], $location, $GLOBALS['account_id'], $total_rights);
|
||||
|
||||
$this->ui->list_apps();
|
||||
}
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* eGroupWare - administration *
|
||||
* http://www.egroupware.org *
|
||||
* -------------------------------------------- *
|
||||
* 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 *
|
||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
/**************************************************************************\
|
||||
* eGroupWare - administration *
|
||||
* http://www.egroupware.org *
|
||||
* -------------------------------------------- *
|
||||
* 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 *
|
||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
/* $Id$ */
|
||||
|
||||
class boapplications
|
||||
{
|
||||
@ -17,7 +17,7 @@
|
||||
|
||||
function boapplications()
|
||||
{
|
||||
$this->so = CreateObject('admin.soapplications');
|
||||
$this->so =& CreateObject('admin.soapplications');
|
||||
}
|
||||
|
||||
function get_list()
|
||||
|
@ -30,11 +30,11 @@
|
||||
{
|
||||
if ($_GET['appname'])
|
||||
{
|
||||
$this->cats = CreateObject('phpgwapi.categories',-1,$_GET['appname']);
|
||||
$this->cats =& CreateObject('phpgwapi.categories',-1,$_GET['appname']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->cats = CreateObject('phpgwapi.categories',$GLOBALS['phpgw_info']['user']['account_id'],'phpgw');
|
||||
$this->cats =& CreateObject('phpgwapi.categories',$GLOBALS['egw_info']['user']['account_id'],'phpgw');
|
||||
}
|
||||
|
||||
$this->read_sessiondata();
|
||||
@ -79,12 +79,12 @@
|
||||
function save_sessiondata($data)
|
||||
{
|
||||
if($this->debug) { echo '<br>Save:'; _debug_array($data); }
|
||||
$GLOBALS['phpgw']->session->appsession('session_data','admin_cats',$data);
|
||||
$GLOBALS['egw']->session->appsession('session_data','admin_cats',$data);
|
||||
}
|
||||
|
||||
function read_sessiondata()
|
||||
{
|
||||
$data = $GLOBALS['phpgw']->session->appsession('session_data','admin_cats');
|
||||
$data = $GLOBALS['egw']->session->appsession('session_data','admin_cats');
|
||||
if($this->debug) { echo '<br>Read:'; _debug_array($data); }
|
||||
|
||||
$this->start = $data['start'];
|
||||
|
@ -28,9 +28,9 @@
|
||||
function list_methods($_type='xmlrpc')
|
||||
{
|
||||
/*
|
||||
This handles introspection or discovery by the logged in client,
|
||||
in which case the input might be an array. The server always calls
|
||||
this function to fill the server dispatch map using a string.
|
||||
This handles introspection or discovery by the logged in client,
|
||||
in which case the input might be an array. The server always calls
|
||||
this function to fill the server dispatch map using a string.
|
||||
*/
|
||||
if (is_array($_type))
|
||||
{
|
||||
@ -83,7 +83,7 @@
|
||||
return $errors;
|
||||
}
|
||||
|
||||
$conf = CreateObject('phpgwapi.config', $data['appname']);
|
||||
$conf =& CreateObject('phpgwapi.config', $data['appname']);
|
||||
|
||||
$conf->read_repository();
|
||||
reset($newsettings);
|
||||
|
@ -22,12 +22,12 @@
|
||||
|
||||
function total()
|
||||
{
|
||||
return $GLOBALS['phpgw']->session->total();
|
||||
return $GLOBALS['egw']->session->total();
|
||||
}
|
||||
|
||||
function list_sessions($start,$order,$sort)
|
||||
{
|
||||
$values = $GLOBALS['phpgw']->session->list_sessions($start,$sort,$order);
|
||||
$values = $GLOBALS['egw']->session->list_sessions($start,$sort,$order);
|
||||
|
||||
while (list(,$value) = @each($values))
|
||||
{
|
||||
@ -48,7 +48,7 @@
|
||||
'session_id' => $value['session_id'],
|
||||
'session_lid' => $session_lid,
|
||||
'session_ip' => $value['session_ip'],
|
||||
'session_logintime' => $GLOBALS['phpgw']->common->show_date($value['session_logintime']),
|
||||
'session_logintime' => $GLOBALS['egw']->common->show_date($value['session_logintime']),
|
||||
'session_action' => $value['session_action'],
|
||||
'session_dla' => $value['session_dla'],
|
||||
'session_idle' => str_pad($hours, 2, '0', STR_PAD_LEFT) . ':' . str_pad($mins, 2, '0', STR_PAD_LEFT) . ':' . str_pad($secs, 2, '0', STR_PAD_LEFT)
|
||||
@ -61,11 +61,11 @@
|
||||
{
|
||||
if ($_GET['ksession'] &&
|
||||
($GLOBALS['sessionid'] != $_GET['ksession']) &&
|
||||
! $GLOBALS['phpgw']->acl->check('current_sessions_access',8,'admin'))
|
||||
! $GLOBALS['egw']->acl->check('current_sessions_access',8,'admin'))
|
||||
{
|
||||
$GLOBALS['phpgw']->session->destroy($_GET['ksession'],0);
|
||||
$GLOBALS['egw']->session->destroy($_GET['ksession'],0);
|
||||
}
|
||||
$this->ui = createobject('admin.uicurrentsessions');
|
||||
$this->ui =& CreateObject('admin.uicurrentsessions');
|
||||
$this->ui->list_sessions();
|
||||
}
|
||||
}
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
function boldap_mgr($_profileID=-1)
|
||||
{
|
||||
$this->soldapmgr = CreateObject('admin.soldap_mgr');
|
||||
$this->soldapmgr =& CreateObject('admin.soldap_mgr');
|
||||
|
||||
$this->SMTPServerType = array(
|
||||
'1' => array(
|
||||
@ -186,7 +186,7 @@
|
||||
# if(!is_object($this->imapClass))
|
||||
# {
|
||||
# $profileData = $this->getProfile($_profileID);
|
||||
# $this->imapClass = CreateObject('emailadmin.cyrusimap',$profileData);
|
||||
# $this->imapClass =& CreateObject('emailadmin.cyrusimap',$profileData);
|
||||
# }
|
||||
#
|
||||
# return $this->imapClass;
|
||||
@ -246,7 +246,7 @@
|
||||
# if(!is_object($this->smtpClass))
|
||||
# {
|
||||
# $profileData = $this->getProfile($_profileID);
|
||||
# $this->smtpClass = CreateObject('emailadmin.postfixldap',$profileData);
|
||||
# $this->smtpClass =& CreateObject('emailadmin.postfixldap',$profileData);
|
||||
# }
|
||||
#
|
||||
# return $this->smtpClass;
|
||||
@ -279,10 +279,10 @@
|
||||
|
||||
function restoreSessionData()
|
||||
{
|
||||
global $phpgw;
|
||||
|
||||
|
||||
$this->sessionData = $phpgw->session->appsession('session_data');
|
||||
$this->userSessionData = $phpgw->session->appsession('user_session_data');
|
||||
$this->sessionData = $GLOBALS['egw']->session->appsession('session_data');
|
||||
$this->userSessionData = $GLOBALS['egw']->session->appsession('user_session_data');
|
||||
|
||||
#while(list($key, $value) = each($this->userSessionData))
|
||||
#{
|
||||
@ -309,10 +309,10 @@
|
||||
|
||||
function saveSessionData()
|
||||
{
|
||||
global $phpgw;
|
||||
|
||||
$phpgw->session->appsession('session_data','',$this->sessionData);
|
||||
$phpgw->session->appsession('user_session_data','',$this->userSessionData);
|
||||
|
||||
$GLOBALS['egw']->session->appsession('session_data','',$this->sessionData);
|
||||
$GLOBALS['egw']->session->appsession('user_session_data','',$this->userSessionData);
|
||||
}
|
||||
|
||||
|
||||
@ -371,12 +371,12 @@
|
||||
$this->soldapmgr->saveUserData(
|
||||
$_accountID,
|
||||
$this->userSessionData[$_accountID]);
|
||||
$bofelamimail = CreateObject('felamimail.bofelamimail');
|
||||
$bofelamimail =& CreateObject('felamimail.bofelamimail');
|
||||
$bofelamimail->openConnection('','',true);
|
||||
$bofelamimail->imapSetQuota($GLOBALS['phpgw']->accounts->id2name($_accountID),
|
||||
$this->userSessionData[$_accountID]['quotaLimit']);
|
||||
$bofelamimail->imapSetQuota($GLOBALS['egw']->accounts->id2name($_accountID),
|
||||
$this->userSessionData[$_accountID]['quotaLimit']);
|
||||
$bofelamimail->closeConnection();
|
||||
$GLOBALS['phpgw']->accounts->cache_invalidate($_accountID);
|
||||
$GLOBALS['egw']->accounts->cache_invalidate($_accountID);
|
||||
|
||||
|
||||
break;
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
function bolog($session=False)
|
||||
{
|
||||
$this->so = CreateObject('admin.solog');
|
||||
$this->so =& CreateObject('admin.solog');
|
||||
}
|
||||
|
||||
function get_error_cols()
|
||||
@ -68,11 +68,11 @@
|
||||
while(list($rno,$r)=each($rows))
|
||||
{
|
||||
unset($r['acount_pwd']); // remove the accounts_pwd
|
||||
$r['log_date_e']['value'] = $GLOBALS['phpgw']->common->show_date($GLOBALS['phpgw']->db->from_timestamp($r['log_date']['value']));
|
||||
$r['log_msg_date_e']['value'] = $GLOBALS['phpgw']->common->show_date($GLOBALS['phpgw']->db->from_timestamp($r['log_msg_date']['value']));
|
||||
$r['log_date_e']['value'] = $GLOBALS['egw']->common->show_date($GLOBALS['egw']->db->from_timestamp($r['log_date']['value']));
|
||||
$r['log_msg_date_e']['value'] = $GLOBALS['egw']->common->show_date($GLOBALS['egw']->db->from_timestamp($r['log_msg_date']['value']));
|
||||
$r['log_full_name']['value'] = $r['account_lastname']['value'] . ', ' .$r['account_firstname']['value'];
|
||||
$r['account_lastlogin_e']['value'] = $GLOBALS['phpgw']->common->show_date($GLOBALS['phpgw']->db->from_timestamp($r['account_lastlogin']['value']));
|
||||
$r['account_lastpwd_change_e']['value'] = $GLOBALS['phpgw']->common->show_date($GLOBALS['phpgw']->db->from_timestamp($r['account_lastpwd_change']['value']));
|
||||
$r['account_lastlogin_e']['value'] = $GLOBALS['egw']->common->show_date($GLOBALS['egw']->db->from_timestamp($r['account_lastlogin']['value']));
|
||||
$r['account_lastpwd_change_e']['value'] = $GLOBALS['egw']->common->show_date($GLOBALS['egw']->db->from_timestamp($r['account_lastpwd_change']['value']));
|
||||
$r['account_lastloginfrom_e']['value'] = 'www.nowhere.com';
|
||||
|
||||
$r['log_msg_text']['value'] = lang($r['log_msg_msg']['value'],explode('|',$r['log_msg_parms']['value']));
|
||||
|
@ -1,16 +1,16 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* eGroupWare - Admin *
|
||||
* http://www.egroupware.org *
|
||||
* Written by Miles Lott <milosch@phpwhere.org> *
|
||||
* -------------------------------------------- *
|
||||
* 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 *
|
||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
/**************************************************************************\
|
||||
* eGroupWare - Admin *
|
||||
* http://www.egroupware.org *
|
||||
* Written by Miles Lott <milosch@phpwhere.org> *
|
||||
* -------------------------------------------- *
|
||||
* 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 *
|
||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
/* $Id$ */
|
||||
|
||||
class boserver
|
||||
{
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
function boserver($session=False)
|
||||
{
|
||||
$this->so = CreateObject('admin.soserver');
|
||||
$this->so =& CreateObject('admin.soserver');
|
||||
|
||||
if($session)
|
||||
{
|
||||
@ -72,13 +72,13 @@
|
||||
if ($this->use_session)
|
||||
{
|
||||
if($this->debug) { echo '<br>Save:'; _debug_array($data); }
|
||||
$GLOBALS['phpgw']->session->appsession('session_data','admin_servers',$data);
|
||||
$GLOBALS['egw']->session->appsession('session_data','admin_servers',$data);
|
||||
}
|
||||
}
|
||||
|
||||
function read_sessiondata()
|
||||
{
|
||||
$data = $GLOBALS['phpgw']->session->appsession('session_data','admin_servers');
|
||||
$data = $GLOBALS['egw']->session->appsession('session_data','admin_servers');
|
||||
if($this->debug) { echo '<br>Read:'; _debug_array($data); }
|
||||
|
||||
$this->start = $data['start'];
|
||||
|
@ -30,20 +30,20 @@
|
||||
else
|
||||
{
|
||||
#$html .= '<form method="post" action="'
|
||||
# . $GLOBALS['phpgw']->link('/index.php')
|
||||
# . $GLOBALS['egw']->link('/index.php')
|
||||
# . '">' . "\n";
|
||||
$bo = CreateObject('admin.bolog',True);
|
||||
$bo =& CreateObject('admin.bolog',True);
|
||||
if(!isset($start))
|
||||
{
|
||||
$start = 0;
|
||||
}
|
||||
$num_rows = $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
|
||||
$num_rows = $GLOBALS['egw_info']['user']['preferences']['common']['maxmatchs'];
|
||||
$stop = $start + $num_rows;
|
||||
if($stop > count($rows))
|
||||
{
|
||||
$stop = count($rows);
|
||||
}
|
||||
$nextmatchs = CreateObject('phpgwapi.nextmatchs');
|
||||
$nextmatchs =& CreateObject('phpgwapi.nextmatchs');
|
||||
$total_records = $bo->get_no_errors();
|
||||
$left = $nextmatchs->left('/index.php',$start,$total_records,'menuaction=admin.uilog.list_log');
|
||||
$right = $nextmatchs->right('/index.php',$start,$total_records,'menuaction=admin.uilog.list_log');
|
||||
@ -52,7 +52,7 @@
|
||||
$html .= '<table width="98%"><tr>';
|
||||
$html .= $left;
|
||||
$html .= '<td align="right"> ' . $hits . ' </td>';
|
||||
$html .= '<td align="left"> <a href=' . $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uilog.list_log&editable=true') .'> ' . lang('Edit Table format') . '</a></td>';
|
||||
$html .= '<td align="left"> <a href=' . $GLOBALS['egw']->link('/index.php','menuaction=admin.uilog.list_log&editable=true') .'> ' . lang('Edit Table format') . '</a></td>';
|
||||
$html .= $right;
|
||||
$html .= '</tr></table>';
|
||||
}
|
||||
@ -251,7 +251,7 @@
|
||||
|
||||
$html = '';
|
||||
$html .= '<form method="post" action="'
|
||||
. $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uilog.list_log&editable=true')
|
||||
. $GLOBALS['egw']->link('/index.php','menuaction=admin.uilog.list_log&editable=true')
|
||||
. '">' . "\n";
|
||||
|
||||
$params = $head['_table_parms'];
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
function soaccess_history()
|
||||
{
|
||||
$this->db = $GLOBALS['phpgw']->db;
|
||||
$this->db = clone($GLOBALS['egw']->db);
|
||||
}
|
||||
|
||||
function test_account_id($account_id)
|
||||
|
@ -27,7 +27,7 @@
|
||||
$userData['account_email'] = $userData['email'];
|
||||
}
|
||||
|
||||
$GLOBALS['phpgw']->db->lock(
|
||||
$GLOBALS['egw']->db->lock(
|
||||
Array(
|
||||
'phpgw_accounts',
|
||||
'phpgw_nextid',
|
||||
@ -40,11 +40,11 @@
|
||||
)
|
||||
);
|
||||
|
||||
$GLOBALS['phpgw']->accounts->create($userData);
|
||||
$GLOBALS['egw']->accounts->create($userData);
|
||||
|
||||
$userData['account_id'] = $GLOBALS['phpgw']->accounts->name2id($userData['account_lid']);
|
||||
$userData['account_id'] = $GLOBALS['egw']->accounts->name2id($userData['account_lid']);
|
||||
|
||||
$apps = CreateObject('phpgwapi.applications',$userData['account_id']);
|
||||
$apps =& CreateObject('phpgwapi.applications',$userData['account_id']);
|
||||
$apps->read_installed_apps();
|
||||
// Read Group Apps
|
||||
if ($userData['account_groups'])
|
||||
@ -89,7 +89,7 @@
|
||||
|
||||
if ($userData['changepassword'])
|
||||
{
|
||||
$GLOBALS['phpgw']->acl->add_repository('preferences','changepassword',$userData['account_id'],1);
|
||||
$GLOBALS['egw']->acl->add_repository('preferences','changepassword',$userData['account_id'],1);
|
||||
}
|
||||
// Assign user to groups
|
||||
if ($userData['account_groups'])
|
||||
@ -97,14 +97,14 @@
|
||||
$c_acct_groups = count($userData['account_groups']);
|
||||
for ($i=0;$i<$c_acct_groups;$i++)
|
||||
{
|
||||
$GLOBALS['phpgw']->acl->add_repository('phpgw_group',$userData['account_groups'][$i],$userData['account_id'],1);
|
||||
$GLOBALS['egw']->acl->add_repository('phpgw_group',$userData['account_groups'][$i],$userData['account_id'],1);
|
||||
}
|
||||
}
|
||||
|
||||
$apps->account_apps = array(array());
|
||||
$apps_after = array(array());
|
||||
|
||||
$GLOBALS['phpgw']->db->unlock();
|
||||
$GLOBALS['egw']->db->unlock();
|
||||
|
||||
return $userData['account_id'];
|
||||
}
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* eGroupWare - administration *
|
||||
* http://www.egroupware.org *
|
||||
* -------------------------------------------- *
|
||||
* 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 *
|
||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
/**************************************************************************\
|
||||
* eGroupWare - administration *
|
||||
* http://www.egroupware.org *
|
||||
* -------------------------------------------- *
|
||||
* 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 *
|
||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
/* $Id$ */
|
||||
|
||||
class soapplications
|
||||
{
|
||||
@ -17,7 +17,7 @@
|
||||
|
||||
function soapplications()
|
||||
{
|
||||
$this->db = $GLOBALS['phpgw']->db;
|
||||
$this->db = clone($GLOBALS['egw']->db);
|
||||
}
|
||||
|
||||
function read($app_name)
|
||||
@ -28,7 +28,7 @@
|
||||
$this->db->next_record();
|
||||
$app_info = array(
|
||||
$this->db->f('app_name'),
|
||||
$GLOBALS['phpgw_info']['apps'][$this->db->f('app_name')]['title'],
|
||||
$GLOBALS['egw_info']['apps'][$this->db->f('app_name')]['title'],
|
||||
$this->db->f('app_enabled'),
|
||||
$this->db->f('app_name'),
|
||||
$this->db->f('app_order')
|
||||
@ -44,7 +44,7 @@
|
||||
while ($this->db->next_record())
|
||||
{
|
||||
$app = $this->db->f('app_name');
|
||||
$title = @$GLOBALS['phpgw_info']['apps'][$app]['title'];
|
||||
$title = @$GLOBALS['egw_info']['apps'][$app]['title'];
|
||||
if (empty($title))
|
||||
{
|
||||
$title = lang($app) == $app.'*' ? $app : lang($app);
|
||||
@ -62,7 +62,7 @@
|
||||
function add($data)
|
||||
{
|
||||
/* Yes, the sequence should work, but after a mass import in setup (new install)
|
||||
it does not work on pg
|
||||
it does not work on pg
|
||||
*/
|
||||
$sql = 'SELECT MAX(app_id) from phpgw_applications';
|
||||
$this->db->query($sql,__LINE__,__FILE__);
|
||||
|
@ -15,8 +15,8 @@
|
||||
{
|
||||
function soldap_mgr()
|
||||
{
|
||||
$this->db = $GLOBALS['phpgw']->db;
|
||||
include(PHPGW_INCLUDE_ROOT.'/emailadmin/setup/tables_current.inc.php');
|
||||
$this->db = clone($GLOBALS['egw']->db);
|
||||
include(EGW_INCLUDE_ROOT.'/emailadmin/setup/tables_current.inc.php');
|
||||
$this->tables = &$phpgw_baseline;
|
||||
unset($phpgw_baseline);
|
||||
$this->table = &$this->tables['phpgw_emailadmin'];
|
||||
@ -27,10 +27,10 @@
|
||||
{
|
||||
global $phpgw, $phpgw_info;
|
||||
|
||||
$ldap = $phpgw->common->ldapConnect();
|
||||
$ldap = $GLOBALS['egw']->common->ldapConnect();
|
||||
$filter = "(&(uidnumber=$_accountID))";
|
||||
|
||||
$sri = @ldap_search($ldap,$phpgw_info['server']['ldap_context'],$filter);
|
||||
$sri = @ldap_search($ldap,$GLOBALS['egw_info']['server']['ldap_context'],$filter);
|
||||
if ($sri)
|
||||
{
|
||||
$allValues = ldap_get_entries($ldap, $sri);
|
||||
@ -57,7 +57,7 @@
|
||||
function saveUserData($_accountID, $_accountData)
|
||||
{
|
||||
|
||||
$ldap = $GLOBALS['phpgw']->common->ldapConnect();
|
||||
$ldap = $GLOBALS['egw']->common->ldapConnect();
|
||||
// need to be fixed
|
||||
if(is_numeric($_accountID))
|
||||
{
|
||||
@ -68,7 +68,7 @@
|
||||
$filter = "uid=$_accountID";
|
||||
}
|
||||
|
||||
$sri = @ldap_search($ldap,$GLOBALS['phpgw_info']['server']['ldap_context'],$filter);
|
||||
$sri = @ldap_search($ldap,$GLOBALS['egw_info']['server']['ldap_context'],$filter);
|
||||
if ($sri)
|
||||
{
|
||||
$allValues = ldap_get_entries($ldap, $sri);
|
||||
@ -158,7 +158,7 @@
|
||||
|
||||
// also update the account_email field in phpgw_accounts
|
||||
// when using sql account storage
|
||||
if($GLOBALS['phpgw_info']['server']['account_repository'] == 'sql')
|
||||
if($GLOBALS['egw_info']['server']['account_repository'] == 'sql')
|
||||
{
|
||||
$this->db->update('phpgw_accounts',array(
|
||||
'account_email' => $_accountData["mail"]
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
function solog()
|
||||
{
|
||||
$this->db = $GLOBALS['phpgw']->db;
|
||||
$this->db = clone($GLOBALS['egw']->db);
|
||||
}
|
||||
|
||||
function get_error_cols()
|
||||
|
@ -1,16 +1,16 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* eGroupWare - Admin - Peer Servers *
|
||||
* http://www.egroupware.org *
|
||||
* Written by Joseph Engo <jengo@mail.com> *
|
||||
* -------------------------------------------- *
|
||||
* 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 *
|
||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
/**************************************************************************\
|
||||
* eGroupWare - Admin - Peer Servers *
|
||||
* http://www.egroupware.org *
|
||||
* Written by Joseph Engo <jengo@mail.com> *
|
||||
* -------------------------------------------- *
|
||||
* 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 *
|
||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
/* $Id$ */
|
||||
|
||||
class soserver
|
||||
{
|
||||
@ -19,7 +19,7 @@
|
||||
|
||||
function soserver()
|
||||
{
|
||||
$this->is = CreateObject('phpgwapi.interserver');
|
||||
$this->is =& CreateObject('phpgwapi.interserver');
|
||||
}
|
||||
|
||||
function list_servers($data='',&$total)
|
||||
|
@ -20,14 +20,14 @@
|
||||
|
||||
function uiaccess_history()
|
||||
{
|
||||
if ($GLOBALS['phpgw']->acl->check('access_log_access',1,'admin'))
|
||||
if ($GLOBALS['egw']->acl->check('access_log_access',1,'admin'))
|
||||
{
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php');
|
||||
$GLOBALS['egw']->redirect_link('/index.php');
|
||||
}
|
||||
|
||||
$this->bo = createobject('admin.boaccess_history');
|
||||
$this->nextmatchs = createobject('phpgwapi.nextmatchs');
|
||||
$this->template = $GLOBALS['phpgw']->template;
|
||||
$this->bo =& CreateObject('admin.boaccess_history');
|
||||
$this->nextmatchs =& CreateObject('phpgwapi.nextmatchs');
|
||||
$this->template = $GLOBALS['egw']->template;
|
||||
$this->template->set_file(
|
||||
Array(
|
||||
'accesslog' => 'accesslog.tpl'
|
||||
@ -45,19 +45,19 @@
|
||||
$sort = get_var('sort',array('POST'),0);
|
||||
$order = get_var('order',array('POST'),0);
|
||||
|
||||
$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin').' - '.lang('View access log');
|
||||
if(!@is_object($GLOBALS['phpgw']->js))
|
||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('Admin').' - '.lang('View access log');
|
||||
if(!@is_object($GLOBALS['egw']->js))
|
||||
{
|
||||
$GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript');
|
||||
$GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript');
|
||||
}
|
||||
$GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
$GLOBALS['egw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['egw']->common->egw_header();
|
||||
echo parse_navbar();
|
||||
|
||||
$total_records = $this->bo->total($account_id);
|
||||
|
||||
$var = Array(
|
||||
'th_bg' => $GLOBALS['phpgw_info']['theme']['th_bg'],
|
||||
'th_bg' => $GLOBALS['egw_info']['theme']['th_bg'],
|
||||
'nextmatchs_left' => $this->nextmatchs->left('/index.php',$start,$total_records,'&menuaction=admin.uiaccess_history.list_history&account_id=' . $account_id),
|
||||
'nextmatchs_right' => $this->nextmatchs->right('/index.php',$start,$total_records,'&menuaction=admin.uiaccess_history.list_history&account_id=' . $account_id),
|
||||
'showing' => $this->nextmatchs->show_hits($total_records,$start),
|
||||
@ -70,13 +70,13 @@
|
||||
|
||||
if ($account_id)
|
||||
{
|
||||
$var['link_return_to_view_account'] = '<a href="' . $GLOBALS['phpgw']->link('/index.php',
|
||||
$var['link_return_to_view_account'] = '<a href="' . $GLOBALS['egw']->link('/index.php',
|
||||
Array(
|
||||
'menuaction' => 'admin.uiaccounts.view',
|
||||
'account_id' => $account_id
|
||||
)
|
||||
) . '">' . lang('Return to view account') . '</a>';
|
||||
$var['lang_last_x_logins'] = lang('Last %1 logins for %2',$total_records,$GLOBALS['phpgw']->common->grab_owner_name($account_id));
|
||||
$var['lang_last_x_logins'] = lang('Last %1 logins for %2',$total_records,$GLOBALS['egw']->common->grab_owner_name($account_id));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -120,7 +120,7 @@
|
||||
}
|
||||
|
||||
$var = Array(
|
||||
'bg_color' => $GLOBALS['phpgw_info']['themes']['bg_color'],
|
||||
'bg_color' => $GLOBALS['egw_info']['themes']['bg_color'],
|
||||
'footer_total' => lang('Total records') . ': ' . $total_records
|
||||
);
|
||||
if ($account_id)
|
||||
@ -133,7 +133,7 @@
|
||||
}
|
||||
|
||||
// create the menu on the left, if needed
|
||||
$menuClass = CreateObject('admin.uimenuclass');
|
||||
$menuClass =& CreateObject('admin.uimenuclass');
|
||||
$var['rows'] = $menuClass->createHTMLCode('view_account');
|
||||
|
||||
$this->template->set_var($var);
|
||||
|
@ -52,14 +52,14 @@
|
||||
|
||||
function uiaccounts()
|
||||
{
|
||||
$this->bo = createobject('admin.boaccounts');
|
||||
$this->nextmatchs = createobject('phpgwapi.nextmatchs');
|
||||
$this->bo =& CreateObject('admin.boaccounts');
|
||||
$this->nextmatchs =& CreateObject('phpgwapi.nextmatchs');
|
||||
@set_time_limit(300);
|
||||
}
|
||||
|
||||
function row_action($action,$type,$account_id)
|
||||
{
|
||||
return '<a href="'.$GLOBALS['phpgw']->link('/index.php',Array(
|
||||
return '<a href="'.$GLOBALS['egw']->link('/index.php',Array(
|
||||
'menuaction' => 'admin.uiaccounts.'.$action.'_'.$type,
|
||||
'account_id' => $account_id
|
||||
)).'"> '.lang($action).' </a>';
|
||||
@ -67,9 +67,9 @@
|
||||
|
||||
function list_groups()
|
||||
{
|
||||
if ($GLOBALS['phpgw']->acl->check('group_access',1,'admin'))
|
||||
if ($GLOBALS['egw']->acl->check('group_access',1,'admin'))
|
||||
{
|
||||
$GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/admin/index.php'));
|
||||
$GLOBALS['egw']->redirect($GLOBALS['egw']->link('/admin/index.php'));
|
||||
}
|
||||
|
||||
$GLOBALS['cd'] = ($_GET['cd']?$_GET['cd']:0);
|
||||
@ -111,18 +111,18 @@
|
||||
break;
|
||||
}
|
||||
|
||||
unset($GLOBALS['phpgw_info']['flags']['noheader']);
|
||||
unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
|
||||
if(!@is_object($GLOBALS['phpgw']->js))
|
||||
unset($GLOBALS['egw_info']['flags']['noheader']);
|
||||
unset($GLOBALS['egw_info']['flags']['nonavbar']);
|
||||
if(!@is_object($GLOBALS['egw']->js))
|
||||
{
|
||||
$GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript');
|
||||
$GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript');
|
||||
}
|
||||
$GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['admin']['title'].' - '.
|
||||
$GLOBALS['egw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['egw_info']['flags']['app_header'] = $GLOBALS['egw_info']['apps']['admin']['title'].' - '.
|
||||
lang('User groups');
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
$GLOBALS['egw']->common->egw_header();
|
||||
|
||||
$p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
|
||||
$p =& CreateObject('phpgwapi.Template',EGW_APP_TPL);
|
||||
$p->set_file(
|
||||
array(
|
||||
'groups' => 'groups.tpl'
|
||||
@ -132,15 +132,15 @@
|
||||
$p->set_block('groups','row','row');
|
||||
$p->set_block('groups','row_empty','row_empty');
|
||||
|
||||
if (! $GLOBALS['phpgw']->acl->check('account_access',2,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('account_access',2,'admin'))
|
||||
{
|
||||
$account_info = $GLOBALS['phpgw']->accounts->get_list('groups',$start,$sort, $order, $GLOBALS['query']);
|
||||
$account_info = $GLOBALS['egw']->accounts->get_list('groups',$start,$sort, $order, $GLOBALS['query']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$account_info = $GLOBALS['phpgw']->accounts->get_list('groups',$start,$sort, $order);
|
||||
$account_info = $GLOBALS['egw']->accounts->get_list('groups',$start,$sort, $order);
|
||||
}
|
||||
$total = $GLOBALS['phpgw']->accounts->total;
|
||||
$total = $GLOBALS['egw']->accounts->total;
|
||||
|
||||
$var = Array(
|
||||
'left_next_matchs' => $this->nextmatchs->left('/index.php',$start,$total,'menuaction=admin.uiaccounts.list_groups'),
|
||||
@ -159,17 +159,17 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! $GLOBALS['phpgw']->acl->check('group_access',8,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('group_access',8,'admin'))
|
||||
{
|
||||
$can_view = True;
|
||||
}
|
||||
|
||||
if (! $GLOBALS['phpgw']->acl->check('group_access',16,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('group_access',16,'admin'))
|
||||
{
|
||||
$can_edit = True;
|
||||
}
|
||||
|
||||
if (! $GLOBALS['phpgw']->acl->check('group_access',32,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('group_access',32,'admin'))
|
||||
{
|
||||
$can_delete = True;
|
||||
}
|
||||
@ -206,17 +206,17 @@
|
||||
}
|
||||
}
|
||||
$var = Array(
|
||||
'new_action' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.add_group'),
|
||||
'search_action' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.list_groups')
|
||||
'new_action' => $GLOBALS['egw']->link('/index.php','menuaction=admin.uiaccounts.add_group'),
|
||||
'search_action' => $GLOBALS['egw']->link('/index.php','menuaction=admin.uiaccounts.list_groups')
|
||||
);
|
||||
$p->set_var($var);
|
||||
|
||||
if (! $GLOBALS['phpgw']->acl->check('group_access',4,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('group_access',4,'admin'))
|
||||
{
|
||||
$p->set_var('input_add','<input type="submit" value="' . lang('Add') . '">');
|
||||
}
|
||||
|
||||
if (! $GLOBALS['phpgw']->acl->check('group_access',2,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('group_access',2,'admin'))
|
||||
{
|
||||
$p->set_var('input_search',lang('Search') . ' <input name="query" value="'.htmlspecialchars(stripslashes($GLOBALS['query'])).'">');
|
||||
}
|
||||
@ -226,13 +226,13 @@
|
||||
|
||||
function list_users($param_cd='')
|
||||
{
|
||||
if ($GLOBALS['phpgw']->acl->check('account_access',1,'admin'))
|
||||
if ($GLOBALS['egw']->acl->check('account_access',1,'admin'))
|
||||
{
|
||||
$GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/admin/index.php'));
|
||||
$GLOBALS['egw']->redirect($GLOBALS['egw']->link('/admin/index.php'));
|
||||
}
|
||||
if (!is_object($GLOBALS['phpgw']->html))
|
||||
if (!is_object($GLOBALS['egw']->html))
|
||||
{
|
||||
$GLOBALS['phpgw']->html = CreateObject('phpgwapi.html');
|
||||
$GLOBALS['egw']->html =& CreateObject('phpgwapi.html');
|
||||
}
|
||||
|
||||
if($param_cd)
|
||||
@ -280,18 +280,18 @@
|
||||
break;
|
||||
}
|
||||
|
||||
unset($GLOBALS['phpgw_info']['flags']['noheader']);
|
||||
unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
|
||||
if(!@is_object($GLOBALS['phpgw']->js))
|
||||
unset($GLOBALS['egw_info']['flags']['noheader']);
|
||||
unset($GLOBALS['egw_info']['flags']['nonavbar']);
|
||||
if(!@is_object($GLOBALS['egw']->js))
|
||||
{
|
||||
$GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript');
|
||||
$GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript');
|
||||
}
|
||||
$GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['admin']['title'].' - '.
|
||||
$GLOBALS['egw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['egw_info']['flags']['app_header'] = $GLOBALS['egw_info']['apps']['admin']['title'].' - '.
|
||||
lang('User accounts');
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
$GLOBALS['egw']->common->egw_header();
|
||||
|
||||
$p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
|
||||
$p =& CreateObject('phpgwapi.Template',EGW_APP_TPL);
|
||||
|
||||
$p->set_file(
|
||||
Array(
|
||||
@ -309,22 +309,22 @@
|
||||
'order' => $order,
|
||||
'query_type' => $_REQUEST['query_type'],
|
||||
);
|
||||
if (!$GLOBALS['phpgw']->acl->check('account_access',2,'admin'))
|
||||
if (!$GLOBALS['egw']->acl->check('account_access',2,'admin'))
|
||||
{
|
||||
$search_param['query'] = $GLOBALS['query'];
|
||||
}
|
||||
$account_info = $GLOBALS['phpgw']->accounts->search($search_param);
|
||||
$total = $GLOBALS['phpgw']->accounts->total;
|
||||
$account_info = $GLOBALS['egw']->accounts->search($search_param);
|
||||
$total = $GLOBALS['egw']->accounts->total;
|
||||
|
||||
$link_data = array(
|
||||
'menuaction' => 'admin.uiaccounts.list_users',
|
||||
'group_id' => $_REQUEST['group_id'],
|
||||
'query_type' => $_REQUEST['query_type'],
|
||||
);
|
||||
$uiaccountsel = CreateObject('phpgwapi.uiaccountsel');
|
||||
$uiaccountsel =& CreateObject('phpgwapi.uiaccountsel');
|
||||
$p->set_var(array(
|
||||
'left_next_matchs' => $this->nextmatchs->left('/index.php',$start,$total,$link_data),
|
||||
'lang_showing' => ($_REQUEST['group_id'] ? $GLOBALS['phpgw']->common->grab_owner_name($_REQUEST['group_id']).': ' : '').
|
||||
'lang_showing' => ($_REQUEST['group_id'] ? $GLOBALS['egw']->common->grab_owner_name($_REQUEST['group_id']).': ' : '').
|
||||
($GLOBALS['query'] ? lang("Search %1 '%2'",lang($uiaccountsel->query_types[$_REQUEST['query_type']]),$GLOBALS['query']).': ' : '')
|
||||
.$this->nextmatchs->show_hits($total,$start),
|
||||
'right_next_matchs' => $this->nextmatchs->right('/index.php',$start,$total,$link_data),
|
||||
@ -342,10 +342,10 @@
|
||||
'sort' => $sort,
|
||||
);
|
||||
$p->set_var(array(
|
||||
'query_type' => is_array($uiaccountsel->query_types) ? $GLOBALS['phpgw']->html->select('query_type',$_REQUEST['query_type'],$uiaccountsel->query_types) : '',
|
||||
'query_type' => is_array($uiaccountsel->query_types) ? $GLOBALS['egw']->html->select('query_type',$_REQUEST['query_type'],$uiaccountsel->query_types) : '',
|
||||
'lang_group' => lang('group'),
|
||||
'group' => $uiaccountsel->selection('group_id','admin_uiaccount_listusers_group_id',$_REQUEST['group_id'],'groups',0,False,'','this.form.submit();',lang('all')),
|
||||
'accounts_url' => $GLOBALS['phpgw']->link('/index.php',$link_data),
|
||||
'accounts_url' => $GLOBALS['egw']->link('/index.php',$link_data),
|
||||
));
|
||||
$letters = lang('alphabet');
|
||||
$letters = explode(',',substr($letters,-1) != '*' ? $letters : 'a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z');
|
||||
@ -355,7 +355,7 @@
|
||||
$link_data['query'] = $letter;
|
||||
$p->set_var(array(
|
||||
'letter' => $letter,
|
||||
'link' => $GLOBALS['phpgw']->link('/index.php',$link_data),
|
||||
'link' => $GLOBALS['egw']->link('/index.php',$link_data),
|
||||
'class' => $GLOBALS['query'] == $letter && $_REQUEST['query_type'] == 'start' ? 'letter_box_active' : 'letter_box',
|
||||
));
|
||||
$p->fp('letter_search_cells','letter_search',True);
|
||||
@ -364,14 +364,14 @@
|
||||
unset($link_data['query_type']);
|
||||
$p->set_var(array(
|
||||
'letter' => lang('all'),
|
||||
'link' => $GLOBALS['phpgw']->link('/index.php',$link_data),
|
||||
'link' => $GLOBALS['egw']->link('/index.php',$link_data),
|
||||
'class' => $_REQUEST['query_type'] != 'start' || !in_array($GLOBALS['query'],$letters) ? 'letter_box_active' : 'letter_box',
|
||||
));
|
||||
$p->fp('letter_search_cells','letter_search',True);
|
||||
|
||||
if (! $GLOBALS['phpgw']->acl->check('account_access',4,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('account_access',4,'admin'))
|
||||
{
|
||||
$p->set_var('new_action',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.add_user'));
|
||||
$p->set_var('new_action',$GLOBALS['egw']->link('/index.php','menuaction=admin.uiaccounts.add_user'));
|
||||
$p->set_var('input_add','<input type="submit" value="' . lang('Add') . '">');
|
||||
}
|
||||
|
||||
@ -382,17 +382,17 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
if (! $GLOBALS['phpgw']->acl->check('account_access',8,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('account_access',8,'admin'))
|
||||
{
|
||||
$can_view = True;
|
||||
}
|
||||
|
||||
if (! $GLOBALS['phpgw']->acl->check('account_access',16,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('account_access',16,'admin'))
|
||||
{
|
||||
$can_edit = True;
|
||||
}
|
||||
|
||||
if (! $GLOBALS['phpgw']->acl->check('account_access',32,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('account_access',32,'admin'))
|
||||
{
|
||||
$can_delete = True;
|
||||
}
|
||||
@ -414,7 +414,7 @@
|
||||
|
||||
if ($can_delete)
|
||||
{
|
||||
$p->set_var('row_delete',($GLOBALS['phpgw_info']['user']['userid'] != $account['account_lid']?$this->row_action('delete','user',$account['account_id']):' '));
|
||||
$p->set_var('row_delete',($GLOBALS['egw_info']['user']['userid'] != $account['account_lid']?$this->row_action('delete','user',$account['account_id']):' '));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -437,7 +437,7 @@
|
||||
|
||||
function add_group()
|
||||
{
|
||||
if ($GLOBALS['phpgw']->acl->check('group_access',4,'admin'))
|
||||
if ($GLOBALS['egw']->acl->check('group_access',4,'admin'))
|
||||
{
|
||||
$this->list_groups();
|
||||
return False;
|
||||
@ -454,7 +454,7 @@
|
||||
|
||||
function add_user()
|
||||
{
|
||||
if ($GLOBALS['phpgw']->acl->check('account_access',4,'admin'))
|
||||
if ($GLOBALS['egw']->acl->check('account_access',4,'admin'))
|
||||
{
|
||||
$this->list_users();
|
||||
}
|
||||
@ -466,7 +466,7 @@
|
||||
|
||||
function delete_group()
|
||||
{
|
||||
if ($_POST['no'] || $_POST['yes'] || !@isset($_GET['account_id']) || !@$_GET['account_id'] || $GLOBALS['phpgw']->acl->check('group_access',32,'admin'))
|
||||
if ($_POST['no'] || $_POST['yes'] || !@isset($_GET['account_id']) || !@$_GET['account_id'] || $GLOBALS['egw']->acl->check('group_access',32,'admin'))
|
||||
{
|
||||
if ($_POST['yes'])
|
||||
{
|
||||
@ -476,16 +476,16 @@
|
||||
return False;
|
||||
}
|
||||
|
||||
unset($GLOBALS['phpgw_info']['flags']['noheader']);
|
||||
unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
|
||||
if(!@is_object($GLOBALS['phpgw']->js))
|
||||
unset($GLOBALS['egw_info']['flags']['noheader']);
|
||||
unset($GLOBALS['egw_info']['flags']['nonavbar']);
|
||||
if(!@is_object($GLOBALS['egw']->js))
|
||||
{
|
||||
$GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript');
|
||||
$GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript');
|
||||
}
|
||||
$GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
$GLOBALS['egw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['egw']->common->egw_header();
|
||||
|
||||
$p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
|
||||
$p =& CreateObject('phpgwapi.Template',EGW_APP_TPL);
|
||||
$p->set_file(
|
||||
Array(
|
||||
'body' => 'delete_common.tpl',
|
||||
@ -497,11 +497,11 @@
|
||||
$p->set_var('message_display',lang('Are you sure you want to delete this group ?'));
|
||||
$p->parse('messages','message_row');
|
||||
|
||||
$old_group_list = $GLOBALS['phpgw']->acl->get_ids_for_location((int)$_GET['account_id'],1,'phpgw_group');
|
||||
$old_group_list = $GLOBALS['egw']->acl->get_ids_for_location((int)$_GET['account_id'],1,'phpgw_group');
|
||||
|
||||
if($old_group_list)
|
||||
{
|
||||
$group_name = $GLOBALS['phpgw']->accounts->id2name($_GET['account_id']);
|
||||
$group_name = $GLOBALS['egw']->accounts->id2name($_GET['account_id']);
|
||||
|
||||
$p->set_var('message_display','<br>');
|
||||
$p->parse('messages','message_row',True);
|
||||
@ -509,12 +509,12 @@
|
||||
$user_list = '';
|
||||
while (list(,$id) = each($old_group_list))
|
||||
{
|
||||
$user_list .= '<a href="' . $GLOBALS['phpgw']->link('/index.php',
|
||||
$user_list .= '<a href="' . $GLOBALS['egw']->link('/index.php',
|
||||
Array(
|
||||
'menuaction' => 'admin.uiaccounts.edit_user',
|
||||
'account_id' => $id
|
||||
)
|
||||
) . '">' . $GLOBALS['phpgw']->common->grab_owner_name($id) . '</a><br>';
|
||||
) . '">' . $GLOBALS['egw']->common->grab_owner_name($id) . '</a><br>';
|
||||
}
|
||||
$p->set_var('message_display',$user_list);
|
||||
$p->parse('messages','message_row',True);
|
||||
@ -525,7 +525,7 @@
|
||||
}
|
||||
|
||||
$var = Array(
|
||||
'form_action' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.delete_group'),
|
||||
'form_action' => $GLOBALS['egw']->link('/index.php','menuaction=admin.uiaccounts.delete_group'),
|
||||
'hidden_vars' => '<input type="hidden" name="account_id" value="'.$_GET['account_id'].'">',
|
||||
'yes' => lang('Yes'),
|
||||
'no' => lang('No')
|
||||
@ -536,7 +536,7 @@
|
||||
|
||||
$var = Array(
|
||||
'submit_button' => lang('Submit'),
|
||||
'action_url_button' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.list_groups'),
|
||||
'action_url_button' => $GLOBALS['egw']->link('/index.php','menuaction=admin.uiaccounts.list_groups'),
|
||||
'action_text_button' => ' '.lang('No'),
|
||||
'action_confirm_button' => '',
|
||||
'action_extra_field' => ''
|
||||
@ -549,29 +549,29 @@
|
||||
|
||||
function delete_user()
|
||||
{
|
||||
if ($GLOBALS['phpgw']->acl->check('account_access',32,'admin') || $GLOBALS['phpgw_info']['user']['account_id'] == $_GET['account_id'])
|
||||
if ($GLOBALS['egw']->acl->check('account_access',32,'admin') || $GLOBALS['egw_info']['user']['account_id'] == $_GET['account_id'])
|
||||
{
|
||||
$this->list_users();
|
||||
return False;
|
||||
}
|
||||
|
||||
unset($GLOBALS['phpgw_info']['flags']['noheader']);
|
||||
unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
|
||||
if(!@is_object($GLOBALS['phpgw']->js))
|
||||
unset($GLOBALS['egw_info']['flags']['noheader']);
|
||||
unset($GLOBALS['egw_info']['flags']['nonavbar']);
|
||||
if(!@is_object($GLOBALS['egw']->js))
|
||||
{
|
||||
$GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript');
|
||||
$GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript');
|
||||
}
|
||||
$GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
$GLOBALS['egw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['egw']->common->egw_header();
|
||||
|
||||
$t = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
|
||||
$t =& CreateObject('phpgwapi.Template',EGW_APP_TPL);
|
||||
$t->set_file(
|
||||
Array(
|
||||
'form' => 'delete_account.tpl'
|
||||
)
|
||||
);
|
||||
$var = Array(
|
||||
'form_action' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.boaccounts.delete_user'),
|
||||
'form_action' => $GLOBALS['egw']->link('/index.php','menuaction=admin.boaccounts.delete_user'),
|
||||
'account_id' => $_GET['account_id']
|
||||
);
|
||||
|
||||
@ -579,12 +579,12 @@
|
||||
$account_id = rawurlencode($_GET['account_id']);
|
||||
|
||||
// Find out who the new owner is of the deleted users records...
|
||||
$users = $GLOBALS['phpgw']->accounts->get_list('accounts');
|
||||
$users = $GLOBALS['egw']->accounts->get_list('accounts');
|
||||
$c_users = count($users);
|
||||
$str = '';
|
||||
for($i=0;$i<$c_users;$i++)
|
||||
{
|
||||
$str .= '<option value='.$users[$i]['account_id'].'>'.$GLOBALS['phpgw']->common->display_fullname($users[$i]['account_lid'],$users[$i]['account_firstname'],$users[$i]['account_lastname']).'</option>'."\n";
|
||||
$str .= '<option value='.$users[$i]['account_id'].'>'.$GLOBALS['egw']->common->display_fullname($users[$i]['account_lid'],$users[$i]['account_firstname'],$users[$i]['account_lastname']).'</option>'."\n";
|
||||
}
|
||||
$var['lang_new_owner'] = lang('Who would you like to transfer ALL records owned by the deleted user to?');
|
||||
$var['new_owner_select'] = '<select name="new_owner" size="5">'."\n".'<option value=0 selected>'.lang('Delete All Records').'</option>'."\n".$str.'</select>'."\n";
|
||||
@ -600,7 +600,7 @@
|
||||
function edit_group_hook() // (regis) why only for users, it works with groups as well so I add it
|
||||
{
|
||||
if ($_GET['account_id'] && // can't set it on add
|
||||
!$GLOBALS['phpgw']->acl->check('account_access',64,'admin')) // no rights to set ACL-rights
|
||||
!$GLOBALS['egw']->acl->check('account_access',64,'admin')) // no rights to set ACL-rights
|
||||
{
|
||||
$GLOBALS['menuData'][] = array(
|
||||
'description' => 'ACL Rights',
|
||||
@ -614,7 +614,7 @@
|
||||
|
||||
function edit_group($cd='',$account_id='')
|
||||
{
|
||||
if ($GLOBALS['phpgw']->acl->check('group_access',16,'admin'))
|
||||
if ($GLOBALS['egw']->acl->check('group_access',16,'admin'))
|
||||
{
|
||||
$this->list_groups();
|
||||
return False;
|
||||
@ -638,7 +638,7 @@
|
||||
{
|
||||
$group_info = Array(
|
||||
'account_id' => (int)$_GET['account_id'],
|
||||
'account_name' => $GLOBALS['phpgw']->accounts->id2name($_GET['account_id']),
|
||||
'account_name' => $GLOBALS['egw']->accounts->id2name($_GET['account_id']),
|
||||
'account_user' => $this->bo->load_group_users($_GET['account_id']),
|
||||
'account_apps' => $this->bo->load_group_apps($_GET['account_id'])
|
||||
);
|
||||
@ -649,7 +649,7 @@
|
||||
|
||||
function edit_view_user_hook()
|
||||
{
|
||||
if (!$GLOBALS['phpgw']->acl->check('current_sessions_access',1,'admin')) // no rights to view
|
||||
if (!$GLOBALS['egw']->acl->check('current_sessions_access',1,'admin')) // no rights to view
|
||||
{
|
||||
$GLOBALS['menuData'][] = array(
|
||||
'description' => 'Login History',
|
||||
@ -659,7 +659,7 @@
|
||||
}
|
||||
// not sure if this realy belongs here, or only in edit_user
|
||||
if ($_GET['account_id'] && // can't set it on add
|
||||
!$GLOBALS['phpgw']->acl->check('account_access',64,'admin')) // no rights to set ACL-rights
|
||||
!$GLOBALS['egw']->acl->check('account_access',64,'admin')) // no rights to set ACL-rights
|
||||
{
|
||||
$GLOBALS['menuData'][] = array(
|
||||
'description' => 'ACL Rights',
|
||||
@ -672,7 +672,7 @@
|
||||
// added for different way of handling ldap entries inside account manager
|
||||
// we show this only, if accounts are stored in ldap
|
||||
|
||||
if ($GLOBALS['phpgw_info']['server']['account_repository'] == "ldap")
|
||||
if ($GLOBALS['egw_info']['server']['account_repository'] == "ldap")
|
||||
{
|
||||
$GLOBALS['menuData'][] = array(
|
||||
'description' => 'LDAP-MGR',
|
||||
@ -687,7 +687,7 @@
|
||||
|
||||
function edit_user($cd='',$account_id='')
|
||||
{
|
||||
if ($GLOBALS['phpgw']->acl->check('account_access',16,'admin'))
|
||||
if ($GLOBALS['egw']->acl->check('account_access',16,'admin'))
|
||||
{
|
||||
$this->list_users();
|
||||
return False;
|
||||
@ -716,21 +716,21 @@
|
||||
|
||||
function view_user()
|
||||
{
|
||||
if ($GLOBALS['phpgw']->acl->check('account_access',8,'admin') || ! $_GET['account_id'])
|
||||
if ($GLOBALS['egw']->acl->check('account_access',8,'admin') || ! $_GET['account_id'])
|
||||
{
|
||||
$this->list_users();
|
||||
return False;
|
||||
}
|
||||
unset($GLOBALS['phpgw_info']['flags']['noheader']);
|
||||
unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
|
||||
if(!@is_object($GLOBALS['phpgw']->js))
|
||||
unset($GLOBALS['egw_info']['flags']['noheader']);
|
||||
unset($GLOBALS['egw_info']['flags']['nonavbar']);
|
||||
if(!@is_object($GLOBALS['egw']->js))
|
||||
{
|
||||
$GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript');
|
||||
$GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript');
|
||||
}
|
||||
$GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
$GLOBALS['egw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['egw']->common->egw_header();
|
||||
|
||||
$t = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
|
||||
$t =& CreateObject('phpgwapi.Template',EGW_APP_TPL);
|
||||
$t->set_unknowns('remove');
|
||||
$t->set_file(
|
||||
Array(
|
||||
@ -742,8 +742,8 @@
|
||||
$t->set_block('account','link_row');
|
||||
|
||||
$var = Array(
|
||||
'tr_color1' => $GLOBALS['phpgw_info']['theme']['row_on'],
|
||||
'tr_color2' => $GLOBALS['phpgw_info']['theme']['row_off'],
|
||||
'tr_color1' => $GLOBALS['egw_info']['theme']['row_on'],
|
||||
'tr_color2' => $GLOBALS['egw_info']['theme']['row_off'],
|
||||
'lang_action' => lang('View user account'),
|
||||
'lang_loginid' => lang('LoginID'),
|
||||
'lang_account_active' => lang('Account active'),
|
||||
@ -759,14 +759,14 @@
|
||||
|
||||
$t->parse('password_fields','form_logininfo',True);
|
||||
|
||||
$account = CreateObject('phpgwapi.accounts',(int)$_GET['account_id'],'u');
|
||||
$account =& CreateObject('phpgwapi.accounts',(int)$_GET['account_id'],'u');
|
||||
$userData = $account->read_repository();
|
||||
|
||||
$var['account_lid'] = $userData['account_lid'];
|
||||
$var['account_firstname'] = $userData['firstname'];
|
||||
$var['account_lastname'] = $userData['lastname'];
|
||||
|
||||
$acl = CreateObject('phpgwapi.acl',(int)$_GET['account_id']);
|
||||
$acl =& CreateObject('phpgwapi.acl',(int)$_GET['account_id']);
|
||||
$var['anonymous'] = $acl->check('anonymous',1,'phpgwapi') ? ' X' : ' ';
|
||||
$var['changepassword'] = $acl->check('changepassword',0xFFFF,'preferences') ? ' X' : ' ';
|
||||
unset($acl);
|
||||
@ -783,7 +783,7 @@
|
||||
// Last login time
|
||||
if ($userData['lastlogin'])
|
||||
{
|
||||
$var['account_lastlogin'] = $GLOBALS['phpgw']->common->show_date($userData['lastlogin']);
|
||||
$var['account_lastlogin'] = $GLOBALS['egw']->common->show_date($userData['lastlogin']);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -803,7 +803,7 @@
|
||||
// Account expires
|
||||
if ($userData['expires'] != -1)
|
||||
{
|
||||
$var['input_expires'] = $GLOBALS['phpgw']->common->show_date($userData['expires']);
|
||||
$var['input_expires'] = $GLOBALS['egw']->common->show_date($userData['expires']);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -832,7 +832,7 @@
|
||||
// create list of available app
|
||||
$i = 0;
|
||||
|
||||
$availableApps = $GLOBALS['phpgw_info']['apps'];
|
||||
$availableApps = $GLOBALS['egw_info']['apps'];
|
||||
@asort($availableApps);
|
||||
@reset($availableApps);
|
||||
foreach($availableApps as $app => $data)
|
||||
@ -846,7 +846,7 @@
|
||||
}
|
||||
|
||||
// create apps output
|
||||
$apps = CreateObject('phpgwapi.applications',(int)$_GET['account_id']);
|
||||
$apps =& CreateObject('phpgwapi.applications',(int)$_GET['account_id']);
|
||||
$db_perms = $apps->read_account_specific();
|
||||
|
||||
@reset($db_perms);
|
||||
@ -869,13 +869,13 @@
|
||||
$part2 = '<td colspan="2"> </td>';
|
||||
}
|
||||
|
||||
$appRightsOutput .= sprintf("<tr bgcolor=\"%s\">$part1$part2</tr>\n",$GLOBALS['phpgw_info']['theme']['row_on']);
|
||||
$appRightsOutput .= sprintf("<tr bgcolor=\"%s\">$part1$part2</tr>\n",$GLOBALS['egw_info']['theme']['row_on']);
|
||||
}
|
||||
|
||||
$var['permissions_list'] = $appRightsOutput;
|
||||
|
||||
// create the menu on the left, if needed
|
||||
// $menuClass = CreateObject('admin.uimenuclass');
|
||||
// $menuClass =& CreateObject('admin.uimenuclass');
|
||||
// This is now using ExecMethod()
|
||||
$var['rows'] = ExecMethod('admin.uimenuclass.createHTMLCode','view_user');
|
||||
$t->set_var($var);
|
||||
@ -884,7 +884,7 @@
|
||||
|
||||
function group_manager($cd='',$account_id='')
|
||||
{
|
||||
if ($GLOBALS['phpgw']->acl->check('group_access',16,'admin'))
|
||||
if ($GLOBALS['egw']->acl->check('group_access',16,'admin'))
|
||||
{
|
||||
$this->list_groups();
|
||||
return False;
|
||||
@ -908,8 +908,8 @@
|
||||
{
|
||||
$group_info = Array(
|
||||
'account_id' => (int)$_GET['account_id'],
|
||||
'account_name' => $GLOBALS['phpgw']->accounts->id2name($_GET['account_id']),
|
||||
'account_user' => $GLOBALS['phpgw']->accounts->member($_GET['account_id']),
|
||||
'account_name' => $GLOBALS['egw']->accounts->id2name($_GET['account_id']),
|
||||
'account_user' => $GLOBALS['egw']->accounts->member($_GET['account_id']),
|
||||
'account_managers' => $this->bo->load_group_managers($_GET['account_id'])
|
||||
);
|
||||
|
||||
@ -919,37 +919,37 @@
|
||||
|
||||
function create_edit_group($group_info,$_errors='')
|
||||
{
|
||||
$sbox = createobject('phpgwapi.sbox');
|
||||
$sbox =& CreateObject('phpgwapi.sbox');
|
||||
|
||||
unset($GLOBALS['phpgw_info']['flags']['noheader']);
|
||||
unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
|
||||
if(!@is_object($GLOBALS['phpgw']->js))
|
||||
unset($GLOBALS['egw_info']['flags']['noheader']);
|
||||
unset($GLOBALS['egw_info']['flags']['nonavbar']);
|
||||
if(!@is_object($GLOBALS['egw']->js))
|
||||
{
|
||||
$GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript');
|
||||
$GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript');
|
||||
}
|
||||
$GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
$GLOBALS['egw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['egw']->common->egw_header();
|
||||
|
||||
$p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
|
||||
$p =& CreateObject('phpgwapi.Template',EGW_APP_TPL);
|
||||
$p->set_file(Array('edit' => 'group_form.tpl'));
|
||||
$p->set_block('edit','select');
|
||||
$p->set_block('edit','popwin');
|
||||
//fix from Maanus 280105
|
||||
$accounts = CreateObject('phpgwapi.accounts',$group_info['account_id'],'g');
|
||||
$accounts =& CreateObject('phpgwapi.accounts',$group_info['account_id'],'g');
|
||||
|
||||
if (!is_object($GLOBALS['phpgw']->uiaccountsel))
|
||||
if (!is_object($GLOBALS['egw']->uiaccountsel))
|
||||
{
|
||||
$GLOBALS['phpgw']->uiaccountsel = CreateObject('phpgwapi.uiaccountsel');
|
||||
$GLOBALS['egw']->uiaccountsel =& CreateObject('phpgwapi.uiaccountsel');
|
||||
}
|
||||
$p->set_var('accounts',$GLOBALS['phpgw']->uiaccountsel->selection('account_user[]','admin_uiaccounts_user',$group_info['account_user'],'accounts',min(3+count($group_info['account_user']),10)));
|
||||
$p->set_var('accounts',$GLOBALS['egw']->uiaccountsel->selection('account_user[]','admin_uiaccounts_user',$group_info['account_user'],'accounts',min(3+count($group_info['account_user']),10)));
|
||||
|
||||
$var = Array(
|
||||
'form_action' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.boaccounts.'.($group_info['account_id']?'edit':'add').'_group'),
|
||||
'form_action' => $GLOBALS['egw']->link('/index.php','menuaction=admin.boaccounts.'.($group_info['account_id']?'edit':'add').'_group'),
|
||||
'hidden_vars' => '<input type="hidden" name="account_id" value="' . $group_info['account_id'] . '">',
|
||||
'lang_group_name' => lang('group name'),
|
||||
'group_name_value' => $group_info['account_name'],
|
||||
'lang_include_user' => lang('Select users for inclusion'),
|
||||
'error' => (!$_errors?'':'<center>'.$GLOBALS['phpgw']->common->error_list($_errors).'</center>'),
|
||||
'error' => (!$_errors?'':'<center>'.$GLOBALS['egw']->common->error_list($_errors).'</center>'),
|
||||
'lang_permissions' => lang('Permissions this group has')
|
||||
);
|
||||
$p->set_var($var);
|
||||
@ -957,7 +957,7 @@
|
||||
$group_repository = $accounts->read_repository();
|
||||
if (!$group_repository['file_space'])
|
||||
{
|
||||
$group_repository['file_space'] = $GLOBALS['phpgw_info']['server']['vfs_default_account_size_number'] . "-" . $GLOBALS['phpgw_info']['server']['vfs_default_account_size_type'];
|
||||
$group_repository['file_space'] = $GLOBALS['egw_info']['server']['vfs_default_account_size_number'] . "-" . $GLOBALS['egw_info']['server']['vfs_default_account_size_type'];
|
||||
}
|
||||
/*
|
||||
$file_space_array = explode ('-', $group_repository['file_space']);
|
||||
@ -971,8 +971,8 @@
|
||||
$p->set_var ('account_file_space_select','<select name="account_file_space_type">'."\n".$account_file_space_select.'</select>'."\n");
|
||||
*/
|
||||
|
||||
reset($GLOBALS['phpgw_info']['apps']);
|
||||
$sorted_apps = $GLOBALS['phpgw_info']['apps'];
|
||||
reset($GLOBALS['egw_info']['apps']);
|
||||
$sorted_apps = $GLOBALS['egw_info']['apps'];
|
||||
@asort($sorted_apps);
|
||||
@reset($sorted_apps);
|
||||
while ($permission = each($sorted_apps))
|
||||
@ -990,7 +990,7 @@
|
||||
$perm_html = '<tr class="th">'.
|
||||
$perm_html.$perm_html."</tr>\n";
|
||||
|
||||
$tr_color = $GLOBALS['phpgw_info']['theme']['row_off'];
|
||||
$tr_color = $GLOBALS['egw_info']['theme']['row_off'];
|
||||
for ($i=0;$i < count($perm_display);$i++)
|
||||
{
|
||||
$app = $perm_display[$i][0];
|
||||
@ -1002,8 +1002,8 @@
|
||||
$perm_html .= '<td>' . $perm_display[$i][1] . '</td>'
|
||||
. '<td><input type="checkbox" name="account_apps['
|
||||
. $perm_display[$i][0] . ']" value="True"'.($group_info['account_apps'][$app]?' checked':'').'> '
|
||||
. ($this->apps_with_acl[$app] && $group_info['account_id']?'<a href="'.$GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app='.$app.'&owner='.$group_info['account_id'])
|
||||
. '"><img src="'.$GLOBALS['phpgw']->common->image('phpgwapi','edit').'" border="0" hspace="3" align="absmiddle" title="'
|
||||
. ($this->apps_with_acl[$app] && $group_info['account_id']?'<a href="'.$GLOBALS['egw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app='.$app.'&owner='.$group_info['account_id'])
|
||||
. '"><img src="'.$GLOBALS['egw']->common->image('phpgwapi','edit').'" border="0" hspace="3" align="absmiddle" title="'
|
||||
. lang('Grant Access').': '.lang("edit group ACL's").'"></a>':' ').'</td>'.($i & 1?'</tr>':'')."\n";
|
||||
}
|
||||
if($i & 1)
|
||||
@ -1028,23 +1028,23 @@
|
||||
|
||||
function create_edit_user($_account_id,$_userData='',$_errors='')
|
||||
{
|
||||
$sbox = createobject('phpgwapi.sbox');
|
||||
$jscal = CreateObject('phpgwapi.jscalendar');
|
||||
$sbox =& CreateObject('phpgwapi.sbox');
|
||||
$jscal =& CreateObject('phpgwapi.jscalendar');
|
||||
|
||||
unset($GLOBALS['phpgw_info']['flags']['noheader']);
|
||||
unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
|
||||
if(!@is_object($GLOBALS['phpgw']->js))
|
||||
unset($GLOBALS['egw_info']['flags']['noheader']);
|
||||
unset($GLOBALS['egw_info']['flags']['nonavbar']);
|
||||
if(!@is_object($GLOBALS['egw']->js))
|
||||
{
|
||||
$GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript');
|
||||
$GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript');
|
||||
}
|
||||
$GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['egw']->js->validate_file('jscode','openwindow','admin');
|
||||
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
$GLOBALS['egw']->common->egw_header();
|
||||
|
||||
$t = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
|
||||
$t =& CreateObject('phpgwapi.Template',EGW_APP_TPL);
|
||||
$t->set_unknowns('remove');
|
||||
|
||||
if ($GLOBALS['phpgw_info']['server']['ldap_extra_attributes'] && ($GLOBALS['phpgw_info']['server']['account_repository'] == 'ldap'))
|
||||
if ($GLOBALS['egw_info']['server']['ldap_extra_attributes'] && ($GLOBALS['egw_info']['server']['account_repository'] == 'ldap'))
|
||||
{
|
||||
$t->set_file(array('account' => 'account_form_ldap.tpl'));
|
||||
}
|
||||
@ -1057,8 +1057,8 @@
|
||||
$t->set_block('account','form_buttons_','form_buttons_');
|
||||
$t->set_block('account','link_row','link_row');
|
||||
|
||||
$theme = $GLOBALS['phpgw_info']['user']['preferences']['common']['theme'];
|
||||
$t->set_var('icon_create_edit', '<img src="'. $GLOBALS['phpgw_info']['server']['webserver_url'] .'/admin/templates/'.$theme.'/images/useradm.gif">');
|
||||
$theme = $GLOBALS['egw_info']['user']['preferences']['common']['theme'];
|
||||
$t->set_var('icon_create_edit', '<img src="'. $GLOBALS['egw_info']['server']['webserver_url'] .'/admin/templates/'.$theme.'/images/useradm.gif">');
|
||||
|
||||
print_debug('Type : '.gettype($_userData).'<br>_userData(size) = "'.$_userData.'"('.strlen($_userData).')');
|
||||
if (is_array($_userData))
|
||||
@ -1073,17 +1073,17 @@
|
||||
$userGroups[$key]['account_id'] = $value;
|
||||
}
|
||||
|
||||
$account = CreateObject('phpgwapi.accounts');
|
||||
$account =& CreateObject('phpgwapi.accounts');
|
||||
$allGroups = $account->get_list('groups');
|
||||
}
|
||||
elseif(is_string($_userData) && $_userData=='')
|
||||
{
|
||||
if($_account_id)
|
||||
{
|
||||
$account = CreateObject('phpgwapi.accounts',(int)$_account_id,'u');
|
||||
$account =& CreateObject('phpgwapi.accounts',(int)$_account_id,'u');
|
||||
$userData = $account->read_repository();
|
||||
$userGroups = $account->membership($_account_id);
|
||||
$acl = CreateObject('phpgwapi.acl',$_account_id);
|
||||
$acl =& CreateObject('phpgwapi.acl',$_account_id);
|
||||
$acl->read_repository();
|
||||
$userData['anonymous'] = $acl->check('anonymous',1,'phpgwapi');
|
||||
$userData['changepassword'] = $acl->check('changepassword',0xFFFF,'preferences');
|
||||
@ -1091,7 +1091,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
$account = CreateObject('phpgwapi.accounts');
|
||||
$account =& CreateObject('phpgwapi.accounts');
|
||||
$userData = Array();
|
||||
$userData['status'] = 'A';
|
||||
$userGroups = Array();
|
||||
@ -1108,11 +1108,11 @@
|
||||
}
|
||||
|
||||
$var = Array(
|
||||
'form_action' => $GLOBALS['phpgw']->link('/index.php',$page_params),
|
||||
'error_messages' => (!$_errors?'':'<center>'.$GLOBALS['phpgw']->common->error_list($_errors).'</center>'),
|
||||
'th_bg' => $GLOBALS['phpgw_info']['theme']['th_bg'],
|
||||
'tr_color1' => $GLOBALS['phpgw_info']['theme']['row_on'],
|
||||
'tr_color2' => $GLOBALS['phpgw_info']['theme']['row_off'],
|
||||
'form_action' => $GLOBALS['egw']->link('/index.php',$page_params),
|
||||
'error_messages' => (!$_errors?'':'<center>'.$GLOBALS['egw']->common->error_list($_errors).'</center>'),
|
||||
'th_bg' => $GLOBALS['egw_info']['theme']['th_bg'],
|
||||
'tr_color1' => $GLOBALS['egw_info']['theme']['row_on'],
|
||||
'tr_color2' => $GLOBALS['egw_info']['theme']['row_off'],
|
||||
'lang_action' => ($_account_id?lang('Edit user account'):lang('Add new account')),
|
||||
'lang_loginid' => lang('LoginID'),
|
||||
'lang_account_active' => lang('Account active'),
|
||||
@ -1132,12 +1132,12 @@
|
||||
$t->set_var($var);
|
||||
$t->parse('form_buttons','form_buttons_',True);
|
||||
|
||||
if ($GLOBALS['phpgw_info']['server']['ldap_extra_attributes']) {
|
||||
if ($GLOBALS['egw_info']['server']['ldap_extra_attributes']) {
|
||||
$lang_homedir = lang('home directory');
|
||||
$lang_shell = lang('login shell');
|
||||
$homedirectory = '<input name="homedirectory" value="'. ($_account_id?$userData['homedirectory']:$GLOBALS['phpgw_info']['server']['ldap_account_home'].$account_lid).'">';
|
||||
$homedirectory = '<input name="homedirectory" value="'. ($_account_id?$userData['homedirectory']:$GLOBALS['egw_info']['server']['ldap_account_home'].$account_lid).'">';
|
||||
$loginshell = '<input name="loginshell" value="'
|
||||
. ($_account_id?$userData['loginshell']:$GLOBALS['phpgw_info']['server']['ldap_account_shell'])
|
||||
. ($_account_id?$userData['loginshell']:$GLOBALS['egw_info']['server']['ldap_account_shell'])
|
||||
. '">';
|
||||
}
|
||||
else
|
||||
@ -1151,7 +1151,7 @@
|
||||
/*
|
||||
if (!$userData['file_space'])
|
||||
{
|
||||
$userData['file_space'] = $GLOBALS['phpgw_info']['server']['vfs_default_account_size_number'] . "-" . $GLOBALS['phpgw_info']['server']['vfs_default_account_size_type'];
|
||||
$userData['file_space'] = $GLOBALS['egw_info']['server']['vfs_default_account_size_number'] . "-" . $GLOBALS['egw_info']['server']['vfs_default_account_size_type'];
|
||||
}
|
||||
$file_space_array = explode ('-', $userData['file_space']);
|
||||
$account_file_space_number = $file_space_array[0];
|
||||
@ -1175,9 +1175,9 @@
|
||||
$t->set_var($var);
|
||||
*/
|
||||
$accountPrefix = '';
|
||||
if(isset($GLOBALS['phpgw_info']['server']['account_prefix']))
|
||||
if(isset($GLOBALS['egw_info']['server']['account_prefix']))
|
||||
{
|
||||
$accountPrefix = $GLOBALS['phpgw_info']['server']['account_prefix'];
|
||||
$accountPrefix = $GLOBALS['egw_info']['server']['account_prefix'];
|
||||
if (preg_match ("/^$accountPrefix(.*)/i", $userData['account_lid'], $matches))
|
||||
{
|
||||
$userData['account_lid'] = $matches[1];
|
||||
@ -1253,10 +1253,10 @@
|
||||
}
|
||||
|
||||
/* create list of available apps */
|
||||
$apps = CreateObject('phpgwapi.applications',$_account_id);
|
||||
$apps =& CreateObject('phpgwapi.applications',$_account_id);
|
||||
$db_perms = $apps->read_account_specific();
|
||||
|
||||
$availableApps = $GLOBALS['phpgw_info']['apps'];
|
||||
$availableApps = $GLOBALS['egw_info']['apps'];
|
||||
uasort($availableApps,create_function('$a,$b','return strcasecmp($a["title"],$b["title"]);'));
|
||||
|
||||
$appRightsOutput = '';
|
||||
@ -1270,8 +1270,8 @@
|
||||
$checked = (@$userData['account_permissions'][$app] || @$db_perms[$app]) && $_account_id ? ' checked="1"' : '';
|
||||
$part[$i&1] = sprintf('<td>%s</td><td><input type="checkbox" name="account_permissions[%s]" value="True"%s>',
|
||||
$data['title'],$app,$checked).
|
||||
($this->apps_with_acl[$app] && $_account_id?'<a href="'.$GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app='.$app.'&owner='.$_account_id)
|
||||
. '"><img src="'.$GLOBALS['phpgw']->common->image('phpgwapi','edit').'" border="0" hspace="3" align="absmiddle" title="'
|
||||
($this->apps_with_acl[$app] && $_account_id?'<a href="'.$GLOBALS['egw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app='.$app.'&owner='.$_account_id)
|
||||
. '"><img src="'.$GLOBALS['egw']->common->image('phpgwapi','edit').'" border="0" hspace="3" align="absmiddle" title="'
|
||||
. lang('Grant Access').'"></a>':' ').'</td>';
|
||||
|
||||
if ($i & 1)
|
||||
@ -1295,7 +1295,7 @@
|
||||
name="account_primary_group">'."\n".$primary_group_select.'</
|
||||
select>'."\n",
|
||||
'permissions_list'
|
||||
=> $appRightsOutput,
|
||||
=> $appRightsOutput,
|
||||
'lang_app' => lang('application'),
|
||||
'lang_acl' => lang('enabled').' / '.lang('ACL'),
|
||||
);
|
||||
@ -1316,7 +1316,7 @@
|
||||
$t->set_var($var);
|
||||
|
||||
// create the menu on the left, if needed
|
||||
// $menuClass = CreateObject('admin.uimenuclass');
|
||||
// $menuClass =& CreateObject('admin.uimenuclass');
|
||||
// This is now using ExecMethod()
|
||||
$GLOBALS['account_id'] = $_account_id;
|
||||
$t->set_var('rows',ExecMethod('admin.uimenuclass.createHTMLCode','edit_user'));
|
||||
@ -1326,33 +1326,33 @@
|
||||
|
||||
function edit_group_managers($group_info,$_errors='')
|
||||
{
|
||||
if ($GLOBALS['phpgw']->acl->check('group_access',16,'admin'))
|
||||
if ($GLOBALS['egw']->acl->check('group_access',16,'admin'))
|
||||
{
|
||||
$this->list_groups();
|
||||
return False;
|
||||
}
|
||||
|
||||
$accounts = CreateObject('phpgwapi.accounts',$group_info['account_id'],'u');
|
||||
$accounts =& CreateObject('phpgwapi.accounts',$group_info['account_id'],'u');
|
||||
$account_list = $accounts->member($group_info['account_id']);
|
||||
$user_list = '';
|
||||
while (list($key,$entry) = each($account_list))
|
||||
{
|
||||
$user_list .= '<option value="' . $entry['account_id'] . '"'
|
||||
. $group_info['account_managers'][(int)$entry['account_id']] . '>'
|
||||
. $GLOBALS['phpgw']->common->grab_owner_name($entry['account_id'])
|
||||
. $GLOBALS['egw']->common->grab_owner_name($entry['account_id'])
|
||||
. '</option>'."\n";
|
||||
}
|
||||
|
||||
unset($GLOBALS['phpgw_info']['flags']['noheader']);
|
||||
unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
|
||||
if(!@is_object($GLOBALS['phpgw']->js))
|
||||
unset($GLOBALS['egw_info']['flags']['noheader']);
|
||||
unset($GLOBALS['egw_info']['flags']['nonavbar']);
|
||||
if(!@is_object($GLOBALS['egw']->js))
|
||||
{
|
||||
$GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript');
|
||||
$GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript');
|
||||
}
|
||||
$GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
$GLOBALS['egw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['egw']->common->egw_header();
|
||||
|
||||
$t = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
|
||||
$t =& CreateObject('phpgwapi.Template',EGW_APP_TPL);
|
||||
$t->set_unknowns('remove');
|
||||
|
||||
$t->set_file(
|
||||
@ -1364,11 +1364,11 @@
|
||||
$t->set_block('manager','form','form');
|
||||
$t->set_block('manager','link_row','link_row');
|
||||
|
||||
$var['th_bg'] = $GLOBALS['phpgw_info']['user']['theme']['th_bg'];
|
||||
$var['th_bg'] = $GLOBALS['egw_info']['user']['theme']['th_bg'];
|
||||
$var['lang_group'] = lang('Group');
|
||||
$var['group_name'] = $group_info['account_name'];
|
||||
$var['tr_color1'] = $GLOBALS['phpgw_info']['user']['theme']['row_on'];
|
||||
$var['form_action'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.boaccounts.set_group_managers');
|
||||
$var['tr_color1'] = $GLOBALS['egw_info']['user']['theme']['row_on'];
|
||||
$var['form_action'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.boaccounts.set_group_managers');
|
||||
$var['hidden'] = '<input type="hidden" name="account_id" value="'.$group_info['account_id'].'">';
|
||||
$var['lang_select_managers'] = lang('Select Group Managers');
|
||||
$var['group_members'] = '<select name="managers[]" size="'.(count($account_list)<5?count($account_list):5).'" multiple>'.$user_list.'</select>';
|
||||
|
@ -24,18 +24,18 @@
|
||||
function uiaclmanager()
|
||||
{
|
||||
$this->account_id = (int)$_GET['account_id'];
|
||||
if (!$this->account_id || $GLOBALS['phpgw']->acl->check('account_access',64,'admin'))
|
||||
if (!$this->account_id || $GLOBALS['egw']->acl->check('account_access',64,'admin'))
|
||||
{
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php');
|
||||
$GLOBALS['egw']->redirect_link('/index.php');
|
||||
}
|
||||
$this->template = createobject('phpgwapi.Template',PHPGW_APP_TPL);
|
||||
$this->template =& CreateObject('phpgwapi.Template',EGW_APP_TPL);
|
||||
}
|
||||
|
||||
function common_header()
|
||||
{
|
||||
$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin') . ' - ' . lang('ACL Manager') .
|
||||
': ' . $GLOBALS['phpgw']->common->grab_owner_name($this->account_id);
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('Admin') . ' - ' . lang('ACL Manager') .
|
||||
': ' . $GLOBALS['egw']->common->grab_owner_name($this->account_id);
|
||||
$GLOBALS['egw']->common->egw_header();
|
||||
echo parse_navbar();
|
||||
}
|
||||
|
||||
@ -43,7 +43,7 @@
|
||||
{
|
||||
$this->common_header();
|
||||
|
||||
$GLOBALS['phpgw']->hooks->process('acl_manager',array('preferences'));
|
||||
$GLOBALS['egw']->hooks->process('acl_manager',array('preferences'));
|
||||
|
||||
$this->template->set_file(array(
|
||||
'app_list' => 'acl_applist.tpl'
|
||||
@ -58,10 +58,10 @@
|
||||
{
|
||||
foreach($GLOBALS['acl_manager'] as $app => $locations)
|
||||
{
|
||||
$icon = $GLOBALS['phpgw']->common->image($app,array('navbar.png',$app.'png','navbar.gif',$app.'.gif'));
|
||||
$this->template->set_var('icon_backcolor',$GLOBALS['phpgw_info']['theme']['row_off']);
|
||||
$this->template->set_var('link_backcolor',$GLOBALS['phpgw_info']['theme']['row_off']);
|
||||
$this->template->set_var('app_name',$GLOBALS['phpgw_info']['apps'][$app]['title']);
|
||||
$icon = $GLOBALS['egw']->common->image($app,array('navbar.png',$app.'png','navbar.gif',$app.'.gif'));
|
||||
$this->template->set_var('icon_backcolor',$GLOBALS['egw_info']['theme']['row_off']);
|
||||
$this->template->set_var('link_backcolor',$GLOBALS['egw_info']['theme']['row_off']);
|
||||
$this->template->set_var('app_name',$GLOBALS['egw_info']['apps'][$app]['title']);
|
||||
$this->template->set_var('a_name',$appname);
|
||||
$this->template->set_var('app_icon',$icon);
|
||||
|
||||
@ -85,7 +85,7 @@
|
||||
'account_id' => $this->account_id
|
||||
);
|
||||
|
||||
$this->template->set_var('link_location',$GLOBALS['phpgw']->link('/index.php',$link_values));
|
||||
$this->template->set_var('link_location',$GLOBALS['egw']->link('/index.php',$link_values));
|
||||
$this->template->set_var('lang_location',lang($value['name']));
|
||||
$this->template->fp('rows','link_row',True);
|
||||
}
|
||||
@ -95,7 +95,7 @@
|
||||
}
|
||||
}
|
||||
$this->template->set_var(array(
|
||||
'cancel_action' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.list_users'),
|
||||
'cancel_action' => $GLOBALS['egw']->link('/index.php','menuaction=admin.uiaccounts.list_users'),
|
||||
'lang_cancel' => lang('Cancel')
|
||||
));
|
||||
$this->template->pfp('out','list');
|
||||
@ -119,27 +119,27 @@
|
||||
}
|
||||
if ($total_rights)
|
||||
{
|
||||
$GLOBALS['phpgw']->acl->add_repository($_GET['acl_app'], $location, $this->account_id, $total_rights);
|
||||
$GLOBALS['egw']->acl->add_repository($_GET['acl_app'], $location, $this->account_id, $total_rights);
|
||||
}
|
||||
else // we dont need to save 0 rights (= no restrictions)
|
||||
{
|
||||
$GLOBALS['phpgw']->acl->delete_repository($_GET['acl_app'], $location, $this->account_id);
|
||||
$GLOBALS['egw']->acl->delete_repository($_GET['acl_app'], $location, $this->account_id);
|
||||
}
|
||||
}
|
||||
$this->list_apps();
|
||||
return;
|
||||
}
|
||||
$GLOBALS['phpgw']->hooks->single('acl_manager',$_GET['acl_app']);
|
||||
$GLOBALS['egw']->hooks->single('acl_manager',$_GET['acl_app']);
|
||||
$acl_manager = $GLOBALS['acl_manager'][$_GET['acl_app']][$location];
|
||||
|
||||
$this->common_header();
|
||||
$this->template->set_file('form','acl_manager_form.tpl');
|
||||
|
||||
$acc = createobject('phpgwapi.accounts',$this->account_id);
|
||||
$acc =& CreateObject('phpgwapi.accounts',$this->account_id);
|
||||
$acc->read_repository();
|
||||
$afn = $GLOBALS['phpgw']->common->display_fullname($acc->data['account_lid'],$acc->data['firstname'],$acc->data['lastname']);
|
||||
$afn = $GLOBALS['egw']->common->display_fullname($acc->data['account_lid'],$acc->data['firstname'],$acc->data['lastname']);
|
||||
|
||||
$this->template->set_var('lang_message',lang('Check items to <b>%1</b> to %2 for %3',lang($acl_manager['name']),$GLOBALS['phpgw_info']['apps'][$_GET['acl_app']]['title'],$afn));
|
||||
$this->template->set_var('lang_message',lang('Check items to <b>%1</b> to %2 for %3',lang($acl_manager['name']),$GLOBALS['egw_info']['apps'][$_GET['acl_app']]['title'],$afn));
|
||||
$link_values = array(
|
||||
'menuaction' => 'admin.uiaclmanager.access_form',
|
||||
'acl_app' => $_GET['acl_app'],
|
||||
@ -147,11 +147,11 @@
|
||||
'account_id' => $this->account_id
|
||||
);
|
||||
|
||||
$acl = createobject('phpgwapi.acl',$this->account_id);
|
||||
$acl =& CreateObject('phpgwapi.acl',$this->account_id);
|
||||
$acl->read_repository();
|
||||
$grants = $acl->get_rights($location,$_GET['acl_app']);
|
||||
|
||||
$this->template->set_var('form_action',$GLOBALS['phpgw']->link('/index.php',$link_values));
|
||||
$this->template->set_var('form_action',$GLOBALS['egw']->link('/index.php',$link_values));
|
||||
|
||||
$total = 0;
|
||||
foreach($acl_manager['rights'] as $name => $value)
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* eGroupWare - administration *
|
||||
* http://www.egroupware.org *
|
||||
* -------------------------------------------- *
|
||||
* 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 *
|
||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
/**************************************************************************\
|
||||
* eGroupWare - administration *
|
||||
* http://www.egroupware.org *
|
||||
* -------------------------------------------- *
|
||||
* 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 *
|
||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
/* $Id$ */
|
||||
|
||||
class uiapplications
|
||||
{
|
||||
@ -26,38 +26,38 @@
|
||||
|
||||
function uiapplications()
|
||||
{
|
||||
$this->bo = CreateObject('admin.boapplications');
|
||||
$this->nextmatchs = CreateObject('phpgwapi.nextmatchs');
|
||||
$this->bo =& CreateObject('admin.boapplications');
|
||||
$this->nextmatchs =& CreateObject('phpgwapi.nextmatchs');
|
||||
}
|
||||
|
||||
function get_list()
|
||||
{
|
||||
if ($GLOBALS['phpgw']->acl->check('applications_access',1,'admin'))
|
||||
if ($GLOBALS['egw']->acl->check('applications_access',1,'admin'))
|
||||
{
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php');
|
||||
$GLOBALS['egw']->redirect_link('/index.php');
|
||||
}
|
||||
$can_add = !$GLOBALS['phpgw']->acl->check('applications_access',2,'admin');
|
||||
$can_edit = !$GLOBALS['phpgw']->acl->check('applications_access',4,'admin');
|
||||
$can_delete = !$GLOBALS['phpgw']->acl->check('applications_access',8,'admin');
|
||||
$can_add = !$GLOBALS['egw']->acl->check('applications_access',2,'admin');
|
||||
$can_edit = !$GLOBALS['egw']->acl->check('applications_access',4,'admin');
|
||||
$can_delete = !$GLOBALS['egw']->acl->check('applications_access',8,'admin');
|
||||
|
||||
$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin').' - '.lang('Installed applications');
|
||||
if(!@is_object($GLOBALS['phpgw']->js))
|
||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('Admin').' - '.lang('Installed applications');
|
||||
if(!@is_object($GLOBALS['egw']->js))
|
||||
{
|
||||
$GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript');
|
||||
$GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript');
|
||||
}
|
||||
$GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
$GLOBALS['egw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['egw']->common->egw_header();
|
||||
echo parse_navbar();
|
||||
|
||||
$GLOBALS['phpgw']->template->set_file(array('applications' => 'applications.tpl'));
|
||||
$GLOBALS['phpgw']->template->set_block('applications','list','list');
|
||||
$GLOBALS['phpgw']->template->set_block('applications','row','row');
|
||||
$GLOBALS['phpgw']->template->set_block('applications','add','add');
|
||||
$GLOBALS['egw']->template->set_file(array('applications' => 'applications.tpl'));
|
||||
$GLOBALS['egw']->template->set_block('applications','list','list');
|
||||
$GLOBALS['egw']->template->set_block('applications','row','row');
|
||||
$GLOBALS['egw']->template->set_block('applications','add','add');
|
||||
|
||||
$start = get_var('start',array('POST','GET'));
|
||||
$sort = $_GET['sort'];
|
||||
$order = $_GET['order'];
|
||||
$offset = $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
|
||||
$offset = $GLOBALS['egw_info']['user']['preferences']['common']['maxmatchs'];
|
||||
|
||||
$apps = $this->bo->get_list();
|
||||
$total = count($apps);
|
||||
@ -100,31 +100,31 @@
|
||||
$i++;
|
||||
}
|
||||
|
||||
$GLOBALS['phpgw']->template->set_var('bg_color',$GLOBALS['phpgw_info']['theme']['bg_color']);
|
||||
$GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
|
||||
$GLOBALS['egw']->template->set_var('bg_color',$GLOBALS['egw_info']['theme']['bg_color']);
|
||||
$GLOBALS['egw']->template->set_var('th_bg',$GLOBALS['egw_info']['theme']['th_bg']);
|
||||
|
||||
$GLOBALS['phpgw']->template->set_var('sort_title',$this->nextmatchs->show_sort_order($sort,'title','title','/index.php',lang('Title'),'&menuaction=admin.uiapplications.get_list'));
|
||||
$GLOBALS['phpgw']->template->set_var('lang_showing',$this->nextmatchs->show_hits($total,$start));
|
||||
$GLOBALS['phpgw']->template->set_var('left',$this->nextmatchs->left('/index.php',$start,$total,'menuaction=admin.uiapplications.get_list'));
|
||||
$GLOBALS['phpgw']->template->set_var('right',$this->nextmatchs->right('index.php',$start,$total,'menuaction=admin.uiapplications.get_list'));
|
||||
$GLOBALS['egw']->template->set_var('sort_title',$this->nextmatchs->show_sort_order($sort,'title','title','/index.php',lang('Title'),'&menuaction=admin.uiapplications.get_list'));
|
||||
$GLOBALS['egw']->template->set_var('lang_showing',$this->nextmatchs->show_hits($total,$start));
|
||||
$GLOBALS['egw']->template->set_var('left',$this->nextmatchs->left('/index.php',$start,$total,'menuaction=admin.uiapplications.get_list'));
|
||||
$GLOBALS['egw']->template->set_var('right',$this->nextmatchs->right('index.php',$start,$total,'menuaction=admin.uiapplications.get_list'));
|
||||
|
||||
$GLOBALS['phpgw']->template->set_var('lang_edit',lang('Edit'));
|
||||
$GLOBALS['phpgw']->template->set_var('lang_delete',lang('Delete'));
|
||||
$GLOBALS['phpgw']->template->set_var('lang_enabled',lang('Enabled'));
|
||||
$GLOBALS['egw']->template->set_var('lang_edit',lang('Edit'));
|
||||
$GLOBALS['egw']->template->set_var('lang_delete',lang('Delete'));
|
||||
$GLOBALS['egw']->template->set_var('lang_enabled',lang('Enabled'));
|
||||
|
||||
$GLOBALS['phpgw']->template->set_var('new_action',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.add'));
|
||||
$GLOBALS['phpgw']->template->set_var('lang_note',lang('(To install new applications use<br><a href="setup/" target="setup">Setup</a> [Manage Applications] !!!)'));
|
||||
$GLOBALS['phpgw']->template->set_var('lang_add',lang('add'));
|
||||
$GLOBALS['egw']->template->set_var('new_action',$GLOBALS['egw']->link('/index.php','menuaction=admin.uiapplications.add'));
|
||||
$GLOBALS['egw']->template->set_var('lang_note',lang('(To install new applications use<br><a href="setup/" target="setup">Setup</a> [Manage Applications] !!!)'));
|
||||
$GLOBALS['egw']->template->set_var('lang_add',lang('add'));
|
||||
|
||||
foreach($applications as $app)
|
||||
{
|
||||
$tr_color = $this->nextmatchs->alternate_row_color($tr_color);
|
||||
|
||||
$GLOBALS['phpgw']->template->set_var('tr_color',$tr_color);
|
||||
$GLOBALS['phpgw']->template->set_var('name',$app['title']);
|
||||
$GLOBALS['egw']->template->set_var('tr_color',$tr_color);
|
||||
$GLOBALS['egw']->template->set_var('name',$app['title']);
|
||||
|
||||
$GLOBALS['phpgw']->template->set_var('edit',$can_edit ? '<a href="' . $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.edit&app_name=' . urlencode($app['name'])) . '&start='.$start.'"> ' . lang('Edit') . ' </a>' : ' ');
|
||||
$GLOBALS['phpgw']->template->set_var('delete',$can_delete ? '<a href="' . $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.delete&app_name=' . urlencode($app['name'])) . '&start='.$start.'"> ' . lang('Delete') . ' </a>' : ' ');
|
||||
$GLOBALS['egw']->template->set_var('edit',$can_edit ? '<a href="' . $GLOBALS['egw']->link('/index.php','menuaction=admin.uiapplications.edit&app_name=' . urlencode($app['name'])) . '&start='.$start.'"> ' . lang('Edit') . ' </a>' : ' ');
|
||||
$GLOBALS['egw']->template->set_var('delete',$can_delete ? '<a href="' . $GLOBALS['egw']->link('/index.php','menuaction=admin.uiapplications.delete&app_name=' . urlencode($app['name'])) . '&start='.$start.'"> ' . lang('Delete') . ' </a>' : ' ');
|
||||
|
||||
if ($app['status'])
|
||||
{
|
||||
@ -134,47 +134,47 @@
|
||||
{
|
||||
$status = '<b>' . lang('No') . '</b>';
|
||||
}
|
||||
$GLOBALS['phpgw']->template->set_var('status',$status);
|
||||
$GLOBALS['egw']->template->set_var('status',$status);
|
||||
|
||||
$GLOBALS['phpgw']->template->parse('rows','row',True);
|
||||
$GLOBALS['egw']->template->parse('rows','row',True);
|
||||
}
|
||||
if ($can_add)
|
||||
{
|
||||
$GLOBALS['phpgw']->template->parse('addbutton','add');
|
||||
$GLOBALS['egw']->template->parse('addbutton','add');
|
||||
}
|
||||
else
|
||||
{
|
||||
$GLOBALS['phpgw']->template->set_var('addbutton','');
|
||||
$GLOBALS['egw']->template->set_var('addbutton','');
|
||||
}
|
||||
|
||||
$GLOBALS['phpgw']->template->pparse('out','list');
|
||||
$GLOBALS['egw']->template->pparse('out','list');
|
||||
}
|
||||
|
||||
function display_row($label, $value)
|
||||
{
|
||||
$GLOBALS['phpgw']->template->set_var('tr_color',$this->nextmatchs->alternate_row_color());
|
||||
$GLOBALS['phpgw']->template->set_var('label',$label);
|
||||
$GLOBALS['phpgw']->template->set_var('value',$value);
|
||||
$GLOBALS['phpgw']->template->parse('rows','row',True);
|
||||
$GLOBALS['egw']->template->set_var('tr_color',$this->nextmatchs->alternate_row_color());
|
||||
$GLOBALS['egw']->template->set_var('label',$label);
|
||||
$GLOBALS['egw']->template->set_var('value',$value);
|
||||
$GLOBALS['egw']->template->parse('rows','row',True);
|
||||
}
|
||||
|
||||
function add()
|
||||
{
|
||||
if ($GLOBALS['phpgw']->acl->check('applications_access',2,'admin'))
|
||||
if ($GLOBALS['egw']->acl->check('applications_access',2,'admin'))
|
||||
{
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php');
|
||||
$GLOBALS['egw']->redirect_link('/index.php');
|
||||
}
|
||||
$start = get_var('start',array('POST','GET'));
|
||||
|
||||
$GLOBALS['phpgw']->template->set_file(array('application' => 'application_form.tpl'));
|
||||
$GLOBALS['phpgw']->template->set_block('application','form','form');
|
||||
$GLOBALS['phpgw']->template->set_block('application','row','row');
|
||||
$GLOBALS['phpgw']->template->set_block('form','delete_button');
|
||||
$GLOBALS['phpgw']->template->set_var('delete_button','');
|
||||
$GLOBALS['egw']->template->set_file(array('application' => 'application_form.tpl'));
|
||||
$GLOBALS['egw']->template->set_block('application','form','form');
|
||||
$GLOBALS['egw']->template->set_block('application','row','row');
|
||||
$GLOBALS['egw']->template->set_block('form','delete_button');
|
||||
$GLOBALS['egw']->template->set_var('delete_button','');
|
||||
|
||||
if ($_POST['cancel'])
|
||||
{
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uiapplications.get_list&start='.$start);
|
||||
$GLOBALS['egw']->redirect_link('/index.php','menuaction=admin.uiapplications.get_list&start='.$start);
|
||||
}
|
||||
|
||||
if ($_POST['save'])
|
||||
@ -206,32 +206,32 @@
|
||||
'app_order' => $app_order
|
||||
));
|
||||
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uiapplications.get_list&start='.$start);
|
||||
$GLOBALS['phpgw']->common->phpgw_exit();
|
||||
$GLOBALS['egw']->redirect_link('/index.php','menuaction=admin.uiapplications.get_list&start='.$start);
|
||||
$GLOBALS['egw']->common->egw_exit();
|
||||
}
|
||||
else
|
||||
{
|
||||
$GLOBALS['phpgw']->template->set_var('error','<p><center>' . $GLOBALS['phpgw']->common->error_list($error) . '</center><br>');
|
||||
$GLOBALS['egw']->template->set_var('error','<p><center>' . $GLOBALS['egw']->common->error_list($error) . '</center><br>');
|
||||
}
|
||||
}
|
||||
else
|
||||
{ // else submit
|
||||
$GLOBALS['phpgw']->template->set_var('error','');
|
||||
$GLOBALS['egw']->template->set_var('error','');
|
||||
}
|
||||
|
||||
$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin').' - '.lang('Add new application');
|
||||
if(!@is_object($GLOBALS['phpgw']->js))
|
||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('Admin').' - '.lang('Add new application');
|
||||
if(!@is_object($GLOBALS['egw']->js))
|
||||
{
|
||||
$GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript');
|
||||
$GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript');
|
||||
}
|
||||
$GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
$GLOBALS['egw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['egw']->common->egw_header();
|
||||
echo parse_navbar();
|
||||
|
||||
$GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
|
||||
$GLOBALS['egw']->template->set_var('th_bg',$GLOBALS['egw_info']['theme']['th_bg']);
|
||||
|
||||
$GLOBALS['phpgw']->template->set_var('hidden_vars','<input type="hidden" name="start" value="'.$start.'">');
|
||||
$GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.add'));
|
||||
$GLOBALS['egw']->template->set_var('hidden_vars','<input type="hidden" name="start" value="'.$start.'">');
|
||||
$GLOBALS['egw']->template->set_var('form_action',$GLOBALS['egw']->link('/index.php','menuaction=admin.uiapplications.add'));
|
||||
|
||||
$this->display_row(lang('application name'),'<input name="n_app_name" value="' . $n_app_name . '">');
|
||||
|
||||
@ -254,27 +254,27 @@
|
||||
|
||||
$this->display_row(lang('Select which location this app should appear on the navbar, lowest (left) to highest (right)'),'<input name="app_order" value="' . $app_order . '">');
|
||||
|
||||
$GLOBALS['phpgw']->template->set_var('lang_save_button',lang('Add'));
|
||||
$GLOBALS['phpgw']->template->set_var('lang_cancel_button',lang('Cancel'));
|
||||
$GLOBALS['phpgw']->template->pparse('phpgw_body','form');
|
||||
$GLOBALS['egw']->template->set_var('lang_save_button',lang('Add'));
|
||||
$GLOBALS['egw']->template->set_var('lang_cancel_button',lang('Cancel'));
|
||||
$GLOBALS['egw']->template->pparse('phpgw_body','form');
|
||||
}
|
||||
|
||||
function edit()
|
||||
{
|
||||
if ($GLOBALS['phpgw']->acl->check('applications_access',4,'admin'))
|
||||
if ($GLOBALS['egw']->acl->check('applications_access',4,'admin'))
|
||||
{
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php');
|
||||
$GLOBALS['egw']->redirect_link('/index.php');
|
||||
}
|
||||
$app_name = get_var('app_name',array('POST','GET'));
|
||||
$start = get_var('start',array('POST','GET'));
|
||||
|
||||
$GLOBALS['phpgw']->template->set_file(array('application' => 'application_form.tpl'));
|
||||
$GLOBALS['phpgw']->template->set_block('application','form','form');
|
||||
$GLOBALS['phpgw']->template->set_block('application','row','row');
|
||||
$GLOBALS['egw']->template->set_file(array('application' => 'application_form.tpl'));
|
||||
$GLOBALS['egw']->template->set_block('application','form','form');
|
||||
$GLOBALS['egw']->template->set_block('application','row','row');
|
||||
|
||||
if ($_POST['cancel'])
|
||||
{
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uiapplications.get_list&start='.$start);
|
||||
$GLOBALS['egw']->redirect_link('/index.php','menuaction=admin.uiapplications.get_list&start='.$start);
|
||||
}
|
||||
|
||||
if ($_POST['delete'])
|
||||
@ -297,39 +297,39 @@
|
||||
'app_name' => urldecode($app_name)
|
||||
));
|
||||
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uiapplications.get_list&start='.$start);
|
||||
$GLOBALS['egw']->redirect_link('/index.php','menuaction=admin.uiapplications.get_list&start='.$start);
|
||||
}
|
||||
}
|
||||
|
||||
$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin').' - '.lang('Edit application');
|
||||
if(!@is_object($GLOBALS['phpgw']->js))
|
||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('Admin').' - '.lang('Edit application');
|
||||
if(!@is_object($GLOBALS['egw']->js))
|
||||
{
|
||||
$GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript');
|
||||
$GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript');
|
||||
}
|
||||
$GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
$GLOBALS['egw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['egw']->common->egw_header();
|
||||
echo parse_navbar();
|
||||
|
||||
if ($totalerrors)
|
||||
{
|
||||
$GLOBALS['phpgw']->template->set_var('error','<p><center>' . $GLOBALS['phpgw']->common->error_list($error) . '</center><br>');
|
||||
$GLOBALS['egw']->template->set_var('error','<p><center>' . $GLOBALS['egw']->common->error_list($error) . '</center><br>');
|
||||
}
|
||||
else
|
||||
{
|
||||
$GLOBALS['phpgw']->template->set_var('error','');
|
||||
$GLOBALS['egw']->template->set_var('error','');
|
||||
list($n_app_name,$n_app_title,$n_app_status,$old_app_name,$app_order) = $this->bo->read($app_name);
|
||||
}
|
||||
$GLOBALS['phpgw']->template->set_var('hidden_vars','<input type="hidden" name="start" value="'.$start.'">'.
|
||||
$GLOBALS['egw']->template->set_var('hidden_vars','<input type="hidden" name="start" value="'.$start.'">'.
|
||||
'<input type="hidden" name="app_name" value="' . $app_name . '">');
|
||||
$GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
|
||||
$GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.edit'));
|
||||
$GLOBALS['egw']->template->set_var('th_bg',$GLOBALS['egw_info']['theme']['th_bg']);
|
||||
$GLOBALS['egw']->template->set_var('form_action',$GLOBALS['egw']->link('/index.php','menuaction=admin.uiapplications.edit'));
|
||||
|
||||
$this->display_row(lang('application name'), $n_app_name );
|
||||
|
||||
$GLOBALS['phpgw']->template->set_var('lang_status',lang('Status'));
|
||||
$GLOBALS['phpgw']->template->set_var('lang_save_button',lang('Save'));
|
||||
$GLOBALS['phpgw']->template->set_var('lang_cancel_button',lang('Cancel'));
|
||||
$GLOBALS['phpgw']->template->set_var('lang_delete_button',lang('Delete'));
|
||||
$GLOBALS['egw']->template->set_var('lang_status',lang('Status'));
|
||||
$GLOBALS['egw']->template->set_var('lang_save_button',lang('Save'));
|
||||
$GLOBALS['egw']->template->set_var('lang_cancel_button',lang('Cancel'));
|
||||
$GLOBALS['egw']->template->set_var('lang_delete_button',lang('Delete'));
|
||||
|
||||
$selected[$n_app_status] = ' selected';
|
||||
$status_html = '<option value="0"' . $selected[0] . '>' . lang('Disabled') . '</option>'
|
||||
@ -340,15 +340,15 @@
|
||||
$this->display_row(lang("Status"),'<select name="n_app_status">' . $status_html . '</select>');
|
||||
$this->display_row(lang("Select which location this app should appear on the navbar, lowest (left) to highest (right)"),'<input name="app_order" value="' . $app_order . '">');
|
||||
|
||||
$GLOBALS['phpgw']->template->set_var('select_status',$status_html);
|
||||
$GLOBALS['phpgw']->template->pparse('phpgw_body','form');
|
||||
$GLOBALS['egw']->template->set_var('select_status',$status_html);
|
||||
$GLOBALS['egw']->template->pparse('phpgw_body','form');
|
||||
}
|
||||
|
||||
function delete()
|
||||
{
|
||||
if ($GLOBALS['phpgw']->acl->check('applications_access',8,'admin'))
|
||||
if ($GLOBALS['egw']->acl->check('applications_access',8,'admin'))
|
||||
{
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php');
|
||||
$GLOBALS['egw']->redirect_link('/index.php');
|
||||
}
|
||||
$app_name = get_var('app_name',array('POST','GET'));
|
||||
$start = get_var('start',array('POST','GET'));
|
||||
@ -359,41 +359,41 @@
|
||||
{
|
||||
$this->bo->delete($app_name);
|
||||
}
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uiapplications.get_list&start='.$start);
|
||||
$GLOBALS['egw']->redirect_link('/index.php','menuaction=admin.uiapplications.get_list&start='.$start);
|
||||
}
|
||||
|
||||
$GLOBALS['phpgw']->template->set_file(array('body' => 'delete_common.tpl'));
|
||||
$GLOBALS['egw']->template->set_file(array('body' => 'delete_common.tpl'));
|
||||
|
||||
if(!@is_object($GLOBALS['phpgw']->js))
|
||||
if(!@is_object($GLOBALS['egw']->js))
|
||||
{
|
||||
$GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript');
|
||||
$GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript');
|
||||
}
|
||||
$GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
$GLOBALS['egw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['egw']->common->egw_header();
|
||||
echo parse_navbar();
|
||||
|
||||
$GLOBALS['phpgw']->template->set_var('messages',lang('Are you sure you want to delete the application %1 ?',$GLOBALS['phpgw_info']['apps'][$app_name]['title']));
|
||||
$GLOBALS['phpgw']->template->set_var('no',lang('No'));
|
||||
$GLOBALS['phpgw']->template->set_var('yes',lang('Yes'));
|
||||
$GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.delete'));
|
||||
$GLOBALS['phpgw']->template->set_var('hidden_vars','<input type="hidden" name="start" value="'.$start.'">'.
|
||||
$GLOBALS['egw']->template->set_var('messages',lang('Are you sure you want to delete the application %1 ?',$GLOBALS['egw_info']['apps'][$app_name]['title']));
|
||||
$GLOBALS['egw']->template->set_var('no',lang('No'));
|
||||
$GLOBALS['egw']->template->set_var('yes',lang('Yes'));
|
||||
$GLOBALS['egw']->template->set_var('form_action',$GLOBALS['egw']->link('/index.php','menuaction=admin.uiapplications.delete'));
|
||||
$GLOBALS['egw']->template->set_var('hidden_vars','<input type="hidden" name="start" value="'.$start.'">'.
|
||||
'<input type="hidden" name="app_name" value="'. urlencode($app_name) . '">');
|
||||
$GLOBALS['phpgw']->template->pparse('phpgw_body','body');
|
||||
$GLOBALS['egw']->template->pparse('phpgw_body','body');
|
||||
}
|
||||
|
||||
function register_all_hooks()
|
||||
{
|
||||
if ($GLOBALS['phpgw']->acl->check('applications_access',16,'admin'))
|
||||
if ($GLOBALS['egw']->acl->check('applications_access',16,'admin'))
|
||||
{
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php');
|
||||
$GLOBALS['egw']->redirect_link('/index.php');
|
||||
}
|
||||
if (!is_object($GLOBALS['phpgw']->hooks))
|
||||
if (!is_object($GLOBALS['egw']->hooks))
|
||||
{
|
||||
$GLOBALS['phpgw']->hooks = CreateObject('phpgwapi.hooks');
|
||||
$GLOBALS['egw']->hooks =& CreateObject('phpgwapi.hooks');
|
||||
}
|
||||
$GLOBALS['phpgw']->hooks->register_all_hooks();
|
||||
$GLOBALS['egw']->hooks->register_all_hooks();
|
||||
|
||||
$GLOBALS['phpgw']->redirect_link('/admin/index.php');
|
||||
$GLOBALS['egw']->redirect_link('/admin/index.php');
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -29,28 +29,28 @@
|
||||
);
|
||||
function uiasyncservice()
|
||||
{
|
||||
if (!is_object($GLOBALS['phpgw']->asyncservice))
|
||||
if (!is_object($GLOBALS['egw']->asyncservice))
|
||||
{
|
||||
$GLOBALS['phpgw']->asyncservice = CreateObject('phpgwapi.asyncservice');
|
||||
$GLOBALS['egw']->asyncservice =& CreateObject('phpgwapi.asyncservice');
|
||||
}
|
||||
}
|
||||
|
||||
function index()
|
||||
{
|
||||
if ($GLOBALS['phpgw']->acl->check('asyncservice_access',1,'admin'))
|
||||
if ($GLOBALS['egw']->acl->check('asyncservice_access',1,'admin'))
|
||||
{
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php');
|
||||
$GLOBALS['egw']->redirect_link('/index.php');
|
||||
}
|
||||
$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin').' - '.lang('Asynchronous timed services');
|
||||
if(!@is_object($GLOBALS['phpgw']->js))
|
||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('Admin').' - '.lang('Asynchronous timed services');
|
||||
if(!@is_object($GLOBALS['egw']->js))
|
||||
{
|
||||
$GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript');
|
||||
$GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript');
|
||||
}
|
||||
$GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
$GLOBALS['egw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['egw']->common->egw_header();
|
||||
echo parse_navbar();
|
||||
|
||||
$async = $GLOBALS['phpgw']->asyncservice; // use an own instance, as we might set debug=True
|
||||
$async = $GLOBALS['egw']->asyncservice; // use an own instance, as we might set debug=True
|
||||
|
||||
$async->debug = !!$_POST['debug'];
|
||||
|
||||
@ -76,7 +76,7 @@
|
||||
|
||||
if ($_POST['test'])
|
||||
{
|
||||
if (!$async->set_timer($times,'test','admin.uiasyncservice.test',$GLOBALS['phpgw_info']['user']['email']))
|
||||
if (!$async->set_timer($times,'test','admin.uiasyncservice.test',$GLOBALS['egw_info']['user']['email']))
|
||||
{
|
||||
echo '<p><b>'.lang("Error setting timer, wrong syntax or maybe there's one already running !!!")."</b></p>\n";
|
||||
}
|
||||
@ -101,18 +101,18 @@
|
||||
{
|
||||
$times = array('min' => '*/5'); // set some default
|
||||
}
|
||||
echo '<form action="'.$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>'admin.uiasyncservice.index')).'" method="POST">'."\n<p>";
|
||||
echo '<form action="'.$GLOBALS['egw']->link('/index.php',array('menuaction'=>'admin.uiasyncservice.index')).'" method="POST">'."\n<p>";
|
||||
echo '<div style="text-align: left; margin: 10px;">'."\n";
|
||||
|
||||
$last_run = $async->last_check_run();
|
||||
$lr_date = $last_run['end'] ? $GLOBALS['phpgw']->common->show_date($last_run['end']) : lang('never');
|
||||
$lr_date = $last_run['end'] ? $GLOBALS['egw']->common->show_date($last_run['end']) : lang('never');
|
||||
echo '<p><b>'.lang('Async services last executed').'</b>: '.$lr_date.' ('.$last_run['run_by'].")</p>\n<hr>\n";
|
||||
|
||||
if (isset($_POST['asyncservice']) && $_POST['asyncservice'] != $GLOBALS['phpgw_info']['server']['asyncservice'])
|
||||
if (isset($_POST['asyncservice']) && $_POST['asyncservice'] != $GLOBALS['egw_info']['server']['asyncservice'])
|
||||
{
|
||||
$config = CreateObject('phpgwapi.config','phpgwapi');
|
||||
$config =& CreateObject('phpgwapi.config','phpgwapi');
|
||||
$config->read_repository();
|
||||
$config->value('asyncservice',$GLOBALS['phpgw_info']['server']['asyncservice']=$_POST['asyncservice']);
|
||||
$config->value('asyncservice',$GLOBALS['egw_info']['server']['asyncservice']=$_POST['asyncservice']);
|
||||
$config->save_repository();
|
||||
unset($config);
|
||||
}
|
||||
@ -130,7 +130,7 @@
|
||||
' <select name="asyncservice" onChange="this.form.submit();">';
|
||||
foreach ($async_use as $key => $label)
|
||||
{
|
||||
$selected = $key == $GLOBALS['phpgw_info']['server']['asyncservice'] ? ' selected' : '';
|
||||
$selected = $key == $GLOBALS['egw_info']['server']['asyncservice'] ? ' selected' : '';
|
||||
echo "<option value=\"$key\"$selected>$label</option>\n";
|
||||
}
|
||||
echo "</select>\n";
|
||||
@ -179,7 +179,7 @@
|
||||
{
|
||||
$next = $async->next_run($times,True);
|
||||
|
||||
echo "<p>asyncservice::next_run(";print_r($times);echo")=".($next === False ? 'False':"'$next'=".$GLOBALS['phpgw']->common->show_date($next))."</p>\n";
|
||||
echo "<p>asyncservice::next_run(";print_r($times);echo")=".($next === False ? 'False':"'$next'=".$GLOBALS['egw']->common->show_date($next))."</p>\n";
|
||||
}
|
||||
echo '<hr><p><input type="submit" name="cancel" value="'.lang('Cancel TestJob!')."\"> \n";
|
||||
echo '<input type="submit" name="test" value="'.lang('Start TestJob!')."\">\n";
|
||||
@ -192,11 +192,11 @@
|
||||
echo "<table border=1>\n<tr>\n<th>Id</th><th>".lang('Next run').'</th><th>'.lang('Times').'</th><th>'.lang('Method').'</th><th>'.lang('Data')."</th><th>".lang('LoginID')."</th></tr>\n";
|
||||
foreach($jobs as $job)
|
||||
{
|
||||
echo "<tr>\n<td>$job[id]</td><td>".$GLOBALS['phpgw']->common->show_date($job['next'])."</td><td>";
|
||||
echo "<tr>\n<td>$job[id]</td><td>".$GLOBALS['egw']->common->show_date($job['next'])."</td><td>";
|
||||
print_r($job['times']);
|
||||
echo "</td><td>$job[method]</td><td>";
|
||||
print_r($job['data']);
|
||||
echo "</td><td align=\"center\">".$GLOBALS['phpgw']->accounts->id2name($job[account_id])."</td></tr>\n";
|
||||
echo "</td><td align=\"center\">".$GLOBALS['egw']->accounts->id2name($job[account_id])."</td></tr>\n";
|
||||
}
|
||||
echo "</table>\n";
|
||||
}
|
||||
@ -211,17 +211,17 @@
|
||||
|
||||
function test($to)
|
||||
{
|
||||
if (!is_object($GLOBALS['phpgw']->send))
|
||||
if (!is_object($GLOBALS['egw']->send))
|
||||
{
|
||||
$GLOBALS['phpgw']->send = CreateObject('phpgwapi.send');
|
||||
$GLOBALS['egw']->send =& CreateObject('phpgwapi.send');
|
||||
}
|
||||
$returncode = $GLOBALS['phpgw']->send->msg('email',$to,$subject='Asynchronous timed services','Greatings from cron ;-)');
|
||||
$returncode = $GLOBALS['egw']->send->msg('email',$to,$subject='Asynchronous timed services','Greatings from cron ;-)');
|
||||
|
||||
if (!$returncode) // not nice, but better than failing silently
|
||||
{
|
||||
echo "<p>bocalendar::send_update: sending message to '$to' subject='$subject' failed !!!<br>\n";
|
||||
echo $GLOBALS['phpgw']->send->err['desc']."</p>\n";
|
||||
echo $GLOBALS['egw']->send->err['desc']."</p>\n";
|
||||
}
|
||||
//print_r($GLOBALS['phpgw_info']['user']);
|
||||
//print_r($GLOBALS['egw_info']['user']);
|
||||
}
|
||||
}
|
||||
|
@ -36,30 +36,30 @@
|
||||
|
||||
function uicategories()
|
||||
{
|
||||
if ($GLOBALS['phpgw']->acl->check('global_categories_access',1,'admin'))
|
||||
if ($GLOBALS['egw']->acl->check('global_categories_access',1,'admin'))
|
||||
{
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php');
|
||||
$GLOBALS['egw']->redirect_link('/index.php');
|
||||
}
|
||||
|
||||
$this->bo = CreateObject('admin.bocategories');
|
||||
$this->template = $GLOBALS['phpgw']->template;
|
||||
$this->nextmatchs = CreateObject('phpgwapi.nextmatchs');
|
||||
$this->bo =& CreateObject('admin.bocategories');
|
||||
$this->template = $GLOBALS['egw']->template;
|
||||
$this->nextmatchs =& CreateObject('phpgwapi.nextmatchs');
|
||||
|
||||
$this->acl_search = !$GLOBALS['phpgw']->acl->check('global_categories_access',2,'admin');
|
||||
$this->acl_add = !$GLOBALS['phpgw']->acl->check('global_categories_access',4,'admin');
|
||||
$this->acl_view = !$GLOBALS['phpgw']->acl->check('global_categories_access',8,'admin');
|
||||
$this->acl_edit = !$GLOBALS['phpgw']->acl->check('global_categories_access',16,'admin');
|
||||
$this->acl_delete = !$GLOBALS['phpgw']->acl->check('global_categories_access',32,'admin');
|
||||
$this->acl_add_sub= !$GLOBALS['phpgw']->acl->check('global_categories_access',64,'admin');
|
||||
$this->acl_search = !$GLOBALS['egw']->acl->check('global_categories_access',2,'admin');
|
||||
$this->acl_add = !$GLOBALS['egw']->acl->check('global_categories_access',4,'admin');
|
||||
$this->acl_view = !$GLOBALS['egw']->acl->check('global_categories_access',8,'admin');
|
||||
$this->acl_edit = !$GLOBALS['egw']->acl->check('global_categories_access',16,'admin');
|
||||
$this->acl_delete = !$GLOBALS['egw']->acl->check('global_categories_access',32,'admin');
|
||||
$this->acl_add_sub= !$GLOBALS['egw']->acl->check('global_categories_access',64,'admin');
|
||||
|
||||
if(!@is_object($GLOBALS['phpgw']->js))
|
||||
if(!@is_object($GLOBALS['egw']->js))
|
||||
{
|
||||
$GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript');
|
||||
$GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript');
|
||||
}
|
||||
$GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['egw']->js->validate_file('jscode','openwindow','admin');
|
||||
|
||||
$this->appname = get_var('appname',array('GET','POST'));
|
||||
$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps'][$this->appname ? $this->appname : 'admin']['title'];
|
||||
$GLOBALS['egw_info']['flags']['app_header'] = $GLOBALS['egw_info']['apps'][$this->appname ? $this->appname : 'admin']['title'];
|
||||
|
||||
$this->start = $this->bo->start;
|
||||
$this->query = $this->bo->query;
|
||||
@ -68,7 +68,7 @@
|
||||
$this->cat_id = $this->bo->cat_id;
|
||||
if($this->debug) { $this->_debug_sqsof(); }
|
||||
|
||||
$dir = dir(PHPGW_SERVER_ROOT.'/phpgwapi/images');
|
||||
$dir = dir(EGW_SERVER_ROOT.'/phpgwapi/images');
|
||||
while($file = $dir->read())
|
||||
{
|
||||
if (preg_match('/\\.(png|gif|jpe?g)$/i',$file))
|
||||
@ -78,7 +78,7 @@
|
||||
}
|
||||
$dir->close();
|
||||
sort($this->icons);
|
||||
$this->img_url = $GLOBALS['phpgw_info']['server']['webserver_url'].'/phpgwapi/images/';
|
||||
$this->img_url = $GLOBALS['egw_info']['server']['webserver_url'].'/phpgwapi/images/';
|
||||
}
|
||||
|
||||
function _debug_sqsof()
|
||||
@ -141,12 +141,12 @@
|
||||
|
||||
if ($_POST['add'])
|
||||
{
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
|
||||
$GLOBALS['egw']->redirect_link('/index.php',$link_data);
|
||||
}
|
||||
|
||||
if ($_POST['done'])
|
||||
{
|
||||
$GLOBALS['phpgw']->redirect_link('/admin/index.php');
|
||||
$GLOBALS['egw']->redirect_link('/admin/index.php');
|
||||
}
|
||||
|
||||
$this->template->set_file(array('cat_list_t' => 'listcats.tpl'));
|
||||
@ -160,14 +160,14 @@
|
||||
$this->template->set_block('cat_list_t','search','searchhandle');
|
||||
}
|
||||
|
||||
$GLOBALS['phpgw_info']['flags']['app_header'] .= ' - '.lang('Global categories');
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
$GLOBALS['egw_info']['flags']['app_header'] .= ' - '.lang('Global categories');
|
||||
$GLOBALS['egw']->common->egw_header();
|
||||
echo parse_navbar();
|
||||
$this->set_langs();
|
||||
$this->template->set_var('query',$this->query);
|
||||
|
||||
$link_data['menuaction'] = 'admin.uicategories.index';
|
||||
$this->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php',$link_data));
|
||||
$this->template->set_var('action_url',$GLOBALS['egw']->link('/index.php',$link_data));
|
||||
|
||||
if(!$start)
|
||||
{
|
||||
@ -215,7 +215,7 @@
|
||||
|
||||
$id = $cat['id'];
|
||||
$level = $cat['level'];
|
||||
$cat_name = $GLOBALS['phpgw']->strip_html($cat['name']);
|
||||
$cat_name = $GLOBALS['egw']->strip_html($cat['name']);
|
||||
|
||||
if ($level > 0)
|
||||
{
|
||||
@ -224,7 +224,7 @@
|
||||
$cat_name = $spaceset . $cat_name;
|
||||
}
|
||||
|
||||
$descr = $GLOBALS['phpgw']->strip_html($cat['description']);
|
||||
$descr = $GLOBALS['egw']->strip_html($cat['description']);
|
||||
if (!$descr) { $descr = ' '; }
|
||||
|
||||
if ($level == 0)
|
||||
@ -253,7 +253,7 @@
|
||||
$link_data['menuaction'] = 'admin.uicategories.edit';
|
||||
$link_data['cat_parent'] = $id;
|
||||
unset($link_data['cat_id']);
|
||||
$this->template->set_var('add_sub','<a href="'.$GLOBALS['phpgw']->link('/index.php',$link_data).'">'.
|
||||
$this->template->set_var('add_sub','<a href="'.$GLOBALS['egw']->link('/index.php',$link_data).'">'.
|
||||
lang('Add sub').'</a>');
|
||||
}
|
||||
if ($this->appname && $cat['app_name'] == $this->appname)
|
||||
@ -274,7 +274,7 @@
|
||||
if ($show_edit_del && $this->acl_edit)
|
||||
{
|
||||
$link_data['menuaction'] = 'admin.uicategories.edit';
|
||||
$this->template->set_var('edit','<a href="'.$GLOBALS['phpgw']->link('/index.php',$link_data).'">'.
|
||||
$this->template->set_var('edit','<a href="'.$GLOBALS['egw']->link('/index.php',$link_data).'">'.
|
||||
lang('Edit').'</a>');
|
||||
}
|
||||
else
|
||||
@ -284,7 +284,7 @@
|
||||
if ($show_edit_del && $this->acl_delete)
|
||||
{
|
||||
$link_data['menuaction'] = 'admin.uicategories.delete';
|
||||
$this->template->set_var('delete','<a href="'.$GLOBALS['phpgw']->link('/index.php',$link_data).'">'.
|
||||
$this->template->set_var('delete','<a href="'.$GLOBALS['egw']->link('/index.php',$link_data).'">'.
|
||||
lang('Delete').'</a>');
|
||||
}
|
||||
else
|
||||
@ -294,19 +294,19 @@
|
||||
|
||||
$data = unserialize($cat['data']);
|
||||
$icon = $data['icon'];
|
||||
$dir_img = $GLOBALS['phpgw_info']['server']['webserver_url'] . SEP . 'phpgwapi' . SEP . 'images' . SEP;
|
||||
$dir_img = $GLOBALS['egw_info']['server']['webserver_url'] . SEP . 'phpgwapi' . SEP . 'images' . SEP;
|
||||
|
||||
if (strlen($icon) > 0)
|
||||
$this->template->set_var('icon', "<img src='". $dir_img . $icon ."'>");
|
||||
$this->template->set_var('icon', "<img src='". $dir_img . $icon ."'>");
|
||||
else
|
||||
$this->template->set_var('icon', " ");
|
||||
$this->template->set_var('icon', " ");
|
||||
|
||||
$this->template->fp('list','cat_list',True);
|
||||
}
|
||||
$link_data['menuaction'] = 'admin.uicategories.edit';
|
||||
unset($link_data['cat_id']);
|
||||
unset($link_data['cat_parent']);
|
||||
$this->template->set_var('add_action',$GLOBALS['phpgw']->link('/index.php',$link_data));
|
||||
$this->template->set_var('add_action',$GLOBALS['egw']->link('/index.php',$link_data));
|
||||
|
||||
$this->save_sessiondata();
|
||||
$this->template->pfp('out','cat_list_t',True);
|
||||
@ -334,12 +334,12 @@
|
||||
|
||||
if (!$this->acl_add && $cat_parent == 0 || !$this->acl_add_sub && $cat_parent != 0)
|
||||
{
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php');
|
||||
$GLOBALS['egw']->redirect_link('/index.php');
|
||||
}
|
||||
if ($_POST['cancel'] || $this->cat_id && !$this->acl_edit || $this->cat_id &&
|
||||
(!$this->acl_add && $cat_parent == 0 || !$this->acl_add_sub && $cat_parent != 0))
|
||||
{
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
|
||||
$GLOBALS['egw']->redirect_link('/index.php',$link_data);
|
||||
}
|
||||
|
||||
if ($_POST['save'])
|
||||
@ -362,16 +362,16 @@
|
||||
$error = $this->bo->check_values($values);
|
||||
if (is_array($error))
|
||||
{
|
||||
$this->template->set_var('message',$GLOBALS['phpgw']->common->error_list($error));
|
||||
$this->template->set_var('message',$GLOBALS['egw']->common->error_list($error));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->cat_id = $this->bo->save_cat($values);
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
|
||||
$GLOBALS['egw']->redirect_link('/index.php',$link_data);
|
||||
}
|
||||
}
|
||||
|
||||
$GLOBALS['phpgw_info']['flags']['app_header'] .= ' - '.($this->cat_id ? lang('Edit global category'):lang('Add global category'));
|
||||
$GLOBALS['egw_info']['flags']['app_header'] .= ' - '.($this->cat_id ? lang('Edit global category'):lang('Add global category'));
|
||||
|
||||
$this->set_langs();
|
||||
|
||||
@ -399,28 +399,28 @@
|
||||
|
||||
$link_data['menuaction'] = 'admin.uicategories.edit';
|
||||
$link_data['cat_id'] = $this->cat_id;
|
||||
$this->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php',$link_data));
|
||||
$this->template->set_var('action_url',$GLOBALS['egw']->link('/index.php',$link_data));
|
||||
|
||||
if ($this->acl_delete)
|
||||
{
|
||||
$link_data['menuaction'] = 'admin.uicategories.delete';
|
||||
|
||||
$this->template->set_var('delete','<form method="POST" action="' . $GLOBALS['phpgw']->link('/index.php',$link_data)
|
||||
$this->template->set_var('delete','<form method="POST" action="' . $GLOBALS['egw']->link('/index.php',$link_data)
|
||||
. '"><input type="submit" value="' . lang('Delete') .'"></form>');
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->template->set_var('delete',' ');
|
||||
}
|
||||
$this->template->set_var('cat_name',$GLOBALS['phpgw']->strip_html($cat['name']));
|
||||
$this->template->set_var('cat_description',$GLOBALS['phpgw']->strip_html($cat['description']));
|
||||
$this->template->set_var('cat_name',$GLOBALS['egw']->strip_html($cat['name']));
|
||||
$this->template->set_var('cat_description',$GLOBALS['egw']->strip_html($cat['description']));
|
||||
$this->template->set_var('category_list',$this->bo->cats->formatted_list(array('selected' => $cat['parent'],'self' => $this->cat_id)));
|
||||
|
||||
if (!is_object($GLOBALS['phpgw']->html))
|
||||
if (!is_object($GLOBALS['egw']->html))
|
||||
{
|
||||
$GLOBALS['phpgw']->html = CreateObject('phpgwapi.html');
|
||||
$GLOBALS['egw']->html =& CreateObject('phpgwapi.html');
|
||||
}
|
||||
$this->template->set_var('color',$GLOBALS['phpgw']->html->inputColor('cat_data[color]',$cat['data']['color'],lang('Click to select a color')));
|
||||
$this->template->set_var('color',$GLOBALS['egw']->html->inputColor('cat_data[color]',$cat['data']['color'],lang('Click to select a color')));
|
||||
|
||||
//$options = '<option value=""'.(!$cat['data']['icon'] ? ' selected="1"':'').'>'.lang('none')."</options>\n";
|
||||
|
||||
@ -461,7 +461,7 @@
|
||||
}
|
||||
$this->template->set_var('hidden_vars',$hidden_vars);
|
||||
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
$GLOBALS['egw']->common->egw_header();
|
||||
echo parse_navbar();
|
||||
|
||||
$this->template->pfp('out','form');
|
||||
@ -471,7 +471,7 @@
|
||||
{
|
||||
if (!$this->acl_delete)
|
||||
{
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php');
|
||||
$GLOBALS['egw']->redirect_link('/index.php');
|
||||
}
|
||||
$link_data = array
|
||||
(
|
||||
@ -481,7 +481,7 @@
|
||||
|
||||
if (!$this->cat_id || $_POST['cancel'])
|
||||
{
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
|
||||
$GLOBALS['egw']->redirect_link('/index.php',$link_data);
|
||||
}
|
||||
|
||||
if ($_POST['confirm'])
|
||||
@ -494,7 +494,7 @@
|
||||
{
|
||||
$this->bo->delete($this->cat_id,False);
|
||||
}
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php',$link_data);
|
||||
$GLOBALS['egw']->redirect_link('/index.php',$link_data);
|
||||
}
|
||||
$this->template->set_file(array('category_delete' => 'delete_cat.tpl'));
|
||||
|
||||
@ -514,13 +514,13 @@
|
||||
'cat_id' => $this->cat_id
|
||||
));
|
||||
|
||||
$GLOBALS['phpgw_info']['flags']['app_header'] .= ' - '.lang('Delete category');
|
||||
if(!@is_object($GLOBALS['phpgw']->js))
|
||||
$GLOBALS['egw_info']['flags']['app_header'] .= ' - '.lang('Delete category');
|
||||
if(!@is_object($GLOBALS['egw']->js))
|
||||
{
|
||||
$GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript');
|
||||
$GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript');
|
||||
}
|
||||
$GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
$GLOBALS['egw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['egw']->common->egw_header();
|
||||
echo parse_navbar();
|
||||
|
||||
$hidden_vars = '<input type="hidden" name="cat_id" value="' . $this->cat_id . '">' . "\n";
|
||||
@ -568,7 +568,7 @@
|
||||
|
||||
$link_data['menuaction'] = 'admin.uicategories.delete';
|
||||
$link_data['cat_id'] = $this->cat_id;
|
||||
$this->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php',$link_data));
|
||||
$this->template->set_var('action_url',$GLOBALS['egw']->link('/index.php',$link_data));
|
||||
$this->template->set_var('lang_yes',lang('Yes'));
|
||||
$this->template->set_var('lang_no',lang('No'));
|
||||
$this->template->pfp('out','category_delete');
|
||||
|
@ -1,16 +1,16 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* eGroupWare - Admin config *
|
||||
* Written by Miles Lott <milosch@phpwhere.org> *
|
||||
* http://www.egroupware.org *
|
||||
* -------------------------------------------- *
|
||||
* 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 *
|
||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
/**************************************************************************\
|
||||
* eGroupWare - Admin config *
|
||||
* Written by Miles Lott <milosch@phpwhere.org> *
|
||||
* http://www.egroupware.org *
|
||||
* -------------------------------------------- *
|
||||
* 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 *
|
||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
/* $Id$ */
|
||||
|
||||
class uiconfig
|
||||
{
|
||||
@ -63,14 +63,14 @@
|
||||
$config_appname = $appname;
|
||||
break;
|
||||
}
|
||||
$t = CreateObject('phpgwapi.Template',$GLOBALS['egw']->common->get_tpl_dir($appname));
|
||||
$t =& CreateObject('phpgwapi.Template',$GLOBALS['egw']->common->get_tpl_dir($appname));
|
||||
$t->set_unknowns('keep');
|
||||
$t->set_file(array('config' => 'config.tpl'));
|
||||
$t->set_block('config','header','header');
|
||||
$t->set_block('config','body','body');
|
||||
$t->set_block('config','footer','footer');
|
||||
|
||||
$c = CreateObject('phpgwapi.config',$config_appname);
|
||||
$c =& CreateObject('phpgwapi.config',$config_appname);
|
||||
$c->read_repository();
|
||||
|
||||
if ($c->config_data)
|
||||
@ -153,13 +153,13 @@
|
||||
|
||||
if(!@is_object($GLOBALS['egw']->js))
|
||||
{
|
||||
$GLOBALS['egw']->js = CreateObject('phpgwapi.javascript');
|
||||
$GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript');
|
||||
}
|
||||
$GLOBALS['egw']->js->validate_file('jscode','openwindow','admin');
|
||||
|
||||
// set currentapp to our calling app, to show the right sidebox-menu
|
||||
$GLOBALS['egw_info']['flags']['currentapp'] = $show_app;
|
||||
$GLOBALS['egw']->common->phpgw_header();
|
||||
$GLOBALS['egw']->common->egw_header();
|
||||
echo parse_navbar();
|
||||
|
||||
$t->set_var('title',lang('Site Configuration'));
|
||||
|
@ -23,34 +23,34 @@
|
||||
|
||||
function uicurrentsessions()
|
||||
{
|
||||
if ($GLOBALS['phpgw']->acl->check('current_sessions_access',1,'admin'))
|
||||
if ($GLOBALS['egw']->acl->check('current_sessions_access',1,'admin'))
|
||||
{
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php');
|
||||
$GLOBALS['egw']->redirect_link('/index.php');
|
||||
}
|
||||
$this->template = createobject('phpgwapi.Template',PHPGW_APP_TPL);
|
||||
$this->bo = createobject('admin.bocurrentsessions');
|
||||
$this->nextmatchs = createobject('phpgwapi.nextmatchs');
|
||||
$this->template =& CreateObject('phpgwapi.Template',EGW_APP_TPL);
|
||||
$this->bo =& CreateObject('admin.bocurrentsessions');
|
||||
$this->nextmatchs =& CreateObject('phpgwapi.nextmatchs');
|
||||
}
|
||||
|
||||
function header()
|
||||
{
|
||||
if(!@is_object($GLOBALS['phpgw']->js))
|
||||
if(!@is_object($GLOBALS['egw']->js))
|
||||
{
|
||||
$GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript');
|
||||
$GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript');
|
||||
}
|
||||
$GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
$GLOBALS['egw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['egw']->common->egw_header();
|
||||
echo parse_navbar();
|
||||
}
|
||||
|
||||
function store_location($info)
|
||||
{
|
||||
$GLOBALS['phpgw']->session->appsession('currentsessions_session_data','admin',$info);
|
||||
$GLOBALS['egw']->session->appsession('currentsessions_session_data','admin',$info);
|
||||
}
|
||||
|
||||
function list_sessions()
|
||||
{
|
||||
$info = $GLOBALS['phpgw']->session->appsession('currentsessions_session_data','admin');
|
||||
$info = $GLOBALS['egw']->session->appsession('currentsessions_session_data','admin');
|
||||
if (! is_array($info))
|
||||
{
|
||||
$info = array(
|
||||
@ -81,23 +81,23 @@
|
||||
$this->store_location($info);
|
||||
}
|
||||
|
||||
$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin').' - '.lang('List of current users');
|
||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('Admin').' - '.lang('List of current users');
|
||||
$this->header();
|
||||
|
||||
$this->template->set_file('current','currentusers.tpl');
|
||||
$this->template->set_block('current','list','list');
|
||||
$this->template->set_block('current','row','row');
|
||||
|
||||
$can_view_action = !$GLOBALS['phpgw']->acl->check('current_sessions_access',2,'admin');
|
||||
$can_view_ip = !$GLOBALS['phpgw']->acl->check('current_sessions_access',4,'admin');
|
||||
$can_kill = !$GLOBALS['phpgw']->acl->check('current_sessions_access',8,'admin');
|
||||
$can_view_action = !$GLOBALS['egw']->acl->check('current_sessions_access',2,'admin');
|
||||
$can_view_ip = !$GLOBALS['egw']->acl->check('current_sessions_access',4,'admin');
|
||||
$can_kill = !$GLOBALS['egw']->acl->check('current_sessions_access',8,'admin');
|
||||
|
||||
$total = $this->bo->total();
|
||||
|
||||
$this->template->set_var('bg_color',$GLOBALS['phpgw_info']['theme']['bg_color']);
|
||||
$this->template->set_var('bg_color',$GLOBALS['egw_info']['theme']['bg_color']);
|
||||
$this->template->set_var('left_next_matchs',$this->nextmatchs->left('/admin/currentusers.php',$info['start'],$total));
|
||||
$this->template->set_var('right_next_matchs',$this->nextmatchs->right('/admin/currentusers.php',$info['start'],$total));
|
||||
$this->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
|
||||
$this->template->set_var('th_bg',$GLOBALS['egw_info']['theme']['th_bg']);
|
||||
|
||||
$this->template->set_var('sort_loginid',$this->nextmatchs->show_sort_order($info['sort'],'session_lid',$info['order'],
|
||||
'/admin/currentusers.php',lang('LoginID')));
|
||||
@ -126,16 +126,16 @@
|
||||
|
||||
if ($value['session_action'] && $can_view_action)
|
||||
{
|
||||
$this->template->set_var('row_action',$GLOBALS['phpgw']->strip_html($value['session_action']));
|
||||
$this->template->set_var('row_action',$GLOBALS['egw']->strip_html($value['session_action']));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->template->set_var('row_action',' ');
|
||||
}
|
||||
|
||||
if ($value['session_id'] != $GLOBALS['phpgw_info']['user']['sessionid'] && $can_kill)
|
||||
if ($value['session_id'] != $GLOBALS['egw_info']['user']['sessionid'] && $can_kill)
|
||||
{
|
||||
$this->template->set_var('row_kill','<a href="' . $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicurrentsessions.kill&ksession='
|
||||
$this->template->set_var('row_kill','<a href="' . $GLOBALS['egw']->link('/index.php','menuaction=admin.uicurrentsessions.kill&ksession='
|
||||
. $value['session_id'] . '&kill=true') . '">' . lang('Kill').'</a>');
|
||||
}
|
||||
else
|
||||
@ -151,17 +151,17 @@
|
||||
|
||||
function kill()
|
||||
{
|
||||
if ($GLOBALS['phpgw']->acl->check('current_sessions_access',8,'admin'))
|
||||
if ($GLOBALS['egw']->acl->check('current_sessions_access',8,'admin'))
|
||||
{
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php');
|
||||
$GLOBALS['egw']->redirect_link('/index.php');
|
||||
}
|
||||
$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin').' - '.lang('Kill session');
|
||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('Admin').' - '.lang('Kill session');
|
||||
$this->header();
|
||||
$this->template->set_file('form','kill_session.tpl');
|
||||
|
||||
$this->template->set_var('lang_message',lang('Are you sure you want to kill this session ?'));
|
||||
$this->template->set_var('link_no','<a href="' . $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicurrentsessions.list_sessions') . '">' . lang('No') . '</a>');
|
||||
$this->template->set_var('link_yes','<a href="' . $GLOBALS['phpgw']->link('/index.php','menuaction=admin.bocurrentsessions.kill&ksession=' . $_GET['ksession']) . '">' . lang('Yes') . '</a>');
|
||||
$this->template->set_var('link_no','<a href="' . $GLOBALS['egw']->link('/index.php','menuaction=admin.uicurrentsessions.list_sessions') . '">' . lang('No') . '</a>');
|
||||
$this->template->set_var('link_yes','<a href="' . $GLOBALS['egw']->link('/index.php','menuaction=admin.bocurrentsessions.kill&ksession=' . $_GET['ksession']) . '">' . lang('Yes') . '</a>');
|
||||
|
||||
$this->template->pfp('out','form');
|
||||
}
|
||||
|
@ -22,22 +22,22 @@
|
||||
|
||||
function uildap_mgr()
|
||||
{
|
||||
$this->t = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
|
||||
$this->boldapmgr = CreateObject('admin.boldap_mgr');
|
||||
$this->t =& CreateObject('phpgwapi.Template',EGW_APP_TPL);
|
||||
$this->boldapmgr =& CreateObject('admin.boldap_mgr');
|
||||
}
|
||||
|
||||
function display_app_header()
|
||||
{
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
$GLOBALS['egw']->common->egw_header();
|
||||
echo parse_navbar();
|
||||
|
||||
}
|
||||
|
||||
function editUserData($_useCache='0')
|
||||
{
|
||||
global $phpgw, $phpgw_info, $HTTP_GET_VARS;
|
||||
global $phpgw, $phpgw_info, $_GET;
|
||||
|
||||
$accountID = $HTTP_GET_VARS['account_id'];
|
||||
$accountID = $_GET['account_id'];
|
||||
$GLOBALS['account_id'] = $accountID;
|
||||
|
||||
$this->display_app_header();
|
||||
@ -47,9 +47,9 @@
|
||||
$this->t->set_file(array("editUserData" => "account_form_ldapdata.tpl"));
|
||||
$this->t->set_block('editUserData','form','form');
|
||||
$this->t->set_block('editUserData','link_row','link_row');
|
||||
$this->t->set_var("th_bg",$phpgw_info["theme"]["th_bg"]);
|
||||
$this->t->set_var("tr_color1",$phpgw_info["theme"]["row_on"]);
|
||||
$this->t->set_var("tr_color2",$phpgw_info["theme"]["row_off"]);
|
||||
$this->t->set_var("th_bg",$GLOBALS['egw_info']["theme"]["th_bg"]);
|
||||
$this->t->set_var("tr_color1",$GLOBALS['egw_info']["theme"]["row_on"]);
|
||||
$this->t->set_var("tr_color2",$GLOBALS['egw_info']["theme"]["row_off"]);
|
||||
|
||||
$this->t->set_var("lang_email_config",lang("edit email settings"));
|
||||
$this->t->set_var("lang_emailAddress",lang("email address"));
|
||||
@ -61,8 +61,8 @@
|
||||
$this->t->set_var("lang_deliver_extern",lang("deliver extern"));
|
||||
$this->t->set_var("lang_edit_email_settings",lang("edit email settings"));
|
||||
$this->t->set_var("lang_ready",lang("Done"));
|
||||
$this->t->set_var("link_back",$phpgw->link('/admin/accounts.php'));
|
||||
$this->t->set_var("info_icon",PHPGW_IMAGES_DIR.'/info.gif');
|
||||
$this->t->set_var("link_back",$GLOBALS['egw']->link('/admin/accounts.php'));
|
||||
$this->t->set_var("info_icon",EGW_IMAGES_DIR.'/info.gif');
|
||||
|
||||
|
||||
$linkData = array
|
||||
@ -70,7 +70,7 @@
|
||||
'menuaction' => 'admin.uildap_mgr.saveUserData',
|
||||
'account_id' => $accountID
|
||||
);
|
||||
$this->t->set_var("form_action", $phpgw->link('/index.php',$linkData));
|
||||
$this->t->set_var("form_action", $GLOBALS['egw']->link('/index.php',$linkData));
|
||||
|
||||
// only when we show a existing user
|
||||
if($userData = $this->boldapmgr->getUserData($accountID, $_useCache))
|
||||
@ -125,7 +125,7 @@
|
||||
}
|
||||
|
||||
// create the menu on the left, if needed
|
||||
$menuClass = CreateObject('admin.uimenuclass');
|
||||
$menuClass =& CreateObject('admin.uimenuclass');
|
||||
$this->t->set_var('rows',$menuClass->createHTMLCode('edit_user'));
|
||||
|
||||
$this->t->pparse("out","form");
|
||||
@ -134,24 +134,24 @@
|
||||
|
||||
function saveUserData()
|
||||
{
|
||||
global $HTTP_POST_VARS, $HTTP_GET_VARS;
|
||||
global $_POST, $_GET;
|
||||
|
||||
if($HTTP_POST_VARS["accountStatus"] == "on")
|
||||
if($_POST["accountStatus"] == "on")
|
||||
{
|
||||
$accountStatus = "active";
|
||||
}
|
||||
if($HTTP_POST_VARS["forwardOnly"] == "on")
|
||||
if($_POST["forwardOnly"] == "on")
|
||||
{
|
||||
$deliveryMode = "forwardOnly";
|
||||
}
|
||||
|
||||
$formData = array
|
||||
(
|
||||
'mail' => $HTTP_POST_VARS["mail"],
|
||||
'mailAlternateAddress' => $HTTP_POST_VARS["mailAlternateAddress"],
|
||||
'mailForwardingAddress' => $HTTP_POST_VARS["mailForwardingAddress"],
|
||||
'add_mailAlternateAddress' => $HTTP_POST_VARS["mailAlternateAddressInput"],
|
||||
'remove_mailAlternateAddress' => $HTTP_POST_VARS["mailAlternateAddress"],
|
||||
'mail' => $_POST["mail"],
|
||||
'mailAlternateAddress' => $_POST["mailAlternateAddress"],
|
||||
'mailForwardingAddress' => $_POST["mailForwardingAddress"],
|
||||
'add_mailAlternateAddress' => $_POST["mailAlternateAddressInput"],
|
||||
'remove_mailAlternateAddress' => $_POST["mailAlternateAddress"],
|
||||
'accountStatus' => $accountStatus,
|
||||
'deliveryMode' => $deliveryMode
|
||||
);
|
||||
@ -159,11 +159,11 @@
|
||||
//echo "<br><br>DebugArray in uiuserdata";
|
||||
// echo _debug_array($formData);
|
||||
|
||||
if($HTTP_POST_VARS["add_mailAlternateAddress"]) $bo_action='add_mailAlternateAddress';
|
||||
if($HTTP_POST_VARS["remove_mailAlternateAddress"]) $bo_action='remove_mailAlternateAddress';
|
||||
if($HTTP_POST_VARS["save"]) $bo_action='save';
|
||||
if($_POST["add_mailAlternateAddress"]) $bo_action='add_mailAlternateAddress';
|
||||
if($_POST["remove_mailAlternateAddress"]) $bo_action='remove_mailAlternateAddress';
|
||||
if($_POST["save"]) $bo_action='save';
|
||||
|
||||
if (!$HTTP_POST_VARS["mail"]== "") //attribute 'mail'is not allowed to be empty
|
||||
if (!$_POST["mail"]== "") //attribute 'mail'is not allowed to be empty
|
||||
{
|
||||
// error generator necessary!!
|
||||
$this->boldapmgr->saveUserData($_GET['account_id'], $formData, $bo_action);
|
||||
@ -182,9 +182,9 @@
|
||||
|
||||
function translate()
|
||||
{
|
||||
global $phpgw_info;
|
||||
|
||||
|
||||
$this->t->set_var('th_bg',$phpgw_info['theme']['th_bg']);
|
||||
$this->t->set_var('th_bg',$GLOBALS['egw_info']['theme']['th_bg']);
|
||||
|
||||
$this->t->set_var('lang_add',lang('add'));
|
||||
$this->t->set_var('lang_done',lang('Done'));
|
||||
|
@ -26,9 +26,9 @@
|
||||
|
||||
function uilog()
|
||||
{
|
||||
if ($GLOBALS['phpgw']->acl->check('error_log_access',1,'admin'))
|
||||
if ($GLOBALS['egw']->acl->check('error_log_access',1,'admin'))
|
||||
{
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php');
|
||||
$GLOBALS['egw']->redirect_link('/index.php');
|
||||
}
|
||||
|
||||
$_cols = $_POST['_cols'];
|
||||
@ -38,9 +38,9 @@
|
||||
$editable = $_GET['editable'];
|
||||
$modifytable = $_GET['modifytable'] ? $_GET['modifytable'] : $_POST['modifytable'];
|
||||
|
||||
$this->bolog = CreateObject('admin.bolog',True);
|
||||
$this->html = createobject('admin.html_tables');
|
||||
$this->t = CreateObject('phpgwapi.Template',$GLOBALS['phpgw']->common->get_tpl_dir('admin'));
|
||||
$this->bolog =& CreateObject('admin.bolog',True);
|
||||
$this->html =& CreateObject('admin.html_tables');
|
||||
$this->t =& CreateObject('phpgwapi.Template',$GLOBALS['egw']->common->get_tpl_dir('admin'));
|
||||
$this->lastid = '';
|
||||
$this->editmode = False;
|
||||
|
||||
@ -79,20 +79,20 @@
|
||||
|
||||
// Save the fields_inc values in Session and User Preferences...
|
||||
$data = array('fields_inc'=>$this->fields_inc,'layout'=>$layout);
|
||||
$GLOBALS['phpgw']->session->appsession('session_data','log',$data);
|
||||
$GLOBALS['phpgw']->preferences->read_repository();
|
||||
$GLOBALS['phpgw']->preferences->delete('log','fields_inc');
|
||||
$GLOBALS['phpgw']->preferences->add('log','fields_inc',$this->fields_inc);
|
||||
$GLOBALS['phpgw']->preferences->delete('log','layout');
|
||||
$GLOBALS['phpgw']->preferences->add('log','layout',$this->layout);
|
||||
$GLOBALS['phpgw']->preferences->save_repository();
|
||||
$GLOBALS['egw']->session->appsession('session_data','log',$data);
|
||||
$GLOBALS['egw']->preferences->read_repository();
|
||||
$GLOBALS['egw']->preferences->delete('log','fields_inc');
|
||||
$GLOBALS['egw']->preferences->add('log','fields_inc',$this->fields_inc);
|
||||
$GLOBALS['egw']->preferences->delete('log','layout');
|
||||
$GLOBALS['egw']->preferences->add('log','layout',$this->layout);
|
||||
$GLOBALS['egw']->preferences->save_repository();
|
||||
}
|
||||
|
||||
// Make sure that $this->fields_inc is filled
|
||||
if ( !isset($this->field_inc))
|
||||
{
|
||||
// Need to fill from Session Data...
|
||||
$data = $GLOBALS['phpgw']->session->appsession('session_data','log');
|
||||
$data = $GLOBALS['egw']->session->appsession('session_data','log');
|
||||
if (isset($data) && isset($data['fields_inc']))
|
||||
{
|
||||
$this->fields_inc = $data['fields_inc'];
|
||||
@ -100,15 +100,15 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
$GLOBALS['phpgw']->preferences->read_repository();
|
||||
$GLOBALS['egw']->preferences->read_repository();
|
||||
// Get From User Profile...
|
||||
if (@$GLOBALS['phpgw_info']['user']['preferences']['log']['fields_inc'])
|
||||
if (@$GLOBALS['egw_info']['user']['preferences']['log']['fields_inc'])
|
||||
{
|
||||
$fields_inc = $GLOBALS['phpgw_info']['user']['preferences']['log']['fields_inc'];
|
||||
$fields_inc = $GLOBALS['egw_info']['user']['preferences']['log']['fields_inc'];
|
||||
$this->fields_inc = $fields_inc;
|
||||
$layout = $GLOBALS['phpgw_info']['user']['preferences']['log']['layout'];
|
||||
$layout = $GLOBALS['egw_info']['user']['preferences']['log']['layout'];
|
||||
$this->layout = $layout;
|
||||
$GLOBALS['phpgw']->session->appsession('session_data','log',array('fields_inc'=>$fields_inc,'layout'=>$layout));
|
||||
$GLOBALS['egw']->session->appsession('session_data','log',array('fields_inc'=>$fields_inc,'layout'=>$layout));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -131,7 +131,7 @@
|
||||
$this->layout[]= array(0,1,2,3,4,5,6,7,10,11);
|
||||
|
||||
// Store defaults in session data...
|
||||
$GLOBALS['phpgw']->session->appsession(
|
||||
$GLOBALS['egw']->session->appsession(
|
||||
'session_data',
|
||||
'log',
|
||||
array(
|
||||
@ -156,42 +156,42 @@
|
||||
{
|
||||
// Test 1: single Error line immedeately to errorlog
|
||||
// (could be type Debug, Info, Warning, or Error)
|
||||
$GLOBALS['phpgw']->log->write(array('text'=>'I-TestWrite, write: %1','p1'=>'This message should appear in log','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['egw']->log->write(array('text'=>'I-TestWrite, write: %1','p1'=>'This message should appear in log','file'=>__FILE__,'line'=>__LINE__));
|
||||
|
||||
// Test 2: A message should appear in log even if clearstack is called
|
||||
$GLOBALS['phpgw']->log->message(array('text'=>'I-TestMsg, msg: %1','p1'=>'This message should appear in log','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['phpgw']->log->error(array('text'=>'I-TestInfo, info: %1','p1'=>'This Informational should not be in log','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['phpgw']->log->clearstack();
|
||||
$GLOBALS['phpgw']->log->commit(); // commit error stack to log...
|
||||
$GLOBALS['egw']->log->message(array('text'=>'I-TestMsg, msg: %1','p1'=>'This message should appear in log','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['egw']->log->error(array('text'=>'I-TestInfo, info: %1','p1'=>'This Informational should not be in log','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['egw']->log->clearstack();
|
||||
$GLOBALS['egw']->log->commit(); // commit error stack to log...
|
||||
|
||||
// Test 3: one debug message
|
||||
$GLOBALS['phpgw']->log->error(array('text'=>'D-Debug, dbg: %1','p1'=>'This debug statment should be in log','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['phpgw']->log->commit(); // commit error stack to log...
|
||||
$GLOBALS['egw']->log->error(array('text'=>'D-Debug, dbg: %1','p1'=>'This debug statment should be in log','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['egw']->log->commit(); // commit error stack to log...
|
||||
|
||||
// Test 3: debug and one informational
|
||||
$GLOBALS['phpgw']->log->error(array('text'=>'D-Debug, dbg: %1','p1'=>'This debug statment should be in log','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['phpgw']->log->error(array('text'=>'I-TestInfo, info: %1','p1'=>'This Informational should be in log','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['phpgw']->log->commit(); // commit error stack to log...
|
||||
$GLOBALS['egw']->log->error(array('text'=>'D-Debug, dbg: %1','p1'=>'This debug statment should be in log','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['egw']->log->error(array('text'=>'I-TestInfo, info: %1','p1'=>'This Informational should be in log','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['egw']->log->commit(); // commit error stack to log...
|
||||
|
||||
// Test 4: an informational and a Warning
|
||||
$GLOBALS['phpgw']->log->error(array('text'=>'D-Debug, dbg: %1','p1'=>'This debug statment should be in log','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['phpgw']->log->error(array('text'=>'I-TestInfo, info: %1','p1'=>'This Informational should be in log','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['phpgw']->log->error(array('text'=>'W-TestWarn, warn: %1','p1'=>'This is a test Warning','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['phpgw']->log->commit(); // commit error stack to log...
|
||||
$GLOBALS['egw']->log->error(array('text'=>'D-Debug, dbg: %1','p1'=>'This debug statment should be in log','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['egw']->log->error(array('text'=>'I-TestInfo, info: %1','p1'=>'This Informational should be in log','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['egw']->log->error(array('text'=>'W-TestWarn, warn: %1','p1'=>'This is a test Warning','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['egw']->log->commit(); // commit error stack to log...
|
||||
|
||||
// Test 5: and an error
|
||||
$GLOBALS['phpgw']->log->error(array('text'=>'D-Debug, dbg: %1','p1'=>'This debug statment should be in log','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['phpgw']->log->error(array('text'=>'I-TestInfo, info: %1','p1'=>'This Informational should be in log','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['phpgw']->log->error(array('text'=>'W-TestWarn, warn: %1','p1'=>'This is a test Warning','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['phpgw']->log->error(array('text'=>'E-TestError, err: %1','p1'=>'This is a test Error','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['phpgw']->log->commit(); // commit error stack to log...
|
||||
$GLOBALS['egw']->log->error(array('text'=>'D-Debug, dbg: %1','p1'=>'This debug statment should be in log','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['egw']->log->error(array('text'=>'I-TestInfo, info: %1','p1'=>'This Informational should be in log','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['egw']->log->error(array('text'=>'W-TestWarn, warn: %1','p1'=>'This is a test Warning','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['egw']->log->error(array('text'=>'E-TestError, err: %1','p1'=>'This is a test Error','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['egw']->log->commit(); // commit error stack to log...
|
||||
|
||||
// Test 6: and finally a fatal...
|
||||
$GLOBALS['phpgw']->log->error(array('text'=>'D-Debug, dbg: %1','p1'=>'This debug statment should be in log','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['phpgw']->log->error(array('text'=>'I-TestInfo, info: %1','p1'=>'This Informational should be in log','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['phpgw']->log->error(array('text'=>'W-TestWarn, warn: %1','p1'=>'This is a test Warning','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['phpgw']->log->error(array('text'=>'E-TestError, err: %1','p1'=>'This is a test Error','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['phpgw']->log->error(array('text'=>'F-Abend, abort: %1','p1'=>'Force abnormal termination','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['egw']->log->error(array('text'=>'D-Debug, dbg: %1','p1'=>'This debug statment should be in log','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['egw']->log->error(array('text'=>'I-TestInfo, info: %1','p1'=>'This Informational should be in log','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['egw']->log->error(array('text'=>'W-TestWarn, warn: %1','p1'=>'This is a test Warning','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['egw']->log->error(array('text'=>'E-TestError, err: %1','p1'=>'This is a test Error','file'=>__FILE__,'line'=>__LINE__));
|
||||
$GLOBALS['egw']->log->error(array('text'=>'F-Abend, abort: %1','p1'=>'Force abnormal termination','file'=>__FILE__,'line'=>__LINE__));
|
||||
}
|
||||
$this->t->set_file(array('log_list_t' => 'log.tpl'));
|
||||
|
||||
@ -260,13 +260,13 @@
|
||||
$table = $this->html->hash_table($rows,$header,$this, 'format_row');
|
||||
$this->t->set_var('event_list',$table);
|
||||
|
||||
$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin').' - '.($this->editmode?lang('Edit Table format') : lang('View error log'));
|
||||
if(!@is_object($GLOBALS['phpgw']->js))
|
||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('Admin').' - '.($this->editmode?lang('Edit Table format') : lang('View error log'));
|
||||
if(!@is_object($GLOBALS['egw']->js))
|
||||
{
|
||||
$GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript');
|
||||
$GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript');
|
||||
}
|
||||
$GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
$GLOBALS['egw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['egw']->common->egw_header();
|
||||
echo parse_navbar();
|
||||
$this->t->pfp('out','log_list_t');
|
||||
// $this->set_app_langs();
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* eGroupWare - administration *
|
||||
* http://www.egroupware.org *
|
||||
* -------------------------------------------- *
|
||||
* 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 *
|
||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
/**************************************************************************\
|
||||
* eGroupWare - administration *
|
||||
* http://www.egroupware.org *
|
||||
* -------------------------------------------- *
|
||||
* 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 *
|
||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
/* $Id$ */
|
||||
|
||||
class uimainscreen
|
||||
{
|
||||
@ -17,42 +17,42 @@
|
||||
|
||||
function uimainscreen()
|
||||
{
|
||||
$GLOBALS['phpgw']->nextmatchs = CreateObject('phpgwapi.nextmatchs');
|
||||
$GLOBALS['egw']->nextmatchs =& CreateObject('phpgwapi.nextmatchs');
|
||||
}
|
||||
|
||||
function index()
|
||||
{
|
||||
|
||||
$html = createObject('phpgwapi.html');
|
||||
$html =& CreateObject('phpgwapi.html');
|
||||
$section = addslashes($_POST['section']);
|
||||
$select_lang = addslashes($_POST['select_lang']);
|
||||
$message = addslashes($_POST['message']);
|
||||
|
||||
$acl_ok = array();
|
||||
if (!$GLOBALS['phpgw']->acl->check('mainscreen_message_access',1,'admin'))
|
||||
if (!$GLOBALS['egw']->acl->check('mainscreen_message_access',1,'admin'))
|
||||
{
|
||||
$acl_ok['mainscreen'] = True;
|
||||
}
|
||||
if (!$GLOBALS['phpgw']->acl->check('mainscreen_message_access',2,'admin'))
|
||||
if (!$GLOBALS['egw']->acl->check('mainscreen_message_access',2,'admin'))
|
||||
{
|
||||
$acl_ok['loginscreen'] = True;
|
||||
}
|
||||
if ($_POST['cancel'] && !isset($_POST['message']) ||
|
||||
!count($acl_ok) || $_POST['submit'] && !isset($acl_ok[$section]))
|
||||
!count($acl_ok) || $_POST['submit'] && !isset($acl_ok[$section]))
|
||||
{
|
||||
$GLOBALS['phpgw']->redirect_link('/admin/index.php');
|
||||
$GLOBALS['egw']->redirect_link('/admin/index.php');
|
||||
}
|
||||
|
||||
$GLOBALS['phpgw']->template->set_file(array('message' => 'mainscreen_message.tpl'));
|
||||
$GLOBALS['phpgw']->template->set_block('message','form','form');
|
||||
$GLOBALS['phpgw']->template->set_block('message','row','row');
|
||||
$GLOBALS['phpgw']->template->set_block('message','row_2','row_2');
|
||||
$GLOBALS['egw']->template->set_file(array('message' => 'mainscreen_message.tpl'));
|
||||
$GLOBALS['egw']->template->set_block('message','form','form');
|
||||
$GLOBALS['egw']->template->set_block('message','row','row');
|
||||
$GLOBALS['egw']->template->set_block('message','row_2','row_2');
|
||||
|
||||
if ($_POST['submit'])
|
||||
{
|
||||
$GLOBALS['phpgw']->db->query("DELETE FROM phpgw_lang WHERE message_id='$section" . "_message' AND app_name='"
|
||||
$GLOBALS['egw']->db->query("DELETE FROM phpgw_lang WHERE message_id='$section" . "_message' AND app_name='"
|
||||
. "$section' AND lang='$select_lang'",__LINE__,__FILE__);
|
||||
$GLOBALS['phpgw']->db->query("INSERT INTO phpgw_lang (message_id,app_name,lang,content)VALUES ('$section" . "_message','$section','$select_lang','"
|
||||
$GLOBALS['egw']->db->query("INSERT INTO phpgw_lang (message_id,app_name,lang,content)VALUES ('$section" . "_message','$section','$select_lang','"
|
||||
. $message . "')",__LINE__,__FILE__);
|
||||
$feedback_message = '<center>'.lang('message has been updated').'</center>';
|
||||
|
||||
@ -65,18 +65,18 @@
|
||||
switch ($section)
|
||||
{
|
||||
case 'mainscreen':
|
||||
$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin').' - '.lang('Edit main screen message') . ': '.strtoupper($select_lang);
|
||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('Admin').' - '.lang('Edit main screen message') . ': '.strtoupper($select_lang);
|
||||
break;
|
||||
case 'loginscreen':
|
||||
$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin').' - '.lang('Edit login screen message') . ': '.strtoupper($select_lang);
|
||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('Admin').' - '.lang('Edit login screen message') . ': '.strtoupper($select_lang);
|
||||
break;
|
||||
default:
|
||||
$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin').' - '.lang('Main screen message');
|
||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('Admin').' - '.lang('Main screen message');
|
||||
break;
|
||||
}
|
||||
if(!@is_object($GLOBALS['phpgw']->js))
|
||||
if(!@is_object($GLOBALS['egw']->js))
|
||||
{
|
||||
$GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript');
|
||||
$GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript');
|
||||
}
|
||||
|
||||
|
||||
@ -85,36 +85,36 @@
|
||||
if (empty($section))
|
||||
{
|
||||
|
||||
$GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
echo parse_navbar();
|
||||
|
||||
|
||||
$GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.index'));
|
||||
$GLOBALS['phpgw']->template->set_var('tr_color',$GLOBALS['phpgw_info']['theme']['th_bg']);
|
||||
$GLOBALS['phpgw']->template->set_var('value',' ');
|
||||
$GLOBALS['phpgw']->template->fp('rows','row_2',True);
|
||||
$GLOBALS['egw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['egw']->common->egw_header();
|
||||
echo parse_navbar();
|
||||
|
||||
|
||||
$GLOBALS['egw']->template->set_var('form_action',$GLOBALS['egw']->link('/index.php','menuaction=admin.uimainscreen.index'));
|
||||
$GLOBALS['egw']->template->set_var('tr_color',$GLOBALS['egw_info']['theme']['th_bg']);
|
||||
$GLOBALS['egw']->template->set_var('value',' ');
|
||||
$GLOBALS['egw']->template->fp('rows','row_2',True);
|
||||
|
||||
$tr_color = $GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
|
||||
$GLOBALS['phpgw']->template->set_var('tr_color',$tr_color);
|
||||
$tr_color = $GLOBALS['egw']->nextmatchs->alternate_row_color($tr_color);
|
||||
$GLOBALS['egw']->template->set_var('tr_color',$tr_color);
|
||||
|
||||
$lang_select = '<select name="select_lang">';
|
||||
$GLOBALS['phpgw']->db->query("SELECT lang,phpgw_languages.lang_name,phpgw_languages.lang_id FROM phpgw_lang,phpgw_languages WHERE "
|
||||
$GLOBALS['egw']->db->query("SELECT lang,phpgw_languages.lang_name,phpgw_languages.lang_id FROM phpgw_lang,phpgw_languages WHERE "
|
||||
. "phpgw_lang.lang=phpgw_languages.lang_id GROUP BY lang,phpgw_languages.lang_name,"
|
||||
. "phpgw_languages.lang_id ORDER BY lang",__LINE__,__FILE__);
|
||||
while ($GLOBALS['phpgw']->db->next_record())
|
||||
while ($GLOBALS['egw']->db->next_record())
|
||||
{
|
||||
$lang = $GLOBALS['phpgw']->db->f('lang');
|
||||
$lang = $GLOBALS['egw']->db->f('lang');
|
||||
$lang_select .= '<option value="' . $lang . '"'.($lang == $select_lang ? ' selected' : '').'>' .
|
||||
$lang . ' - ' . $GLOBALS['phpgw']->db->f('lang_name') . "</option>\n";
|
||||
$lang . ' - ' . $GLOBALS['egw']->db->f('lang_name') . "</option>\n";
|
||||
}
|
||||
$lang_select .= '</select>';
|
||||
$GLOBALS['phpgw']->template->set_var('label',lang('Language'));
|
||||
$GLOBALS['phpgw']->template->set_var('value',$lang_select);
|
||||
$GLOBALS['phpgw']->template->fp('rows','row',True);
|
||||
$GLOBALS['egw']->template->set_var('label',lang('Language'));
|
||||
$GLOBALS['egw']->template->set_var('value',$lang_select);
|
||||
$GLOBALS['egw']->template->fp('rows','row',True);
|
||||
|
||||
$tr_color = $GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
|
||||
$GLOBALS['phpgw']->template->set_var('tr_color',$tr_color);
|
||||
$tr_color = $GLOBALS['egw']->nextmatchs->alternate_row_color($tr_color);
|
||||
$GLOBALS['egw']->template->set_var('tr_color',$tr_color);
|
||||
$select_section = '<select name="section">'."\n";
|
||||
foreach($acl_ok as $key => $val)
|
||||
{
|
||||
@ -123,67 +123,67 @@
|
||||
($key == 'mainscreen' ? lang('Main screen') : lang("Login screen")) . "</option>\n";
|
||||
}
|
||||
$select_section .= '</select>';
|
||||
$GLOBALS['phpgw']->template->set_var('label',lang('Section'));
|
||||
$GLOBALS['phpgw']->template->set_var('value',$select_section);
|
||||
$GLOBALS['phpgw']->template->fp('rows','row',True);
|
||||
$GLOBALS['egw']->template->set_var('label',lang('Section'));
|
||||
$GLOBALS['egw']->template->set_var('value',$select_section);
|
||||
$GLOBALS['egw']->template->fp('rows','row',True);
|
||||
|
||||
$tr_color = $GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
|
||||
$GLOBALS['phpgw']->template->set_var('tr_color',$tr_color);
|
||||
$GLOBALS['phpgw']->template->set_var('value','<input type="submit" value="' . lang('Edit')
|
||||
$tr_color = $GLOBALS['egw']->nextmatchs->alternate_row_color($tr_color);
|
||||
$GLOBALS['egw']->template->set_var('tr_color',$tr_color);
|
||||
$GLOBALS['egw']->template->set_var('value','<input type="submit" value="' . lang('Edit')
|
||||
. '"><input type="submit" name="cancel" value="'. lang('cancel') .'">');
|
||||
$GLOBALS['phpgw']->template->fp('rows','row_2',True);
|
||||
$GLOBALS['egw']->template->fp('rows','row_2',True);
|
||||
}
|
||||
else
|
||||
{
|
||||
$GLOBALS['phpgw']->db->query("SELECT content FROM phpgw_lang WHERE lang='$select_lang' AND message_id='$section"
|
||||
$GLOBALS['egw']->db->query("SELECT content FROM phpgw_lang WHERE lang='$select_lang' AND message_id='$section"
|
||||
. "_message'",__LINE__,__FILE__);
|
||||
$GLOBALS['phpgw']->db->next_record();
|
||||
$GLOBALS['egw']->db->next_record();
|
||||
|
||||
$current_message = $GLOBALS['phpgw']->db->f('content');
|
||||
$current_message = $GLOBALS['egw']->db->f('content');
|
||||
|
||||
if($_POST['htmlarea'])
|
||||
{
|
||||
$text_or_htmlarea=$html->htmlarea('message',stripslashes($current_message));
|
||||
$htmlarea_button='<input type="submit" name="no-htmlarea" onclick="self.location.href=\''.$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.index&htmlarea=true').'\'" value="'.lang('disable WYSIWYG-editor').'">';
|
||||
$text_or_htmlarea=$html->htmlarea('message',stripslashes($current_message));
|
||||
$htmlarea_button='<input type="submit" name="no-htmlarea" onclick="self.location.href=\''.$GLOBALS['egw']->link('/index.php','menuaction=admin.uimainscreen.index&htmlarea=true').'\'" value="'.lang('disable WYSIWYG-editor').'">';
|
||||
}
|
||||
else
|
||||
{
|
||||
$text_or_htmlarea='<textarea name="message" style="width:100%; min-width:350px; height:300px;" wrap="virtual">' . stripslashes($current_message) . '</textarea>';
|
||||
$htmlarea_button='<input type="submit" name="htmlarea" onclick="self.location.href=\''.$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.index&htmlarea=true').'\'" value="'.lang('activate WYSIWYG-editor').'">';
|
||||
$text_or_htmlarea='<textarea name="message" style="width:100%; min-width:350px; height:300px;" wrap="virtual">' . stripslashes($current_message) . '</textarea>';
|
||||
$htmlarea_button='<input type="submit" name="htmlarea" onclick="self.location.href=\''.$GLOBALS['egw']->link('/index.php','menuaction=admin.uimainscreen.index&htmlarea=true').'\'" value="'.lang('activate WYSIWYG-editor').'">';
|
||||
|
||||
}
|
||||
|
||||
$GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
$GLOBALS['egw']->js->validate_file('jscode','openwindow','admin');
|
||||
$GLOBALS['egw']->common->egw_header();
|
||||
echo parse_navbar();
|
||||
|
||||
$GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.index'));
|
||||
$GLOBALS['phpgw']->template->set_var('select_lang',$select_lang);
|
||||
$GLOBALS['phpgw']->template->set_var('section',$section);
|
||||
$GLOBALS['phpgw']->template->set_var('tr_color',$GLOBALS['phpgw_info']['theme']['th_bg']);
|
||||
$GLOBALS['phpgw']->template->set_var('value',' ');
|
||||
$GLOBALS['phpgw']->template->fp('rows','row_2',True);
|
||||
$GLOBALS['egw']->template->set_var('form_action',$GLOBALS['egw']->link('/index.php','menuaction=admin.uimainscreen.index'));
|
||||
$GLOBALS['egw']->template->set_var('select_lang',$select_lang);
|
||||
$GLOBALS['egw']->template->set_var('section',$section);
|
||||
$GLOBALS['egw']->template->set_var('tr_color',$GLOBALS['egw_info']['theme']['th_bg']);
|
||||
$GLOBALS['egw']->template->set_var('value',' ');
|
||||
$GLOBALS['egw']->template->fp('rows','row_2',True);
|
||||
|
||||
$tr_color = $GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
|
||||
$GLOBALS['phpgw']->template->set_var('tr_color',$tr_color);
|
||||
$tr_color = $GLOBALS['egw']->nextmatchs->alternate_row_color($tr_color);
|
||||
$GLOBALS['egw']->template->set_var('tr_color',$tr_color);
|
||||
|
||||
|
||||
$GLOBALS['phpgw']->template->set_var('value',$text_or_htmlarea);
|
||||
$GLOBALS['egw']->template->set_var('value',$text_or_htmlarea);
|
||||
|
||||
|
||||
|
||||
$GLOBALS['phpgw']->template->fp('rows','row_2',True);
|
||||
$GLOBALS['egw']->template->fp('rows','row_2',True);
|
||||
|
||||
$tr_color = $GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
|
||||
$GLOBALS['phpgw']->template->set_var('tr_color',$tr_color);
|
||||
$GLOBALS['phpgw']->template->set_var('value','<input type="submit" name="submit" value="' . lang('Save')
|
||||
$tr_color = $GLOBALS['egw']->nextmatchs->alternate_row_color($tr_color);
|
||||
$GLOBALS['egw']->template->set_var('tr_color',$tr_color);
|
||||
$GLOBALS['egw']->template->set_var('value','<input type="submit" name="submit" value="' . lang('Save')
|
||||
. '"><input type="submit" name="cancel" value="'. lang('cancel') .'">'.$htmlarea_button);
|
||||
$GLOBALS['phpgw']->template->fp('rows','row_2',True);
|
||||
$GLOBALS['egw']->template->fp('rows','row_2',True);
|
||||
}
|
||||
|
||||
$GLOBALS['phpgw']->template->set_var('lang_cancel',lang('Cancel'));
|
||||
$GLOBALS['phpgw']->template->set_var('error_message',$feedback_message);
|
||||
$GLOBALS['phpgw']->template->pfp('out','form');
|
||||
$GLOBALS['egw']->template->set_var('lang_cancel',lang('Cancel'));
|
||||
$GLOBALS['egw']->template->set_var('error_message',$feedback_message);
|
||||
$GLOBALS['egw']->template->pfp('out','form');
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* eGroupWare - Administration *
|
||||
* http://www.egroupware.org *
|
||||
* -------------------------------------------- *
|
||||
* 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 *
|
||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
/**************************************************************************\
|
||||
* eGroupWare - Administration *
|
||||
* http://www.egroupware.org *
|
||||
* -------------------------------------------- *
|
||||
* 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 *
|
||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
/* $Id$ */
|
||||
|
||||
class uimenuclass
|
||||
{
|
||||
@ -18,14 +18,14 @@
|
||||
|
||||
function uimenuclass()
|
||||
{
|
||||
$this->t = CreateObject('phpgwapi.Template',$GLOBALS['phpgw']->common->get_tpl_dir('admin'));
|
||||
$this->t =& CreateObject('phpgwapi.Template',$GLOBALS['egw']->common->get_tpl_dir('admin'));
|
||||
|
||||
$this->t->set_file(array('menurow' => 'menurow.tpl'));
|
||||
$this->t->set_block('menurow','menu_links','menu_links');
|
||||
$this->t->set_block('menurow','link_row','link_row');
|
||||
|
||||
$this->rowColor[0] = $GLOBALS['phpgw_info']['theme']['row_on'];
|
||||
$this->rowColor[1] = $GLOBALS['phpgw_info']['theme']['row_off'];
|
||||
$this->rowColor[0] = $GLOBALS['egw_info']['theme']['row_on'];
|
||||
$this->rowColor[1] = $GLOBALS['egw_info']['theme']['row_off'];
|
||||
}
|
||||
|
||||
function section_item($pref_link='',$pref_text='', $class)
|
||||
@ -52,11 +52,11 @@
|
||||
{
|
||||
if (!empty($value['extradata']))
|
||||
{
|
||||
$link = $GLOBALS['phpgw']->link($value['url'],'account_id=' . get_var('account_id',array('GET','POST')) . '&' . $value['extradata']);
|
||||
$link = $GLOBALS['egw']->link($value['url'],'account_id=' . get_var('account_id',array('GET','POST')) . '&' . $value['extradata']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$link = $GLOBALS['phpgw']->link($value['url'],'account_id=' . get_var('account_id',array('GET','POST')));
|
||||
$link = $GLOBALS['egw']->link($value['url'],'account_id=' . get_var('account_id',array('GET','POST')));
|
||||
}
|
||||
$this->section_item($link,lang($value['description']),($i%2) ? "row_on": "row_off");
|
||||
$i++;
|
||||
@ -70,7 +70,7 @@
|
||||
{
|
||||
$destination = 'groups';
|
||||
}
|
||||
$this->t->set_var('link_done',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.list_'.$destination));
|
||||
$this->t->set_var('link_done',$GLOBALS['egw']->link('/index.php','menuaction=admin.uiaccounts.list_'.$destination));
|
||||
$this->t->set_var('lang_done',lang('Back'));
|
||||
|
||||
$this->t->set_var('row_on',$this->rowColor[0]);
|
||||
@ -115,7 +115,7 @@
|
||||
break;
|
||||
}
|
||||
|
||||
$GLOBALS['phpgw']->hooks->process($_hookname);
|
||||
$GLOBALS['egw']->hooks->process($_hookname);
|
||||
if (count($GLOBALS['menuData']) >= 1)
|
||||
{
|
||||
$result = $this->display_section($GLOBALS['menuData']);
|
||||
|
@ -1,15 +1,15 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* eGroupWare - phpgroupware Peer Servers *
|
||||
* http://www.egroupware.org *
|
||||
* ----------------------------------------------- *
|
||||
* 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 *
|
||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
/**************************************************************************\
|
||||
* eGroupWare - phpgroupware Peer Servers *
|
||||
* http://www.egroupware.org *
|
||||
* ----------------------------------------------- *
|
||||
* 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 *
|
||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
/* $Id$ */
|
||||
|
||||
class uiserver
|
||||
{
|
||||
@ -33,18 +33,18 @@
|
||||
|
||||
function uiserver()
|
||||
{
|
||||
if ($GLOBALS['phpgw']->acl->check('peer_server_access',1,'admin'))
|
||||
if ($GLOBALS['egw']->acl->check('peer_server_access',1,'admin'))
|
||||
{
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php');
|
||||
$GLOBALS['egw']->redirect_link('/index.php');
|
||||
}
|
||||
$this->acl_search = !$GLOBALS['phpgw']->acl->check('peer_server_access',2,'admin');
|
||||
$this->acl_add = !$GLOBALS['phpgw']->acl->check('peer_server_access',4,'admin');
|
||||
$this->acl_view = !$GLOBALS['phpgw']->acl->check('peer_server_access',8,'admin');
|
||||
$this->acl_edit = !$GLOBALS['phpgw']->acl->check('peer_server_access',16,'admin');
|
||||
$this->acl_delete = !$GLOBALS['phpgw']->acl->check('peer_server_access',32,'admin');
|
||||
$this->acl_search = !$GLOBALS['egw']->acl->check('peer_server_access',2,'admin');
|
||||
$this->acl_add = !$GLOBALS['egw']->acl->check('peer_server_access',4,'admin');
|
||||
$this->acl_view = !$GLOBALS['egw']->acl->check('peer_server_access',8,'admin');
|
||||
$this->acl_edit = !$GLOBALS['egw']->acl->check('peer_server_access',16,'admin');
|
||||
$this->acl_delete = !$GLOBALS['egw']->acl->check('peer_server_access',32,'admin');
|
||||
|
||||
$this->bo = createobject('admin.boserver',True);
|
||||
$this->nextmatchs = createobject('phpgwapi.nextmatchs');
|
||||
$this->bo =& CreateObject('admin.boserver',True);
|
||||
$this->nextmatchs =& CreateObject('phpgwapi.nextmatchs');
|
||||
|
||||
$this->start = $this->bo->start;
|
||||
$this->limit = $this->bo->limit;
|
||||
@ -104,38 +104,38 @@
|
||||
|
||||
function list_servers()
|
||||
{
|
||||
$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin').' - '.lang('Peer Servers');
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('Admin').' - '.lang('Peer Servers');
|
||||
$GLOBALS['egw']->common->egw_header();
|
||||
echo parse_navbar();
|
||||
|
||||
$GLOBALS['phpgw']->template->set_file(array('server_list_t' => 'listservers.tpl'));
|
||||
$GLOBALS['phpgw']->template->set_block('server_list_t','server_list','list');
|
||||
$GLOBALS['egw']->template->set_file(array('server_list_t' => 'listservers.tpl'));
|
||||
$GLOBALS['egw']->template->set_block('server_list_t','server_list','list');
|
||||
if (!$this->acl_search)
|
||||
{
|
||||
$GLOBALS['phpgw']->template->set_block('server_list_t','search','searchhandle');
|
||||
$GLOBALS['egw']->template->set_block('server_list_t','search','searchhandle');
|
||||
}
|
||||
if (!$this->acl_add)
|
||||
{
|
||||
$GLOBALS['phpgw']->template->set_block('server_list_t','add','addhandle');
|
||||
$GLOBALS['egw']->template->set_block('server_list_t','add','addhandle');
|
||||
}
|
||||
|
||||
$GLOBALS['phpgw']->template->set_var('lang_action',lang('Server List'));
|
||||
$GLOBALS['phpgw']->template->set_var('add_action',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiserver.edit'));
|
||||
$GLOBALS['phpgw']->template->set_var('lang_add',lang('Add'));
|
||||
$GLOBALS['phpgw']->template->set_var('lang_search',lang('Search'));
|
||||
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiserver.list_servers'));
|
||||
$GLOBALS['phpgw']->template->set_var('lang_done',lang('Cancel'));
|
||||
$GLOBALS['phpgw']->template->set_var('doneurl',$GLOBALS['phpgw']->link('/admin/index.php'));
|
||||
$GLOBALS['egw']->template->set_var('lang_action',lang('Server List'));
|
||||
$GLOBALS['egw']->template->set_var('add_action',$GLOBALS['egw']->link('/index.php','menuaction=admin.uiserver.edit'));
|
||||
$GLOBALS['egw']->template->set_var('lang_add',lang('Add'));
|
||||
$GLOBALS['egw']->template->set_var('lang_search',lang('Search'));
|
||||
$GLOBALS['egw']->template->set_var('actionurl',$GLOBALS['egw']->link('/index.php','menuaction=admin.uiserver.list_servers'));
|
||||
$GLOBALS['egw']->template->set_var('lang_done',lang('Cancel'));
|
||||
$GLOBALS['egw']->template->set_var('doneurl',$GLOBALS['egw']->link('/admin/index.php'));
|
||||
|
||||
if(!$this->start)
|
||||
{
|
||||
$this->start = 0;
|
||||
}
|
||||
|
||||
if($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] &&
|
||||
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] > 0)
|
||||
if($GLOBALS['egw_info']['user']['preferences']['common']['maxmatchs'] &&
|
||||
$GLOBALS['egw_info']['user']['preferences']['common']['maxmatchs'] > 0)
|
||||
{
|
||||
$this->limit = $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
|
||||
$this->limit = $GLOBALS['egw_info']['user']['preferences']['common']['maxmatchs'];
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -147,54 +147,54 @@
|
||||
|
||||
$left = $this->nextmatchs->left('/index.php',$this->start,$this->bo->total,'menuaction=admin.uiserver.list_servers');
|
||||
$right = $this->nextmatchs->right('/index.php',$this->start,$this->bo->total,'menuaction=admin.uiserver.list_servers');
|
||||
$GLOBALS['phpgw']->template->set_var('left',$left);
|
||||
$GLOBALS['phpgw']->template->set_var('right',$right);
|
||||
$GLOBALS['egw']->template->set_var('left',$left);
|
||||
$GLOBALS['egw']->template->set_var('right',$right);
|
||||
|
||||
$GLOBALS['phpgw']->template->set_var('lang_showing',$this->nextmatchs->show_hits($this->bo->total,$this->start));
|
||||
$GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
|
||||
$GLOBALS['egw']->template->set_var('lang_showing',$this->nextmatchs->show_hits($this->bo->total,$this->start));
|
||||
$GLOBALS['egw']->template->set_var('th_bg',$GLOBALS['egw_info']['theme']['th_bg']);
|
||||
|
||||
$GLOBALS['phpgw']->template->set_var('sort_name',
|
||||
$GLOBALS['egw']->template->set_var('sort_name',
|
||||
$this->nextmatchs->show_sort_order($this->sort,'server_name',$this->order,'/index.php',lang('Name'),'&menuaction=admin.uiserver.list_servers'));
|
||||
$GLOBALS['phpgw']->template->set_var('sort_url',
|
||||
$GLOBALS['egw']->template->set_var('sort_url',
|
||||
$this->nextmatchs->show_sort_order($this->sort,'server_url',$this->order,'/index.php',lang('URL'),'&menuaction=admin.uiserver.list_servers'));
|
||||
$GLOBALS['phpgw']->template->set_var('sort_mode',
|
||||
$GLOBALS['egw']->template->set_var('sort_mode',
|
||||
$this->nextmatchs->show_sort_order($this->sort,'server_mode',$this->order,'/index.php',lang('Mode'),'&menuaction=admin.uiserver.list_servers'));
|
||||
$GLOBALS['phpgw']->template->set_var('sort_security',
|
||||
$GLOBALS['egw']->template->set_var('sort_security',
|
||||
$this->nextmatchs->show_sort_order($this->sort,'server_security',$this->order,'/index.php',lang('Security'),'&menuaction=admin.uiserver.list_servers'));
|
||||
$GLOBALS['phpgw']->template->set_var('lang_default',lang('Default'));
|
||||
$GLOBALS['phpgw']->template->set_var('lang_edit',lang('Edit'));
|
||||
$GLOBALS['phpgw']->template->set_var('lang_delete',lang('Delete'));
|
||||
$GLOBALS['egw']->template->set_var('lang_default',lang('Default'));
|
||||
$GLOBALS['egw']->template->set_var('lang_edit',lang('Edit'));
|
||||
$GLOBALS['egw']->template->set_var('lang_delete',lang('Delete'));
|
||||
|
||||
while(list($key,$server) = @each($servers))
|
||||
{
|
||||
$tr_color = $this->nextmatchs->alternate_row_color($tr_color);
|
||||
$GLOBALS['phpgw']->template->set_var('tr_color',$tr_color);
|
||||
$GLOBALS['egw']->template->set_var('tr_color',$tr_color);
|
||||
$server_id = $server['server_id'];
|
||||
|
||||
$GLOBALS['phpgw']->template->set_var(array(
|
||||
'server_name' => $GLOBALS['phpgw']->strip_html($server['server_name']),
|
||||
'server_url' => $GLOBALS['phpgw']->strip_html($server['server_url']),
|
||||
$GLOBALS['egw']->template->set_var(array(
|
||||
'server_name' => $GLOBALS['egw']->strip_html($server['server_name']),
|
||||
'server_url' => $GLOBALS['egw']->strip_html($server['server_url']),
|
||||
'server_security' => $server['server_security'] ? strtoupper($server['server_security']) : lang('none'),
|
||||
'server_mode' => strtoupper($server['server_mode'])
|
||||
));
|
||||
|
||||
$GLOBALS['phpgw']->template->set_var('edit','');
|
||||
$GLOBALS['phpgw']->template->set_var('delete','');
|
||||
$GLOBALS['egw']->template->set_var('edit','');
|
||||
$GLOBALS['egw']->template->set_var('delete','');
|
||||
if ($this->acl_edit)
|
||||
{
|
||||
$GLOBALS['phpgw']->template->set_var('edit','<a href="'.$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiserver.edit&server_id=' . $server_id).
|
||||
$GLOBALS['egw']->template->set_var('edit','<a href="'.$GLOBALS['egw']->link('/index.php','menuaction=admin.uiserver.edit&server_id=' . $server_id).
|
||||
'">'.lang('Edit').'</a>');
|
||||
}
|
||||
if ($this->acl_delete)
|
||||
{
|
||||
$GLOBALS['phpgw']->template->set_var('delete','<a href="'.$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiserver.delete&server_id=' . $server_id).
|
||||
$GLOBALS['egw']->template->set_var('delete','<a href="'.$GLOBALS['egw']->link('/index.php','menuaction=admin.uiserver.delete&server_id=' . $server_id).
|
||||
'">'.lang('Delete').'</a>');
|
||||
}
|
||||
$GLOBALS['phpgw']->template->parse('list','server_list',True);
|
||||
$GLOBALS['egw']->template->parse('list','server_list',True);
|
||||
}
|
||||
|
||||
$GLOBALS['phpgw']->template->parse('out','server_list_t',True);
|
||||
$GLOBALS['phpgw']->template->p('out');
|
||||
$GLOBALS['egw']->template->parse('out','server_list_t',True);
|
||||
$GLOBALS['egw']->template->p('out');
|
||||
}
|
||||
|
||||
/* This function handles add or edit */
|
||||
@ -213,16 +213,16 @@
|
||||
|
||||
if (!$server_id && !$this->acl_add || $server_id && !$this->acl_edit)
|
||||
{
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php');
|
||||
$GLOBALS['egw']->redirect_link('/index.php');
|
||||
}
|
||||
$is = CreateObject('phpgwapi.interserver');
|
||||
$is =& CreateObject('phpgwapi.interserver');
|
||||
|
||||
$GLOBALS['phpgw']->template->set_file(array('form' => 'server_form.tpl'));
|
||||
$GLOBALS['egw']->template->set_file(array('form' => 'server_form.tpl'));
|
||||
|
||||
if (!$this->acl_delete || !$server_id)
|
||||
{
|
||||
$GLOBALS['phpgw']->template->set_block('form','delete','deletehandle');
|
||||
$GLOBALS['phpgw']->template->set_var('deletehandle','');
|
||||
$GLOBALS['egw']->template->set_block('form','delete','deletehandle');
|
||||
$GLOBALS['egw']->template->set_var('deletehandle','');
|
||||
}
|
||||
$server = $this->bo->read($server_id);
|
||||
|
||||
@ -267,73 +267,73 @@
|
||||
|
||||
if ($errorcount)
|
||||
{
|
||||
$GLOBALS['phpgw']->template->set_var('message',$GLOBALS['phpgw']->common->error_list($error));
|
||||
$GLOBALS['egw']->template->set_var('message',$GLOBALS['egw']->common->error_list($error));
|
||||
}
|
||||
if (($_POST['save']) && (!$error) && (!$errorcount))
|
||||
{
|
||||
if($server_id)
|
||||
{
|
||||
$GLOBALS['phpgw']->template->set_var('message',lang('Server %1 has been updated',$_POST['server_name']));
|
||||
$GLOBALS['egw']->template->set_var('message',lang('Server %1 has been updated',$_POST['server_name']));
|
||||
}
|
||||
else
|
||||
{
|
||||
$GLOBALS['phpgw']->template->set_var('message',lang('Server %1 has been added',$_POST['server_name']));
|
||||
$GLOBALS['egw']->template->set_var('message',lang('Server %1 has been added',$_POST['server_name']));
|
||||
}
|
||||
}
|
||||
if ((!$_POST['save']) && (!$error) && (!$errorcount))
|
||||
{
|
||||
$GLOBALS['phpgw']->template->set_var('message','');
|
||||
$GLOBALS['egw']->template->set_var('message','');
|
||||
}
|
||||
|
||||
$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin').' - '.($server_id ? lang('Edit Peer Server') : lang('Add Peer Server'));
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('Admin').' - '.($server_id ? lang('Edit Peer Server') : lang('Add Peer Server'));
|
||||
$GLOBALS['egw']->common->egw_header();
|
||||
echo parse_navbar();
|
||||
|
||||
$GLOBALS['phpgw']->template->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiserver.edit'));
|
||||
$GLOBALS['egw']->template->set_var('actionurl',$GLOBALS['egw']->link('/index.php','menuaction=admin.uiserver.edit'));
|
||||
|
||||
$GLOBALS['phpgw']->template->set_var('lang_name',lang('Server name'));
|
||||
$GLOBALS['phpgw']->template->set_var('lang_url',lang('Server URL'));
|
||||
$GLOBALS['phpgw']->template->set_var('lang_trust',lang('Trust Level'));
|
||||
$GLOBALS['phpgw']->template->set_var('lang_relationship',lang('Trust Relationship'));
|
||||
$GLOBALS['phpgw']->template->set_var('lang_username',lang('Server Username'));
|
||||
$GLOBALS['phpgw']->template->set_var('lang_password',lang('Server Password'));
|
||||
$GLOBALS['phpgw']->template->set_var('lang_mode',lang('Server Type(mode)'));
|
||||
$GLOBALS['phpgw']->template->set_var('lang_security',lang('Security'));
|
||||
$GLOBALS['phpgw']->template->set_var('lang_admin_name',lang('Admin Name'));
|
||||
$GLOBALS['phpgw']->template->set_var('lang_admin_email',lang('Admin Email'));
|
||||
$GLOBALS['phpgw']->template->set_var('lang_save',lang('Save'));
|
||||
$GLOBALS['phpgw']->template->set_var('lang_add',lang('Add'));
|
||||
$GLOBALS['phpgw']->template->set_var('lang_default',lang('Default'));
|
||||
$GLOBALS['phpgw']->template->set_var('lang_reset',lang('Clear Form'));
|
||||
$GLOBALS['phpgw']->template->set_var('lang_done',lang('Cancel'));
|
||||
$GLOBALS['phpgw']->template->set_var('lang_delete',lang('Delete'));
|
||||
$GLOBALS['egw']->template->set_var('lang_name',lang('Server name'));
|
||||
$GLOBALS['egw']->template->set_var('lang_url',lang('Server URL'));
|
||||
$GLOBALS['egw']->template->set_var('lang_trust',lang('Trust Level'));
|
||||
$GLOBALS['egw']->template->set_var('lang_relationship',lang('Trust Relationship'));
|
||||
$GLOBALS['egw']->template->set_var('lang_username',lang('Server Username'));
|
||||
$GLOBALS['egw']->template->set_var('lang_password',lang('Server Password'));
|
||||
$GLOBALS['egw']->template->set_var('lang_mode',lang('Server Type(mode)'));
|
||||
$GLOBALS['egw']->template->set_var('lang_security',lang('Security'));
|
||||
$GLOBALS['egw']->template->set_var('lang_admin_name',lang('Admin Name'));
|
||||
$GLOBALS['egw']->template->set_var('lang_admin_email',lang('Admin Email'));
|
||||
$GLOBALS['egw']->template->set_var('lang_save',lang('Save'));
|
||||
$GLOBALS['egw']->template->set_var('lang_add',lang('Add'));
|
||||
$GLOBALS['egw']->template->set_var('lang_default',lang('Default'));
|
||||
$GLOBALS['egw']->template->set_var('lang_reset',lang('Clear Form'));
|
||||
$GLOBALS['egw']->template->set_var('lang_done',lang('Cancel'));
|
||||
$GLOBALS['egw']->template->set_var('lang_delete',lang('Delete'));
|
||||
|
||||
$GLOBALS['phpgw']->template->set_var('server_name',$server['server_name']);
|
||||
$GLOBALS['phpgw']->template->set_var('server_url',$server['server_url']);
|
||||
$GLOBALS['phpgw']->template->set_var('server_username',$server['username']);
|
||||
$GLOBALS['phpgw']->template->set_var('server_mode',$this->formatted_list('server_mode',$is->server_modes,$server['server_mode']));
|
||||
$GLOBALS['phpgw']->template->set_var('server_security',$this->formatted_list('server_security',$is->security_types,$server['server_security']));
|
||||
$GLOBALS['phpgw']->template->set_var('ssl_note', function_exists('curl_init') ? ' ' : lang('Note: SSL available only if PHP is compiled with curl support'));
|
||||
$GLOBALS['phpgw']->template->set_var('pass_note',$server_id ? '<br>'.lang('(Stored password will not be shown here)') : '');
|
||||
$GLOBALS['phpgw']->template->set_var('trust_level',$this->formatted_list('trust_level',$is->trust_levels,$server['trust_level']));
|
||||
$GLOBALS['phpgw']->template->set_var('trust_relationship',$this->formatted_list('trust_rel',$is->trust_relationships,$server['trust_rel'],True));
|
||||
$GLOBALS['phpgw']->template->set_var('admin_name',$GLOBALS['phpgw']->strip_html($server['admin_name']));
|
||||
$GLOBALS['phpgw']->template->set_var('admin_email',$GLOBALS['phpgw']->strip_html($server['admin_email']));
|
||||
$GLOBALS['phpgw']->template->set_var('server_id',$server_id);
|
||||
$GLOBALS['egw']->template->set_var('server_name',$server['server_name']);
|
||||
$GLOBALS['egw']->template->set_var('server_url',$server['server_url']);
|
||||
$GLOBALS['egw']->template->set_var('server_username',$server['username']);
|
||||
$GLOBALS['egw']->template->set_var('server_mode',$this->formatted_list('server_mode',$is->server_modes,$server['server_mode']));
|
||||
$GLOBALS['egw']->template->set_var('server_security',$this->formatted_list('server_security',$is->security_types,$server['server_security']));
|
||||
$GLOBALS['egw']->template->set_var('ssl_note', function_exists('curl_init') ? ' ' : lang('Note: SSL available only if PHP is compiled with curl support'));
|
||||
$GLOBALS['egw']->template->set_var('pass_note',$server_id ? '<br>'.lang('(Stored password will not be shown here)') : '');
|
||||
$GLOBALS['egw']->template->set_var('trust_level',$this->formatted_list('trust_level',$is->trust_levels,$server['trust_level']));
|
||||
$GLOBALS['egw']->template->set_var('trust_relationship',$this->formatted_list('trust_rel',$is->trust_relationships,$server['trust_rel'],True));
|
||||
$GLOBALS['egw']->template->set_var('admin_name',$GLOBALS['egw']->strip_html($server['admin_name']));
|
||||
$GLOBALS['egw']->template->set_var('admin_email',$GLOBALS['egw']->strip_html($server['admin_email']));
|
||||
$GLOBALS['egw']->template->set_var('server_id',$server_id);
|
||||
|
||||
$GLOBALS['phpgw']->template->set_var(array(
|
||||
'th' => $GLOBALS['phpgw_info']['theme']['th_bg'],
|
||||
'row_on' => $GLOBALS['phpgw_info']['theme']['row_on'],
|
||||
'row_off' => $GLOBALS['phpgw_info']['theme']['row_off']
|
||||
$GLOBALS['egw']->template->set_var(array(
|
||||
'th' => $GLOBALS['egw_info']['theme']['th_bg'],
|
||||
'row_on' => $GLOBALS['egw_info']['theme']['row_on'],
|
||||
'row_off' => $GLOBALS['egw_info']['theme']['row_off']
|
||||
));
|
||||
$GLOBALS['phpgw']->template->pparse('phpgw_body','form');
|
||||
$GLOBALS['egw']->template->pparse('phpgw_body','form');
|
||||
}
|
||||
|
||||
function delete()
|
||||
{
|
||||
if (!$this->acl_delete)
|
||||
{
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php');
|
||||
$GLOBALS['egw']->redirect_link('/index.php');
|
||||
}
|
||||
$server_id = get_var('server_id',array('POST','GET'));
|
||||
if ($_POST['yes'] || $_POST['no'])
|
||||
@ -342,23 +342,23 @@
|
||||
{
|
||||
$this->bo->delete($server_id);
|
||||
}
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uiserver.list_servers');
|
||||
$GLOBALS['egw']->redirect_link('/index.php','menuaction=admin.uiserver.list_servers');
|
||||
}
|
||||
else
|
||||
{
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
$GLOBALS['egw']->common->egw_header();
|
||||
echo parse_navbar();
|
||||
|
||||
$GLOBALS['phpgw']->template->set_file(array('server_delete' => 'delete_common.tpl'));
|
||||
$GLOBALS['egw']->template->set_file(array('server_delete' => 'delete_common.tpl'));
|
||||
|
||||
$GLOBALS['phpgw']->template->set_var(array(
|
||||
'form_action' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiserver.delete'),
|
||||
$GLOBALS['egw']->template->set_var(array(
|
||||
'form_action' => $GLOBALS['egw']->link('/index.php','menuaction=admin.uiserver.delete'),
|
||||
'hidden_vars' => '<input type="hidden" name="server_id" value="' . $server_id . '"><script>document.yesbutton.yesbutton.focus()</script>',
|
||||
'messages' => lang('Are you sure you want to delete this server?'),
|
||||
'no' => lang('No'),
|
||||
'yes' => lang('Yes'),
|
||||
));
|
||||
$GLOBALS['phpgw']->template->pparse('phpgw_body','server_delete');
|
||||
$GLOBALS['egw']->template->pparse('phpgw_body','server_delete');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
$GLOBALS['pref']->change('common','maxmatchs','15');
|
||||
$GLOBALS['pref']->change('common','theme','default');
|
||||
$GLOBALS['pref']->change('common','tz_offset',0);
|
||||
$GLOBALS['pref']->change('common','dateformat','m/d/Y');
|
||||
$GLOBALS['pref']->change('common','timeformat',12);
|
||||
$GLOBALS['pref']->change('common','lang','en');
|
||||
$GLOBALS['pref']->change('common','maxmatchs','15');
|
||||
$GLOBALS['pref']->change('common','theme','default');
|
||||
$GLOBALS['pref']->change('common','tz_offset',0);
|
||||
$GLOBALS['pref']->change('common','dateformat','m/d/Y');
|
||||
$GLOBALS['pref']->change('common','timeformat',12);
|
||||
$GLOBALS['pref']->change('common','lang','en');
|
||||
?>
|
||||
|
@ -11,75 +11,75 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
if (! $GLOBALS['phpgw']->acl->check('site_config_access',1,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('site_config_access',1,'admin'))
|
||||
{
|
||||
$file['Site Configuration'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=admin');
|
||||
$file['Site Configuration'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uiconfig.index&appname=admin');
|
||||
}
|
||||
|
||||
/* disabled it, til it does something useful
|
||||
if (! $GLOBALS['phpgw']->acl->check('peer_server_access',1,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('peer_server_access',1,'admin'))
|
||||
{
|
||||
$file['Peer Servers'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiserver.list_servers');
|
||||
$file['Peer Servers'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uiserver.list_servers');
|
||||
}
|
||||
*/
|
||||
if (! $GLOBALS['phpgw']->acl->check('account_access',1,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('account_access',1,'admin'))
|
||||
{
|
||||
$file['User Accounts'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.list_users');
|
||||
$file['User Accounts'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uiaccounts.list_users');
|
||||
}
|
||||
|
||||
if (! $GLOBALS['phpgw']->acl->check('group_access',1,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('group_access',1,'admin'))
|
||||
{
|
||||
$file['User Groups'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.list_groups');
|
||||
$file['User Groups'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uiaccounts.list_groups');
|
||||
}
|
||||
|
||||
if (! $GLOBALS['phpgw']->acl->check('applications_access',1,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('applications_access',1,'admin'))
|
||||
{
|
||||
$file['Applications'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.get_list');
|
||||
$file['Applications'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uiapplications.get_list');
|
||||
}
|
||||
|
||||
if (! $GLOBALS['phpgw']->acl->check('global_categories_access',1,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('global_categories_access',1,'admin'))
|
||||
{
|
||||
$file['Global Categories'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index');
|
||||
$file['Global Categories'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uicategories.index');
|
||||
}
|
||||
|
||||
if (!$GLOBALS['phpgw']->acl->check('mainscreen_message_access',1,'admin') || !$GLOBALS['phpgw']->acl->check('mainscreen_message_access',2,'admin'))
|
||||
if (!$GLOBALS['egw']->acl->check('mainscreen_message_access',1,'admin') || !$GLOBALS['egw']->acl->check('mainscreen_message_access',2,'admin'))
|
||||
{
|
||||
$file['Change Main Screen Message'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.index');
|
||||
$file['Change Main Screen Message'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uimainscreen.index');
|
||||
}
|
||||
|
||||
if (! $GLOBALS['phpgw']->acl->check('current_sessions_access',1,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('current_sessions_access',1,'admin'))
|
||||
{
|
||||
$file['View Sessions'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicurrentsessions.list_sessions');
|
||||
$file['View Sessions'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uicurrentsessions.list_sessions');
|
||||
}
|
||||
|
||||
if (! $GLOBALS['phpgw']->acl->check('access_log_access',1,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('access_log_access',1,'admin'))
|
||||
{
|
||||
$file['View Access Log'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccess_history.list_history');
|
||||
$file['View Access Log'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uiaccess_history.list_history');
|
||||
}
|
||||
|
||||
if (! $GLOBALS['phpgw']->acl->check('error_log_access',1,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('error_log_access',1,'admin'))
|
||||
{
|
||||
$file['View Error Log'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uilog.list_log');
|
||||
$file['View Error Log'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uilog.list_log');
|
||||
}
|
||||
|
||||
if (! $GLOBALS['phpgw']->acl->check('applications_access',16,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('applications_access',16,'admin'))
|
||||
{
|
||||
$file['Find and Register all Application Hooks'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.register_all_hooks');
|
||||
$file['Find and Register all Application Hooks'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uiapplications.register_all_hooks');
|
||||
}
|
||||
|
||||
if (! $GLOBALS['phpgw']->acl->check('asyncservice_access',1,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('asyncservice_access',1,'admin'))
|
||||
{
|
||||
$file['Asynchronous timed services'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiasyncservice.index');
|
||||
$file['Asynchronous timed services'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uiasyncservice.index');
|
||||
}
|
||||
|
||||
if (! $GLOBALS['phpgw']->acl->check('db_backup_access',1,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('db_backup_access',1,'admin'))
|
||||
{
|
||||
$file['DB backup and restore'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.admin_db_backup.index');
|
||||
$file['DB backup and restore'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.admin_db_backup.index');
|
||||
}
|
||||
|
||||
if (! $GLOBALS['phpgw']->acl->check('info_access',1,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('info_access',1,'admin'))
|
||||
{
|
||||
$file['phpInfo'] = "javascript:openwindow('" . $GLOBALS['phpgw']->link('/admin/phpinfo.php') . "')"; //$GLOBALS['phpgw']->link('/admin/phpinfo.php');
|
||||
$file['phpInfo'] = "javascript:openwindow('" . $GLOBALS['egw']->link('/admin/phpinfo.php') . "')"; //$GLOBALS['egw']->link('/admin/phpinfo.php');
|
||||
}
|
||||
|
||||
/* Do not modify below this line */
|
||||
|
@ -15,23 +15,23 @@
|
||||
|
||||
/* Check currentapp and API upgrade status */
|
||||
|
||||
if($GLOBALS['phpgw_info']['flags']['currentapp'] != 'home' &&
|
||||
$GLOBALS['phpgw_info']['flags']['currentapp'] != 'welcome' &&
|
||||
(isset($GLOBALS['phpgw_info']['server']['checkappversions']) &&
|
||||
$GLOBALS['phpgw_info']['server']['checkappversions']))
|
||||
if($GLOBALS['egw_info']['flags']['currentapp'] != 'home' &&
|
||||
$GLOBALS['egw_info']['flags']['currentapp'] != 'welcome' &&
|
||||
(isset($GLOBALS['egw_info']['server']['checkappversions']) &&
|
||||
$GLOBALS['egw_info']['server']['checkappversions']))
|
||||
{
|
||||
if((isset($GLOBALS['phpgw_info']['user']['apps']['admin']) &&
|
||||
$GLOBALS['phpgw_info']['user']['apps']['admin']) ||
|
||||
$GLOBALS['phpgw_info']['server']['checkappversions'] == 'All')
|
||||
if((isset($GLOBALS['egw_info']['user']['apps']['admin']) &&
|
||||
$GLOBALS['egw_info']['user']['apps']['admin']) ||
|
||||
$GLOBALS['egw_info']['server']['checkappversions'] == 'All')
|
||||
{
|
||||
$_returnhtml = array();
|
||||
$app_name = $GLOBALS['phpgw_info']['flags']['currentapp'];
|
||||
$GLOBALS['phpgw']->db->query("SELECT app_name,app_version FROM phpgw_applications WHERE app_name='$app_name' OR app_name='phpgwapi'",__LINE__,__FILE__);
|
||||
while($GLOBALS['phpgw']->db->next_record())
|
||||
$app_name = $GLOBALS['egw_info']['flags']['currentapp'];
|
||||
$GLOBALS['egw']->db->query("SELECT app_name,app_version FROM phpgw_applications WHERE app_name='$app_name' OR app_name='phpgwapi'",__LINE__,__FILE__);
|
||||
while($GLOBALS['egw']->db->next_record())
|
||||
{
|
||||
$_db_version = $GLOBALS['phpgw']->db->f('app_version');
|
||||
$app_name = $GLOBALS['phpgw']->db->f('app_name');
|
||||
$_versionfile = $GLOBALS['phpgw']->common->get_app_dir($app_name) . '/setup/setup.inc.php';
|
||||
$_db_version = $GLOBALS['egw']->db->f('app_version');
|
||||
$app_name = $GLOBALS['egw']->db->f('app_name');
|
||||
$_versionfile = $GLOBALS['egw']->common->get_app_dir($app_name) . '/setup/setup.inc.php';
|
||||
if(file_exists($_versionfile))
|
||||
{
|
||||
include($_versionfile);
|
||||
|
@ -1,16 +1,16 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* eGroupWare *
|
||||
* http://www.egroupware.org *
|
||||
* Written by Mark Peters <skeeter@phpgroupware.org> *
|
||||
* -------------------------------------------- *
|
||||
* 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 *
|
||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
/**************************************************************************\
|
||||
* eGroupWare *
|
||||
* http://www.egroupware.org *
|
||||
* Written by Mark Peters <skeeter@phpgroupware.org> *
|
||||
* -------------------------------------------- *
|
||||
* 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 *
|
||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
/* $Id$ */
|
||||
|
||||
function encryptalgo($config)
|
||||
{
|
||||
|
@ -1,23 +1,23 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* eGroupWare *
|
||||
* http://www.egroupware.org *
|
||||
* Written by Mark Peters <skeeter@phpgroupware.org> *
|
||||
* -------------------------------------------- *
|
||||
* 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 *
|
||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
/**************************************************************************\
|
||||
* eGroupWare *
|
||||
* http://www.egroupware.org *
|
||||
* Written by Mark Peters <skeeter@phpgroupware.org> *
|
||||
* -------------------------------------------- *
|
||||
* 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 *
|
||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
if((int)$GLOBALS['hook_values']['account_id'] > 0)
|
||||
{
|
||||
$GLOBALS['phpgw']->accounts->delete((int)$GLOBALS['hook_values']['account_id']);
|
||||
$GLOBALS['phpgw']->db->lock(Array('phpgw_acl'));
|
||||
$GLOBALS['phpgw']->db->query("DELETE FROM phpgw_acl WHERE acl_location='" . (int)$GLOBALS['hook_values']['account_id']
|
||||
$GLOBALS['egw']->accounts->delete((int)$GLOBALS['hook_values']['account_id']);
|
||||
$GLOBALS['egw']->db->lock(Array('phpgw_acl'));
|
||||
$GLOBALS['egw']->db->query("DELETE FROM phpgw_acl WHERE acl_location='" . (int)$GLOBALS['hook_values']['account_id']
|
||||
. "' OR acl_account=".(int)$GLOBALS['hook_values']['account_id'],__LINE__,__FILE__);
|
||||
$GLOBALS['phpgw']->db->unlock();
|
||||
$GLOBALS['egw']->db->unlock();
|
||||
}
|
||||
?>
|
||||
|
@ -23,77 +23,77 @@
|
||||
display_sidebox can be called as much as you like
|
||||
*/
|
||||
|
||||
$menu_title = $GLOBALS['phpgw_info']['apps'][$appname]['title'] . ' '. lang('Menu');
|
||||
$menu_title = $GLOBALS['egw_info']['apps'][$appname]['title'] . ' '. lang('Menu');
|
||||
$file = array();
|
||||
|
||||
if (! $GLOBALS['phpgw']->acl->check('site_config_access',1,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('site_config_access',1,'admin'))
|
||||
{
|
||||
$file['Site Configuration'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=admin');
|
||||
$file['Site Configuration'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uiconfig.index&appname=admin');
|
||||
}
|
||||
/*
|
||||
if (! $GLOBALS['phpgw']->acl->check('peer_server_access',1,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('peer_server_access',1,'admin'))
|
||||
{
|
||||
$file['Peer Servers'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiserver.list_servers');
|
||||
$file['Peer Servers'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uiserver.list_servers');
|
||||
}
|
||||
*/
|
||||
if (! $GLOBALS['phpgw']->acl->check('account_access',1,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('account_access',1,'admin'))
|
||||
{
|
||||
$file['User Accounts'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.list_users');
|
||||
$file['User Accounts'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uiaccounts.list_users');
|
||||
}
|
||||
|
||||
if (! $GLOBALS['phpgw']->acl->check('group_access',1,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('group_access',1,'admin'))
|
||||
{
|
||||
$file['User Groups'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccounts.list_groups');
|
||||
$file['User Groups'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uiaccounts.list_groups');
|
||||
}
|
||||
|
||||
if (! $GLOBALS['phpgw']->acl->check('applications_access',1,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('applications_access',1,'admin'))
|
||||
{
|
||||
$file['Applications'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.get_list');
|
||||
$file['Applications'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uiapplications.get_list');
|
||||
}
|
||||
|
||||
if (! $GLOBALS['phpgw']->acl->check('global_categories_access',1,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('global_categories_access',1,'admin'))
|
||||
{
|
||||
$file['Global Categories'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicategories.index');
|
||||
$file['Global Categories'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uicategories.index');
|
||||
}
|
||||
|
||||
if (!$GLOBALS['phpgw']->acl->check('mainscreen_message_access',1,'admin') || !$GLOBALS['phpgw']->acl->check('mainscreen_message_access',2,'admin'))
|
||||
if (!$GLOBALS['egw']->acl->check('mainscreen_message_access',1,'admin') || !$GLOBALS['egw']->acl->check('mainscreen_message_access',2,'admin'))
|
||||
{
|
||||
$file['Change Main Screen Message'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.index');
|
||||
$file['Change Main Screen Message'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uimainscreen.index');
|
||||
}
|
||||
|
||||
if (! $GLOBALS['phpgw']->acl->check('current_sessions_access',1,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('current_sessions_access',1,'admin'))
|
||||
{
|
||||
$file['View Sessions'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uicurrentsessions.list_sessions');
|
||||
$file['View Sessions'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uicurrentsessions.list_sessions');
|
||||
}
|
||||
|
||||
if (! $GLOBALS['phpgw']->acl->check('access_log_access',1,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('access_log_access',1,'admin'))
|
||||
{
|
||||
$file['View Access Log'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiaccess_history.list_history');
|
||||
$file['View Access Log'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uiaccess_history.list_history');
|
||||
}
|
||||
|
||||
if (! $GLOBALS['phpgw']->acl->check('error_log_access',1,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('error_log_access',1,'admin'))
|
||||
{
|
||||
$file['View Error Log'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uilog.list_log');
|
||||
$file['View Error Log'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uilog.list_log');
|
||||
}
|
||||
|
||||
if (! $GLOBALS['phpgw']->acl->check('applications_access',16,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('applications_access',16,'admin'))
|
||||
{
|
||||
$file['Find and Register all Application Hooks'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiapplications.register_all_hooks');
|
||||
$file['Find and Register all Application Hooks'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uiapplications.register_all_hooks');
|
||||
}
|
||||
|
||||
if (! $GLOBALS['phpgw']->acl->check('asyncservice_access',1,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('asyncservice_access',1,'admin'))
|
||||
{
|
||||
$file['Asynchronous timed services'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiasyncservice.index');
|
||||
$file['Asynchronous timed services'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.uiasyncservice.index');
|
||||
}
|
||||
|
||||
if (! $GLOBALS['phpgw']->acl->check('db_backup_access',1,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('db_backup_access',1,'admin'))
|
||||
{
|
||||
$file['DB backup and restore'] = $GLOBALS['phpgw']->link('/index.php','menuaction=admin.admin_db_backup.index');
|
||||
$file['DB backup and restore'] = $GLOBALS['egw']->link('/index.php','menuaction=admin.admin_db_backup.index');
|
||||
}
|
||||
|
||||
if (! $GLOBALS['phpgw']->acl->check('info_access',1,'admin'))
|
||||
if (! $GLOBALS['egw']->acl->check('info_access',1,'admin'))
|
||||
{
|
||||
$file['phpInfo'] = "javascript:openwindow('" . $GLOBALS['phpgw']->link('/admin/phpinfo.php') . "')";
|
||||
$file['phpInfo'] = "javascript:openwindow('" . $GLOBALS['egw']->link('/admin/phpinfo.php') . "')";
|
||||
}
|
||||
|
||||
display_sidebox($appname,$menu_title,$file);
|
||||
|
@ -14,11 +14,14 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$GLOBALS['phpgw_info'] = array();
|
||||
$GLOBALS['phpgw_info']['flags']['currentapp'] = 'admin';
|
||||
$GLOBALS['egw_info'] = array(
|
||||
'flags' => array(
|
||||
'currentapp' => 'admin',
|
||||
),
|
||||
);
|
||||
include('../header.inc.php');
|
||||
|
||||
$GLOBALS['admin_tpl'] = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
|
||||
$GLOBALS['admin_tpl'] =& CreateObject('phpgwapi.Template',EGW_APP_TPL);
|
||||
$GLOBALS['admin_tpl']->set_file(
|
||||
Array(
|
||||
'admin' => 'index.tpl'
|
||||
@ -36,8 +39,8 @@
|
||||
// This func called by the includes to dump a row header
|
||||
function section_start($appname='',$icon='')
|
||||
{
|
||||
$GLOBALS['admin_tpl']->set_var('link_backcolor',$GLOBALS['phpgw_info']['theme']['row_off']);
|
||||
$GLOBALS['admin_tpl']->set_var('app_name',$GLOBALS['phpgw_info']['apps'][$appname]['title']);
|
||||
$GLOBALS['admin_tpl']->set_var('link_backcolor',$GLOBALS['egw_info']['theme']['row_off']);
|
||||
$GLOBALS['admin_tpl']->set_var('app_name',$GLOBALS['egw_info']['apps'][$appname]['title']);
|
||||
$GLOBALS['admin_tpl']->set_var('a_name',$appname);
|
||||
$GLOBALS['admin_tpl']->set_var('app_icon',$icon);
|
||||
if ($icon)
|
||||
@ -71,7 +74,7 @@
|
||||
if(is_array($file))
|
||||
{
|
||||
section_start($appname,
|
||||
$GLOBALS['phpgw']->common->image(
|
||||
$GLOBALS['egw']->common->image(
|
||||
$appname,
|
||||
Array(
|
||||
'navbar',
|
||||
@ -84,7 +87,7 @@
|
||||
while(list($text,$url) = each($file))
|
||||
{
|
||||
// If user doesn't have application configuration access, then don't show the configuration links
|
||||
if (strpos($url, 'admin.uiconfig') === False || !$GLOBALS['phpgw']->acl->check('site_config_access',1,'admin'))
|
||||
if (strpos($url, 'admin.uiconfig') === False || !$GLOBALS['egw']->acl->check('site_config_access',1,'admin'))
|
||||
{
|
||||
section_item($url,lang($text));
|
||||
}
|
||||
@ -93,8 +96,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
$GLOBALS['phpgw']->hooks->process('admin');
|
||||
$GLOBALS['egw']->hooks->process('admin');
|
||||
$GLOBALS['admin_tpl']->pparse('out','list');
|
||||
|
||||
$GLOBALS['phpgw']->common->phpgw_footer();
|
||||
$GLOBALS['egw']->common->egw_footer();
|
||||
?>
|
||||
|
@ -1,32 +0,0 @@
|
||||
<?php
|
||||
$phpgw_info = array();
|
||||
$phpgw_info["flags"]["currentapp"] = "admin";
|
||||
$phpgw_info["server"]["site_title"] = "Create a selected navbar image";
|
||||
include("../header.inc.php");
|
||||
?>
|
||||
|
||||
This is a utility that will help developers automatically create "selected" navigation bar images. Currently, it just adds a 1 pixel border around the image in a style that suggests a depressed button.
|
||||
<p>
|
||||
The instructions are as follows:
|
||||
<ol>
|
||||
<li>Select an app from the list below.</li>
|
||||
<li>Right click on the image that appears in your browser and save the image.</li>
|
||||
<li>Name the image "navbar-sel.gif" -- but without the quotes.</li>
|
||||
<li>Copy the image to the images subdirectory of the app.</li>
|
||||
<li>Commit the image to cvs, adding it first if necessary.</li>
|
||||
</ol>
|
||||
<p>
|
||||
<b>NOTE:</b> <i>This app will only work if your server has the GD library compiled into PHP. Furthermore, if your GD library is too new, it will not work with GIF's, only PNG's...</i>
|
||||
<p>
|
||||
<b>NOTE 2:</b> <i>Also, some images seem to give load errors. This is easily fixed by reexporting them as a GIF from Photoshop in GIF89a format. Other programs will also work.</i>
|
||||
<p>
|
||||
<b>Applications</b>
|
||||
<p>
|
||||
<?php
|
||||
while (list($key, $val) = each($phpgw_info["apps"])) {
|
||||
echo "\n<A HREF=\"".$phpgw->link("/admin/navbar-sel.php","filename=".$phpgw_info["server"]["server_root"]."/".$key."/images/navbar.gif")."\">";
|
||||
echo $phpgw_info["apps"][$key]["title"]."</A><BR>";
|
||||
}
|
||||
|
||||
$phpgw->common->phpgw_footer();
|
||||
?>
|
@ -1,74 +0,0 @@
|
||||
<?php
|
||||
//
|
||||
// SourceForge Knowledge Base Module v.1.0.0
|
||||
//
|
||||
// Created by Patrick Walsh (pjw@users.sourceforge.net) 6/00
|
||||
// Copyright (c) ... aw, hell, copy all the code you want
|
||||
//
|
||||
// $Id$
|
||||
|
||||
/*
|
||||
This code was adapted from Rasmus Lerdorf's article on PHPBuilder
|
||||
http://www.phpbuilder.com/columns/rasmus19990124.php3
|
||||
*/
|
||||
|
||||
function openGif($filename) {
|
||||
|
||||
if (!$filename) { $filename = "navbar.gif"; }
|
||||
$im = @imagecreatefromgif($filename);
|
||||
if ($im == "") { /* test for success of file creation */
|
||||
$im = imagecreate(300,15); /* Create a blank image */
|
||||
$bgc = imagecolorallocate($im, 255, 255, 255);
|
||||
$tc = imagecolorallocate($im, 0, 0, 0);
|
||||
imagefilledrectangle($im, 0, 0, 300, 15, $bgc);
|
||||
imagestring($im,1,2,2,"Error loading $filename", $tc);
|
||||
}
|
||||
return $im;
|
||||
}
|
||||
|
||||
function getRGB($web_color) {
|
||||
if (strlen($web_color) != 6) {
|
||||
return false;
|
||||
} else {
|
||||
$retval["r"] = hexdec(substr($web_color,0,2));
|
||||
$retval["g"] = hexdec(substr($web_color,2,2));
|
||||
$retval["b"] = hexdec(substr($web_color,4,2));
|
||||
return $retval;
|
||||
}
|
||||
}
|
||||
$phpgw_info = array();
|
||||
$phpgw_info["flags"]["currentapp"] = "admin";
|
||||
$phpgw_info["flags"]["nonavbar"] = True;
|
||||
$phpgw_info["flags"]["noheader"] = True;
|
||||
include("../header.inc.php");
|
||||
|
||||
|
||||
Header( "Content-type: image/gif");
|
||||
|
||||
$border = 1;
|
||||
|
||||
//echo $filename;
|
||||
$im = openGif($filename); /* Open the provided file */
|
||||
$bg = getRGB($phpgw_info["theme"]["navbar_bg"]); /* get navbar theme */
|
||||
$fg = getRGB($phpgw_info["theme"]["navbar_text"]);
|
||||
$navbar_bg = ImageColorAllocate($im, $bg["r"], $bg["g"], $bg["b"]);
|
||||
$navbar_fg = ImageColorAllocate($im, $fg["r"], $fg["g"], $fg["b"]);
|
||||
|
||||
$dk_gray = ImageColorAllocate($im, 128, 128, 128);
|
||||
$lt_gray = ImageColorAllocate($im, 192, 192, 192);
|
||||
|
||||
$dx = ImageSX($im); /* get image size */
|
||||
$dy = ImageSY($im);
|
||||
|
||||
ImageFilledRectangle($im,0, 0, $dx, $border,$dk_gray); /* top */
|
||||
ImageFilledRectangle($im,0, 0, $border, $dy,$dk_gray); /* left */
|
||||
ImageFilledRectangle($im,$dx-$border-1, 0, $dx, $dy,$lt_gray); /* right */
|
||||
ImageFilledRectangle($im,0, $dy-$border-1, $dx, $dy,$lt_gray); /* bottom */
|
||||
|
||||
//ImageGif($im,"$DOCUMENT_ROOT/kb/xml/$filename");
|
||||
|
||||
ImageGif($im);
|
||||
|
||||
ImageDestroy($im);
|
||||
?>
|
||||
|
@ -11,16 +11,16 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$GLOBALS['phpgw_info']['flags'] = array(
|
||||
$GLOBALS['egw_info']['flags'] = array(
|
||||
'noheader' => True,
|
||||
'nonavbar' => True,
|
||||
'currentapp' => 'admin'
|
||||
);
|
||||
include('../header.inc.php');
|
||||
|
||||
if ($GLOBALS['phpgw']->acl->check('info_access',1,'admin'))
|
||||
if ($GLOBALS['egw']->acl->check('info_access',1,'admin'))
|
||||
{
|
||||
$GLOBALS['phpgw']->redirect_link('/index.php');
|
||||
$GLOBALS['egw']->redirect_link('/index.php');
|
||||
}
|
||||
|
||||
// Throw a little notice out if PHPaccelerator is enabled.
|
||||
@ -31,5 +31,5 @@
|
||||
}
|
||||
|
||||
phpinfo();
|
||||
// $phpgw->common->phpgw_footer();
|
||||
// $GLOBALS['egw']->common->egw_footer();
|
||||
?>
|
||||
|
@ -1,33 +0,0 @@
|
||||
<?php
|
||||
/**************************************************************************\
|
||||
* eGroupWare - administration *
|
||||
* http://www.egroupware.org *
|
||||
* -------------------------------------------- *
|
||||
* 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 *
|
||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_info["flags"] = array(
|
||||
"currentapp" => "admin"
|
||||
);
|
||||
|
||||
include("../header.inc.php");
|
||||
|
||||
$button = CreateObject('phpgwapi.graphics');
|
||||
|
||||
$button->parseHTTPPostVars();
|
||||
$button->createInputButton(lang('save'), 'save');
|
||||
|
||||
if (isset($submit)) print "is worked $submit<br>";
|
||||
|
||||
print "<form method=post>";
|
||||
print $button->createInputButton("Lars is the best ;)",'submit');
|
||||
print "<br>the same as ascii<br>";
|
||||
print $button->createInputButton("Lars is the best ;)",'submit','ascii');
|
||||
print "</form>";
|
||||
|
||||
$phpgw->common->phpgw_footer();
|
||||
?>
|
Loading…
Reference in New Issue
Block a user