From 8abb1350371177d2f001e0aea82c3cc703759918 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 21 Feb 2009 10:55:14 -0500 Subject: Neatened the code a bit --- index.php | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index a902cce..951e2bb 100755 --- a/index.php +++ b/index.php @@ -4,16 +4,14 @@ include('db.php'); ob_start(); -$posts = array(); - if (isset($_GET['id'])) { - $getimages = "SELECT * FROM images WHERE id = " . $_GET['id']; + $getimage = "SELECT * FROM images WHERE id = " . $_GET['id']; } else { - $getimages = "SELECT * FROM images ORDER BY id DESC LIMIT 0,1"; + $getimage = "SELECT * FROM images ORDER BY id DESC LIMIT 0,1"; } -$getimages2 = mysql_query($getimages); -$getimage3 = mysql_fetch_array($getimages2); +$getimage2 = mysql_query($getimage); +$getimage3 = mysql_fetch_array($getimage2); ?>
@@ -39,8 +37,11 @@ $getimage3 = mysql_fetch_array($getimages2); 2) { @@ -68,10 +69,10 @@ if ($id < $all) } } -$getnpending = "SELECT COUNT(*) FROM pending"; -$getnpending2 = mysql_query($getnpending); -$getnpending3 = mysql_fetch_array($getnpending2); -$numpending = $getnpending3['COUNT(*)']; +$cntpending = "SELECT COUNT(*) FROM pending"; +$cntpending2 = mysql_query($cntpending); +$cntpending3 = mysql_fetch_array($cntpending2); +$numpending = $cntpending3['COUNT(*)']; ?> -- cgit 1.4.1