Skip to content

Commit

Permalink
Added 'order' to << and >> moves when browsing tokens (so order is re…
Browse files Browse the repository at this point in the history
…tained)

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/trunk/unstable@191 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
jcleeland committed Apr 4, 2003
1 parent 811c890 commit 6a83e2e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions admin/tokens.php
Expand Up @@ -219,8 +219,8 @@
echo "\t</tr>\n";

$bquery = "SELECT * FROM tokens_$sid";
if (!$_GET['order']) {$bquery .= " ORDER BY tid";}
else {$bquery .= " ORDER BY {$_GET['order']}";}
if (!$_GET['order'] && !$_POST['order']) {$bquery .= " ORDER BY tid";}
else { $bquery .= " ORDER BY {$_GET['order']}"; }
$bquery .= " LIMIT {$_GET['start']}, {$_GET['limit']}";
$bresult = mysql_query($bquery);
while ($brow = mysql_fetch_array($bresult))
Expand Down Expand Up @@ -272,8 +272,12 @@
$movenext = $_GET['start'] + $_GET['limit'] + 1;
if ($movenext > $tkcount) {$movenext = $tkcount;}
echo "\t<tr>\n";
echo "\t\t<td colspan='4' align='left'><input type='submit' value='<<' $btstyle onClick=\"window.open('tokens.php?action=browse&sid=$sid&start=$movelast&limit={$_GET['limit']}', '_top')\"></td>\n";
echo "\t\t<td colspan='5' align='right'><input type='submit' value='>>' $btstyle onClick=\"window.open('tokens.php?action=browse&sid=$sid&start=$movenext&limit={$_GET['limit']}', '_top')\"></td>\n";
echo "\t\t<td colspan='4' align='left'><input type='submit' value='<<' $btstyle onClick=\"window.open('tokens.php?action=browse&sid=$sid&start=$movelast&limit={$_GET['limit']}";
if ($_GET['order']) {echo "&order={$_GET['order']}";}
echo "', '_top')\"></td>\n";
echo "\t\t<td colspan='5' align='right'><input type='submit' value='>>' $btstyle onClick=\"window.open('tokens.php?action=browse&sid=$sid&start=$movenext&limit={$_GET['limit']}";
if ($_GET['order']) {echo "&order={$_GET['order']}";}
echo "', '_top')\"></td>\n";
echo "\t</tr>\n";

echo "</table>\n";
Expand Down

0 comments on commit 6a83e2e

Please sign in to comment.