summaryrefslogtreecommitdiff
path: root/pages/account
diff options
context:
space:
mode:
authorBernhard Fröhlich <bernhard@cacert.org>2011-08-01 22:20:08 +0200
committerBernhard Fröhlich <bernhard@cacert.org>2011-08-01 22:20:08 +0200
commit40f56dbfe7ca2fdcafdafc8be0bdf8423c5907a4 (patch)
treedccf3f001703313442e96569f01980194ea1db0c /pages/account
parent1262ff0b1c8cf748c0dc6ed502d80c579ae672ca (diff)
downloadcacert-devel-40f56dbfe7ca2fdcafdafc8be0bdf8423c5907a4.tar.gz
cacert-devel-40f56dbfe7ca2fdcafdafc8be0bdf8423c5907a4.tar.xz
cacert-devel-40f56dbfe7ca2fdcafdafc8be0bdf8423c5907a4.zip
Changes by Uli60 https://bugs.cacert.org/view.php?id=955#c2132
"added ord parameter with fixed querys"
Diffstat (limited to 'pages/account')
-rwxr-xr-x[-rw-r--r--]pages/account/25.php28
1 files changed, 27 insertions, 1 deletions
diff --git a/pages/account/25.php b/pages/account/25.php
index ab0e6b2..a460ea0 100644..100755
--- a/pages/account/25.php
+++ b/pages/account/25.php
@@ -19,6 +19,11 @@
<tr>
<td colspan="5" class="title"><?=_("Organisations")?></td>
</tr>
+
+<tr>
+ <td colspan="5" class="title">Order by: <a href="account.php?id=25">Id</a> - <a href="account.php?id=25&amp;ord=1">Country</a> - <a href="account.php?id=25&amp;ord=2">Name</a></td>
+</tr>
+
<tr>
<td class="DataTD" width="350"><?=_("Organisation")?></td>
<td class="DataTD"><?=_("Domains")?></td>
@@ -27,7 +32,28 @@
<td class="DataTD"><?=_("Delete")?></td>
</tr>
<?
- $query = "select * from `orginfo` ORDER BY `id`";
+ $order = 0;
+ if (array_key_exists('ord',$_REQUEST)) {
+ if ( $_REQUEST['ord'] != '') {
+ $order = intval($_REQUEST['ord']);
+ }
+ if($order>0 && $order<3) {
+ if($order==1) {
+ $query = "select * from `orginfo` ORDER BY `C`,`O`";
+ } else {
+ $query = "select * from `orginfo` ORDER BY `O`";
+ }
+ } else {
+ $order=0;
+ $query = "select * from `orginfo` ORDER BY `id`";
+ }
+ } else {
+ $order=0;
+ $query = "select * from `orginfo` ORDER BY `id`";
+ }
+
+// echo "<tr><td colspan='5'>(".$order.") ".$query."</td></tr>\r\n";
+
$res = mysql_query($query);
while($row = mysql_fetch_assoc($res))
{