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/vote.php | 42 +++++++++++++++--------------------------- 1 file changed, 15 insertions(+), 27 deletions(-) (limited to 'pages/vote.php') diff --git a/pages/vote.php b/pages/vote.php index 667b5c9..339bbf9 100755 --- a/pages/vote.php +++ b/pages/vote.php @@ -22,46 +22,34 @@ if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} require('headerproc.php'); -$pageCategory = 'home'; -$pageAID = 'archive'; - $getpost = "SELECT * FROM updates WHERE id = " . $_GET['id']; $getpost2 = mysql_query($getpost); $getpost3 = mysql_fetch_array($getpost2); if ($getpost3['id'] == $_GET['id']) { - $template = new FITemplate('msg2'); - $template->add('BACK','Back to ' . stripslashes($getpost3['title'])); - $template->add('LINK','/blog/' . $getpost3['slug'] . '/'); - if ($_GET['dir'] == 'plus') { - if (updatePop($_GET['id'],'rating')) - { - $template->add('MSG','Thank you for voting!'); - } else { - $template->add('MSG','I\'m sorry, but you\'ve already voted on this post.'); - } + $add = 1; } else if ($_GET['dir'] == 'minus') { - if (updatePop($_GET['id'],'rating',-1)) - { - $template->add('MSG','Thank you for voting!'); - } else { - $template->add('MSG','I\'m sorry, but you\'ve already voted on this post.'); - } + $add = -1; + } else { + die; + } + + if (updatePop($_GET['id'],'rating',$add)) + { + $getpost = "SELECT * FROM updates WHERE id = " . $_GET['id']; + $getpost2 = mysql_query($getpost); + $getpost3 = mysql_fetch_array($getpost2); + + die($getpost3['rating']); } else { - $template = new FITemplate('msg'); - $template->add('BACK','the previous page'); - $template->add('MSG','Um, what on earth are you doing?'); + die; } } else { - $template = new FITemplate('msg'); - $template->add('BACK','the previous page'); - $template->add('MSG','Um, what on earth are you doing?'); + generateError('404'); } -$template->display(); - ?> -- cgit 1.4.1