diff options
-rwxr-xr-x | pages/admin.php | 11 | ||||
-rwxr-xr-x | pages/quotes.php | 56 | ||||
-rwxr-xr-x | theme/admin/managePendingQuotes.tpl | 2 |
3 files changed, 40 insertions, 29 deletions
diff --git a/pages/admin.php b/pages/admin.php index ca7a7fa..90b3d29 100755 --- a/pages/admin.php +++ b/pages/admin.php | |||
@@ -604,8 +604,15 @@ if (isLoggedIn()) | |||
604 | $i=0; | 604 | $i=0; |
605 | while ($getpending3[$i] = mysql_fetch_array($getpending2)) | 605 | while ($getpending3[$i] = mysql_fetch_array($getpending2)) |
606 | { | 606 | { |
607 | $template->adds_block('QUOTE', array( 'ID' => $getpending3[$i]['id'], | 607 | if ($i % 2 == 1) |
608 | 'TEXT' => $getpending3[$i]['quote'])); | 608 | { |
609 | $template->adds_block('QUOTE', array( 'ID' => $getpending3[$i]['id'], | ||
610 | 'TEXT' => nl2br($getpending3[$i]['quote']), | ||
611 | 'EVEN' => 'even')); | ||
612 | } else { | ||
613 | $template->adds_block('QUOTE', array( 'ID' => $getpending3[$i]['id'], | ||
614 | 'TEXT' => nl2br($getpending3[$i]['quote']))); | ||
615 | } | ||
609 | $i++; | 616 | $i++; |
610 | } | 617 | } |
611 | } else if ($_GET['page'] == 'actionPendingQuotes') | 618 | } else if ($_GET['page'] == 'actionPendingQuotes') |
diff --git a/pages/quotes.php b/pages/quotes.php index 78cd543..e6eb9f6 100755 --- a/pages/quotes.php +++ b/pages/quotes.php | |||
@@ -31,7 +31,35 @@ if (isset($_GET['id'])) | |||
31 | $quote_num = $_GET['id']; | 31 | $quote_num = $_GET['id']; |
32 | } | 32 | } |
33 | 33 | ||
34 | if ($_GET['act'] == 'add') | 34 | if (!isset($_GET['act'])) |
35 | { | ||
36 | $template = new FITemplate('post'); | ||
37 | $template->adds_block('INTERNAL',array('exi'=>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') | ||
35 | { | 63 | { |
36 | $template = new FITemplate('quotes/add'); | 64 | $template = new FITemplate('quotes/add'); |
37 | if (isset($_GET['submit'])) | 65 | if (isset($_GET['submit'])) |
@@ -135,32 +163,8 @@ if ($_GET['act'] == 'add') | |||
135 | quote_generation($query, "#" . $_GET['act'], -1); | 163 | quote_generation($query, "#" . $_GET['act'], -1); |
136 | $page_id = 'quote-' . $_GET['act']; | 164 | $page_id = 'quote-' . $_GET['act']; |
137 | } else { | 165 | } else { |
138 | $template = new FITemplate('post'); | 166 | generateError('404'); |
139 | $template->adds_block('INTERNAL',array('exi'=>1)); | ||
140 | |||
141 | $getpost = "SELECT * FROM updates WHERE tag1 = \"quotes\" OR tag2 = \"tag2\" OR tag3 = \"tag3\" ORDER BY id DESC LIMIT 0,1"; | ||
142 | $getpost2 = mysql_query($getpost); | ||
143 | $getpost3 = mysql_fetch_array($getpost2); | ||
144 | |||
145 | $title = $getpost3['title'] . ' - Blog Archive'; | ||
146 | |||
147 | $template->adds_block('POST', array( 'ID' => $getpost3['id'], | ||
148 | 'YEARID' => ((date('Y',strtotime($getpost3['pubDate']))-2006) % 4), | ||
149 | 'DATE' => date('F dS Y \a\\t g:i:s a',strtotime($getpost3['pubDate'])), | ||
150 | 'MONTH' => date('M',strtotime($getpost3['pubDate'])), | ||
151 | 'DAY' => date('d',strtotime($getpost3['pubDate'])), | ||
152 | 'CODED' => urlencode($getpost3['title']), | ||
153 | 'TITLE' => $getpost3['title'], | ||
154 | 'AUTHOR' => $getpost3['author'], | ||
155 | 'TAG1' => $getpost3['tag1'], | ||
156 | 'TAG2' => $getpost3['tag2'], | ||
157 | 'TAG3' => $getpost3['tag3'], | ||
158 | 'TEXT' => parseBBCode($getpost3['text']))); | ||
159 | |||
160 | $template->display(); | ||
161 | $page_id = 'updates-' . $getpost3['id']; | ||
162 | } | 167 | } |
163 | include('includes/comments.php'); | ||
164 | } | 168 | } |
165 | 169 | ||
166 | ?> | 170 | ?> |
diff --git a/theme/admin/managePendingQuotes.tpl b/theme/admin/managePendingQuotes.tpl index 660e126..2d4a108 100755 --- a/theme/admin/managePendingQuotes.tpl +++ b/theme/admin/managePendingQuotes.tpl | |||
@@ -7,7 +7,7 @@ | |||
7 | </TR> | 7 | </TR> |
8 | 8 | ||
9 | <!--BEGIN QUOTE--> | 9 | <!--BEGIN QUOTE--> |
10 | <TR> | 10 | <TR CLASS="<!--QUOTE.EVEN-->"> |
11 | <TD><!--QUOTE.TEXT--></TD> | 11 | <TD><!--QUOTE.TEXT--></TD> |
12 | 12 | ||
13 | <TD> | 13 | <TD> |