summary refs log tree commit diff stats
path: root/pages
diff options
context:
space:
mode:
Diffstat (limited to 'pages')
-rwxr-xr-xpages/admin.php70
-rwxr-xr-xpages/fourm.php4
-rwxr-xr-xpages/quotes.php35
3 files changed, 77 insertions, 32 deletions
diff --git a/pages/admin.php b/pages/admin.php index 195ac64..8534d91 100755 --- a/pages/admin.php +++ b/pages/admin.php
@@ -333,6 +333,73 @@ if (isLoggedIn())
333 $template->add('BACK', 'the previous page'); 333 $template->add('BACK', 'the previous page');
334 $template->add('MSG', 'I\'m sorry, that pending post doesn\'t exist.'); 334 $template->add('MSG', 'I\'m sorry, that pending post doesn\'t exist.');
335 } 335 }
336 } else if ($_GET['page'] == 'movePending')
337 {
338 $getpending = "SELECT * FROM pending WHERE id = " . $_GET['id'];
339 $getpending2 = mysql_query($getpending);
340 $getpending3 = mysql_fetch_array($getpending2);
341
342 if ($getpending3['id'] == $_GET['id'])
343 {
344 if ($_GET['dir'] == 'up')
345 {
346 $get2pending = "SELECT * FROM pending WHERE id = " . ($_GET['id']-1);
347 $get2pending2 = mysql_query($get2pending);
348 $get2pending3 = mysql_fetch_array($get2pending2);
349
350 if ($get2pending3['id'] == ($_GET['id']-1))
351 {
352 $otherPending = $get2pending3;
353 } else {
354 $template = new FITemplate('msg');
355 $template->add('BACK', 'the previous page');
356 $template->add('MSG', 'I\'m sorry, that pending post is already the first.');
357 }
358 } else if ($_GET['dir'] == 'down')
359 {
360 $get2pending = "SELECT * FROM pending WHERE id = " . ($_GET['id']+1);
361 $get2pending2 = mysql_query($get2pending);
362 $get2pending3 = mysql_fetch_array($get2pending2);
363
364 if ($get2pending3['id'] == ($_GET['id']+1))
365 {
366 $otherPending = $get2pending3;
367 } else {
368 $template = new FITemplate('msg');
369 $template->add('BACK', 'the previous page');
370 $template->add('MSG', 'I\'m sorry, that pending post is already the last.');
371 }
372 }
373
374 if (isset($otherPending))
375 {
376 $delpending = "DELETE FROM pending WHERE id = " . $_GET['id'] . " OR id = " . $otherPending['id'];
377 $delpending2 = mysql_query($delpending);
378
379 $inspending = "INSERT INTO pending (id, title, author, text, tag1, tag2, tag3, slug) VALUES (" . $_GET['id'] . ",\"" . $otherPending['title'] . "\",\"" . $otherPending['author'] . "\",\"" . $otherPending['text'] . "\",\"" . $otherPending['tag1'] . "\",\"" . $otherPending['tag2'] . "\",\"" . $otherPending['tag3'] . "\",\"" . $otherPending['slug'] . "\")";
380 $inspending2 = mysql_query($inspending);
381
382 $ins2pending = "INSERT INTO pending (id, title, author, text, tag1, tag2, tag3, slug) VALUES (" . $otherPending['id'] . ",\"" . $getpending3['title'] . "\",\"" . $getpending3['author'] . "\",\"" . $getpending3['text'] . "\",\"" . $getpending3['tag1'] . "\",\"" . $getpending3['tag2'] . "\",\"" . $getpending3['tag3'] . "\",\"" . $getpending3['slug'] . "\")";
383 $ins2pending2 = mysql_query($ins2pending);
384
385 $template = new FITemplate('admin/managePending');
386
387 $getpending = "SELECT * FROM pending ORDER BY id ASC";
388 $getpending2 = mysql_query($getpending);
389 $i=0;
390 while ($getpending3[$i] = mysql_fetch_array($getpending2))
391 {
392 $template->adds_block('PENDING', array( 'TITLE' => $getpending3[$i]['title'],
393 'AUTHOR' => $getpending3[$i]['author'],
394 'ID' => $getpending3[$i]['id']));
395 $i++;
396 }
397 }
398 } else {
399 $template = new FITemplate('msg');
400 $template->add('BACK', 'the previous page');
401 $template->add('MSG', 'I\'m sorry, that pending post doesn\'t exist.');
402 }
336 } else if ($_GET['page'] == 'managePosts') 403 } else if ($_GET['page'] == 'managePosts')
337 { 404 {
338 $template = new FITemplate('admin/managePosts'); 405 $template = new FITemplate('admin/managePosts');
@@ -561,7 +628,8 @@ if (isLoggedIn())
561 { 628 {
562 if (isset($_GET['approve'])) 629 if (isset($_GET['approve']))
563 { 630 {
564 $insquote = "INSERT INTO rash_quotes (quote) VALUES (\"" . addslashes($getpending3['quote']) . "\")"; 631 $today = mktime(date('G'),date('i'),date('s'),date('m'),date('d'),date('Y'));
632 $insquote = "INSERT INTO rash_quotes (quote,date) VALUES (\"" . addslashes($getpending3['quote']) . "\",\"" . $today . "\")";
565 $insquote2 = mysql_query($insquote); 633 $insquote2 = mysql_query($insquote);
566 634
567 $delpending = "DELETE FROM rash_queue WHERE id = " . $_GET['id']; 635 $delpending = "DELETE FROM rash_queue WHERE id = " . $_GET['id'];
diff --git a/pages/fourm.php b/pages/fourm.php index 41ae0a1..ee8b0f7 100755 --- a/pages/fourm.php +++ b/pages/fourm.php
@@ -22,6 +22,10 @@ if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);}
22 22
23require('headerproc.php'); 23require('headerproc.php');
24 24
25echo('<DIV ID="phpbb3-bubble">');
26
25include('fourm/link.php'); 27include('fourm/link.php');
26 28
29echo('</DIV>');
30
27?> 31?>
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');
25include('includes/functions_quotes.php'); 25include('includes/functions_quotes.php');
26 26
27$pageCategory = 'quotes'; 27$pageCategory = 'quotes';
28$headtags = '<LINK REL="stylesheet" HREF="/theme/css/quotes.css" />';
28 29
29if (isset($_GET['id'])) 30if (isset($_GET['id']))
30{ 31{
31 $quote_num = $_GET['id']; 32 $quote_num = $_GET['id'];
32} 33}
33 34
34if (!isset($_GET['act'])) 35if ((!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";