From 9cb1fcba82027daa21eb457f1b2912ee02e5c7eb Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Sun, 14 Dec 2008 09:39:10 -0500 Subject: Major design and code overhaul I don't know, a lot of stuffses happened that I don't quite remember anymore. Goodness, that's not good. --- includes/footer.php | 57 ++++++++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 27 deletions(-) (limited to 'includes/footer.php') diff --git a/includes/footer.php b/includes/footer.php index be8dd1b..4daf35e 100755 --- a/includes/footer.php +++ b/includes/footer.php @@ -37,32 +37,38 @@ if (!isset($noRightbar)) if (!isset($noHatNav)) { - $template->adds_block('USEHATNAV', array('exi'=>1)); - if (!isset($genHatNav)) + $cnthatnav = "SELECT COUNT(*) FROM hatnav WHERE category = \"" . $pageCategory . "\""; + $cnthatnav2 = mysql_query($cnthatnav); + $cnthatnav3 = mysql_fetch_array($cnthatnav2); + + if ($cnthatnav3['COUNT(*)'] > 0) { - $gethnis = 'SELECT * FROM hatnav WHERE category = "' . - $pageCategory . '"'; - $gethnis2 = mysql_query($gethnis); - $i=0; - while ($gethnis3[$i] = mysql_fetch_array($gethnis2)) + $template->adds_block('USEHATNAV', array('exi'=>1)); + if (!isset($genHatNav)) { - $template->adds_block('HATNAV', array( 'AID' => $gethnis3[$i]['AID'], - 'HREF' => $gethnis3[$i]['href'], - 'IMAGE' => '/theme/images/icons/' . $gethnis3[$i]['image'] . '.png', - 'TEXT' => $gethnis3[$i]['text'], - 'NEW' => dispIfNotOld($gethnis3[$i]['lastEdit']))); - $i++; - } - } else { - $i=0; - while ($i < $genHatNavNum) - { - $template->adds_block('HATNAV', array( 'AID' => 'post', - 'HREF' => $genHatNav[$i]['href'], - 'IMAGE' => '/theme/images/blue.PNG', - 'TEXT' => $genHatNav[$i]['text'], - 'NEW' => '')); - $i++; + $gethnis = 'SELECT * FROM hatnav WHERE category = "' . $pageCategory . '"'; + $gethnis2 = mysql_query($gethnis); + $i=0; + while ($gethnis3[$i] = mysql_fetch_array($gethnis2)) + { + $template->adds_block('HATNAV', array( 'AID' => $gethnis3[$i]['AID'], + 'HREF' => $gethnis3[$i]['href'], + 'IMAGE' => '/theme/images/icons/' . $gethnis3[$i]['image'] . '.png', + 'TEXT' => $gethnis3[$i]['text'], + 'NEW' => dispIfNotOld($gethnis3[$i]['lastEdit']))); + $i++; + } + } else { + $i=0; + while ($i < $genHatNavNum) + { + $template->adds_block('HATNAV', array( 'AID' => 'post', + 'HREF' => $genHatNav[$i]['href'], + 'IMAGE' => '/theme/images/blue.PNG', + 'TEXT' => $genHatNav[$i]['text'], + 'NEW' => '')); + $i++; + } } } } @@ -235,9 +241,6 @@ if (!isset($noRightbar)) } } -$template->add('REDIRPAGE',rawurlencode($_SERVER['REQUEST_URI'])); -$template->add('LOGDATA',echoLogData()); - $template->display(); ?> -- cgit 1.4.1