require_once "shared/admin_settings_nav.php"; ?> <div class="settings_content"> <div class="title"> List of Admins <hr /> </div> <table> <?php connect_to_database(); select_database(); $query = query_select("users"); $query .= query_select_where("acess_rank", "administrator"); $admins = get_array_from_db($query); $counter = 1; foreach ($admins as $admin) { if ($counter == 1) { echo "<tr>"; } echo "<td>"; if ($admin['image_name'] == null) { $picture = "default.jpg"; } else { $picture = $admin['image_name']; } echo "<a href=\"profile.php?user={$admin['user_id']}\">"; echo "<img src=images/users/{$picture} width=\"160\" height=\"200\">"; echo "<span>{$admin['username']}</span>"; echo "</a>";
require_once "shared/admin_settings_nav.php"; ?> <div class="settings_content"> <div class="title"> List of Mods <hr /> </div> <table> <?php connect_to_database(); select_database(); $query = query_select("users"); $query .= query_select_where("acess_rank", "moderator"); $mods = get_array_from_db($query); $counter = 1; foreach ($mods as $mod) { if ($counter == 1) { echo "<tr>"; } echo "<td>"; if ($mod['image_name'] == null) { $picture = "default.jpg"; } else { $picture = $mod['image_name']; } echo "<a href=\"profile.php?user={$mod['user_id']}\">"; echo "<img src=images/users/{$picture} width=\"160\" height=\"200\">"; echo "<span>{$mod['username']}</span>"; echo "</a>";
require_once "shared/functions.php"; require_once "shared/header.php"; require_once "shared/bbcodeParser.php"; ?> <?php connect_to_database(); select_database(); if (isset($_GET['post']) && $_GET['post'] != "") { if (get_num_rows("posts", "post_id", $_GET['post']) == 0) { redirect_to("not_found.php"); } else { $post_id = $_GET['post']; $query = query_select("posts"); $query .= query_select_where("post_id", $post_id); $post = get_array_from_db($query); $post = $post[0]; } } if (!logged_in() || $_SESSION['acess_rank'] == "member" && $post['posted_by'] != $_SESSION['user_id']) { redirect_to("no_permission.php"); } ?> <div class="centerBox"> <div class="title"> Edit Post <hr /> </div>
if (isset($_GET['user']) && $_GET['user'] != "") { if (get_num_rows("users", "user_id", $_GET['user']) == 0) { redirect_to("not_found.php"); } else { $user_id = $_GET['user']; $query = query_select("users"); $query .= query_select_where("user_id", $user_id); $user = get_array_from_db($query); $user = $user[0]; } } else { if (logged_in()) { $user_id = $_SESSION['user_id']; $query = query_select("users"); $query .= query_select_where("user_id", $user_id); $user = get_array_from_db($query); $user = $user[0]; } else { redirect_to("not_found.php"); } } ?> <div class="profileWrapper"> <div class="profileLeft"> <div id="profileName" class="center"> <?php echo $user['username']; ?> <hr />
</form> </fieldset> <fieldset style="margin-top: 40px;"> <legend>Delete Forum</legend> <form method="post" action="validation.php"> <table> <tr> <td>Forum</td> <td> <select name="forum_id" size="1" class="text"> <?php $query = query_select("forums"); $query .= query_select_order("section_id,position", "ASC"); $forums_list = get_array_from_db($query); foreach ($forums_list as $item) { echo "<option value=\"{$item['forum_id']}\"> {$item['forum_name']} </option>"; } ?> </select> </td> </tr> <tr> <td colspan="2"> <input type="hidden" name="action" value="delete_forum"> <input type="submit" name="submit" value="Delete" class="button"> </td> </tr> </table> </form>
} ?> </select> </td> </tr> </form> <form method="post" action="validation.php"> <tr> <td>Change Section</td> <td> <select name="new_section" class="text"> <?php $query = query_select("sections"); $query .= query_select_order("position", "ASC"); $sections = get_array_from_db($query); foreach ($sections as $section) { echo "<option value=\"{$section['section_id']}\" "; if ($section['section_id'] == $forum['section_id']) { echo "selected"; } echo "> {$section['section_name']} </option>"; } ?> </select> </td> <td> <input type="hidden" name="action" value="update_forum_section"> <input type="hidden" name="forum_id" value="<?php echo $forum['forum_id']; ?>
<?php require_once "shared/cookies.php"; require_once "shared/functions.php"; require_once "shared/header.php"; connect_to_database(); select_database(); $query = query_select("sections"); $query .= query_select_order("position", "ASC"); $sections = get_array_from_db($query); foreach ($sections as $section) { $query = query_select("forums"); $query .= query_select_where("section_id", $section['section_id']); $query .= query_select_order("position", "ASC"); $forums = get_array_from_db($query); echo "<div class=\"listBoxOuter\">"; echo "<div class=\"listBoxTitle\">"; echo "{$section['section_name']}"; echo "</div>"; echo "<table class=\"listBoxTable\">"; echo "<tr>"; echo "<th style=\"width:800px\">Forum</th>"; echo "<th style=\"width:150px\">Threads</th>"; echo "</tr>"; if (empty($forums)) { echo "<tr><td colspan=\"2\" class=\"center\">Section empty.</td></tr>"; } else { foreach ($forums as $forum) { echo "<tr>"; echo "<td class=\"table_name\">"; if ($forum['locked']) {
require_once "shared/functions.php"; require_once "shared/header.php"; connect_to_database(); select_database(); if (!isset($_GET['forum']) || $_GET['forum'] == "") { redirect_to("not_found.php"); } else { if (get_num_rows("forums", "forum_id", $_GET['forum']) == 0) { redirect_to("index_.php"); } } $forum_id = $_GET['forum']; $query = query_select("threads"); $query .= query_select_where("forum_id", $forum_id); $query .= query_select_order("last_post_time", "DESC"); $threads = get_array_from_db($query); $forum_locked = get_value_from_db("forums", "locked", "forum_id", $forum_id); //if forum is locked, no one is allows to post threads if (logged_in() && !$forum_locked) { echo "<form method=\"post\" action=\"new_thread.php\">"; echo "<input type=\"hidden\" name=\"forum_id\" value=\"{$forum_id}\" >"; echo "<input type=\"submit\" name=\"submit\" value=\"+ Post New Thread\" class=\"button plus\">"; echo "</form>"; } echo "<div class=\"listBoxOuter\">"; echo "<div class=\"listBoxTitle\">"; if ($forum_locked) { echo "<span class=\"locked\">"; echo "<img src=\"images/lock.png\" width=\"20\" height=\"25\" title=\"This Forum is locked.\" style=\"vertical-align:bottom\">"; echo "</span>"; }
require_once "shared/admin_settings_nav.php"; ?> <div class="settings_content"> <div class="title"> List of Banned Users <hr /> </div> <table> <?php connect_to_database(); select_database(); $query = query_select("users"); $query .= query_select_where("banned", "1"); $banned_members = get_array_from_db($query); $counter = 1; foreach ($banned_members as $member) { if ($counter == 1) { echo "<tr>"; } echo "<td>"; if ($member['image_name'] == null) { $picture = "default.jpg"; } else { $picture = $member['image_name']; } echo "<a href=\"profile.php?user={$member['user_id']}\">"; echo "<img src=images/users/{$picture} width=\"160\" height=\"200\">"; echo "<span>{$member['username']}</span>"; echo "</a>";
<div class="settings_content"> <fieldset> <legend>Sections Settings</legend> <table> <form method="post" action=""> <tr> <td>Section</td> <td> <select name="section" class="text" onchange="this.form.submit()"> <?php $query = query_select("sections"); $query .= query_select_order("position", "ASC"); $section_list = get_array_from_db($query); foreach ($section_list as $item) { echo "<option value=\"{$item['section_id']}\" "; if ($item['section_id'] == $section_id) { echo "selected"; } echo "> {$item['section_name']} </option>"; } ?> </select> </td> </tr> </form> <form method="post" action="validation.php"> <tr>