From 893957c41481a0cd5eb624096337762ffa54ff28 Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Sun, 9 Aug 2009 09:14:58 -0400 Subject: Created layout 7 The following changes were also made in this revision: * All HTML was changed to XHTML and a !DOCTYPE was included to reflect this * Rewrote quotes tracking system to be much less complicated and actually working * Changed quotes rendering to look more like Chirpy than Rash * Fixed comment textarea bug * Rewrote a ton of CSS so it's not as bloated * Added a JavaScript confirmation when deleting a comment * AJAXified voting on the POTW * AJAXified voting and flagging quotes * AJAXified commenting * AJAXified voting on posts * Added DateFinder back after it was accidentally deleted in Layout 4.5 The following database changes must be performed as soon as possible: * Fix title of NO post (the < is missing the semicolon) * Restore post Frasty Tha Snaman from a backup * Reset "flag" field of all rows in "rash_quotes" to 0 * Remove the "vote" and "flag" columns of "rash_tracking" * Rename the "quote_id" column of "rash_tracking" to "vote" The following external code changes must also be performed as soon as possible: * Add the following line to the end of the // Four Island block in The Fourm's functions.php: require('/svr/www/hatkirby/fourisland/main/includes/specialdates.php'); --- pages/poll.php | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) (limited to 'pages/poll.php') diff --git a/pages/poll.php b/pages/poll.php index d9cce70..6582d90 100755 --- a/pages/poll.php +++ b/pages/poll.php @@ -24,22 +24,7 @@ require('headerproc.php'); $pageCategory = 'poll'; -if (isset($_GET['submit'])) -{ - $setip = "INSERT INTO didpollalready SET ip = \"" . $_SERVER['REMOTE_ADDR'] . "\""; - $setip2 = mysql_query($setip); - $getpoll = "SELECT * FROM polloftheweek ORDER BY id DESC LIMIT 0,1"; - $getpoll2 = mysql_query($getpoll); - $getpoll3 = mysql_fetch_array($getpoll2); - $setpoll = "UPDATE polloftheweek SET clicks" . $_POST['options'] . " = " . ($getpoll3['clicks' . $_POST['options']]+1) . " WHERE id = " . $getpoll3['id']; - $setpoll2 = mysql_query($setpoll); - - $template = new FITemplate('msg'); - - $template->add('MSG','

' . $getpoll3['question'] . '

Thank you for voting on the Poll of the Week!
Click here to visit the page for this poll.'); - - $template->display(); -} else if (!isset($_GET['id'])) +if (!isset($_GET['id'])) { $template = new FITemplate('pollIndex'); @@ -70,7 +55,7 @@ if (isset($_GET['submit'])) $template->adds_block('POLL', array( 'ID' => $getpolls3[$i]['id'], 'QUESTION' => $question, 'WEEK' => date('F jS Y', strtotime($getpolls3[$i]['week'])), - 'EVEN' => (($i % 2 == 1) ? ' CLASS="even"' : ''))); + 'EVEN' => (($i % 2 == 1) ? ' class="even"' : ''))); $i++; } @@ -94,8 +79,7 @@ if (isset($_GET['submit'])) $template->adds_block('NEXT', array('ID' => ($start+1))); } - include('pages/polloftheweek.php'); - + $template->add('POTW', getPollOfTheWeek()); $template->display(); } else { $template = new FITemplate('poll'); @@ -114,7 +98,7 @@ if (isset($_GET['submit'])) { $template->adds_block('COMPLETE', array( 'RSS' => parseText($getrss3['rss']), 'AUTHOR' => $getrss3['author'], - 'DATE' => date("F dS Y \a\\t g:i:s a",strtotime($getrss3['date'])), + 'DATE' => date("F jS Y \a\\t g:i:s a",strtotime($getrss3['date'])), 'OPTION1' => $getpoll3['option1'], 'OPTION2' => $getpoll3['option2'], 'OPTION3' => $getpoll3['option3'], @@ -127,10 +111,7 @@ if (isset($_GET['submit'])) $template->adds_block('INCOMPLETE', array('exi'=>1)); } - $forceDisplay = $_GET['id']; - include('pages/polloftheweek.php'); - unset($forceDisplay); - + $template->add('POTW', getPollOfTheWeek($_GET['id'])); $template->display(); $page_id = 'polloftheweek-' . $getpoll3['id']; -- cgit 1.4.1