mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
Formatting
This commit is contained in:
parent
8060a2efee
commit
f4980ba34e
@ -12,18 +12,19 @@
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_info = array();
|
||||
$phpgw_info['flags'] = array('currentapp' => 'admin', 'enable_nextmatchs_class' => True);
|
||||
$phpgw_info['flags'] = array('currentapp' => 'admin', 'enable_nextmatchs_class' => True);
|
||||
include('../header.inc.php');
|
||||
|
||||
function account_total($query)
|
||||
{
|
||||
global $phpgw;
|
||||
|
||||
if ($query) {
|
||||
if ($query)
|
||||
{
|
||||
$querymethod = " AND (account_firstname LIKE '%$query%' OR account_lastname LIKE "
|
||||
. "'%$query%' OR account_lid LIKE '%$query%') ";
|
||||
. "'%$query%' OR account_lid LIKE '%$query%') ";
|
||||
}
|
||||
|
||||
|
||||
$phpgw->db->query("SELECT COUNT(*) FROM phpgw_accounts WHERE account_type='u'".$querymethod,__LINE__,__FILE__);
|
||||
$phpgw->db->next_record();
|
||||
|
||||
@ -87,12 +88,12 @@
|
||||
$p->set_var('row_firstname',$firstname);
|
||||
$p->set_var('row_lastname',$lastname);
|
||||
$p->set_var('row_edit','<a href="'.$phpgw->link('/admin/editaccount.php','account_id='
|
||||
. $account_id) . '"> ' . lang('Edit') . ' </a>');
|
||||
. $account_id) . '"> ' . lang('Edit') . ' </a>');
|
||||
|
||||
if ($phpgw_info['user']['userid'] != $account['account_lid'])
|
||||
{
|
||||
$p->set_var('row_delete','<a href="' . $phpgw->link('/admin/deleteaccount.php','account_id='
|
||||
. $account_id) . '"> '.lang('Delete').' </a>');
|
||||
. $account_id) . '"> '.lang('Delete').' </a>');
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -100,7 +101,7 @@
|
||||
}
|
||||
|
||||
$p->set_var('row_view','<a href="' . $phpgw->link('/admin/viewaccount.php','account_id='
|
||||
. $account_id) . '"> ' . lang('View') . ' </a>');
|
||||
. $account_id) . '"> ' . lang('View') . ' </a>');
|
||||
|
||||
$p->parse('rows','row',True);
|
||||
}
|
||||
|
@ -11,68 +11,72 @@
|
||||
\**************************************************************************/
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_info["flags"]["currentapp"] = 'admin';
|
||||
include('../header.inc.php');
|
||||
$phpgw_info['flags']['currentapp'] = 'admin';
|
||||
include('../header.inc.php');
|
||||
|
||||
$t = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('admin'));
|
||||
$t->set_file(array('form' => 'category_form.tpl'));
|
||||
$t->set_block('form','add','addhandle');
|
||||
$t->set_block('form','edit','edithandle');
|
||||
$t = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('admin'));
|
||||
$t->set_file(array('form' => 'category_form.tpl'));
|
||||
$t->set_block('form','add','addhandle');
|
||||
$t->set_block('form','edit','edithandle');
|
||||
|
||||
$c = CreateObject('phpgwapi.categories');
|
||||
$c->categories($phpgw_info['user']['account_id'],'phpgw');
|
||||
$c = CreateObject('phpgwapi.categories');
|
||||
$c->categories($phpgw_info['user']['account_id'],'phpgw');
|
||||
|
||||
if ($submit) {
|
||||
$errorcount = 0;
|
||||
if ($submit)
|
||||
{
|
||||
$errorcount = 0;
|
||||
|
||||
if (!$cat_name) { $error[$errorcount++] = lang('Please enter a name for that category !'); }
|
||||
if (!$error) {
|
||||
if (!$cat_parent) { $exists = $c->exists('mains',$cat_name,$cat_id=''); }
|
||||
else { $exists = $c->exists('subs',$cat_name,$cat_id=''); }
|
||||
if ($exists == True) { $error[$errorcount++] = lang('That category name has been used already !'); }
|
||||
if (!$cat_name) { $error[$errorcount++] = lang('Please enter a name for that category !'); }
|
||||
if (!$error)
|
||||
{
|
||||
if (!$cat_parent) { $exists = $c->exists('mains',$cat_name,$cat_id=''); }
|
||||
else { $exists = $c->exists('subs',$cat_name,$cat_id=''); }
|
||||
if ($exists == True) { $error[$errorcount++] = lang('That category name has been used already !'); }
|
||||
}
|
||||
|
||||
if ($cat_main && $cat_parent)
|
||||
{
|
||||
$main = $c->return_main($cat_parent);
|
||||
if ($main != $cat_main) { $error[$errorcount++] = lang('You selected an invalid main category !'); }
|
||||
}
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
$cat_name = addslashes($cat_name);
|
||||
$cat_description = addslashes($cat_description);
|
||||
$cat_access = 'public';
|
||||
|
||||
$c->add($cat_name,$cat_parent,$cat_description,$cat_data,$cat_access,$cat_main);
|
||||
}
|
||||
}
|
||||
|
||||
if ($cat_main && $cat_parent) {
|
||||
$main = $c->return_main($cat_parent);
|
||||
if ($main != $cat_main) { $error[$errorcount++] = lang('You selected an invalid main category !'); }
|
||||
}
|
||||
if ($errorcount) { $t->set_var('message',$phpgw->common->error_list($error)); }
|
||||
if (($submit) && (! $error) && (! $errorcount)) { $t->set_var('message',lang('Category x has been added !', $cat_name)); }
|
||||
if ((! $submit) && (! $error) && (! $errorcount)) { $t->set_var('message',''); }
|
||||
|
||||
if (! $error) {
|
||||
$cat_name = addslashes($cat_name);
|
||||
$cat_description = addslashes($cat_description);
|
||||
$cat_access = 'public';
|
||||
$t->set_var('title_categories',lang('Add global category'));
|
||||
$t->set_var('actionurl',$phpgw->link('/admin/addcategory.php'));
|
||||
$t->set_var('doneurl',$phpgw->link('/admin/categories.php'));
|
||||
$t->set_var('hidden_vars','<input type="hidden" name="cat_id" value="' . $cat_id . '">');
|
||||
|
||||
$c->add($cat_name,$cat_parent,$cat_description,$cat_data,$cat_access,$cat_main);
|
||||
}
|
||||
}
|
||||
$t->set_var('lang_main',lang('Main category'));
|
||||
$t->set_var('lang_new_main',lang('New main category'));
|
||||
$t->set_var('main_category_list',$c->formated_list('select','mains',$cat_main));
|
||||
$t->set_var('lang_parent',lang('Parent category'));
|
||||
$t->set_var('lang_select_parent',lang('Select parent category'));
|
||||
$t->set_var('category_list',$c->formated_list('select','all',$cat_parent));
|
||||
$t->set_var('lang_name',lang('Category name'));
|
||||
$t->set_var('lang_descr',lang('Category description'));
|
||||
$t->set_var('cat_name',$cat_name);
|
||||
$t->set_var('cat_description',$cat_description);
|
||||
$t->set_var('lang_add',lang('Add'));
|
||||
$t->set_var('lang_reset',lang('Clear Form'));
|
||||
$t->set_var('lang_done',lang('Done'));
|
||||
|
||||
if ($errorcount) { $t->set_var('message',$phpgw->common->error_list($error)); }
|
||||
if (($submit) && (! $error) && (! $errorcount)) { $t->set_var('message',lang('Category x has been added !', $cat_name)); }
|
||||
if ((! $submit) && (! $error) && (! $errorcount)) { $t->set_var('message',''); }
|
||||
$t->set_var('edithandle','');
|
||||
$t->set_var('addhandle','');
|
||||
$t->pparse('out','form');
|
||||
$t->pparse('addhandle','add');
|
||||
|
||||
$t->set_var('title_categories',lang('Add global category'));
|
||||
$t->set_var('actionurl',$phpgw->link('/admin/addcategory.php'));
|
||||
$t->set_var('doneurl',$phpgw->link('/admin/categories.php'));
|
||||
$t->set_var('hidden_vars','<input type="hidden" name="cat_id" value="' . $cat_id . '">');
|
||||
|
||||
$t->set_var('lang_main',lang('Main category'));
|
||||
$t->set_var('lang_new_main',lang('New main category'));
|
||||
$t->set_var('main_category_list',$c->formated_list('select','mains',$cat_main));
|
||||
$t->set_var('lang_parent',lang('Parent category'));
|
||||
$t->set_var('lang_select_parent',lang('Select parent category'));
|
||||
$t->set_var('category_list',$c->formated_list('select','all',$cat_parent));
|
||||
$t->set_var('lang_name',lang('Category name'));
|
||||
$t->set_var('lang_descr',lang('Category description'));
|
||||
$t->set_var('cat_name',$cat_name);
|
||||
$t->set_var('cat_description',$cat_description);
|
||||
$t->set_var('lang_add',lang('Add'));
|
||||
$t->set_var('lang_reset',lang('Clear Form'));
|
||||
$t->set_var('lang_done',lang('Done'));
|
||||
|
||||
$t->set_var('edithandle','');
|
||||
$t->set_var('addhandle','');
|
||||
$t->pparse('out','form');
|
||||
$t->pparse('addhandle','add');
|
||||
|
||||
$phpgw->common->phpgw_footer();
|
||||
?>
|
||||
$phpgw->common->phpgw_footer();
|
||||
?>
|
||||
|
@ -11,59 +11,73 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_info = array();
|
||||
$phpgw_info["flags"] = array("currentapp" => "admin", "enable_nextmatchs_class" => True);
|
||||
include("../header.inc.php");
|
||||
$phpgw_info = array();
|
||||
$phpgw_info['flags'] = array(
|
||||
'currentapp' => 'admin',
|
||||
'enable_nextmatchs_class' => True
|
||||
);
|
||||
include('../header.inc.php');
|
||||
|
||||
$p = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('admin'));
|
||||
$p->set_file(array("list" => "applications.tpl",
|
||||
"row" => "applications_row.tpl"));
|
||||
$p = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('admin'));
|
||||
$p->set_file(array(
|
||||
'list' => 'applications.tpl',
|
||||
'row' => 'applications_row.tpl'
|
||||
));
|
||||
|
||||
if ($order) {
|
||||
$ordermethod = "order by $order $sort";
|
||||
} else {
|
||||
$ordermethod = "order by app_title asc";
|
||||
}
|
||||
if ($order)
|
||||
{
|
||||
$ordermethod = "order by $order $sort";
|
||||
}
|
||||
else
|
||||
{
|
||||
$ordermethod = "order by app_title asc";
|
||||
}
|
||||
|
||||
if (! $sort) {
|
||||
$sort = "desc";
|
||||
}
|
||||
if (!$sort)
|
||||
{
|
||||
$sort = "desc";
|
||||
}
|
||||
|
||||
$p->set_var("lang_installed",lang("Installed applications"));
|
||||
$p->set_var("bg_color",$phpgw_info["theme"]["bg_color"]);
|
||||
$p->set_var("th_bg",$phpgw_info["theme"]["th_bg"]);
|
||||
$p->set_var('lang_installed',lang('Installed applications'));
|
||||
$p->set_var('bg_color',$phpgw_info['theme']['bg_color']);
|
||||
$p->set_var('th_bg',$phpgw_info['theme']['th_bg']);
|
||||
|
||||
$p->set_var("sort_title",$phpgw->nextmatchs->show_sort_order($sort,"app_title",$order,"/admin/applications.php",lang("title")));
|
||||
$p->set_var("lang_edit",lang("Edit"));
|
||||
$p->set_var("lang_delete",lang("Delete"));
|
||||
$p->set_var("lang_enabled",lang("Enabled"));
|
||||
$p->set_var('sort_title',$phpgw->nextmatchs->show_sort_order($sort,"app_title",$order,"/admin/applications.php",lang('title')));
|
||||
$p->set_var('lang_edit',lang('Edit'));
|
||||
$p->set_var('lang_delete',lang('Delete'));
|
||||
$p->set_var('lang_enabled',lang('Enabled'));
|
||||
|
||||
$phpgw->db->query("select * from phpgw_applications $ordermethod",__LINE__,__FILE__);
|
||||
while ($phpgw->db->next_record()) {
|
||||
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
||||
$name = $phpgw->db->f("app_title");
|
||||
$phpgw->db->query("select * from phpgw_applications $ordermethod",__LINE__,__FILE__);
|
||||
while ($phpgw->db->next_record())
|
||||
{
|
||||
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
||||
$name = $phpgw->db->f("app_title");
|
||||
|
||||
if (! $phpgw->db->f("app_title")) $name = $phpgw->db->f("app_name");
|
||||
if (! $name) $name = " ";
|
||||
if (! $phpgw->db->f('app_title')) $name = $phpgw->db->f('app_name');
|
||||
if (! $name) $name = " ";
|
||||
|
||||
$p->set_var("tr_color",$tr_color);
|
||||
$p->set_var("name",$name);
|
||||
$p->set_var("edit",'<a href="' . $phpgw->link("/admin/editapplication.php","app_name=" . urlencode($phpgw->db->f("app_name"))) . '"> ' . lang("Edit") . ' </a>');
|
||||
$p->set_var("delete",'<a href="' . $phpgw->link("/admin/deleteapplication.php","app_name=" . urlencode($phpgw->db->f("app_name"))) . '"> ' . lang("Delete") . ' </a>');
|
||||
$p->set_var('tr_color',$tr_color);
|
||||
$p->set_var('name',$name);
|
||||
$p->set_var('edit','<a href="' . $phpgw->link('/admin/editapplication.php','app_name=' . urlencode($phpgw->db->f('app_name'))) . '"> ' . lang('Edit') . ' </a>');
|
||||
$p->set_var('delete','<a href="' . $phpgw->link('/admin/deleteapplication.php','app_name=' . urlencode($phpgw->db->f('app_name'))) . '"> ' . lang('Delete') . ' </a>');
|
||||
|
||||
if ($phpgw->db->f("app_enabled") != 0) {
|
||||
$status = lang("Yes");
|
||||
} else {
|
||||
$status = "<b>" . lang("No") . "</b>";
|
||||
}
|
||||
$p->set_var("status",$status);
|
||||
if ($phpgw->db->f('app_enabled') != 0)
|
||||
{
|
||||
$status = lang('Yes');
|
||||
}
|
||||
else
|
||||
{
|
||||
$status = "<b>" . lang('No') . "</b>";
|
||||
}
|
||||
$p->set_var('status',$status);
|
||||
|
||||
$p->parse("rows","row",True);
|
||||
}
|
||||
$p->parse('rows','row',True);
|
||||
}
|
||||
|
||||
$p->set_var("new_action",$phpgw->link("/admin/newapplication.php"));
|
||||
$p->set_var("lang_add",lang("add"));
|
||||
|
||||
$p->pparse("out","list");
|
||||
$phpgw->common->phpgw_footer();
|
||||
$p->set_var('new_action',$phpgw->link('/admin/newapplication.php'));
|
||||
$p->set_var('lang_add',lang('add'));
|
||||
|
||||
$p->pparse('out','list');
|
||||
|
||||
$phpgw->common->phpgw_footer();
|
||||
?>
|
||||
|
@ -11,122 +11,137 @@
|
||||
\**************************************************************************/
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_info["flags"] = array('currentapp' => 'admin',
|
||||
'enable_nextmatchs_class' => True);
|
||||
$phpgw_info['flags'] = array(
|
||||
'currentapp' => 'admin',
|
||||
'enable_nextmatchs_class' => True
|
||||
);
|
||||
|
||||
include('../header.inc.php');
|
||||
include('../header.inc.php');
|
||||
|
||||
$t = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('admin'));
|
||||
$t = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('admin'));
|
||||
|
||||
$t->set_file(array('cat_list_t' => 'listcats.tpl',
|
||||
'cat_list' => 'listcats.tpl'));
|
||||
$t->set_block('cat_list_t','cat_list','list');
|
||||
$t->set_file(array(
|
||||
'cat_list_t' => 'listcats.tpl',
|
||||
'cat_list' => 'listcats.tpl'
|
||||
));
|
||||
$t->set_block('cat_list_t','cat_list','list');
|
||||
|
||||
$common_hidden_vars = "<input type=\"hidden\" name=\"sort\" value=\"$sort\">\n"
|
||||
. "<input type=\"hidden\" name=\"order\" value=\"$order\">\n"
|
||||
. "<input type=\"hidden\" name=\"query\" value=\"$query\">\n"
|
||||
. "<input type=\"hidden\" name=\"start\" value=\"$start\">\n"
|
||||
. "<input type=\"hidden\" name=\"filter\" value=\"$filter\">\n";
|
||||
$common_hidden_vars = "<input type=\"hidden\" name=\"sort\" value=\"$sort\">\n"
|
||||
. "<input type=\"hidden\" name=\"order\" value=\"$order\">\n"
|
||||
. "<input type=\"hidden\" name=\"query\" value=\"$query\">\n"
|
||||
. "<input type=\"hidden\" name=\"start\" value=\"$start\">\n"
|
||||
. "<input type=\"hidden\" name=\"filter\" value=\"$filter\">\n";
|
||||
|
||||
$t->set_var('lang_action',lang('Category list'));
|
||||
$t->set_var('add_action',$phpgw->link('/admin/addcategory.php'));
|
||||
$t->set_var('lang_add',lang('Add'));
|
||||
$t->set_var('title_categories',lang('Global categories'));
|
||||
$t->set_var('lang_search',lang('Search'));
|
||||
$t->set_var('actionurl',$phpgw->link('/admin/categories.php'));
|
||||
$t->set_var('lang_done',lang('Done'));
|
||||
$t->set_var('doneurl',$phpgw->link('/admin/index.php'));
|
||||
$t->set_var('lang_action',lang('Category list'));
|
||||
$t->set_var('add_action',$phpgw->link('/admin/addcategory.php'));
|
||||
$t->set_var('lang_add',lang('Add'));
|
||||
$t->set_var('title_categories',lang('Global categories'));
|
||||
$t->set_var('lang_search',lang('Search'));
|
||||
$t->set_var('actionurl',$phpgw->link('/admin/categories.php'));
|
||||
$t->set_var('lang_done',lang('Done'));
|
||||
$t->set_var('doneurl',$phpgw->link('/admin/index.php'));
|
||||
|
||||
if (! $start) { $start = 0; }
|
||||
if (! $start) { $start = 0; }
|
||||
|
||||
if($phpgw_info['user']['preferences']['common']['maxmatchs'] && $phpgw_info['user']['preferences']['common']['maxmatchs'] > 0) {
|
||||
$limit = $phpgw_info['user']['preferences']['common']['maxmatchs'];
|
||||
}
|
||||
else { $limit = 15; }
|
||||
if($phpgw_info['user']['preferences']['common']['maxmatchs'] && $phpgw_info['user']['preferences']['common']['maxmatchs'] > 0)
|
||||
{
|
||||
$limit = $phpgw_info['user']['preferences']['common']['maxmatchs'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$limit = 15;
|
||||
}
|
||||
|
||||
$c = CreateObject('phpgwapi.categories');
|
||||
$c->categories($phpgw_info['user']['account_id'],'phpgw');
|
||||
$categories = $c->return_array('all',$start,$limit,$query,$sort,$order);
|
||||
$c = CreateObject('phpgwapi.categories');
|
||||
$c->categories($phpgw_info['user']['account_id'],'phpgw');
|
||||
$categories = $c->return_array('all',$start,$limit,$query,$sort,$order);
|
||||
|
||||
//--------------------------------- nextmatch --------------------------------------------
|
||||
//--------------------------------- nextmatch --------------------------------------------
|
||||
$left = $phpgw->nextmatchs->left('/admin/categories.php',$start,$c->total_records);
|
||||
$right = $phpgw->nextmatchs->right('/admin/categories.php',$start,$c->total_records);
|
||||
$t->set_var('left',$left);
|
||||
$t->set_var('right',$right);
|
||||
|
||||
$left = $phpgw->nextmatchs->left('/admin/categories.php',$start,$c->total_records);
|
||||
$right = $phpgw->nextmatchs->right('/admin/categories.php',$start,$c->total_records);
|
||||
$t->set_var('left',$left);
|
||||
$t->set_var('right',$right);
|
||||
if ($c->total_records > $limit)
|
||||
{
|
||||
$lang_showing=lang('showing x - x of x',($start + 1),($start + $limit),$c->total_records);
|
||||
}
|
||||
else
|
||||
{
|
||||
$lang_showing=lang('showing x',$c->total_records);
|
||||
}
|
||||
$t->set_var('lang_showing',$lang_showing);
|
||||
|
||||
if ($c->total_records > $limit) {
|
||||
$lang_showing=lang("showing x - x of x",($start + 1),($start + $limit),$c->total_records);
|
||||
}
|
||||
else { $lang_showing=lang("showing x",$c->total_records); }
|
||||
$t->set_var('lang_showing',$lang_showing);
|
||||
// ------------------------------ end nextmatch ------------------------------------------
|
||||
|
||||
// ------------------------------ end nextmatch ------------------------------------------
|
||||
//------------------- list header variable template-declarations -------------------------
|
||||
$t->set_var('th_bg',$phpgw_info['theme']['th_bg']);
|
||||
$t->set_var('sort_name',$phpgw->nextmatchs->show_sort_order($sort,'cat_name',$order,'/admin/categories.php',lang('Name')));
|
||||
$t->set_var('sort_description',$phpgw->nextmatchs->show_sort_order($sort,'cat_description',$order,'/admin/categories.php',lang('Description')));
|
||||
$t->set_var('lang_edit',lang('Edit'));
|
||||
$t->set_var('lang_delete',lang('Delete'));
|
||||
// -------------------------- end header declaration --------------------------------------
|
||||
|
||||
//------------------- list header variable template-declarations -------------------------
|
||||
for ($i=0;$i<count($categories);$i++)
|
||||
{
|
||||
if ($categories[$i]['owner'] == $phpgw_info['user']['account_id'] && $categories[$i]['app_name'] == 'phpgw')
|
||||
{
|
||||
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
||||
$t->set_var(tr_color,$tr_color);
|
||||
|
||||
$t->set_var('th_bg',$phpgw_info['theme']['th_bg']);
|
||||
$t->set_var('sort_name',$phpgw->nextmatchs->show_sort_order($sort,'cat_name',$order,'/admin/categories.php',lang('Name')));
|
||||
$t->set_var('sort_description',$phpgw->nextmatchs->show_sort_order($sort,'cat_description',$order,'/admin/categories.php',lang('Description')));
|
||||
$t->set_var('lang_edit',lang('Edit'));
|
||||
$t->set_var('lang_delete',lang('Delete'));
|
||||
|
||||
// -------------------------- end header declaration --------------------------------------
|
||||
$cat_id = $categories[$i]['id'];
|
||||
$owner = $categories[$i]['owner'];
|
||||
$space = ' ';
|
||||
$level = $categories[$i]['level'];
|
||||
|
||||
for ($i=0;$i<count($categories);$i++) {
|
||||
if ($level > 0)
|
||||
{
|
||||
$spaceset = str_repeat($space,$level);
|
||||
$name = $spaceset . $phpgw->strip_html($categories[$i]['name']);
|
||||
}
|
||||
|
||||
if ($categories[$i]['owner'] == $phpgw_info["user"]["account_id"] && $categories[$i]['app_name'] == 'phpgw') {
|
||||
$descr = $phpgw->strip_html($categories[$i]['description']);
|
||||
if (!$descr) { $descr = ' '; }
|
||||
|
||||
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
||||
$t->set_var(tr_color,$tr_color);
|
||||
if ($level == 0)
|
||||
{
|
||||
$name = '<font color="FF0000"><b>' . $phpgw->strip_html($categories[$i]['name']) . '</b></font>';
|
||||
$descr = '<font color="FF0000"><b>' . $descr . '</b></font>';
|
||||
}
|
||||
|
||||
$cat_id = $categories[$i]['id'];
|
||||
$owner = $categories[$i]['owner'];
|
||||
$space = ' ';
|
||||
$level = $categories[$i]['level'];
|
||||
//-------------------------- template declaration for list records ---------------------------
|
||||
$t->set_var(array(
|
||||
'name' => $name,
|
||||
'descr' => $descr
|
||||
));
|
||||
|
||||
if ($level > 0) {
|
||||
$spaceset = str_repeat($space,$level);
|
||||
$name = $spaceset . $phpgw->strip_html($categories[$i]['name']);
|
||||
}
|
||||
if ($categories[$i]["owner"] == $phpgw_info['user']['account_id'])
|
||||
{
|
||||
$t->set_var('edit',$phpgw->link('/admin/editcategory.php',"cat_id=$cat_id&start=$start&query=$query&sort=$sort&order=$order&filter=$filter"));
|
||||
$t->set_var('lang_edit_entry',lang('Edit'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$t->set_var('edit','');
|
||||
$t->set_var('lang_edit_entry',' ');
|
||||
}
|
||||
if ($categories[$i]["owner"] == $phpgw_info['user']['account_id'])
|
||||
{
|
||||
$t->set_var('delete',$phpgw->link('/admin/deletecategory.php',"cat_id=$cat_id&start=$start&query=$query&sort=$sort&order=$order&filter=$filter"));
|
||||
$t->set_var('lang_delete_entry',lang('Delete'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$t->set_var('delete','');
|
||||
$t->set_var('lang_delete_entry',' ');
|
||||
}
|
||||
$t->parse('list','cat_list',True);
|
||||
}
|
||||
}
|
||||
// ---------------------------- end record declaration -----------------------------------------
|
||||
|
||||
$descr = $phpgw->strip_html($categories[$i]['description']);
|
||||
if (! $descr) { $descr = ' '; }
|
||||
$t->parse('out','cat_list_t',True);
|
||||
$t->p('out');
|
||||
|
||||
if ($level == 0) {
|
||||
$name = '<font color="FF0000"><b>' . $phpgw->strip_html($categories[$i]['name']) . '</b></font>';
|
||||
$descr = '<font color="FF0000"><b>' . $descr . '</b></font>';
|
||||
}
|
||||
|
||||
//-------------------------- template declaration for list records ---------------------------
|
||||
|
||||
$t->set_var(array('name' => $name,
|
||||
'descr' => $descr));
|
||||
|
||||
|
||||
if ($categories[$i]["owner"] == $phpgw_info["user"]["account_id"]) {
|
||||
$t->set_var('edit',$phpgw->link('/admin/editcategory.php',"cat_id=$cat_id&start=$start&query=$query&sort=$sort&order=$order&filter=$filter"));
|
||||
$t->set_var('lang_edit_entry',lang('Edit'));
|
||||
}
|
||||
else {
|
||||
$t->set_var('edit','');
|
||||
$t->set_var('lang_edit_entry',' ');
|
||||
}
|
||||
if ($categories[$i]["owner"] == $phpgw_info["user"]["account_id"]) {
|
||||
$t->set_var('delete',$phpgw->link('/admin/deletecategory.php',"cat_id=$cat_id&start=$start&query=$query&sort=$sort&order=$order&filter=$filter"));
|
||||
$t->set_var('lang_delete_entry',lang('Delete'));
|
||||
}
|
||||
else {
|
||||
$t->set_var('delete','');
|
||||
$t->set_var('lang_delete_entry',' ');
|
||||
}
|
||||
$t->parse('list','cat_list',True);
|
||||
}
|
||||
}
|
||||
// ---------------------------- end record declaration -----------------------------------------
|
||||
|
||||
$t->parse('out','cat_list_t',True);
|
||||
$t->p('out');
|
||||
|
||||
$phpgw->common->phpgw_footer();
|
||||
?>
|
||||
$phpgw->common->phpgw_footer();
|
||||
?>
|
||||
|
@ -15,11 +15,14 @@
|
||||
|
||||
if ($delete_account || !$account_id)
|
||||
{
|
||||
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
|
||||
$phpgw_info['flags'] = array(
|
||||
'noheader' => True,
|
||||
'nonavbar' => True
|
||||
);
|
||||
}
|
||||
|
||||
$phpgw_info["flags"]["currentapp"] = "admin";
|
||||
include("../header.inc.php");
|
||||
$phpgw_info['flags']['currentapp'] = 'admin';
|
||||
include('../header.inc.php');
|
||||
// Make sure they are not attempting to delete their own account, or they have cancelled.
|
||||
// If they are, they should not reach this point anyway.
|
||||
if($cancel || $phpgw_info['user']['account_id'] == $account_id)
|
||||
@ -30,7 +33,7 @@
|
||||
|
||||
if ($account_id && !$delete_account)
|
||||
{
|
||||
$phpgw->template->set_file(array("form" => "delete_account.tpl"));
|
||||
$phpgw->template->set_file(array('form' => 'delete_account.tpl'));
|
||||
|
||||
$phpgw->template->set_var('form_action',$phpgw->link('/admin/deleteaccount.php'));
|
||||
$phpgw->template->set_var('account_id',$account_id);
|
||||
@ -51,7 +54,7 @@
|
||||
$phpgw->template->set_var('new_owner_select',$str);
|
||||
$phpgw->template->set_var('cancel',lang('cancel'));
|
||||
$phpgw->template->set_var('delete',lang('delete'));
|
||||
$phpgw->template->pparse("out","form");
|
||||
$phpgw->template->pparse('out','form');
|
||||
|
||||
$phpgw->common->phpgw_footer();
|
||||
}
|
||||
@ -90,7 +93,7 @@
|
||||
$cd = 29;
|
||||
}
|
||||
|
||||
Header("Location: " . $phpgw->link("/admin/accounts.php","cd=$cd"));
|
||||
Header("Location: " . $phpgw->link('/admin/accounts.php',"cd=$cd"));
|
||||
$phpgw->common->phpgw_exit();
|
||||
}
|
||||
?>
|
||||
|
@ -11,29 +11,34 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True, "currentapp" => "admin");
|
||||
$phpgw_info['flags'] = array(
|
||||
'noheader' => True,
|
||||
'nonavbar' => True,
|
||||
'currentapp' => 'admin'
|
||||
);
|
||||
|
||||
if (! $app_name) {
|
||||
Header("Location: " . $phpgw->link("/admin/applications.php"));
|
||||
}
|
||||
include("../header.inc.php");
|
||||
$phpgw->template->set_file(array("body" => "delete_common.tpl"));
|
||||
if (! $app_name)
|
||||
{
|
||||
Header("Location: " . $phpgw->link('/admin/applications.php'));
|
||||
}
|
||||
include('../header.inc.php');
|
||||
$phpgw->template->set_file(array('body' => 'delete_common.tpl'));
|
||||
|
||||
if ($confirm) {
|
||||
$phpgw->db->query("delete from phpgw_applications where app_name='$app_name'",__LINE__,__FILE__);
|
||||
if ($confirm)
|
||||
{
|
||||
$phpgw->db->query("delete from phpgw_applications where app_name='$app_name'",__LINE__,__FILE__);
|
||||
|
||||
Header("Location: " . $phpgw->link("/admin/applications.php"));
|
||||
$phpgw->common->phpgw_exit();
|
||||
}
|
||||
Header("Location: " . $phpgw->link('/admin/applications.php'));
|
||||
$phpgw->common->phpgw_exit();
|
||||
}
|
||||
|
||||
$phpgw->common->phpgw_header();
|
||||
echo parse_navbar();
|
||||
$phpgw->common->phpgw_header();
|
||||
echo parse_navbar();
|
||||
|
||||
$phpgw->template->set_var("messages",lang("Are you sure you want to delete this application ?"));
|
||||
$phpgw->template->set_var("no",'<a href="' . $phpgw->link("/admin/applications.php")
|
||||
. '">' . lang("No") . '</a>');
|
||||
$phpgw->template->set_var("yes",'<a href="' . $phpgw->link("/admin/deleteapplication.php","app_name=" . urlencode($app_name) . "&confirm=True") . '">' . lang("Yes") . '</a>');
|
||||
$phpgw->template->pparse("out","body");
|
||||
$phpgw->template->set_var('messages',lang('Are you sure you want to delete this application ?'));
|
||||
$phpgw->template->set_var('no','<a href="' . $phpgw->link("/admin/applications.php") . '">' . lang('No') . '</a>');
|
||||
$phpgw->template->set_var('yes','<a href="' . $phpgw->link("/admin/deleteapplication.php","app_name=" . urlencode($app_name) . "&confirm=True") . '">' . lang('Yes') . '</a>');
|
||||
$phpgw->template->pparse('out','body');
|
||||
|
||||
$phpgw->common->phpgw_footer();
|
||||
$phpgw->common->phpgw_footer();
|
||||
?>
|
||||
|
@ -2,7 +2,7 @@
|
||||
/**************************************************************************\
|
||||
* phpGroupWare - Admin *
|
||||
* (http://www.phpgroupware.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 *
|
||||
* under the terms of the GNU General Public License as published by the *
|
||||
@ -11,58 +11,66 @@
|
||||
\**************************************************************************/
|
||||
/* $Id$ */
|
||||
|
||||
if ($confirm) {
|
||||
$phpgw_info["flags"] = array('noheader' => True,
|
||||
'nonavbar' => True);
|
||||
}
|
||||
if ($confirm)
|
||||
{
|
||||
$phpgw_info['flags'] = array(
|
||||
'noheader' => True,
|
||||
'nonavbar' => True
|
||||
);
|
||||
}
|
||||
|
||||
$phpgw_info["flags"]["currentapp"] = 'admin';
|
||||
include('../header.inc.php');
|
||||
$phpgw_info['flags']['currentapp'] = 'admin';
|
||||
include('../header.inc.php');
|
||||
|
||||
$c = CreateObject('phpgwapi.categories');
|
||||
$c->categories($phpgw_info['user']['account_id'],'phpgw');
|
||||
$c = CreateObject('phpgwapi.categories');
|
||||
$c->categories($phpgw_info['user']['account_id'],'phpgw');
|
||||
|
||||
if (! $cat_id) {
|
||||
Header('Location: ' . $phpgw->link('/admin/categories.php'));
|
||||
}
|
||||
if (! $cat_id)
|
||||
{
|
||||
Header('Location: ' . $phpgw->link('/admin/categories.php'));
|
||||
}
|
||||
|
||||
if ($confirm) {
|
||||
if ($subs) { $c->delete($cat_id,'True'); }
|
||||
else { $c->delete($cat_id); }
|
||||
Header('Location: ' . $phpgw->link('/admin/categories.php',"start=$start&query=$query&sort=$sort&order=$order&filter=$filter"));
|
||||
}
|
||||
else {
|
||||
$hidden_vars = "<input type=\"hidden\" name=\"sort\" value=\"$sort\">\n"
|
||||
. "<input type=\"hidden\" name=\"order\" value=\"$order\">\n"
|
||||
. "<input type=\"hidden\" name=\"query\" value=\"$query\">\n"
|
||||
. "<input type=\"hidden\" name=\"start\" value=\"$start\">\n"
|
||||
. "<input type=\"hidden\" name=\"filter\" value=\"$filter\">\n"
|
||||
. "<input type=\"hidden\" name=\"cat_id\" value=\"$cat_id\">\n";
|
||||
if ($confirm)
|
||||
{
|
||||
if ($subs) { $c->delete($cat_id,'True'); }
|
||||
else { $c->delete($cat_id); }
|
||||
Header('Location: ' . $phpgw->link('/admin/categories.php',"start=$start&query=$query&sort=$sort&order=$order&filter=$filter"));
|
||||
}
|
||||
else
|
||||
{
|
||||
$hidden_vars = "<input type=\"hidden\" name=\"sort\" value=\"$sort\">\n"
|
||||
. "<input type=\"hidden\" name=\"order\" value=\"$order\">\n"
|
||||
. "<input type=\"hidden\" name=\"query\" value=\"$query\">\n"
|
||||
. "<input type=\"hidden\" name=\"start\" value=\"$start\">\n"
|
||||
. "<input type=\"hidden\" name=\"filter\" value=\"$filter\">\n"
|
||||
. "<input type=\"hidden\" name=\"cat_id\" value=\"$cat_id\">\n";
|
||||
|
||||
$t = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('admin'));
|
||||
$t->set_file(array('category_delete' => 'delete_cat.tpl'));
|
||||
$t->set_var('messages',lang('Are you sure you want to delete this category ?'));
|
||||
$t->set_var('hidden_vars',$hidden_vars);
|
||||
|
||||
$exists = $c->exists('subs',$cat_name='',$cat_id);
|
||||
|
||||
if ($exists==True) {
|
||||
$t->set_var('lang_subs',lang('Do you also want to delete all subcategories ?'));
|
||||
$t->set_var('subs','<input type="checkbox" name="subs" value="True">');
|
||||
}
|
||||
else {
|
||||
$t->set_var('lang_subs','');
|
||||
$t->set_var('subs', '');
|
||||
}
|
||||
$t = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('admin'));
|
||||
$t->set_file(array('category_delete' => 'delete_cat.tpl'));
|
||||
$t->set_var('messages',lang('Are you sure you want to delete this category ?'));
|
||||
$t->set_var('hidden_vars',$hidden_vars);
|
||||
|
||||
$t->set_var('nolink',$phpgw->link('/admin/categories.php',"cat_id=$cat_id&start=$start&query=$query&sort=$sort&order=$order&filter=$filter"));
|
||||
$t->set_var('lang_no',lang('No'));
|
||||
$exists = $c->exists('subs',$cat_name='',$cat_id);
|
||||
|
||||
$t->set_var('action_url',$phpgw->link('/admin/deletecategory.php',"cat_id=$cat_id"));
|
||||
$t->set_var('lang_yes',lang('Yes'));
|
||||
if ($exists==True)
|
||||
{
|
||||
$t->set_var('lang_subs',lang('Do you also want to delete all subcategories ?'));
|
||||
$t->set_var('subs','<input type="checkbox" name="subs" value="True">');
|
||||
}
|
||||
else
|
||||
{
|
||||
$t->set_var('lang_subs','');
|
||||
$t->set_var('subs', '');
|
||||
}
|
||||
|
||||
$t->pparse('out','category_delete');
|
||||
}
|
||||
$t->set_var('nolink',$phpgw->link('/admin/categories.php',"cat_id=$cat_id&start=$start&query=$query&sort=$sort&order=$order&filter=$filter"));
|
||||
$t->set_var('lang_no',lang('No'));
|
||||
|
||||
$phpgw->common->phpgw_footer();
|
||||
?>
|
||||
$t->set_var('action_url',$phpgw->link('/admin/deletecategory.php',"cat_id=$cat_id"));
|
||||
$t->set_var('lang_yes',lang('Yes'));
|
||||
|
||||
$t->pparse('out','category_delete');
|
||||
}
|
||||
|
||||
$phpgw->common->phpgw_footer();
|
||||
?>
|
||||
|
@ -11,89 +11,109 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_info = array();
|
||||
$phpgw_info['flags'] = array('noheader' => True, 'nonavbar' => True, 'currentapp' => 'admin');
|
||||
$phpgw_info = array();
|
||||
$phpgw_info['flags'] = array(
|
||||
'noheader' => True,
|
||||
'nonavbar' => True,
|
||||
'currentapp' => 'admin'
|
||||
);
|
||||
|
||||
if (! $group_id) {
|
||||
Header('Location: ' . $phpgw->link('/admin/groups.php'));
|
||||
}
|
||||
include('../header.inc.php');
|
||||
$p = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('admin'));
|
||||
$p->set_file(array('body' => 'delete_common.tpl',
|
||||
'message_row' => 'message_row.tpl'));
|
||||
if (! $group_id)
|
||||
{
|
||||
Header('Location: ' . $phpgw->link('/admin/groups.php'));
|
||||
}
|
||||
include('../header.inc.php');
|
||||
|
||||
if ((($group_id) && ($confirm)) || $removeusers) {
|
||||
if ($removeusers) {
|
||||
$old_group_list = $phpgw->acl->get_ids_for_location(intval($group_id),1,'phpgw_group');
|
||||
@reset($old_group_list);
|
||||
while($old_group_list && $id = each($old_group_list)) {
|
||||
$phpgw->acl->delete_repository('phpgw_group',$group_id,intval($id[1]));
|
||||
}
|
||||
}
|
||||
$p = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('admin'));
|
||||
$p->set_file(array(
|
||||
'body' => 'delete_common.tpl',
|
||||
'message_row' => 'message_row.tpl'
|
||||
));
|
||||
|
||||
$group_name = $phpgw->accounts->id2name($group_id);
|
||||
if ((($group_id) && ($confirm)) || $removeusers)
|
||||
{
|
||||
if ($removeusers)
|
||||
{
|
||||
$old_group_list = $phpgw->acl->get_ids_for_location(intval($group_id),1,'phpgw_group');
|
||||
@reset($old_group_list);
|
||||
while($old_group_list && $id = each($old_group_list))
|
||||
{
|
||||
$phpgw->acl->delete_repository('phpgw_group',$group_id,intval($id[1]));
|
||||
}
|
||||
}
|
||||
|
||||
$old_group_list = $phpgw->acl->get_ids_for_location(intval($group_id),1,'phpgw_group');
|
||||
if ($old_group_list) {
|
||||
$phpgw->common->phpgw_header();
|
||||
echo parse_navbar();
|
||||
$group_name = $phpgw->accounts->id2name($group_id);
|
||||
|
||||
$p->set_var('message_display','<tr><td>'
|
||||
. lang('Sorry, the follow users are still a member of the group x',$group_name)
|
||||
. '<br>' . lang('They must be removed before you can continue') . '</td></td>');
|
||||
$p->parse('messages','message_row',True);
|
||||
|
||||
$p->set_var('message_display','<tr><td><table border="0">');
|
||||
$p->parse('messages','message_row',True);
|
||||
$old_group_list = $phpgw->acl->get_ids_for_location(intval($group_id),1,'phpgw_group');
|
||||
if ($old_group_list)
|
||||
{
|
||||
$phpgw->common->phpgw_header();
|
||||
echo parse_navbar();
|
||||
|
||||
$p->set_var('message_display','<tr><td>'
|
||||
. lang('Sorry, the follow users are still a member of the group x',$group_name)
|
||||
. '<br>' . lang('They must be removed before you can continue') . '</td></td>');
|
||||
$p->parse('messages','message_row',True);
|
||||
|
||||
$p->set_var('message_display','<tr><td><table border="0">');
|
||||
$p->parse('messages','message_row',True);
|
||||
|
||||
while (list(,$id) = each($old_group_list))
|
||||
{
|
||||
$p->set_var('message_display','<tr><td><a href="' . $phpgw->link('/admin/editaccount.php','account_=' . $id) . '">' . $phpgw->common->grab_owner_name($id) . '</a></tr></td>');
|
||||
$p->parse('messages','message_row',True);
|
||||
}
|
||||
$p->set_var('message_display','</table></center></td></tr><tr><td>'
|
||||
. '<a href="' . $phpgw->link('/admin/deletegroup.php','group_id=' . $group_id . '&removeusers=True')
|
||||
. '">' . lang('Remove all users from this group') . '</a></td></tr>');
|
||||
$p->parse('messages','message_row',True);
|
||||
$p->set_var('yes','');
|
||||
$p->set_var('no','');
|
||||
$p->pparse('out','body');
|
||||
$phpgw->common->phpgw_footer();
|
||||
$phpgw->common->phpgw_exit();
|
||||
}
|
||||
elseif ($removeusers && !$confirm)
|
||||
{
|
||||
Header('Location: ' . $phpgw->link('/admin/deletegroup.php','group_id='.$group_id.'&confirm=True'));
|
||||
$phpgw->common->phpgw_exit();
|
||||
}
|
||||
|
||||
if ($confirm)
|
||||
{
|
||||
$phpgw->db->lock(array('phpgw_accounts','phpgw_acl'));
|
||||
$phpgw->db->query('DELETE FROM phpgw_accounts WHERE account_id='.$group_id,__LINE__,__FILE__);
|
||||
$phpgw->acl->delete_repository('%%','run',intval($group_id));
|
||||
|
||||
$basedir = $phpgw_info['server']['files_dir'] . SEP . 'groups' . SEP;
|
||||
|
||||
if (! @rmdir($basedir . $group_name))
|
||||
{
|
||||
$cd = 38;
|
||||
}
|
||||
else
|
||||
{
|
||||
$cd = 32;
|
||||
}
|
||||
|
||||
$phpgw->db->unlock();
|
||||
|
||||
Header('Location: ' . $phpgw->link('/admin/groups.php','cd='.$cd));
|
||||
$phpgw->common->phpgw_exit();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$phpgw->common->phpgw_header();
|
||||
echo parse_navbar();
|
||||
|
||||
$p->set_var('message_display',lang('Are you sure you want to delete this group ?'));
|
||||
$p->parse('messages','message_row');
|
||||
$p->set_var('yes','<a href="' . $phpgw->link('/admin/deletegroup.php',"group_id=$group_id&confirm=true") . '">' . lang('Yes') . '</a>');
|
||||
$p->set_var('no','<a href="' . $phpgw->link('/admin/groups.php') . '">' . lang('No') . '</a>');
|
||||
|
||||
$p->pparse('out','body');
|
||||
|
||||
while (list(,$id) = each($old_group_list)) {
|
||||
$p->set_var('message_display','<tr><td><a href="' . $phpgw->link('/admin/editaccount.php','account_=' . $id) . '">' . $phpgw->common->grab_owner_name($id) . '</a></tr></td>');
|
||||
$p->parse('messages','message_row',True);
|
||||
}
|
||||
$p->set_var('message_display','</table></center></td></tr><tr><td>'
|
||||
. '<a href="' . $phpgw->link('/admin/deletegroup.php','group_id=' . $group_id . '&removeusers=True')
|
||||
. '">' . lang('Remove all users from this group') . '</a></td></tr>');
|
||||
$p->parse('messages','message_row',True);
|
||||
$p->set_var('yes','');
|
||||
$p->set_var('no','');
|
||||
$p->pparse('out','body');
|
||||
$phpgw->common->phpgw_footer();
|
||||
$phpgw->common->phpgw_exit();
|
||||
} elseif ($removeusers && !$confirm) {
|
||||
Header('Location: ' . $phpgw->link('/admin/deletegroup.php','group_id='.$group_id.'&confirm=True'));
|
||||
$phpgw->common->phpgw_exit();
|
||||
}
|
||||
|
||||
if ($confirm) {
|
||||
$phpgw->db->lock(array('phpgw_accounts','phpgw_acl'));
|
||||
$phpgw->db->query('DELETE FROM phpgw_accounts WHERE account_id='.$group_id,__LINE__,__FILE__);
|
||||
$phpgw->acl->delete_repository('%%','run',intval($group_id));
|
||||
|
||||
$basedir = $phpgw_info['server']['files_dir'] . SEP . 'groups' . SEP;
|
||||
|
||||
if (! @rmdir($basedir . $group_name)) {
|
||||
$cd = 38;
|
||||
} else {
|
||||
$cd = 32;
|
||||
}
|
||||
|
||||
$phpgw->db->unlock();
|
||||
|
||||
Header('Location: ' . $phpgw->link('/admin/groups.php','cd='.$cd));
|
||||
$phpgw->common->phpgw_exit();
|
||||
}
|
||||
} else {
|
||||
|
||||
$phpgw->common->phpgw_header();
|
||||
echo parse_navbar();
|
||||
|
||||
$p->set_var('message_display',lang('Are you sure you want to delete this group ?'));
|
||||
$p->parse('messages','message_row');
|
||||
$p->set_var('yes','<a href="' . $phpgw->link('/admin/deletegroup.php',"group_id=$group_id&confirm=true") . '">' . lang('Yes') . '</a>');
|
||||
$p->set_var('no','<a href="' . $phpgw->link('/admin/groups.php') . '">' . lang('No') . '</a>');
|
||||
|
||||
$p->pparse('out','body');
|
||||
|
||||
$phpgw->common->phpgw_footer();
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -9,7 +9,7 @@
|
||||
* option) any later version. *
|
||||
\**************************************************************************/
|
||||
/* $Id$ */
|
||||
|
||||
|
||||
$phpgw_info['flags'] = array(
|
||||
'noheader' => True,
|
||||
'nonavbar' => True,
|
||||
@ -24,7 +24,7 @@
|
||||
function createPageBody($_account_id,$_userData='',$_errors='')
|
||||
{
|
||||
global $phpgw, $phpgw_info;
|
||||
|
||||
|
||||
$t = new Template($phpgw->common->get_tpl_dir('admin'));
|
||||
$t->set_unknowns('remove');
|
||||
|
||||
@ -405,18 +405,18 @@
|
||||
}
|
||||
return;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// the old code
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// The following sets any default preferences needed for new applications..
|
||||
// This is smart enough to know if previous preferences were selected, use them.
|
||||
|
||||
$pref = CreateObject('phpgwapi.preferences',intval($account_id));
|
||||
$t = $pref->get_preferences();
|
||||
|
||||
|
||||
$docommit = False;
|
||||
$after_apps = explode(':',$apps_after);
|
||||
for ($i=1;$i<count($after_apps) - 1;$i++)
|
||||
@ -446,12 +446,12 @@
|
||||
while ($app = each($apps_after))
|
||||
{
|
||||
$phpgw->common->hook_single('update_user_data', $app[0]);
|
||||
}
|
||||
}
|
||||
|
||||
$includedSomething = False;
|
||||
// start inlcuding other admin tools
|
||||
while($app = each($apps_after))
|
||||
{
|
||||
$phpgw->common->hook_single('show_user_data', $app[0]);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -11,120 +11,141 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_info = array();
|
||||
if ($submit) {
|
||||
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
|
||||
}
|
||||
$phpgw_info = array();
|
||||
if ($submit)
|
||||
{
|
||||
$phpgw_info['flags'] = array(
|
||||
'noheader' => True,
|
||||
'nonavbar' => True
|
||||
);
|
||||
}
|
||||
|
||||
$phpgw_info["flags"]["currentapp"] = "admin";
|
||||
$phpgw_info["flags"]["enable_nextmatchs_class"] = True;
|
||||
$phpgw_info['flags']['currentapp'] = 'admin';
|
||||
$phpgw_info['flags']['enable_nextmatchs_class'] = True;
|
||||
|
||||
include("../header.inc.php");
|
||||
include('../header.inc.php');
|
||||
|
||||
$p = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('admin'));
|
||||
$p = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('admin'));
|
||||
|
||||
function display_row($label, $value)
|
||||
{
|
||||
global $phpgw,$p;
|
||||
$p->set_var("tr_color",$phpgw->nextmatchs->alternate_row_color());
|
||||
$p->set_var("label",$label);
|
||||
$p->set_var("value",$value);
|
||||
function display_row($label, $value)
|
||||
{
|
||||
global $phpgw,$p;
|
||||
$p->set_var('tr_color',$phpgw->nextmatchs->alternate_row_color());
|
||||
$p->set_var('label',$label);
|
||||
$p->set_var('value',$value);
|
||||
|
||||
$p->parse("rows","row",True);
|
||||
}
|
||||
$p->parse('rows','row',True);
|
||||
}
|
||||
|
||||
$p->set_file(array(
|
||||
"form" => "application_form.tpl",
|
||||
"row" => "application_form_row.tpl"
|
||||
'form' => 'application_form.tpl',
|
||||
'row' => 'application_form_row.tpl'
|
||||
));
|
||||
|
||||
if ($submit) {
|
||||
if (! $app_order) {
|
||||
$app_order = 0;
|
||||
}
|
||||
if ($submit)
|
||||
{
|
||||
if (! $app_order)
|
||||
{
|
||||
$app_order = 0;
|
||||
}
|
||||
|
||||
$totalerrors = 0;
|
||||
|
||||
if (! $n_app_name)
|
||||
$error[$totalerrors++] = lang("You must enter an application name.");
|
||||
|
||||
if (! $n_app_title)
|
||||
$error[$totalerrors++] = lang("You must enter an application title.");
|
||||
$totalerrors = 0;
|
||||
|
||||
if ($old_app_name != $n_app_name) {
|
||||
$phpgw->db->query("select count(*) from phpgw_applications where app_name='"
|
||||
. addslashes($n_app_name) . "'",__LINE__,__FILE__);
|
||||
$phpgw->db->next_record();
|
||||
|
||||
if ($phpgw->db->f(0) != 0) {
|
||||
$error[$totalerrors++] = lang("That application name already exists.");
|
||||
}
|
||||
}
|
||||
if (! $n_app_name)
|
||||
{
|
||||
$error[$totalerrors++] = lang('You must enter an application name.');
|
||||
}
|
||||
|
||||
if (! $n_app_title)
|
||||
{
|
||||
$error[$totalerrors++] = lang('You must enter an application title.');
|
||||
}
|
||||
|
||||
if ($old_app_name != $n_app_name)
|
||||
{
|
||||
$phpgw->db->query("select count(*) from phpgw_applications where app_name='"
|
||||
. addslashes($n_app_name) . "'",__LINE__,__FILE__);
|
||||
$phpgw->db->next_record();
|
||||
|
||||
if ($phpgw->db->f(0) != 0)
|
||||
{
|
||||
$error[$totalerrors++] = lang('That application name already exists.');
|
||||
}
|
||||
}
|
||||
|
||||
if (! $totalerrors) {
|
||||
$phpgw->db->query("update phpgw_applications set app_name='" . addslashes($n_app_name) . "',"
|
||||
. "app_title='" . addslashes($n_app_title) . "', app_enabled='"
|
||||
. "$n_app_status',app_order='$app_order' where app_name='$old_app_name'",__LINE__,__FILE__);
|
||||
if (! $totalerrors)
|
||||
{
|
||||
$phpgw->db->query("update phpgw_applications set app_name='" . addslashes($n_app_name) . "',"
|
||||
. "app_title='" . addslashes($n_app_title) . "', app_enabled='"
|
||||
. "$n_app_status',app_order='$app_order' where app_name='$old_app_name'",__LINE__,__FILE__);
|
||||
|
||||
if($n_app_anonymous) {
|
||||
$phpgw->acl->add_repository($n_app_name,'everywhere',0,PHPGW_ACL_READ);
|
||||
} else {
|
||||
$phpgw->acl->delete_repository($n_app_name,'everywhere',0);
|
||||
}
|
||||
if($n_app_anonymous)
|
||||
{
|
||||
$phpgw->acl->add_repository($n_app_name,'everywhere',0,PHPGW_ACL_READ);
|
||||
}
|
||||
else
|
||||
{
|
||||
$phpgw->acl->delete_repository($n_app_name,'everywhere',0);
|
||||
}
|
||||
|
||||
Header("Location: " . $phpgw->link("/admin/applications.php"));
|
||||
$phpgw->common->phpgw_exit();
|
||||
}
|
||||
}
|
||||
$phpgw->db->query("select * from phpgw_applications where app_name='$app_name'",__LINE__,__FILE__);
|
||||
$phpgw->db->next_record();
|
||||
Header("Location: " . $phpgw->link("/admin/applications.php"));
|
||||
$phpgw->common->phpgw_exit();
|
||||
}
|
||||
}
|
||||
|
||||
if ($totalerrors) {
|
||||
$phpgw->common->phpgw_header();
|
||||
echo parse_navbar();
|
||||
$phpgw->db->query("select * from phpgw_applications where app_name='$app_name'",__LINE__,__FILE__);
|
||||
$phpgw->db->next_record();
|
||||
|
||||
$p->set_var("error","<p><center>" . $phpgw->common->error_list($error) . "</center><br>");
|
||||
} else {
|
||||
$p->set_var("error","");
|
||||
|
||||
$n_app_name = $phpgw->db->f("app_name");
|
||||
$n_app_title = $phpgw->db->f("app_title");
|
||||
$n_app_status = $phpgw->db->f("app_enabled");
|
||||
$old_app_name = $phpgw->db->f("app_name");
|
||||
$app_order = $phpgw->db->f("app_order");
|
||||
$n_app_anonymous = $phpgw->acl->check('everywhere', PHPGW_ACL_READ, $n_app_name);
|
||||
}
|
||||
if ($totalerrors)
|
||||
{
|
||||
$phpgw->common->phpgw_header();
|
||||
echo parse_navbar();
|
||||
|
||||
$p->set_var('error',"<p><center>" . $phpgw->common->error_list($error) . "</center><br>");
|
||||
}
|
||||
else
|
||||
{
|
||||
$p->set_var('error','');
|
||||
|
||||
$n_app_name = $phpgw->db->f('app_name');
|
||||
$n_app_title = $phpgw->db->f('app_title');
|
||||
$n_app_status = $phpgw->db->f('app_enabled');
|
||||
$old_app_name = $phpgw->db->f('app_name');
|
||||
$app_order = $phpgw->db->f('app_order');
|
||||
$n_app_anonymous = $phpgw->acl->check('everywhere', PHPGW_ACL_READ, $n_app_name);
|
||||
}
|
||||
|
||||
$p->set_var("lang_header",lang("Edit application"));
|
||||
$p->set_var("hidden_vars",'<input type="hidden" name="old_app_name" value="' . $old_app_name . '">');
|
||||
$p->set_var("th_bg",$phpgw_info["theme"]["th_bg"]);
|
||||
$p->set_var("form_action",$phpgw->link("/admin/editapplication.php"));
|
||||
$p->set_var('lang_header',lang('Edit application'));
|
||||
$p->set_var('hidden_vars','<input type="hidden" name="old_app_name" value="' . $old_app_name . '">');
|
||||
$p->set_var('th_bg',$phpgw_info['theme']['th_bg']);
|
||||
$p->set_var('form_action',$phpgw->link('/admin/editapplication.php'));
|
||||
|
||||
display_row(lang("application name"),'<input name="n_app_name" value="' . $n_app_name . '">');
|
||||
display_row(lang("application title"),'<input name="n_app_title" value="' . $n_app_title . '">');
|
||||
display_row(lang('application name'),'<input name="n_app_name" value="' . $n_app_name . '">');
|
||||
display_row(lang('application title'),'<input name="n_app_title" value="' . $n_app_title . '">');
|
||||
|
||||
$p->set_var("lang_status",lang("Status"));
|
||||
$p->set_var("lang_submit_button",lang("edit"));
|
||||
$p->set_var('lang_status',lang('Status'));
|
||||
$p->set_var('lang_submit_button',lang('edit'));
|
||||
|
||||
$selected[$n_app_status] = " selected";
|
||||
$status_html = '<option value="0"' . $selected[0] . '>' . lang("Disabled") . '</option>'
|
||||
. '<option value="1"' . $selected[1] . '>' . lang("Enabled") . '</option>'
|
||||
. '<option value="2"' . $selected[2] . '>' . lang("Enabled - Hidden from navbar") . '</option>';
|
||||
$selected[$n_app_status] = " selected";
|
||||
$status_html = '<option value="0"' . $selected[0] . '>' . lang('Disabled') . '</option>'
|
||||
. '<option value="1"' . $selected[1] . '>' . lang('Enabled') . '</option>'
|
||||
. '<option value="2"' . $selected[2] . '>' . lang('Enabled - Hidden from navbar') . '</option>';
|
||||
|
||||
display_row(lang("Status"),'<select name="n_app_status">' . $status_html . '</select>');
|
||||
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 . '">');
|
||||
display_row(lang("Status"),'<select name="n_app_status">' . $status_html . '</select>');
|
||||
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 . '">');
|
||||
|
||||
$str = '<input type="checkbox" name="n_app_anonymous" value="True"';
|
||||
if ($n_app_anonymous) {
|
||||
$str .= " checked";
|
||||
}
|
||||
$str .= ">";
|
||||
|
||||
display_row(lang("Allow Anonymous access to this app"),$str);
|
||||
|
||||
$p->set_var("select_status",$status_html);
|
||||
$str = '<input type="checkbox" name="n_app_anonymous" value="True"';
|
||||
if ($n_app_anonymous)
|
||||
{
|
||||
$str .= " checked";
|
||||
}
|
||||
$str .= ">";
|
||||
|
||||
$p->pparse("out","form");
|
||||
display_row(lang('Allow Anonymous access to this app'),$str);
|
||||
|
||||
$phpgw->common->phpgw_footer();
|
||||
$p->set_var('select_status',$status_html);
|
||||
|
||||
$p->pparse('out','form');
|
||||
|
||||
$phpgw->common->phpgw_footer();
|
||||
?>
|
||||
|
@ -11,87 +11,91 @@
|
||||
\**************************************************************************/
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_info["flags"]["currentapp"] = 'admin';
|
||||
include('../header.inc.php');
|
||||
|
||||
if (! $cat_id) {
|
||||
Header('Location: ' . $phpgw->link('/admin/categories.php',"sort=$sort&order=$order&query=$query&start=$start"
|
||||
. "&filter=$filter"));
|
||||
}
|
||||
$phpgw_info['flags']['currentapp'] = 'admin';
|
||||
include('../header.inc.php');
|
||||
|
||||
$t = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('admin'));
|
||||
$t->set_file(array('form' => 'category_form.tpl'));
|
||||
$t->set_block('form','add','addhandle');
|
||||
$t->set_block('form','edit','edithandle');
|
||||
|
||||
$c = CreateObject('phpgwapi.categories');
|
||||
$c->categories($phpgw_info['user']['account_id'],'phpgw');
|
||||
|
||||
$hidden_vars = "<input type=\"hidden\" name=\"sort\" value=\"$sort\">\n"
|
||||
. "<input type=\"hidden\" name=\"order\" value=\"$order\">\n"
|
||||
. "<input type=\"hidden\" name=\"query\" value=\"$query\">\n"
|
||||
. "<input type=\"hidden\" name=\"start\" value=\"$start\">\n"
|
||||
. "<input type=\"hidden\" name=\"filter\" value=\"$filter\">\n"
|
||||
. "<input type=\"hidden\" name=\"cat_id\" value=\"$cat_id\">\n";
|
||||
|
||||
if ($submit) {
|
||||
$errorcount = 0;
|
||||
|
||||
if (!$cat_name) { $error[$errorcount++] = lang('Please enter a name for that category !'); }
|
||||
|
||||
if (!$error) {
|
||||
if (!$cat_parent) { $exists = $c->exists('mains',$cat_name,$cat_id); }
|
||||
else { $exists = $c->exists('subs',$cat_name,$cat_id); }
|
||||
if ($exists == True) { $error[$errorcount++] = lang('That category name has been used already !'); }
|
||||
if (! $cat_id)
|
||||
{
|
||||
Header('Location: ' . $phpgw->link('/admin/categories.php',"sort=$sort&order=$order&query=$query&start=$start"
|
||||
. "&filter=$filter"));
|
||||
}
|
||||
|
||||
if ($cat_main && $cat_parent) {
|
||||
$main = $c->return_main($cat_parent);
|
||||
if ($main != $cat_main) { $error[$errorcount++] = lang('You selected an invalid main category !'); }
|
||||
}
|
||||
$t = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('admin'));
|
||||
$t->set_file(array('form' => 'category_form.tpl'));
|
||||
$t->set_block('form','add','addhandle');
|
||||
$t->set_block('form','edit','edithandle');
|
||||
|
||||
$cat_name = addslashes($cat_name);
|
||||
$cat_description = addslashes($cat_description);
|
||||
$cat_access = 'public';
|
||||
$c = CreateObject('phpgwapi.categories');
|
||||
$c->categories($phpgw_info['user']['account_id'],'phpgw');
|
||||
|
||||
if (! $error) { $c->edit($cat_id,$cat_parent,$cat_name,$cat_description,$cat_data,$cat_access,$cat_main); }
|
||||
}
|
||||
$hidden_vars = "<input type=\"hidden\" name=\"sort\" value=\"$sort\">\n"
|
||||
. "<input type=\"hidden\" name=\"order\" value=\"$order\">\n"
|
||||
. "<input type=\"hidden\" name=\"query\" value=\"$query\">\n"
|
||||
. "<input type=\"hidden\" name=\"start\" value=\"$start\">\n"
|
||||
. "<input type=\"hidden\" name=\"filter\" value=\"$filter\">\n"
|
||||
. "<input type=\"hidden\" name=\"cat_id\" value=\"$cat_id\">\n";
|
||||
|
||||
if ($errorcount) { $t->set_var('message',$phpgw->common->error_list($error)); }
|
||||
if (($submit) && (! $error) && (! $errorcount)) { $t->set_var('message',lang('Category x has been updated !',$cat_name)); }
|
||||
if ((! $submit) && (! $error) && (! $errorcount)) { $t->set_var('message',''); }
|
||||
if ($submit)
|
||||
{
|
||||
$errorcount = 0;
|
||||
|
||||
$cats = $c->return_single($cat_id);
|
||||
if (!$cat_name) { $error[$errorcount++] = lang('Please enter a name for that category !'); }
|
||||
|
||||
$t->set_var('title_categories',lang('Edit global category'));
|
||||
$t->set_var('lang_parent',lang('Parent category'));
|
||||
$t->set_var('lang_select_parent',lang('Select parent category'));
|
||||
$t->set_var('actionurl',$phpgw->link('/admin/editcategory.php'));
|
||||
$t->set_var('deleteurl',$phpgw->link('/admin/deletecategory.php',"cat_id=$cat_id&start=$start&query=$query&sort=$sort&order=$order&filter=$filter"));
|
||||
$t->set_var('doneurl',$phpgw->link('/admin/categories.php',"start=$start&query=$query&sort=$sort&order=$order&filter=$filter"));
|
||||
if (!$error)
|
||||
{
|
||||
if (!$cat_parent) { $exists = $c->exists('mains',$cat_name,$cat_id); }
|
||||
else { $exists = $c->exists('subs',$cat_name,$cat_id); }
|
||||
if ($exists == True) { $error[$errorcount++] = lang('That category name has been used already !'); }
|
||||
}
|
||||
|
||||
$t->set_var('hidden_vars',$hidden_vars);
|
||||
$t->set_var('lang_name',lang('Category name'));
|
||||
$t->set_var('lang_descr',lang('Category description'));
|
||||
$t->set_var('lang_done',lang('Done'));
|
||||
$t->set_var('lang_edit',lang('Edit'));
|
||||
$t->set_var('lang_delete',lang('Delete'));
|
||||
if ($cat_main && $cat_parent)
|
||||
{
|
||||
$main = $c->return_main($cat_parent);
|
||||
if ($main != $cat_main) { $error[$errorcount++] = lang('You selected an invalid main category !'); }
|
||||
}
|
||||
|
||||
$t->set_var('lang_main',lang('Main category'));
|
||||
$t->set_var('lang_new_main',lang('New main category'));
|
||||
$t->set_var('main_category_list',$c->formated_list('select','mains',$cats[0]['main']));
|
||||
$cat_name = addslashes($cat_name);
|
||||
$cat_description = addslashes($cat_description);
|
||||
$cat_access = 'public';
|
||||
|
||||
$cat_id = $cats[0]['id'];
|
||||
if (! $error) { $c->edit($cat_id,$cat_parent,$cat_name,$cat_description,$cat_data,$cat_access,$cat_main); }
|
||||
}
|
||||
|
||||
$t->set_var('cat_name',$phpgw->strip_html($cats[0]['name']));
|
||||
$t->set_var('cat_description',$phpgw->strip_html($cats[0]['description']));
|
||||
$t->set_var('category_list',$c->formated_list('select','all',$cats[0]['parent']));
|
||||
if ($errorcount) { $t->set_var('message',$phpgw->common->error_list($error)); }
|
||||
if (($submit) && (! $error) && (! $errorcount)) { $t->set_var('message',lang('Category x has been updated !',$cat_name)); }
|
||||
if ((! $submit) && (! $error) && (! $errorcount)) { $t->set_var('message',''); }
|
||||
|
||||
$t->set_var('edithandle','');
|
||||
$t->set_var('addhandle','');
|
||||
$cats = $c->return_single($cat_id);
|
||||
|
||||
$t->pparse('out','form');
|
||||
$t->pparse('edithandle','edit');
|
||||
$t->set_var('title_categories',lang('Edit global category'));
|
||||
$t->set_var('lang_parent',lang('Parent category'));
|
||||
$t->set_var('lang_select_parent',lang('Select parent category'));
|
||||
$t->set_var('actionurl',$phpgw->link('/admin/editcategory.php'));
|
||||
$t->set_var('deleteurl',$phpgw->link('/admin/deletecategory.php',"cat_id=$cat_id&start=$start&query=$query&sort=$sort&order=$order&filter=$filter"));
|
||||
$t->set_var('doneurl',$phpgw->link('/admin/categories.php',"start=$start&query=$query&sort=$sort&order=$order&filter=$filter"));
|
||||
|
||||
$phpgw->common->phpgw_footer();
|
||||
?>
|
||||
$t->set_var('hidden_vars',$hidden_vars);
|
||||
$t->set_var('lang_name',lang('Category name'));
|
||||
$t->set_var('lang_descr',lang('Category description'));
|
||||
$t->set_var('lang_done',lang('Done'));
|
||||
$t->set_var('lang_edit',lang('Edit'));
|
||||
$t->set_var('lang_delete',lang('Delete'));
|
||||
|
||||
$t->set_var('lang_main',lang('Main category'));
|
||||
$t->set_var('lang_new_main',lang('New main category'));
|
||||
$t->set_var('main_category_list',$c->formated_list('select','mains',$cats[0]['main']));
|
||||
|
||||
$cat_id = $cats[0]['id'];
|
||||
|
||||
$t->set_var('cat_name',$phpgw->strip_html($cats[0]['name']));
|
||||
$t->set_var('cat_description',$phpgw->strip_html($cats[0]['description']));
|
||||
$t->set_var('category_list',$c->formated_list('select','all',$cats[0]['parent']));
|
||||
|
||||
$t->set_var('edithandle','');
|
||||
$t->set_var('addhandle','');
|
||||
|
||||
$t->pparse('out','form');
|
||||
$t->pparse('edithandle','edit');
|
||||
|
||||
$phpgw->common->phpgw_footer();
|
||||
?>
|
||||
|
@ -12,8 +12,11 @@
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_info = array();
|
||||
$phpgw_info["flags"] = array("currentapp" => "admin", "enable_nextmatchs_class" => True);
|
||||
include("../header.inc.php");
|
||||
$phpgw_info['flags'] = array(
|
||||
'currentapp' => 'admin',
|
||||
'enable_nextmatchs_class' => True
|
||||
);
|
||||
include('../header.inc.php');
|
||||
|
||||
function account_total($query)
|
||||
{
|
||||
@ -39,15 +42,15 @@
|
||||
|
||||
$total = account_total($query);
|
||||
|
||||
$p->set_var("th_bg",$phpgw_info["theme"]["th_bg"]);
|
||||
$p->set_var('th_bg',$phpgw_info['theme']['th_bg']);
|
||||
|
||||
$p->set_var("left_nextmatchs",$phpgw->nextmatchs->left("/admin/groups.php",$start,$total));
|
||||
$p->set_var("right_nextmatchs",$phpgw->nextmatchs->right("/admin/groups.php",$start,$total));
|
||||
$p->set_var("lang_groups",lang("user groups"));
|
||||
$p->set_var('left_nextmatchs',$phpgw->nextmatchs->left('/admin/groups.php',$start,$total));
|
||||
$p->set_var('right_nextmatchs',$phpgw->nextmatchs->right('/admin/groups.php',$start,$total));
|
||||
$p->set_var('lang_groups',lang('user groups'));
|
||||
|
||||
$p->set_var("sort_name",$phpgw->nextmatchs->show_sort_order($sort,"account_lid",$order,"/admin/groups.php",lang("name")));
|
||||
$p->set_var("header_edit",lang("Edit"));
|
||||
$p->set_var("header_delete",lang("Delete"));
|
||||
$p->set_var('sort_name',$phpgw->nextmatchs->show_sort_order($sort,"account_lid",$order,"/admin/groups.php",lang("name")));
|
||||
$p->set_var('header_edit',lang('Edit'));
|
||||
$p->set_var('header_delete',lang('Delete'));
|
||||
|
||||
$account_info = $phpgw->accounts->get_list('groups',$start,$sort, $order, $query, $total);
|
||||
|
||||
@ -66,23 +69,23 @@
|
||||
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
||||
$p->set_var("tr_color",$tr_color);
|
||||
|
||||
if (! $group_name) $group_name = ' ';
|
||||
if (! $group_name) { $group_name = ' '; }
|
||||
|
||||
$p->set_var("group_name",$group_name);
|
||||
$p->set_var("edit_link",'<a href="' . $phpgw->link("/admin/editgroup.php","group_id=" . $group_id) . '"> ' . lang("Edit") . ' </a>');
|
||||
$p->set_var("delete_link",'<a href="' . $phpgw->link("/admin/deletegroup.php","group_id=" . $group_id) . '"> ' . lang("Delete") . ' </a>');
|
||||
$p->parse("rows","row",True);
|
||||
$p->set_var('group_name',$group_name);
|
||||
$p->set_var('edit_link','<a href="' . $phpgw->link('/admin/editgroup.php','group_id=' . $group_id) . '"> ' . lang('Edit') . ' </a>');
|
||||
$p->set_var('delete_link','<a href="' . $phpgw->link('/admin/deletegroup.php','group_id=' . $group_id) . '"> ' . lang('Delete') . ' </a>');
|
||||
$p->parse('rows','row',True);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
$p->set_var("new_action",$phpgw->link("/admin/newgroup.php"));
|
||||
$p->set_var("lang_add",lang("add"));
|
||||
$p->set_var('new_action',$phpgw->link('/admin/newgroup.php'));
|
||||
$p->set_var('lang_add',lang('add'));
|
||||
|
||||
$p->set_var("search_action",$phpgw->link("/admin/groups.php"));
|
||||
$p->set_var("lang_search",lang("search"));
|
||||
$p->set_var('search_action',$phpgw->link('/admin/groups.php'));
|
||||
$p->set_var('lang_search',lang('search'));
|
||||
|
||||
$p->pparse("out","list");
|
||||
$p->pparse('out','list');
|
||||
|
||||
$phpgw->common->phpgw_footer();
|
||||
?>
|
||||
|
@ -46,7 +46,7 @@
|
||||
// (if they can get to the admin page, the admin app is enabled, hence it is shown)
|
||||
|
||||
$phpgw->db->query("SELECT app_name FROM phpgw_applications WHERE app_enabled=1 OR app_enabled=2 ORDER BY app_title",__LINE__,__FILE__);
|
||||
|
||||
|
||||
// Stuff it in an array in the off chance the admin includes need the db
|
||||
while ($phpgw->db->next_record())
|
||||
{
|
||||
|
@ -11,41 +11,44 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_info = array();
|
||||
if ($confirm) {
|
||||
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
|
||||
}
|
||||
$phpgw_info["flags"]["currentapp"] = "admin";
|
||||
include("../header.inc.php");
|
||||
if ($ksessionid == $phpgw_info["user"]["sessionid"]) {
|
||||
Header("Location: " . $phpgw->link("/admin/currentusers.php"));
|
||||
$phpgw->common->phpgw_exit();
|
||||
}
|
||||
$phpgw_info = array();
|
||||
if ($confirm) {
|
||||
$phpgw_info["flags"] = array("noheader" => True, "nonavbar" => True);
|
||||
}
|
||||
$phpgw_info["flags"]["currentapp"] = "admin";
|
||||
include("../header.inc.php");
|
||||
if ($ksessionid == $phpgw_info["user"]["sessionid"])
|
||||
{
|
||||
Header("Location: " . $phpgw->link("/admin/currentusers.php"));
|
||||
$phpgw->common->phpgw_exit();
|
||||
}
|
||||
|
||||
if ($confirm) {
|
||||
$phpgw->db->query("delete from phpgw_sessions where session_id='$ksession'");
|
||||
Header("Location: " . $phpgw->link("/admin/currentusers.php","cd=19"));
|
||||
} else {
|
||||
?>
|
||||
if ($confirm)
|
||||
{
|
||||
$phpgw->db->query("delete from phpgw_sessions where session_id='$ksession'");
|
||||
Header("Location: " . $phpgw->link("/admin/currentusers.php","cd=19"));
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<center>
|
||||
<table border=0 with=65%>
|
||||
<tr colspan=2>
|
||||
<td align=center>
|
||||
<?php echo lang("Are you sure you want to kill this session ?"); ?>
|
||||
<table border="0" with="65%">
|
||||
<tr colspan="2">
|
||||
<td align="center">
|
||||
<?php echo lang('Are you sure you want to kill this session ?'); ?>
|
||||
<td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="<?php echo $phpgw->link("/admin/currentusers.php") . "\">" . lang("No"); ?></a>
|
||||
<a href="<?php echo $phpgw->link('/admin/currentusers.php') . '">' . lang('No'); ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php echo $phpgw->link("/admin/killsession.php","ksession=$ksession&confirm=true")
|
||||
. "\">" . lang("Yes"); ?></a>
|
||||
<a href="<?php echo $phpgw->link('/admin/killsession.php','ksession=' . $ksession . '&confirm=true') . '">' . lang('Yes'); ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
<?php
|
||||
$phpgw->common->phpgw_footer();
|
||||
}
|
||||
$phpgw->common->phpgw_footer();
|
||||
}
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user