diff options
Diffstat (limited to 'pages/quotes.php')
| -rwxr-xr-x | pages/quotes.php | 35 |
1 files changed, 4 insertions, 31 deletions
| diff --git a/pages/quotes.php b/pages/quotes.php index f208f70..d557ca1 100755 --- a/pages/quotes.php +++ b/pages/quotes.php | |||
| @@ -25,40 +25,17 @@ require('headerproc.php'); | |||
| 25 | include('includes/functions_quotes.php'); | 25 | include('includes/functions_quotes.php'); |
| 26 | 26 | ||
| 27 | $pageCategory = 'quotes'; | 27 | $pageCategory = 'quotes'; |
| 28 | $headtags = '<LINK REL="stylesheet" HREF="/theme/css/quotes.css" />'; | ||
| 28 | 29 | ||
| 29 | if (isset($_GET['id'])) | 30 | if (isset($_GET['id'])) |
| 30 | { | 31 | { |
| 31 | $quote_num = $_GET['id']; | 32 | $quote_num = $_GET['id']; |
| 32 | } | 33 | } |
| 33 | 34 | ||
| 34 | if (!isset($_GET['act'])) | 35 | if ((!isset($_GET['act'])) || ($_GET['act'] == 'latest')) |
| 35 | { | 36 | { |
| 36 | $template = new FITemplate('post'); | 37 | $query = "SELECT id, quote, rating, flag FROM rash_quotes ORDER BY id DESC LIMIT 50"; |
| 37 | $template->adds_block('INTERNAL',array('exi'=>1)); | 38 | quote_generation($query, "Latest", -1); |
| 38 | |||
| 39 | $getpost = "SELECT * FROM updates WHERE tag1 = \"quotes\" OR tag2 = \"tag2\" OR tag3 = \"tag3\" ORDER BY id DESC LIMIT 0,1"; | ||
| 40 | $getpost2 = mysql_query($getpost); | ||
| 41 | $getpost3 = mysql_fetch_array($getpost2); | ||
| 42 | |||
| 43 | $title = $getpost3['title'] . ' - Blog Archive'; | ||
| 44 | |||
| 45 | $template->adds_block('POST', array( 'ID' => $getpost3['id'], | ||
| 46 | 'YEARID' => ((date('Y',strtotime($getpost3['pubDate']))-2006) % 4), | ||
| 47 | 'DATE' => date('F dS Y \a\\t g:i:s a',strtotime($getpost3['pubDate'])), | ||
| 48 | 'MONTH' => date('M',strtotime($getpost3['pubDate'])), | ||
| 49 | 'DAY' => date('d',strtotime($getpost3['pubDate'])), | ||
| 50 | 'CODED' => urlencode($getpost3['title']), | ||
| 51 | 'TITLE' => $getpost3['title'], | ||
| 52 | 'AUTHOR' => $getpost3['author'], | ||
| 53 | 'TAG1' => $getpost3['tag1'], | ||
| 54 | 'TAG2' => $getpost3['tag2'], | ||
| 55 | 'TAG3' => $getpost3['tag3'], | ||
| 56 | 'TEXT' => parseBBCode($getpost3['text']))); | ||
| 57 | |||
| 58 | $template->display(); | ||
| 59 | $page_id = 'updates-' . $getpost3['id']; | ||
| 60 | |||
| 61 | include('includes/comments.php'); | ||
| 62 | } else if ($_GET['act'] == 'add') | 39 | } else if ($_GET['act'] == 'add') |
| 63 | { | 40 | { |
| 64 | $template = new FITemplate('quotes/add'); | 41 | $template = new FITemplate('quotes/add'); |
| @@ -107,10 +84,6 @@ if (!isset($_GET['act'])) | |||
| 107 | } | 84 | } |
| 108 | $template->add('BACK','Quote #' . $quote_num); | 85 | $template->add('BACK','Quote #' . $quote_num); |
| 109 | $template->display(); | 86 | $template->display(); |
| 110 | } elseif ($_GET['act'] == 'latest') | ||
| 111 | { | ||
| 112 | $query = "SELECT id, quote, rating, flag FROM rash_quotes ORDER BY id DESC LIMIT 50"; | ||
| 113 | quote_generation($query, "Latest", -1); | ||
| 114 | } elseif ($_GET['act'] == 'random') | 87 | } elseif ($_GET['act'] == 'random') |
| 115 | { | 88 | { |
| 116 | $query = "SELECT id, quote, rating, flag FROM rash_quotes ORDER BY rand() LIMIT 50"; | 89 | $query = "SELECT id, quote, rating, flag FROM rash_quotes ORDER BY rand() LIMIT 50"; |
