mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 01:13:25 +01:00
Cleaned up with accounts form, added a search field and next matchs icons
This commit is contained in:
parent
a863826b21
commit
90c70b2704
@ -13,13 +13,45 @@
|
|||||||
|
|
||||||
$phpgw_flags["currentapp"] = "admin";
|
$phpgw_flags["currentapp"] = "admin";
|
||||||
include("../header.inc.php");
|
include("../header.inc.php");
|
||||||
echo "<p><center>" . lang_admin("user accounts") . "<br><table border=0 width=65%>"
|
|
||||||
. "<tr bgcolor=" . $theme["th_bg"] . "><td>" . lang_common("Last name") . "</td><td>"
|
|
||||||
. lang_common("First name") . "</td><td> " . lang_common("Edit") . " </td> <td> "
|
|
||||||
. lang_common("Delete") . " </td> <td> " . lang_common("View") . " </td></tr>\n";
|
|
||||||
|
|
||||||
$phpgw->db->query("select con,firstname,lastname,loginid from accounts order by "
|
if (! $start)
|
||||||
. "lastname, firstname");
|
$start = 0;
|
||||||
|
|
||||||
|
if (! $sort)
|
||||||
|
$sort = "desc";
|
||||||
|
|
||||||
|
if ($order)
|
||||||
|
$ordermethod = "order by $order $sort";
|
||||||
|
else
|
||||||
|
$ordermethod = "order by lastname,firstname,loginid asc";
|
||||||
|
|
||||||
|
if ($query) {
|
||||||
|
$querymethod = " where firstname like '%$query%' OR lastname like '%$query%' OR loginid "
|
||||||
|
. "like '%$query%' ";
|
||||||
|
}
|
||||||
|
|
||||||
|
$phpgw->db->query("select count(*) from accounts $querymethod");
|
||||||
|
$phpgw->db->next_record();
|
||||||
|
|
||||||
|
$total = $phpgw->db->f(0);
|
||||||
|
$limit = $phpgw->nextmatchs->sql_limit($start);
|
||||||
|
|
||||||
|
echo '<p><table border="0" width="65%" align="center"><tr bgcolor="'
|
||||||
|
. $phpgw_info["theme"][bg_color] . '">'
|
||||||
|
. '<td align="left">' . $phpgw->nextmatchs->left("accounts.php",$start,$total) . '</td>'
|
||||||
|
. '<td align="center">' . lang_admin("user accounts") . '</td>'
|
||||||
|
. '<td align="right">' . $phpgw->nextmatchs->right("accounts.php",$start,$total) . '</td>'
|
||||||
|
. '</tr></table>';
|
||||||
|
|
||||||
|
echo "<center><table border=0 width=65%>"
|
||||||
|
. "<tr bgcolor=" . $phpgw_info["theme"]["th_bg"] . "><td>"
|
||||||
|
. $phpgw->nextmatchs->show_sort_order($sort,"lastname",$order,"accounts.php",lang_common("last name")) . "</td><td>"
|
||||||
|
. $phpgw->nextmatchs->show_sort_order($sort,"firstname",$order,"accounts.php",lang_common("first name")) . "</td><td>"
|
||||||
|
. lang_common("Edit") . " </td> <td> " . lang_common("Delete") . " </td> <td> "
|
||||||
|
. lang_common("View") . " </td></tr>\n";
|
||||||
|
|
||||||
|
$phpgw->db->query("select con,firstname,lastname,loginid from accounts $querymethod "
|
||||||
|
. "$ordermethod limit $limit");
|
||||||
|
|
||||||
while ($phpgw->db->next_record()) {
|
while ($phpgw->db->next_record()) {
|
||||||
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
|
||||||
@ -42,9 +74,12 @@
|
|||||||
echo "<td width=5%><a href=\"" . $phpgw->link("viewaccount.php",
|
echo "<td width=5%><a href=\"" . $phpgw->link("viewaccount.php",
|
||||||
"con=" . $phpgw->db->f("con")) . "\"> " . lang_common("View") . " </a> </td></tr>\n";
|
"con=" . $phpgw->db->f("con")) . "\"> " . lang_common("View") . " </a> </td></tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "\n<form method=POST action=\"newaccount.php\">"
|
echo "\n<form method=POST action=\"newaccount.php\">"
|
||||||
. $phpgw->session->hidden_var()
|
. $phpgw->session->hidden_var() . "</table></center>"
|
||||||
. "<tr><td colspan=5><input type=\"submit\" value=\"" . lang_common("Add")
|
. "<table border=0 width=65% align=center><tr><td align=left><input type=\"submit\" "
|
||||||
. "\"></td></tr></form></table></center>";
|
. "value=\"" . lang_common("Add") . "\"></form><form action=\"accounts.php\"></td>"
|
||||||
|
. $phpgw->session->hidden_var() . "<td align=right>" . lang_common("search") . " "
|
||||||
|
. "<input name=\"query\"></td></tr></form></table>";
|
||||||
|
|
||||||
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
include($phpgw_info["server"]["api_dir"] . "/footer.inc.php");
|
||||||
|
@ -13,10 +13,11 @@
|
|||||||
|
|
||||||
$phpgw_flags["currentapp"] = "admin";
|
$phpgw_flags["currentapp"] = "admin";
|
||||||
include("../header.inc.php");
|
include("../header.inc.php");
|
||||||
|
|
||||||
if (! $start)
|
if (! $start)
|
||||||
$start = 0;
|
$start = 0;
|
||||||
|
|
||||||
$limit =$phpgw->nextmatchs->sql_limit($start);
|
$limit = $phpgw->nextmatchs->sql_limit($start);
|
||||||
$phpgw->db->query("select count(*) from sessions");
|
$phpgw->db->query("select count(*) from sessions");
|
||||||
$phpgw->db->next_record();
|
$phpgw->db->next_record();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user