diff --git a/admin/applications.php b/admin/applications.php deleted file mode 100644 index c378f8906c..0000000000 --- a/admin/applications.php +++ /dev/null @@ -1,150 +0,0 @@ - 'admin', - 'enable_nextmatchs_class' => True - ); - include('../header.inc.php'); - - $p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); - $p->set_file(array('applications' => 'applications.tpl')); - $p->set_block('applications','list','list'); - $p->set_block('applications','row','row'); - - $offset = $phpgw_info['user']['preferences']['common']['maxmatchs']; - - $phpgw->db->query("SELECT * FROM phpgw_applications WHERE app_enabled<3",__LINE__,__FILE__); - if($phpgw->db->num_rows()) - { - while ($phpgw->db->next_record()) - { - $name = $phpgw->db->f('app_name'); - $title = $phpgw->db->f('app_title'); - $status = $phpgw->db->f('app_enabled'); - $apps[$name] = array( - 'title' => $title, - 'name' => $name, - 'status' => $status - ); - } - } - @reset($apps); - $total = count($apps); - - if(!$sort) - { - $sort = 'ASC'; - } - - if($sort == 'ASC') - { - ksort($apps); - } - else - { - krsort($apps); - } - - if ($start && $offset) - { - $limit = $start + $offset; - } - elseif ($start && !$offset) - { - $limit = $start; - } - elseif(!$start && !$offset) - { - $limit = $total; - } - else - { - $start = 0; - $limit = $offset; - } - - if ($limit > $total) - { - $limit = $total; - } - - $i = 0; - $applications = array(); - while(list($app,$data) = @each($apps)) - { - if($i >= $start && $i<= $limit) - { - $applications[$app] = $data; - } - $i++; - } - - $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,'title','title','/admin/applications.php',lang('Title'))); - $p->set_var('lang_showing',$phpgw->nextmatchs->show_hits($total,$start)); - $p->set_var('left',$phpgw->nextmatchs->left('/admin/applications.php',$start,$total)); - $p->set_var('right',$phpgw->nextmatchs->right('/admin/applications.php',$start,$total)); - - $p->set_var('lang_edit',lang('Edit')); - $p->set_var('lang_delete',lang('Delete')); - $p->set_var('lang_enabled',lang('Enabled')); - - $p->set_var('new_action',$phpgw->link('/admin/newapplication.php')); - $p->set_var('lang_add',lang('add')); - - @reset($applications); - while (list($key,$app) = @each($applications)) - { - $tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color); - - if($app['title']) - { - $name = $app['title']; - } - elseif($app['name']) - { - $name = $app['name']; - } - else - { - $name = ' '; - } - - $p->set_var('tr_color',$tr_color); - $p->set_var('name',$name); - - $p->set_var('edit',' ' . lang('Edit') . ' '); - $p->set_var('delete',' ' . lang('Delete') . ' '); - - if ($app['status']) - { - $status = lang('Yes'); - } - else - { - $status = '' . lang('No') . ''; - } - $p->set_var('status',$status); - - $p->parse('rows','row',True); - } - - $p->pparse('out','list'); - - $phpgw->common->phpgw_footer(); -?> diff --git a/admin/deleteapplication.php b/admin/deleteapplication.php deleted file mode 100644 index c847c0d5de..0000000000 --- a/admin/deleteapplication.php +++ /dev/null @@ -1,46 +0,0 @@ - True, - 'nonavbar' => True, - 'currentapp' => 'admin' - ); - - if (!$app_name) - { - Header("Location: " . $phpgw->link('/admin/applications.php')); - } - include('../header.inc.php'); - - $p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); - $p->set_file(array('body' => 'delete_common.tpl')); - - 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(); - } - - $phpgw->common->phpgw_header(); - echo parse_navbar(); - - $p->set_var('messages',lang('Are you sure you want to delete this application ?')); - $p->set_var('no','' . lang('No') . ''); - $p->set_var('yes','' . lang('Yes') . ''); - $p->pparse('out','body'); - - $phpgw->common->phpgw_footer(); -?> diff --git a/admin/editapplication.php b/admin/editapplication.php deleted file mode 100644 index 3277fb14c3..0000000000 --- a/admin/editapplication.php +++ /dev/null @@ -1,134 +0,0 @@ - True, - 'nonavbar' => True - ); - } - - $phpgw_info['flags']['currentapp'] = 'admin'; - $phpgw_info['flags']['enable_nextmatchs_class'] = True; - - include('../header.inc.php'); - - $p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); - - 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->set_file(array('application' => 'application_form.tpl')); - $p->set_block('application','form','form'); - $p->set_block('application','row','row'); - - if ($submit) - { - if (! $app_order) - { - $app_order = 0; - } - - $totalerrors = 0; - - $n_app_name = chop($n_app_name); - $n_app_title = chop($n_app_title); - - 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__); - - 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(); - - if ($totalerrors) - { - $phpgw->common->phpgw_header(); - echo parse_navbar(); - - $p->set_var('error',"