forked from extern/egroupware
formatting
This commit is contained in:
parent
bb1634be16
commit
ed1da95900
@ -11,99 +11,99 @@
|
||||
\**************************************************************************/
|
||||
/* $Id$ */
|
||||
|
||||
$phpgw_info['flags']['currentapp'] = 'admin';
|
||||
include('../header.inc.php');
|
||||
$phpgw_info['flags']['currentapp'] = 'admin';
|
||||
include('../header.inc.php');
|
||||
|
||||
$t = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
|
||||
$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_APP_TPL);
|
||||
$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->app_name = 'phpgw';
|
||||
$c = CreateObject('phpgwapi.categories');
|
||||
$c->app_name = 'phpgw';
|
||||
|
||||
if ($submit)
|
||||
{
|
||||
$errorcount = 0;
|
||||
|
||||
if (!$cat_name)
|
||||
if ($submit)
|
||||
{
|
||||
$error[$errorcount++] = lang('Please enter a name for that category !');
|
||||
$errorcount = 0;
|
||||
|
||||
if (!$cat_name)
|
||||
{
|
||||
$error[$errorcount++] = lang('Please enter a name for that category !');
|
||||
}
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
if (!$cat_parent)
|
||||
{
|
||||
$exists = $c->exists('appandmains',$cat_name,$cat_id='');
|
||||
}
|
||||
else
|
||||
{
|
||||
$exists = $c->exists('appandsubs',$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 (!$error)
|
||||
if ($errorcount)
|
||||
{
|
||||
if (!$cat_parent)
|
||||
{
|
||||
$exists = $c->exists('appandmains',$cat_name,$cat_id='');
|
||||
}
|
||||
else
|
||||
{
|
||||
$exists = $c->exists('appandsubs',$cat_name,$cat_id='');
|
||||
}
|
||||
|
||||
if ($exists == True)
|
||||
{
|
||||
$error[$errorcount++] = lang('That category name has been used already !');
|
||||
}
|
||||
$t->set_var('message',$phpgw->common->error_list($error));
|
||||
}
|
||||
|
||||
if ($cat_main && $cat_parent)
|
||||
if (($submit) && (! $error) && (! $errorcount))
|
||||
{
|
||||
$main = $c->return_main($cat_parent);
|
||||
if ($main != $cat_main)
|
||||
{
|
||||
$error[$errorcount++] = lang('You selected an invalid main category !');
|
||||
}
|
||||
$t->set_var('message',lang('Category x has been added !', $cat_name));
|
||||
}
|
||||
|
||||
if (!$error)
|
||||
if ((! $submit) && (! $error) && (! $errorcount))
|
||||
{
|
||||
$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);
|
||||
$t->set_var('message','');
|
||||
}
|
||||
}
|
||||
|
||||
if ($errorcount)
|
||||
{
|
||||
$t->set_var('message',$phpgw->common->error_list($error));
|
||||
}
|
||||
$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'));
|
||||
|
||||
if (($submit) && (! $error) && (! $errorcount))
|
||||
{
|
||||
$t->set_var('message',lang('Category x has been added !', $cat_name));
|
||||
}
|
||||
$t->set_var('edithandle','');
|
||||
$t->set_var('addhandle','');
|
||||
$t->pparse('out','form');
|
||||
$t->pparse('addhandle','add');
|
||||
|
||||
if ((! $submit) && (! $error) && (! $errorcount))
|
||||
{
|
||||
$t->set_var('message','');
|
||||
}
|
||||
|
||||
$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,94 +11,94 @@
|
||||
\**************************************************************************/
|
||||
/* $Id$ */
|
||||
|
||||
if (! $cat_id)
|
||||
{
|
||||
Header('Location: ' . $phpgw->link('/admin/categories.php'));
|
||||
}
|
||||
|
||||
if ($confirm)
|
||||
{
|
||||
$phpgw_info['flags'] = array('noheader' => True,
|
||||
'nonavbar' => True);
|
||||
}
|
||||
|
||||
$phpgw_info['flags']['currentapp'] = 'admin';
|
||||
include('../header.inc.php');
|
||||
|
||||
$c = CreateObject('phpgwapi.categories');
|
||||
$c->app_name = 'phpgw';
|
||||
|
||||
if ($confirm)
|
||||
{
|
||||
if ($subs)
|
||||
if (! $cat_id)
|
||||
{
|
||||
$c->delete($cat_id,'True');
|
||||
Header('Location: ' . $phpgw->link('/admin/categories.php'));
|
||||
}
|
||||
|
||||
if ($confirm)
|
||||
{
|
||||
$phpgw_info['flags'] = array('noheader' => True,
|
||||
'nonavbar' => True);
|
||||
}
|
||||
|
||||
$phpgw_info['flags']['currentapp'] = 'admin';
|
||||
include('../header.inc.php');
|
||||
|
||||
$c = CreateObject('phpgwapi.categories');
|
||||
$c->app_name = 'phpgw';
|
||||
|
||||
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
|
||||
{
|
||||
$c->delete($cat_id);
|
||||
$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_APP_TPL);
|
||||
$t->set_file(array('category_delete' => 'delete_cat.tpl'));
|
||||
$t->set_block('category_delete','delete','deletehandle');
|
||||
$t->set_block('category_delete','done','donehandle');
|
||||
|
||||
$nolink = $phpgw->link('/admin/categories.php',"cat_id=$cat_id&start=$start&query=$query&sort=$sort&order=$order&filter=$filter");
|
||||
|
||||
$apps_cats = $c->exists('subs',$cat_name='',$cat_id);
|
||||
|
||||
if ($apps_cats==True)
|
||||
{
|
||||
$t->set_var('messages',lang('This category is currently being used by applications as a parent category.<br>You will need to remove the subcategories before you can delete the parent category !'));
|
||||
$t->set_var('hidden_vars',$hidden_vars);
|
||||
$t->set_var('lang_subs','');
|
||||
$t->set_var('subs','');
|
||||
$t->set_var('nolink',$nolink);
|
||||
$t->set_var('lang_done',lang('Done'));
|
||||
$t->set_var('deletehandle','');
|
||||
$t->set_var('donehandle','');
|
||||
$t->pparse('out','category_delete');
|
||||
$t->pparse('donehandle','done');
|
||||
$phpgw->common->phpgw_footer();
|
||||
}
|
||||
else
|
||||
{
|
||||
$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 global subcategories ?'));
|
||||
$t->set_var('subs','<input type="checkbox" name="subs" value="True">');
|
||||
}
|
||||
else
|
||||
{
|
||||
$t->set_var('lang_subs','');
|
||||
$t->set_var('subs', '');
|
||||
}
|
||||
|
||||
$t->set_var('nolink',$nolink);
|
||||
$t->set_var('lang_no',lang('No'));
|
||||
$t->set_var('action_url',$phpgw->link('/admin/deletecategory.php',"cat_id=$cat_id"));
|
||||
$t->set_var('lang_yes',lang('Yes'));
|
||||
$t->set_var('deletehandle','');
|
||||
$t->set_var('donehandle','');
|
||||
$t->pparse('out','category_delete');
|
||||
$t->pparse('deletehandle','delete');
|
||||
$phpgw->common->phpgw_footer();
|
||||
}
|
||||
}
|
||||
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_APP_TPL);
|
||||
$t->set_file(array('category_delete' => 'delete_cat.tpl'));
|
||||
$t->set_block('category_delete','delete','deletehandle');
|
||||
$t->set_block('category_delete','done','donehandle');
|
||||
|
||||
$nolink = $phpgw->link('/admin/categories.php',"cat_id=$cat_id&start=$start&query=$query&sort=$sort&order=$order&filter=$filter");
|
||||
|
||||
$apps_cats = $c->exists('subs',$cat_name='',$cat_id);
|
||||
|
||||
if ($apps_cats==True)
|
||||
{
|
||||
$t->set_var('messages',lang('This category is currently being used by applications as a parent category.<br>You will need to remove the subcategories before you can delete the parent category !'));
|
||||
$t->set_var('hidden_vars',$hidden_vars);
|
||||
$t->set_var('lang_subs','');
|
||||
$t->set_var('subs','');
|
||||
$t->set_var('nolink',$nolink);
|
||||
$t->set_var('lang_done',lang('Done'));
|
||||
$t->set_var('deletehandle','');
|
||||
$t->set_var('donehandle','');
|
||||
$t->pparse('out','category_delete');
|
||||
$t->pparse('donehandle','done');
|
||||
$phpgw->common->phpgw_footer();
|
||||
}
|
||||
else
|
||||
{
|
||||
$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 global subcategories ?'));
|
||||
$t->set_var('subs','<input type="checkbox" name="subs" value="True">');
|
||||
}
|
||||
else
|
||||
{
|
||||
$t->set_var('lang_subs','');
|
||||
$t->set_var('subs', '');
|
||||
}
|
||||
|
||||
$t->set_var('nolink',$nolink);
|
||||
$t->set_var('lang_no',lang('No'));
|
||||
$t->set_var('action_url',$phpgw->link('/admin/deletecategory.php',"cat_id=$cat_id"));
|
||||
$t->set_var('lang_yes',lang('Yes'));
|
||||
$t->set_var('deletehandle','');
|
||||
$t->set_var('donehandle','');
|
||||
$t->pparse('out','category_delete');
|
||||
$t->pparse('deletehandle','delete');
|
||||
$phpgw->common->phpgw_footer();
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -11,117 +11,117 @@
|
||||
\**************************************************************************/
|
||||
/* $Id$ */
|
||||
|
||||
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_APP_TPL);
|
||||
$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->app_name = '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)
|
||||
if (! $cat_id)
|
||||
{
|
||||
$error[$errorcount++] = lang('Please enter a name for that category !');
|
||||
Header('Location: ' . $phpgw->link('/admin/categories.php',"sort=$sort&order=$order&query=$query&start=$start"
|
||||
. "&filter=$filter"));
|
||||
}
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
if (!$cat_parent)
|
||||
{
|
||||
$exists = $c->exists('appandmains',$cat_name,$cat_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
$exists = $c->exists('appandsubs',$cat_name,$cat_id);
|
||||
}
|
||||
$phpgw_info['flags']['currentapp'] = 'admin';
|
||||
include('../header.inc.php');
|
||||
|
||||
if ($exists == True)
|
||||
{
|
||||
$error[$errorcount++] = lang('That category name has been used already !');
|
||||
}
|
||||
$t = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
|
||||
$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->app_name = '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('appandmains',$cat_name,$cat_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
$exists = $c->exists('appandsubs',$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 !');
|
||||
}
|
||||
}
|
||||
|
||||
$cat_name = addslashes($cat_name);
|
||||
$cat_description = addslashes($cat_description);
|
||||
$cat_access = 'public';
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$c->edit($cat_id,$cat_parent,$cat_name,$cat_description,$cat_data,$cat_access,$cat_main);
|
||||
}
|
||||
}
|
||||
|
||||
if ($cat_main && $cat_parent)
|
||||
if ($errorcount)
|
||||
{
|
||||
$main = $c->return_main($cat_parent);
|
||||
if ($main != $cat_main)
|
||||
{
|
||||
$error[$errorcount++] = lang('You selected an invalid main category !');
|
||||
}
|
||||
$t->set_var('message',$phpgw->common->error_list($error));
|
||||
}
|
||||
|
||||
$cat_name = addslashes($cat_name);
|
||||
$cat_description = addslashes($cat_description);
|
||||
$cat_access = 'public';
|
||||
|
||||
if (! $error)
|
||||
if (($submit) && (! $error) && (! $errorcount))
|
||||
{
|
||||
$c->edit($cat_id,$cat_parent,$cat_name,$cat_description,$cat_data,$cat_access,$cat_main);
|
||||
$t->set_var('message',lang('Category x has been updated !',$cat_name));
|
||||
}
|
||||
}
|
||||
|
||||
if ($errorcount)
|
||||
{
|
||||
$t->set_var('message',$phpgw->common->error_list($error));
|
||||
}
|
||||
if ((! $submit) && (! $error) && (! $errorcount))
|
||||
{
|
||||
$t->set_var('message','');
|
||||
}
|
||||
|
||||
if (($submit) && (! $error) && (! $errorcount))
|
||||
{
|
||||
$t->set_var('message',lang('Category x has been updated !',$cat_name));
|
||||
}
|
||||
$cats = $c->return_single($cat_id);
|
||||
|
||||
if ((! $submit) && (! $error) && (! $errorcount))
|
||||
{
|
||||
$t->set_var('message','');
|
||||
}
|
||||
$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"));
|
||||
$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']));
|
||||
|
||||
$cats = $c->return_single($cat_id);
|
||||
$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('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"));
|
||||
$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']));
|
||||
$t->set_var('edithandle','');
|
||||
$t->set_var('addhandle','');
|
||||
$t->pparse('out','form');
|
||||
$t->pparse('edithandle','edit');
|
||||
|
||||
$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();
|
||||
$phpgw->common->phpgw_footer();
|
||||
?>
|
||||
|
@ -1,66 +1,72 @@
|
||||
<!-- $Id$ -->
|
||||
|
||||
<!-- BEGIN form -->
|
||||
<center>
|
||||
<table border="0" width="80%" cellspacing="2" cellpadding="2">
|
||||
<tr>
|
||||
<td colspan="1" align="center" bgcolor="#c9c9c9"><b>{title_categories}<b/></td>
|
||||
</tr>
|
||||
</table>
|
||||
{message}
|
||||
<table border="0" width="80%" cellspacing="2" cellpadding="2">
|
||||
<form name="form" action="{actionurl}" method="POST">
|
||||
<tr>
|
||||
<td>{lang_main}</td>
|
||||
<td><select name="cat_main"><option value="">{lang_new_main}</option>{main_category_list}</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{lang_parent}</td>
|
||||
<td><select name="cat_parent"><option value="">{lang_select_parent}</option>{category_list}</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{lang_name}:</td>
|
||||
<td><input name="cat_name" size="50" value="{cat_name}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{lang_descr}:</td>
|
||||
<td colspan=2><textarea name="cat_description" rows="4" cols="50" wrap="virtual">{cat_description}</textarea></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<center>
|
||||
<table border="0" width="80%" cellspacing="2" cellpadding="2">
|
||||
<tr>
|
||||
<td colspan="1" align="center" bgcolor="#c9c9c9"><b>{title_categories}<b/></td>
|
||||
</tr>
|
||||
</table>
|
||||
{message}
|
||||
<table border="0" width="80%" cellspacing="2" cellpadding="2">
|
||||
<form name="form" action="{actionurl}" method="POST">
|
||||
<tr>
|
||||
<td>{lang_main}</td>
|
||||
<td><select name="cat_main"><option value="">{lang_new_main}</option>{main_category_list}</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{lang_parent}</td>
|
||||
<td><select name="cat_parent"><option value="">{lang_select_parent}</option>{category_list}</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{lang_name}:</td>
|
||||
<td><input name="cat_name" size="50" value="{cat_name}"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{lang_descr}:</td>
|
||||
<td colspan=2><textarea name="cat_description" rows="4" cols="50" wrap="virtual">{cat_description}</textarea></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- BEGIN add -->
|
||||
<table width="50%" border="0" cellspacing="2" cellpadding="2">
|
||||
<tr valign="bottom">
|
||||
<td height="50" align="center">
|
||||
{hidden_vars}
|
||||
<input type="submit" name="submit" value="{lang_add}"></td>
|
||||
<td height="50" align="center">
|
||||
<input type="reset" name="reset" value="{lang_reset}"></form></td>
|
||||
<td height="50" align="center">
|
||||
<form method="POST" action="{doneurl}">
|
||||
{hidden_vars}
|
||||
<input type="submit" name="done" value="{lang_done}"></form></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</center>
|
||||
|
||||
<table width="50%" border="0" cellspacing="2" cellpadding="2">
|
||||
<tr valign="bottom">
|
||||
<td height="50" align="center">
|
||||
{hidden_vars}
|
||||
<input type="submit" name="submit" value="{lang_add}"></td>
|
||||
<td height="50" align="center">
|
||||
<input type="reset" name="reset" value="{lang_reset}"></form></td>
|
||||
<td height="50" align="center">
|
||||
<form method="POST" action="{doneurl}">
|
||||
{hidden_vars}
|
||||
<input type="submit" name="done" value="{lang_done}"></form></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<!-- END add -->
|
||||
|
||||
<!-- BEGIN edit -->
|
||||
<table width="50%" border="0" cellspacing="2" cellpadding="2">
|
||||
<tr valign="bottom">
|
||||
<td height="50" align="center">
|
||||
{hidden_vars}
|
||||
<input type="submit" name="submit" value="{lang_edit}"></form></td>
|
||||
<td height="50" align="center">
|
||||
<form method="POST" action="{deleteurl}">
|
||||
{hidden_vars}
|
||||
<input type="submit" name="delete" value="{lang_delete}"></form></td>
|
||||
<td height="50" align="center">
|
||||
<form method="POST" action="{doneurl}">
|
||||
{hidden_vars}
|
||||
<input type="submit" name="done" value="{lang_done}"></form></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<table width="50%" border="0" cellspacing="2" cellpadding="2">
|
||||
<tr valign="bottom">
|
||||
<td height="50" align="center">
|
||||
{hidden_vars}
|
||||
<input type="submit" name="submit" value="{lang_edit}"></form></td>
|
||||
<td height="50" align="center">
|
||||
<form method="POST" action="{deleteurl}">
|
||||
{hidden_vars}
|
||||
<input type="submit" name="delete" value="{lang_delete}"></form></td>
|
||||
<td height="50" align="center">
|
||||
<form method="POST" action="{doneurl}">
|
||||
{hidden_vars}
|
||||
<input type="submit" name="done" value="{lang_done}"></form></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<!-- END edit -->
|
||||
<!-- END form -->
|
||||
|
||||
<!-- END form -->
|
||||
|
@ -1,39 +1,42 @@
|
||||
<!-- $Id$ -->
|
||||
|
||||
<!-- BEGIN form -->
|
||||
<center>
|
||||
<table border="0" with="65%" cellpadding="2" cellspacing="2">
|
||||
<form method="POST" action="{action_url}">
|
||||
<tr>
|
||||
<td align="center">{messages}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">{lang_subs}</td>
|
||||
<td align="center">{subs}</td>
|
||||
</tr>
|
||||
|
||||
<center>
|
||||
<table border="0" with="65%" cellpadding="2" cellspacing="2">
|
||||
<form method="POST" action="{action_url}">
|
||||
<tr>
|
||||
<td align="center">{messages}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">{lang_subs}</td>
|
||||
<td align="center">{subs}</td>
|
||||
</tr>
|
||||
|
||||
<!-- BEGIN delete -->
|
||||
|
||||
<tr>
|
||||
<td align="center">
|
||||
{hidden_vars}
|
||||
<input type="submit" name="confirm" value="{lang_yes}"></td>
|
||||
</form>
|
||||
<td align="center"><a href="{nolink}">{lang_no}</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
<tr>
|
||||
<td align="center">
|
||||
{hidden_vars}
|
||||
<input type="submit" name="confirm" value="{lang_yes}"></td>
|
||||
</form>
|
||||
<td align="center"><a href="{nolink}">{lang_no}</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<!-- END delete -->
|
||||
|
||||
<!-- BEGIN done -->
|
||||
|
||||
</form>
|
||||
<tr>
|
||||
<td align="center">
|
||||
{hidden_vars}
|
||||
<a href="{nolink}">{lang_done}</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
</form>
|
||||
<tr>
|
||||
<td align="center">
|
||||
{hidden_vars}
|
||||
<a href="{nolink}">{lang_done}</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<!-- END done -->
|
||||
|
||||
|
@ -1,61 +1,61 @@
|
||||
<!-- $Id$ -->
|
||||
<center>
|
||||
<table border="0" cellspacing="2" cellpadding="2">
|
||||
<tr>
|
||||
<td colspan="4" align="center" bgcolor="#c9c9c9"><b>{title_categories}<b/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" align="left">
|
||||
<table border="0" width="100%">
|
||||
<tr>
|
||||
{left}
|
||||
<td align="center">{lang_showing}</td>
|
||||
{right}
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td colspan="4" align="right">
|
||||
<form method="post" action="{actionurl}">
|
||||
<input type="text" name="query"> <input type="submit" name="search" value="{lang_search}"></form></td>
|
||||
</tr>
|
||||
<tr bgcolor="{th_bg}">
|
||||
<td width=20% bgcolor="{th_bg}">{sort_name}</td>
|
||||
<td width=32% bgcolor="{th_bg}">{sort_description}</td>
|
||||
<td width=8% bgcolor="{th_bg}" align="center">{lang_edit}</td>
|
||||
<td width=8% bgcolor="{th_bg}" align="center">{lang_delete}</td>
|
||||
</tr>
|
||||
|
||||
<center>
|
||||
<table border="0" cellspacing="2" cellpadding="2">
|
||||
<tr>
|
||||
<td colspan="4" align="center" bgcolor="#c9c9c9"><b>{title_categories}<b/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" align="left">
|
||||
<table border="0" width="100%">
|
||||
<tr>
|
||||
{left}
|
||||
<td align="center">{lang_showing}</td>
|
||||
{right}
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td colspan="4" align="right">
|
||||
<form method="post" action="{actionurl}">
|
||||
<input type="text" name="query"> <input type="submit" name="search" value="{lang_search}"></form></td>
|
||||
</tr>
|
||||
<tr bgcolor="{th_bg}">
|
||||
<td width=20% bgcolor="{th_bg}">{sort_name}</td>
|
||||
<td width=32% bgcolor="{th_bg}">{sort_description}</td>
|
||||
<td width=8% bgcolor="{th_bg}" align="center">{lang_edit}</td>
|
||||
<td width=8% bgcolor="{th_bg}" align="center">{lang_delete}</td>
|
||||
</tr>
|
||||
|
||||
<!-- BEGIN cat_list -->
|
||||
|
||||
<tr bgcolor="{tr_color}">
|
||||
<td>{name}</td>
|
||||
<td>{descr}</td>
|
||||
<td align="center"><a href="{edit}">{lang_edit_entry}</a></td>
|
||||
<td align="center"><a href="{delete}">{lang_delete_entry}</td>
|
||||
</tr>
|
||||
<tr bgcolor="{tr_color}">
|
||||
<td>{name}</td>
|
||||
<td>{descr}</td>
|
||||
<td align="center"><a href="{edit}">{lang_edit_entry}</a></td>
|
||||
<td align="center"><a href="{delete}">{lang_delete_entry}</td>
|
||||
</tr>
|
||||
|
||||
<!-- END cat_list -->
|
||||
|
||||
<!-- BEGINN add -->
|
||||
|
||||
<tr valign="bottom">
|
||||
<td>
|
||||
<form method="POST" action="{add_action}">
|
||||
<input type="submit" name="add" value="{lang_add}"></form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="bottom">
|
||||
<td>
|
||||
<form method="POST" action="{doneurl}">
|
||||
<input type="submit" name="done" value="{lang_done}"></form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="bottom">
|
||||
<td>
|
||||
<form method="POST" action="{add_action}">
|
||||
<input type="submit" name="add" value="{lang_add}"></form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="bottom">
|
||||
<td>
|
||||
<form method="POST" action="{doneurl}">
|
||||
<input type="submit" name="done" value="{lang_done}"></form>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- END add -->
|
||||
|
||||
</table>
|
||||
</center>
|
||||
|
||||
</table>
|
||||
</center>
|
||||
|
Loading…
Reference in New Issue
Block a user