?> /images/bottomleft.gif" width="20" height="19"> </td> <td valign="top" style="background-image: url(./template/<?php carbon::config("template", 1); ?> /images/bottom.gif); width: 100%;"> </td> <td> <img src="./template/<?php carbon::config("template", 1); ?> /images/bottomright.gif" width="19" height="20"> </td> </tr> <tr> <td colspan='2' align="center"> <?php carbon::version(); ?>
carbon::config(template, 1); ?> /colour.css" /> </head> <body> <div id="main"> <div id="header"> <div id="logo"> <h1><?php carbon::config(name, 1); ?> </h1> </div> </div> <div id="menu"> <!-- rounded corners - top **** --> <div class="rtop"><div class="r1"></div><div class="r2"></div><div class="r3"></div><div class="r4"></div></div>
$contents = str_ireplace('{ID}', $nid, $contents); $contents = str_ireplace('{TITLE}', $title, $contents); $contents = str_ireplace('{UID}', $uid, $contents); $contents = str_ireplace('{DESC}', '', $contents); $contents = str_ireplace('{BODY}', $body, $contents); $contents = str_ireplace('{DATE}', $date, $contents); $contents = str_ireplace('{USERNAME}', $username, $contents); $contents = str_ireplace('{COMMENTS}', '', $contents); $contents = str_ireplace('{README}', '<a href="?page=news">Back to News</a>', $contents); fclose($open); echo $contents; ##################### if (carbon::config("comments", 0) == 1 && $comments == 1) { if (carbon::config("news_comments_logged", 0) == 0 && $_COOKIE['user'] !== NULL) { echo "<a href='?page=comment_handler&comment=1&type=news&content={$nid}|{$title}'>Leave a comment</a> <br />"; } elseif (carbon::config("news_comments_logged", 0) == 1) { echo "<a href='?page=comment_handler&comment=1&type=news&content={$nid}|{$title}'>Leave a comment</a> <br />"; } else { echo "<center>You must be logged in to post a comment</center> \n <br /> \n"; } } else { echo "\n <center> Commenting is currently disabled. </center> \n\n <br /> \n"; } ##################### $fetch_comments = $sql->select(array('db' => $database, 'table' => 'news_comments', 'where' => array('news_id = ' . $nid))); foreach ($fetch_comments as $key => $comments) { $cid = $comments['id']; $n_id = $comments['news_id']; $u_id = $comments['user_id']; $c_date = $comments['date']; $c_title = $comments['title'];
if (carbon::config(user_reg, 0) == 1) { echo 'checked'; } echo ">\r\n\t\t\t\t\t\t\tDisabled <input type='radio' name='user_reg' value='0' "; if (carbon::config(user_reg, 0) == 0) { echo 'checked'; } echo ">\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<tr>\r\n\t\t\r\n\t\t\t\t\t\t<td width='175px'>\r\n\r\n\t\t\t\t\t\t\tActivation Required:\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tYes <input type='radio' name='active' value='1' "; if (carbon::config(active, 0) == 1) { echo 'checked'; } echo ">\r\n\t\t\t\t\t\t\tNo <input type='radio' name='active' value='0' "; if (carbon::config(active, 0) == 0) { echo 'checked'; } echo ">\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<tr>\r\n\t\t\r\n\t\t\t\t\t\t<td width='175px'>\r\n\r\n\t\t\t\t\t\t\tMin. Password Length:\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<input type='text' name='min_pass' class='login_box' value='" . carbon::config(min_pass_length, 0) . "'>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<tr>\r\n\t\t\r\n\t\t\t\t\t\t<td width='175px'>\r\n\r\n\t\t\t\t\t\t\tMin. Username Length:\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<input type='text' name='min_user' class='login_box' value='" . carbon::config(min_user_length, 0) . "'>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<br /> \n\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<strong>Misc.</strong>\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tMaximum Signature Length:\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<input type='text' name='sig_length' class='login_box' value='" . carbon::config(sig_length, 0) . "'>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t<td colspan='2' align='center'>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<br />\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t<input type='submit' name='submit' value='Update' class='submit'>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t\r\n\t\t\t\t</table>\r\n\t\t\t\r\n\t\t\t</form>\r\n\t\t\t\r\n\t\t\t"; } break; case "module": echo "<a href='?page=admin'><strong>Back</strong></a> \n <br /> <br /> \n"; /*********/ if ($_GET['deactivate'] != NULL) { $sql->update(array('db' => $database, 'table' => 'module', 'where' => array('id = ' . $_GET['deactivate']), 'values' => array('active' => '1'))); $sql->delete(array('db' => $database, 'table' => 'nav', 'where' => array('id = ' . $_GET['deactivate']))); echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL=./?page=admin&function=module">'; } elseif ($_GET['activate'] != NULL) { $sql->update(array('db' => $database, 'table' => 'module', 'where' => array('id = ' . $_GET['activate']), 'values' => array('active' => '2'))); $grab = $sql->select(array('db' => $database, 'table' => 'module', 'where' => array('id = ' . $_GET['activate']))); $mod_name = $grab[0]['mod_name']; $mod_page = $mod_name . ".php"; $mod_short = $mod_name;
<input type='reset' value='Reset' class='submit'> </td> </tr> </table> </form> <sup>1</sup> Username must be atleast: <?php carbon::config(min_user_length, 1); ?> characters long. <br /> <sup>2</sup> Password must be atleast: <?php carbon::config(min_pass_length, 1); ?> characters long. <br /> <sup>3</sup> Usernames cannot contain spaces and are not case sensitive. <br /> <sup>4</sup> No HTML can be used in any text field. <?php } else { echo "<center>User registration is currently disabled.</center>"; } } else { echo "<center>Error: You are currently logged in and cannot create another account.</center>"; }
echo "<center>News Options have been updated. \n <br /> \n <a href='?page=admin&function=pref&pref=news_prefs&sub=options'>Click Here</a> to go back. </center>"; } else { echo "<a href='?page=admin&function=pref&pref=news_prefs'><strong>Back</strong></a> \n <br /> <br /> \n\n\n\t\t\t\t\t\n\t\t\t\t\t<form action='?page=admin&function=pref&pref=news_prefs&sub=options' method='post'>\n\t\t\t\t\t\n\t\t\t\t\t<table border='0' cellpadding='0' cellspacing='1' width='100%'>\n\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\n\t\t\t\t\t\t<td width='175px'>\n\n\t\t\t\t\t\t\tGlobal News Comments:\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tEnabled <input type='radio' name='news_comments' value='1'"; if (carbon::config(comments, 0) == 1) { echo "checked"; } echo ">\n\t\t\t\t\t\t\tDisabled <input type='radio' name='news_comments' value='0'"; if (carbon::config(comments, 0) == 0) { echo "checked"; } echo ">\n\t\t\t\t\t\t\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\n\t\t\t\t\t</tr>\n\t\t\t\t\t\n\t\t\t\t\t<tr>\n\t\t\n\t\t\t\t\t\t<td width='175px'>\n\n\t\t\t\t\t\t\tPublic Commenting:\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<td valign='top'>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tEnabled <input type='radio' name='news_comments_logged' value='1'"; if (carbon::config(news_comments_logged, 0) == 1) { echo "checked"; } echo ">\n\t\t\t\t\t\t\tDisabled <input type='radio' name='news_comments_logged' value='0'"; if (carbon::config(news_comments_logged, 0) == 0) { echo "checked"; } echo ">\n\t\t\t\t\t\t\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\n\t\t\t\t\t</tr>\n\n\t\t\t\t\t<tr>\n\t\t\t\t\t\n\t\t\t\t\t\t<td colspan='2' align='center'>\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t<input type='submit' value='Update' class='submit'>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\n\t\t\t\t\t</tr>\n\n\t\t\t\t\t</table>\n\t\t\t\t\t"; } break; case "new": if ($_POST) { switch ($_POST['news_lines']) { case 1: $news_body = nl2br(stripslashes($_POST['news_body'])); $news_desc = nl2br(stripslashes($_POST['news_desc'])); break; case 0: $news_body = stripslashes($_POST['news_body']); $news_desc = stripslashes($_POST['news_desc']);
function site() { global $sql; global $database; $page = $_GET['page']; $page_dir = './pages/'; if ($page == NULL) { $page = carbon::config('front_page', 0); } $mods_installed = $sql->select(array('db' => $database, 'table' => 'module', 'where' => array('mod_name =' . $page))); if ($mods_installed[0]['active'] == 1) { echo "<center> Module is not currently active </center>"; } else { if (is_file($page_dir . $page . '.php')) { $contents = file($page_dir . $page . '.php'); $something = file_get_contents($page_dir . $page . '.php'); $check = strpos($something, '#member = 1'); $check2 = strpos($something, '#member = 2'); $check = $check + 10; $check2 = $check2 + 10; if ($something[$check] == '1') { if (carbon::logged() == TRUE) { include $page_dir . $page . '.php'; } else { echo "<center>Error: You must be logged in to view this page</center>"; } } elseif ($something[$check2] == '2') { if (carbon::rank() >= 2 && carbon::logged() == TRUE) { include $page_dir . $page . '.php'; } else { echo "<center>Error: You must be an Admin to view this page</center>"; } } else { if ($mods_installed[0]['active'] == 2 or $mods_installed[0]['active'] == 3) { include $page_dir . $page . '.php'; } else { echo "<center> An error has occured: The following page you've requested - <em>{$page}</em> - could not be found. </center>"; } } } else { echo "<center> An error has occured: The following page you've requested - <em>{$page}</em> - could not be found. </center>"; } } }