egroupware/admin/applications.php

64 lines
2.7 KiB
PHP
Raw Normal View History

<?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$ */
$phpgw_info["flags"] = array("currentapp" => "admin", "enable_nextmatchs_class" => True);
include("../header.inc.php");
if ($order)
$ordermethod = "order by $order $sort";
else
$ordermethod = "order by app_title asc";
if (! $sort)
$sort = "desc";
2000-10-03 11:14:08 +02:00
echo '<p><b>' . lang("Installed applications") . '</b><hr><p>';
echo '<p><table border="0" width="45%" align="center"><tr bgcolor="'. $phpgw_info["theme"][bg_color] . '">';
echo "<tr bgcolor=" . $phpgw_info["theme"]["th_bg"] . "><td>"
2000-09-07 22:49:55 +02:00
. $phpgw->nextmatchs->show_sort_order($sort,"app_title",$order,"applications.php",lang("title")) . "</td><td>"
. lang("Edit") . "</td> <td> " . lang("Delete") . " </td> <td> "
. lang("Enabled") . " </td> <td></tr>";
$phpgw->db->query("select * from 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 = "&nbsp;";
echo "<tr bgcolor=$tr_color><td>$name</td><td width=5%><a href=\""
. $phpgw->link("editapplication.php","app_name=" . urlencode($phpgw->db->f("app_name")))
2000-09-07 22:49:55 +02:00
. "\"> " . lang("Edit") . " </a></td>";
echo "<td width=5%><a href=\"" . $phpgw->link("deleteapplication.php",
2000-09-07 22:49:55 +02:00
"app_name=" . urlencode($phpgw->db->f("app_name"))) . "\"> " . lang("Delete")
. " </a></td>";
echo "<td width=5%>";
if ($phpgw->db->f("app_enabled") != 0) {
2000-09-07 22:49:55 +02:00
echo lang("Yes");
} else {
2000-09-07 22:49:55 +02:00
echo "<b>" . lang("No") . "</b>";
}
echo "</td></tr>\n";
}
2000-09-03 22:25:31 +02:00
echo "</form></table><form method=POST action=\"".$phpgw->link("newapplication.php")."\">"
. "<table border=0 width=45% align=center><tr><td align=left><input type=\"submit\" "
2000-09-07 22:49:55 +02:00
. "value=\"" . lang("Add") . "\"></td></tr></table></form>";
$phpgw->common->phpgw_footer();