mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-16 18:31:26 +01:00
phpgw --> egw
This commit is contained in:
parent
250d3d9408
commit
3d4049d873
@ -1,15 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
/**************************************************************************\
|
/**************************************************************************\
|
||||||
* eGroupWare - Preferences - categories *
|
* eGroupWare - Preferences - categories *
|
||||||
* http://www.egroupware.org *
|
* http://www.egroupware.org *
|
||||||
* Written by Bettina Gille [ceb@phpgroupware.org] *
|
* Written by Bettina Gille [ceb@phpgroupware.org] *
|
||||||
* ----------------------------------------------- *
|
* ----------------------------------------------- *
|
||||||
* This program is free software; you can redistribute it and/or modify it *
|
* This program is free software; you can redistribute it and/or modify it *
|
||||||
* under the terms of the GNU General Public License as published by the *
|
* under the terms of the GNU General Public License as published by the *
|
||||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||||
* option) any later version. *
|
* option) any later version. *
|
||||||
\**************************************************************************/
|
\**************************************************************************/
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
class bocategories
|
class bocategories
|
||||||
{
|
{
|
||||||
|
@ -37,9 +37,9 @@
|
|||||||
function list_methods($_type='xmlrpc')
|
function list_methods($_type='xmlrpc')
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
This handles introspection or discovery by the logged in client,
|
This handles introspection or discovery by the logged in client,
|
||||||
in which case the input might be an array. The server always calls
|
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 function to fill the server dispatch map using a string.
|
||||||
*/
|
*/
|
||||||
if(is_array($_type))
|
if(is_array($_type))
|
||||||
{
|
{
|
||||||
|
@ -91,7 +91,7 @@
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Here we include the settings hook file for the current template, if it exists.
|
/* Here we include the settings hook file for the current template, if it exists.
|
||||||
This is not handled by the hooks class and is only valid if not using xml-rpc.
|
This is not handled by the hooks class and is only valid if not using xml-rpc.
|
||||||
*/
|
*/
|
||||||
$tmpl_settings = EGW_TEMPLATE_DIR . '/hook_settings.inc.php';
|
$tmpl_settings = EGW_TEMPLATE_DIR . '/hook_settings.inc.php';
|
||||||
if($this->appname == 'preferences' && file_exists($tmpl_settings))
|
if($this->appname == 'preferences' && file_exists($tmpl_settings))
|
||||||
@ -228,9 +228,9 @@
|
|||||||
function list_methods($_type='xmlrpc')
|
function list_methods($_type='xmlrpc')
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
This handles introspection or discovery by the logged in client,
|
This handles introspection or discovery by the logged in client,
|
||||||
in which case the input might be an array. The server always calls
|
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 function to fill the server dispatch map using a string.
|
||||||
*/
|
*/
|
||||||
if(is_array($_type))
|
if(is_array($_type))
|
||||||
{
|
{
|
||||||
|
@ -20,11 +20,11 @@
|
|||||||
|
|
||||||
function uiaclprefs()
|
function uiaclprefs()
|
||||||
{
|
{
|
||||||
$GLOBALS['egw']->nextmatchs = CreateObject('phpgwapi.nextmatchs');
|
$GLOBALS['egw']->nextmatchs =& CreateObject('phpgwapi.nextmatchs');
|
||||||
|
|
||||||
if (!is_object($GLOBALS['egw']->html))
|
if (!is_object($GLOBALS['egw']->html))
|
||||||
{
|
{
|
||||||
$GLOBALS['egw']->html = CreateObject('phpgwapi.html');
|
$GLOBALS['egw']->html =& CreateObject('phpgwapi.html');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,10 +63,10 @@
|
|||||||
if (($GLOBALS['egw_info']['server']['deny_user_grants_access'] || $owner != $GLOBALS['egw_info']['user']['account_id'])
|
if (($GLOBALS['egw_info']['server']['deny_user_grants_access'] || $owner != $GLOBALS['egw_info']['user']['account_id'])
|
||||||
&& !isset($GLOBALS['egw_info']['user']['apps']['admin']) || $acl_app_not_passed)
|
&& !isset($GLOBALS['egw_info']['user']['apps']['admin']) || $acl_app_not_passed)
|
||||||
{
|
{
|
||||||
$GLOBALS['egw']->common->phpgw_header();
|
$GLOBALS['egw']->common->egw_header();
|
||||||
echo parse_navbar();
|
echo parse_navbar();
|
||||||
echo '<center><b>' . lang('Access not permitted') . '</b></center>';
|
echo '<center><b>' . lang('Access not permitted') . '</b></center>';
|
||||||
$GLOBALS['egw']->common->phpgw_footer();
|
$GLOBALS['egw']->common->egw_footer();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,7 +79,7 @@
|
|||||||
{
|
{
|
||||||
$no_privat_grants = $owner != $GLOBALS['egw_info']['user']['account_id'];
|
$no_privat_grants = $owner != $GLOBALS['egw_info']['user']['account_id'];
|
||||||
}
|
}
|
||||||
$this->acl = CreateObject('phpgwapi.acl',(int)$owner);
|
$this->acl =& CreateObject('phpgwapi.acl',(int)$owner);
|
||||||
$this->acl->read_repository();
|
$this->acl->read_repository();
|
||||||
|
|
||||||
if ($_POST['submit'])
|
if ($_POST['submit'])
|
||||||
@ -140,10 +140,10 @@
|
|||||||
$this->acl->save_repository();
|
$this->acl->save_repository();
|
||||||
}
|
}
|
||||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('%1 - Preferences',$GLOBALS['egw_info']['apps'][$acl_app]['title']).' - '.lang('acl').': '.$owner_name;
|
$GLOBALS['egw_info']['flags']['app_header'] = lang('%1 - Preferences',$GLOBALS['egw_info']['apps'][$acl_app]['title']).' - '.lang('acl').': '.$owner_name;
|
||||||
$GLOBALS['egw']->common->phpgw_header();
|
$GLOBALS['egw']->common->egw_header();
|
||||||
echo parse_navbar();
|
echo parse_navbar();
|
||||||
|
|
||||||
$this->template = CreateObject('phpgwapi.Template',$GLOBALS['egw']->common->get_tpl_dir($acl_app));
|
$this->template =& CreateObject('phpgwapi.Template',$GLOBALS['egw']->common->get_tpl_dir($acl_app));
|
||||||
$templates = Array (
|
$templates = Array (
|
||||||
'preferences' => 'preference_acl.tpl',
|
'preferences' => 'preference_acl.tpl',
|
||||||
'row_colspan' => 'preference_colspan.tpl',
|
'row_colspan' => 'preference_colspan.tpl',
|
||||||
|
@ -37,8 +37,8 @@
|
|||||||
{
|
{
|
||||||
$cats_app = get_var('cats_app',array('GET','POST'));
|
$cats_app = get_var('cats_app',array('GET','POST'));
|
||||||
|
|
||||||
$this->bo = CreateObject('preferences.bocategories',$cats_app);
|
$this->bo =& CreateObject('preferences.bocategories',$cats_app);
|
||||||
$this->nextmatchs = CreateObject('phpgwapi.nextmatchs');
|
$this->nextmatchs =& CreateObject('phpgwapi.nextmatchs');
|
||||||
$this->account = $GLOBALS['egw_info']['user']['account_id'];
|
$this->account = $GLOBALS['egw_info']['user']['account_id'];
|
||||||
$this->user = $GLOBALS['egw_info']['user']['fullname'];
|
$this->user = $GLOBALS['egw_info']['user']['fullname'];
|
||||||
|
|
||||||
@ -127,7 +127,7 @@
|
|||||||
}
|
}
|
||||||
$GLOBALS['egw_info']['flags']['app_header'] = $GLOBALS['egw_info']['apps'][$cats_app]['title'].
|
$GLOBALS['egw_info']['flags']['app_header'] = $GLOBALS['egw_info']['apps'][$cats_app]['title'].
|
||||||
' '.lang('categories for').': '.$this->user;
|
' '.lang('categories for').': '.$this->user;
|
||||||
$GLOBALS['egw']->common->phpgw_header();
|
$GLOBALS['egw']->common->egw_header();
|
||||||
echo parse_navbar();
|
echo parse_navbar();
|
||||||
|
|
||||||
$GLOBALS['egw']->template->set_file(array(
|
$GLOBALS['egw']->template->set_file(array(
|
||||||
@ -417,7 +417,7 @@
|
|||||||
|
|
||||||
if (!is_object($GLOBALS['egw']->html))
|
if (!is_object($GLOBALS['egw']->html))
|
||||||
{
|
{
|
||||||
$GLOBALS['egw']->html = CreateObject('phpgwapi.html');
|
$GLOBALS['egw']->html =& CreateObject('phpgwapi.html');
|
||||||
}
|
}
|
||||||
$GLOBALS['egw']->template->set_var('color',$GLOBALS['egw']->html->inputColor('cat_data[color]',$cat['data']['color'],lang('Click to select a color')));
|
$GLOBALS['egw']->template->set_var('color',$GLOBALS['egw']->html->inputColor('cat_data[color]',$cat['data']['color'],lang('Click to select a color')));
|
||||||
|
|
||||||
@ -469,7 +469,7 @@
|
|||||||
|
|
||||||
$GLOBALS['egw_info']['flags']['app_header'] = lang($cat_id ? 'Edit %1 category for' : 'Add %1 category for',
|
$GLOBALS['egw_info']['flags']['app_header'] = lang($cat_id ? 'Edit %1 category for' : 'Add %1 category for',
|
||||||
$GLOBALS['egw_info']['apps'][$cats_app]['title']).': '.$this->user;
|
$GLOBALS['egw_info']['apps'][$cats_app]['title']).': '.$this->user;
|
||||||
$GLOBALS['egw']->common->phpgw_header();
|
$GLOBALS['egw']->common->egw_header();
|
||||||
echo parse_navbar();
|
echo parse_navbar();
|
||||||
|
|
||||||
$GLOBALS['egw']->template->set_var('edithandle','');
|
$GLOBALS['egw']->template->set_var('edithandle','');
|
||||||
@ -518,7 +518,7 @@
|
|||||||
$GLOBALS['egw']->template->set_file(array('category_delete' => 'delete.tpl'));
|
$GLOBALS['egw']->template->set_file(array('category_delete' => 'delete.tpl'));
|
||||||
|
|
||||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('Delete Categories');
|
$GLOBALS['egw_info']['flags']['app_header'] = lang('Delete Categories');
|
||||||
$GLOBALS['egw']->common->phpgw_header();
|
$GLOBALS['egw']->common->egw_header();
|
||||||
echo parse_navbar();
|
echo parse_navbar();
|
||||||
|
|
||||||
$GLOBALS['egw']->template->set_var('deleteheader',lang('Are you sure you want to delete this category ?'));
|
$GLOBALS['egw']->template->set_var('deleteheader',lang('Are you sure you want to delete this category ?'));
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
function uipassword()
|
function uipassword()
|
||||||
{
|
{
|
||||||
$this->bo = CreateObject('preferences.bopassword');
|
$this->bo =& CreateObject('preferences.bopassword');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -32,8 +32,8 @@
|
|||||||
|
|
||||||
if(!$GLOBALS['egw']->acl->check('changepassword', 1) || $_POST['cancel'])
|
if(!$GLOBALS['egw']->acl->check('changepassword', 1) || $_POST['cancel'])
|
||||||
{
|
{
|
||||||
$GLOBALS['egw']->redirect_link('/preferences/index.php');
|
$GLOBALS['egw']->redirect_link('/preferences/index.php');
|
||||||
$GLOBALS['egw']->common->phpgw_exit();
|
$GLOBALS['egw']->common->egw_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
$GLOBALS['egw']->template->set_file(array(
|
$GLOBALS['egw']->template->set_file(array(
|
||||||
@ -73,22 +73,22 @@
|
|||||||
|
|
||||||
if(is_array($errors))
|
if(is_array($errors))
|
||||||
{
|
{
|
||||||
$GLOBALS['egw']->common->phpgw_header();
|
$GLOBALS['egw']->common->egw_header();
|
||||||
echo parse_navbar();
|
echo parse_navbar();
|
||||||
$GLOBALS['egw']->template->set_var('messages',$GLOBALS['egw']->common->error_list($errors));
|
$GLOBALS['egw']->template->set_var('messages',$GLOBALS['egw']->common->error_list($errors));
|
||||||
$GLOBALS['egw']->template->pfp('out','form');
|
$GLOBALS['egw']->template->pfp('out','form');
|
||||||
$GLOBALS['egw']->common->phpgw_exit(True);
|
$GLOBALS['egw']->common->egw_exit(True);
|
||||||
}
|
}
|
||||||
|
|
||||||
$passwd_changed = $this->bo->changepass($o_passwd, $n_passwd);
|
$passwd_changed = $this->bo->changepass($o_passwd, $n_passwd);
|
||||||
if(!$passwd_changed)
|
if(!$passwd_changed)
|
||||||
{
|
{
|
||||||
$errors[] = lang('Failed to change password. Please contact your administrator.');
|
$errors[] = lang('Failed to change password. Please contact your administrator.');
|
||||||
$GLOBALS['egw']->common->phpgw_header();
|
$GLOBALS['egw']->common->egw_header();
|
||||||
echo parse_navbar();
|
echo parse_navbar();
|
||||||
$GLOBALS['egw']->template->set_var('messages',$GLOBALS['egw']->common->error_list($errors));
|
$GLOBALS['egw']->template->set_var('messages',$GLOBALS['egw']->common->error_list($errors));
|
||||||
$GLOBALS['egw']->template->pfp('out','form');
|
$GLOBALS['egw']->template->pfp('out','form');
|
||||||
$GLOBALS['egw']->common->phpgw_exit(True);
|
$GLOBALS['egw']->common->egw_exit(True);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -108,11 +108,11 @@
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$GLOBALS['egw_info']['flags']['app_header'] = lang('Change your password');
|
$GLOBALS['egw_info']['flags']['app_header'] = lang('Change your password');
|
||||||
$GLOBALS['egw']->common->phpgw_header();
|
$GLOBALS['egw']->common->egw_header();
|
||||||
echo parse_navbar();
|
echo parse_navbar();
|
||||||
|
|
||||||
$GLOBALS['egw']->template->pfp('out','form');
|
$GLOBALS['egw']->template->pfp('out','form');
|
||||||
$GLOBALS['egw']->common->phpgw_footer();
|
$GLOBALS['egw']->common->egw_footer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
/**************************************************************************\
|
/**************************************************************************\
|
||||||
* eGroupWare *
|
* eGroupWare *
|
||||||
* http://www.egroupware.org *
|
* http://www.egroupware.org *
|
||||||
* Written by Mark Peters <skeeter@phpgroupware.org> *
|
* Written by Mark Peters <skeeter@phpgroupware.org> *
|
||||||
* -------------------------------------------- *
|
* -------------------------------------------- *
|
||||||
* This program is free software; you can redistribute it and/or modify it *
|
* This program is free software; you can redistribute it and/or modify it *
|
||||||
* under the terms of the GNU General Public License as published by the *
|
* under the terms of the GNU General Public License as published by the *
|
||||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||||
* option) any later version. *
|
* option) any later version. *
|
||||||
\**************************************************************************/
|
\**************************************************************************/
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
// Delete all records for a user
|
// Delete all records for a user
|
||||||
if((int)$GLOBALS['hook_values']['account_id'] > 0)
|
if((int)$GLOBALS['hook_values']['account_id'] > 0)
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
/**************************************************************************\
|
/**************************************************************************\
|
||||||
* eGroupWare *
|
* eGroupWare *
|
||||||
* http://www.egroupware.org *
|
* http://www.egroupware.org *
|
||||||
* Written by Joseph Engo <jengo@phpgroupware.org> *
|
* Written by Joseph Engo <jengo@phpgroupware.org> *
|
||||||
* -------------------------------------------- *
|
* -------------------------------------------- *
|
||||||
* This program is free software; you can redistribute it and/or modify it *
|
* This program is free software; you can redistribute it and/or modify it *
|
||||||
* under the terms of the GNU General Public License as published by the *
|
* under the terms of the GNU General Public License as published by the *
|
||||||
* Free Software Foundation; either version 2 of the License, or (at your *
|
* Free Software Foundation; either version 2 of the License, or (at your *
|
||||||
* option) any later version. *
|
* option) any later version. *
|
||||||
\**************************************************************************/
|
\**************************************************************************/
|
||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
'24' => lang('24 hour')
|
'24' => lang('24 hour')
|
||||||
);
|
);
|
||||||
|
|
||||||
$sbox = createobject('phpgwapi.sbox');
|
$sbox =& CreateObject('phpgwapi.sbox');
|
||||||
$langs = $GLOBALS['egw']->translation->get_installed_langs();
|
$langs = $GLOBALS['egw']->translation->get_installed_langs();
|
||||||
|
|
||||||
$user_apps = array();
|
$user_apps = array();
|
||||||
|
@ -12,14 +12,15 @@
|
|||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
$egw_info = array();
|
$GLOBALS['egw_info'] = array(
|
||||||
$GLOBALS['egw_info']['flags'] = array(
|
'flags' => array(
|
||||||
'currentapp' => 'preferences',
|
'currentapp' => 'preferences',
|
||||||
'disable_Template_class' => True
|
'disable_Template_class' => True,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
include('../header.inc.php');
|
include('../header.inc.php');
|
||||||
|
|
||||||
$pref_tpl = CreateObject('phpgwapi.Template',EGW_APP_TPL);
|
$pref_tpl =& CreateObject('phpgwapi.Template',EGW_APP_TPL);
|
||||||
$templates = Array(
|
$templates = Array(
|
||||||
'pref' => 'index.tpl'
|
'pref' => 'index.tpl'
|
||||||
);
|
);
|
||||||
@ -44,13 +45,13 @@
|
|||||||
$GLOBALS['egw']->session->appsession('session_data','preferences',$session_data);
|
$GLOBALS['egw']->session->appsession('session_data','preferences',$session_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $GLOBALS['HTTP_GET_VARS']['type'])
|
if (! $_GET['type'])
|
||||||
{
|
{
|
||||||
$type = $session_data['type'];
|
$type = $session_data['type'];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$type = $GLOBALS['HTTP_GET_VARS']['type'];
|
$type = $_GET['type'];
|
||||||
$session_data = array('type' => $type);
|
$session_data = array('type' => $type);
|
||||||
$GLOBALS['egw']->session->appsession('session_data','preferences',$session_data);
|
$GLOBALS['egw']->session->appsession('session_data','preferences',$session_data);
|
||||||
}
|
}
|
||||||
@ -137,5 +138,5 @@
|
|||||||
|
|
||||||
$GLOBALS['egw']->hooks->process('preferences',array('preferences'));
|
$GLOBALS['egw']->hooks->process('preferences',array('preferences'));
|
||||||
$pref_tpl->pfp('out','list');
|
$pref_tpl->pfp('out','list');
|
||||||
$GLOBALS['egw']->common->phpgw_footer();
|
$GLOBALS['egw']->common->egw_footer();
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user