2000-08-19 15:58:49 +02:00
|
|
|
<?php
|
|
|
|
/**************************************************************************\
|
|
|
|
* phpGroupWare - administration *
|
|
|
|
* http://www.phpgroupware.org *
|
|
|
|
* -------------------------------------------- *
|
|
|
|
* This program is free software; you can redistribute it and/or modify it *
|
|
|
|
* under the terms of the GNU General Public License as published by the *
|
|
|
|
* Free Software Foundation; either version 2 of the License, or (at your *
|
|
|
|
* option) any later version. *
|
|
|
|
\**************************************************************************/
|
|
|
|
|
|
|
|
/* $Id$ */
|
|
|
|
|
2000-11-21 01:41:31 +01:00
|
|
|
$phpgw_info = array();
|
2000-11-16 08:40:37 +01:00
|
|
|
$phpgw_info["flags"] = array("currentapp" => "admin", "enable_nextmatchs_class" => True);
|
2000-08-19 15:58:49 +02:00
|
|
|
include("../header.inc.php");
|
|
|
|
|
2001-02-09 06:04:21 +01:00
|
|
|
$p = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('admin'));
|
|
|
|
$p->set_file(array("list" => "applications.tpl",
|
2000-11-22 07:58:08 +01:00
|
|
|
"row" => "applications_row.tpl"));
|
2000-08-19 15:58:49 +02:00
|
|
|
|
2000-11-22 07:58:08 +01:00
|
|
|
if ($order) {
|
|
|
|
$ordermethod = "order by $order $sort";
|
|
|
|
} else {
|
|
|
|
$ordermethod = "order by app_title asc";
|
|
|
|
}
|
|
|
|
|
|
|
|
if (! $sort) {
|
2000-08-19 15:58:49 +02:00
|
|
|
$sort = "desc";
|
2000-11-22 07:58:08 +01:00
|
|
|
}
|
2000-08-19 15:58:49 +02:00
|
|
|
|
2001-02-09 06:04:21 +01:00
|
|
|
$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"]);
|
2000-08-19 15:58:49 +02:00
|
|
|
|
2001-02-09 06:04:21 +01:00
|
|
|
$p->set_var("sort_title",$phpgw->nextmatchs->show_sort_order($sort,"app_title",$order,"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"));
|
2000-08-19 15:58:49 +02:00
|
|
|
|
2001-02-08 21:11:13 +01:00
|
|
|
$phpgw->db->query("select * from phpgw_applications $ordermethod",__LINE__,__FILE__);
|
2000-08-19 15:58:49 +02:00
|
|
|
while ($phpgw->db->next_record()) {
|
2000-11-22 07:58:08 +01:00
|
|
|
$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 = " ";
|
2000-08-19 15:58:49 +02:00
|
|
|
|
2001-02-09 06:04:21 +01:00
|
|
|
$p->set_var("tr_color",$tr_color);
|
|
|
|
$p->set_var("name",$name);
|
|
|
|
$p->set_var("edit",'<a href="' . $phpgw->link("editapplication.php","app_name=" . urlencode($phpgw->db->f("app_name"))) . '"> ' . lang("Edit") . ' </a>');
|
|
|
|
$p->set_var("delete",'<a href="' . $phpgw->link("deleteapplication.php","app_name=" . urlencode($phpgw->db->f("app_name"))) . '"> ' . lang("Delete") . ' </a>');
|
2000-08-19 15:58:49 +02:00
|
|
|
|
2000-11-22 07:58:08 +01:00
|
|
|
if ($phpgw->db->f("app_enabled") != 0) {
|
|
|
|
$status = lang("Yes");
|
|
|
|
} else {
|
|
|
|
$status = "<b>" . lang("No") . "</b>";
|
|
|
|
}
|
2001-02-09 06:04:21 +01:00
|
|
|
$p->set_var("status",$status);
|
2000-08-19 15:58:49 +02:00
|
|
|
|
2001-02-09 06:04:21 +01:00
|
|
|
$p->parse("rows","row",True);
|
2000-08-19 15:58:49 +02:00
|
|
|
}
|
|
|
|
|
2001-02-09 06:04:21 +01:00
|
|
|
$p->set_var("new_action",$phpgw->link("newapplication.php"));
|
|
|
|
$p->set_var("lang_add",lang("add"));
|
2000-11-22 07:58:08 +01:00
|
|
|
|
2001-02-09 06:04:21 +01:00
|
|
|
$p->pparse("out","list");
|
|
|
|
$p->common->phpgw_footer();
|
|
|
|
?>
|