diff options
85 files changed, 3647 insertions, 1073 deletions
| diff --git a/.htaccess b/.htaccess index bb11dba..d8295fe 100755 --- a/.htaccess +++ b/.htaccess | |||
| @@ -21,8 +21,8 @@ RewriteRule ^poll/(.+).php /index.php?area=poll&id=$1 [QSA,L] | |||
| 21 | RewriteRule ^quotes/$ /index.php?area=quotes [QSA,L] | 21 | RewriteRule ^quotes/$ /index.php?area=quotes [QSA,L] |
| 22 | RewriteRule ^quotes/(.+).php /index.php?area=quotes&act=$1 [QSA,L] | 22 | RewriteRule ^quotes/(.+).php /index.php?area=quotes&act=$1 [QSA,L] |
| 23 | 23 | ||
| 24 | RewriteRule ^admin/$ /index.php?area=admin [QSA,L] | 24 | RewriteRule ^admin/$ /admin.php [QSA,L] |
| 25 | RewriteRule ^admin/(.+).php /index.php?area=admin&page=$1 [QSA,L] | 25 | RewriteRule ^admin/(.+).php /admin.php?area=$1 [QSA,L] |
| 26 | 26 | ||
| 27 | RewriteRule ^error/$ /index.php?area=error [QSA,L] | 27 | RewriteRule ^error/$ /index.php?area=error [QSA,L] |
| 28 | RewriteRule ^error/(.+).php /index.php?area=error&id=$1 [QSA,L] | 28 | RewriteRule ^error/(.+).php /index.php?area=error&id=$1 [QSA,L] |
| diff --git a/admin.php b/admin.php new file mode 100644 index 0000000..5e002a6 --- /dev/null +++ b/admin.php | |||
| @@ -0,0 +1,77 @@ | |||
| 1 | <?php | ||
| 2 | /* | ||
| 3 | 444444444 | ||
| 4 | 4::::::::4 | ||
| 5 | 4:::::::::4 | ||
| 6 | 4::::44::::4 | ||
| 7 | 4::::4 4::::4 Four Island | ||
| 8 | 4::::4 4::::4 | ||
| 9 | 4::::4 4::::4 Written and maintained by Starla Insigna | ||
| 10 | 4::::444444::::444 | ||
| 11 | 4::::::::::::::::4 admin.php | ||
| 12 | 4444444444:::::444 | ||
| 13 | 4::::4 Please do not use, reproduce or steal the | ||
| 14 | 4::::4 contents of this file without explicit | ||
| 15 | 4::::4 permission from Hatkirby. | ||
| 16 | 44::::::44 | ||
| 17 | 4::::::::4 | ||
| 18 | 4444444444 | ||
| 19 | */ | ||
| 20 | |||
| 21 | require('headerproc.php'); | ||
| 22 | |||
| 23 | header('Content-type: application/xhtml+xml'); | ||
| 24 | |||
| 25 | include('../security/config.php'); | ||
| 26 | include('includes/db.php'); | ||
| 27 | include('includes/template.php'); | ||
| 28 | include('includes/session.php'); | ||
| 29 | include('includes/parsers.php'); | ||
| 30 | include('includes/xmlrpc/xmlrpc.inc'); | ||
| 31 | include('includes/specialdates.php'); | ||
| 32 | include('includes/functions.php'); | ||
| 33 | |||
| 34 | if (!isAdmin()) | ||
| 35 | { | ||
| 36 | ob_start(); | ||
| 37 | generateError('404'); | ||
| 38 | $doc = ob_get_contents(); | ||
| 39 | ob_end_clean(); | ||
| 40 | |||
| 41 | include('includes/header.php'); | ||
| 42 | echo($doc); | ||
| 43 | include('includes/footer.php'); | ||
| 44 | |||
| 45 | exit; | ||
| 46 | } | ||
| 47 | |||
| 48 | ob_start(); | ||
| 49 | |||
| 50 | $pageName = isset($_GET['area']) ? $_GET['area'] : 'welcome'; | ||
| 51 | |||
| 52 | if (file_exists('admin/' . $pageName . '.php')) | ||
| 53 | { | ||
| 54 | include('admin/' . $pageName . '.php'); | ||
| 55 | } else { | ||
| 56 | generateError('404'); | ||
| 57 | } | ||
| 58 | |||
| 59 | $doc = ob_get_contents(); | ||
| 60 | ob_end_clean(); | ||
| 61 | |||
| 62 | $doc = stripslashes($doc); | ||
| 63 | |||
| 64 | $template = new FITemplate('admin/header'); | ||
| 65 | $template->add(strtoupper($category) . 'ACTIVECAT', ' class="active"'); | ||
| 66 | $template->adds_block(strtoupper($category) . 'ISACTIVECAT', array('exi'=>1)); | ||
| 67 | if (isset($pageaid)) $template->add(strtoupper($pageaid) . 'ACTIVE', ' class="active"'); | ||
| 68 | if (!isset($flashmsg)) $template->add('HIDEFLASH', ' style="display: none"'); | ||
| 69 | if (isset($flashmsg)) $template->add('FLASH', $flashmsg); | ||
| 70 | $template->display(); | ||
| 71 | |||
| 72 | echo($doc); | ||
| 73 | |||
| 74 | $template = new FITemplate('admin/footer'); | ||
| 75 | $template->display(); | ||
| 76 | |||
| 77 | ?> | ||
| diff --git a/admin/comments.php b/admin/comments.php new file mode 100644 index 0000000..4cda9ec --- /dev/null +++ b/admin/comments.php | |||
| @@ -0,0 +1,143 @@ | |||
| 1 | <?php | ||
| 2 | /* | ||
| 3 | 444444444 | ||
| 4 | 4::::::::4 | ||
| 5 | 4:::::::::4 | ||
| 6 | 4::::44::::4 | ||
| 7 | 4::::4 4::::4 Four Island | ||
| 8 | 4::::4 4::::4 | ||
| 9 | 4::::4 4::::4 Written and maintained by Starla Insigna | ||
| 10 | 4::::444444::::444 | ||
| 11 | 4::::::::::::::::4 admin/comments.php | ||
| 12 | 4444444444:::::444 | ||
| 13 | 4::::4 Please do not use, reproduce or steal the | ||
| 14 | 4::::4 contents of this file without explicit | ||
| 15 | 4::::4 permission from Hatkirby. | ||
| 16 | 44::::::44 | ||
| 17 | 4::::::::4 | ||
| 18 | 4444444444 | ||
| 19 | */ | ||
| 20 | |||
| 21 | if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} | ||
| 22 | |||
| 23 | require('headerproc.php'); | ||
| 24 | require_once('Pager.php'); | ||
| 25 | |||
| 26 | $category = 'posts'; | ||
| 27 | $pageaid = 'comments'; | ||
| 28 | |||
| 29 | if (isset($_GET['action'])) | ||
| 30 | { | ||
| 31 | if (($_GET['action'] == 'deny') || ($_GET['action'] == 'approve')) | ||
| 32 | { | ||
| 33 | if (is_numeric($_POST['id'])) | ||
| 34 | { | ||
| 35 | $getcomment = "SELECT * FROM moderation WHERE id = " . $_POST['id']; | ||
| 36 | $getcomment2 = mysql_query($getcomment); | ||
| 37 | $getcomment3 = mysql_fetch_array($getcomment2); | ||
| 38 | |||
| 39 | if ($getcomment3['id'] == $_POST['id']) | ||
| 40 | { | ||
| 41 | if ($_GET['action'] == 'deny') | ||
| 42 | { | ||
| 43 | $delpost = "DELETE FROM moderation WHERE id = " . $_POST['id']; | ||
| 44 | $delpost2 = mysql_query($delpost); | ||
| 45 | |||
| 46 | $flashmsg = 'The selected comment has been deleted.'; | ||
| 47 | } else if ($_GET['action'] == 'approve') | ||
| 48 | { | ||
| 49 | $insanon = "INSERT INTO anon_commenters (username,email,website) VALUES (\"" . $getcomment3['author'] . "\",\"" . $getcomment3['email'] . "\",\"" . $getcomment3['website'] . "\")"; | ||
| 50 | $insanon2 = mysql_query($insanon); | ||
| 51 | |||
| 52 | $inscomment = "INSERT INTO comments (page_id,user_id,comment,is_anon) VALUES (\"" . $getcomment3['page_id'] . "\"," . mysql_insert_id() . ",\"" . $getcomment3['comment'] . "\",1)"; | ||
| 53 | $inscomment2 = mysql_query($inscomment); | ||
| 54 | |||
| 55 | $delcomment = "DELETE FROM moderation WHERE id = " . $getcomment3['id']; | ||
| 56 | $delcomment2 = mysql_query($delcomment); | ||
| 57 | |||
| 58 | $flashmsg = 'The selected comment has been approved.'; | ||
| 59 | } | ||
| 60 | } | ||
| 61 | } | ||
| 62 | } else if (($_GET['action'] == 'denys') || ($_GET['action'] == 'approves')) | ||
| 63 | { | ||
| 64 | $ids = explode(',', $_POST['ids']); | ||
| 65 | |||
| 66 | if (is_array($ids) && !empty($ids)) | ||
| 67 | { | ||
| 68 | foreach ($ids as $id) | ||
| 69 | { | ||
| 70 | $getcomment = "SELECT * FROM moderation WHERE id = " . $id; | ||
| 71 | $getcomment2 = mysql_query($getcomment); | ||
| 72 | $getcomment3 = mysql_fetch_array($getcomment2); | ||
| 73 | |||
| 74 | if ($getcomment3['id'] == $id) | ||
| 75 | { | ||
| 76 | if ($_GET['action'] == 'denys') | ||
| 77 | { | ||
| 78 | $delpost = "DELETE FROM moderation WHERE id = " . $id; | ||
| 79 | $delpost2 = mysql_query($delpost); | ||
| 80 | |||
| 81 | $flashmsg = 'The selected comments have been deleted.'; | ||
| 82 | } else if ($_GET['action'] == 'approves') | ||
| 83 | { | ||
| 84 | $insanon = "INSERT INTO anon_commenters (username,email,website) VALUES (\"" . $getcomment3['author'] . "\",\"" . $getcomment3['email'] . "\",\"" . $getcomment3['website'] . "\")"; | ||
| 85 | $insanon2 = mysql_query($insanon); | ||
| 86 | |||
| 87 | $inscomment = "INSERT INTO comments (page_id,user_id,comment,is_anon) VALUES (\"" . $getcomment3['page_id'] . "\"," . mysql_insert_id() . ",\"" . $getcomment3['comment'] . "\",1)"; | ||
| 88 | $inscomment2 = mysql_query($inscomment); | ||
| 89 | |||
| 90 | $delcomment = "DELETE FROM moderation WHERE id = " . $getcomment3['id']; | ||
| 91 | $delcomment2 = mysql_query($delcomment); | ||
| 92 | |||
| 93 | $flashmsg = 'The selected comments have been approved.'; | ||
| 94 | } | ||
| 95 | } | ||
| 96 | } | ||
| 97 | } | ||
| 98 | } | ||
| 99 | } | ||
| 100 | |||
| 101 | $template = new FITemplate('admin/comments'); | ||
| 102 | |||
| 103 | $getcomments = "SELECT * FROM moderation ORDER BY id ASC"; | ||
| 104 | $getcomments2 = mysql_query($getcomments); | ||
| 105 | $i=0; | ||
| 106 | while ($getcomments3[$i] = mysql_fetch_array($getcomments2)) | ||
| 107 | { | ||
| 108 | $i++; | ||
| 109 | } | ||
| 110 | |||
| 111 | if ($i != 0) | ||
| 112 | { | ||
| 113 | $template->adds_block('AVAIL',array('exi'=>1)); | ||
| 114 | } else { | ||
| 115 | $template->adds_block('NOTAVAIL',array('exi'=>1)); | ||
| 116 | } | ||
| 117 | |||
| 118 | $pager = &Pager::factory(array( 'mode' => 'Sliding', | ||
| 119 | 'perPage' => 20, | ||
| 120 | 'delta' => 2, | ||
| 121 | 'itemData' => $getcomments3)); | ||
| 122 | |||
| 123 | $j=0; | ||
| 124 | |||
| 125 | foreach ($pager->getPageData() as $comment) | ||
| 126 | { | ||
| 127 | if (!empty($comment)) | ||
| 128 | { | ||
| 129 | $template->adds_block('COMMENT', array( 'TEXT' => parseText($comment['comment']), | ||
| 130 | 'AUTHOR' => $comment['author'], | ||
| 131 | 'ID' => $comment['id'], | ||
| 132 | 'ODD' => ($j % 2 ? '' : ' class="odd"'))); | ||
| 133 | } | ||
| 134 | |||
| 135 | $j++; | ||
| 136 | } | ||
| 137 | |||
| 138 | $template->add('PAGEID', $pager->getCurrentPageID()); | ||
| 139 | $template->add('PAGINATION', $pager->links); | ||
| 140 | |||
| 141 | $template->display(); | ||
| 142 | |||
| 143 | ?> | ||
| diff --git a/admin/drafts.php b/admin/drafts.php new file mode 100644 index 0000000..22d8a09 --- /dev/null +++ b/admin/drafts.php | |||
| @@ -0,0 +1,100 @@ | |||
| 1 | <?php | ||
| 2 | /* | ||
| 3 | 444444444 | ||
| 4 | 4::::::::4 | ||
| 5 | 4:::::::::4 | ||
| 6 | 4::::44::::4 | ||
| 7 | 4::::4 4::::4 Four Island | ||
| 8 | 4::::4 4::::4 | ||
| 9 | 4::::4 4::::4 Written and maintained by Starla Insigna | ||
| 10 | 4::::444444::::444 | ||
| 11 | 4::::::::::::::::4 admin/drafts.php | ||
| 12 | 4444444444:::::444 | ||
| 13 | 4::::4 Please do not use, reproduce or steal the | ||
| 14 | 4::::4 contents of this file without explicit | ||
| 15 | 4::::4 permission from Hatkirby. | ||
| 16 | 44::::::44 | ||
| 17 | 4::::::::4 | ||
| 18 | 4444444444 | ||
| 19 | */ | ||
| 20 | |||
| 21 | if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} | ||
| 22 | |||
| 23 | require('headerproc.php'); | ||
| 24 | require_once('Pager.php'); | ||
| 25 | |||
| 26 | $category = 'posts'; | ||
| 27 | $pageaid = 'drafts'; | ||
| 28 | |||
| 29 | if (isset($_GET['action'])) | ||
| 30 | { | ||
| 31 | if ($_GET['action'] == 'delete') | ||
| 32 | { | ||
| 33 | if (is_numeric($_POST['id'])) | ||
| 34 | { | ||
| 35 | $delpost = "DELETE FROM drafts WHERE id = " . $_POST['id']; | ||
| 36 | $delpost2 = mysql_query($delpost); | ||
| 37 | |||
| 38 | $flashmsg = 'The selected draft has been deleted.'; | ||
| 39 | } | ||
| 40 | } else if ($_GET['action'] == 'deletes') | ||
| 41 | { | ||
| 42 | $ids = explode(',', $_POST['ids']); | ||
| 43 | |||
| 44 | if (is_array($ids) && !empty($ids)) | ||
| 45 | { | ||
| 46 | foreach ($ids as $id) | ||
| 47 | { | ||
| 48 | $delpost = "DELETE FROM drafts WHERE id = " . $id; | ||
| 49 | $delpost2 = mysql_query($delpost); | ||
| 50 | } | ||
| 51 | |||
| 52 | $flashmsg = 'The selected drafts have been deleted.'; | ||
| 53 | } | ||
| 54 | } | ||
| 55 | } | ||
| 56 | |||
| 57 | $template = new FITemplate('admin/drafts'); | ||
| 58 | |||
| 59 | $getposts = "SELECT * FROM drafts ORDER BY id ASC"; | ||
| 60 | $getposts2 = mysql_query($getposts); | ||
| 61 | $i=0; | ||
| 62 | while ($getposts3[$i] = mysql_fetch_array($getposts2)) | ||
| 63 | { | ||
| 64 | $i++; | ||
| 65 | } | ||
| 66 | |||
| 67 | if ($i != 0) | ||
| 68 | { | ||
| 69 | $template->adds_block('AVAIL',array('exi'=>1)); | ||
| 70 | } else { | ||
| 71 | $template->adds_block('NOTAVAIL',array('exi'=>1)); | ||
| 72 | } | ||
| 73 | |||
| 74 | $pager = &Pager::factory(array( 'mode' => 'Sliding', | ||
| 75 | 'perPage' => 20, | ||
| 76 | 'delta' => 2, | ||
| 77 | 'itemData' => $getposts3)); | ||
| 78 | |||
| 79 | $j=0; | ||
| 80 | |||
| 81 | foreach ($pager->getPageData() as $post) | ||
| 82 | { | ||
| 83 | if (!empty($post)) | ||
| 84 | { | ||
| 85 | $template->adds_block('POST', array( 'TITLE' => $post['title'], | ||
| 86 | 'AUTHOR' => $post['author'], | ||
| 87 | 'ID' => $post['id'], | ||
| 88 | 'CODED' => $post['slug'], | ||
| 89 | 'ODD' => ($j % 2 ? '' : ' class="odd"'))); | ||
| 90 | } | ||
| 91 | |||
| 92 | $j++; | ||
| 93 | } | ||
| 94 | |||
| 95 | $template->add('PAGEID', $pager->getCurrentPageID()); | ||
| 96 | $template->add('PAGINATION', $pager->links); | ||
| 97 | |||
| 98 | $template->display(); | ||
| 99 | |||
| 100 | ?> | ||
| diff --git a/admin/editPoll.php b/admin/editPoll.php new file mode 100644 index 0000000..3a154a3 --- /dev/null +++ b/admin/editPoll.php | |||
| @@ -0,0 +1,118 @@ | |||
| 1 | <?php | ||
| 2 | /* | ||
| 3 | 444444444 | ||
| 4 | 4::::::::4 | ||
| 5 | 4:::::::::4 | ||
| 6 | 4::::44::::4 | ||
| 7 | 4::::4 4::::4 Four Island | ||
| 8 | 4::::4 4::::4 | ||
| 9 | 4::::4 4::::4 Written and maintained by Starla Insigna | ||
| 10 | 4::::444444::::444 | ||
| 11 | 4::::::::::::::::4 admin/editPoll.php | ||
| 12 | 4444444444:::::444 | ||
| 13 | 4::::4 Please do not use, reproduce or steal the | ||
| 14 | 4::::4 contents of this file without explicit | ||
| 15 | 4::::4 permission from Hatkirby. | ||
| 16 | 44::::::44 | ||
| 17 | 4::::::::4 | ||
| 18 | 4444444444 | ||
| 19 | */ | ||
| 20 | |||
| 21 | if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} | ||
| 22 | |||
| 23 | require('headerproc.php'); | ||
| 24 | |||
| 25 | $category = 'polls'; | ||
| 26 | $pageaid = 'quotes'; | ||
| 27 | |||
| 28 | $template = new FITemplate('admin/writePoll'); | ||
| 29 | $template->add('TITLE', 'Edit Poll'); | ||
| 30 | $template->add('ACTION', '/admin/editPoll.php?id=' . $_GET['id'] . '&submit='); | ||
| 31 | |||
| 32 | if (isset($_GET['submit'])) | ||
| 33 | { | ||
| 34 | if (empty($_POST['question'])) | ||
| 35 | { | ||
| 36 | $errors[] = array( 'field' => 'question', | ||
| 37 | 'text' => 'Question is a required field'); | ||
| 38 | } | ||
| 39 | |||
| 40 | if (empty($_POST['option1'])) | ||
| 41 | { | ||
| 42 | $errors[] = array( 'field' => 'option1', | ||
| 43 | 'text' => 'Option 1 is a required field'); | ||
| 44 | } | ||
| 45 | |||
| 46 | if (empty($_POST['option2'])) | ||
| 47 | { | ||
| 48 | $errors[] = array( 'field' => 'option2', | ||
| 49 | 'text' => 'Option 2 is a required field'); | ||
| 50 | } | ||
| 51 | |||
| 52 | if (empty($_POST['option3'])) | ||
| 53 | { | ||
| 54 | $errors[] = array( 'field' => 'option3', | ||
| 55 | 'text' => 'Option 3 is a required field'); | ||
| 56 | } | ||
| 57 | |||
| 58 | if (empty($_POST['option4'])) | ||
| 59 | { | ||
| 60 | $errors[] = array( 'field' => 'option4', | ||
| 61 | 'text' => 'Option 4 is a required field'); | ||
| 62 | } | ||
| 63 | |||
| 64 | if (isset($errors)) | ||
| 65 | { | ||
| 66 | $template->adds_block('ISERROR',array('exi'=>1)); | ||
| 67 | |||
| 68 | $eid = 0; | ||
| 69 | foreach ($errors as $error) | ||
| 70 | { | ||
| 71 | $template->adds_block('ERROR', array( 'ID' => $eid, | ||
| 72 | 'TEXT' => $error['text'])); | ||
| 73 | $template->add('IS' . strtoupper($error['field']) . 'ERROR', ' error'); | ||
| 74 | $template->adds_block(strtoupper($error['field']) . 'ERROR', array( 'ID' => $eid, | ||
| 75 | 'TEXT' => $error['text'])); | ||
| 76 | |||
| 77 | $eid++; | ||
| 78 | } | ||
| 79 | |||
| 80 | $getpoll = "SELECT * FROM polloftheweek WHERE id = " . $_GET['id']; | ||
| 81 | $getpoll2 = mysql_query($getpoll); | ||
| 82 | $getpoll3 = mysql_fetch_array($getpoll2); | ||
| 83 | |||
| 84 | $template->add('QUESTIONVALUE', $_POST['question']); | ||
| 85 | $template->add('OPTION1VALUE', $_POST['option1']); | ||
| 86 | $template->add('OPTION2VALUE', $_POST['option2']); | ||
| 87 | $template->add('OPTION3VALUE', $_POST['option3']); | ||
| 88 | $template->add('OPTION4VALUE', $_POST['option4']); | ||
| 89 | $template->add('TEXTVALUE', $_POST['text']); | ||
| 90 | } else { | ||
| 91 | $inspoll = "UPDATE polloftheweek SET question = \"" . mysql_real_escape_string($_POST['question']) . "\", option1 = \"" . mysql_real_escape_string($_POST['option1']) . "\", option2 = \"" . mysql_real_escape_string($_POST['option2']) . "\", option3 = \"" . mysql_real_escape_string($_POST['option3']) . "\", option4 = \"" . mysql_real_escape_string($_POST['option4']) . "\", text = \"" . mysql_real_escape_string($_POST['text']) . "\" WHERE id = " . $_GET['id']; | ||
| 92 | $inspoll2 = mysql_query($inspoll); | ||
| 93 | |||
| 94 | $template->add('QUESTIONVALUE', $_POST['question']); | ||
| 95 | $template->add('OPTION1VALUE', $_POST['option1']); | ||
| 96 | $template->add('OPTION2VALUE', $_POST['option2']); | ||
| 97 | $template->add('OPTION3VALUE', $_POST['option3']); | ||
| 98 | $template->add('OPTION4VALUE', $_POST['option4']); | ||
| 99 | $template->add('TEXTVALUE', $_POST['text']); | ||
| 100 | |||
| 101 | $template->adds_block('FLASH', array('TEXT' => 'Your poll has been sucessfully edited. <a href="/poll/' . $_GET['id'] . '.php">View poll</a>.')); | ||
| 102 | } | ||
| 103 | } else { | ||
| 104 | $getpoll = "SELECT * FROM polloftheweek WHERE id = " . $_GET['id']; | ||
| 105 | $getpoll2 = mysql_query($getpoll); | ||
| 106 | $getpoll3 = mysql_fetch_array($getpoll2); | ||
| 107 | |||
| 108 | $template->add('QUESTIONVALUE', $getpoll3['question']); | ||
| 109 | $template->add('OPTION1VALUE', $getpoll3['option1']); | ||
| 110 | $template->add('OPTION2VALUE', $getpoll3['option2']); | ||
| 111 | $template->add('OPTION3VALUE', $getpoll3['option3']); | ||
| 112 | $template->add('OPTION4VALUE', $getpoll3['option4']); | ||
| 113 | $template->add('TEXTVALUE', $getpoll3['text']); | ||
| 114 | } | ||
| 115 | |||
| 116 | $template->display(); | ||
| 117 | |||
| 118 | ?> | ||
| diff --git a/admin/editPost.php b/admin/editPost.php new file mode 100644 index 0000000..b01d1e2 --- /dev/null +++ b/admin/editPost.php | |||
| @@ -0,0 +1,224 @@ | |||
| 1 | <?php | ||
| 2 | /* | ||
| 3 | 444444444 | ||
| 4 | 4::::::::4 | ||
| 5 | 4:::::::::4 | ||
| 6 | 4::::44::::4 | ||
| 7 | 4::::4 4::::4 Four Island | ||
| 8 | 4::::4 4::::4 | ||
| 9 | 4::::4 4::::4 Written and maintained by Starla Insigna | ||
| 10 | 4::::444444::::444 | ||
| 11 | 4::::::::::::::::4 admin/editPost.php | ||
| 12 | 4444444444:::::444 | ||
| 13 | 4::::4 Please do not use, reproduce or steal the | ||
| 14 | 4::::4 contents of this file without explicit | ||
| 15 | 4::::4 permission from Hatkirby. | ||
| 16 | 44::::::44 | ||
| 17 | 4::::::::4 | ||
| 18 | 4444444444 | ||
| 19 | */ | ||
| 20 | |||
| 21 | if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} | ||
| 22 | |||
| 23 | require('headerproc.php'); | ||
| 24 | |||
| 25 | $category = 'posts'; | ||
| 26 | |||
| 27 | if ($_GET['type'] == 'updates') | ||
| 28 | { | ||
| 29 | $pageaid = 'posts'; | ||
| 30 | } else { | ||
| 31 | $pageaid = $_GET['type']; | ||
| 32 | } | ||
| 33 | |||
| 34 | $tableToForm = array( 'drafts' => 'draft', | ||
| 35 | 'pending' => 'article', | ||
| 36 | 'updates' => 'instant'); | ||
| 37 | $tableToTags = array( 'drafts' => 'draft', | ||
| 38 | 'pending' => 'pending', | ||
| 39 | 'updates' => 'published'); | ||
| 40 | |||
| 41 | if (!isset($_GET['type']) || !isset($_GET['id']) || !is_numeric($_GET['id'])) | ||
| 42 | { | ||
| 43 | generateError('404'); | ||
| 44 | } else if (!(($_GET['type'] == 'drafts') || ($_GET['type'] == 'pending') || ($_GET['type'] == 'updates'))) | ||
| 45 | { | ||
| 46 | generateError('404'); | ||
| 47 | } else { | ||
| 48 | $getpost = 'SELECT * FROM ' . $_GET['type'] . ' WHERE id = ' . $_GET['id']; | ||
| 49 | $getpost2 = mysql_query($getpost); | ||
| 50 | $getpost3 = mysql_fetch_array($getpost2); | ||
| 51 | |||
| 52 | if ($getpost3['id'] == $_GET['id']) | ||
| 53 | { | ||
| 54 | $template = new FITemplate('admin/writePost'); | ||
| 55 | |||
| 56 | $template->add('TITLE', 'Edit Post'); | ||
| 57 | |||
| 58 | if (isset($_GET['submit'])) | ||
| 59 | { | ||
| 60 | if (empty($_POST['title'])) | ||
| 61 | { | ||
| 62 | $errors[] = array( 'field' => 'title', | ||
| 63 | 'text' => 'Title is a required field'); | ||
| 64 | } | ||
| 65 | |||
| 66 | if (empty($_POST['text'])) | ||
| 67 | { | ||
| 68 | $errors[] = array( 'field' => 'text', | ||
| 69 | 'text' => 'The content of a blog post cannot be empty'); | ||
| 70 | } | ||
| 71 | |||
| 72 | if (empty($_POST['tags'])) | ||
| 73 | { | ||
| 74 | $errors[] = array( 'field' => 'tags', | ||
| 75 | 'text' => 'Tags is a required field'); | ||
| 76 | } | ||
| 77 | |||
| 78 | if ( | ||
| 79 | (strpos($_POST['tags'], ',') === 0) || | ||
| 80 | (strrpos($_POST['tags'], ',') === strlen($_POST['tags'])-1) || | ||
| 81 | (strpos($_POST['tags'], ',,') !== FALSE) | ||
| 82 | ) | ||
| 83 | { | ||
| 84 | $errors[] = array( 'field' => 'tags', | ||
| 85 | 'text' => 'Blank tags are not allowed'); | ||
| 86 | } | ||
| 87 | |||
| 88 | if (empty($_POST['type'])) | ||
| 89 | { | ||
| 90 | $errors[] = array( 'field' => 'type', | ||
| 91 | 'text' => 'Type is a required field'); | ||
| 92 | } | ||
| 93 | |||
| 94 | if (isset($errors)) | ||
| 95 | { | ||
| 96 | $template->adds_block('ISERROR',array('exi'=>1)); | ||
| 97 | |||
| 98 | $eid = 0; | ||
| 99 | foreach ($errors as $error) | ||
| 100 | { | ||
| 101 | $template->adds_block('ERROR', array( 'ID' => $eid, | ||
| 102 | 'TEXT' => $error['text'])); | ||
| 103 | $template->add('IS' . strtoupper($error['field']) . 'ERROR', ' error'); | ||
| 104 | $template->adds_block(strtoupper($error['field']) . 'ERROR', array( 'ID' => $eid, | ||
| 105 | 'TEXT' => $error['text'])); | ||
| 106 | |||
| 107 | $eid++; | ||
| 108 | } | ||
| 109 | |||
| 110 | $template->add('ACTION', '/admin/editPost.php?type=' . $_GET['type'] . '&id=' . $_GET['id'] . '&submit='); | ||
| 111 | } else { | ||
| 112 | $tags = explode(',', $_POST['tags']); | ||
| 113 | removeTags($_GET['id'], $tableToTags[$_GET['type']]); | ||
| 114 | |||
| 115 | if ($tableToForm[$_GET['type']] != $_POST['type']) | ||
| 116 | { | ||
| 117 | $delold = "DELETE FROM " . $_GET['type'] . " WHERE id = " . $_GET['id']; | ||
| 118 | $delold2 = mysql_query($delold); | ||
| 119 | |||
| 120 | if ($_POST['type'] == 'draft') | ||
| 121 | { | ||
| 122 | $insdraft = "INSERT INTO drafts (title,author,text,slug) VALUES (\"" . mysql_real_escape_string($_POST['title']) . "\",\"" . getSessionUsername() . "\",\"" . mysql_real_escape_string($_POST['text']) . "\",\"" . generateSlug($_POST['title'],'updates') . "\")"; | ||
| 123 | $insdraft2 = mysql_query($insdraft); | ||
| 124 | |||
| 125 | $id = mysql_insert_id(); | ||
| 126 | $type = 'drafts'; | ||
| 127 | addTags($id, $tags, 'draft'); | ||
| 128 | } else if ($_POST['type'] == 'instant') | ||
| 129 | { | ||
| 130 | $id = postBlogPost($_POST['title'], getSessionUsername(), $tags, $_POST['text']); | ||
| 131 | $type = 'updates'; | ||
| 132 | } else { | ||
| 133 | if ($_POST['type'] == 'article') | ||
| 134 | { | ||
| 135 | $getpending = "SELECT * FROM pending ORDER BY id DESC LIMIT 0,1"; | ||
| 136 | $getpending2 = mysql_query($getpending); | ||
| 137 | $getpending3 = mysql_fetch_array($getpending2); | ||
| 138 | if (isset($getpending3['id']) === FALSE) | ||
| 139 | { | ||
| 140 | $id = 50; | ||
| 141 | } else { | ||
| 142 | $id = $getpending3['id']+1; | ||
| 143 | } | ||
| 144 | } else if ($_POST['type'] == 'high') | ||
| 145 | { | ||
| 146 | $getpending = "SELECT * FROM pending ORDER BY id ASC LIMIT 0,1"; | ||
| 147 | $getpending2 = mysql_query($getpending); | ||
| 148 | $getpending3 = mysql_fetch_array($getpending2); | ||
| 149 | if (isset($getpending3['id']) === FALSE) | ||
| 150 | { | ||
| 151 | $id = 50; | ||
| 152 | } else { | ||
| 153 | $id = $getpending3['id']-1; | ||
| 154 | } | ||
| 155 | } | ||
| 156 | |||
| 157 | $inspending = "INSERT INTO pending (id,title,author,text,slug) VALUES (" . $id . ",\"" . mysql_real_escape_string($_POST['title']) . "\",\"" . getSessionUsername() . "\",\"" . mysql_real_escape_string($_POST['text']) . "\",\"" . generateSlug($_POST['title'],'updates') . "\")"; | ||
| 158 | $inspending2 = mysql_query($inspending); | ||
| 159 | |||
| 160 | $type = 'pending'; | ||
| 161 | addTags($id, $tags, 'pending'); | ||
| 162 | } | ||
| 163 | } else if ($_POST['type'] == 'draft') | ||
| 164 | { | ||
| 165 | $setdraft = "UPDATE drafts SET title = \"" . mysql_real_escape_string($_POST['title']) . "\", text = \"" . mysql_real_escape_string($_POST['text']) . "\" WHERE id = " . $_GET['id']; | ||
| 166 | $setdraft2 = mysql_query($setdraft); | ||
| 167 | |||
| 168 | $type = 'drafts'; | ||
| 169 | $id = $_GET['id']; | ||
| 170 | addTags($_GET['id'], $tags, 'draft'); | ||
| 171 | } else if ($_POST['type'] == 'article') | ||
| 172 | { | ||
| 173 | $setpending = "UPDATE pending SET title = \"" . mysql_real_escape_string($_POST['title']) . "\", text = \"" . mysql_real_escape_string($_POST['text']) . "\" WHERE id = " . $_GET['id']; | ||
| 174 | $setpending2 = mysql_query($setpending); | ||
| 175 | |||
| 176 | $type = 'pending'; | ||
| 177 | $id = $_GET['id']; | ||
| 178 | addTags($_GET['id'], $tags, 'pending'); | ||
| 179 | } else if ($_POST['type'] == 'instant') | ||
| 180 | { | ||
| 181 | $setpost = "UPDATE updates SET title = \"" . mysql_real_escape_string($_POST['title']) . "\", text = \"" . mysql_real_escape_string($_POST['text']) . "\" WHERE id = " . $_GET['id']; | ||
| 182 | $setpost2 = mysql_query($setpost); | ||
| 183 | |||
| 184 | $type = 'updates'; | ||
| 185 | $id = $_GET['id']; | ||
| 186 | addTags($_GET['id'], $tags); | ||
| 187 | } | ||
| 188 | |||
| 189 | if ($type == 'updates') | ||
| 190 | { | ||
| 191 | $getpost = "SELECT * FROM updates WHERE id = " . $id; | ||
| 192 | $getpost2 = mysql_query($getpost); | ||
| 193 | $getpost3 = mysql_fetch_array($getpost2); | ||
| 194 | |||
| 195 | $url = '/blog/' . $getpost3['slug'] . '/'; | ||
| 196 | } else { | ||
| 197 | $url = '/viewPost.php?type=' . $type . '&id=' . $id; | ||
| 198 | } | ||
| 199 | |||
| 200 | $template->adds_block('FLASH', array('TEXT' => 'Your post has been sucessfully edited. <a href="' . $url . '">View post</a>.')); | ||
| 201 | $template->add('ACTION', '/admin/editPost.php?type=' . $type . '&id=' . $id . '&submit='); | ||
| 202 | } | ||
| 203 | |||
| 204 | $template->add('TITLEVALUE', $_POST['title']); | ||
| 205 | $template->add('TEXTVALUE', $_POST['text']); | ||
| 206 | $template->add('TAGSVALUE', $_POST['tags']); | ||
| 207 | $template->add(strtoupper($_POST['type']) . 'SELECTED', ' checked="checked"'); | ||
| 208 | if ($_POST['type'] != 'draft') $template->add('TAGSDISABLED', ' readonly="readonly"'); | ||
| 209 | } else { | ||
| 210 | $template->add('TITLEVALUE', $getpost3['title']); | ||
| 211 | $template->add('TEXTVALUE', $getpost3['text']); | ||
| 212 | $template->add('TAGSVALUE', implode(',', getTags($_GET['id'], $tableToTags[$_GET['type']]))); | ||
| 213 | $template->add(strtoupper($tableToForm[$_GET['type']]) . 'SELECTED', ' checked="checked"'); | ||
| 214 | if ($_GET['type'] != 'drafts') $template->add('TAGSDISABLED', ' readonly="readonly"'); | ||
| 215 | $template->add('ACTION', '/admin/editPost.php?type=' . $_GET['type'] . '&id=' . $_GET['id'] . '&submit='); | ||
| 216 | } | ||
| 217 | |||
| 218 | $template->display(); | ||
| 219 | } else { | ||
| 220 | generateError('404'); | ||
| 221 | } | ||
| 222 | } | ||
| 223 | |||
| 224 | ?> | ||
| diff --git a/admin/editQuote.php b/admin/editQuote.php new file mode 100644 index 0000000..b250ece --- /dev/null +++ b/admin/editQuote.php | |||
| @@ -0,0 +1,69 @@ | |||
| 1 | <?php | ||
| 2 | /* | ||
| 3 | 444444444 | ||
| 4 | 4::::::::4 | ||
| 5 | 4:::::::::4 | ||
| 6 | 4::::44::::4 | ||
| 7 | 4::::4 4::::4 Four Island | ||
| 8 | 4::::4 4::::4 | ||
| 9 | 4::::4 4::::4 Written and maintained by Starla Insigna | ||
| 10 | 4::::444444::::444 | ||
| 11 | 4::::::::::::::::4 admin/editQuote.php | ||
| 12 | 4444444444:::::444 | ||
| 13 | 4::::4 Please do not use, reproduce or steal the | ||
| 14 | 4::::4 contents of this file without explicit | ||
| 15 | 4::::4 permission from Hatkirby. | ||
| 16 | 44::::::44 | ||
| 17 | 4::::::::4 | ||
| 18 | 4444444444 | ||
| 19 | */ | ||
| 20 | |||
| 21 | if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} | ||
| 22 | |||
| 23 | require('headerproc.php'); | ||
| 24 | |||
| 25 | $category = 'quotes'; | ||
| 26 | $pageaid = 'quotes'; | ||
| 27 | |||
| 28 | $template = new FITemplate('admin/writeQuote'); | ||
| 29 | $template->add('TITLE', 'Edit Quote'); | ||
| 30 | $template->add('ACTION', '/admin/editQuote.php?id=' . $_GET['id'] . '&submit='); | ||
| 31 | |||
| 32 | if (isset($_GET['submit'])) | ||
| 33 | { | ||
| 34 | if (isset($errors)) | ||
| 35 | { | ||
| 36 | $template->adds_block('ISERROR',array('exi'=>1)); | ||
| 37 | |||
| 38 | $eid = 0; | ||
| 39 | foreach ($errors as $error) | ||
| 40 | { | ||
| 41 | $template->adds_block('ERROR', array( 'ID' => $eid, | ||
| 42 | 'TEXT' => $error['text'])); | ||
| 43 | $template->add('IS' . strtoupper($error['field']) . 'ERROR', ' error'); | ||
| 44 | $template->adds_block(strtoupper($error['field']) . 'ERROR', array( 'ID' => $eid, | ||
| 45 | 'TEXT' => $error['text'])); | ||
| 46 | |||
| 47 | $eid++; | ||
| 48 | } | ||
| 49 | |||
| 50 | $template->add('QUOTEVALUE', $_POST['quote']); | ||
| 51 | } else { | ||
| 52 | $insquote = "UPDATE rash_quotes SET quote = \"" . mysql_real_escape_string($_POST['quote']) . "\" WHERE id = " . $_GET['id']; | ||
| 53 | $insquote2 = mysql_query($insquote); | ||
| 54 | |||
| 55 | $template->add('QUOTEVALUE', $_POST['quote']); | ||
| 56 | |||
| 57 | $template->adds_block('FLASH', array('TEXT' => 'Your quote has been sucessfully edited. <a href="/quotes/' . $_GET['id'] . '.php">View quote</a>.')); | ||
| 58 | } | ||
| 59 | } else { | ||
| 60 | $getquote = "SELECT * FROM rash_quotes WHERE id = " . $_GET['id']; | ||
| 61 | $getquote2 = mysql_query($getquote); | ||
| 62 | $getquote3 = mysql_fetch_array($getquote2); | ||
| 63 | |||
| 64 | $template->add('QUOTEVALUE', $getquote3['quote']); | ||
| 65 | } | ||
| 66 | |||
| 67 | $template->display(); | ||
| 68 | |||
| 69 | ?> | ||
| diff --git a/admin/maintenance.php b/admin/maintenance.php new file mode 100644 index 0000000..57f2646 --- /dev/null +++ b/admin/maintenance.php | |||
| @@ -0,0 +1,61 @@ | |||
| 1 | <?php | ||
| 2 | /* | ||
| 3 | 444444444 | ||
| 4 | 4::::::::4 | ||
| 5 | 4:::::::::4 | ||
| 6 | 4::::44::::4 | ||
| 7 | 4::::4 4::::4 Four Island | ||
| 8 | 4::::4 4::::4 | ||
| 9 | 4::::4 4::::4 Written and maintained by Starla Insigna | ||
| 10 | 4::::444444::::444 | ||
| 11 | 4::::::::::::::::4 admin/maintenance.php | ||
| 12 | 4444444444:::::444 | ||
| 13 | 4::::4 Please do not use, reproduce or steal the | ||
| 14 | 4::::4 contents of this file without explicit | ||
| 15 | 4::::4 permission from Hatkirby. | ||
| 16 | 44::::::44 | ||
| 17 | 4::::::::4 | ||
| 18 | 4444444444 | ||
| 19 | */ | ||
| 20 | |||
| 21 | if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} | ||
| 22 | |||
| 23 | require('headerproc.php'); | ||
| 24 | |||
| 25 | $category = 'home'; | ||
| 26 | $pageaid = 'maintenance'; | ||
| 27 | |||
| 28 | if (isset($_GET['submit'])) | ||
| 29 | { | ||
| 30 | if ($_POST['mode'] == 'on') | ||
| 31 | { | ||
| 32 | $set = 1; | ||
| 33 | } else if ($_POST['mode'] == 'off') | ||
| 34 | { | ||
| 35 | $set = 0; | ||
| 36 | } | ||
| 37 | |||
| 38 | if (isset($set)) | ||
| 39 | { | ||
| 40 | $setconfig = "UPDATE config SET value = \"" . $set . "\" WHERE name = \"maintenanceMode\""; | ||
| 41 | $setconfig2 = mysql_query($setconfig); | ||
| 42 | |||
| 43 | $flashmsg = 'Maintenance Mode has successfully been set to "' . $_POST['mode'] . '"'; | ||
| 44 | } | ||
| 45 | } | ||
| 46 | |||
| 47 | $template = new FITemplate('admin/maintenance'); | ||
| 48 | |||
| 49 | $getconfig = "SELECT * FROM config WHERE name = \"maintenanceMode\""; | ||
| 50 | $getconfig2 = mysql_query($getconfig); | ||
| 51 | $getconfig3 = mysql_fetch_array($getconfig2); | ||
| 52 | if ($getconfig3['value'] == '1') | ||
| 53 | { | ||
| 54 | $template->add('ON', ' selected="selected"'); | ||
| 55 | } else { | ||
| 56 | $template->add('OFF', ' selected="selected"'); | ||
| 57 | } | ||
| 58 | |||
| 59 | $template->display(); | ||
| 60 | |||
| 61 | ?> | ||
| diff --git a/admin/modquotes.php b/admin/modquotes.php new file mode 100644 index 0000000..8340fd1 --- /dev/null +++ b/admin/modquotes.php | |||
| @@ -0,0 +1,136 @@ | |||
| 1 | <?php | ||
| 2 | /* | ||
| 3 | 444444444 | ||
| 4 | 4::::::::4 | ||
| 5 | 4:::::::::4 | ||
| 6 | 4::::44::::4 | ||
| 7 | 4::::4 4::::4 Four Island | ||
| 8 | 4::::4 4::::4 | ||
| 9 | 4::::4 4::::4 Written and maintained by Starla Insigna | ||
| 10 | 4::::444444::::444 | ||
| 11 | 4::::::::::::::::4 admin/modquotes.php | ||
| 12 | 4444444444:::::444 | ||
| 13 | 4::::4 Please do not use, reproduce or steal the | ||
| 14 | 4::::4 contents of this file without explicit | ||
| 15 | 4::::4 permission from Hatkirby. | ||
| 16 | 44::::::44 | ||
| 17 | 4::::::::4 | ||
| 18 | 4444444444 | ||
| 19 | */ | ||
| 20 | |||
| 21 | if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} | ||
| 22 | |||
| 23 | require('headerproc.php'); | ||
| 24 | require_once('Pager.php'); | ||
| 25 | |||
| 26 | $category = 'quotes'; | ||
| 27 | $pageaid = 'modquotes'; | ||
| 28 | |||
| 29 | if (isset($_GET['action'])) | ||
| 30 | { | ||
| 31 | if (($_GET['action'] == 'deny') || ($_GET['action'] == 'approve')) | ||
| 32 | { | ||
| 33 | if (is_numeric($_POST['id'])) | ||
| 34 | { | ||
| 35 | $getpending = "SELECT * FROM rash_queue WHERE id = " . $_POST['id']; | ||
| 36 | $getpending2 = mysql_query($getpending); | ||
| 37 | $getpending3 = mysql_fetch_array($getpending2); | ||
| 38 | |||
| 39 | if ($getpending3['id'] == $_POST['id']) | ||
| 40 | { | ||
| 41 | if ($_GET['action'] == 'deny') | ||
| 42 | { | ||
| 43 | $delpending = "DELETE FROM rash_queue WHERE id = " . $_POST['id']; | ||
| 44 | $delpending2 = mysql_query($delpending); | ||
| 45 | |||
| 46 | $flashmsg = 'The selected quote has been deleted.'; | ||
| 47 | } else if ($_GET['action'] == 'approve') | ||
| 48 | { | ||
| 49 | $insquote = "INSERT INTO rash_quotes (quote,date) VALUES (\"" . mysql_real_escape_string($getpending3['quote']) . "\",\"" . time() . "\")"; | ||
| 50 | $insquote2 = mysql_query($insquote); | ||
| 51 | |||
| 52 | $delpending = "DELETE FROM rash_queue WHERE id = " . $_POST['id']; | ||
| 53 | $delpending2 = mysql_query($delpending); | ||
| 54 | |||
| 55 | $flashmsg = 'The selected quote has been approved.'; | ||
| 56 | } | ||
| 57 | } | ||
| 58 | } | ||
| 59 | } else if (($_GET['action'] == 'denys') || ($_GET['action'] == 'approves')) | ||
| 60 | { | ||
| 61 | $ids = explode(',', $_POST['ids']); | ||
| 62 | |||
| 63 | if (is_array($ids) && !empty($ids)) | ||
| 64 | { | ||
| 65 | foreach ($ids as $id) | ||
| 66 | { | ||
| 67 | $getcomment = "SELECT * FROM rash_queue WHERE id = " . $id; | ||
| 68 | $getcomment2 = mysql_query($getcomment); | ||
| 69 | $getcomment3 = mysql_fetch_array($getcomment2); | ||
| 70 | |||
| 71 | if ($getcomment3['id'] == $id) | ||
| 72 | { | ||
| 73 | if ($_GET['action'] == 'denys') | ||
| 74 | { | ||
| 75 | $delpending = "DELETE FROM rash_queue WHERE id = " . $id; | ||
| 76 | $delpending2 = mysql_query($delpending); | ||
| 77 | |||
| 78 | $flashmsg = 'The selected quote has been deleted.'; | ||
| 79 | } else if ($_GET['action'] == 'approves') | ||
| 80 | { | ||
| 81 | $insquote = "INSERT INTO rash_quotes (quote,date) VALUES (\"" . mysql_real_escape_string($getpending3['quote']) . "\",\"" . time() . "\")"; | ||
| 82 | $insquote2 = mysql_query($insquote); | ||
| 83 | |||
| 84 | $delpending = "DELETE FROM rash_queue WHERE id = " . $id; | ||
| 85 | $delpending2 = mysql_query($delpending); | ||
| 86 | |||
| 87 | $flashmsg = 'The selected quote has been approved.'; | ||
| 88 | } | ||
| 89 | } | ||
| 90 | } | ||
| 91 | } | ||
| 92 | } | ||
| 93 | } | ||
| 94 | |||
| 95 | $template = new FITemplate('admin/modquotes'); | ||
| 96 | |||
| 97 | $getpendingq = "SELECT * FROM rash_queue ORDER BY id ASC"; | ||
| 98 | $getpendingq2 = mysql_query($getpendingq); | ||
| 99 | $i=0; | ||
| 100 | while ($getpendingq3[$i] = mysql_fetch_array($getpendingq2)) | ||
| 101 | { | ||
| 102 | $i++; | ||
| 103 | } | ||
| 104 | |||
| 105 | if ($i != 0) | ||
| 106 | { | ||
| 107 | $template->adds_block('AVAIL',array('exi'=>1)); | ||
| 108 | } else { | ||
| 109 | $template->adds_block('NOTAVAIL',array('exi'=>1)); | ||
| 110 | } | ||
| 111 | |||
| 112 | $pager = &Pager::factory(array( 'mode' => 'Sliding', | ||
| 113 | 'perPage' => 20, | ||
| 114 | 'delta' => 2, | ||
| 115 | 'itemData' => $getpendingq3)); | ||
| 116 | |||
| 117 | $j=0; | ||
| 118 | |||
| 119 | foreach ($pager->getPageData() as $quote) | ||
| 120 | { | ||
| 121 | if (!empty($quote)) | ||
| 122 | { | ||
| 123 | $template->adds_block('QUOTE', array( 'TEXT' => str_replace("\n","<br />",htmlentities(stripslashes($quote['quote']))), | ||
| 124 | 'ID' => $quote['id'], | ||
| 125 | 'ODD' => ($j % 2 ? '' : ' class="odd"'))); | ||
| 126 | } | ||
| 127 | |||
| 128 | $j++; | ||
| 129 | } | ||
| 130 | |||
| 131 | $template->add('PAGEID', $pager->getCurrentPageID()); | ||
| 132 | $template->add('PAGINATION', $pager->links); | ||
| 133 | |||
| 134 | $template->display(); | ||
| 135 | |||
| 136 | ?> | ||
| diff --git a/admin/newPoll.php b/admin/newPoll.php new file mode 100644 index 0000000..0373980 --- /dev/null +++ b/admin/newPoll.php | |||
| @@ -0,0 +1,104 @@ | |||
| 1 | <?php | ||
| 2 | /* | ||
| 3 | 444444444 | ||
| 4 | 4::::::::4 | ||
| 5 | 4:::::::::4 | ||
| 6 | 4::::44::::4 | ||
| 7 | 4::::4 4::::4 Four Island | ||
| 8 | 4::::4 4::::4 | ||
| 9 | 4::::4 4::::4 Written and maintained by Starla Insigna | ||
| 10 | 4::::444444::::444 | ||
| 11 | 4::::::::::::::::4 admin/newPoll.php | ||
| 12 | 4444444444:::::444 | ||
| 13 | 4::::4 Please do not use, reproduce or steal the | ||
| 14 | 4::::4 contents of this file without explicit | ||
| 15 | 4::::4 permission from Hatkirby. | ||
| 16 | 44::::::44 | ||
| 17 | 4::::::::4 | ||
| 18 | 4444444444 | ||
| 19 | */ | ||
| 20 | |||
| 21 | if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} | ||
| 22 | |||
| 23 | require('headerproc.php'); | ||
| 24 | |||
| 25 | $category = 'polls'; | ||
| 26 | $pageaid = 'newpoll'; | ||
| 27 | |||
| 28 | $template = new FITemplate('admin/writePoll'); | ||
| 29 | |||
| 30 | if (isset($_GET['submit'])) | ||
| 31 | { | ||
| 32 | if (empty($_POST['question'])) | ||
| 33 | { | ||
| 34 | $errors[] = array( 'field' => 'question', | ||
| 35 | 'text' => 'Question is a required field'); | ||
| 36 | } | ||
| 37 | |||
| 38 | if (empty($_POST['option1'])) | ||
| 39 | { | ||
| 40 | $errors[] = array( 'field' => 'option1', | ||
| 41 | 'text' => 'Option 1 is a required field'); | ||
| 42 | } | ||
| 43 | |||
| 44 | if (empty($_POST['option2'])) | ||
| 45 | { | ||
| 46 | $errors[] = array( 'field' => 'option2', | ||
| 47 | 'text' => 'Option 2 is a required field'); | ||
| 48 | } | ||
| 49 | |||
| 50 | if (empty($_POST['option3'])) | ||
| 51 | { | ||
| 52 | $errors[] = array( 'field' => 'option3', | ||
| 53 | 'text' => 'Option 3 is a required field'); | ||
| 54 | } | ||
| 55 | |||
| 56 | if (empty($_POST['option4'])) | ||
| 57 | { | ||
| 58 | $errors[] = array( 'field' => 'option4', | ||
| 59 | 'text' => 'Option 4 is a required field'); | ||
| 60 | } | ||
| 61 | |||
| 62 | if (isset($errors)) | ||
| 63 | { | ||
| 64 | $template->adds_block('ISERROR',array('exi'=>1)); | ||
| 65 | |||
| 66 | $eid = 0; | ||
| 67 | foreach ($errors as $error) | ||
| 68 | { | ||
| 69 | $template->adds_block('ERROR', array( 'ID' => $eid, | ||
| 70 | 'TEXT' => $error['text'])); | ||
| 71 | $template->add('IS' . strtoupper($error['field']) . 'ERROR', ' error'); | ||
| 72 | $template->adds_block(strtoupper($error['field']) . 'ERROR', array( 'ID' => $eid, | ||
| 73 | 'TEXT' => $error['text'])); | ||
| 74 | |||
| 75 | $eid++; | ||
| 76 | } | ||
| 77 | |||
| 78 | $template->add('TITLE', 'New Poll'); | ||
| 79 | $template->add('ACTION', '/admin/newPoll.php?submit='); | ||
| 80 | } else { | ||
| 81 | $inspoll = "INSERT INTO polloftheweek (question,option1,option2,option3,option4,text) VALUES (\"" . mysql_real_escape_string($_POST['question']) . "\",\"" . mysql_real_escape_string($_POST['option1']) . "\",\"" . mysql_real_escape_string($_POST['option2']) . "\",\"" . mysql_real_escape_string($_POST['option3']) . "\",\"" . mysql_real_escape_string($_POST['option4']) . "\",\"" . mysql_real_escape_string($_POST['text']) . "\")"; | ||
| 82 | $inspoll2 = mysql_query($inspoll); | ||
| 83 | |||
| 84 | $id = mysql_insert_id(); | ||
| 85 | |||
| 86 | $template->add('QUESTIONVALUE', $_POST['question']); | ||
| 87 | $template->add('OPTION1VALUE', $_POST['option1']); | ||
| 88 | $template->add('OPTION2VALUE', $_POST['option2']); | ||
| 89 | $template->add('OPTION3VALUE', $_POST['option3']); | ||
| 90 | $template->add('OPTION4VALUE', $_POST['option4']); | ||
| 91 | $template->add('TEXTVALUE', $_POST['text']); | ||
| 92 | |||
| 93 | $template->add('TITLE', 'Edit Poll'); | ||
| 94 | $template->add('ACTION', '/admin/editPoll.php?id=' . $id . '&submit='); | ||
| 95 | $template->adds_block('FLASH', array('TEXT' => 'Your poll has been sucessfully created. <a href="/poll/' . $id . '.php">View poll</a>.')); | ||
| 96 | } | ||
| 97 | } else { | ||
| 98 | $template->add('TITLE', 'New Poll'); | ||
| 99 | $template->add('ACTION', '/admin/newPoll.php?submit='); | ||
| 100 | } | ||
| 101 | |||
| 102 | $template->display(); | ||
| 103 | |||
| 104 | ?> | ||
| diff --git a/admin/newPost.php b/admin/newPost.php new file mode 100644 index 0000000..eb6b4e0 --- /dev/null +++ b/admin/newPost.php | |||
| @@ -0,0 +1,159 @@ | |||
| 1 | <?php | ||
| 2 | /* | ||
| 3 | 444444444 | ||
| 4 | 4::::::::4 | ||
| 5 | 4:::::::::4 | ||
| 6 | 4::::44::::4 | ||
| 7 | 4::::4 4::::4 Four Island | ||
| 8 | 4::::4 4::::4 | ||
| 9 | 4::::4 4::::4 Written and maintained by Starla Insigna | ||
| 10 | 4::::444444::::444 | ||
| 11 | 4::::::::::::::::4 admin/newPost.php | ||
| 12 | 4444444444:::::444 | ||
| 13 | 4::::4 Please do not use, reproduce or steal the | ||
| 14 | 4::::4 contents of this file without explicit | ||
| 15 | 4::::4 permission from Hatkirby. | ||
| 16 | 44::::::44 | ||
| 17 | 4::::::::4 | ||
| 18 | 4444444444 | ||
| 19 | */ | ||
| 20 | |||
| 21 | if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} | ||
| 22 | |||
| 23 | require('headerproc.php'); | ||
| 24 | |||
| 25 | $category = 'posts'; | ||
| 26 | $pageaid = 'newpost'; | ||
| 27 | |||
| 28 | $template = new FITemplate('admin/writePost'); | ||
| 29 | |||
| 30 | if (isset($_GET['submit'])) | ||
| 31 | { | ||
| 32 | if (empty($_POST['title'])) | ||
| 33 | { | ||
| 34 | $errors[] = array( 'field' => 'title', | ||
| 35 | 'text' => 'Title is a required field'); | ||
| 36 | } | ||
| 37 | |||
| 38 | if (empty($_POST['text'])) | ||
| 39 | { | ||
| 40 | $errors[] = array( 'field' => 'text', | ||
| 41 | 'text' => 'The content of a blog post cannot be empty'); | ||
| 42 | } | ||
| 43 | |||
| 44 | if (empty($_POST['tags'])) | ||
| 45 | { | ||
| 46 | $errors[] = array( 'field' => 'tags', | ||
| 47 | 'text' => 'Tags is a required field'); | ||
| 48 | } | ||
| 49 | |||
| 50 | if ( | ||
| 51 | (strpos($_POST['tags'], ',') === 0) || | ||
| 52 | (strrpos($_POST['tags'], ',') === strlen($_POST['tags'])-1) || | ||
| 53 | (strpos($_POST['tags'], ',,') !== FALSE) | ||
| 54 | ) | ||
| 55 | { | ||
| 56 | $errors[] = array( 'field' => 'tags', | ||
| 57 | 'text' => 'Blank tags are not allowed'); | ||
| 58 | } | ||
| 59 | |||
| 60 | if (empty($_POST['type'])) | ||
| 61 | { | ||
| 62 | $errors[] = array( 'field' => 'type', | ||
| 63 | 'text' => 'Type is a required field'); | ||
| 64 | } | ||
| 65 | |||
| 66 | if (isset($errors)) | ||
| 67 | { | ||
| 68 | $template->adds_block('ISERROR',array('exi'=>1)); | ||
| 69 | |||
| 70 | $eid = 0; | ||
| 71 | foreach ($errors as $error) | ||
| 72 | { | ||
| 73 | $template->adds_block('ERROR', array( 'ID' => $eid, | ||
| 74 | 'TEXT' => $error['text'])); | ||
| 75 | $template->add('IS' . strtoupper($error['field']) . 'ERROR', ' error'); | ||
| 76 | $template->adds_block(strtoupper($error['field']) . 'ERROR', array( 'ID' => $eid, | ||
| 77 | 'TEXT' => $error['text'])); | ||
| 78 | |||
| 79 | $eid++; | ||
| 80 | } | ||
| 81 | |||
| 82 | $template->add('TITLE', 'Write New Post'); | ||
| 83 | $template->add('ACTION', '/admin/newPost.php?submit='); | ||
| 84 | } else { | ||
| 85 | $tags = explode(',', $_POST['tags']); | ||
| 86 | |||
| 87 | if ($_POST['type'] == 'draft') | ||
| 88 | { | ||
| 89 | $insdraft = "INSERT INTO drafts (title,author,text,slug) VALUES (\"" . mysql_real_escape_string($_POST['title']) . "\",\"" . getSessionUsername() . "\",\"" . mysql_real_escape_string($_POST['text']) . "\",\"" . generateSlug($_POST['title'],'updates') . "\")"; | ||
| 90 | $insdraft2 = mysql_query($insdraft); | ||
| 91 | |||
| 92 | $id = mysql_insert_id(); | ||
| 93 | $type = 'drafts'; | ||
| 94 | addTags($id, $tags, 'draft'); | ||
| 95 | } else if ($_POST['type'] == 'instant') | ||
| 96 | { | ||
| 97 | $id = postBlogPost($_POST['title'], getSessionUsername(), $tags, $_POST['text']); | ||
| 98 | $type = 'updates'; | ||
| 99 | } else { | ||
| 100 | if ($_POST['type'] == 'article') | ||
| 101 | { | ||
| 102 | $getpending = "SELECT * FROM pending ORDER BY id DESC LIMIT 0,1"; | ||
| 103 | $getpending2 = mysql_query($getpending); | ||
| 104 | $getpending3 = mysql_fetch_array($getpending2); | ||
| 105 | if (isset($getpending3['id']) === FALSE) | ||
| 106 | { | ||
| 107 | $id = 50; | ||
| 108 | } else { | ||
| 109 | $id = $getpending3['id']+1; | ||
| 110 | } | ||
| 111 | } else if ($_POST['type'] == 'high') | ||
| 112 | { | ||
| 113 | $getpending = "SELECT * FROM pending ORDER BY id ASC LIMIT 0,1"; | ||
| 114 | $getpending2 = mysql_query($getpending); | ||
| 115 | $getpending3 = mysql_fetch_array($getpending2); | ||
| 116 | if (isset($getpending3['id']) === FALSE) | ||
| 117 | { | ||
| 118 | $id = 50; | ||
| 119 | } else { | ||
| 120 | $id = $getpending3['id']-1; | ||
| 121 | } | ||
| 122 | } | ||
| 123 | |||
| 124 | $inspending = "INSERT INTO pending (id,title,author,text,slug) VALUES (" . $id . ",\"" . mysql_real_escape_string($_POST['title']) . "\",\"" . getSessionUsername() . "\",\"" . mysql_real_escape_string($_POST['text']) . "\",\"" . generateSlug($_POST['title'],'updates') . "\")"; | ||
| 125 | $inspending2 = mysql_query($inspending); | ||
| 126 | |||
| 127 | $type = 'pending'; | ||
| 128 | addTags($id, $tags, 'pending'); | ||
| 129 | } | ||
| 130 | |||
| 131 | if ($type == 'updates') | ||
| 132 | { | ||
| 133 | $getpost = "SELECT * FROM updates WHERE id = " . $id; | ||
| 134 | $getpost2 = mysql_query($getpost); | ||
| 135 | $getpost3 = mysql_fetch_array($getpost2); | ||
| 136 | |||
| 137 | $url = '/blog/' . $getpost3['slug'] . '/'; | ||
| 138 | } else { | ||
| 139 | $url = '/viewPost.php?type=' . $type . '&id=' . $id; | ||
| 140 | } | ||
| 141 | |||
| 142 | $template->add('ACTION', '/admin/editPost.php?type=' . $type . '&id=' . $id . '&submit='); | ||
| 143 | $template->adds_block('FLASH', array('TEXT' => 'Your post has been sucessfully created. <a href="' . $url . '">View post</a>.')); | ||
| 144 | $template->add('TITLE', 'Edit Post'); | ||
| 145 | if ($type != 'drafts') $template->add('TAGSDISABLED', ' readonly="readonly"'); | ||
| 146 | } | ||
| 147 | |||
| 148 | $template->add('TITLEVALUE', $_POST['title']); | ||
| 149 | $template->add('TEXTVALUE', $_POST['text']); | ||
| 150 | $template->add('TAGSVALUE', $_POST['tags']); | ||
| 151 | $template->add(strtoupper($_POST['type']) . 'SELECTED', ' checked="checked"'); | ||
| 152 | } else { | ||
| 153 | $template->add('TITLE', 'Write New Post'); | ||
| 154 | $template->add('ACTION', '/admin/newPost.php?submit='); | ||
| 155 | } | ||
| 156 | |||
| 157 | $template->display(); | ||
| 158 | |||
| 159 | ?> | ||
| diff --git a/admin/pending.php b/admin/pending.php new file mode 100644 index 0000000..407cd35 --- /dev/null +++ b/admin/pending.php | |||
| @@ -0,0 +1,180 @@ | |||
| 1 | <?php | ||
| 2 | /* | ||
| 3 | 444444444 | ||
| 4 | 4::::::::4 | ||
| 5 | 4:::::::::4 | ||
| 6 | 4::::44::::4 | ||
| 7 | 4::::4 4::::4 Four Island | ||
| 8 | 4::::4 4::::4 | ||
| 9 | 4::::4 4::::4 Written and maintained by Starla Insigna | ||
| 10 | 4::::444444::::444 | ||
| 11 | 4::::::::::::::::4 admin/pending.php | ||
| 12 | 4444444444:::::444 | ||
| 13 | 4::::4 Please do not use, reproduce or steal the | ||
| 14 | 4::::4 contents of this file without explicit | ||
| 15 | 4::::4 permission from Hatkirby. | ||
| 16 | 44::::::44 | ||
| 17 | 4::::::::4 | ||
| 18 | 4444444444 | ||
| 19 | */ | ||
| 20 | |||
| 21 | if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} | ||
| 22 | |||
| 23 | require('headerproc.php'); | ||
| 24 | require_once('Pager.php'); | ||
| 25 | |||
| 26 | $category = 'posts'; | ||
| 27 | $pageaid = 'pending'; | ||
| 28 | |||
| 29 | if (isset($_GET['action'])) | ||
| 30 | { | ||
| 31 | if ($_GET['action'] == 'delete') | ||
| 32 | { | ||
| 33 | if (is_numeric($_POST['id'])) | ||
| 34 | { | ||
| 35 | $delpost = "DELETE FROM pending WHERE id = " . $_POST['id']; | ||
| 36 | $delpost2 = mysql_query($delpost); | ||
| 37 | |||
| 38 | $flashmsg = 'The selected pending post has been deleted.'; | ||
| 39 | } | ||
| 40 | } else if (($_GET['action'] == 'moveup') || ($_GET['action'] == 'movedown')) | ||
| 41 | { | ||
| 42 | if (is_numeric($_GET['id'])) | ||
| 43 | { | ||
| 44 | $getpending = "SELECT * FROM pending WHERE id = " . $_GET['id']; | ||
| 45 | $getpending2 = mysql_query($getpending); | ||
| 46 | $getpending3 = mysql_fetch_array($getpending2); | ||
| 47 | |||
| 48 | if ($getpending3['id'] == $_GET['id']) | ||
| 49 | { | ||
| 50 | if ($_GET['action'] == 'moveup') | ||
| 51 | { | ||
| 52 | $get2pending = "SELECT * FROM pending WHERE id < " . $_GET['id'] . " ORDER BY id DESC LIMIT 0,1"; | ||
| 53 | $get2pending2 = mysql_query($get2pending); | ||
| 54 | $get2pending3 = mysql_fetch_array($get2pending2); | ||
| 55 | |||
| 56 | if (isset($get2pending3['id'])) | ||
| 57 | { | ||
| 58 | $otherPending = $get2pending3; | ||
| 59 | } | ||
| 60 | } else if ($_GET['action'] == 'movedown') | ||
| 61 | { | ||
| 62 | $get2pending = "SELECT * FROM pending WHERE id > " . $_GET['id'] . " ORDER BY id ASC LIMIT 0,1"; | ||
| 63 | $get2pending2 = mysql_query($get2pending); | ||
| 64 | $get2pending3 = mysql_fetch_array($get2pending2); | ||
| 65 | |||
| 66 | if (isset($get2pending3['id'])) | ||
| 67 | { | ||
| 68 | $otherPending = $get2pending3; | ||
| 69 | } | ||
| 70 | } | ||
| 71 | |||
| 72 | if (isset($otherPending)) | ||
| 73 | { | ||
| 74 | $delpending = "DELETE FROM pending WHERE id = " . $_GET['id'] . " OR id = " . $otherPending['id']; | ||
| 75 | $delpending2 = mysql_query($delpending); | ||
| 76 | |||
| 77 | $inspending = "INSERT INTO pending (id, title, author, text, slug) VALUES (" . $_GET['id'] . ",\"" . $otherPending['title'] . "\",\"" . $otherPending['author'] . "\",\"" . mysql_real_escape_string($otherPending['text']) . "\",\"" . $otherPending['slug'] . "\")"; | ||
| 78 | $inspending2 = mysql_query($inspending); | ||
| 79 | |||
| 80 | $ins2pending = "INSERT INTO pending (id, title, author, text, slug) VALUES (" . $otherPending['id'] . ",\"" . $getpending3['title'] . "\",\"" . $getpending3['author'] . "\",\"" . mysql_real_escape_string($getpending3['text']) . "\",\"" . $getpending3['slug'] . "\")"; | ||
| 81 | $ins2pending2 = mysql_query($ins2pending) or die($ins2pending); | ||
| 82 | |||
| 83 | $tags1 = getTags($_GET['id'], 'pending'); | ||
| 84 | $tags2 = getTags($otherPending['id'], 'pending'); | ||
| 85 | removeTags($_GET['id'], 'pending'); | ||
| 86 | removeTags($otherPending['id'], 'pending'); | ||
| 87 | addTags($_GET['id'], $tags2, 'pending'); | ||
| 88 | addTags($otherPending['id'], $tags1, 'pending'); | ||
| 89 | |||
| 90 | $flashmsg = 'The selected post was moved sucessfully.'; | ||
| 91 | } | ||
| 92 | } | ||
| 93 | } | ||
| 94 | } else if ($_GET['action'] == 'deletes') | ||
| 95 | { | ||
| 96 | $ids = explode(',', $_POST['ids']); | ||
| 97 | |||
| 98 | if (is_array($ids) && !empty($ids)) | ||
| 99 | { | ||
| 100 | foreach ($ids as $id) | ||
| 101 | { | ||
| 102 | $delpost = "DELETE FROM pending WHERE id = " . $id; | ||
| 103 | $delpost2 = mysql_query($delpost); | ||
| 104 | } | ||
| 105 | |||
| 106 | $flashmsg = 'The selected posts have been deleted.'; | ||
| 107 | } | ||
| 108 | } | ||
| 109 | } | ||
| 110 | |||
| 111 | $template = new FITemplate('admin/pending'); | ||
| 112 | |||
| 113 | $getposts = "SELECT * FROM pending ORDER BY id ASC"; | ||
| 114 | $getposts2 = mysql_query($getposts); | ||
| 115 | $i=0; | ||
| 116 | while ($getposts3[$i] = mysql_fetch_array($getposts2)) | ||
| 117 | { | ||
| 118 | $i++; | ||
| 119 | } | ||
| 120 | |||
| 121 | if ($i != 0) | ||
| 122 | { | ||
| 123 | $template->adds_block('AVAIL',array('exi'=>1)); | ||
| 124 | } else { | ||
| 125 | $template->adds_block('NOTAVAIL',array('exi'=>1)); | ||
| 126 | } | ||
| 127 | |||
| 128 | $pager = &Pager::factory(array( 'mode' => 'Sliding', | ||
| 129 | 'perPage' => 20, | ||
| 130 | 'delta' => 2, | ||
| 131 | 'itemData' => $getposts3)); | ||
| 132 | |||
| 133 | $j=0; | ||
| 134 | |||
| 135 | if ($pager->isLastPage()) | ||
| 136 | { | ||
| 137 | foreach (array_reverse($pager->getPageData()) as $post) | ||
| 138 | { | ||
| 139 | if (!empty($post)) | ||
| 140 | { | ||
| 141 | $last = $post; | ||
| 142 | break; | ||
| 143 | } | ||
| 144 | } | ||
| 145 | } | ||
| 146 | |||
| 147 | foreach ($pager->getPageData() as $post) | ||
| 148 | { | ||
| 149 | if (!empty($post)) | ||
| 150 | { | ||
| 151 | $template->add_ref($j, 'POST', array( 'TITLE' => $post['title'], | ||
| 152 | 'AUTHOR' => $post['author'], | ||
| 153 | 'ID' => $post['id'], | ||
| 154 | 'CODED' => $post['slug'], | ||
| 155 | 'ODD' => ($j % 2 ? '' : ' class="odd"'))); | ||
| 156 | |||
| 157 | if ($pager->isFirstPage() && ($j == 0)) | ||
| 158 | { | ||
| 159 | $template->adds_ref_sub($j, 'NOMOVEUP', array('exi'=>1)); | ||
| 160 | } else { | ||
| 161 | $template->adds_ref_sub($j, 'CANMOVEUP', array('exi'=>1)); | ||
| 162 | } | ||
| 163 | |||
| 164 | if ($pager->isLastPage() && ($post == $last)) | ||
| 165 | { | ||
| 166 | $template->adds_ref_sub($j, 'NOMOVEDOWN', array('exi'=>1)); | ||
| 167 | } else { | ||
| 168 | $template->adds_ref_sub($j, 'CANMOVEDOWN', array('exi'=>1)); | ||
| 169 | } | ||
| 170 | } | ||
| 171 | |||
| 172 | $j++; | ||
| 173 | } | ||
| 174 | |||
| 175 | $template->add('PAGEID', $pager->getCurrentPageID()); | ||
| 176 | $template->add('PAGINATION', $pager->links); | ||
| 177 | |||
| 178 | $template->display(); | ||
| 179 | |||
| 180 | ?> | ||
| diff --git a/admin/polls.php b/admin/polls.php new file mode 100644 index 0000000..8e1465c --- /dev/null +++ b/admin/polls.php | |||
| @@ -0,0 +1,98 @@ | |||
| 1 | <?php | ||
| 2 | /* | ||
| 3 | 444444444 | ||
| 4 | 4::::::::4 | ||
| 5 | 4:::::::::4 | ||
| 6 | 4::::44::::4 | ||
| 7 | 4::::4 4::::4 Four Island | ||
| 8 | 4::::4 4::::4 | ||
| 9 | 4::::4 4::::4 Written and maintained by Starla Insigna | ||
| 10 | 4::::444444::::444 | ||
| 11 | 4::::::::::::::::4 admin/polls.php | ||
| 12 | 4444444444:::::444 | ||
| 13 | 4::::4 Please do not use, reproduce or steal the | ||
| 14 | 4::::4 contents of this file without explicit | ||
| 15 | 4::::4 permission from Hatkirby. | ||
| 16 | 44::::::44 | ||
| 17 | 4::::::::4 | ||
| 18 | 4444444444 | ||
| 19 | */ | ||
| 20 | |||
| 21 | if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} | ||
| 22 | |||
| 23 | require('headerproc.php'); | ||
| 24 | require_once('Pager.php'); | ||
| 25 | |||
| 26 | $category = 'polls'; | ||
| 27 | $pageaid = 'polls'; | ||
| 28 | |||
| 29 | if (isset($_GET['action'])) | ||
| 30 | { | ||
| 31 | if ($_GET['action'] == 'delete') | ||
| 32 | { | ||
| 33 | if (is_numeric($_POST['id'])) | ||
| 34 | { | ||
| 35 | $delpoll = "DELETE FROM polloftheweek WHERE id = " . $_POST['id']; | ||
| 36 | $delpoll2 = mysql_query($delpoll); | ||
| 37 | |||
| 38 | $flashmsg = 'The selected poll has been deleted.'; | ||
| 39 | } | ||
| 40 | } else if ($_GET['action'] == 'deletes') | ||
| 41 | { | ||
| 42 | $ids = explode(',', $_POST['ids']); | ||
| 43 | |||
| 44 | if (is_array($ids) && !empty($ids)) | ||
| 45 | { | ||
| 46 | foreach ($ids as $id) | ||
| 47 | { | ||
| 48 | $delpoll = "DELETE FROM polloftheweek WHERE id = " . $id; | ||
| 49 | $delpoll2 = mysql_query($delpoll); | ||
| 50 | } | ||
| 51 | |||
| 52 | $flashmsg = 'The selected polls have been deleted.'; | ||
| 53 | } | ||
| 54 | } | ||
| 55 | } | ||
| 56 | |||
| 57 | $template = new FITemplate('admin/polls'); | ||
| 58 | |||
| 59 | $getposts = "SELECT * FROM polloftheweek ORDER BY id DESC"; | ||
| 60 | $getposts2 = mysql_query($getposts); | ||
| 61 | $i=0; | ||
| 62 | while ($getposts3[$i] = mysql_fetch_array($getposts2)) | ||
| 63 | { | ||
| 64 | $i++; | ||
| 65 | } | ||
| 66 | |||
| 67 | if ($i != 0) | ||
| 68 | { | ||
| 69 | $template->adds_block('AVAIL',array('exi'=>1)); | ||
| 70 | } else { | ||
| 71 | $template->adds_block('NOTAVAIL',array('exi'=>1)); | ||
| 72 | } | ||
| 73 | |||
| 74 | $pager = &Pager::factory(array( 'mode' => 'Sliding', | ||
| 75 | 'perPage' => 20, | ||
| 76 | 'delta' => 2, | ||
| 77 | 'itemData' => $getposts3)); | ||
| 78 | |||
| 79 | $j=0; | ||
| 80 | |||
| 81 | foreach ($pager->getPageData() as $post) | ||
| 82 | { | ||
| 83 | if (!empty($post)) | ||
| 84 | { | ||
| 85 | $template->adds_block('POST', array( 'TITLE' => $post['question'], | ||
| 86 | 'ID' => $post['id'], | ||
| 87 | 'ODD' => ($j % 2 ? '' : ' class="odd"'))); | ||
| 88 | } | ||
| 89 | |||
| 90 | $j++; | ||
| 91 | } | ||
| 92 | |||
| 93 | $template->add('PAGEID', $pager->getCurrentPageID()); | ||
| 94 | $template->add('PAGINATION', $pager->links); | ||
| 95 | |||
| 96 | $template->display(); | ||
| 97 | |||
| 98 | ?> | ||
| diff --git a/admin/posts.php b/admin/posts.php new file mode 100644 index 0000000..ac5b612 --- /dev/null +++ b/admin/posts.php | |||
| @@ -0,0 +1,100 @@ | |||
| 1 | <?php | ||
| 2 | /* | ||
| 3 | 444444444 | ||
| 4 | 4::::::::4 | ||
| 5 | 4:::::::::4 | ||
| 6 | 4::::44::::4 | ||
| 7 | 4::::4 4::::4 Four Island | ||
| 8 | 4::::4 4::::4 | ||
| 9 | 4::::4 4::::4 Written and maintained by Starla Insigna | ||
| 10 | 4::::444444::::444 | ||
| 11 | 4::::::::::::::::4 admin/pages.php | ||
| 12 | 4444444444:::::444 | ||
| 13 | 4::::4 Please do not use, reproduce or steal the | ||
| 14 | 4::::4 contents of this file without explicit | ||
| 15 | 4::::4 permission from Hatkirby. | ||
| 16 | 44::::::44 | ||
| 17 | 4::::::::4 | ||
| 18 | 4444444444 | ||
| 19 | */ | ||
| 20 | |||
| 21 | if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} | ||
| 22 | |||
| 23 | require('headerproc.php'); | ||
| 24 | require_once('Pager.php'); | ||
| 25 | |||
| 26 | $category = 'posts'; | ||
| 27 | $pageaid = 'posts'; | ||
| 28 | |||
| 29 | if (isset($_GET['action'])) | ||
| 30 | { | ||
| 31 | if ($_GET['action'] == 'delete') | ||
| 32 | { | ||
| 33 | if (is_numeric($_POST['id'])) | ||
| 34 | { | ||
| 35 | $delpost = "DELETE FROM updates WHERE id = " . $_POST['id']; | ||
| 36 | $delpost2 = mysql_query($delpost); | ||
| 37 | |||
| 38 | $flashmsg = 'The selected post has been deleted.'; | ||
| 39 | } | ||
| 40 | } else if ($_GET['action'] == 'deletes') | ||
| 41 | { | ||
| 42 | $ids = explode(',', $_POST['ids']); | ||
| 43 | |||
| 44 | if (is_array($ids) && !empty($ids)) | ||
| 45 | { | ||
| 46 | foreach ($ids as $id) | ||
| 47 | { | ||
| 48 | $delpost = "DELETE FROM updates WHERE id = " . $id; | ||
| 49 | $delpost2 = mysql_query($delpost); | ||
| 50 | } | ||
| 51 | |||
| 52 | $flashmsg = 'The selected posts have been deleted.'; | ||
| 53 | } | ||
| 54 | } | ||
| 55 | } | ||
| 56 | |||
| 57 | $template = new FITemplate('admin/posts'); | ||
| 58 | |||
| 59 | $getposts = "SELECT * FROM updates ORDER BY id DESC"; | ||
| 60 | $getposts2 = mysql_query($getposts); | ||
| 61 | $i=0; | ||
| 62 | while ($getposts3[$i] = mysql_fetch_array($getposts2)) | ||
| 63 | { | ||
| 64 | $i++; | ||
| 65 | } | ||
| 66 | |||
| 67 | if ($i != 0) | ||
| 68 | { | ||
| 69 | $template->adds_block('AVAIL',array('exi'=>1)); | ||
| 70 | } else { | ||
| 71 | $template->adds_block('NOTAVAIL',array('exi'=>1)); | ||
| 72 | } | ||
| 73 | |||
| 74 | $pager = &Pager::factory(array( 'mode' => 'Sliding', | ||
| 75 | 'perPage' => 20, | ||
| 76 | 'delta' => 2, | ||
| 77 | 'itemData' => $getposts3)); | ||
| 78 | |||
| 79 | $j=0; | ||
| 80 | |||
| 81 | foreach ($pager->getPageData() as $post) | ||
| 82 | { | ||
| 83 | if (!empty($post)) | ||
| 84 | { | ||
| 85 | $template->adds_block('POST', array( 'TITLE' => $post['title'], | ||
| 86 | 'AUTHOR' => $post['author'], | ||
| 87 | 'ID' => $post['id'], | ||
| 88 | 'CODED' => $post['slug'], | ||
| 89 | 'ODD' => ($j % 2 ? '' : ' class="odd"'))); | ||
| 90 | } | ||
| 91 | |||
| 92 | $j++; | ||
| 93 | } | ||
| 94 | |||
| 95 | $template->add('PAGEID', $pager->getCurrentPageID()); | ||
| 96 | $template->add('PAGINATION', $pager->links); | ||
| 97 | |||
| 98 | $template->display(); | ||
| 99 | |||
| 100 | ?> | ||
| diff --git a/admin/quotes.php b/admin/quotes.php new file mode 100644 index 0000000..e222b39 --- /dev/null +++ b/admin/quotes.php | |||
| @@ -0,0 +1,116 @@ | |||
| 1 | <?php | ||
| 2 | /* | ||
| 3 | 444444444 | ||
| 4 | 4::::::::4 | ||
| 5 | 4:::::::::4 | ||
| 6 | 4::::44::::4 | ||
| 7 | 4::::4 4::::4 Four Island | ||
| 8 | 4::::4 4::::4 | ||
| 9 | 4::::4 4::::4 Written and maintained by Starla Insigna | ||
| 10 | 4::::444444::::444 | ||
| 11 | 4::::::::::::::::4 admin/quotes.php | ||
| 12 | 4444444444:::::444 | ||
| 13 | 4::::4 Please do not use, reproduce or steal the | ||
| 14 | 4::::4 contents of this file without explicit | ||
| 15 | 4::::4 permission from Hatkirby. | ||
| 16 | 44::::::44 | ||
| 17 | 4::::::::4 | ||
| 18 | 4444444444 | ||
| 19 | */ | ||
| 20 | |||
| 21 | if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} | ||
| 22 | |||
| 23 | require('headerproc.php'); | ||
| 24 | require_once('Pager.php'); | ||
| 25 | |||
| 26 | $category = 'quotes'; | ||
| 27 | |||
| 28 | if (isset($_GET['flagged'])) | ||
| 29 | { | ||
| 30 | $pageaid = 'flagged'; | ||
| 31 | } else { | ||
| 32 | $pageaid = 'quotes'; | ||
| 33 | } | ||
| 34 | |||
| 35 | if (isset($_GET['action'])) | ||
| 36 | { | ||
| 37 | if ($_GET['action'] == 'delete') | ||
| 38 | { | ||
| 39 | if (is_numeric($_POST['id'])) | ||
| 40 | { | ||
| 41 | $delpost = "DELETE FROM rash_quotes WHERE id = " . $_POST['id']; | ||
| 42 | $delpost2 = mysql_query($delpost); | ||
| 43 | |||
| 44 | $flashmsg = 'The selected quote has been deleted.'; | ||
| 45 | } | ||
| 46 | } else if ($_GET['action'] == 'deletes') | ||
| 47 | { | ||
| 48 | $ids = explode(',', $_POST['ids']); | ||
| 49 | |||
| 50 | if (is_array($ids) && !empty($ids)) | ||
| 51 | { | ||
| 52 | foreach ($ids as $id) | ||
| 53 | { | ||
| 54 | $delpost = "DELETE FROM rash_quotes WHERE id = " . $id; | ||
| 55 | $delpost2 = mysql_query($delpost); | ||
| 56 | } | ||
| 57 | |||
| 58 | $flashmsg = 'The selected quotes have been deleted.'; | ||
| 59 | } | ||
| 60 | } | ||
| 61 | } | ||
| 62 | |||
| 63 | $template = new FITemplate('admin/quotes'); | ||
| 64 | |||
| 65 | if (isset($_GET['flagged'])) | ||
| 66 | { | ||
| 67 | $template->add('TITLE', 'Manage Flagged Quotes'); | ||
| 68 | $template->add('FLAGGED', 'flagged=&'); | ||
| 69 | |||
| 70 | $getposts = "SELECT * FROM rash_quotes WHERE flag = 1 ORDER BY id DESC"; | ||
| 71 | } else { | ||
| 72 | $template->add('TITLE', 'Manage Quotes'); | ||
| 73 | $template->add('FLAGGED', ''); | ||
| 74 | |||
| 75 | $getposts = "SELECT * FROM rash_quotes ORDER BY id DESC"; | ||
| 76 | } | ||
| 77 | |||
| 78 | $getposts2 = mysql_query($getposts); | ||
| 79 | $i=0; | ||
| 80 | while ($getposts3[$i] = mysql_fetch_array($getposts2)) | ||
| 81 | { | ||
| 82 | $i++; | ||
| 83 | } | ||
| 84 | |||
| 85 | if ($i != 0) | ||
| 86 | { | ||
| 87 | $template->adds_block('AVAIL',array('exi'=>1)); | ||
| 88 | } else { | ||
| 89 | $template->adds_block('NOTAVAIL',array('exi'=>1)); | ||
| 90 | } | ||
| 91 | |||
| 92 | $pager = &Pager::factory(array( 'mode' => 'Sliding', | ||
| 93 | 'perPage' => 20, | ||
| 94 | 'delta' => 2, | ||
| 95 | 'itemData' => $getposts3)); | ||
| 96 | |||
| 97 | $j=0; | ||
| 98 | |||
| 99 | foreach ($pager->getPageData() as $post) | ||
| 100 | { | ||
| 101 | if (!empty($post)) | ||
| 102 | { | ||
| 103 | $template->adds_block('QUOTE', array( 'EXCERPT' => htmlspecialchars(strpos($post['quote'],"\n") !== FALSE ? substr($post['quote'],0,strpos($post['quote'],"\n")) : $post['quote']), | ||
| 104 | 'ID' => $post['id'], | ||
| 105 | 'ODD' => ($j % 2 ? '' : ' class="odd"'))); | ||
| 106 | } | ||
| 107 | |||
| 108 | $j++; | ||
| 109 | } | ||
| 110 | |||
| 111 | $template->add('PAGEID', $pager->getCurrentPageID()); | ||
| 112 | $template->add('PAGINATION', $pager->links); | ||
| 113 | |||
| 114 | $template->display(); | ||
| 115 | |||
| 116 | ?> | ||
| diff --git a/admin/update.php b/admin/update.php new file mode 100644 index 0000000..05d4706 --- /dev/null +++ b/admin/update.php | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | <?php | ||
| 2 | /* | ||
| 3 | 444444444 | ||
| 4 | 4::::::::4 | ||
| 5 | 4:::::::::4 | ||
| 6 | 4::::44::::4 | ||
| 7 | 4::::4 4::::4 Four Island | ||
| 8 | 4::::4 4::::4 | ||
| 9 | 4::::4 4::::4 Written and maintained by Starla Insigna | ||
| 10 | 4::::444444::::444 | ||
| 11 | 4::::::::::::::::4 admin/update.php | ||
| 12 | 4444444444:::::444 | ||
| 13 | 4::::4 Please do not use, reproduce or steal the | ||
| 14 | 4::::4 contents of this file without explicit | ||
| 15 | 4::::4 permission from Hatkirby. | ||
| 16 | 44::::::44 | ||
| 17 | 4::::::::4 | ||
| 18 | 4444444444 | ||
| 19 | */ | ||
| 20 | |||
| 21 | if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} | ||
| 22 | |||
| 23 | require('headerproc.php'); | ||
| 24 | |||
| 25 | $category = 'home'; | ||
| 26 | $pageaid = 'update'; | ||
| 27 | |||
| 28 | if (!isset($_GET['submit'])) | ||
| 29 | { | ||
| 30 | $template = new FITemplate('admin/hgupdate'); | ||
| 31 | $template->display(); | ||
| 32 | } else { | ||
| 33 | system('hg update'); | ||
| 34 | } | ||
| 35 | |||
| 36 | ?> | ||
| diff --git a/admin/welcome.php b/admin/welcome.php new file mode 100644 index 0000000..76b42b1 --- /dev/null +++ b/admin/welcome.php | |||
| @@ -0,0 +1,71 @@ | |||
| 1 | <?php | ||
| 2 | /* | ||
| 3 | 444444444 | ||
| 4 | 4::::::::4 | ||
| 5 | 4:::::::::4 | ||
| 6 | 4::::44::::4 | ||
| 7 | 4::::4 4::::4 Four Island | ||
| 8 | 4::::4 4::::4 | ||
| 9 | 4::::4 4::::4 Written and maintained by Starla Insigna | ||
| 10 | 4::::444444::::444 | ||
| 11 | 4::::::::::::::::4 admin/welcome.php | ||
| 12 | 4444444444:::::444 | ||
| 13 | 4::::4 Please do not use, reproduce or steal the | ||
| 14 | 4::::4 contents of this file without explicit | ||
| 15 | 4::::4 permission from Hatkirby. | ||
| 16 | 44::::::44 | ||
| 17 | 4::::::::4 | ||
| 18 | 4444444444 | ||
| 19 | */ | ||
| 20 | |||
| 21 | if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} | ||
| 22 | |||
| 23 | require('headerproc.php'); | ||
| 24 | |||
| 25 | $category = 'home'; | ||
| 26 | |||
| 27 | $template = new FITemplate('admin/welcome'); | ||
| 28 | |||
| 29 | $cntposts = "SELECT COUNT(*) FROM updates"; | ||
| 30 | $cntposts2 = mysql_query($cntposts); | ||
| 31 | $cntposts3 = mysql_fetch_array($cntposts2); | ||
| 32 | $template->add('POSTS', $cntposts3['COUNT(*)']); | ||
| 33 | |||
| 34 | $cntpending = "SELECT COUNT(*) FROM pending"; | ||
| 35 | $cntpending2 = mysql_query($cntpending); | ||
| 36 | $cntpending3 = mysql_fetch_array($cntpending2); | ||
| 37 | $template->add('PENDING', $cntpending3['COUNT(*)']); | ||
| 38 | |||
| 39 | $cntdrafts = "SELECT COUNT(*) FROM drafts"; | ||
| 40 | $cntdrafts2 = mysql_query($cntdrafts); | ||
| 41 | $cntdrafts3 = mysql_fetch_array($cntdrafts2); | ||
| 42 | $template->add('DRAFTS', $cntdrafts3['COUNT(*)']); | ||
| 43 | |||
| 44 | $cntcomments = "SELECT COUNT(*) FROM moderation"; | ||
| 45 | $cntcomments2 = mysql_query($cntcomments); | ||
| 46 | $cntcomments3 = mysql_fetch_array($cntcomments2); | ||
| 47 | $template->add('COMMENTS', $cntcomments3['COUNT(*)']); | ||
| 48 | |||
| 49 | $cntpolls = "SELECT COUNT(*) FROM polloftheweek"; | ||
| 50 | $cntpolls2 = mysql_query($cntpolls); | ||
| 51 | $cntpolls3 = mysql_fetch_array($cntpolls2); | ||
| 52 | $template->add('POLLS', $cntpolls3['COUNT(*)']); | ||
| 53 | |||
| 54 | $cntquotes = "SELECT COUNT(*) FROM rash_quotes"; | ||
| 55 | $cntquotes2 = mysql_query($cntquotes); | ||
| 56 | $cntquotes3 = mysql_fetch_array($cntquotes2); | ||
| 57 | $template->add('QUOTES', $cntquotes3['COUNT(*)']); | ||
| 58 | |||
| 59 | $cntflagged = "SELECT COUNT(*) FROM rash_quotes WHERE flag = 1"; | ||
| 60 | $cntflagged2 = mysql_query($cntflagged); | ||
| 61 | $cntflagged3 = mysql_fetch_array($cntflagged2); | ||
| 62 | $template->add('FLAGGED', $cntflagged3['COUNT(*)']); | ||
| 63 | |||
| 64 | $cntmodcom = "SELECT COUNT(*) FROM rash_queue"; | ||
| 65 | $cntmodcom2 = mysql_query($cntmodcom); | ||
| 66 | $cntmodcom3 = mysql_fetch_array($cntmodcom2); | ||
| 67 | $template->add('MODCOM', $cntmodcom3['COUNT(*)']); | ||
| 68 | |||
| 69 | $template->display(); | ||
| 70 | |||
| 71 | ?> | ||
| diff --git a/includes/functions.php b/includes/functions.php index 090e9d0..b0b28d5 100755 --- a/includes/functions.php +++ b/includes/functions.php | |||
| @@ -65,7 +65,14 @@ function dispIfNotOld($datTim) | |||
| 65 | function getpercent($getpoll3,$num) | 65 | function getpercent($getpoll3,$num) |
| 66 | { | 66 | { |
| 67 | $maxper = ($getpoll3['clicks1'] + $getpoll3['clicks2'] + $getpoll3['clicks3'] + $getpoll3['clicks4']); | 67 | $maxper = ($getpoll3['clicks1'] + $getpoll3['clicks2'] + $getpoll3['clicks3'] + $getpoll3['clicks4']); |
| 68 | $percent = round(($getpoll3['clicks' . $num] / $maxper) * 100); | 68 | |
| 69 | if ($maxper == 0) | ||
| 70 | { | ||
| 71 | return 0; | ||
| 72 | } else { | ||
| 73 | $percent = round(($getpoll3['clicks' . $num] / $maxper) * 100); | ||
| 74 | } | ||
| 75 | |||
| 69 | return($percent); | 76 | return($percent); |
| 70 | } | 77 | } |
| 71 | 78 | ||
| diff --git a/pages/admin.php b/pages/admin.php deleted file mode 100755 index 326cbdd..0000000 --- a/pages/admin.php +++ /dev/null | |||
| @@ -1,739 +0,0 @@ | |||
| 1 | <?php | ||
| 2 | /* | ||
| 3 | 444444444 | ||
| 4 | 4::::::::4 | ||
| 5 | 4:::::::::4 | ||
| 6 | 4::::44::::4 | ||
| 7 | 4::::4 4::::4 Four Island | ||
| 8 | 4::::4 4::::4 | ||
| 9 | 4::::4 4::::4 Written and maintained by Starla Insigna | ||
| 10 | 4::::444444::::444 | ||
| 11 | 4::::::::::::::::4 pages/admin.php | ||
| 12 | 4444444444:::::444 | ||
| 13 | 4::::4 Please do not use, reproduce or steal the | ||
| 14 | 4::::4 contents of this file without explicit | ||
| 15 | 4::::4 permission from Hatkirby. | ||
| 16 | 44::::::44 | ||
| 17 | 4::::::::4 | ||
| 18 | 4444444444 | ||
| 19 | */ | ||
| 20 | |||
| 21 | if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} | ||
| 22 | |||
| 23 | require('headerproc.php'); | ||
| 24 | |||
| 25 | $pageCategory = 'panel'; | ||
| 26 | |||
| 27 | if (isLoggedIn()) | ||
| 28 | { | ||
| 29 | if (isAdmin()) | ||
| 30 | { | ||
| 31 | if (!isset($_GET['page'])) | ||
| 32 | { | ||
| 33 | $template = new FITemplate('admin/index'); | ||
| 34 | } else if ($_GET['page'] == 'writePost') | ||
| 35 | { | ||
| 36 | if (!isset($_GET['submit'])) | ||
| 37 | { | ||
| 38 | $template = new FITemplate('admin/write'); | ||
| 39 | } else { | ||
| 40 | $tags = explode(',', $_POST['tags']); | ||
| 41 | |||
| 42 | if ($_POST['type'] == 'draft') | ||
| 43 | { | ||
| 44 | $insdraft = "INSERT INTO drafts (title,author,text,slug) VALUES (\"" . mysql_real_escape_string($_POST['title']) . "\",\"" . getSessionUsername() . "\",\"" . mysql_real_escape_string($_POST['text']) . "\",\"" . generateSlug($_POST['title'],'updates') . "\")"; | ||
| 45 | $insdraft2 = mysql_query($insdraft); | ||
| 46 | |||
| 47 | $id = mysql_insert_id(); | ||
| 48 | addTags($id, $tags, 'draft'); | ||
| 49 | |||
| 50 | $template = new FITemplate('admin/draftSuccess'); | ||
| 51 | $template->add('ID', $id); | ||
| 52 | } else if ($_POST['type'] == 'instant') | ||
| 53 | { | ||
| 54 | $id = postBlogPost($_POST['title'], getSessionUsername(), $tags, $_POST['text']); | ||
| 55 | |||
| 56 | $getpost = "SELECT * FROM updates WHERE id = " . $id; | ||
| 57 | $getpost2 = mysql_query($getpost); | ||
| 58 | $getpost3 = mysql_fetch_array($getpost2); | ||
| 59 | |||
| 60 | $template = new FITemplate('admin/postSuccess'); | ||
| 61 | $template->add('ID', $id); | ||
| 62 | $template->add('CODED', $getpost3['slug']); | ||
| 63 | } else { | ||
| 64 | if ($_POST['type'] == 'normal') | ||
| 65 | { | ||
| 66 | $getpending = "SELECT * FROM pending ORDER BY id DESC LIMIT 0,1"; | ||
| 67 | $getpending2 = mysql_query($getpending); | ||
| 68 | $getpending3 = mysql_fetch_array($getpending2); | ||
| 69 | if (isset($getpending3['id']) === FALSE) | ||
| 70 | { | ||
| 71 | $id = 50; | ||
| 72 | } else { | ||
| 73 | $id = $getpending3['id']+1; | ||
| 74 | } | ||
| 75 | } else if ($_POST['type'] == 'priority') | ||
| 76 | { | ||
| 77 | $getpending = "SELECT * FROM pending ORDER BY id ASC LIMIT 0,1"; | ||
| 78 | $getpending2 = mysql_query($getpending); | ||
| 79 | $getpending3 = mysql_fetch_array($getpending2); | ||
| 80 | if (isset($getpending3['id']) === FALSE) | ||
| 81 | { | ||
| 82 | $id = 50; | ||
| 83 | } else { | ||
| 84 | $id = $getpending3['id']-1; | ||
| 85 | } | ||
| 86 | } else { | ||
| 87 | generateError(404); | ||
| 88 | } | ||
| 89 | |||
| 90 | $inspending = "INSERT INTO pending (id,title,author,text,slug) VALUES (" . $id . ",\"" . mysql_real_escape_string($_POST['title']) . "\",\"" . getSessionUsername() . "\",\"" . mysql_real_escape_string($_POST['text']) . "\",\"" . generateSlug($_POST['title'],'updates') . "\")"; | ||
| 91 | $inspending2 = mysql_query($inspending); | ||
| 92 | |||
| 93 | addTags($id, $tags, 'pending'); | ||
| 94 | |||
| 95 | $template = new FITemplate('admin/pendingSuccess'); | ||
| 96 | $template->add('ID', $id); | ||
| 97 | } | ||
| 98 | } | ||
| 99 | } else if ($_GET['page'] == 'manageDrafts') | ||
| 100 | { | ||
| 101 | $template = new FITemplate('admin/manageDrafts'); | ||
| 102 | |||
| 103 | $getdrafts = "SELECT * FROM drafts ORDER BY id ASC"; | ||
| 104 | $getdrafts2 = mysql_query($getdrafts); | ||
| 105 | $i=0; | ||
| 106 | while ($getdrafts3[$i] = mysql_fetch_array($getdrafts2)) | ||
| 107 | { | ||
| 108 | $template->adds_block('DRAFT', array( 'TITLE' => $getdrafts3[$i]['title'], | ||
| 109 | 'AUTHOR' => $getdrafts3[$i]['author'], | ||
| 110 | 'ID' => $getdrafts3[$i]['id'])); | ||
| 111 | $i++; | ||
| 112 | } | ||
| 113 | } else if ($_GET['page'] == 'editDraft') | ||
| 114 | { | ||
| 115 | $getdraft = "SELECT * FROM drafts WHERE id = " . $_GET['id']; | ||
| 116 | $getdraft2 = mysql_query($getdraft); | ||
| 117 | $getdraft3 = mysql_fetch_array($getdraft2); | ||
| 118 | |||
| 119 | if ($getdraft3['id'] == $_GET['id']) | ||
| 120 | { | ||
| 121 | if (!isset($_GET['submit'])) | ||
| 122 | { | ||
| 123 | $template = new FITemplate('admin/editDraft'); | ||
| 124 | $template->add('ID', $_GET['id']); | ||
| 125 | $template->add('TEXT', $getdraft3['text']); | ||
| 126 | $template->add('TAGS', implode(',', getTags($getdraft3['id'], 'draft'))); | ||
| 127 | $template->add('TITLE', $getdraft3['title']); | ||
| 128 | } else { | ||
| 129 | $tags = explode(',', $_POST['tags']); | ||
| 130 | removeTags($_GET['id'], 'draft'); | ||
| 131 | |||
| 132 | if ($_POST['type'] == 'draft') | ||
| 133 | { | ||
| 134 | $setdraft = "UPDATE drafts SET title = \"" . mysql_real_escape_string($_POST['title']) . "\", text = \"" . mysql_real_escape_string($_POST['text']) . "\" WHERE id = " . $_GET['id']; | ||
| 135 | $setdraft2 = mysql_query($setdraft); | ||
| 136 | |||
| 137 | addTags($_GET['id'], $tags, 'draft'); | ||
| 138 | |||
| 139 | $template = new FITemplate('admin/draftSuccess'); | ||
| 140 | $template->add('ID', $_GET['id']); | ||
| 141 | } else if ($_POST['type'] == 'instant') | ||
| 142 | { | ||
| 143 | $id = postBlogPost($_POST['title'], getSessionUsername(), $tags, $_POST['text']); | ||
| 144 | |||
| 145 | $deldraft = "DELETE FROM drafts WHERE id = " . $_GET['id']; | ||
| 146 | $deldraft2 = mysql_query($deldraft); | ||
| 147 | |||
| 148 | $getpost = "SELECT * FROM updates WHERE id = " . $id; | ||
| 149 | $getpost2 = mysql_query($getpost); | ||
| 150 | $getpost3 = mysql_fetch_array($getpost2); | ||
| 151 | |||
| 152 | $template = new FITemplate('admin/postSuccess'); | ||
| 153 | $template->add('ID', $id); | ||
| 154 | $template->add('CODED', $getpost3['slug']); | ||
| 155 | } else { | ||
| 156 | if ($_POST['type'] == 'normal') | ||
| 157 | { | ||
| 158 | $getpending = "SELECT * FROM pending ORDER BY id DESC LIMIT 0,1"; | ||
| 159 | $getpending2 = mysql_query($getpending); | ||
| 160 | $getpending3 = mysql_fetch_array($getpending2); | ||
| 161 | if (isset($getpending3['id']) === FALSE) | ||
| 162 | { | ||
| 163 | $id = 50; | ||
| 164 | } else { | ||
| 165 | $id = $getpending3['id']+1; | ||
| 166 | } | ||
| 167 | } else if ($_POST['type'] == 'priority') | ||
| 168 | { | ||
| 169 | $getpending = "SELECT * FROM pending ORDER BY id ASC LIMIT 0,1"; | ||
| 170 | $getpending2 = mysql_query($getpending); | ||
| 171 | $getpending3 = mysql_fetch_array($getpending2); | ||
| 172 | if (isset($getpending3['id']) === FALSE) | ||
| 173 | { | ||
| 174 | $id = 50; | ||
| 175 | } else { | ||
| 176 | $id = $getpending3['id']-1; | ||
| 177 | } | ||
| 178 | } else { | ||
| 179 | generateError(404); | ||
| 180 | } | ||
| 181 | |||
| 182 | $inspending = "INSERT INTO pending (id,title,author,text,slug) VALUES (" . $id . ",\"" . mysql_real_escape_string($_POST['title']) . "\",\"" . getSessionUsername() . "\",\"" . mysql_real_escape_string($_POST['text']) . "\",\"" . generateSlug($_POST['title'],'updates') . "\")"; | ||
| 183 | $inspending2 = mysql_query($inspending); | ||
| 184 | |||
| 185 | addTags($id, $tags, 'pending'); | ||
| 186 | |||
| 187 | $deldraft = "DELETE FROM drafts WHERE id = " . $_GET['id']; | ||
| 188 | $deldraft2 = mysql_query($deldraft); | ||
| 189 | |||
| 190 | $template = new FITemplate('admin/pendingSuccess'); | ||
| 191 | $template->add('ID', $id); | ||
| 192 | } | ||
| 193 | } | ||
| 194 | } else { | ||
| 195 | $template = new FITemplate('msg'); | ||
| 196 | $template->add('BACK', 'the previous page'); | ||
| 197 | $template->add('MSG', 'I\'m sorry, that draft doesn\'t exist.'); | ||
| 198 | } | ||
| 199 | } else if ($_GET['page'] == 'deleteDraft') | ||
| 200 | { | ||
| 201 | $getdraft = "SELECT * FROM drafts WHERE id = " . $_GET['id']; | ||
| 202 | $getdraft2 = mysql_query($getdraft); | ||
| 203 | $getdraft3 = mysql_fetch_array($getdraft2); | ||
| 204 | |||
| 205 | if ($getdraft3['id'] == $_GET['id']) | ||
| 206 | { | ||
| 207 | if (!isset($_GET['submit'])) | ||
| 208 | { | ||
| 209 | $template = new FITemplate('admin/deleteDraft'); | ||
| 210 | $template->add('ID', $_GET['id']); | ||
| 211 | } else { | ||
| 212 | $deldraft = "DELETE FROM drafts WHERE id = " . $_GET['id']; | ||
| 213 | $deldraft2 = mysql_query($deldraft); | ||
| 214 | |||
| 215 | removeTags($_GET['id'], 'draft'); | ||
| 216 | |||
| 217 | $template = new FITemplate('admin/deletedDraft'); | ||
| 218 | } | ||
| 219 | } else { | ||
| 220 | $template = new FITemplate('msg'); | ||
| 221 | $template->add('BACK', 'the previous page'); | ||
| 222 | $template->add('MSG', 'I\'m sorry, that draft doesn\'t exist.'); | ||
| 223 | } | ||
| 224 | } else if ($_GET['page'] == 'viewDraft') | ||
| 225 | { | ||
| 226 | $getdraft = "SELECT * FROM drafts WHERE id = " . $_GET['id']; | ||
| 227 | $getdraft2 = mysql_query($getdraft); | ||
| 228 | $getdraft3 = mysql_fetch_array($getdraft2); | ||
| 229 | |||
| 230 | if ($getdraft3['id'] == $_GET['id']) | ||
| 231 | { | ||
| 232 | $template = new FITemplate('post'); | ||
| 233 | $template->adds_block('INTERNAL',array('exi'=>1)); | ||
| 234 | $template->add_ref(0, 'POST', array( 'ID' => $getdraft3['id'], | ||
| 235 | 'YEARID' => ((date('Y')-2006) % 4), | ||
| 236 | 'DATE' => date('F jS Y \a\\t g:i:s a'), | ||
| 237 | 'MONTH' => date('M'), | ||
| 238 | 'DAY' => date('d'), | ||
| 239 | 'CODED' => $getdraft3['slug'], | ||
| 240 | 'TITLE' => $getdraft3['title'], | ||
| 241 | 'AUTHOR' => $getdraft3['author'], | ||
| 242 | 'RATING' => 0, | ||
| 243 | 'TEXT' => parseText($getdraft3['text']))); | ||
| 244 | |||
| 245 | $tags = getTags($getdraft3['id'], 'draft'); | ||
| 246 | foreach ($tags as $tag) | ||
| 247 | { | ||
| 248 | $template->adds_ref_sub(0, 'TAGS', array('TAG' => $tag)); | ||
| 249 | } | ||
| 250 | } else { | ||
| 251 | $template = new FITemplate('msg'); | ||
| 252 | $template->add('BACK', 'the previous page'); | ||
| 253 | $template->add('MSG', 'I\'m sorry, that draft doesn\'t exist.'); | ||
| 254 | } | ||
| 255 | } else if ($_GET['page'] == 'managePending') | ||
| 256 | { | ||
| 257 | $template = new FITemplate('admin/managePending'); | ||
| 258 | |||
| 259 | $getpending = "SELECT * FROM pending ORDER BY id ASC"; | ||
| 260 | $getpending2 = mysql_query($getpending); | ||
| 261 | $i=0; | ||
| 262 | while ($getpending3[$i] = mysql_fetch_array($getpending2)) | ||
| 263 | { | ||
| 264 | $template->adds_block('PENDING', array( 'TITLE' => $getpending3[$i]['title'], | ||
| 265 | 'AUTHOR' => $getpending3[$i]['author'], | ||
| 266 | 'ID' => $getpending3[$i]['id'])); | ||
| 267 | $i++; | ||
| 268 | } | ||
| 269 | } else if ($_GET['page'] == 'editPending') | ||
| 270 | { | ||
| 271 | $getpending = "SELECT * FROM pending WHERE id = " . $_GET['id']; | ||
| 272 | $getpending2 = mysql_query($getpending); | ||
| 273 | $getpending3 = mysql_fetch_array($getpending2); | ||
| 274 | |||
| 275 | if ($getpending3['id'] == $_GET['id']) | ||
| 276 | { | ||
| 277 | if (!isset($_GET['submit'])) | ||
| 278 | { | ||
| 279 | $template = new FITemplate('admin/editPending'); | ||
| 280 | $template->add('ID', $_GET['id']); | ||
| 281 | $template->add('TEXT', $getpending3['text']); | ||
| 282 | $template->add('TAGS', implode(',', getTags($getpending3['id'], 'pending'))); | ||
| 283 | $template->add('TITLE', $getpending3['title']); | ||
| 284 | } else { | ||
| 285 | $tags = explode(',', $_POST['tags']); | ||
| 286 | |||
| 287 | $setpending = "UPDATE pending SET title = \"" . mysql_real_escape_string($_POST['title']) . "\", text = \"" . mysql_real_escape_string($_POST['text']) . "\" WHERE id = " . $_GET['id']; | ||
| 288 | $setpending2 = mysql_query($setpending); | ||
| 289 | |||
| 290 | removeTags($_GET['id'], 'pending'); | ||
| 291 | addTags($_GET['id'], $tags, 'pending'); | ||
| 292 | |||
| 293 | $template = new FITemplate('admin/pendingSuccess'); | ||
| 294 | $template->add('ID', $_GET['id']); | ||
| 295 | } | ||
| 296 | } else { | ||
| 297 | $template = new FITemplate('msg'); | ||
| 298 | $template->add('BACK', 'the previous page'); | ||
| 299 | $template->add('MSG', 'I\'m sorry, that pending post doesn\'t exist.'); | ||
| 300 | } | ||
| 301 | } else if ($_GET['page'] == 'deletePending') | ||
| 302 | { | ||
| 303 | $getpending = "SELECT * FROM pending WHERE id = " . $_GET['id']; | ||
| 304 | $getpending2 = mysql_query($getpending); | ||
| 305 | $getpending3 = mysql_fetch_array($getpending2); | ||
| 306 | |||
| 307 | if ($getpending3['id'] == $_GET['id']) | ||
| 308 | { | ||
| 309 | if (!isset($_GET['submit'])) | ||
| 310 | { | ||
| 311 | $template = new FITemplate('admin/deletePending'); | ||
| 312 | $template->add('ID', $_GET['id']); | ||
| 313 | } else { | ||
| 314 | $delpending = "DELETE FROM pending WHERE id = " . $_GET['id']; | ||
| 315 | $delpending2 = mysql_query($delpending); | ||
| 316 | |||
| 317 | removeTags($_GET['id'], 'pending'); | ||
| 318 | |||
| 319 | $template = new FITemplate('admin/deletedPending'); | ||
| 320 | } | ||
| 321 | } else { | ||
| 322 | $template = new FITemplate('msg'); | ||
| 323 | $template->add('BACK', 'the previous page'); | ||
| 324 | $template->add('MSG', 'I\'m sorry, that pending post doesn\'t exist.'); | ||
| 325 | } | ||
| 326 | } else if ($_GET['page'] == 'viewPending') | ||
| 327 | { | ||
| 328 | $getpending = "SELECT * FROM pending WHERE id = " . $_GET['id']; | ||
| 329 | $getpending2 = mysql_query($getpending); | ||
| 330 | $getpending3 = mysql_fetch_array($getpending2); | ||
| 331 | |||
| 332 | if ($getpending3['id'] == $_GET['id']) | ||
| 333 | { | ||
| 334 | $template = new FITemplate('post'); | ||
| 335 | $template->adds_block('INTERNAL',array('exi'=>1)); | ||
| 336 | $template->add_ref(0, 'POST', array( 'ID' => $getpending3['id'], | ||
| 337 | 'YEARID' => ((date('Y')-2006) % 4), | ||
| 338 | 'DATE' => date('F jS Y \a\\t g:i:s a'), | ||
| 339 | 'MONTH' => date('M'), | ||
| 340 | 'DAY' => date('d'), | ||
| 341 | 'CODED' => $getpending3['slug'], | ||
| 342 | 'TITLE' => $getpending3['title'], | ||
| 343 | 'AUTHOR' => $getpending3['author'], | ||
| 344 | 'RATING' => 0, | ||
| 345 | 'TEXT' => parseText($getpending3['text']))); | ||
| 346 | |||
| 347 | $tags = getTags($getpending3['id'], 'pending'); | ||
| 348 | foreach ($tags as $tag) | ||
| 349 | { | ||
| 350 | $template->adds_ref_sub(0, 'TAGS', array('TAG' => $tag)); | ||
| 351 | } | ||
| 352 | } else { | ||
| 353 | $template = new FITemplate('msg'); | ||
| 354 | $template->add('BACK', 'the previous page'); | ||
| 355 | $template->add('MSG', 'I\'m sorry, that pending post doesn\'t exist.'); | ||
| 356 | } | ||
| 357 | } else if ($_GET['page'] == 'movePending') | ||
| 358 | { | ||
| 359 | $getpending = "SELECT * FROM pending WHERE id = " . $_GET['id']; | ||
| 360 | $getpending2 = mysql_query($getpending); | ||
| 361 | $getpending3 = mysql_fetch_array($getpending2); | ||
| 362 | |||
| 363 | if ($getpending3['id'] == $_GET['id']) | ||
| 364 | { | ||
| 365 | if ($_GET['dir'] == 'up') | ||
| 366 | { | ||
| 367 | $get2pending = "SELECT * FROM pending WHERE id < " . $_GET['id'] . " ORDER BY id DESC LIMIT 0,1"; | ||
| 368 | $get2pending2 = mysql_query($get2pending); | ||
| 369 | $get2pending3 = mysql_fetch_array($get2pending2); | ||
| 370 | |||
| 371 | if (isset($get2pending3['id'])) | ||
| 372 | { | ||
| 373 | $otherPending = $get2pending3; | ||
| 374 | } else { | ||
| 375 | $template = new FITemplate('msg2'); | ||
| 376 | $template->add('BACK', 'Back to the pending queue'); | ||
| 377 | $template->add('LINK', 'managePending.php'); | ||
| 378 | $template->add('MSG', 'I\'m sorry, that pending post is already the first.'); | ||
| 379 | } | ||
| 380 | } else if ($_GET['dir'] == 'down') | ||
| 381 | { | ||
| 382 | $get2pending = "SELECT * FROM pending WHERE id > " . $_GET['id'] . " ORDER BY id ASC LIMIT 0,1"; | ||
| 383 | $get2pending2 = mysql_query($get2pending); | ||
| 384 | $get2pending3 = mysql_fetch_array($get2pending2); | ||
| 385 | |||
| 386 | if (isset($get2pending3['id'])) | ||
| 387 | { | ||
| 388 | $otherPending = $get2pending3; | ||
| 389 | } else { | ||
| 390 | $template = new FITemplate('msg2'); | ||
| 391 | $template->add('BACK', 'Back to the pending queue'); | ||
| 392 | $template->add('LINK', 'managePending.php'); | ||
| 393 | $template->add('MSG', 'I\'m sorry, that pending post is already the last.'); | ||
| 394 | } | ||
| 395 | } | ||
| 396 | |||
| 397 | if (isset($otherPending)) | ||
| 398 | { | ||
| 399 | $delpending = "DELETE FROM pending WHERE id = " . $_GET['id'] . " OR id = " . $otherPending['id']; | ||
| 400 | $delpending2 = mysql_query($delpending); | ||
| 401 | |||
| 402 | $inspending = "INSERT INTO pending (id, title, author, text, slug) VALUES (" . $_GET['id'] . ",\"" . $otherPending['title'] . "\",\"" . $otherPending['author'] . "\",\"" . mysql_real_escape_string($otherPending['text']) . "\",\"" . $otherPending['slug'] . "\")"; | ||
| 403 | $inspending2 = mysql_query($inspending); | ||
| 404 | |||
| 405 | $ins2pending = "INSERT INTO pending (id, title, author, text, slug) VALUES (" . $otherPending['id'] . ",\"" . $getpending3['title'] . "\",\"" . $getpending3['author'] . "\",\"" . mysql_real_escape_string($getpending3['text']) . "\",\"" . $getpending3['slug'] . "\")"; | ||
| 406 | $ins2pending2 = mysql_query($ins2pending) or die($ins2pending); | ||
| 407 | |||
| 408 | $tags1 = getTags($_GET['id'], 'pending'); | ||
| 409 | $tags2 = getTags($otherPending['id'], 'pending'); | ||
| 410 | removeTags($_GET['id'], 'pending'); | ||
| 411 | removeTags($otherPending['id'], 'pending'); | ||
| 412 | addTags($_GET['id'], $tags2, 'pending'); | ||
| 413 | addTags($otherPending['id'], $tags1, 'pending'); | ||
| 414 | |||
| 415 | header('Location: managePending.php'); | ||
| 416 | exit; | ||
| 417 | } | ||
| 418 | } else { | ||
| 419 | $template = new FITemplate('msg2'); | ||
| 420 | $template->add('BACK', 'Back to the pending queue'); | ||
| 421 | $template->add('LINK', 'managePending.php'); | ||
| 422 | $template->add('MSG', 'I\'m sorry, that pending post doesn\'t exist.'); | ||
| 423 | } | ||
| 424 | } else if ($_GET['page'] == 'managePosts') | ||
| 425 | { | ||
| 426 | $template = new FITemplate('admin/managePosts'); | ||
| 427 | |||
| 428 | $getposts = "SELECT * FROM updates ORDER BY id ASC"; | ||
| 429 | $getposts2 = mysql_query($getposts); | ||
| 430 | $i=0; | ||
| 431 | while ($getposts3[$i] = mysql_fetch_array($getposts2)) | ||
| 432 | { | ||
| 433 | $template->adds_block('POST', array( 'TITLE' => $getposts3[$i]['title'], | ||
| 434 | 'AUTHOR' => $getposts3[$i]['author'], | ||
| 435 | 'ID' => $getposts3[$i]['id'], | ||
| 436 | 'CODED' => $getposts3[$i]['slug'])); | ||
| 437 | $i++; | ||
| 438 | } | ||
| 439 | } else if ($_GET['page'] == 'editPost') | ||
| 440 | { | ||
| 441 | $getpost = "SELECT * FROM updates WHERE id = " . $_GET['id']; | ||
| 442 | $getpost2 = mysql_query($getpost); | ||
| 443 | $getpost3 = mysql_fetch_array($getpost2); | ||
| 444 | |||
| 445 | if ($getpost3['id'] == $_GET['id']) | ||
| 446 | { | ||
| 447 | if (!isset($_GET['submit'])) | ||
| 448 | { | ||
| 449 | $template = new FITemplate('admin/editPost'); | ||
| 450 | $template->add('ID', $_GET['id']); | ||
| 451 | $template->add('TEXT', $getpost3['text']); | ||
| 452 | $template->add('TAGS', implode(',', getTags($getpost3['id']))); | ||
| 453 | $template->add('TITLE', $getpost3['title']); | ||
| 454 | } else { | ||
| 455 | $tags = explode(',', $_POST['tags']); | ||
| 456 | |||
| 457 | $setpost = "UPDATE updates SET title = \"" . mysql_real_escape_string($_POST['title']) . "\", text = \"" . mysql_real_escape_string($_POST['text']) . "\" WHERE id = " . $_GET['id']; | ||
| 458 | $setpost2 = mysql_query($setpost); | ||
| 459 | |||
| 460 | removeTags($_GET['id']); | ||
| 461 | addTags($_GET['id'], $tags); | ||
| 462 | |||
| 463 | $template = new FITemplate('admin/postSuccess'); | ||
| 464 | $template->add('ID', $_GET['id']); | ||
| 465 | $template->add('CODED', $getpost3['slug']); | ||
| 466 | } | ||
| 467 | } else { | ||
| 468 | $template = new FITemplate('msg'); | ||
| 469 | $template->add('BACK', 'the previous page'); | ||
| 470 | $template->add('MSG', 'I\'m sorry, that post doesn\'t exist.'); | ||
| 471 | } | ||
| 472 | } else if ($_GET['page'] == 'deletePost') | ||
| 473 | { | ||
| 474 | $getpost = "SELECT * FROM updates WHERE id = " . $_GET['id']; | ||
| 475 | $getpost2 = mysql_query($getpost); | ||
| 476 | $getpost3 = mysql_fetch_array($getpost2); | ||
| 477 | |||
| 478 | if ($getpost3['id'] == $_GET['id']) | ||
| 479 | { | ||
| 480 | if (!isset($_GET['submit'])) | ||
| 481 | { | ||
| 482 | $template = new FITemplate('admin/deletePost'); | ||
| 483 | $template->add('ID', $_GET['id']); | ||
| 484 | } else { | ||
| 485 | $delpost = "DELETE FROM updates WHERE id = " . $_GET['id']; | ||
| 486 | $delpost2 = mysql_query($delpost); | ||
| 487 | |||
| 488 | removeTags($_GET['id']); | ||
| 489 | |||
| 490 | $template = new FITemplate('admin/deletedPost'); | ||
| 491 | } | ||
| 492 | } else { | ||
| 493 | $template = new FITemplate('msg'); | ||
| 494 | $template->add('BACK', 'the previous page'); | ||
| 495 | $template->add('MSG', 'I\'m sorry, that post doesn\'t exist.'); | ||
| 496 | } | ||
| 497 | } else if ($_GET['page'] == 'moderateComments') | ||
| 498 | { | ||
| 499 | $template = new FITemplate('admin/moderateComments'); | ||
| 500 | |||
| 501 | $getcomments = "SELECT * FROM moderation ORDER BY id ASC"; | ||
| 502 | $getcomments2 = mysql_query($getcomments); | ||
| 503 | $i=0; | ||
| 504 | while ($getcomments3[$i] = mysql_fetch_array($getcomments2)) | ||
| 505 | { | ||
| 506 | $comType = substr($getcomments3[$i]['page_id'],0,strpos($getcomments3[$i]['page_id'],'-')); | ||
| 507 | $comID = substr($getcomments3[$i]['page_id'],strpos($getcomments3[$i]['page_id'],'-')+1); | ||
| 508 | |||
| 509 | if ($comType == 'updates') | ||
| 510 | { | ||
| 511 | $getpost = "SELECT * FROM updates WHERE id = " . $comID; | ||
| 512 | $getpost2 = mysql_query($getpost); | ||
| 513 | $getpost3 = mysql_fetch_array($getpost2); | ||
| 514 | $title = $getpost3['title']; | ||
| 515 | } else if ($comType = 'polloftheweek') | ||
| 516 | { | ||
| 517 | $getpoll = "SELECT * FROM polloftheweek WHERE id = " . $comID; | ||
| 518 | $getpoll2 = mysql_query($getpoll); | ||
| 519 | $getpoll3 = mysql_fetch_array($getpoll2); | ||
| 520 | $title = $getpoll3['question']; | ||
| 521 | } else if ($comType = 'quotes') | ||
| 522 | { | ||
| 523 | $getquote = "SELECT * FROM rash_quotes WHERE id = " . $comID; | ||
| 524 | $getquote2 = mysql_query($getquote); | ||
| 525 | $getquote3 = mysql_fetch_array($getquote2); | ||
| 526 | $title = '#' . $getquote3['id']; | ||
| 527 | } | ||
| 528 | |||
| 529 | $template->adds_block('COMMENT', array( 'TITLE' => $title, | ||
| 530 | 'AUTHOR' => $getcomments3[$i]['author'], | ||
| 531 | 'ID' => $getcomments3[$i]['id'])); | ||
| 532 | $i++; | ||
| 533 | } | ||
| 534 | } else if ($_GET['page'] == 'viewComment') | ||
| 535 | { | ||
| 536 | $getcomment = "SELECT * FROM moderation WHERE id = " . $_GET['id']; | ||
| 537 | $getcomment2 = mysql_query($getcomment); | ||
| 538 | $getcomment3 = mysql_fetch_array($getcomment2); | ||
| 539 | |||
| 540 | if ($getcomment3['id'] == $_GET['id']) | ||
| 541 | { | ||
| 542 | $template = new FITemplate('admin/viewComment'); | ||
| 543 | $template->add('ID', $_GET['id']); | ||
| 544 | $template->add('USERNAME', $getcomment3['author']); | ||
| 545 | $template->add('CODEDEMAIL', md5(strtolower($getcomment3['email']))); | ||
| 546 | $template->add('TEXT', parseText($getcomment3['comment'])); | ||
| 547 | $template->add('DATE', date("F jS Y \a\\t g:i:s a",strtotime($getcomment3['pubDate']))); | ||
| 548 | } else { | ||
| 549 | $template = new FITemplate('msg'); | ||
| 550 | $template->add('BACK', 'the previous page'); | ||
| 551 | $template->add('MSG', 'I\'m sorry, that comment doesn\'t exist.'); | ||
| 552 | } | ||
| 553 | } else if ($_GET['page'] == 'actionComment') | ||
| 554 | { | ||
| 555 | $getcomment = "SELECT * FROM moderation WHERE id = " . $_GET['id']; | ||
| 556 | $getcomment2 = mysql_query($getcomment); | ||
| 557 | $getcomment3 = mysql_fetch_array($getcomment2); | ||
| 558 | |||
| 559 | if ($getcomment3['id'] == $_GET['id']) | ||
| 560 | { | ||
| 561 | if (isset($_GET['approve'])) | ||
| 562 | { | ||
| 563 | $insanon = "INSERT INTO anon_commenters (username,email,website) VALUES (\"" . $getcomment3['author'] . "\",\"" . $getcomment3['email'] . "\",\"" . $getcomment3['website'] . "\")"; | ||
| 564 | $insanon2 = mysql_query($insanon); | ||
| 565 | |||
| 566 | $inscomment = "INSERT INTO comments (page_id,user_id,comment,is_anon) VALUES (\"" . $getcomment3['page_id'] . "\"," . mysql_insert_id() . ",\"" . $getcomment3['comment'] . "\",1)"; | ||
| 567 | $inscomment2 = mysql_query($inscomment); | ||
| 568 | |||
| 569 | $delcomment = "DELETE FROM moderation WHERE id = " . $getcomment3['id']; | ||
| 570 | $delcomment2 = mysql_query($delcomment); | ||
| 571 | |||
| 572 | $template = new FITemplate('msg'); | ||
| 573 | $template->add('BACK', 'Comment Moderation'); | ||
| 574 | $template->add('MSG', 'You\'ve successfully approved this comment.'); | ||
| 575 | } else if (isset($_GET['deny'])) | ||
| 576 | { | ||
| 577 | $delcomment = "DELETE FROM moderation WHERE id = " . $getcomment3['id']; | ||
| 578 | $delcomment2 = mysql_query($delcomment); | ||
| 579 | |||
| 580 | $template = new FITemplate('msg'); | ||
| 581 | $template->add('BACK', 'Comment Moderation'); | ||
| 582 | $template->add('MSG', 'You\'ve successfully denied this comment.'); | ||
| 583 | } else { | ||
| 584 | $template = new FITemplate('msg'); | ||
| 585 | $template->add('BACK', 'the previous page'); | ||
| 586 | $template->add('MSG', "Um, what on earth are you doing?"); | ||
| 587 | } | ||
| 588 | } else { | ||
| 589 | $template = new FITemplate('msg'); | ||
| 590 | $template->add('BACK', 'the previous page'); | ||
| 591 | $template->add('MSG', 'I\'m sorry, that comment doesn\'t exist.'); | ||
| 592 | } | ||
| 593 | } else if ($_GET['page'] == 'pollProcess') | ||
| 594 | { | ||
| 595 | if (!isset($_GET['step'])) | ||
| 596 | { | ||
| 597 | $template = new FITemplate('admin/pollrss'); | ||
| 598 | } else if ($_GET['step'] == 2) | ||
| 599 | { | ||
| 600 | $insrss = "INSERT INTO pollrss (author,rss) VALUES (\"" . getSessionUsername() . "\",\"" . mysql_real_escape_string($_POST['text']) . "\")"; | ||
| 601 | $insrss2 = mysql_query($insrss); | ||
| 602 | |||
| 603 | $template = new FITemplate('admin/newPoll'); | ||
| 604 | } else if ($_GET['step'] == 3) | ||
| 605 | { | ||
| 606 | $inspoll = "INSERT INTO polloftheweek (question,option1,option2,option3,option4) VALUES (\"" . mysql_real_escape_string($_POST['question']) . "\",\"" . $_POST['option1'] . "\",\"" . $_POST['option2'] . "\",\"" . $_POST['option3'] . "\",\"" . $_POST['option4'] . "\")"; | ||
| 607 | $inspoll2 = mysql_query($inspoll); | ||
| 608 | |||
| 609 | $cleardid = "TRUNCATE TABLE didpollalready"; | ||
| 610 | $cleardid2 = mysql_query($cleardid); | ||
| 611 | |||
| 612 | $template = new FITemplate('msg2'); | ||
| 613 | $template->add('BACK', 'Back to the Admin Panel'); | ||
| 614 | $template->add('LINK', '/admin/'); | ||
| 615 | $template->add('MSG', "You've successfully created a poll!"); | ||
| 616 | } else { | ||
| 617 | $template = new FITemplate('msg'); | ||
| 618 | $template->add('BACK', 'the previous page'); | ||
| 619 | $template->add('MSG', "Um, what on earth are you doing?"); | ||
| 620 | } | ||
| 621 | } else if ($_GET['page'] == 'managePendingQuotes') | ||
| 622 | { | ||
| 623 | $template = new FITemplate('admin/managePendingQuotes'); | ||
| 624 | |||
| 625 | $getpending = "SELECT * FROM rash_queue ORDER BY id ASC"; | ||
| 626 | $getpending2 = mysql_query($getpending); | ||
| 627 | $i=0; | ||
| 628 | while ($getpending3[$i] = mysql_fetch_array($getpending2)) | ||
| 629 | { | ||
| 630 | if ($i % 2 == 1) | ||
| 631 | { | ||
| 632 | $template->adds_block('QUOTE', array( 'ID' => $getpending3[$i]['id'], | ||
| 633 | 'TEXT' => nl2br($getpending3[$i]['quote']), | ||
| 634 | 'EVEN' => 'even')); | ||
| 635 | } else { | ||
| 636 | $template->adds_block('QUOTE', array( 'ID' => $getpending3[$i]['id'], | ||
| 637 | 'TEXT' => nl2br($getpending3[$i]['quote']))); | ||
| 638 | } | ||
| 639 | |||
| 640 | $i++; | ||
| 641 | } | ||
| 642 | } else if ($_GET['page'] == 'actionPendingQuotes') | ||
| 643 | { | ||
| 644 | $getpending = "SELECT * FROM rash_queue WHERE id = " . $_GET['id']; | ||
| 645 | $getpending2 = mysql_query($getpending); | ||
| 646 | $getpending3 = mysql_fetch_array($getpending2); | ||
| 647 | |||
| 648 | if ($getpending3['id'] == $_GET['id']) | ||
| 649 | { | ||
| 650 | if (isset($_GET['approve'])) | ||
| 651 | { | ||
| 652 | $insquote = "INSERT INTO rash_quotes (quote,date) VALUES (\"" . mysql_real_escape_string($getpending3['quote']) . "\",\"" . time() . "\")"; | ||
| 653 | $insquote2 = mysql_query($insquote); | ||
| 654 | |||
| 655 | $delpending = "DELETE FROM rash_queue WHERE id = " . $_GET['id']; | ||
| 656 | $delpending2 = mysql_query($delpending); | ||
| 657 | |||
| 658 | $template = new FITemplate('msg2'); | ||
| 659 | $template->add('BACK', 'Back to the Admin Panel'); | ||
| 660 | $template->add('LINK', '/admin/'); | ||
| 661 | $template->add('MSG', "You've successfully approved this quote."); | ||
| 662 | } else if (isset($_GET['deny'])) | ||
| 663 | { | ||
| 664 | $delpending = "DELETE FROM rash_queue WHERE id = " . $_GET['id']; | ||
| 665 | $delpending2 = mysql_query($delpending); | ||
| 666 | |||
| 667 | $template = new FITemplate('msg2'); | ||
| 668 | $template->add('BACK', 'Back to the Admin Panel'); | ||
| 669 | $template->add('LINK', '/admin/'); | ||
| 670 | $template->add('MSG', "You've successfully denied this quote."); | ||
| 671 | } else { | ||
| 672 | $template = new FITemplate('msg'); | ||
| 673 | $template->add('BACK', 'the previous page'); | ||
| 674 | $template->add('MSG', "Um, what on earth are you doing?"); | ||
| 675 | } | ||
| 676 | } else { | ||
| 677 | $template = new FITemplate('msg'); | ||
| 678 | $template->add('BACK', 'the previous page'); | ||
| 679 | $template->add('MSG', 'I\'m sorry, but this pending quote doesn\'t exist.'); | ||
| 680 | } | ||
| 681 | } else if ($_GET['page'] == 'hgUpdate') | ||
| 682 | { | ||
| 683 | $template = new FITemplate('msg'); | ||
| 684 | $template->add('BACK', 'the Admin Panel'); | ||
| 685 | |||
| 686 | ob_start(); | ||
| 687 | system('hg update'); | ||
| 688 | $template->add('MSG', ob_get_contents()); | ||
| 689 | ob_end_clean(); | ||
| 690 | } else if ($_GET['page'] == 'maintenanceMode') | ||
| 691 | { | ||
| 692 | if (isset($_GET['submit'])) | ||
| 693 | { | ||
| 694 | if ($_POST['mode'] == 'on') | ||
| 695 | { | ||
| 696 | $set = 1; | ||
| 697 | } else if ($_POST['mode'] == 'off') | ||
| 698 | { | ||
| 699 | $set = 0; | ||
| 700 | } else { | ||
| 701 | $template = new FITemplate('msg'); | ||
| 702 | $template->add('MSG', 'You seem to have somehow messed up the form. That\'s weird.'); | ||
| 703 | $template->add('BACK', 'the Maintenance Mode form'); | ||
| 704 | } | ||
| 705 | |||
| 706 | if (isset($set)) | ||
| 707 | { | ||
| 708 | $setconfig = "UPDATE config SET value = \"" . $set . "\" WHERE name = \"maintenanceMode\""; | ||
| 709 | $setconfig2 = mysql_query($setconfig); | ||
| 710 | |||
| 711 | $template = new FITemplate('msg'); | ||
| 712 | $template->add('MSG', 'Maintenance Mode has successfully been set to "' . $_POST['mode'] . '"'); | ||
| 713 | $template->add('BACK', 'the Maintenance Mode form'); | ||
| 714 | } | ||
| 715 | } else { | ||
| 716 | $template = new FITemplate('admin/maintenanceMode'); | ||
| 717 | |||
| 718 | $getconfig = "SELECT * FROM config WHERE name = \"maintenanceMode\""; | ||
| 719 | $getconfig2 = mysql_query($getconfig); | ||
| 720 | $getconfig3 = mysql_fetch_array($getconfig2); | ||
| 721 | if ($getconfig3['value'] == '1') | ||
| 722 | { | ||
| 723 | $template->add('ON', ' checked="checked"'); | ||
| 724 | } else { | ||
| 725 | $template->add('OFF', ' checked="checked"'); | ||
| 726 | } | ||
| 727 | } | ||
| 728 | } else { | ||
| 729 | generateError(404); | ||
| 730 | } | ||
| 731 | @$template->display(); | ||
| 732 | } else { | ||
| 733 | generateError(404); | ||
| 734 | } | ||
| 735 | } else { | ||
| 736 | generateError(404); | ||
| 737 | } | ||
| 738 | |||
| 739 | ?> | ||
| diff --git a/pages/poll.php b/pages/poll.php index 6582d90..6a87207 100755 --- a/pages/poll.php +++ b/pages/poll.php | |||
| @@ -88,36 +88,37 @@ if (!isset($_GET['id'])) | |||
| 88 | $getpoll2 = mysql_query($getpoll); | 88 | $getpoll2 = mysql_query($getpoll); |
| 89 | $getpoll3 = mysql_fetch_array($getpoll2); | 89 | $getpoll3 = mysql_fetch_array($getpoll2); |
| 90 | 90 | ||
| 91 | $template->add('QUESTION', $getpoll3['question']); | 91 | if ($getpoll3['id'] == $_GET['id']) |
| 92 | |||
| 93 | $getrss = "SELECT * FROM pollrss WHERE id = " . $_GET['id']; | ||
| 94 | $getrss2 = mysql_query($getrss); | ||
| 95 | $getrss3 = mysql_fetch_array($getrss2); | ||
| 96 | |||
| 97 | if ($getrss3['id'] == $_GET['id']) | ||
| 98 | { | 92 | { |
| 99 | $template->adds_block('COMPLETE', array( 'RSS' => parseText($getrss3['rss']), | 93 | $template->add('QUESTION', $getpoll3['question']); |
| 100 | 'AUTHOR' => $getrss3['author'], | ||
| 101 | 'DATE' => date("F jS Y \a\\t g:i:s a",strtotime($getrss3['date'])), | ||
| 102 | 'OPTION1' => $getpoll3['option1'], | ||
| 103 | 'OPTION2' => $getpoll3['option2'], | ||
| 104 | 'OPTION3' => $getpoll3['option3'], | ||
| 105 | 'OPTION4' => $getpoll3['option4'], | ||
| 106 | 'CLICKS1' => $getpoll3['clicks1'], | ||
| 107 | 'CLICKS2' => $getpoll3['clicks2'], | ||
| 108 | 'CLICKS3' => $getpoll3['clicks3'], | ||
| 109 | 'CLICKS4' => $getpoll3['clicks4'])); | ||
| 110 | } else { | ||
| 111 | $template->adds_block('INCOMPLETE', array('exi'=>1)); | ||
| 112 | } | ||
| 113 | 94 | ||
| 114 | $template->add('POTW', getPollOfTheWeek($_GET['id'])); | 95 | if ($getpoll3['text'] != '') |
| 115 | $template->display(); | 96 | { |
| 97 | $template->adds_block('COMPLETE', array( 'RSS' => parseText($getpoll3['text']), | ||
| 98 | 'AUTHOR' => $getrss3['author'], | ||
| 99 | 'DATE' => date("F jS Y \a\\t g:i:s a",strtotime($getpoll3['week'])), | ||
| 100 | 'OPTION1' => $getpoll3['option1'], | ||
| 101 | 'OPTION2' => $getpoll3['option2'], | ||
| 102 | 'OPTION3' => $getpoll3['option3'], | ||
| 103 | 'OPTION4' => $getpoll3['option4'], | ||
| 104 | 'CLICKS1' => $getpoll3['clicks1'], | ||
| 105 | 'CLICKS2' => $getpoll3['clicks2'], | ||
| 106 | 'CLICKS3' => $getpoll3['clicks3'], | ||
| 107 | 'CLICKS4' => $getpoll3['clicks4'])); | ||
| 108 | } else { | ||
| 109 | $template->adds_block('INCOMPLETE', array('exi'=>1)); | ||
| 110 | } | ||
| 111 | |||
| 112 | $template->add('POTW', getPollOfTheWeek($_GET['id'])); | ||
| 113 | $template->display(); | ||
| 116 | 114 | ||
| 117 | $page_id = 'polloftheweek-' . $getpoll3['id']; | 115 | $page_id = 'polloftheweek-' . $getpoll3['id']; |
| 118 | include('includes/comments.php'); | 116 | include('includes/comments.php'); |
| 119 | 117 | ||
| 120 | displayRelated($getpoll3['question']); | 118 | displayRelated($getpoll3['question']); |
| 119 | } else { | ||
| 120 | generateError('404'); | ||
| 121 | } | ||
| 121 | } | 122 | } |
| 122 | 123 | ||
| 123 | ?> | 124 | ?> |
| diff --git a/pages/quotes.php b/pages/quotes.php index 4d0b46e..f1e0d65 100755 --- a/pages/quotes.php +++ b/pages/quotes.php | |||
| @@ -168,11 +168,19 @@ if (isset($_GET['id']) && !(is_numeric($_GET['id']))) | |||
| 168 | } | 168 | } |
| 169 | } else if (is_numeric($_GET['act'])) | 169 | } else if (is_numeric($_GET['act'])) |
| 170 | { | 170 | { |
| 171 | $query = "SELECT * FROM rash_quotes WHERE id = " . $_GET['act']; | 171 | $getquote = "SELECT * FROM rash_quotes WHERE id = " . $_GET['act']; |
| 172 | quote_generation($query, "#" . $_GET['act'], -1); | 172 | $getquote2 = mysql_query($getquote); |
| 173 | $getquote3 = mysql_fetch_array($getquote2); | ||
| 173 | 174 | ||
| 174 | $page_id = 'quote-' . $_GET['act']; | 175 | if ($getquote3['id'] == $_GET['act']) |
| 175 | include('includes/comments.php'); | 176 | { |
| 177 | quote_generation($getquote, "#" . $_GET['act'], -1); | ||
| 178 | |||
| 179 | $page_id = 'quote-' . $_GET['act']; | ||
| 180 | include('includes/comments.php'); | ||
| 181 | } else { | ||
| 182 | generateError('404'); | ||
| 183 | } | ||
| 176 | } else { | 184 | } else { |
| 177 | generateError('404'); | 185 | generateError('404'); |
| 178 | } | 186 | } |
| diff --git a/pages/viewPost.php b/pages/viewPost.php new file mode 100644 index 0000000..1daca00 --- /dev/null +++ b/pages/viewPost.php | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | <?php | ||
| 2 | /* | ||
| 3 | 444444444 | ||
| 4 | 4::::::::4 | ||
| 5 | 4:::::::::4 | ||
| 6 | 4::::44::::4 | ||
| 7 | 4::::4 4::::4 Four Island | ||
| 8 | 4::::4 4::::4 | ||
| 9 | 4::::4 4::::4 Written and maintained by Starla Insigna | ||
| 10 | 4::::444444::::444 | ||
| 11 | 4::::::::::::::::4 pages/viewPost.php | ||
| 12 | 4444444444:::::444 | ||
| 13 | 4::::4 Please do not use, reproduce or steal the | ||
| 14 | 4::::4 contents of this file without explicit | ||
| 15 | 4::::4 permission from Hatkirby. | ||
| 16 | 44::::::44 | ||
| 17 | 4::::::::4 | ||
| 18 | 4444444444 | ||
| 19 | */ | ||
| 20 | |||
| 21 | if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} | ||
| 22 | |||
| 23 | require('headerproc.php'); | ||
| 24 | |||
| 25 | if (!isAdmin()) | ||
| 26 | { | ||
| 27 | generateError('404'); | ||
| 28 | } else { | ||
| 29 | $template = new FITemplate('post'); | ||
| 30 | $template->adds_block('INTERNAL',array('exi'=>1)); | ||
| 31 | |||
| 32 | $getpost = "SELECT * FROM " . $_GET['type'] . " WHERE id = " . $_GET['id']; | ||
| 33 | $getpost2 = mysql_query($getpost); | ||
| 34 | $getpost3 = mysql_fetch_array($getpost2); | ||
| 35 | |||
| 36 | if ($getpost3['id'] == $_GET['id']) | ||
| 37 | { | ||
| 38 | $template->add_ref(0, 'POST', array( 'ID' => $getpost3['id'], | ||
| 39 | 'YEARID' => ((date('Y')-2006) % 4), | ||
| 40 | 'DATE' => date('F jS Y \a\\t g:i:s a'), | ||
| 41 | 'MONTH' => date('M'), | ||
| 42 | 'DAY' => date('d'), | ||
| 43 | 'CODED' => $getpost3['slug'], | ||
| 44 | 'TITLE' => $getpost3['title'], | ||
| 45 | 'AUTHOR' => $getpost3['author'], | ||
| 46 | 'RATING' => $getpost3['rating'], | ||
| 47 | 'TEXT' => parseText($getpost3['text']))); | ||
| 48 | |||
| 49 | $tags = getTags($getpost3['id']); | ||
| 50 | foreach ($tags as $tag) | ||
| 51 | { | ||
| 52 | $template->adds_ref_sub(0, 'TAGS', array('TAG' => $tag)); | ||
| 53 | } | ||
| 54 | |||
| 55 | $template->adds_ref_sub(0, 'NOVOTE', array('exi'=>1)); | ||
| 56 | $template->display(); | ||
| 57 | } else { | ||
| 58 | generateError('404'); | ||
| 59 | } | ||
| 60 | } | ||
| 61 | |||
| 62 | ?> | ||
| diff --git a/theme/admin/comments.tpl b/theme/admin/comments.tpl new file mode 100644 index 0000000..6d9f815 --- /dev/null +++ b/theme/admin/comments.tpl | |||
| @@ -0,0 +1,107 @@ | |||
| 1 | <h2>Moderate Comments</h2> | ||
| 2 | |||
| 3 | <div class="clear"></div> | ||
| 4 | |||
| 5 | <script type="text/javascript"> | ||
| 6 | function denyComment(id) | ||
| 7 | { | ||
| 8 | if (confirm("Are you sure you would like to deny this comment?")) | ||
| 9 | { | ||
| 10 | postwith("/admin/comments.php?pageID=<!--PAGEID-->&action=deny",{id:id}); | ||
| 11 | } | ||
| 12 | } | ||
| 13 | |||
| 14 | function approveComment(id) | ||
| 15 | { | ||
| 16 | postwith("/admin/comments.php?pageID=<!--PAGEID-->&action=approve",{id:id}); | ||
| 17 | } | ||
| 18 | |||
| 19 | // following function taken from http://mentaljetsam.wordpress.com/2008/06/02/using-javascript-to-post-data-between-pages/ | ||
| 20 | function postwith (to,p) { | ||
| 21 | var myForm = document.createElement("form"); | ||
| 22 | myForm.method="post" ; | ||
| 23 | myForm.action = to ; | ||
| 24 | for (var k in p) { | ||
| 25 | var myInput = document.createElement("input") ; | ||
| 26 | myInput.setAttribute("name", k) ; | ||
| 27 | myInput.setAttribute("value", p[k]); | ||
| 28 | myForm.appendChild(myInput) ; | ||
| 29 | } | ||
| 30 | document.body.appendChild(myForm) ; | ||
| 31 | myForm.submit() ; | ||
| 32 | document.body.removeChild(myForm) ; | ||
| 33 | } | ||
| 34 | |||
| 35 | function bulkAction() | ||
| 36 | { | ||
| 37 | var bulk=new Array(); | ||
| 38 | $(".the-check:checked").each(function() { | ||
| 39 | bulk.push($(this).val()); | ||
| 40 | }); | ||
| 41 | var ids = bulk.join(",") | ||
| 42 | |||
| 43 | if (ids != "") | ||
| 44 | { | ||
| 45 | if ($('#manage-bulk select').val() == "deny") | ||
| 46 | { | ||
| 47 | if (confirm("Are you sure you would like to deny the selected comments?")) | ||
| 48 | { | ||
| 49 | postwith("/admin/comments.php?pageID=<!--PAGEID-->&action=denys",{ids:ids}); | ||
| 50 | } | ||
| 51 | } else if ($('#manage-bulk select').val() == "approve") | ||
| 52 | { | ||
| 53 | if (confirm("Are you sure you would like to approve the selected comments?")) | ||
| 54 | { | ||
| 55 | postwith("/admin/comments.php?pageID=<!--PAGEID-->&action=approves",{ids:ids}); | ||
| 56 | } | ||
| 57 | } | ||
| 58 | } | ||
| 59 | } | ||
| 60 | |||
| 61 | $(document).ready(function() { | ||
| 62 | $("input#all-check").click(function() { | ||
| 63 | var what = this.checked; | ||
| 64 | $("input.the-check").each(function() { | ||
| 65 | this.checked = what; | ||
| 66 | }); | ||
| 67 | }); | ||
| 68 | }); | ||
| 69 | </script> | ||
| 70 | |||
| 71 | <!--BEGIN AVAIL--> | ||
| 72 | <div id="manage-options"> | ||
| 73 | <div id="manage-bulk"> | ||
| 74 | <select name="bulk-type"> | ||
| 75 | <option value="approve">Approve</option> | ||
| 76 | <option value="deny">Deny</option> | ||
| 77 | </select> | ||
| 78 | |||
| 79 | <button id="bulk" type="button" onclick="bulkAction()">Bulk</button> | ||
| 80 | </div> | ||
| 81 | </div> | ||
| 82 | |||
| 83 | <div class="manage-pagination"><!--PAGINATION--></div> | ||
| 84 | |||
| 85 | <table> | ||
| 86 | <tr class="table-header"> | ||
| 87 | <td class="table-checkbox"><input type="checkbox" id="all-check" /></td> | ||
| 88 | <td>Comment</td> | ||
| 89 | <td>Author</td> | ||
| 90 | <td colspan="2">Actions</td> | ||
| 91 | </tr> | ||
| 92 | <!--BEGIN COMMENT--> | ||
| 93 | <tr<!--COMMENT.ODD-->> | ||
| 94 | <td class="table-checkbox"><input class="the-check" type="checkbox" name="bulk" value="<!--COMMENT.ID-->" /></td> | ||
| 95 | <td style="line-height: 1.5em;"><!--COMMENT.TEXT--></td> | ||
| 96 | <td class="table-author"><!--COMMENT.AUTHOR--></td> | ||
| 97 | <td class="table-img"><a href="#" onclick="approveComment(<!--COMMENT.ID-->)"><img src="/theme/images/icons/thumb_up.png" alt="Approve" /></a></td> | ||
| 98 | <td class="table-img"><a href="#" onclick="denyComment(<!--COMMENT.ID-->)"><img src="/theme/images/icons/thumb_down.png" alt="Delete" /></a></td> | ||
| 99 | </tr> | ||
| 100 | <!--END COMMENT--> | ||
| 101 | </table> | ||
| 102 | |||
| 103 | <div class="manage-pagination"><!--PAGINATION--></div> | ||
| 104 | <!--END AVAIL--> | ||
| 105 | <!--BEGIN NOTAVAIL--> | ||
| 106 | <div class="manage-pagination">There are no comments to moderate.</div> | ||
| 107 | <!--END NOTAVAIL--> | ||
| diff --git a/theme/admin/css/hack.css b/theme/admin/css/hack.css new file mode 100644 index 0000000..ca78b58 --- /dev/null +++ b/theme/admin/css/hack.css | |||
| @@ -0,0 +1,81 @@ | |||
| 1 | p { | ||
| 2 | margin: 1em 0; | ||
| 3 | } | ||
| 4 | |||
| 5 | div#flash { | ||
| 6 | position: fixed; | ||
| 7 | left: 0; | ||
| 8 | top: 0; | ||
| 9 | width: 100%; | ||
| 10 | background-color: yellow; | ||
| 11 | padding: 10px 0; | ||
| 12 | text-align: center; | ||
| 13 | border-bottom: 1px solid black; | ||
| 14 | z-index: 9999; | ||
| 15 | } | ||
| 16 | |||
| 17 | body { | ||
| 18 | background: url(/theme/images/backgrounds/island6.PNG) aqua repeat-x bottom left fixed; | ||
| 19 | } | ||
| 20 | |||
| 21 | h1 { | ||
| 22 | background: url(/theme/images/header.png); | ||
| 23 | margin: 0 auto; | ||
| 24 | } | ||
| 25 | |||
| 26 | h1, h1 a { | ||
| 27 | width: 800px; | ||
| 28 | height: 200px; | ||
| 29 | } | ||
| 30 | |||
| 31 | div#header { | ||
| 32 | background: url(/theme/images/header-repeat.png); | ||
| 33 | } | ||
| 34 | |||
| 35 | div#manage-options { | ||
| 36 | margin: .5em 0; | ||
| 37 | padding: .5em; | ||
| 38 | background-color: gray; | ||
| 39 | -moz-border-radius: 10px; | ||
| 40 | -webkit-border-radius: 10px; | ||
| 41 | -khtml-border-radius: 10px; | ||
| 42 | border-radius: 10px; | ||
| 43 | } | ||
| 44 | |||
| 45 | h2 { | ||
| 46 | float: none; | ||
| 47 | } | ||
| 48 | |||
| 49 | div.manage-pagination { | ||
| 50 | margin: .5em 0; | ||
| 51 | padding: .5em; | ||
| 52 | text-align: center; | ||
| 53 | } | ||
| 54 | |||
| 55 | .uniForm { background: #F2FAFF; } | ||
| 56 | .uniForm fieldset{ margin: 0 0 1.5em 0; } | ||
| 57 | .uniForm .inlineLabel em{ left: 10px !important; } | ||
| 58 | .uniForm .inlineLabels .ctrlHolder .multiField.phoneNum .blockLabel{ width: auto; } | ||
| 59 | .uniForm .inlineLabels .ctrlHolder .multiField .blockLabel #phone_ccode.textInput, | ||
| 60 | .uniForm .inlineLabels .ctrlHolder .multiField .blockLabel #phone_area.textInput{ width: 4em; } | ||
| 61 | .uniForm .blockLabels .ctrlHolder textarea { width: 99%; } | ||
| 62 | |||
| 63 | td.table-img { | ||
| 64 | width: 17px; | ||
| 65 | padding: 0 5px !important; | ||
| 66 | } | ||
| 67 | |||
| 68 | td.table-author { | ||
| 69 | text-align: right; | ||
| 70 | padding-right: 20px; | ||
| 71 | } | ||
| 72 | |||
| 73 | td.table-checkbox { | ||
| 74 | width: 17px; | ||
| 75 | padding: 0 5px; | ||
| 76 | } | ||
| 77 | |||
| 78 | tr.table-header td { | ||
| 79 | font-weight: bold; | ||
| 80 | text-align: center; | ||
| 81 | } | ||
| diff --git a/theme/admin/css/ie6.css b/theme/admin/css/ie6.css new file mode 100644 index 0000000..de5f9c7 --- /dev/null +++ b/theme/admin/css/ie6.css | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | #main table tr .action a { margin: 0 0 0 10px; text-decoration: none; color: #9b9b9b; } | ||
| 2 | #main table tr .action .edit { color: #c5a059; } | ||
| 3 | #main table tr .action .delete { color: #a02b2b; } | ||
| 4 | #main table tr .action .view { color: #55a34a; } | ||
| 5 | #main table tr .action a:hover { text-decoration: underline; } | ||
| 6 | |||
| 7 | #main fieldset p { margin: 0 0 7px 0; } /* half of the normal bottom margin */ | ||
| 8 | |||
| 9 | .jNiceSelectWrapper ul { | ||
| 10 | height: 99px; | ||
| 11 | } | ||
| 12 | |||
| 13 | .jNiceSelectWrapper div span { | ||
| 14 | padding: 9px 7px 0; | ||
| 15 | } | ||
| 16 | |||
| 17 | button { | ||
| 18 | width: 85px; | ||
| 19 | } | ||
| 20 | |||
| 21 | .uniForm, .uniForm fieldset, .uniForm .ctrlHolder, .uniForm .formHint, .uniForm .buttonHolder, .uniForm .ctrlHolder .multiField, .uniForm .inlineLabel{ zoom:1; } | ||
| 22 | .uniForm .inlineLabels label, .uniForm .inlineLabels .label, .uniForm .blockLabels label, .uniForm .blockLabels .label, .uniForm .inlineLabel span{ padding-bottom: .2em; } | ||
| 23 | .uniForm .inlineLabel input, .uniForm .inlineLabels .inlineLabel input, .uniForm .blockLabels .inlineLabel input{ margin-top: -.3em; } | ||
| diff --git a/theme/admin/css/ie7.css b/theme/admin/css/ie7.css new file mode 100644 index 0000000..c67e008 --- /dev/null +++ b/theme/admin/css/ie7.css | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | #main fieldset p { margin: 0 0 7px 0; } /* half of the normal bottom margin */ | ||
| 2 | |||
| 3 | .jNiceSelectWrapper div span { | ||
| 4 | padding: 9px 7px 0; | ||
| 5 | } | ||
| 6 | |||
| 7 | .uniForm, .uniForm fieldset, .uniForm .ctrlHolder, .uniForm .formHint, .uniForm .buttonHolder, .uniForm .ctrlHolder .multiField, .uniForm .inlineLabel{ zoom:1; } | ||
| 8 | .uniForm .inlineLabels label, .uniForm .inlineLabels .label, .uniForm .blockLabels label, .uniForm .blockLabels .label, .uniForm .inlineLabel span{ padding-bottom: .2em; } | ||
| 9 | .uniForm .inlineLabel input, .uniForm .inlineLabels .inlineLabel input, .uniForm .blockLabels .inlineLabel input{ margin-top: -.3em; } | ||
| diff --git a/theme/admin/css/layout.css b/theme/admin/css/layout.css new file mode 100644 index 0000000..06aa372 --- /dev/null +++ b/theme/admin/css/layout.css | |||
| @@ -0,0 +1,280 @@ | |||
| 1 | /* Basic ---------------------------------------- */ | ||
| 2 | |||
| 3 | .clear { clear: both; } | ||
| 4 | |||
| 5 | body { | ||
| 6 | background: white; | ||
| 7 | font-family: Arial, Helvetica, sans-serif; | ||
| 8 | font-size: 12px; | ||
| 9 | color: #646464; | ||
| 10 | text-align: center; | ||
| 11 | } | ||
| 12 | |||
| 13 | #wrapper { | ||
| 14 | text-align: left; | ||
| 15 | width: 930px; | ||
| 16 | margin: 0 auto; | ||
| 17 | } | ||
| 18 | |||
| 19 | /* Logo ---------------------------------------- */ | ||
| 20 | |||
| 21 | h1 { | ||
| 22 | margin: 15px 0 10px 5px; | ||
| 23 | width: 225px; | ||
| 24 | height: 28px; | ||
| 25 | background: url(../img/transdmin-light.gif) no-repeat left top; | ||
| 26 | } | ||
| 27 | |||
| 28 | h1 a { | ||
| 29 | display: block; | ||
| 30 | width: 225px; | ||
| 31 | height: 28px; | ||
| 32 | } | ||
| 33 | |||
| 34 | h1 span { display: none; } | ||
| 35 | |||
| 36 | /* Main Navigation ---------------------------------------- */ | ||
| 37 | |||
| 38 | #mainNav { | ||
| 39 | width: 918px; | ||
| 40 | height: 37px; | ||
| 41 | padding: 6px; | ||
| 42 | margin: 0 0 30px 0; | ||
| 43 | background: url(../img/top-menu-bg.gif) no-repeat left top; | ||
| 44 | /* We used a background image making the thick border and the thin one to keep the html structure simple */ | ||
| 45 | } | ||
| 46 | |||
| 47 | #mainNav li { | ||
| 48 | float: left; | ||
| 49 | height: 37px; | ||
| 50 | border-right: 1px solid #ddd; | ||
| 51 | } | ||
| 52 | |||
| 53 | #mainNav li a { | ||
| 54 | display: block; | ||
| 55 | float: left; | ||
| 56 | height: 37px; | ||
| 57 | font-weight: bold; | ||
| 58 | line-height: 37px; | ||
| 59 | text-decoration: none; | ||
| 60 | color: #646464; | ||
| 61 | padding: 0 20px; | ||
| 62 | } | ||
| 63 | |||
| 64 | #mainNav li.logout { | ||
| 65 | float: right; | ||
| 66 | border-left: 1px solid #ddd; | ||
| 67 | border-right: none; | ||
| 68 | } | ||
| 69 | |||
| 70 | #mainNav li a:hover { background: #fdfcf6; } | ||
| 71 | |||
| 72 | #mainNav li a.active, #mainNav li a.active { | ||
| 73 | background: #f0f0f0 url(../img/top-menu-item-bg.gif) repeat-x left top; | ||
| 74 | color: #454545; | ||
| 75 | } | ||
| 76 | |||
| 77 | /* Container ---------------------------------------- */ | ||
| 78 | |||
| 79 | #containerHolder { | ||
| 80 | background: #eee; | ||
| 81 | padding: 5px; | ||
| 82 | } | ||
| 83 | |||
| 84 | |||
| 85 | #container { | ||
| 86 | background: #fff url(../img/content.gif) repeat-y left top; | ||
| 87 | border: 1px solid #ddd; | ||
| 88 | width: 918px; | ||
| 89 | } | ||
| 90 | |||
| 91 | /* Sidebar ---------------------------------------- */ | ||
| 92 | |||
| 93 | #sidebar { | ||
| 94 | width: 179px; | ||
| 95 | float: left; | ||
| 96 | } | ||
| 97 | |||
| 98 | #sidebar .sideNav { width: 179px; } | ||
| 99 | |||
| 100 | #sidebar .sideNav li { border-bottom: 1px solid #ddd; width: 179px; } | ||
| 101 | |||
| 102 | #sidebar .sideNav li a { | ||
| 103 | display: block; | ||
| 104 | color: #646464; | ||
| 105 | background: #f6f6f6; | ||
| 106 | text-decoration: none; | ||
| 107 | height: 29px; | ||
| 108 | line-height: 29px; | ||
| 109 | padding: 0 19px; | ||
| 110 | width: 141px; | ||
| 111 | } | ||
| 112 | |||
| 113 | #sidebar .sideNav li a:hover { background: #fdfcf6; } | ||
| 114 | |||
| 115 | #sidebar .sideNav li a.active, #sidebar .sideNav li a.active:hover { | ||
| 116 | background: #f0f7fa; | ||
| 117 | color: #c66653; | ||
| 118 | } | ||
| 119 | |||
| 120 | /* Breadcrumb ---------------------------------------- */ | ||
| 121 | |||
| 122 | h2 { | ||
| 123 | width: 718px; | ||
| 124 | float: right; | ||
| 125 | color: #646464; | ||
| 126 | font-size: 16px; | ||
| 127 | line-height: 16px; | ||
| 128 | font-weight: bold; | ||
| 129 | margin: 20px 0 0 0; | ||
| 130 | padding: 0 0 10px 0; | ||
| 131 | border-bottom: 1px solid #ddd; | ||
| 132 | } | ||
| 133 | |||
| 134 | h2 a { | ||
| 135 | color: #646464; | ||
| 136 | text-decoration: none; | ||
| 137 | } | ||
| 138 | |||
| 139 | h2 a.active { color: #c66653; } | ||
| 140 | |||
| 141 | h2 a:hover { text-decoration: underline; } | ||
| 142 | |||
| 143 | /* Content ---------------------------------------- */ | ||
| 144 | |||
| 145 | #main { | ||
| 146 | width: 700px; | ||
| 147 | float: right; | ||
| 148 | padding: 0 19px 0 0; | ||
| 149 | } | ||
| 150 | |||
| 151 | h3 { | ||
| 152 | font-size: 14px; | ||
| 153 | line-height: 14px; | ||
| 154 | font-weight: bold; | ||
| 155 | color: #5494af; | ||
| 156 | padding: 0 0 0 10px; | ||
| 157 | margin: 20px 0 10px; | ||
| 158 | } | ||
| 159 | |||
| 160 | #main table { | ||
| 161 | border-top: 1px solid #ddd; | ||
| 162 | width: 700px; | ||
| 163 | } | ||
| 164 | |||
| 165 | #main table tr td { | ||
| 166 | background: #f6f6f6; | ||
| 167 | padding: 0px 20px; | ||
| 168 | height: 29px; | ||
| 169 | line-height: 29px; | ||
| 170 | border-bottom: 1px solid #ddd; | ||
| 171 | } | ||
| 172 | |||
| 173 | #main table tr.odd td { | ||
| 174 | background: #fbfbfb; | ||
| 175 | } | ||
| 176 | |||
| 177 | #main table tr:hover td { background: #fdfcf6; } | ||
| 178 | |||
| 179 | #main table .action { | ||
| 180 | text-align: right; | ||
| 181 | padding: 0 20px 0 10px; | ||
| 182 | } | ||
| 183 | |||
| 184 | #main table tr .action a { margin: 0 0 0 10px; text-decoration: none; color: #9b9b9b; } | ||
| 185 | #main table tr:hover .action .edit { color: #c5a059; } | ||
| 186 | #main table tr:hover .action .delete { color: #a02b2b; } | ||
| 187 | #main table tr:hover .action .view { color: #55a34a; } | ||
| 188 | |||
| 189 | #main table tr:hover .action a:hover { text-decoration: underline; } | ||
| 190 | |||
| 191 | /*#main fieldset { | ||
| 192 | border: 1px solid #ddd; | ||
| 193 | padding: 19px; | ||
| 194 | margin: 0 0 20px 0; | ||
| 195 | background: #fbfbfb; | ||
| 196 | } | ||
| 197 | |||
| 198 | #main fieldset p { margin: 0 0 14px 0; float: left; width: 100%; } | ||
| 199 | |||
| 200 | #main fieldset label { | ||
| 201 | display: block; | ||
| 202 | width: 100%; | ||
| 203 | margin: 0 0 7px 0; | ||
| 204 | line-height: 12px; | ||
| 205 | } | ||
| 206 | |||
| 207 | #main fieldset .text-long { | ||
| 208 | border: 1px solid #ddd; | ||
| 209 | background: #fff url(../img/input-shaddow.gif) no-repeat left top; | ||
| 210 | font: 11px Arial, Helvetica, sans-serif; | ||
| 211 | color: #646464; | ||
| 212 | padding: 5px 7px; | ||
| 213 | width: 264px; | ||
| 214 | float: left; | ||
| 215 | margin: 0 10px 0 0; | ||
| 216 | } | ||
| 217 | |||
| 218 | #main fieldset .text-medium { | ||
| 219 | border: 1px solid #ddd; | ||
| 220 | background: #fff url(../img/input-shaddow.gif) no-repeat left top; | ||
| 221 | font: 11px Arial, Helvetica, sans-serif; | ||
| 222 | color: #646464; | ||
| 223 | padding: 5px 7px; | ||
| 224 | width: 124px; | ||
| 225 | float: left; | ||
| 226 | margin: 0 10px 0 0; | ||
| 227 | } | ||
| 228 | |||
| 229 | #main fieldset .text-small { | ||
| 230 | border: 1px solid #ddd; | ||
| 231 | background: #fff url(../img/input-shaddow.gif) no-repeat left top; | ||
| 232 | font: 11px Arial, Helvetica, sans-serif; | ||
| 233 | color: #646464; | ||
| 234 | padding: 5px 7px; | ||
| 235 | width: 44px; | ||
| 236 | float: left; | ||
| 237 | margin: 0 10px 0 0; | ||
| 238 | } | ||
| 239 | |||
| 240 | #main fieldset .text-long:focus, | ||
| 241 | #main fieldset .text-medium:focus, | ||
| 242 | #main fieldset .text-small:focus, | ||
| 243 | #main fieldset textarea:focus { background: #fdfcf6 url(../img/input-shaddow-hover.gif) no-repeat left top; } | ||
| 244 | |||
| 245 | #main fieldset textarea { | ||
| 246 | border: 1px solid #ddd; | ||
| 247 | background: #fff url(../img/input-shaddow.gif) no-repeat left top; | ||
| 248 | font: 11px Arial, Helvetica, sans-serif; | ||
| 249 | color: #646464; | ||
| 250 | padding: 5px 7px; | ||
| 251 | width: 364px; | ||
| 252 | float: left; | ||
| 253 | margin: 0 10px 0 0; | ||
| 254 | height: 148px; | ||
| 255 | overflow: hidden; | ||
| 256 | }*/ | ||
| 257 | |||
| 258 | .button-submit { | ||
| 259 | font: 11px Arial, Helvetica, sans-serif; | ||
| 260 | color: #646464; | ||
| 261 | width: 94px; | ||
| 262 | height: 29px; | ||
| 263 | cursor: pointer; | ||
| 264 | border: none; | ||
| 265 | background: url(../img/button-submit.gif) no-repeat left top; | ||
| 266 | } | ||
| 267 | |||
| 268 | /* Footer ---------------------------------------- */ | ||
| 269 | |||
| 270 | #footer { | ||
| 271 | margin: 10px 0 30px 0; | ||
| 272 | font-size: 11px; | ||
| 273 | line-height: 11px; | ||
| 274 | color: #9B9B9B; | ||
| 275 | padding: 0 0 0 5px; | ||
| 276 | } | ||
| 277 | |||
| 278 | #footer a { color: #9B9B9B; } | ||
| 279 | |||
| 280 | #footer a:hover { text-decoration: none; } | ||
| diff --git a/theme/admin/css/reset.css b/theme/admin/css/reset.css new file mode 100644 index 0000000..08ec888 --- /dev/null +++ b/theme/admin/css/reset.css | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | html, body, div, span, applet, object, iframe, | ||
| 2 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, | ||
| 3 | a, abbr, acronym, address, big, cite, code, | ||
| 4 | del, dfn, em, font, img, ins, kbd, q, s, samp, | ||
| 5 | small, strike, strong, sub, sup, tt, var, | ||
| 6 | b, u, i, center, | ||
| 7 | dl, dt, dd, ol, ul, li, | ||
| 8 | fieldset, form, label, legend, | ||
| 9 | table, caption, tbody, tfoot, thead, tr, th, td { | ||
| 10 | margin: 0; | ||
| 11 | padding: 0; | ||
| 12 | border: 0; | ||
| 13 | outline: 0; | ||
| 14 | font-size: 100%; | ||
| 15 | vertical-align: baseline; | ||
| 16 | background: transparent; | ||
| 17 | } | ||
| 18 | body { | ||
| 19 | line-height: 1; | ||
| 20 | } | ||
| 21 | ol, ul { | ||
| 22 | list-style: none; | ||
| 23 | } | ||
| 24 | blockquote, q { | ||
| 25 | quotes: none; | ||
| 26 | } | ||
| 27 | |||
| 28 | /* remember to define focus styles! */ | ||
| 29 | :focus { | ||
| 30 | outline: 0; | ||
| 31 | } | ||
| 32 | |||
| 33 | /* remove textarea resize at Safari */ | ||
| 34 | textarea { | ||
| 35 | resize: none; | ||
| 36 | } | ||
| 37 | |||
| 38 | /* remember to highlight inserts somehow! */ | ||
| 39 | ins { | ||
| 40 | text-decoration: none; | ||
| 41 | } | ||
| 42 | del { | ||
| 43 | text-decoration: line-through; | ||
| 44 | } | ||
| 45 | |||
| 46 | /* tables still need 'cellspacing="0"' in the markup */ | ||
| 47 | table { | ||
| 48 | border-collapse: collapse; | ||
| 49 | border-spacing: 0; | ||
| 50 | } | ||
| diff --git a/theme/admin/css/transdmin.css b/theme/admin/css/transdmin.css new file mode 100644 index 0000000..5c03204 --- /dev/null +++ b/theme/admin/css/transdmin.css | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | /* ----------------------------------------------- | ||
| 2 | |||
| 3 | * Screen Style Sheet | ||
| 4 | |||
| 5 | * Name: Transdmin Light | ||
| 6 | |||
| 7 | * Coded by: Perspectived | ||
| 8 | http://www.perspectived.com | ||
| 9 | |||
| 10 | ----------------------------------------------- */ | ||
| 11 | |||
| 12 | /* CSS reset by Eric Meyer */ | ||
| 13 | @import url("reset.css"); | ||
| 14 | @import url("layout.css"); | ||
| 15 | @import url("hack.css"); | ||
| diff --git a/theme/admin/css/uni-form-generic.css b/theme/admin/css/uni-form-generic.css new file mode 100755 index 0000000..f9e0f39 --- /dev/null +++ b/theme/admin/css/uni-form-generic.css | |||
| @@ -0,0 +1,136 @@ | |||
| 1 | /* Uni-Form by Dragan Babic [Superawesome Industries] - http: //sprawsm.com/uni-form/ */ | ||
| 2 | /* Some rights reserved - http: //creativecommons.org/licenses/by-sa/2.5/ */ | ||
| 3 | /* Do not edit this file directly, make your changes to uni-form.css in the same folder */ | ||
| 4 | |||
| 5 | /* ------------------------------------------------------------------------------ */ | ||
| 6 | |||
| 7 | .uniForm{ margin: 0; padding: 0; position: relative; z-index: 1; } /* reset stuff */ | ||
| 8 | |||
| 9 | /* Some generals and more resets */ | ||
| 10 | .uniForm fieldset{ border: none; margin: 0; padding: 0; } | ||
| 11 | .uniForm fieldset legend{ margin: 0; padding: 0; } | ||
| 12 | |||
| 13 | /* This is the main unit that contains our form elements */ | ||
| 14 | .uniForm .ctrlHolder, | ||
| 15 | .uniForm .buttonHolder{ margin: 0; padding: 0; clear: both; } | ||
| 16 | |||
| 17 | /* Clear all floats */ | ||
| 18 | .uniForm:after, | ||
| 19 | .uniForm .buttonHolder:after, | ||
| 20 | .uniForm .ctrlHolder:after, | ||
| 21 | .uniForm .ctrlHolder .multiField:after, | ||
| 22 | .uniForm .inlineLabel:after{ content: "."; display: block; height: 0; line-height: 0; font-size: 0; clear: both; min-height: 0; visibility: hidden; } | ||
| 23 | |||
| 24 | /* A class to be used on a label that contains a checkbox or a radio button */ | ||
| 25 | .uniForm .inlineLabel, | ||
| 26 | .uniForm .inlineLabels .inlineLabel, | ||
| 27 | .uniForm .blockLabels .inlineLabel{ width: auto; float: none; margin: 0; display: block; } | ||
| 28 | /* IE shows borders & padding on checkboxes and radio buttons if they are declared on an input element, remove them */ | ||
| 29 | /* Legacy/Inheritance fix */ | ||
| 30 | .uniForm .inlineLabel input, | ||
| 31 | .uniForm .inlineLabels .inlineLabel input, | ||
| 32 | .uniForm .blockLabels .inlineLabel input{ border: none; padding: 0; margin: 0; } | ||
| 33 | |||
| 34 | /* ------------------------------------------------------------------------------ */ | ||
| 35 | |||
| 36 | /* Styles for form controls where labels are above the input elements */ | ||
| 37 | /* Set the class of the parent (preferably to a fieldset) to .blockLabels */ | ||
| 38 | |||
| 39 | .uniForm label, | ||
| 40 | .uniForm .label, | ||
| 41 | .uniForm .blockLabels label, | ||
| 42 | .uniForm .blockLabels .label{ display: block; float: none; padding: 0; line-height: 100%; width: auto; } | ||
| 43 | |||
| 44 | /* Float the input elements */ | ||
| 45 | .uniForm .textInput, | ||
| 46 | .uniForm .blockLabels .textInput, | ||
| 47 | .uniForm .blockLabels .fileUpload, | ||
| 48 | .uniForm .selectInput, | ||
| 49 | .uniForm .blockLabels .selectInput, | ||
| 50 | .uniForm .blockLabels select, | ||
| 51 | .uniForm textarea, | ||
| 52 | .uniForm .blockLabels textarea{ float: left; } | ||
| 53 | |||
| 54 | /* Postition the hints */ | ||
| 55 | .uniForm .formHint, | ||
| 56 | .uniForm .blockLabels .formHint{ float: right; margin: 0; clear: none; } | ||
| 57 | |||
| 58 | /* Position the elements inside combo boxes (multiple selects/checkboxes/radio buttons per unit) */ | ||
| 59 | .uniForm .multiField, | ||
| 60 | .uniForm .blockLabels .multiField{ width: auto; float: left; } | ||
| 61 | .uniForm .multiField .inlineLabel, | ||
| 62 | .uniForm .blockLabels .multiField .inlineLabel{ display: block; margin: 0 0 .5em 0; } | ||
| 63 | .uniForm .multiField .blockLabel, | ||
| 64 | .uniForm .blockLabels .multiField .blockLabel{ float: left; width: auto; margin: 0; } | ||
| 65 | .uniForm .multiField .blockLabel .textInput, | ||
| 66 | .uniForm .multiField .blockLabel .selectInput, | ||
| 67 | .uniForm .multiField .blockLabel select, | ||
| 68 | .uniForm .blockLabels .multiField .blockLabel .textInput, | ||
| 69 | .uniForm .blockLabels .multiField .blockLabel .selectInput, | ||
| 70 | .uniForm .blockLabels .multiField .blockLabel select{ width: 100%; margin: 0; } | ||
| 71 | |||
| 72 | /* ------------------------------------------------------------------------------ */ | ||
| 73 | |||
| 74 | /* Styles for form controls where labels are in line with the input elements */ | ||
| 75 | /* Set the class of the parent (preferably to a fieldset) to .inlineLabels */ | ||
| 76 | .uniForm .inlineLabels label, | ||
| 77 | .uniForm .inlineLabels .label{ float: left; margin: 0; padding: 0; line-height: 100%; position: relative; } | ||
| 78 | |||
| 79 | /* Float the input elements */ | ||
| 80 | .uniForm .inlineLabels .textInput, | ||
| 81 | .uniForm .inlineLabels .fileUpload, | ||
| 82 | .uniForm .inlineLabels .selectInput, | ||
| 83 | .uniForm .inlineLabels select, | ||
| 84 | .uniForm .inlineLabels textarea{ float: left; } | ||
| 85 | |||
| 86 | /* Postition the hints */ | ||
| 87 | .uniForm .inlineLabels .formHint{ clear: both; float: none; } | ||
| 88 | .uniForm .inlineLabels .multiField{ float: left; } | ||
| 89 | .uniForm .inlineLabels .multiField .inlineLabel{} | ||
| 90 | .uniForm .inlineLabels .multiField .blockLabel{} | ||
| 91 | .uniForm .inlineLabels .multiField .blockLabel .textInput, | ||
| 92 | .uniForm .inlineLabels .multiField .blockLabel .selectInput, | ||
| 93 | .uniForm .inlineLabels .multiField .blockLabel select{ display: block; width: 100%; float: none; } | ||
| 94 | .uniForm .inlineLabels .multiField select{ float: left; } | ||
| 95 | |||
| 96 | /* ------------------------------------------------------------------------------ */ | ||
| 97 | |||
| 98 | /* Required fields asterisk styling for .blockLabels */ | ||
| 99 | .uniForm label em, | ||
| 100 | .uniForm .label em, | ||
| 101 | .uniForm .blockLabels label em, | ||
| 102 | .uniForm .blockLabels .label em{ position: absolute; left: -7px; } | ||
| 103 | |||
| 104 | /* Required fields asterisk styling for .inlineLabels */ | ||
| 105 | .uniForm .inlineLabels label em, | ||
| 106 | .uniForm .inlineLabels .label em{ display: block; position: absolute; left: auto; right: 0; font-style: normal; font-weight: bold; } | ||
| 107 | .uniForm .inlineLabel em{ position: absolute; left: 7px; } | ||
| 108 | |||
| 109 | /* ------------------------------------------------------------------------------ */ | ||
| 110 | |||
| 111 | /* Messages */ | ||
| 112 | .uniForm #errorMsg, | ||
| 113 | .uniForm .error{ | ||
| 114 | } | ||
| 115 | .uniForm #errorMsg dt, | ||
| 116 | .uniForm #errorMsg h3{ | ||
| 117 | } | ||
| 118 | .uniForm #errorMsg dd{ | ||
| 119 | } | ||
| 120 | .uniForm #errorMsg ol{ | ||
| 121 | } | ||
| 122 | .uniForm #errorMsg ol li{ | ||
| 123 | } | ||
| 124 | .uniForm .errorField{ | ||
| 125 | } | ||
| 126 | |||
| 127 | .uniForm #OKMsg{ | ||
| 128 | } | ||
| 129 | |||
| 130 | /* ------------------------------------------------------------------------------ */ | ||
| 131 | |||
| 132 | /* Columns */ | ||
| 133 | |||
| 134 | .uniForm .col{ float: left; } | ||
| 135 | .uniForm .col.first{} | ||
| 136 | .uniForm .col.last{} \ No newline at end of file | ||
| diff --git a/theme/admin/css/uni-form.css b/theme/admin/css/uni-form.css new file mode 100755 index 0000000..53520ba --- /dev/null +++ b/theme/admin/css/uni-form.css | |||
| @@ -0,0 +1,118 @@ | |||
| 1 | @import "uni-form-generic.css"; | ||
| 2 | /* Keep in mind that wherever you see 'Required property' it means that the property must exist */ | ||
| 3 | |||
| 4 | /* ------------------------------------------------------------------------------ */ | ||
| 5 | |||
| 6 | /* Generals */ | ||
| 7 | .uniForm fieldset{} | ||
| 8 | .uniForm fieldset legend{ color: #333; font-weight: bold; font-size: 100%; margin: 0; padding: 1.5em 0; } | ||
| 9 | |||
| 10 | /* This is the main unit that contains our form elements */ | ||
| 11 | .uniForm .ctrlHolder{ padding: 7px; border-bottom: 1px solid #dfdfdf; } | ||
| 12 | |||
| 13 | .uniForm .buttonHolder{ text-align: right; } | ||
| 14 | .uniForm .resetButton{ float: left; } | ||
| 15 | .uniForm .primaryAction{ font-weight: bold; } | ||
| 16 | |||
| 17 | /* This class gets added to div.ctrlHolder to highlight the row */ | ||
| 18 | .uniForm .focused{ background: #fffcdf; } | ||
| 19 | |||
| 20 | /* .inlineLabel is used for inputs within labels - checkboxes and radio buttons */ | ||
| 21 | .uniForm .inlineLabel input, | ||
| 22 | .uniForm .inlineLabels .inlineLabel input, | ||
| 23 | .uniForm .blockLabels .inlineLabel input{ float: left; margin: 0 .4em 0 0; } | ||
| 24 | .uniForm .inlineLabel span{ float: left; width: 90%; } | ||
| 25 | |||
| 26 | /* ------------------------------------------------------------------------------ */ | ||
| 27 | |||
| 28 | /* .blockLabels (default style, will be applied even if you don't class the parent element) */ | ||
| 29 | .uniForm .blockLabels .ctrlHolder{} | ||
| 30 | |||
| 31 | .uniForm label, | ||
| 32 | .uniForm .blockLabels label, | ||
| 33 | .uniForm .blockLabels .label{ margin: 0 0 .5em 0; } | ||
| 34 | |||
| 35 | .uniForm .textInput, | ||
| 36 | .uniForm .blockLabels .textInput, | ||
| 37 | .uniForm .blockLabels .fileUpload{ width: 53%; /* <- Required property */ } | ||
| 38 | |||
| 39 | .uniForm .selectInput, | ||
| 40 | .uniForm select, | ||
| 41 | .uniForm .blockLabels .selectInput, | ||
| 42 | .uniForm .blockLabels select{ width: 53.5%; /* <- Required property */ } | ||
| 43 | .uniForm textarea, | ||
| 44 | .uniForm .blockLabels textarea{ width: 53%; /* <- Required property */ height: 12em; } | ||
| 45 | |||
| 46 | .uniForm .formHint, | ||
| 47 | .uniForm .blockLabels .formHint{ width: 45%; /* <- Required property */ font-size: .9em; color: #777; position: relative; top: -.5em; } | ||
| 48 | |||
| 49 | .uniForm .multiField, | ||
| 50 | .uniForm .blockLabels .multiField{ width: 53%; } | ||
| 51 | .uniForm .multiField .inlineLabel, | ||
| 52 | .uniForm .blockLabels .multiField .inlineLabel{ display: block; margin: 0 0 .5em 0; } | ||
| 53 | .uniForm .multiField .blockLabel, | ||
| 54 | .uniForm .blockLabels .multiField .blockLabel{ width: 30%; margin: 0 10px 0 0; } | ||
| 55 | .uniForm .multiField .blockLabel .textInput, | ||
| 56 | .uniForm .multiField .blockLabel .selectInput, | ||
| 57 | .uniForm .multiField .blockLabel select, | ||
| 58 | .uniForm .blockLabels .multiField .blockLabel .textInput, | ||
| 59 | .uniForm .blockLabels .multiField .blockLabel .selectInput, | ||
| 60 | .uniForm .blockLabels .multiField .blockLabel select{ width: 100%; margin: .3em 0 0 0; } | ||
| 61 | |||
| 62 | /* ------------------------------------------------------------------------------ */ | ||
| 63 | |||
| 64 | /* .inlineLabels */ | ||
| 65 | .uniForm .inlineLabels .ctrlHolder{} | ||
| 66 | |||
| 67 | .uniForm .inlineLabels label, | ||
| 68 | .uniForm .inlineLabels .label{ width: 45%; /* <- Required property */ margin: .3em 2% 0 0; /* <- Required property */ } | ||
| 69 | |||
| 70 | .uniForm .inlineLabels .textInput, | ||
| 71 | .uniForm .inlineLabels .fileUpload{ width: 45%; /* <- Required property */ } | ||
| 72 | |||
| 73 | .uniForm .inlineLabels .selectInput, | ||
| 74 | .uniForm .inlineLabels select{ width: 45%; /* <- Required property */ } | ||
| 75 | |||
| 76 | .uniForm .inlineLabels textarea{ width: 45%; /* <- Required property */ height: 12em; } | ||
| 77 | |||
| 78 | .uniForm .inlineLabels .formHint{ margin-top: 0; margin-left: 47%; font-size: .9em; color: #777; position: static; } | ||
| 79 | |||
| 80 | .uniForm .inlineLabels .multiField{ width: 45%; /* <- Required property */ margin: 0 0 .3em 0; } | ||
| 81 | .uniForm .inlineLabels .multiField .inlineLabel{ display: block; margin: 0 0 .5em 0; } | ||
| 82 | .uniForm .inlineLabels .multiField .blockLabel{ float: left; width: 26%; margin: 0 3% 0 0; } | ||
| 83 | .uniForm .inlineLabels .multiField .blockLabel .textInput, | ||
| 84 | .uniForm .inlineLabels .multiField .blockLabel .selectInput, | ||
| 85 | .uniForm .inlineLabels .multiField .blockLabel select{ width: 100%; margin: .3em 0 0 0; } | ||
| 86 | |||
| 87 | /* Focus pseudoclasses */ | ||
| 88 | .uniForm .ctrlHolder .textInput:focus{ outline: none; /* Get rid of the 'glow' effect in WebKit, optional */ } | ||
| 89 | .uniForm .ctrlHolder textarea:focus{ outline: none; /* Get rid of the 'glow' effect in WebKit, optional */ } | ||
| 90 | .uniForm div.focused .formHint{ color: #333; } | ||
| 91 | |||
| 92 | /* Columns (they are floated left by default) */ | ||
| 93 | .uniForm .col{ width: 47.9%; /* <- Required property */ margin: 0 2% 20px 0; } | ||
| 94 | /* Use .first and .last classes to control the layout/spacing of your columns */ | ||
| 95 | .uniForm .col.first{ width: 49%; /* <- Required property */ float: left; clear: none; } | ||
| 96 | .uniForm .col.last{ width: 49%; /* <- Required property */ float: right; clear: none; margin-right: 0; } | ||
| 97 | |||
| 98 | /* Messages */ | ||
| 99 | .uniForm #errorMsg{ background: #ffdfdf; border: 1px solid #df7d7d; border-width: 1px 0; margin: 0 0 1.5em 0; padding: 7px; } | ||
| 100 | .uniForm .error{ background: #ffdfdf; border: 1px solid #df7d7d; border-width: 1px 0; } | ||
| 101 | |||
| 102 | .uniForm #errorMsg dt, .uniForm #errorMsg h3{ margin: 0 0 .5em 0; font-size: 100%; line-height: 100%; font-weight: bold; } | ||
| 103 | .uniForm #errorMsg dd{ margin: 0; padding: 0; } | ||
| 104 | .uniForm #errorMsg ol{ margin: 0; padding: 0; } | ||
| 105 | .uniForm #errorMsg ol li{ margin: 0; padding: 2px; list-style-position: inside; border-bottom: 1px dotted #df7d7d; position: relative; } | ||
| 106 | .uniForm .errorField{ color: #af4c4c; margin: 0 0 6px 0; padding: 4px; background: #ffbfbf; } | ||
| 107 | |||
| 108 | .uniForm #OKMsg{ background: #C8FFBF; border: 1px solid #A2EF95; border-width: 1px 0; margin: 0 0 1.5em 0; padding: 7px; } | ||
| 109 | .uniForm #OKMsg p{ margin: 0; } | ||
| 110 | |||
| 111 | /* | ||
| 112 | IT IS STRONGLY ADVISED TO MAKE YOUR CHANGES AFTER THIS COMMENT BY REPEATING (COPYING) THE SELECTOR FROM ABOVE, | ||
| 113 | AND MODIFYING IT WITH YOUR OWN PROPERTIES/VALUES. THIS IS RECOMMENDED BECAUSE IF YOU HAPPEN TO RUN INTO TROUBLE, | ||
| 114 | YOU CAN VERY EASILY REVERT TO A GENERIC STYLE OF UNI-FORM. BEST OF LUCK... | ||
| 115 | */ | ||
| 116 | |||
| 117 | /* ------------------------------------------------------------------------------ */ | ||
| 118 | |||
| diff --git a/theme/admin/deleteDraft.tpl b/theme/admin/deleteDraft.tpl deleted file mode 100755 index 0b37a97..0000000 --- a/theme/admin/deleteDraft.tpl +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | <h2>Delete a Draft</h2> | ||
| 2 | |||
| 3 | <p>Are you ABSOLUTELY SURE that you want to delete this draft?</p> | ||
| 4 | |||
| 5 | <p><a href="/admin/deleteDraft.php?id=<!--ID-->&submit=">Yes</a><br /> | ||
| 6 | <a href="javascript:history.back();window.refresh();">Ummm.... actually I'd rather not</a></p> | ||
| diff --git a/theme/admin/deletePending.tpl b/theme/admin/deletePending.tpl deleted file mode 100755 index 6a365c1..0000000 --- a/theme/admin/deletePending.tpl +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | <h2>Delete a Pending Post</h2> | ||
| 2 | |||
| 3 | <p>Are you ABSOLUTELY SURE that you want to delete this pending post?</p> | ||
| 4 | |||
| 5 | <p><a href="/admin/deletePending.php?id=<!--ID-->&submit=">Yes</a><br /> | ||
| 6 | <a href="javascript:history.back();window.refresh();">Ummm.... actually I'd rather not</a></p> | ||
| diff --git a/theme/admin/deletePost.tpl b/theme/admin/deletePost.tpl deleted file mode 100755 index c3ef82b..0000000 --- a/theme/admin/deletePost.tpl +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | <h2>Delete a Post</h2> | ||
| 2 | |||
| 3 | <p>Are you ABSOLUTELY SURE that you want to delete this post?</p> | ||
| 4 | |||
| 5 | <p><a href="/admin/deletePost.php?id=<!--ID-->&submit=">Yes</a><br /> | ||
| 6 | <a href="javascript:history.back();window.refresh();">Ummm.... actually I'd rather not</a></p> | ||
| diff --git a/theme/admin/deletedDraft.tpl b/theme/admin/deletedDraft.tpl deleted file mode 100755 index edd0b55..0000000 --- a/theme/admin/deletedDraft.tpl +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | You've just deleted a draft! | ||
| 2 | |||
| 3 | <ul> | ||
| 4 | <li><a href="/admin/manageDrafts.php">Manage Drafts</a></li> | ||
| 5 | <li><a href="/admin/">Return to the Admin Panel</a></li> | ||
| 6 | </ul> | ||
| diff --git a/theme/admin/deletedPending.tpl b/theme/admin/deletedPending.tpl deleted file mode 100755 index 71100d6..0000000 --- a/theme/admin/deletedPending.tpl +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | You've just deleted a pending post! | ||
| 2 | |||
| 3 | <ul> | ||
| 4 | <li><a href="/admin/managePending.php">Manage Pending Posts</a></li> | ||
| 5 | <li><a href="/admin/">Return to the Admin Panel</a></li> | ||
| 6 | </ul> | ||
| diff --git a/theme/admin/deletedPost.tpl b/theme/admin/deletedPost.tpl deleted file mode 100755 index a1e77ef..0000000 --- a/theme/admin/deletedPost.tpl +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | You've just deleted a post! | ||
| 2 | |||
| 3 | <ul> | ||
| 4 | <li><a href="/admin/managePosts.php">Manage Posts</a></li> | ||
| 5 | <li><a href="/admin/">Return to the Admin Panel</a></li> | ||
| 6 | </ul> | ||
| diff --git a/theme/admin/draftSuccess.tpl b/theme/admin/draftSuccess.tpl deleted file mode 100755 index aa0616e..0000000 --- a/theme/admin/draftSuccess.tpl +++ /dev/null | |||
| @@ -1,8 +0,0 @@ | |||
| 1 | Congradulations, you've just made/edited a draft! | ||
| 2 | |||
| 3 | <ul> | ||
| 4 | <li><a href="/admin/editDraft.php?id=<!--ID-->">Edit this draft</a></li> | ||
| 5 | <li><a href="/admin/viewDraft.php?id=<!--ID-->">View this draft</a></li> | ||
| 6 | <li><a href="/admin/manageDrafts.php">Manage Drafts</a></li> | ||
| 7 | <li><a href="/admin/">Return to the Admin Panel</a></li> | ||
| 8 | </ul> | ||
| diff --git a/theme/admin/drafts.tpl b/theme/admin/drafts.tpl new file mode 100644 index 0000000..17757ba --- /dev/null +++ b/theme/admin/drafts.tpl | |||
| @@ -0,0 +1,98 @@ | |||
| 1 | <h2>Manage Drafts</h2> | ||
| 2 | |||
| 3 | <div class="clear"></div> | ||
| 4 | |||
| 5 | <script type="text/javascript"> | ||
| 6 | function deletePost(id) | ||
| 7 | { | ||
| 8 | if (confirm("Are you sure you would like to delete this draft?")) | ||
| 9 | { | ||
| 10 | postwith("/admin/drafts.php?pageID=<!--PAGEID-->&action=delete",{id:id}); | ||
| 11 | } | ||
| 12 | } | ||
| 13 | |||
| 14 | // following function taken from http://mentaljetsam.wordpress.com/2008/06/02/using-javascript-to-post-data-between-pages/ | ||
| 15 | function postwith (to,p) { | ||
| 16 | var myForm = document.createElement("form"); | ||
| 17 | myForm.method="post" ; | ||
| 18 | myForm.action = to ; | ||
| 19 | for (var k in p) { | ||
| 20 | var myInput = document.createElement("input") ; | ||
| 21 | myInput.setAttribute("name", k) ; | ||
| 22 | myInput.setAttribute("value", p[k]); | ||
| 23 | myForm.appendChild(myInput) ; | ||
| 24 | } | ||
| 25 | document.body.appendChild(myForm) ; | ||
| 26 | myForm.submit() ; | ||
| 27 | document.body.removeChild(myForm) ; | ||
| 28 | } | ||
| 29 | |||
| 30 | function bulkAction() | ||
| 31 | { | ||
| 32 | var bulk=new Array(); | ||
| 33 | $(".the-check:checked").each(function() { | ||
| 34 | bulk.push($(this).val()); | ||
| 35 | }); | ||
| 36 | var ids = bulk.join(",") | ||
| 37 | |||
| 38 | if (ids != "") | ||
| 39 | { | ||
| 40 | if ($('#manage-bulk select').val() == "delete") | ||
| 41 | { | ||
| 42 | if (confirm("Are you sure you would like to delete the selected drafts?")) | ||
| 43 | { | ||
| 44 | postwith("/admin/drafts.php?pageID=<!--PAGEID-->&action=deletes",{ids:ids}); | ||
| 45 | } | ||
| 46 | } | ||
| 47 | } | ||
| 48 | } | ||
| 49 | |||
| 50 | $(document).ready(function() { | ||
| 51 | $("input#all-check").click(function() { | ||
| 52 | var what = this.checked; | ||
| 53 | $("input.the-check").each(function() { | ||
| 54 | this.checked = what; | ||
| 55 | }); | ||
| 56 | }); | ||
| 57 | }); | ||
| 58 | </script> | ||
| 59 | |||
| 60 | <!--BEGIN AVAIL--> | ||
| 61 | <form action="javascript:alert('Not yet implemented');" method="get"> | ||
| 62 | <div id="manage-options"> | ||
| 63 | <div id="manage-bulk"> | ||
| 64 | <select name="bulk-type"> | ||
| 65 | <option value="delete">Delete</option> | ||
| 66 | </select> | ||
| 67 | |||
| 68 | <button id="bulk" type="button" onclick="bulkAction()">Bulk</button> | ||
| 69 | </div> | ||
| 70 | </div> | ||
| 71 | |||
| 72 | <div class="manage-pagination"><!--PAGINATION--></div> | ||
| 73 | |||
| 74 | <table> | ||
| 75 | <tr class="table-header"> | ||
| 76 | <td class="table-checkbox"><input type="checkbox" id="all-check" /></td> | ||
| 77 | <td>Post Name</td> | ||
| 78 | <td>Author</td> | ||
| 79 | <td colspan="3">Actions</td> | ||
| 80 | </tr> | ||
| 81 | <!--BEGIN POST--> | ||
| 82 | <tr<!--POST.ODD-->> | ||
| 83 | <td class="table-checkbox"><input class="the-check" type="checkbox" name="bulk" value="<!--POST.ID-->" /></td> | ||
| 84 | <td><!--POST.TITLE--></td> | ||
| 85 | <td class="table-author"><!--POST.AUTHOR--></td> | ||
| 86 | <td class="table-img"><a href="/admin/editPost.php?type=drafts&id=<!--POST.ID-->"><img src="/theme/images/icons/page_edit.png" alt="Edit" /></a></td> | ||
| 87 | <td class="table-img"><a href="#" onclick="deletePost(<!--POST.ID-->);"><img src="/theme/images/icons/page_delete.png" alt="Delete" /></a></td> | ||
| 88 | <td class="table-img"><a href="/viewPost.php?type=drafts&id=<!--POST.ID-->"><img src="/theme/images/icons/page_go.png" alt="View" /></a></td> | ||
| 89 | </tr> | ||
| 90 | <!--END POST--> | ||
| 91 | </table> | ||
| 92 | |||
| 93 | <div class="manage-pagination"><!--PAGINATION--></div> | ||
| 94 | </form> | ||
| 95 | <!--END AVAIL--> | ||
| 96 | <!--BEGIN NOTAVAIL--> | ||
| 97 | <div class="manage-pagination">There are no drafts.</div> | ||
| 98 | <!--END NOTAVAIL--> | ||
| diff --git a/theme/admin/editDraft.tpl b/theme/admin/editDraft.tpl deleted file mode 100755 index 1431e79..0000000 --- a/theme/admin/editDraft.tpl +++ /dev/null | |||
| @@ -1,14 +0,0 @@ | |||
| 1 | <h2>Edit a draft</h2> | ||
| 2 | |||
| 3 | <p><form action="/admin/editDraft.php?id=<!--ID-->&submit=" method="post"> | ||
| 4 | Draft Title: <input type="text" name="title" value="<!--TITLE-->" /><br /> | ||
| 5 | <textarea name="text" cols="80" rows="20"><!--TEXT--></textarea><br /> | ||
| 6 | Tags (comma-seperated): <input type="text" name="tags" value="<!--TAGS-->" /><br /> | ||
| 7 | Post Type: <select name="type" size="4"> | ||
| 8 | <option value="draft" selected="selected">Draft</option> | ||
| 9 | <option value="normal">Normal (Article-style) Post</option> | ||
| 10 | <option value="priority">High-Priority Post</option> | ||
| 11 | <option value="instant">Instant Post</option> | ||
| 12 | </select><br /> | ||
| 13 | <input type="submit" value="Edit draft" /> | ||
| 14 | </form></p> | ||
| diff --git a/theme/admin/editPending.tpl b/theme/admin/editPending.tpl deleted file mode 100755 index 47859a5..0000000 --- a/theme/admin/editPending.tpl +++ /dev/null | |||
| @@ -1,8 +0,0 @@ | |||
| 1 | <h2>Edit a pending post</h2> | ||
| 2 | |||
| 3 | <form action="/admin/editPending.php?id=<!--ID-->&submit=" method="post"> | ||
| 4 | Post Title: <input type="text" name="title" value="<!--TITLE-->" /><br /> | ||
| 5 | <textarea name="text" cols="80" rows="20"><!--TEXT--></textarea><br /> | ||
| 6 | Tags (comma-seperated): <input type="text" name="tags" value="<!--TAGS-->" /><br /> | ||
| 7 | <input type="submit" value="Edit post" /> | ||
| 8 | </form> | ||
| diff --git a/theme/admin/editPost.tpl b/theme/admin/editPost.tpl deleted file mode 100755 index 99e90a4..0000000 --- a/theme/admin/editPost.tpl +++ /dev/null | |||
| @@ -1,8 +0,0 @@ | |||
| 1 | <h2>Edit a post</h2> | ||
| 2 | |||
| 3 | <form action="/admin/editPost.php?id=<!--ID-->&submit=" method="post"> | ||
| 4 | Post Title: <input type="text" name="title" value="<!--TITLE-->" /><br /> | ||
| 5 | <textarea name="text" cols="80" rows="20"><!--TEXT--></textarea><br /> | ||
| 6 | Tags (comma-seperated): <input type="text" name="tags" value="<!--TAGS-->" /><br /> | ||
| 7 | <input type="submit" value="Edit post" /> | ||
| 8 | </form> | ||
| diff --git a/theme/admin/footer.tpl b/theme/admin/footer.tpl new file mode 100644 index 0000000..1cc1c4e --- /dev/null +++ b/theme/admin/footer.tpl | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | </div> | ||
| 2 | |||
| 3 | <div class="clear"></div> | ||
| 4 | </div> | ||
| 5 | </div> | ||
| 6 | </div> | ||
| 7 | </body> | ||
| 8 | </html> | ||
| diff --git a/theme/admin/header.tpl b/theme/admin/header.tpl new file mode 100644 index 0000000..bfc1dd4 --- /dev/null +++ b/theme/admin/header.tpl | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
| 2 | |||
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | ||
| 4 | <head> | ||
| 5 | <title>Four Island Admin</title> | ||
| 6 | |||
| 7 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
| 8 | <link href="/theme/admin/css/transdmin.css" rel="stylesheet" type="text/css" media="screen" /> | ||
| 9 | <link href="/theme/admin/css/uni-form.css" rel="stylesheet" type="text/css" media="screen" /> | ||
| 10 | <!--[if IE 6]><link rel="stylesheet" type="text/css" media="screen" href="/theme/admin/css/ie6.css" /><![endif]--> | ||
| 11 | <!--[if IE 7]><link rel="stylesheet" type="text/css" media="screen" href="/theme/admin/css/ie7.css" /><![endif]--> | ||
| 12 | <script src="/theme/admin/js/jquery.js" type="text/javascript"></script> | ||
| 13 | <script src="/theme/admin/js/uni-form.jquery.js" type="text/javascript"></script> | ||
| 14 | </head> | ||
| 15 | |||
| 16 | <body> | ||
| 17 | <div id="flash"<!--HIDEFLASH-->><!--FLASH--></div> | ||
| 18 | |||
| 19 | <div id="wrapper"> | ||
| 20 | <div id="header"><h1><a href="/admin/"><span>Four Island</span></a></h1></div> | ||
| 21 | |||
| 22 | <ul id="mainNav"> | ||
| 23 | <li><a href="/admin/"<!--HOMEACTIVECAT-->>DASHBOARD</a></li> | ||
| 24 | <li><a href="/admin/posts.php"<!--POSTSACTIVECAT-->>POSTS</a></li> | ||
| 25 | <li><a href="/admin/polls.php"<!--POLLSACTIVECAT-->>POLLS</a></li> | ||
| 26 | <li><a href="/admin/quotes.php"<!--QUOTESACTIVECAT-->>QUOTES</a></li> | ||
| 27 | <li class="logout"><a href="/">FOUR ISLAND</a></li> | ||
| 28 | </ul> | ||
| 29 | |||
| 30 | <div id="containerHolder"> | ||
| 31 | <div id="container"> | ||
| 32 | <div id="sidebar"> | ||
| 33 | <ul class="sideNav"> | ||
| 34 | <!--BEGIN HOMEISACTIVECAT--> | ||
| 35 | <li><a href="/admin/update.php"<!--UPDATEACTIVE-->>HG Update</a></li> | ||
| 36 | <li><a href="/admin/maintenance.php"<!--MAINTENANCEACTIVE-->>Maintenance Mode</a></li> | ||
| 37 | <!--END HOMEISACTIVECAT--> | ||
| 38 | <!--BEGIN POSTSISACTIVECAT--> | ||
| 39 | <li><a href="/admin/newPost.php"<!--NEWPOSTACTIVE-->>Write a new post</a></li> | ||
| 40 | <li><a href="/admin/posts.php"<!--POSTSACTIVE-->>Manage Posts</a></li> | ||
| 41 | <li><a href="/admin/drafts.php"<!--DRAFTSACTIVE-->>Manage Drafts</a></li> | ||
| 42 | <li><a href="/admin/pending.php"<!--PENDINGACTIVE-->>Manage Pending Posts</a></li> | ||
| 43 | <li><a href="/admin/comments.php"<!--COMMENTSACTIVE-->>Moderate Comments</a></li> | ||
| 44 | <!--END POSTSISACTIVECAT--> | ||
| 45 | <!--BEGIN POLLSISACTIVECAT--> | ||
| 46 | <li><a href="/admin/newPoll.php"<!--NEWPOLLACTIVE-->>Write a new poll</a></li> | ||
| 47 | <li><a href="/admin/polls.php"<!--POLLSACTIVE-->>Manage Polls</a></li> | ||
| 48 | <!--END POLLSISACTIVECAT--> | ||
| 49 | <!--BEGIN QUOTESISACTIVECAT--> | ||
| 50 | <li><a href="/admin/quotes.php"<!--QUOTESACTIVE-->>Manage Quotes</a></li> | ||
| 51 | <li><a href="/admin/modquotes.php"<!--MODQUOTESACTIVE-->>Moderate Quotes</a></li> | ||
| 52 | <li><a href="/admin/quotes.php?flagged="<!--FLAGGEDACTIVE-->>Manage Flagged Quotes</a></li> | ||
| 53 | <!--END QUOTESISACTIVECAT--> | ||
| 54 | </ul> | ||
| 55 | </div> | ||
| 56 | |||
| 57 | <div id="main"> | ||
| diff --git a/theme/admin/hgupdate.tpl b/theme/admin/hgupdate.tpl new file mode 100644 index 0000000..bfe2065 --- /dev/null +++ b/theme/admin/hgupdate.tpl | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | <h2>HG Update</h2> | ||
| 2 | |||
| 3 | <p> | ||
| 4 | If you make changes to the Four Island source code and push them to the repository, the changes won't affect production. | ||
| 5 | To update the production server, click the button below. | ||
| 6 | </p> | ||
| 7 | |||
| 8 | <p> | ||
| 9 | <button type="button" onclick="javascript:location='/admin/update.php?submit=';">Update</button> | ||
| 10 | </p> | ||
| diff --git a/theme/admin/img/btn_left.gif b/theme/admin/img/btn_left.gif new file mode 100644 index 0000000..71652c6 --- /dev/null +++ b/theme/admin/img/btn_left.gif | |||
| Binary files differ | |||
| diff --git a/theme/admin/img/btn_right.gif b/theme/admin/img/btn_right.gif new file mode 100644 index 0000000..f8c3068 --- /dev/null +++ b/theme/admin/img/btn_right.gif | |||
| Binary files differ | |||
| diff --git a/theme/admin/img/button-submit.gif b/theme/admin/img/button-submit.gif new file mode 100644 index 0000000..102b277 --- /dev/null +++ b/theme/admin/img/button-submit.gif | |||
| Binary files differ | |||
| diff --git a/theme/admin/img/content.gif b/theme/admin/img/content.gif new file mode 100644 index 0000000..5ef7ca7 --- /dev/null +++ b/theme/admin/img/content.gif | |||
| Binary files differ | |||
| diff --git a/theme/admin/img/input-shaddow-hover.gif b/theme/admin/img/input-shaddow-hover.gif new file mode 100644 index 0000000..0dd3bab --- /dev/null +++ b/theme/admin/img/input-shaddow-hover.gif | |||
| Binary files differ | |||
| diff --git a/theme/admin/img/input-shaddow.gif b/theme/admin/img/input-shaddow.gif new file mode 100644 index 0000000..e3c8777 --- /dev/null +++ b/theme/admin/img/input-shaddow.gif | |||
| Binary files differ | |||
| diff --git a/theme/admin/img/left-menu-bg.gif b/theme/admin/img/left-menu-bg.gif new file mode 100644 index 0000000..2016cfb --- /dev/null +++ b/theme/admin/img/left-menu-bg.gif | |||
| Binary files differ | |||
| diff --git a/theme/admin/img/select_left.gif b/theme/admin/img/select_left.gif new file mode 100644 index 0000000..37dd0c4 --- /dev/null +++ b/theme/admin/img/select_left.gif | |||
| Binary files differ | |||
| diff --git a/theme/admin/img/select_right.gif b/theme/admin/img/select_right.gif new file mode 100644 index 0000000..6cdf5e3 --- /dev/null +++ b/theme/admin/img/select_right.gif | |||
| Binary files differ | |||
| diff --git a/theme/admin/img/top-menu-bg.gif b/theme/admin/img/top-menu-bg.gif new file mode 100644 index 0000000..b768caf --- /dev/null +++ b/theme/admin/img/top-menu-bg.gif | |||
| Binary files differ | |||
| diff --git a/theme/admin/img/top-menu-item-bg.gif b/theme/admin/img/top-menu-item-bg.gif new file mode 100644 index 0000000..6563276 --- /dev/null +++ b/theme/admin/img/top-menu-item-bg.gif | |||
| Binary files differ | |||
| diff --git a/theme/admin/img/transdmin-light.gif b/theme/admin/img/transdmin-light.gif new file mode 100644 index 0000000..a52ee6c --- /dev/null +++ b/theme/admin/img/transdmin-light.gif | |||
| Binary files differ | |||
| diff --git a/theme/admin/index.tpl b/theme/admin/index.tpl deleted file mode 100755 index 4e57dd9..0000000 --- a/theme/admin/index.tpl +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | <h2>Admin Panel</h2><p> | ||
| 2 | |||
| 3 | Welcome to the ubiquitous administration panel!</p> | ||
| 4 | |||
| 5 | <h3>Blog</h3> | ||
| 6 | |||
| 7 | <ul> | ||
| 8 | <li><a href="/admin/writePost.php">Write a post</a></li> | ||
| 9 | <li><a href="/admin/manageDrafts.php">Manage Drafts</a></li> | ||
| 10 | <li><a href="/admin/managePending.php">Manage Pending Posts</a></li> | ||
| 11 | <li><a href="/admin/managePosts.php">Manage Published Posts</a></li> | ||
| 12 | <li><a href="/admin/moderateComments.php">Moderate Comments</a></li> | ||
| 13 | </ul> | ||
| 14 | |||
| 15 | <h3>Poll</h3> | ||
| 16 | |||
| 17 | <ul> | ||
| 18 | <li><a href="/admin/pollProcess.php">Weekly Poll Process</a></li> | ||
| 19 | </ul> | ||
| 20 | |||
| 21 | <h3>Quotes</h3> | ||
| 22 | |||
| 23 | <ul> | ||
| 24 | <li><a href="/admin/managePendingQuotes.php">Manage Pending Quotes</a></li> | ||
| 25 | </ul> | ||
| 26 | |||
| 27 | <h3>Administration</h3> | ||
| 28 | |||
| 29 | <ul> | ||
| 30 | <li><a href="/admin/hgUpdate.php">HG Update</a></li> | ||
| 31 | <li><a href="/admin/maintenanceMode.php">Maintenance Mode</a></li> | ||
| 32 | </ul> | ||
| diff --git a/theme/admin/js/jquery.js b/theme/admin/js/jquery.js new file mode 100755 index 0000000..f954b6b --- /dev/null +++ b/theme/admin/js/jquery.js | |||
| @@ -0,0 +1 @@ | |||
| eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('7(1C 1w.6=="T"){1w.T=1w.T;B 6=u(a,c){7(1w==q)v 1p 6(a,c);a=a||17;7(6.1t(a))v 1p 6(17)[6.E.27?"27":"2O"](a);7(1C a=="23"){B m=/^[^<]*(<(.|\\s)+>)[^>]*$/.2Q(a);7(m)a=6.3k([m[1]]);J v 1p 6(c).2o(a)}v q.6r(a.1l==2y&&a||(a.3Y||a.I&&a!=1w&&!a.24&&a[0]!=T&&a[0].24)&&6.3M(a)||[a])};7(1C $!="T")6.2S$=$;B $=6;6.E=6.8p={3Y:"1.1.2",8q:u(){v q.I},I:0,2b:u(1T){v 1T==T?6.3M(q):q[1T]},2r:u(a){B L=6(a);L.6p=q;v L},6r:u(a){q.I=0;[].1g.14(q,a);v q},K:u(E,1E){v 6.K(q,E,1E)},2h:u(1c){B 4c=-1;q.K(u(i){7(q==1c)4c=i});v 4c},1I:u(1Y,O,C){B 1c=1Y;7(1Y.1l==3t)7(O==T)v q.I&&6[C||"1I"](q[0],1Y)||T;J{1c={};1c[1Y]=O}v q.K(u(2h){P(B H 1x 1c)6.1I(C?q.1q:q,H,6.H(q,1c[H],C,2h,H))})},1m:u(1Y,O){v q.1I(1Y,O,"30")},2L:u(e){7(1C e=="23")v q.3u().3r(17.8t(e));B t="";6.K(e||q,u(){6.K(q.2I,u(){7(q.24!=8)t+=q.24!=1?q.60:6.E.2L([q])})});v t},2K:u(){B a=6.3k(1A);v q.K(u(){B b=a[0].3l(U);q.11.2X(b,q);22(b.1b)b=b.1b;b.4C(q)})},3r:u(){v q.3j(1A,U,1,u(a){q.4C(a)})},5i:u(){v q.3j(1A,U,-1,u(a){q.2X(a,q.1b)})},5j:u(){v q.3j(1A,12,1,u(a){q.11.2X(a,q)})},5t:u(){v q.3j(1A,12,-1,u(a){q.11.2X(a,q.2e)})},4g:u(){v q.6p||6([])},2o:u(t){v q.2r(6.31(q,u(a){v 6.2o(t,a)}),t)},4Y:u(4N){v q.2r(6.31(q,u(a){B a=a.3l(4N!=T?4N:U);a.$1H=16;v a}))},1D:u(t){v q.2r(6.1t(t)&&6.2q(q,u(2z,2h){v t.14(2z,[2h])})||6.3z(t,q))},2g:u(t){v q.2r(t.1l==3t&&6.3z(t,q,U)||6.2q(q,u(a){v(t.1l==2y||t.3Y)?6.3y(a,t)<0:a!=t}))},1M:u(t){v q.2r(6.2k(q.2b(),t.1l==3t?6(t).2b():t.I!=T&&(!t.1f||t.1f=="8v")?t:[t]))},4l:u(1s){v 1s?6.1D(1s,q).r.I>0:12},1a:u(1a){v 1a==T?(q.I?q[0].O:16):q.1I("O",1a)},4U:u(1a){v 1a==T?(q.I?q[0].2t:16):q.3u().3r(1a)},3j:u(1E,1P,3Z,E){B 4Y=q.I>1;B a=6.3k(1E);7(3Z<0)a.8w();v q.K(u(){B 1c=q;7(1P&&6.1f(q,"1P")&&6.1f(a[0],"3m"))1c=q.5J("20")[0]||q.4C(17.6n("20"));6.K(a,u(){E.14(1c,[4Y?q.3l(U):q])})})}};6.1z=6.E.1z=u(){B 1O=1A[0],a=1;7(1A.I==1){1O=q;a=0}B H;22(H=1A[a++])P(B i 1x H)1O[i]=H[i];v 1O};6.1z({8x:u(){7(6.2S$)$=6.2S$;v 6},1t:u(E){v!!E&&1C E!="23"&&!E.1f&&1C E[0]=="T"&&/u/i.1n(E+"")},4B:u(D){v D.66&&D.5I&&!D.5I.64},1f:u(D,Y){v D.1f&&D.1f.3K()==Y.3K()},K:u(1c,E,1E){7(1c.I==T)P(B i 1x 1c)E.14(1c[i],1E||[i,1c[i]]);J P(B i=0,6q=1c.I;i<6q;i++)7(E.14(1c[i],1E||[i,1c[i]])===12)3O;v 1c},H:u(D,O,C,2h,H){7(6.1t(O))O=O.3n(D,[2h]);B 6s=/z-?2h|7P-?8A|1d|58|8B-?28/i;v O&&O.1l==3Q&&C=="30"&&!6s.1n(H)?O+"4S":O},19:{1M:u(D,c){6.K(c.3o(/\\s+/),u(i,Q){7(!6.19.2V(D.19,Q))D.19+=(D.19?" ":"")+Q})},2f:u(D,c){D.19=c?6.2q(D.19.3o(/\\s+/),u(Q){v!6.19.2V(c,Q)}).6t(" "):""},2V:u(t,c){t=t.19||t;c=c.1R(/([\\.\\\\\\+\\*\\?\\[\\^\\]\\$\\(\\)\\{\\}\\=\\!\\<\\>\\|\\:])/g,"\\\\$1");v t&&1p 4v("(^|\\\\s)"+c+"(\\\\s|$)").1n(t)}},4d:u(e,o,f){P(B i 1x o){e.1q["1N"+i]=e.1q[i];e.1q[i]=o[i]}f.14(e,[]);P(B i 1x o)e.1q[i]=e.1q["1N"+i]},1m:u(e,p){7(p=="28"||p=="3V"){B 1N={},46,3P,d=["7d","8C","8D","8E"];6.K(d,u(){1N["8F"+q]=0;1N["8G"+q+"8H"]=0});6.4d(e,1N,u(){7(6.1m(e,"1h")!="1Z"){46=e.8I;3P=e.8J}J{e=6(e.3l(U)).2o(":4j").5l("2Z").4g().1m({4n:"1G",45:"8K",1h:"2D",7I:"0",8M:"0"}).5z(e.11)[0];B 3d=6.1m(e.11,"45");7(3d==""||3d=="4b")e.11.1q.45="6x";46=e.6y;3P=e.6z;7(3d==""||3d=="4b")e.11.1q.45="4b";e.11.33(e)}});v p=="28"?46:3P}v 6.30(e,p)},30:u(D,H,53){B L;7(H=="1d"&&6.W.1j)v 6.1I(D.1q,"1d");7(H=="4h"||H=="2v")H=6.W.1j?"3T":"2v";7(!53&&D.1q[H])L=D.1q[H];J 7(17.44&&17.44.4W){7(H=="2v"||H=="3T")H="4h";H=H.1R(/([A-Z])/g,"-$1").4m();B Q=17.44.4W(D,16);7(Q)L=Q.55(H);J 7(H=="1h")L="1Z";J 6.4d(D,{1h:"2D"},u(){B c=17.44.4W(q,"");L=c&&c.55(H)||""})}J 7(D.51){B 56=H.1R(/\\-(\\w)/g,u(m,c){v c.3K()});L=D.51[H]||D.51[56]}v L},3k:u(a){B r=[];6.K(a,u(i,1r){7(!1r)v;7(1r.1l==3Q)1r=1r.6C();7(1C 1r=="23"){B s=6.35(1r),1V=17.6n("1V"),2i=[];B 2K=!s.18("<1u")&&[1,"<42>","</42>"]||(!s.18("<6D")||!s.18("<20")||!s.18("<6E"))&&[1,"<1P>","</1P>"]||!s.18("<3m")&&[2,"<1P><20>","</20></1P>"]||(!s.18("<6F")||!s.18("<6G"))&&[3,"<1P><20><3m>","</3m></20></1P>"]||[0,"",""];1V.2t=2K[1]+s+2K[2];22(2K[0]--)1V=1V.1b;7(6.W.1j){7(!s.18("<1P")&&s.18("<20")<0)2i=1V.1b&&1V.1b.2I;J 7(2K[1]=="<1P>"&&s.18("<20")<0)2i=1V.2I;P(B n=2i.I-1;n>=0;--n)7(6.1f(2i[n],"20")&&!2i[n].2I.I)2i[n].11.33(2i[n])}1r=[];P(B i=0,l=1V.2I.I;i<l;i++)1r.1g(1V.2I[i])}7(1r.I===0&&!6.1f(1r,"3w"))v;7(1r[0]==T||6.1f(1r,"3w"))r.1g(1r);J r=6.2k(r,1r)});v r},1I:u(D,Y,O){B 2j=6.4B(D)?{}:{"P":"6J","6L":"19","4h":6.W.1j?"3T":"2v",2v:6.W.1j?"3T":"2v",2t:"2t",19:"19",O:"O",2W:"2W",2Z:"2Z",89:"6N",2Y:"2Y"};7(Y=="1d"&&6.W.1j&&O!=T){D.58=1;v D.1D=D.1D.1R(/4i\\([^\\)]*\\)/6O,"")+(O==1?"":"4i(1d="+O*6g+")")}J 7(Y=="1d"&&6.W.1j)v D.1D?4T(D.1D.6P(/4i\\(1d=(.*)\\)/)[1])/6g:1;7(Y=="1d"&&6.W.3h&&O==1)O=0.6R;7(2j[Y]){7(O!=T)D[2j[Y]]=O;v D[2j[Y]]}J 7(O==T&&6.W.1j&&6.1f(D,"3w")&&(Y=="81"||Y=="80"))v D.6T(Y).60;J 7(D.66){7(O!=T)D.6V(Y,O);7(6.W.1j&&/5E|3e/.1n(Y)&&!6.4B(D))v D.36(Y,2);v D.36(Y)}J{Y=Y.1R(/-([a-z])/6W,u(z,b){v b.3K()});7(O!=T)D[Y]=O;v D[Y]}},35:u(t){v t.1R(/^\\s+|\\s+$/g,"")},3M:u(a){B r=[];7(a.1l!=2y)P(B i=0,2R=a.I;i<2R;i++)r.1g(a[i]);J r=a.3N(0);v r},3y:u(b,a){P(B i=0,2R=a.I;i<2R;i++)7(a[i]==b)v i;v-1},2k:u(2u,3H){B r=[].3N.3n(2u,0);P(B i=0,5b=3H.I;i<5b;i++)7(6.3y(3H[i],r)==-1)2u.1g(3H[i]);v 2u},2q:u(1U,E,4k){7(1C E=="23")E=1p 4w("a","i","v "+E);B 1i=[];P(B i=0,2z=1U.I;i<2z;i++)7(!4k&&E(1U[i],i)||4k&&!E(1U[i],i))1i.1g(1U[i]);v 1i},31:u(1U,E){7(1C E=="23")E=1p 4w("a","v "+E);B 1i=[],r=[];P(B i=0,2z=1U.I;i<2z;i++){B 1a=E(1U[i],i);7(1a!==16&&1a!=T){7(1a.1l!=2y)1a=[1a];1i=1i.6Z(1a)}}B r=1i.I?[1i[0]]:[];5f:P(B i=1,5e=1i.I;i<5e;i++){P(B j=0;j<i;j++)7(1i[i]==r[j])5F 5f;r.1g(1i[i])}v r}});1p u(){B b=7L.71.4m();6.W={2N:/5D/.1n(b),3f:/3f/.1n(b),1j:/1j/.1n(b)&&!/3f/.1n(b),3h:/3h/.1n(b)&&!/(72|5D)/.1n(b)};6.7H=!6.W.1j||17.74=="75"};6.K({5u:"a.11",4z:"6.4z(a)",76:"6.2a(a,2,\'2e\')",7D:"6.2a(a,2,\'5s\')",78:"6.2B(a.11.1b,a)",79:"6.2B(a.1b)"},u(i,n){6.E[i]=u(a){B L=6.31(q,n);7(a&&1C a=="23")L=6.3z(a,L);v q.2r(L)}});6.K({5z:"3r",7b:"5i",2X:"5j",7e:"5t"},u(i,n){6.E[i]=u(){B a=1A;v q.K(u(){P(B j=0,2R=a.I;j<2R;j++)6(a[j])[n](q)})}});6.K({5l:u(1Y){6.1I(q,1Y,"");q.7g(1Y)},7h:u(c){6.19.1M(q,c)},7i:u(c){6.19.2f(q,c)},7k:u(c){6.19[6.19.2V(q,c)?"2f":"1M"](q,c)},2f:u(a){7(!a||6.1D(a,[q]).r.I)q.11.33(q)},3u:u(){22(q.1b)q.33(q.1b)}},u(i,n){6.E[i]=u(){v q.K(n,1A)}});6.K(["5q","5n","5p","5v"],u(i,n){6.E[n]=u(1T,E){v q.1D(":"+n+"("+1T+")",E)}});6.K(["28","3V"],u(i,n){6.E[n]=u(h){v h==T?(q.I?6.1m(q[0],n):16):q.1m(n,h.1l==3t?h:h+"4S")}});6.1z({1s:{"":"m[2]==\'*\'||6.1f(a,m[2])","#":"a.36(\'2J\')==m[2]",":":{5n:"i<m[3]-0",5p:"i>m[3]-0",2a:"m[3]-0==i",5q:"m[3]-0==i",2u:"i==0",2T:"i==r.I-1",5R:"i%2==0",5S:"i%2","2a-3s":"6.2a(a.11.1b,m[3],\'2e\',a)==a","2u-3s":"6.2a(a.11.1b,1,\'2e\')==a","2T-3s":"6.2a(a.11.7n,1,\'5s\')==a","7p-3s":"6.2B(a.11.1b).I==1",5u:"a.1b",3u:"!a.1b",5v:"6.E.2L.14([a]).18(m[3])>=0",3i:\'a.C!="1G"&&6.1m(a,"1h")!="1Z"&&6.1m(a,"4n")!="1G"\',1G:\'a.C=="1G"||6.1m(a,"1h")=="1Z"||6.1m(a,"4n")=="1G"\',7v:"!a.2W",2W:"a.2W",2Z:"a.2Z",2Y:"a.2Y||6.1I(a,\'2Y\')",2L:"a.C==\'2L\'",4j:"a.C==\'4j\'",5x:"a.C==\'5x\'",4G:"a.C==\'4G\'",5y:"a.C==\'5y\'",4R:"a.C==\'4R\'",5A:"a.C==\'5A\'",5B:"a.C==\'5B\'",3x:\'a.C=="3x"||6.1f(a,"3x")\',5C:"/5C|42|7A|3x/i.1n(a.1f)"},".":"6.19.2V(a,m[2])","@":{"=":"z==m[4]","!=":"z!=m[4]","^=":"z&&!z.18(m[4])","$=":"z&&z.2U(z.I - m[4].I,m[4].I)==m[4]","*=":"z&&z.18(m[4])>=0","":"z",4u:u(m){v["",m[1],m[3],m[2],m[5]]},5P:"z=a[m[3]];7(!z||/5E|3e/.1n(m[3]))z=6.1I(a,m[3]);"},"[":"6.2o(m[2],a).I"},5M:[/^\\[ *(@)([a-2m-3C-]*) *([!*$^=]*) *(\'?"?)(.*?)\\4 *\\]/i,/^(\\[)\\s*(.*?(\\[.*?\\])?[^[]*?)\\s*\\]/,/^(:)([a-2m-3C-]*)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/i,/^([:.#]*)([a-2m-3C*-]*)/i],1Q:[/^(\\/?\\.\\.)/,"a.11",/^(>|\\/)/,"6.2B(a.1b)",/^(\\+)/,"6.2a(a,2,\'2e\')",/^(~)/,u(a){B s=6.2B(a.11.1b);v s.3N(6.3y(a,s)+1)}],3z:u(1s,1U,2g){B 1N,Q=[];22(1s&&1s!=1N){1N=1s;B f=6.1D(1s,1U,2g);1s=f.t.1R(/^\\s*,\\s*/,"");Q=2g?1U=f.r:6.2k(Q,f.r)}v Q},2o:u(t,1B){7(1C t!="23")v[t];7(1B&&!1B.24)1B=16;1B=1B||17;7(!t.18("//")){1B=1B.4H;t=t.2U(2,t.I)}J 7(!t.18("/")){1B=1B.4H;t=t.2U(1,t.I);7(t.18("/")>=1)t=t.2U(t.18("/"),t.I)}B L=[1B],2c=[],2T=16;22(t&&2T!=t){B r=[];2T=t;t=6.35(t).1R(/^\\/\\//i,"");B 3B=12;B 1J=/^[\\/>]\\s*([a-2m-9*-]+)/i;B m=1J.2Q(t);7(m){6.K(L,u(){P(B c=q.1b;c;c=c.2e)7(c.24==1&&(6.1f(c,m[1])||m[1]=="*"))r.1g(c)});L=r;t=t.1R(1J,"");7(t.18(" ")==0)5F;3B=U}J{P(B i=0;i<6.1Q.I;i+=2){B 1J=6.1Q[i];B m=1J.2Q(t);7(m){r=L=6.31(L,6.1t(6.1Q[i+1])?6.1Q[i+1]:u(a){v 40(6.1Q[i+1])});t=6.35(t.1R(1J,""));3B=U;3O}}}7(t&&!3B){7(!t.18(",")){7(L[0]==1B)L.4L();6.2k(2c,L);r=L=[1B];t=" "+t.2U(1,t.I)}J{B 34=/^([a-2m-3C-]+)(#)([a-2m-9\\\\*2S-]*)/i;B m=34.2Q(t);7(m){m=[0,m[2],m[3],m[1]]}J{34=/^([#.]?)([a-2m-9\\\\*2S-]*)/i;m=34.2Q(t)}7(m[1]=="#"&&L[L.I-1].4X){B 2l=L[L.I-1].4X(m[2]);7(6.W.1j&&2l&&2l.2J!=m[2])2l=6(\'[@2J="\'+m[2]+\'"]\',L[L.I-1])[0];L=r=2l&&(!m[3]||6.1f(2l,m[3]))?[2l]:[]}J{7(m[1]==".")B 4r=1p 4v("(^|\\\\s)"+m[2]+"(\\\\s|$)");6.K(L,u(){B 3E=m[1]!=""||m[0]==""?"*":m[2];7(6.1f(q,"7J")&&3E=="*")3E="3g";6.2k(r,m[1]!=""&&L.I!=1?6.4x(q,[],m[1],m[2],4r):q.5J(3E))});7(m[1]=="."&&L.I==1)r=6.2q(r,u(e){v 4r.1n(e.19)});7(m[1]=="#"&&L.I==1){B 5K=r;r=[];6.K(5K,u(){7(q.36("2J")==m[2]){r=[q];v 12}})}L=r}t=t.1R(34,"")}}7(t){B 1a=6.1D(t,r);L=r=1a.r;t=6.35(1a.t)}}7(L&&L[0]==1B)L.4L();6.2k(2c,L);v 2c},1D:u(t,r,2g){22(t&&/^[a-z[({<*:.#]/i.1n(t)){B p=6.5M,m;6.K(p,u(i,1J){m=1J.2Q(t);7(m){t=t.7M(m[0].I);7(6.1s[m[1]].4u)m=6.1s[m[1]].4u(m);v 12}});7(m[1]==":"&&m[2]=="2g")r=6.1D(m[3],r,U).r;J 7(m[1]=="."){B 1J=1p 4v("(^|\\\\s)"+m[2]+"(\\\\s|$)");r=6.2q(r,u(e){v 1J.1n(e.19||"")},2g)}J{B f=6.1s[m[1]];7(1C f!="23")f=6.1s[m[1]][m[2]];40("f = u(a,i){"+(6.1s[m[1]].5P||"")+"v "+f+"}");r=6.2q(r,f,2g)}}v{r:r,t:t}},4x:u(o,r,1Q,Y,1J){P(B s=o.1b;s;s=s.2e)7(s.24==1){B 1M=U;7(1Q==".")1M=s.19&&1J.1n(s.19);J 7(1Q=="#")1M=s.36("2J")==Y;7(1M)r.1g(s);7(1Q=="#"&&r.I)3O;7(s.1b)6.4x(s,r,1Q,Y,1J)}v r},4z:u(D){B 4A=[];B Q=D.11;22(Q&&Q!=17){4A.1g(Q);Q=Q.11}v 4A},2a:u(Q,1i,3Z,D){1i=1i||1;B 1T=0;P(;Q;Q=Q[3Z]){7(Q.24==1)1T++;7(1T==1i||1i=="5R"&&1T%2==0&&1T>1&&Q==D||1i=="5S"&&1T%2==1&&Q==D)v Q}},2B:u(n,D){B r=[];P(;n;n=n.2e){7(n.24==1&&(!D||n!=D))r.1g(n)}v r}});6.G={1M:u(S,C,1o,F){7(6.W.1j&&S.3L!=T)S=1w;7(F)1o.F=F;7(!1o.2A)1o.2A=q.2A++;7(!S.$1H)S.$1H={};B 38=S.$1H[C];7(!38){38=S.$1H[C]={};7(S["39"+C])38[0]=S["39"+C]}38[1o.2A]=1o;S["39"+C]=q.5Y;7(!q.1k[C])q.1k[C]=[];q.1k[C].1g(S)},2A:1,1k:{},2f:u(S,C,1o){7(S.$1H){B i,j,k;7(C&&C.C){1o=C.1o;C=C.C}7(C&&S.$1H[C])7(1o)5U S.$1H[C][1o.2A];J P(i 1x S.$1H[C])5U S.$1H[C][i];J P(j 1x S.$1H)q.2f(S,j);P(k 1x S.$1H[C])7(k){k=U;3O}7(!k)S["39"+C]=16}},1S:u(C,F,S){F=6.3M(F||[]);7(!S)6.K(q.1k[C]||[],u(){6.G.1S(C,F,q)});J{B 1o=S["39"+C],1a,E=6.1t(S[C]);7(1o){F.61(q.2j({C:C,1O:S}));7((1a=1o.14(S,F))!==12)q.4F=U}7(E&&1a!==12)S[C]();q.4F=12}},5Y:u(G){7(1C 6=="T"||6.G.4F)v;G=6.G.2j(G||1w.G||{});B 3R;B c=q.$1H[G.C];B 1E=[].3N.3n(1A,1);1E.61(G);P(B j 1x c){1E[0].1o=c[j];1E[0].F=c[j].F;7(c[j].14(q,1E)===12){G.2n();G.2H();3R=12}}7(6.W.1j)G.1O=G.2n=G.2H=G.1o=G.F=16;v 3R},2j:u(G){7(!G.1O&&G.63)G.1O=G.63;7(G.65==T&&G.67!=T){B e=17.4H,b=17.64;G.65=G.67+(e.68||b.68);G.7Y=G.7Z+(e.6c||b.6c)}7(6.W.2N&&G.1O.24==3){B 3a=G;G=6.1z({},3a);G.1O=3a.1O.11;G.2n=u(){v 3a.2n()};G.2H=u(){v 3a.2H()}}7(!G.2n)G.2n=u(){q.3R=12};7(!G.2H)G.2H=u(){q.82=U};v G}};6.E.1z({3U:u(C,F,E){v q.K(u(){6.G.1M(q,C,E||F,F)})},6u:u(C,F,E){v q.K(u(){6.G.1M(q,C,u(G){6(q).6f(G);v(E||F).14(q,1A)},F)})},6f:u(C,E){v q.K(u(){6.G.2f(q,C,E)})},1S:u(C,F){v q.K(u(){6.G.1S(C,F,q)})},3X:u(){B a=1A;v q.6j(u(e){q.4M=q.4M==0?1:0;e.2n();v a[q.4M].14(q,[e])||12})},83:u(f,g){u 4O(e){B p=(e.C=="41"?e.84:e.85)||e.86;22(p&&p!=q)2G{p=p.11}2w(e){p=q};7(p==q)v 12;v(e.C=="41"?f:g).14(q,[e])}v q.41(4O).6k(4O)},27:u(f){7(6.3W)f.14(17,[6]);J{6.3c.1g(u(){v f.14(q,[6])})}v q}});6.1z({3W:12,3c:[],27:u(){7(!6.3W){6.3W=U;7(6.3c){6.K(6.3c,u(){q.14(17)});6.3c=16}7(6.W.3h||6.W.3f)17.87("6o",6.27,12)}}});1p u(){6.K(("88,8a,2O,8b,8d,52,6j,8e,"+"8f,8g,8h,41,6k,8j,42,"+"4R,8k,8l,8m,2C").3o(","),u(i,o){6.E[o]=u(f){v f?q.3U(o,f):q.1S(o)}});7(6.W.3h||6.W.3f)17.8n("6o",6.27,12);J 7(6.W.1j){17.8o("<8r"+"8s 2J=62 8u=U "+"3e=//:><\\/2d>");B 2d=17.4X("62");7(2d)2d.37=u(){7(q.3D!="1X")v;q.11.33(q);6.27()};2d=16}J 7(6.W.2N)6.50=3L(u(){7(17.3D=="8y"||17.3D=="1X"){4p(6.50);6.50=16;6.27()}},10);6.G.1M(1w,"2O",6.27)};7(6.W.1j)6(1w).6u("52",u(){B 1k=6.G.1k;P(B C 1x 1k){B 4Z=1k[C],i=4Z.I;7(i&&C!=\'52\')6w 6.G.2f(4Z[i-1],C);22(--i)}});6.E.1z({6A:u(V,21,M){q.2O(V,21,M,1)},2O:u(V,21,M,1W){7(6.1t(V))v q.3U("2O",V);M=M||u(){};B C="5d";7(21)7(6.1t(21)){M=21;21=16}J{21=6.3g(21);C="5V"}B 4e=q;6.3v({V:V,C:C,F:21,1W:1W,1X:u(2P,15){7(15=="2M"||!1W&&15=="5L")4e.1I("2t",2P.3G).4V().K(M,[2P.3G,15,2P]);J M.14(4e,[2P.3G,15,2P])}});v q},6B:u(){v 6.3g(q)},4V:u(){v q.2o("2d").K(u(){7(q.3e)6.59(q.3e);J 6.4a(q.2L||q.6H||q.2t||"")}).4g()}});7(!1w.3p)3p=u(){v 1p 6I("6K.6M")};6.K("5m,5Q,5O,5W,5N,5H".3o(","),u(i,o){6.E[o]=u(f){v q.3U(o,f)}});6.1z({2b:u(V,F,M,C,1W){7(6.1t(F)){M=F;F=16}v 6.3v({V:V,F:F,2M:M,4t:C,1W:1W})},6Q:u(V,F,M,C){v 6.2b(V,F,M,C,1)},59:u(V,M){v 6.2b(V,16,M,"2d")},6S:u(V,F,M){v 6.2b(V,F,M,"6m")},6U:u(V,F,M,C){7(6.1t(F)){M=F;F={}}v 6.3v({C:"5V",V:V,F:F,2M:M,4t:C})},6X:u(29){6.3q.29=29},6Y:u(5c){6.1z(6.3q,5c)},3q:{1k:U,C:"5d",29:0,5r:"70/x-73-3w-77",5h:U,48:U,F:16},3S:{},3v:u(s){s=6.1z({},6.3q,s);7(s.F){7(s.5h&&1C s.F!="23")s.F=6.3g(s.F);7(s.C.4m()=="2b"){s.V+=((s.V.18("?")>-1)?"&":"?")+s.F;s.F=16}}7(s.1k&&!6.4E++)6.G.1S("5m");B 4y=12;B N=1p 3p();N.7j(s.C,s.V,s.48);7(s.F)N.3A("7l-7m",s.5r);7(s.1W)N.3A("7o-4K-7q",6.3S[s.V]||"7s, 7t 7w 7x 4o:4o:4o 7z");N.3A("X-7B-7C","3p");7(N.7E)N.3A("7F","7G");7(s.5G)s.5G(N);7(s.1k)6.G.1S("5H",[N,s]);B 37=u(4s){7(N&&(N.3D==4||4s=="29")){4y=U;7(3I){4p(3I);3I=16}B 15;2G{15=6.5Z(N)&&4s!="29"?s.1W&&6.69(N,s.V)?"5L":"2M":"2C";7(15!="2C"){B 3F;2G{3F=N.4P("6b-4K")}2w(e){}7(s.1W&&3F)6.3S[s.V]=3F;B F=6.6i(N,s.4t);7(s.2M)s.2M(F,15);7(s.1k)6.G.1S("5N",[N,s])}J 6.3J(s,N,15)}2w(e){15="2C";6.3J(s,N,15,e)}7(s.1k)6.G.1S("5O",[N,s]);7(s.1k&&!--6.4E)6.G.1S("5Q");7(s.1X)s.1X(N,15);7(s.48)N=16}};B 3I=3L(37,13);7(s.29>0)57(u(){7(N){N.7N();7(!4y)37("29")}},s.29);2G{N.7Q(s.F)}2w(e){6.3J(s,N,16,e)}7(!s.48)37();v N},3J:u(s,N,15,e){7(s.2C)s.2C(N,15,e);7(s.1k)6.G.1S("5W",[N,s,e])},4E:0,5Z:u(r){2G{v!r.15&&7V.7W=="4G:"||(r.15>=5X&&r.15<7X)||r.15==6d||6.W.2N&&r.15==T}2w(e){}v 12},69:u(N,V){2G{B 6e=N.4P("6b-4K");v N.15==6d||6e==6.3S[V]||6.W.2N&&N.15==T}2w(e){}v 12},6i:u(r,C){B 4Q=r.4P("8c-C");B F=!C&&4Q&&4Q.18("N")>=0;F=C=="N"||F?r.8i:r.3G;7(C=="2d")6.4a(F);7(C=="6m")40("F = "+F);7(C=="4U")6("<1V>").4U(F).4V();v F},3g:u(a){B s=[];7(a.1l==2y||a.3Y)6.K(a,u(){s.1g(2x(q.Y)+"="+2x(q.O))});J P(B j 1x a)7(a[j]&&a[j].1l==2y)6.K(a[j],u(){s.1g(2x(j)+"="+2x(q))});J s.1g(2x(j)+"="+2x(a[j]));v s.6t("&")},4a:u(F){7(1w.54)1w.54(F);J 7(6.W.2N)1w.57(F,0);J 40.3n(1w,F)}});6.E.1z({1L:u(R,M){B 1G=q.1D(":1G");R?1G.26({28:"1L",3V:"1L",1d:"1L"},R,M):1G.K(u(){q.1q.1h=q.2E?q.2E:"";7(6.1m(q,"1h")=="1Z")q.1q.1h="2D"});v q},1K:u(R,M){B 3i=q.1D(":3i");R?3i.26({28:"1K",3V:"1K",1d:"1K"},R,M):3i.K(u(){q.2E=q.2E||6.1m(q,"1h");7(q.2E=="1Z")q.2E="2D";q.1q.1h="1Z"});v q},5g:6.E.3X,3X:u(E,4I){B 1E=1A;v 6.1t(E)&&6.1t(4I)?q.5g(E,4I):q.K(u(){6(q)[6(q).4l(":1G")?"1L":"1K"].14(6(q),1E)})},7a:u(R,M){v q.26({28:"1L"},R,M)},7c:u(R,M){v q.26({28:"1K"},R,M)},7f:u(R,M){v q.K(u(){B 5k=6(q).4l(":1G")?"1L":"1K";6(q).26({28:5k},R,M)})},7r:u(R,M){v q.26({1d:"1L"},R,M)},7u:u(R,M){v q.26({1d:"1K"},R,M)},7y:u(R,43,M){v q.26({1d:43},R,M)},26:u(H,R,1v,M){v q.1F(u(){q.2F=6.1z({},H);B 1u=6.R(R,1v,M);P(B p 1x H){B e=1p 6.3b(q,1u,p);7(H[p].1l==3Q)e.2s(e.Q(),H[p]);J e[H[p]](H)}})},1F:u(C,E){7(!E){E=C;C="3b"}v q.K(u(){7(!q.1F)q.1F={};7(!q.1F[C])q.1F[C]=[];q.1F[C].1g(E);7(q.1F[C].I==1)E.14(q)})}});6.1z({R:u(R,1v,E){B 1u=R&&R.1l==7K?R:{1X:E||!E&&1v||6.1t(R)&&R,25:R,1v:E&&1v||1v&&1v.1l!=4w&&1v};1u.25=(1u.25&&1u.25.1l==3Q?1u.25:{7R:7S,7T:5X}[1u.25])||7U;1u.1N=1u.1X;1u.1X=u(){6.6a(q,"3b");7(6.1t(1u.1N))1u.1N.14(q)};v 1u},1v:{},1F:{},6a:u(D,C){C=C||"3b";7(D.1F&&D.1F[C]){D.1F[C].4L();B f=D.1F[C][0];7(f)f.14(D)}},3b:u(D,1e,H){B z=q;B y=D.1q;B 4D=6.1m(D,"1h");y.5T="1G";z.a=u(){7(1e.49)1e.49.14(D,[z.2p]);7(H=="1d")6.1I(y,"1d",z.2p);J 7(6l(z.2p))y[H]=6l(z.2p)+"4S";y.1h="2D"};z.6v=u(){v 4T(6.1m(D,H))};z.Q=u(){B r=4T(6.30(D,H));v r&&r>-8z?r:z.6v()};z.2s=u(4f,43){z.4J=(1p 5o()).5w();z.2p=4f;z.a();z.4q=3L(u(){z.49(4f,43)},13)};z.1L=u(){7(!D.1y)D.1y={};D.1y[H]=q.Q();1e.1L=U;z.2s(0,D.1y[H]);7(H!="1d")y[H]="5a"};z.1K=u(){7(!D.1y)D.1y={};D.1y[H]=q.Q();1e.1K=U;z.2s(D.1y[H],0)};z.3X=u(){7(!D.1y)D.1y={};D.1y[H]=q.Q();7(4D=="1Z"){1e.1L=U;7(H!="1d")y[H]="5a";z.2s(0,D.1y[H])}J{1e.1K=U;z.2s(D.1y[H],0)}};z.49=u(32,47){B t=(1p 5o()).5w();7(t>1e.25+z.4J){4p(z.4q);z.4q=16;z.2p=47;z.a();7(D.2F)D.2F[H]=U;B 2c=U;P(B i 1x D.2F)7(D.2F[i]!==U)2c=12;7(2c){y.5T="";y.1h=4D;7(6.1m(D,"1h")=="1Z")y.1h="2D";7(1e.1K)y.1h="1Z";7(1e.1K||1e.1L)P(B p 1x D.2F)7(p=="1d")6.1I(y,p,D.1y[p]);J y[p]=""}7(2c&&6.1t(1e.1X))1e.1X.14(D)}J{B n=t-q.4J;B p=n/1e.25;z.2p=1e.1v&&6.1v[1e.1v]?6.1v[1e.1v](p,n,32,(47-32),1e.25):((-6h.7O(p*6h.8L)/2)+0.5)*(47-32)+32;z.a()}}}})}',62,545,'||||||jQuery|if|||||||||||||||||||this||||function|return||||||var|type|elem|fn|data|event|prop|length|else|each|ret|callback|xml|value|for|cur|speed|element|undefined|true|url|browser||name|||parentNode|false||apply|status|null|document|indexOf|className|val|firstChild|obj|opacity|options|nodeName|push|display|result|msie|global|constructor|css|test|handler|new|style|arg|expr|isFunction|opt|easing|window|in|orig|extend|arguments|context|typeof|filter|args|queue|hidden|events|attr|re|hide|show|add|old|target|table|token|replace|trigger|num|elems|div|ifModified|complete|key|none|tbody|params|while|string|nodeType|duration|animate|ready|height|timeout|nth|get|done|script|nextSibling|remove|not|index|tb|fix|merge|oid|z0|preventDefault|find|now|grep|pushStack|custom|innerHTML|first|cssFloat|catch|encodeURIComponent|Array|el|guid|sibling|error|block|oldblock|curAnim|try|stopPropagation|childNodes|id|wrap|text|success|safari|load|res|exec|al|_|last|substr|has|disabled|insertBefore|selected|checked|curCSS|map|firstNum|removeChild|re2|trim|getAttribute|onreadystatechange|handlers|on|originalEvent|fx|readyList|parPos|src|opera|param|mozilla|visible|domManip|clean|cloneNode|tr|call|split|XMLHttpRequest|ajaxSettings|append|child|String|empty|ajax|form|button|inArray|multiFilter|setRequestHeader|foundToken|9_|readyState|tag|modRes|responseText|second|ival|handleError|toUpperCase|setInterval|makeArray|slice|break|oWidth|Number|returnValue|lastModified|styleFloat|bind|width|isReady|toggle|jquery|dir|eval|mouseover|select|to|defaultView|position|oHeight|lastNum|async|step|globalEval|static|pos|swap|self|from|end|float|alpha|radio|inv|is|toLowerCase|visibility|00|clearInterval|timer|rec|isTimeout|dataType|_resort|RegExp|Function|getAll|requestDone|parents|matched|isXMLDoc|appendChild|oldDisplay|active|triggered|file|documentElement|fn2|startTime|Modified|shift|lastToggle|deep|handleHover|getResponseHeader|ct|submit|px|parseFloat|html|evalScripts|getComputedStyle|getElementById|clone|els|safariTimer|currentStyle|unload|force|execScript|getPropertyValue|newProp|setTimeout|zoom|getScript|1px|sl|settings|GET|rl|check|_toggle|processData|prepend|before|state|removeAttr|ajaxStart|lt|Date|gt|eq|contentType|previousSibling|after|parent|contains|getTime|checkbox|password|appendTo|image|reset|input|webkit|href|continue|beforeSend|ajaxSend|ownerDocument|getElementsByTagName|tmp|notmodified|parse|ajaxSuccess|ajaxComplete|_prefix|ajaxStop|even|odd|overflow|delete|POST|ajaxError|200|handle|httpSuccess|nodeValue|unshift|__ie_init|srcElement|body|pageX|tagName|clientX|scrollLeft|httpNotModified|dequeue|Last|scrollTop|304|xmlRes|unbind|100|Math|httpData|click|mouseout|parseInt|json|createElement|DOMContentLoaded|prevObject|ol|setArray|exclude|join|one|max|do|relative|clientHeight|clientWidth|loadIfModified|serialize|toString|thead|tfoot|td|th|textContent|ActiveXObject|htmlFor|Microsoft|class|XMLHTTP|readOnly|gi|match|getIfModified|9999|getJSON|getAttributeNode|post|setAttribute|ig|ajaxTimeout|ajaxSetup|concat|application|userAgent|compatible|www|compatMode|CSS1Compat|next|urlencoded|siblings|children|slideDown|prependTo|slideUp|Top|insertAfter|slideToggle|removeAttribute|addClass|removeClass|open|toggleClass|Content|Type|lastChild|If|only|Since|fadeIn|Thu|01|fadeOut|enabled|Jan|1970|fadeTo|GMT|textarea|Requested|With|prev|overrideMimeType|Connection|close|boxModel|right|object|Object|navigator|substring|abort|cos|font|send|slow|600|fast|400|location|protocol|300|pageY|clientY|method|action|cancelBubble|hover|fromElement|toElement|relatedTarget|removeEventListener|blur|readonly|focus|resize|content|scroll|dblclick|mousedown|mouseup|mousemove|responseXML|change|keydown|keypress|keyup|addEventListener|write|prototype|size|scr|ipt|createTextNode|defer|FORM|reverse|noConflict|loaded|10000|weight|line|Bottom|Right|Left|padding|border|Width|offsetHeight|offsetWidth|absolute|PI|left'.split('|'),0,{})) | |||
| diff --git a/theme/admin/js/uni-form.jquery.js b/theme/admin/js/uni-form.jquery.js new file mode 100755 index 0000000..9786dde --- /dev/null +++ b/theme/admin/js/uni-form.jquery.js | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | jQuery.fn.uniform = function(settings) { | ||
| 2 | settings = jQuery.extend({ | ||
| 3 | valid_class : 'valid', | ||
| 4 | invalid_class : 'invalid', | ||
| 5 | focused_class : 'focused', | ||
| 6 | holder_class : 'ctrlHolder', | ||
| 7 | field_selector : 'input, select, textarea' | ||
| 8 | }, settings); | ||
| 9 | |||
| 10 | return this.each(function() { | ||
| 11 | var form = jQuery(this); | ||
| 12 | |||
| 13 | // Focus specific control holder | ||
| 14 | var focusControlHolder = function(element) { | ||
| 15 | var parent = element.parent(); | ||
| 16 | |||
| 17 | while(typeof(parent) == 'object') { | ||
| 18 | if(parent) { | ||
| 19 | if(parent[0] && (parent[0].className.indexOf(settings.holder_class) >= 0)) { | ||
| 20 | parent.addClass(settings.focused_class); | ||
| 21 | return; | ||
| 22 | } // if | ||
| 23 | } // if | ||
| 24 | parent = jQuery(parent.parent()); | ||
| 25 | } // while | ||
| 26 | }; | ||
| 27 | |||
| 28 | // Select form fields and attach them higlighter functionality | ||
| 29 | form.find(settings.field_selector).focus(function() { | ||
| 30 | form.find('.' + settings.focused_class).removeClass(settings.focused_class); | ||
| 31 | focusControlHolder(jQuery(this)); | ||
| 32 | }).blur(function() { | ||
| 33 | form.find('.' + settings.focused_class).removeClass(settings.focused_class); | ||
| 34 | }); | ||
| 35 | }); | ||
| 36 | }; | ||
| 37 | |||
| 38 | // Auto set on page load... | ||
| 39 | $(document).ready(function() { | ||
| 40 | jQuery('form.uniForm').uniform(); | ||
| 41 | }); \ No newline at end of file | ||
| diff --git a/theme/admin/maintenance.tpl b/theme/admin/maintenance.tpl new file mode 100644 index 0000000..0f01110 --- /dev/null +++ b/theme/admin/maintenance.tpl | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | <h2>Maintenance Mode</h2> | ||
| 2 | |||
| 3 | <p>Here you can enable/disable Maintenance Mode. When Maintenance Mode is enabled, no one can access Four Island except localhost and a logged in administrator.</p> | ||
| 4 | |||
| 5 | <form action="/admin/maintenance.php?submit=" method="post"> | ||
| 6 | <p> | ||
| 7 | Maintenance Mode: | ||
| 8 | <select name="mode"> | ||
| 9 | <option value="on"<!--ON-->>On</option> | ||
| 10 | <option value="off"<!--OFF-->>Off</option> | ||
| 11 | </select> | ||
| 12 | </p> | ||
| 13 | |||
| 14 | <p> | ||
| 15 | <button type="submit">Submit</button> | ||
| 16 | </p> | ||
| 17 | </form> | ||
| diff --git a/theme/admin/maintenanceMode.tpl b/theme/admin/maintenanceMode.tpl deleted file mode 100644 index 4247a62..0000000 --- a/theme/admin/maintenanceMode.tpl +++ /dev/null | |||
| @@ -1,15 +0,0 @@ | |||
| 1 | <h2>Maintenance Mode</h2> | ||
| 2 | |||
| 3 | <p>Here you can enable/disable Maintenance Mode. When Maintenance Mode is enabled, no one can access Four Island except localhost.</p> | ||
| 4 | |||
| 5 | <form action="/admin/maintenanceMode.php?submit=" method="post"> | ||
| 6 | <center> | ||
| 7 | <input type="radio" name="mode" value="on"<!--ON--> />On<br /> | ||
| 8 | <input type="radio" name="mode" value="off"<!--OFF--> />Off<br /> | ||
| 9 | <input type="submit" /> | ||
| 10 | </center> | ||
| 11 | </form> | ||
| 12 | |||
| 13 | <p> | ||
| 14 | <a href="/admin/">Back to Admin Panel</a> | ||
| 15 | </p> | ||
| diff --git a/theme/admin/manageDrafts.tpl b/theme/admin/manageDrafts.tpl deleted file mode 100755 index 142033a..0000000 --- a/theme/admin/manageDrafts.tpl +++ /dev/null | |||
| @@ -1,24 +0,0 @@ | |||
| 1 | <h2>Manage Drafts</h2> | ||
| 2 | |||
| 3 | <table width="100%" class="webmail"> | ||
| 4 | <tr> | ||
| 5 | <th>Draft Title</th> | ||
| 6 | <th>Draft Author</th> | ||
| 7 | <th>Actions</th> | ||
| 8 | </tr> | ||
| 9 | |||
| 10 | <!--BEGIN DRAFT--> | ||
| 11 | <tr> | ||
| 12 | <td><!--DRAFT.TITLE--></td> | ||
| 13 | <td><!--DRAFT.AUTHOR--></td> | ||
| 14 | |||
| 15 | <td> | ||
| 16 | <a href="/admin/editDraft.php?id=<!--DRAFT.ID-->"><img src="/theme/images/icons/page_edit.png" alt="Edit" /></a> | ||
| 17 | <a href="/admin/deleteDraft.php?id=<!--DRAFT.ID-->"><img src="/theme/images/icons/page_delete.png" alt="Delete" /></a> | ||
| 18 | <a href="/admin/viewDraft.php?id=<!--DRAFT.ID-->"><img src="/theme/images/icons/page_go.png" alt="View" /></a> | ||
| 19 | </td> | ||
| 20 | </tr> | ||
| 21 | <!--END DRAFT--> | ||
| 22 | </table> | ||
| 23 | |||
| 24 | <a href="/admin/">Back to Admin Panel</a> | ||
| diff --git a/theme/admin/managePending.tpl b/theme/admin/managePending.tpl deleted file mode 100755 index 6c98bf8..0000000 --- a/theme/admin/managePending.tpl +++ /dev/null | |||
| @@ -1,26 +0,0 @@ | |||
| 1 | <h2>Manage Pending</h2> | ||
| 2 | |||
| 3 | <table width="100%" class="webmail"> | ||
| 4 | <tr> | ||
| 5 | <th>Pending Post Title</th> | ||
| 6 | <th>Pending Post Author</th> | ||
| 7 | <th>Actions</th> | ||
| 8 | </tr> | ||
| 9 | |||
| 10 | <!--BEGIN PENDING--> | ||
| 11 | <tr> | ||
| 12 | <td><!--PENDING.TITLE--></td> | ||
| 13 | <td><!--PENDING.AUTHOR--></td> | ||
| 14 | |||
| 15 | <td> | ||
| 16 | <a href="/admin/editPending.php?id=<!--PENDING.ID-->"><img src="/theme/images/icons/page_edit.png" alt="Edit" /></a> | ||
| 17 | <a href="/admin/deletePending.php?id=<!--PENDING.ID-->"><img src="/theme/images/icons/page_delete.png" alt="Delete" /></a> | ||
| 18 | <a href="/admin/viewPending.php?id=<!--PENDING.ID-->"><img src="/theme/images/icons/page_go.png" alt="View" /></a> | ||
| 19 | <a href="/admin/movePending.php?id=<!--PENDING.ID-->&dir=up"><img src="/theme/images/icons/thumb_up.png" alt="Move Up" /></a> | ||
| 20 | <a href="/admin/movePending.php?id=<!--PENDING.ID-->&dir=down"><img src="/theme/images/icons/thumb_down.png" alt="Move Down" /></a> | ||
| 21 | </td> | ||
| 22 | </tr> | ||
| 23 | <!--END PENDING--> | ||
| 24 | </table> | ||
| 25 | |||
| 26 | <a href="/admin/">Back to Admin Panel</a> | ||
| diff --git a/theme/admin/managePendingQuotes.tpl b/theme/admin/managePendingQuotes.tpl deleted file mode 100755 index e993aae..0000000 --- a/theme/admin/managePendingQuotes.tpl +++ /dev/null | |||
| @@ -1,21 +0,0 @@ | |||
| 1 | <h2>Manage Pending Quotes</h2> | ||
| 2 | |||
| 3 | <table width="100%" class="webmail"> | ||
| 4 | <tr> | ||
| 5 | <th>Quote</th> | ||
| 6 | <th>Actions</th> | ||
| 7 | </tr> | ||
| 8 | |||
| 9 | <!--BEGIN QUOTE--> | ||
| 10 | <tr class="<!--QUOTE.EVEN-->"> | ||
| 11 | <td><!--QUOTE.TEXT--></td> | ||
| 12 | |||
| 13 | <td> | ||
| 14 | <a href="/admin/actionPendingQuotes.php?id=<!--QUOTE.ID-->&approve"><img src="/theme/images/icons/page_attach.png" alt="Approve" /></a> | ||
| 15 | <a href="/admin/actionPendingQuotes.php?id=<!--QUOTE.ID-->&deny"><img src="/theme/images/icons/page_delete.png" alt="Deny" /></a> | ||
| 16 | </td> | ||
| 17 | </tr> | ||
| 18 | <!--END QUOTE--> | ||
| 19 | </table> | ||
| 20 | |||
| 21 | <a href="/admin/">Back to Admin Panel</a> | ||
| diff --git a/theme/admin/managePosts.tpl b/theme/admin/managePosts.tpl deleted file mode 100755 index 41a2456..0000000 --- a/theme/admin/managePosts.tpl +++ /dev/null | |||
| @@ -1,24 +0,0 @@ | |||
| 1 | <h2>Manage Posts</h2> | ||
| 2 | |||
| 3 | <table width="100%" class="webmail"> | ||
| 4 | <tr> | ||
| 5 | <th>Post Title</th> | ||
| 6 | <th>Post Author</th> | ||
| 7 | <th>Actions</th> | ||
| 8 | </tr> | ||
| 9 | |||
| 10 | <!--BEGIN POST--> | ||
| 11 | <tr> | ||
| 12 | <td><!--POST.TITLE--></td> | ||
| 13 | <td><!--POST.AUTHOR--></td> | ||
| 14 | |||
| 15 | <td> | ||
| 16 | <a href="/admin/editPost.php?id=<!--POST.ID-->"><img src="/theme/images/icons/page_edit.png" alt="Edit" /></a> | ||
| 17 | <a href="/admin/deletePost.php?id=<!--POST.ID-->"><img src="/theme/images/icons/page_delete.png" alt="Delete" /></a> | ||
| 18 | <a href="/blog/<!--POST.CODED-->/"><img src="/theme/images/icons/page_go.png" alt="View" /></a> | ||
| 19 | </td> | ||
| 20 | </tr> | ||
| 21 | <!--END POST--> | ||
| 22 | </table> | ||
| 23 | |||
| 24 | <a href="/admin/">Back to Admin Panel</a> | ||
| diff --git a/theme/admin/moderateComments.tpl b/theme/admin/moderateComments.tpl deleted file mode 100755 index 7b41016..0000000 --- a/theme/admin/moderateComments.tpl +++ /dev/null | |||
| @@ -1,24 +0,0 @@ | |||
| 1 | <h2>Moderate Comments</h2> | ||
| 2 | |||
| 3 | <table width="100%" class="webmail"> | ||
| 4 | <tr> | ||
| 5 | <th>Title of Article Commented Upon</th> | ||
| 6 | <th>Comment Author</th> | ||
| 7 | <th>Actions</th> | ||
| 8 | </tr> | ||
| 9 | |||
| 10 | <!--BEGIN COMMENT--> | ||
| 11 | <tr> | ||
| 12 | <td><!--COMMENT.TITLE--></td> | ||
| 13 | <td><!--COMMENT.AUTHOR--></td> | ||
| 14 | |||
| 15 | <td> | ||
| 16 | <a href="/admin/viewComment.php?id=<!--COMMENT.ID-->"><img src="/theme/images/icons/page_go.png" alt="View" /></a> | ||
| 17 | <a href="/admin/actionComment.php?id=<!--COMMENT.ID-->&approve"><img src="/theme/images/icons/page_attach.png" alt="Approve" /></a> | ||
| 18 | <a href="/admin/actionComment.php?id=<!--COMMENT.ID-->&deny"><img src="/theme/images/icons/page_delete.png" alt="Deny" /></a> | ||
| 19 | </td> | ||
| 20 | </tr> | ||
| 21 | <!--END COMMENT--> | ||
| 22 | </table> | ||
| 23 | |||
| 24 | <a href="/admin/">Back to Admin Panel</a> | ||
| diff --git a/theme/admin/modquotes.tpl b/theme/admin/modquotes.tpl new file mode 100644 index 0000000..545a171 --- /dev/null +++ b/theme/admin/modquotes.tpl | |||
| @@ -0,0 +1,105 @@ | |||
| 1 | <h2>Moderate Quotes</h2> | ||
| 2 | |||
| 3 | <div class="clear"></div> | ||
| 4 | |||
| 5 | <script type="text/javascript"> | ||
| 6 | function denyQuote(id) | ||
| 7 | { | ||
| 8 | if (confirm("Are you sure you would like to deny this quote?")) | ||
| 9 | { | ||
| 10 | postwith("/admin/modquotes.php?pageID=<!--PAGEID-->&action=deny",{id:id}); | ||
| 11 | } | ||
| 12 | } | ||
| 13 | |||
| 14 | function approveQuote(id) | ||
| 15 | { | ||
| 16 | postwith("/admin/modquotes.php?pageID=<!--PAGEID-->&action=approve",{id:id}); | ||
| 17 | } | ||
| 18 | |||
| 19 | // following function taken from http://mentaljetsam.wordpress.com/2008/06/02/using-javascript-to-post-data-between-pages/ | ||
| 20 | function postwith (to,p) { | ||
| 21 | var myForm = document.createElement("form"); | ||
| 22 | myForm.method="post" ; | ||
| 23 | myForm.action = to ; | ||
| 24 | for (var k in p) { | ||
| 25 | var myInput = document.createElement("input") ; | ||
| 26 | myInput.setAttribute("name", k) ; | ||
| 27 | myInput.setAttribute("value", p[k]); | ||
| 28 | myForm.appendChild(myInput) ; | ||
| 29 | } | ||
| 30 | document.body.appendChild(myForm) ; | ||
| 31 | myForm.submit() ; | ||
| 32 | document.body.removeChild(myForm) ; | ||
| 33 | } | ||
| 34 | |||
| 35 | function bulkAction() | ||
| 36 | { | ||
| 37 | var bulk=new Array(); | ||
| 38 | $(".the-check:checked").each(function() { | ||
| 39 | bulk.push($(this).val()); | ||
| 40 | }); | ||
| 41 | var ids = bulk.join(",") | ||
| 42 | |||
| 43 | if (ids != "") | ||
| 44 | { | ||
| 45 | if ($('#manage-bulk select').val() == "deny") | ||
| 46 | { | ||
| 47 | if (confirm("Are you sure you would like to deny the selected quotes?")) | ||
| 48 | { | ||
| 49 | postwith("/admin/modquotes.php?pageID=<!--PAGEID-->&action=denys",{ids:ids}); | ||
| 50 | } | ||
| 51 | } else if ($('#manage-bulk select').val() == "approve") | ||
| 52 | { | ||
| 53 | if (confirm("Are you sure you would like to approve the selected quotes?")) | ||
| 54 | { | ||
| 55 | postwith("/admin/modquotes.php?pageID=<!--PAGEID-->&action=approves",{ids:ids}); | ||
| 56 | } | ||
| 57 | } | ||
| 58 | } | ||
| 59 | } | ||
| 60 | |||
| 61 | $(document).ready(function() { | ||
| 62 | $("input#all-check").click(function() { | ||
| 63 | var what = this.checked; | ||
| 64 | $("input.the-check").each(function() { | ||
| 65 | this.checked = what; | ||
| 66 | }); | ||
| 67 | }); | ||
| 68 | }); | ||
| 69 | </script> | ||
| 70 | |||
| 71 | <!--BEGIN AVAIL--> | ||
| 72 | <div id="manage-options"> | ||
| 73 | <div id="manage-bulk"> | ||
| 74 | <select name="bulk-type"> | ||
| 75 | <option value="approve">Approve</option> | ||
| 76 | <option value="deny">Deny</option> | ||
| 77 | </select> | ||
| 78 | |||
| 79 | <button id="bulk" type="button" onclick="bulkAction()">Bulk</button> | ||
| 80 | </div> | ||
| 81 | </div> | ||
| 82 | |||
| 83 | <div class="manage-pagination"><!--PAGINATION--></div> | ||
| 84 | |||
| 85 | <table> | ||
| 86 | <tr class="table-header"> | ||
| 87 | <td class="table-checkbox"><input type="checkbox" id="all-check" /></td> | ||
| 88 | <td>Quote</td> | ||
| 89 | <td colspan="2">Actions</td> | ||
| 90 | </tr> | ||
| 91 | <!--BEGIN QUOTE--> | ||
| 92 | <tr<!--QUOTE.ODD-->> | ||
| 93 | <td class="table-checkbox"><input class="the-check" type="checkbox" name="bulk" value="<!--QUOTE.ID-->" /></td> | ||
| 94 | <td style="line-height: 1.5em;"><!--QUOTE.TEXT--></td> | ||
| 95 | <td class="table-img"><a href="#" onclick="approveQuote(<!--QUOTE.ID-->)"><img src="/theme/images/icons/thumb_up.png" alt="Approve" /></a></td> | ||
| 96 | <td class="table-img"><a href="#" onclick="denyQuote(<!--QUOTE.ID-->)"><img src="/theme/images/icons/thumb_down.png" alt="Delete" /></a></td> | ||
| 97 | </tr> | ||
| 98 | <!--END QUOTE--> | ||
| 99 | </table> | ||
| 100 | |||
| 101 | <div class="manage-pagination"><!--PAGINATION--></div> | ||
| 102 | <!--END AVAIL--> | ||
| 103 | <!--BEGIN NOTAVAIL--> | ||
| 104 | <div class="manage-pagination">There are no quotes to moderate.</div> | ||
| 105 | <!--END NOTAVAIL--> | ||
| diff --git a/theme/admin/newPoll.tpl b/theme/admin/newPoll.tpl deleted file mode 100755 index debc8f1..0000000 --- a/theme/admin/newPoll.tpl +++ /dev/null | |||
| @@ -1,10 +0,0 @@ | |||
| 1 | Congradulations! You've successfully added a Poll RSS. Now it's time to add the new Poll Of The Week: | ||
| 2 | |||
| 3 | <form action="/admin/pollProcess.php?step=3" method="post"> | ||
| 4 | Question: <input type="text" name="question" /><br /> | ||
| 5 | Option 1: <input type="text" name="option1" /><br /> | ||
| 6 | Option 2: <input type="text" name="option2" /><br /> | ||
| 7 | Option 3: <input type="text" name="option3" /><br /> | ||
| 8 | Option 4: <input type="text" name="option4" /><br /> | ||
| 9 | <input type="submit" value="Create poll" /> | ||
| 10 | </form> | ||
| diff --git a/theme/admin/pending.tpl b/theme/admin/pending.tpl new file mode 100644 index 0000000..8ead332 --- /dev/null +++ b/theme/admin/pending.tpl | |||
| @@ -0,0 +1,108 @@ | |||
| 1 | <h2>Manage Pending</h2> | ||
| 2 | |||
| 3 | <div class="clear"></div> | ||
| 4 | |||
| 5 | <script type="text/javascript"> | ||
| 6 | function deletePost(id) | ||
| 7 | { | ||
| 8 | if (confirm("Are you sure you would like to delete this pending post?")) | ||
| 9 | { | ||
| 10 | postwith("/admin/pending.php?pageID=<!--PAGEID-->&action=delete",{id:id}); | ||
| 11 | } | ||
| 12 | } | ||
| 13 | |||
| 14 | // following function taken from http://mentaljetsam.wordpress.com/2008/06/02/using-javascript-to-post-data-between-pages/ | ||
| 15 | function postwith (to,p) { | ||
| 16 | var myForm = document.createElement("form"); | ||
| 17 | myForm.method="post" ; | ||
| 18 | myForm.action = to ; | ||
| 19 | for (var k in p) { | ||
| 20 | var myInput = document.createElement("input") ; | ||
| 21 | myInput.setAttribute("name", k) ; | ||
| 22 | myInput.setAttribute("value", p[k]); | ||
| 23 | myForm.appendChild(myInput) ; | ||
| 24 | } | ||
| 25 | document.body.appendChild(myForm) ; | ||
| 26 | myForm.submit() ; | ||
| 27 | document.body.removeChild(myForm) ; | ||
| 28 | } | ||
| 29 | |||
| 30 | function bulkAction() | ||
| 31 | { | ||
| 32 | var bulk=new Array(); | ||
| 33 | $(".the-check:checked").each(function() { | ||
| 34 | bulk.push($(this).val()); | ||
| 35 | }); | ||
| 36 | var ids = bulk.join(",") | ||
| 37 | |||
| 38 | if (ids != "") | ||
| 39 | { | ||
| 40 | if ($('#manage-bulk select').val() == "delete") | ||
| 41 | { | ||
| 42 | if (confirm("Are you sure you would like to delete the selected posts?")) | ||
| 43 | { | ||
| 44 | postwith("/admin/pending.php?pageID=<!--PAGEID-->&action=deletes",{ids:ids}); | ||
| 45 | } | ||
| 46 | } | ||
| 47 | } | ||
| 48 | } | ||
| 49 | |||
| 50 | $(document).ready(function() { | ||
| 51 | $("input#all-check").click(function() { | ||
| 52 | var what = this.checked; | ||
| 53 | $("input.the-check").each(function() { | ||
| 54 | this.checked = what; | ||
| 55 | }); | ||
| 56 | }); | ||
| 57 | }); | ||
| 58 | </script> | ||
| 59 | |||
| 60 | <!--BEGIN AVAIL--> | ||
| 61 | <div id="manage-options"> | ||
| 62 | <div id="manage-bulk"> | ||
| 63 | <select name="bulk-type"> | ||
| 64 | <option value="delete">Delete</option> | ||
| 65 | </select> | ||
| 66 | |||
| 67 | <button id="bulk" type="button" onclick="bulkAction()">Bulk</button> | ||
| 68 | </div> | ||
| 69 | </div> | ||
| 70 | |||
| 71 | <div class="manage-pagination"><!--PAGINATION--></div> | ||
| 72 | |||
| 73 | <table> | ||
| 74 | <tr class="table-header"> | ||
| 75 | <td class="table-checkbox"><input type="checkbox" id="all-check" /></td> | ||
| 76 | <td>Post Name</td> | ||
| 77 | <td>Author</td> | ||
| 78 | <td colspan="5">Actions</td> | ||
| 79 | </tr> | ||
| 80 | <!--BEGIN POST--> | ||
| 81 | <tr<!--POST.ODD-->> | ||
| 82 | <td class="table-checkbox"><input class="the-check" type="checkbox" name="bulk" value="<!--POST.ID-->" /></td> | ||
| 83 | <td><!--POST.TITLE--></td> | ||
| 84 | <td class="table-author"><!--POST.AUTHOR--></td> | ||
| 85 | <!--BEGIN POST.CANMOVEUP--> | ||
| 86 | <td class="table-img"><a href="/admin/pending.php?pageID=<!--PAGEID-->&action=moveup&id=<!--POST.ID-->"><img src="/theme/images/icons/thumb_up.png" alt="Move Up" /></a></td> | ||
| 87 | <!--END POST.CANMOVEUP--> | ||
| 88 | <!--BEGIN POST.NOMOVEUP--> | ||
| 89 | <td class="table-img"><img src="/theme/images/icons/thumb_up.png" alt="Move Up" style="opacity: 0.2" /></td> | ||
| 90 | <!--END POST.NOMOVEUP--> | ||
| 91 | <!--BEGIN POST.CANMOVEDOWN--> | ||
| 92 | <td class="table-img"><a href="/admin/pending.php?pageID=<!--PAGEID-->&action=movedown&id=<!--POST.ID-->"><img src="/theme/images/icons/thumb_down.png" alt="Move Down" /></a></td> | ||
| 93 | <!--END POST.CANMOVEDOWN--> | ||
| 94 | <!--BEGIN POST.NOMOVEDOWN--> | ||
| 95 | <td class="table-img"><img src="/theme/images/icons/thumb_down.png" alt="Move Down" style="opacity: 0.2" /></td> | ||
| 96 | <!--END POST.NOMOVEDOWN--> | ||
| 97 | <td class="table-img"><a href="/admin/editPost.php?type=pending&id=<!--POST.ID-->"><img src="/theme/images/icons/page_edit.png" alt="Edit" /></a></td> | ||
| 98 | <td class="table-img"><a href="#" onclick="deletePost(<!--POST.ID-->);"><img src="/theme/images/icons/page_delete.png" alt="Delete" /></a></td> | ||
| 99 | <td class="table-img"><a href="/viewPost.php?type=pending&id=<!--POST.ID-->"><img src="/theme/images/icons/page_go.png" alt="View" /></a></td> | ||
| 100 | </tr> | ||
| 101 | <!--END POST--> | ||
| 102 | </table> | ||
| 103 | |||
| 104 | <div class="manage-pagination"><!--PAGINATION--></div> | ||
| 105 | <!--END AVAIL--> | ||
| 106 | <!--BEGIN NOTAVAIL--> | ||
| 107 | <div class="manage-pagination">There are no pending posts in the queue.</div> | ||
| 108 | <!--END NOTAVAIL--> | ||
| diff --git a/theme/admin/pendingSuccess.tpl b/theme/admin/pendingSuccess.tpl deleted file mode 100755 index 51b115f..0000000 --- a/theme/admin/pendingSuccess.tpl +++ /dev/null | |||
| @@ -1,8 +0,0 @@ | |||
| 1 | Congradulations, you've just made/edited a pending post! | ||
| 2 | |||
| 3 | <ul> | ||
| 4 | <li><a href="/admin/editPending.php?id=<!--ID-->">Edit this pending post</a></li> | ||
| 5 | <li><a href="/admin/viewPending.php?id=<!--ID-->">View this pending post</a></li> | ||
| 6 | <li><a href="/admin/managePending.php">Manage Pending Posts</a></li> | ||
| 7 | <li><a href="/admin/">Return to the Admin Panel</a></li> | ||
| 8 | </ul> | ||
| diff --git a/theme/admin/pollrss.tpl b/theme/admin/pollrss.tpl deleted file mode 100755 index b58ebbb..0000000 --- a/theme/admin/pollrss.tpl +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | <h2>Write a Poll RSS</h2> | ||
| 2 | |||
| 3 | <form action="/admin/pollProcess.php?step=2" method="POST"> | ||
| 4 | <textarea name="text" cols="80" rows="20"></textarea><br /> | ||
| 5 | <input type="submit" value="Write RSS" /> | ||
| 6 | </form> | ||
| diff --git a/theme/admin/polls.tpl b/theme/admin/polls.tpl new file mode 100644 index 0000000..feb3600 --- /dev/null +++ b/theme/admin/polls.tpl | |||
| @@ -0,0 +1,94 @@ | |||
| 1 | <h2>Manage Polls</h2> | ||
| 2 | |||
| 3 | <div class="clear"></div> | ||
| 4 | |||
| 5 | <script type="text/javascript"> | ||
| 6 | function deletePoll(id) | ||
| 7 | { | ||
| 8 | if (confirm("Are you sure you would like to delete this poll?")) | ||
| 9 | { | ||
| 10 | postwith("/admin/polls.php?pageID=<!--PAGEID-->&action=delete",{id:id}); | ||
| 11 | } | ||
| 12 | } | ||
| 13 | |||
| 14 | // following function taken from http://mentaljetsam.wordpress.com/2008/06/02/using-javascript-to-post-data-between-pages/ | ||
| 15 | function postwith (to,p) { | ||
| 16 | var myForm = document.createElement("form"); | ||
| 17 | myForm.method="post" ; | ||
| 18 | myForm.action = to ; | ||
| 19 | for (var k in p) { | ||
| 20 | var myInput = document.createElement("input") ; | ||
| 21 | myInput.setAttribute("name", k) ; | ||
| 22 | myInput.setAttribute("value", p[k]); | ||
| 23 | myForm.appendChild(myInput) ; | ||
| 24 | } | ||
| 25 | document.body.appendChild(myForm) ; | ||
| 26 | myForm.submit() ; | ||
| 27 | document.body.removeChild(myForm) ; | ||
| 28 | } | ||
| 29 | |||
| 30 | function bulkAction() | ||
| 31 | { | ||
| 32 | var bulk=new Array(); | ||
| 33 | $(".the-check:checked").each(function() { | ||
| 34 | bulk.push($(this).val()); | ||
| 35 | }); | ||
| 36 | var ids = bulk.join(",") | ||
| 37 | |||
| 38 | if (ids != "") | ||
| 39 | { | ||
| 40 | if ($('#manage-bulk select').val() == "delete") | ||
| 41 | { | ||
| 42 | if (confirm("Are you sure you would like to delete the selected polls?")) | ||
| 43 | { | ||
| 44 | postwith("/admin/polls.php?pageID=<!--PAGEID-->&action=deletes",{ids:ids}); | ||
| 45 | } | ||
| 46 | } | ||
| 47 | } | ||
| 48 | } | ||
| 49 | |||
| 50 | $(document).ready(function() { | ||
| 51 | $("input#all-check").click(function() { | ||
| 52 | var what = this.checked; | ||
| 53 | $("input.the-check").each(function() { | ||
| 54 | this.checked = what; | ||
| 55 | }); | ||
| 56 | }); | ||
| 57 | }); | ||
| 58 | </script> | ||
| 59 | |||
| 60 | <!--BEGIN AVAIL--> | ||
| 61 | <div id="manage-options"> | ||
| 62 | <div id="manage-bulk"> | ||
| 63 | <select name="bulk-type"> | ||
| 64 | <option value="delete">Delete</option> | ||
| 65 | </select> | ||
| 66 | |||
| 67 | <button id="bulk" type="button" onclick="bulkAction()">Bulk</button> | ||
| 68 | </div> | ||
| 69 | </div> | ||
| 70 | |||
| 71 | <div class="manage-pagination"><!--PAGINATION--></div> | ||
| 72 | |||
| 73 | <table> | ||
| 74 | <tr class="table-header"> | ||
| 75 | <td class="table-checkbox"><input type="checkbox" id="all-check" /></td> | ||
| 76 | <td>Question</td> | ||
| 77 | <td colspan="3">Actions</td> | ||
| 78 | </tr> | ||
| 79 | <!--BEGIN POST--> | ||
| 80 | <tr<!--POST.ODD-->> | ||
| 81 | <td class="table-checkbox"><input class="the-check" type="checkbox" name="bulk" value="<!--POST.ID-->" /></td> | ||
| 82 | <td><!--POST.TITLE--></td> | ||
| 83 | <td class="table-img"><a href="/admin/editPoll.php?id=<!--POST.ID-->"><img src="/theme/images/icons/page_edit.png" alt="Edit" /></a></td> | ||
| 84 | <td class="table-img"><a href="#" onclick="deletePoll(<!--POST.ID-->)"><img src="/theme/images/icons/page_delete.png" alt="Delete" /></a></td> | ||
| 85 | <td class="table-img"><a href="/poll/<!--POST.ID-->.php"><img src="/theme/images/icons/page_go.png" alt="View" /></a></td> | ||
| 86 | </tr> | ||
| 87 | <!--END POST--> | ||
| 88 | </table> | ||
| 89 | |||
| 90 | <div class="manage-pagination"><!--PAGINATION--></div> | ||
| 91 | <!--END AVAIL--> | ||
| 92 | <!--BEGIN NOTAVAIL--> | ||
| 93 | <div class="manage-pagination">There are no polls.</div> | ||
| 94 | <!--END NOTAVAIL--> | ||
| diff --git a/theme/admin/postSuccess.tpl b/theme/admin/postSuccess.tpl deleted file mode 100755 index 0f27964..0000000 --- a/theme/admin/postSuccess.tpl +++ /dev/null | |||
| @@ -1,8 +0,0 @@ | |||
| 1 | Congradulations, you've just made/edited a post! | ||
| 2 | |||
| 3 | <ul> | ||
| 4 | <li><a href="/admin/editPost.php?id=<!--ID-->">Edit this post</a></li> | ||
| 5 | <li><a href="/blog/<!--CODED-->/">View this post</a></li> | ||
| 6 | <li><a href="/admin/managePosts.php">Manage Posts</a></li> | ||
| 7 | <li><a href="/admin/">Return to the Admin Panel</a></li> | ||
| 8 | </ul> | ||
| diff --git a/theme/admin/posts.tpl b/theme/admin/posts.tpl new file mode 100644 index 0000000..c68f5fd --- /dev/null +++ b/theme/admin/posts.tpl | |||
| @@ -0,0 +1,96 @@ | |||
| 1 | <h2>Manage Posts</h2> | ||
| 2 | |||
| 3 | <div class="clear"></div> | ||
| 4 | |||
| 5 | <script type="text/javascript"> | ||
| 6 | function deletePost(id) | ||
| 7 | { | ||
| 8 | if (confirm("Are you sure you would like to delete this post?")) | ||
| 9 | { | ||
| 10 | postwith("/admin/posts.php?pageID=<!--PAGEID-->&action=delete",{id:id}); | ||
| 11 | } | ||
| 12 | } | ||
| 13 | |||
| 14 | // following function taken from http://mentaljetsam.wordpress.com/2008/06/02/using-javascript-to-post-data-between-pages/ | ||
| 15 | function postwith (to,p) { | ||
| 16 | var myForm = document.createElement("form"); | ||
| 17 | myForm.method="post" ; | ||
| 18 | myForm.action = to ; | ||
| 19 | for (var k in p) { | ||
| 20 | var myInput = document.createElement("input") ; | ||
| 21 | myInput.setAttribute("name", k) ; | ||
| 22 | myInput.setAttribute("value", p[k]); | ||
| 23 | myForm.appendChild(myInput) ; | ||
| 24 | } | ||
| 25 | document.body.appendChild(myForm) ; | ||
| 26 | myForm.submit() ; | ||
| 27 | document.body.removeChild(myForm) ; | ||
| 28 | } | ||
| 29 | |||
| 30 | function bulkAction() | ||
| 31 | { | ||
| 32 | var bulk=new Array(); | ||
| 33 | $(".the-check:checked").each(function() { | ||
| 34 | bulk.push($(this).val()); | ||
| 35 | }); | ||
| 36 | var ids = bulk.join(",") | ||
| 37 | |||
| 38 | if (ids != "") | ||
| 39 | { | ||
| 40 | if ($('#manage-bulk select').val() == "delete") | ||
| 41 | { | ||
| 42 | if (confirm("Are you sure you would like to delete the selected posts?")) | ||
| 43 | { | ||
| 44 | postwith("/admin/posts.php?pageID=<!--PAGEID-->&action=deletes",{ids:ids}); | ||
| 45 | } | ||
| 46 | } | ||
| 47 | } | ||
| 48 | } | ||
| 49 | |||
| 50 | $(document).ready(function() { | ||
| 51 | $("input#all-check").click(function() { | ||
| 52 | var what = this.checked; | ||
| 53 | $("input.the-check").each(function() { | ||
| 54 | this.checked = what; | ||
| 55 | }); | ||
| 56 | }); | ||
| 57 | }); | ||
| 58 | </script> | ||
| 59 | |||
| 60 | <!--BEGIN AVAIL--> | ||
| 61 | <div id="manage-options"> | ||
| 62 | <div id="manage-bulk"> | ||
| 63 | <select name="bulk-type"> | ||
| 64 | <option value="delete">Delete</option> | ||
| 65 | </select> | ||
| 66 | |||
| 67 | <button id="bulk" type="button" onclick="bulkAction()">Bulk</button> | ||
| 68 | </div> | ||
| 69 | </div> | ||
| 70 | |||
| 71 | <div class="manage-pagination"><!--PAGINATION--></div> | ||
| 72 | |||
| 73 | <table> | ||
| 74 | <tr class="table-header"> | ||
| 75 | <td class="table-checkbox"><input type="checkbox" id="all-check" /></td> | ||
| 76 | <td>Post Name</td> | ||
| 77 | <td>Author</td> | ||
| 78 | <td colspan="3">Actions</td> | ||
| 79 | </tr> | ||
| 80 | <!--BEGIN POST--> | ||
| 81 | <tr<!--POST.ODD-->> | ||
| 82 | <td class="table-checkbox"><input class="the-check" type="checkbox" name="bulk" value="<!--POST.ID-->" /></td> | ||
| 83 | <td><!--POST.TITLE--></td> | ||
| 84 | <td class="table-author"><!--POST.AUTHOR--></td> | ||
| 85 | <td class="table-img"><a href="/admin/editPost.php?type=updates&id=<!--POST.ID-->"><img src="/theme/images/icons/page_edit.png" alt="Edit" /></a></td> | ||
| 86 | <td class="table-img"><a href="#" onclick="deletePost(<!--POST.ID-->)"><img src="/theme/images/icons/page_delete.png" alt="Delete" /></a></td> | ||
| 87 | <td class="table-img"><a href="/blog/<!--POST.CODED-->/"><img src="/theme/images/icons/page_go.png" alt="View" /></a></td> | ||
| 88 | </tr> | ||
| 89 | <!--END POST--> | ||
| 90 | </table> | ||
| 91 | |||
| 92 | <div class="manage-pagination"><!--PAGINATION--></div> | ||
| 93 | <!--END AVAIL--> | ||
| 94 | <!--BEGIN NOTAVAIL--> | ||
| 95 | <div class="manage-pagination">There are no posts.</div> | ||
| 96 | <!--END NOTAVAIL--> | ||
| diff --git a/theme/admin/quotes.tpl b/theme/admin/quotes.tpl new file mode 100644 index 0000000..6da9dbb --- /dev/null +++ b/theme/admin/quotes.tpl | |||
| @@ -0,0 +1,94 @@ | |||
| 1 | <h2><!--TITLE--></h2> | ||
| 2 | |||
| 3 | <div class="clear"></div> | ||
| 4 | |||
| 5 | <script type="text/javascript"> | ||
| 6 | function deleteQuote(id) | ||
| 7 | { | ||
| 8 | if (confirm("Are you sure you would like to delete this quote?")) | ||
| 9 | { | ||
| 10 | postwith("/admin/quotes.php?<!--FLAGGED-->pageID=<!--PAGEID-->&action=delete",{id:id}); | ||
| 11 | } | ||
| 12 | } | ||
| 13 | |||
| 14 | // following function taken from http://mentaljetsam.wordpress.com/2008/06/02/using-javascript-to-post-data-between-pages/ | ||
| 15 | function postwith (to,p) { | ||
| 16 | var myForm = document.createElement("form"); | ||
| 17 | myForm.method="post" ; | ||
| 18 | myForm.action = to ; | ||
| 19 | for (var k in p) { | ||
| 20 | var myInput = document.createElement("input") ; | ||
| 21 | myInput.setAttribute("name", k) ; | ||
| 22 | myInput.setAttribute("value", p[k]); | ||
| 23 | myForm.appendChild(myInput) ; | ||
| 24 | } | ||
| 25 | document.body.appendChild(myForm) ; | ||
| 26 | myForm.submit() ; | ||
| 27 | document.body.removeChild(myForm) ; | ||
| 28 | } | ||
| 29 | |||
| 30 | function bulkAction() | ||
| 31 | { | ||
| 32 | var bulk=new Array(); | ||
| 33 | $(".the-check:checked").each(function() { | ||
| 34 | bulk.push($(this).val()); | ||
| 35 | }); | ||
| 36 | var ids = bulk.join(",") | ||
| 37 | |||
| 38 | if (ids != "") | ||
| 39 | { | ||
| 40 | if ($('#manage-bulk select').val() == "delete") | ||
| 41 | { | ||
| 42 | if (confirm("Are you sure you would like to delete the selected quotes?")) | ||
| 43 | { | ||
| 44 | postwith("/admin/quotes.php?<!--FLAGGED-->pageID=<!--PAGEID-->&action=deletes",{ids:ids}); | ||
| 45 | } | ||
| 46 | } | ||
| 47 | } | ||
| 48 | } | ||
| 49 | |||
| 50 | $(document).ready(function() { | ||
| 51 | $("input#all-check").click(function() { | ||
| 52 | var what = this.checked; | ||
| 53 | $("input.the-check").each(function() { | ||
| 54 | this.checked = what; | ||
| 55 | }); | ||
| 56 | }); | ||
| 57 | }); | ||
| 58 | </script> | ||
| 59 | |||
| 60 | <!--BEGIN AVAIL--> | ||
| 61 | <div id="manage-options"> | ||
| 62 | <div id="manage-bulk"> | ||
| 63 | <select name="bulk-type"> | ||
| 64 | <option value="delete">Delete</option> | ||
| 65 | </select> | ||
| 66 | |||
| 67 | <button id="bulk" type="button" onclick="bulkAction()">Bulk</button> | ||
| 68 | </div> | ||
| 69 | </div> | ||
| 70 | |||
| 71 | <div class="manage-pagination"><!--PAGINATION--></div> | ||
| 72 | |||
| 73 | <table> | ||
| 74 | <tr class="table-header"> | ||
| 75 | <td class="table-checkbox"><input type="checkbox" id="all-check" /></td> | ||
| 76 | <td>Quote</td> | ||
| 77 | <td colspan="3">Actions</td> | ||
| 78 | </tr> | ||
| 79 | <!--BEGIN QUOTE--> | ||
| 80 | <tr<!--QUOTE.ODD-->> | ||
| 81 | <td class="table-checkbox"><input class="the-check" type="checkbox" name="bulk" value="<!--QUOTE.ID-->" /></td> | ||
| 82 | <td>#<!--QUOTE.ID-->: <!--QUOTE.EXCERPT--></td> | ||
| 83 | <td class="table-img"><a href="/admin/editQuote.php?id=<!--QUOTE.ID-->"><img src="/theme/images/icons/page_edit.png" alt="Edit" /></a></td> | ||
| 84 | <td class="table-img"><a href="#" onclick="deleteQuote(<!--QUOTE.ID-->)"><img src="/theme/images/icons/page_delete.png" alt="Delete" /></a></td> | ||
| 85 | <td class="table-img"><a href="/quotes/<!--QUOTE.ID-->.php"><img src="/theme/images/icons/page_go.png" alt="View" /></a></td> | ||
| 86 | </tr> | ||
| 87 | <!--END QUOTE--> | ||
| 88 | </table> | ||
| 89 | |||
| 90 | <div class="manage-pagination"><!--PAGINATION--></div> | ||
| 91 | <!--END AVAIL--> | ||
| 92 | <!--BEGIN NOTAVAIL--> | ||
| 93 | <div class="manage-pagination">There are no quotes.</div> | ||
| 94 | <!--END NOTAVAIL--> | ||
| diff --git a/theme/admin/viewComment.tpl b/theme/admin/viewComment.tpl deleted file mode 100755 index 8b52fa0..0000000 --- a/theme/admin/viewComment.tpl +++ /dev/null | |||
| @@ -1,12 +0,0 @@ | |||
| 1 | <div class="bubble"> | ||
| 2 | <blockquote> | ||
| 3 | <div> | ||
| 4 | <img src="http://www.gravatar.com/avatar/<!--CODEDEMAIL-->?s=32&d=identicon&r=G" /> | ||
| 5 | <!--TEXT--> | ||
| 6 | </div> | ||
| 7 | </blockquote> | ||
| 8 | <cite><strong><!--USERNAME--></strong> on <!--DATE--></cite> | ||
| 9 | </div> | ||
| 10 | |||
| 11 | <p><a href="/admin/moderateComments.php">Back to Comment Moderation</a><br /> | ||
| 12 | <a href="/admin/">Back to Admin Panel</a></p> | ||
| diff --git a/theme/admin/welcome.tpl b/theme/admin/welcome.tpl new file mode 100644 index 0000000..dc4e246 --- /dev/null +++ b/theme/admin/welcome.tpl | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | <h2>Welcome to the the ubiquitous administration panel!</h2> | ||
| 2 | |||
| 3 | <p> | ||
| 4 | There are <!--POSTS--> posts, not including <!--PENDING--> queued posts and <!--DRAFTS--> drafts. | ||
| 5 | </p> | ||
| 6 | |||
| 7 | <p> | ||
| 8 | There are <!--COMMENTS--> unmoderated comments. | ||
| 9 | </p> | ||
| 10 | |||
| 11 | <p> | ||
| 12 | There are <!--POLLS--> polls. | ||
| 13 | </p> | ||
| 14 | |||
| 15 | <p> | ||
| 16 | There are <!--QUOTES--> quotes, including <!--FLAGGED--> flagged quotes. There are also <!--MODCOM--> unmoderated quotes. | ||
| 17 | </p> | ||
| diff --git a/theme/admin/write.tpl b/theme/admin/write.tpl deleted file mode 100755 index 0371ace..0000000 --- a/theme/admin/write.tpl +++ /dev/null | |||
| @@ -1,14 +0,0 @@ | |||
| 1 | <h2>Write a post</h2> | ||
| 2 | |||
| 3 | <form action="/admin/writePost.php?submit=" method="post"> | ||
| 4 | Post Title: <input type="text" name="title" /><br /> | ||
| 5 | <textarea name="text" cols="80" rows="20"></textarea><br /> | ||
| 6 | Tags (comma-seperated): <input type="text" name="tags" value="update" /><br /> | ||
| 7 | Post Type: <select name="type" size="4"> | ||
| 8 | <option value="draft">Draft</option> | ||
| 9 | <option value="normal" selected="selected">Normal (Article-style) Post</option> | ||
| 10 | <option value="priority">High-Priority Post</option> | ||
| 11 | <option value="instant">Instant Post</option> | ||
| 12 | </select><br /> | ||
| 13 | <input type="submit" value="Write post" /> | ||
| 14 | </form> | ||
| diff --git a/theme/admin/writePoll.tpl b/theme/admin/writePoll.tpl new file mode 100644 index 0000000..242131a --- /dev/null +++ b/theme/admin/writePoll.tpl | |||
| @@ -0,0 +1,76 @@ | |||
| 1 | <h2><!--TITLE--></h2> | ||
| 2 | |||
| 3 | <form action="<!--ACTION-->" method="post" class="uniForm"> | ||
| 4 | <!--BEGIN ISERROR--> | ||
| 5 | <div id="errorMsg"> | ||
| 6 | <h3>Oops! There was an error!</h3> | ||
| 7 | |||
| 8 | <ol> | ||
| 9 | <!--BEGIN ERROR--> | ||
| 10 | <li><a href="#error<!--ERROR.ID-->" title="Jump to error"><!--ERROR.TEXT--></a></li> | ||
| 11 | <!--END ERROR--> | ||
| 12 | </ol> | ||
| 13 | </div> | ||
| 14 | <!--END ISERROR--> | ||
| 15 | |||
| 16 | <!--BEGIN FLASH--> | ||
| 17 | <div id="OKMsg"><p><!--FLASH.TEXT--></p></div> | ||
| 18 | <!--END FLASH--> | ||
| 19 | |||
| 20 | <fieldset class="inlineLabels"> | ||
| 21 | <div class="ctrlHolder<!--ISQUESTIONERROR-->"> | ||
| 22 | <!--BEGIN QUESTIONERROR--> | ||
| 23 | <p id="error<!--QUESTIONERROR.ID-->" class="errorField"><strong><!--QUESTIONERROR.TEXT--></strong></p> | ||
| 24 | <!--END QUESTIONERROR--> | ||
| 25 | <label for="question"><em>*</em> Question</label> | ||
| 26 | <input name="question" id="question" value="<!--QUESTIONVALUE-->" type="text" class="textInput" /> | ||
| 27 | </div> | ||
| 28 | |||
| 29 | <div class="ctrlHolder<!--ISOPTION1ERROR-->"> | ||
| 30 | <!--BEGIN OPTION1ERROR--> | ||
| 31 | <p id="error<!--OPTION1ERROR.ID-->" class="errorField"><strong><!--OPTION1ERROR.ID--></strong></p> | ||
| 32 | <!--END OPTION1ERROR--> | ||
| 33 | <label for="option1"><em>*</em> Option 1</label> | ||
| 34 | <input name="option1" id="option1" value="<!--OPTION1VALUE-->" type="text" class="textInput" /> | ||
| 35 | </div> | ||
| 36 | |||
| 37 | <div class="ctrlHolder<!--ISOPTION2ERROR-->"> | ||
| 38 | <!--BEGIN OPTION2ERROR--> | ||
| 39 | <p id="error<!--OPTION2ERROR.ID-->" class="errorField"><strong><!--OPTION2ERROR.ID--></strong></p> | ||
| 40 | <!--END OPTION2ERROR--> | ||
| 41 | <label for="option2"><em>*</em> Option 2</label> | ||
| 42 | <input name="option2" id="option2" value="<!--OPTION2VALUE-->" type="text" class="textInput" /> | ||
| 43 | </div> | ||
| 44 | |||
| 45 | <div class="ctrlHolder<!--ISOPTION3ERROR-->"> | ||
| 46 | <!--BEGIN OPTION3ERROR--> | ||
| 47 | <p id="error<!--OPTION3ERROR.ID-->" class="errorField"><strong><!--OPTION3ERROR.ID--></strong></p> | ||
| 48 | <!--END OPTION3ERROR--> | ||
| 49 | <label for="option3"><em>*</em> Option 3</label> | ||
| 50 | <input name="option3" id="option3" value="<!--OPTION3VALUE-->" type="text" class="textInput" /> | ||
| 51 | </div> | ||
| 52 | |||
| 53 | <div class="ctrlHolder<!--ISOPTION4ERROR-->"> | ||
| 54 | <!--BEGIN OPTION4ERROR--> | ||
| 55 | <p id="error<!--OPTION4ERROR.ID-->" class="errorField"><strong><!--OPTION4ERROR.ID--></strong></p> | ||
| 56 | <!--END OPTION4ERROR--> | ||
| 57 | <label for="option4"><em>*</em> Option 4</label> | ||
| 58 | <input name="option4" id="option4" value="<!--OPTION4VALUE-->" type="text" class="textInput" /> | ||
| 59 | </div> | ||
| 60 | </fieldset> | ||
| 61 | |||
| 62 | <fieldset class="blockLabels"> | ||
| 63 | <div class="ctrlHolder<!--ISTEXTERROR-->"> | ||
| 64 | <!--BEGIN TEXTERROR--> | ||
| 65 | <p id="error<!--TEXTERROR.ID-->" class="errorField"><strong><!--TEXTERROR.TEXT--></strong></p> | ||
| 66 | <!--END TEXTERROR--> | ||
| 67 | <label for="text">Text</label> | ||
| 68 | <textarea name="text" id="text"><![CDATA[<!--TEXTVALUE-->]]></textarea> | ||
| 69 | </div> | ||
| 70 | </fieldset> | ||
| 71 | |||
| 72 | <div class="buttonHolder"> | ||
| 73 | <button type="reset" class="resetButton">Reset</button> | ||
| 74 | <button type="submit" class="primaryAction">Submit</button> | ||
| 75 | </div> | ||
| 76 | </form> | ||
| diff --git a/theme/admin/writePost.tpl b/theme/admin/writePost.tpl new file mode 100644 index 0000000..a51f7fd --- /dev/null +++ b/theme/admin/writePost.tpl | |||
| @@ -0,0 +1,68 @@ | |||
| 1 | <h2><!--TITLE--></h2> | ||
| 2 | |||
| 3 | <form action="<!--ACTION-->" method="post" class="uniForm"> | ||
| 4 | <!--BEGIN ISERROR--> | ||
| 5 | <div id="errorMsg"> | ||
| 6 | <h3>Oops! There was an error!</h3> | ||
| 7 | |||
| 8 | <ol> | ||
| 9 | <!--BEGIN ERROR--> | ||
| 10 | <li><a href="#error<!--ERROR.ID-->" title="Jump to error"><!--ERROR.TEXT--></a></li> | ||
| 11 | <!--END ERROR--> | ||
| 12 | </ol> | ||
| 13 | </div> | ||
| 14 | <!--END ISERROR--> | ||
| 15 | |||
| 16 | <!--BEGIN FLASH--> | ||
| 17 | <div id="OKMsg"><p><!--FLASH.TEXT--></p></div> | ||
| 18 | <!--END FLASH--> | ||
| 19 | |||
| 20 | <fieldset class="inlineLabels"> | ||
| 21 | <div class="ctrlHolder<!--ISTITLEERROR-->"> | ||
| 22 | <!--BEGIN TITLEERROR--> | ||
| 23 | <p id="error<!--TITLEERROR.ID-->" class="errorField"><strong><!--TITLEERROR.TEXT--></strong></p> | ||
| 24 | <!--END TITLEERROR--> | ||
| 25 | <label for="title"><em>*</em> Title</label> | ||
| 26 | <input name="title" id="title" value="<!--TITLEVALUE-->" type="text" class="textInput" /> | ||
| 27 | </div> | ||
| 28 | </fieldset> | ||
| 29 | |||
| 30 | <fieldset class="blockLabels"> | ||
| 31 | <div class="ctrlHolder<!--ISTEXTERROR-->"> | ||
| 32 | <!--BEGIN TEXTERROR--> | ||
| 33 | <p id="error<!--TEXTERROR.ID-->" class="errorField"><strong><!--TEXTERROR.TEXT--></strong></p> | ||
| 34 | <!--END TEXTERROR--> | ||
| 35 | <label for="text">Text</label> | ||
| 36 | <textarea name="text" id="text" style="height: 24em"><![CDATA[<!--TEXTVALUE-->]]></textarea> | ||
| 37 | </div> | ||
| 38 | </fieldset> | ||
| 39 | |||
| 40 | <fieldset class="inlineLabels"> | ||
| 41 | <div class="ctrlHolder<!--ISTAGSERROR-->"> | ||
| 42 | <!--BEGIN TAGSERROR--> | ||
| 43 | <p id="error<!--TAGSERROR.ID-->" class="errorField"><strong><!--TAGSERROR.TEXT--></strong></p> | ||
| 44 | <!--END TAGSERROR--> | ||
| 45 | <label for="tags"><em>*</em> Tags</label> | ||
| 46 | <input name="tags" id="tags" value="<!--TAGSVALUE-->" type="text" class="textInput" /> | ||
| 47 | <p class="formHint">Each tag should be seperated by a comma.</p> | ||
| 48 | </div> | ||
| 49 | |||
| 50 | <div class="ctrlHolder<!--ISTYPEERROR-->"> | ||
| 51 | <!--BEGIN TYPEERROR--> | ||
| 52 | <p id="error<!--TYPEERROR.ID-->" class="errorField"><strong><!--TYPEERROR.TEXT--></strong></p> | ||
| 53 | <!--END TYPEERROR--> | ||
| 54 | <p class="label"><em>*</em> Post Type</p> | ||
| 55 | <div class="multiField"> | ||
| 56 | <label for="type_draft" class="inlineLabel"><input name="type" id="type_draft" value="draft" type="radio"<!--DRAFTSELECTED--><!--TAGSDISABLED--> /> Draft</label> | ||
| 57 | <label for="type_article" class="inlineLabel"><input name="type" id="type_article" value="article" type="radio"<!--ARTICLESELECTED--><!--TAGSDISABLED--> /> Queued Post (Article-style)</label> | ||
| 58 | <label for="type_high" class="inlineLabel"><input name="type" id="type_high" value="high" type="radio"<!--HIGHSELECTED--><!--TAGSDISABLED--> /> High Priority Queued Post (Article-style)</label> | ||
| 59 | <label for="type_instant" class="inlineLabel"><input name="type" id="type_instant" value="instant" type="radio"<!--INSTANTSELECTED--><!--TAGSDISABLED--> /> Instant Post</label> | ||
| 60 | </div> | ||
| 61 | </div> | ||
| 62 | </fieldset> | ||
| 63 | |||
| 64 | <div class="buttonHolder"> | ||
| 65 | <button type="reset" class="resetButton">Reset</button> | ||
| 66 | <button type="submit" class="primaryAction">Submit</button> | ||
| 67 | </div> | ||
| 68 | </form> | ||
| diff --git a/theme/admin/writeQuote.tpl b/theme/admin/writeQuote.tpl new file mode 100644 index 0000000..3a9bb3f --- /dev/null +++ b/theme/admin/writeQuote.tpl | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | <h2><!--TITLE--></h2> | ||
| 2 | |||
| 3 | <form action="<!--ACTION-->" method="post" class="uniForm"> | ||
| 4 | <!--BEGIN ISERROR--> | ||
| 5 | <div id="errorMsg"> | ||
| 6 | <h3>Oops! There was an error!</h3> | ||
| 7 | |||
| 8 | <ol> | ||
| 9 | <!--BEGIN ERROR--> | ||
| 10 | <li><a href="#error<!--ERROR.ID-->" title="Jump to error"><!--ERROR.TEXT--></a></li> | ||
| 11 | <!--END ERROR--> | ||
| 12 | </ol> | ||
| 13 | </div> | ||
| 14 | <!--END ISERROR--> | ||
| 15 | |||
| 16 | <!--BEGIN FLASH--> | ||
| 17 | <div id="OKMsg"><p><!--FLASH.TEXT--></p></div> | ||
| 18 | <!--END FLASH--> | ||
| 19 | |||
| 20 | <fieldset class="blockLabels"> | ||
| 21 | <div class="ctrlHolder<!--ISQUOTEERROR-->"> | ||
| 22 | <!--BEGIN QUOTEERROR--> | ||
| 23 | <p id="error<!--QUOTEERROR.ID-->" class="errorField"><strong><!--QUOTEERROR.TEXT--></strong></p> | ||
| 24 | <!--END QUOTEERROR--> | ||
| 25 | <label for="quote">Quote</label> | ||
| 26 | <textarea name="quote" id="quote" style="height: 24em"><![CDATA[<!--QUOTEVALUE-->]]></textarea> | ||
| 27 | </div> | ||
| 28 | </fieldset> | ||
| 29 | |||
| 30 | <div class="buttonHolder"> | ||
| 31 | <button type="reset" class="resetButton">Reset</button> | ||
| 32 | <button type="submit" class="primaryAction">Submit</button> | ||
| 33 | </div> | ||
| 34 | </form> | ||
| diff --git a/theme/msg.tpl b/theme/msg.tpl deleted file mode 100755 index 82353fe..0000000 --- a/theme/msg.tpl +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | <p><!--MSG--></p><p><a href="javascript:history.back();window.reload();">Back to <!--BACK--></a></p> | ||
| diff --git a/theme/msg2.tpl b/theme/msg2.tpl deleted file mode 100755 index 2010226..0000000 --- a/theme/msg2.tpl +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | <p><!--MSG--></p><p><a href="<!--LINK-->"><!--BACK--></a></p> | ||
| diff --git a/theme/poll.tpl b/theme/poll.tpl index b906f40..9547214 100755 --- a/theme/poll.tpl +++ b/theme/poll.tpl | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | </p> | 16 | </p> |
| 17 | </div> | 17 | </div> |
| 18 | 18 | ||
| 19 | <cite class="rounded"><strong><!--COMPLETE.AUTHOR--></strong> on <!--COMPLETE.DATE--></cite> | 19 | <cite class="rounded"><!--COMPLETE.DATE--></cite> |
| 20 | <!--END COMPLETE--> | 20 | <!--END COMPLETE--> |
| 21 | <!--BEGIN INCOMPLETE--> | 21 | <!--BEGIN INCOMPLETE--> |
| 22 | The results of this poll of the week are pending. Meanwhile, if you haven't voted yet, why not do so? | 22 | The results of this poll of the week are pending. Meanwhile, if you haven't voted yet, why not do so? |
