setPageTitle("Memorable Sayings"); $currBanner->addContent("Memorable Sayings"); $currNavbar->setCustomLinksTitle("Memorable Sayings"); $currNavbar->addCustomLink("/quotes.php?action=add", "Add a saying"); $currNavbar->addCustomLink("/quotes.php?action=view&type=top&quantity=10", "Top 10"); $currNavbar->addCustomLink("/quotes.php?action=view&type=bottom&quantity=10", "Bottom 10"); $currNavbar->addCustomLink("/quotes.php?action=viewUsers", "Top Ranked Submitters"); $currNavbar->addCustomLink("/quotes.php?action=showAll", "Show Every Quote"); // if the person wants to be added, lets give them a form. if ($_REQUEST["action"] == "add") { ?>

Add a Saying.

This will let you add a quote to Memorable Sayings. Of course, I retain the right to delete anything I don't like, since this is my site. If you are logged in when you do this, that quote will be registered as such. If not, Anonymous Coward will own it.


Person who said it:
Extra Info (Movie, Video Game, etc):
Type :
Text of the Quote
Quote added successfully!

"); // zero the counter so the quote will show up randomly $query = "UPDATE quotes SET counter = 0"; mysql_query($query); } if (!$result) print("

We could not add that quote. Perhaps it is already in use, or you did not fill out all fields. Here is the exact error: " . mysql_error() . "

"); } else { print("

Sorry, you do not have permission to do that. As usual, you can blame this on a few idiots (or actually, just one from Alberta) ruining it for everybody else.

"); } } // if we're voting on a quote elseif ($_REQUEST["action"] == "vote") { // determine what type of vote we are doing, thumbs up or thumbs down if (array_key_exists("voteup_x", $_REQUEST)) $vote = "thumbsup"; else $vote = "thumbsdown"; $query = "UPDATE quotes SET $vote = $vote + 1 WHERE id = $_REQUEST[id]"; //print($query); mysql_query($query); print("

Your vote has been registered.

"); print("

You can use the links on the left to view the top/bottom 10, or use your back button to return to what you were doing.

"); print("
"); } // if we're viewing a top or bottom list elseif ($_REQUEST["action"] == "view") { if ($_REQUEST["type"] == "top") { $query = "SELECT thumbsup, thumbsdown, author, extrainfo, text FROM quotes ORDER BY thumbsup DESC LIMIT $_REQUEST[quantity]"; $title = "Top 10"; } else { $query = "SELECT thumbsup, thumbsdown, author, extrainfo, text FROM quotes ORDER BY thumbsdown DESC LIMIT $_REQUEST[quantity]"; $title = "Bottom 10"; } $result = mysql_query($query); print("

$title

\n"); print("\n"); print("\n"); while ($row = mysql_fetch_array($result)) { print("\n"); } print("
Thumbs UpThumbs DownAuthorQuote
$row[thumbsup]$row[thumbsdown]$row[author] ($row[extrainfo])$row[text]
\n"); } // show all quotes elseif ($_REQUEST["action"] == "showAll") { $query = "SELECT thumbsup, thumbsdown, author, extrainfo, text FROM quotes ORDER BY author ASC, thumbsup DESC"; $title = "All Quotes"; $result = mysql_query($query); print("

$title

\n"); print("\n"); print("\n"); while ($row = mysql_fetch_array($result)) { print("\n"); } print("
Thumbs UpThumbs DownAuthorQuote
$row[thumbsup]$row[thumbsdown]$row[author] ($row[extrainfo])$row[text]
\n"); } // if we're viewing the submitters list elseif ($_REQUEST["action"] == "viewUsers") { $query = "SELECT users.username, users.id, SUM(quotes.thumbsup) AS thumbsup, SUM(quotes.thumbsdown) AS thumbsdown, SUM(quotes.thumbsup) - SUM(quotes.thumbsdown) AS points, COUNT(quotes.owner) AS quotecount FROM quotes, users WHERE users.id = quotes.owner GROUP BY users.id ORDER BY points DESC, username ASC"; $title = "Whose quotes do we like the most?"; $result = mysql_query($query); print("

$title

\n"); print("\n"); print("\n"); while ($row = mysql_fetch_array($result)) { ?> \n"); } // if we're doing nothing else { ?>

Memorable Sayings is the my list of random quotes. A lot of these are from the old Riptide days, because I just can't let go of the past. :)

This will restore some of the old quote system functionality that was on Janona. Some, but not all.

UserQuotesPointsTotal Thumbs UpTotal Thumbs Down