diff options
Diffstat (limited to 'pages')
-rwxr-xr-x | pages/admin.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pages/admin.php b/pages/admin.php index 50e7abc..a3dbffc 100755 --- a/pages/admin.php +++ b/pages/admin.php | |||
@@ -364,11 +364,11 @@ if (isLoggedIn()) | |||
364 | { | 364 | { |
365 | if ($_GET['dir'] == 'up') | 365 | if ($_GET['dir'] == 'up') |
366 | { | 366 | { |
367 | $get2pending = "SELECT * FROM pending WHERE id = " . ($_GET['id']-1); | 367 | $get2pending = "SELECT * FROM pending WHERE id < " . $_GET['id'] . " LIMIT 0,1"; |
368 | $get2pending2 = mysql_query($get2pending); | 368 | $get2pending2 = mysql_query($get2pending); |
369 | $get2pending3 = mysql_fetch_array($get2pending2); | 369 | $get2pending3 = mysql_fetch_array($get2pending2); |
370 | 370 | ||
371 | if ($get2pending3['id'] == ($_GET['id']-1)) | 371 | if (isset($get2pending3['id'])) |
372 | { | 372 | { |
373 | $otherPending = $get2pending3; | 373 | $otherPending = $get2pending3; |
374 | } else { | 374 | } else { |
@@ -379,11 +379,11 @@ if (isLoggedIn()) | |||
379 | } | 379 | } |
380 | } else if ($_GET['dir'] == 'down') | 380 | } else if ($_GET['dir'] == 'down') |
381 | { | 381 | { |
382 | $get2pending = "SELECT * FROM pending WHERE id = " . ($_GET['id']+1); | 382 | $get2pending = "SELECT * FROM pending WHERE id > " . $_GET['id'] . " LIMIT 0,1"; |
383 | $get2pending2 = mysql_query($get2pending); | 383 | $get2pending2 = mysql_query($get2pending); |
384 | $get2pending3 = mysql_fetch_array($get2pending2); | 384 | $get2pending3 = mysql_fetch_array($get2pending2); |
385 | 385 | ||
386 | if ($get2pending3['id'] == ($_GET['id']+1)) | 386 | if (isset($get2pending3['id'])) |
387 | { | 387 | { |
388 | $otherPending = $get2pending3; | 388 | $otherPending = $get2pending3; |
389 | } else { | 389 | } else { |