2000-08-18 05:24:22 +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-16 09:00:18 +01:00
|
|
|
$phpgw_info["flags"] = array("currentapp" => "admin", "enable_nextmatchs_class" => True);
|
2000-08-18 05:24:22 +02:00
|
|
|
include("../header.inc.php");
|
2000-08-19 08:32:09 +02:00
|
|
|
|
|
|
|
if (! $start)
|
|
|
|
$start = 0;
|
|
|
|
|
|
|
|
if ($order)
|
|
|
|
$ordermethod = "order by $order $sort";
|
|
|
|
else
|
|
|
|
$ordermethod = "order by group_name asc";
|
|
|
|
|
|
|
|
if (! $sort)
|
|
|
|
$sort = "asc";
|
|
|
|
|
|
|
|
if ($query) {
|
|
|
|
$querymethod = " where group_name like '%$query%'";
|
|
|
|
}
|
|
|
|
|
|
|
|
$phpgw->db->query("select count(*) from groups $querymethod");
|
|
|
|
$phpgw->db->next_record();
|
|
|
|
|
|
|
|
$total = $phpgw->db->f(0);
|
|
|
|
$limit = $phpgw->nextmatchs->sql_limit($start);
|
|
|
|
|
|
|
|
echo '<p><table border="0" width="45%" align="center"><tr bgcolor="'
|
|
|
|
. $phpgw_info["theme"][bg_color] . '">'
|
|
|
|
. '<td align="left">' . $phpgw->nextmatchs->left("groups.php",$start,$total) . '</td>'
|
2000-09-07 22:49:55 +02:00
|
|
|
. '<td align="center">' . lang("user groups") . '</td>'
|
2000-08-19 08:32:09 +02:00
|
|
|
. '<td align="right">' . $phpgw->nextmatchs->right("groups.php",$start,$total) . '</td>'
|
|
|
|
. '</tr></table>';
|
|
|
|
|
|
|
|
echo "<table border=0 width=45% align=center>"
|
|
|
|
. "<tr bgcolor=" . $phpgw_info["theme"]["th_bg"] . "><td>"
|
|
|
|
. $phpgw->nextmatchs->show_sort_order($sort,"group_name",$order,"groups.php",
|
2000-09-07 22:49:55 +02:00
|
|
|
lang("name")) . "</td>"
|
|
|
|
. "<td> " . lang("Edit") . " </td> <td> " . lang("Delete")
|
2000-08-18 05:24:22 +02:00
|
|
|
. " </td> </tr>";
|
|
|
|
|
2000-08-19 08:32:09 +02:00
|
|
|
$phpgw->db->query("select * from groups $querymethod $ordermethod limit $limit");
|
2000-08-18 05:24:22 +02:00
|
|
|
while ($phpgw->db->next_record()) {
|
|
|
|
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
|
|
|
|
|
|
|
$group_name = $phpgw->db->f("group_name");
|
|
|
|
|
|
|
|
if (! $group_name) $group_name = ' ';
|
|
|
|
|
|
|
|
echo "<tr bgcolor=$tr_color><td>$group_name</td>"
|
|
|
|
. "<td width=5%><a href=\"" . $phpgw->link("editgroup.php","group_id=" . $phpgw->db->f("group_id"))
|
2000-09-07 22:49:55 +02:00
|
|
|
. "\"> " . lang("Edit") . " </a></td>" . "<td width=5%><a href=\""
|
2000-08-18 05:24:22 +02:00
|
|
|
. $phpgw->link("deletegroup.php","group_id=" . $phpgw->db->f("group_id"))
|
2000-09-07 22:49:55 +02:00
|
|
|
. "\"> " . lang("Delete") . " </a></td>";
|
2000-08-18 05:24:22 +02:00
|
|
|
}
|
2000-08-19 08:32:09 +02:00
|
|
|
|
2000-09-03 22:25:31 +02:00
|
|
|
echo "\n<form method=POST action=\"".$phpgw->link("newgroup.php")."\">"
|
|
|
|
. "</table></center>"
|
2000-08-19 08:32:09 +02:00
|
|
|
. "<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") . "\"></form><form action=\"".$phpgw->link("groups.php")."\"></td>"
|
|
|
|
. "<td align=right>" . lang("search") . " "
|
2000-08-19 08:32:09 +02:00
|
|
|
. "<input name=\"query\"></td></tr></form></table>";
|
2000-08-18 05:24:22 +02:00
|
|
|
|
2000-09-29 07:24:18 +02:00
|
|
|
$phpgw->common->phpgw_footer();
|
2000-09-28 00:36:15 +02:00
|
|
|
?>
|