<?php include "common.php"; outHtml1("Add Forum"); ?> <!-- TinyMCE --> <script type="text/javascript" src="tiny_mce/tiny_mce.js"></script> <script type="text/javascript" src="tiny_mce_init.js"></script> <?php outHtml2("Add Forum:", "index.php"); ?> <form action="addForumExecute.php" method="post"> <table class="tbl"> <tr> <td class="tblleft">Forum Name</td> <td class="tblright"><input type="text" name="name"/></td> </tr> <tr> <td class="tblleft">Forum Description</td> <td class="tblright"> <div style="margin-left: 1%; padding: 0;"><textarea name="description" id="description"></textarea></div> </td> </tr> </table> <?php if ($_GET['error'] == 1) { echo "<div class='error'>Please enter a forum name!</div>"; } else { if ($_GET['error'] == 2) {
<?php include "common.php"; outHtml1("User List"); outHtml2("User List:", "index.php"); ?> <table class='list' style="margin-top: 10px; margin-bottom: 10px; font-family: Trebuchet MS;"> <tr> <td class='listcell' style="background: url(images/bar.png) repeat-x; color: white;"><u>Username</u></td> </tr> </table> <table class='list'> <?php $dir = dir("db/Users/"); while ($filename = $dir->read()) { if ($filename != "." && $filename != "..") { $temp = new User(file_get_contents("db/Users/" . $filename)); echo "<tr><td class='listcell'><a href='viewUser.php?userId=" . $temp->getUserId() . "'>" . $temp->getUserId() . "</a></td>"; } } $dir->close(); ?> </table> <?php outHtml3();
.listleft { background-color: #bfbfbf; border-right: 1px solid; width: 35%; padding: 10px 0px 10px 10px; font-family: "Trebuchet MS"; } .listright { background-color: #e9f3ff; width: 65%; padding: 10px 0px 10px 10px; } </style> <?php outHtml2("View User: "******"db/Users/" . $_GET['userId'] . ".dat")); echo "<tr><td class='listLeft'>Name</td><td class='listRight'>" . $temp->getUserId() . "</td></tr>"; if ($temp->isBanned() == 'false') { echo "<tr><td class='listLeft'>Banned</td><td class='listRight'>No</td></tr>"; } else { echo "<tr><td class='listLeft'>Banned</td><td class='listRight'>Yes</td></tr>"; } if ($temp->isHideEmail() == false && $_SESSION['loggedIn'] == true) { echo "<tr><td class='listLeft'>Email Address</td><td class='listRight'>" . $temp->getEmail() . "</td></tr>"; } echo "<tr><td class='listLeft'>Join Date</td><td class='listRight'>" . $temp->getJoinDate() . "</td></tr>";
<?php if (file_exists("install.php")) { header("Location: install.php"); } include "common.php"; outHtml1("Forum Index"); outHtml2("Forum Index:"); ?> <table class='list' style="margin-top: 10px; margin-bottom: 10px; font-family: Trebuchet MS;"> <tr><td class="listLeft" style="background: url(images/bar.png) repeat-x; color: white;"><u>Forum</u></td><td class='listRight' style="background: url(images/bar.png) repeat-x; color: white;"><u>No. Posts</u></td></tr> </table> <?php $forumArr = array(); $fileC = file("db/forumList.dat", FILE_IGNORE_NEW_LINES); foreach ($fileC as $line) { array_push($forumArr, new Forum($line)); } echo "<table class='list'>"; foreach ($forumArr as $count => $item) { $insertStr = ""; if ($_SESSION['loggedIn'] == true && $_SESSION['user']->getLevel() == 3) { if ($count == 0) { $insertStr = "<span class='controls'><a href='forumListChange.php?mode=down&forumId=" . $item->getForumId() . "'>down</a> <a href='forumListEdit.php?forumId=" . $item->getForumId() . "'>edit</a> <a href='forumListChange.php?mode=delete&forumId=" . $item->getForumId() . "'>delete</a></span>"; } else { if ($count == sizeOf($forumArr) - 1) { $insertStr = "<span class='controls'><a href='forumListChange.php?mode=up&forumId=" . $item->getForumId() . "'>up</a> <a href='forumListEdit.php?forumId=" . $item->getForumId() . "'>edit</a> <a href='forumListChange.php?mode=delete&forumId=" . $item->getForumId() . "'>delete</a></span>"; } else { $insertStr = "<span class='controls'><a href='forumListChange.php?mode=up&forumId=" . $item->getForumId() . "'>up</a> <a href='forumListChange.php?mode=down&forumId=" . $item->getForumId() . "'>down</a> <a href='forumListEdit.php?forumId=" . $item->getForumId() . "'>edit</a> <a href='forumListChange.php?mode=delete&forumId=" . $item->getForumId() . "'>delete</a></span>"; }
$fileC = file("db/Topics/" . $_GET['topicId'] . "/posts.dat", FILE_IGNORE_NEW_LINES); foreach ($fileC as $line) { $temp = new Post($line); if ($temp->getPostId() == $_GET['postId']) { $actual = $temp; } } outHtml1("Edit Post"); ?> <!-- TinyMCE --> <script type="text/javascript" src="tiny_mce/tiny_mce.js"></script> <script type="text/javascript" src="tiny_mce_init.js"></script> <?php outHtml2("Edit Post:", "viewPosts.php?topicId=" . $actual->getTopicId()); ?> <form action="editPostExecute.php?topicId=<?php echo htmlentities($_GET['topicId']); ?> &postId=<?php echo htmlentities($_GET['postId']); ?> " method="post"> <div id="messageDiv"> Post Message:<br /> <textarea name="message"><?php echo trim($actual->getMessage()); ?> </textarea><br />
<?php include "common.php"; outHtml1("Edit Board Settings"); ?> <!-- TinyMCE --> <script type="text/javascript" src="tiny_mce/tiny_mce.js"></script> <script type="text/javascript" src="tiny_mce_init.js"></script> <?php outHtml2("Edit Board Settings", "index.php"); ?> <form method="post" action="editBoardSettingsExecute.php"> <table class='list'> <?php echo "<tr><td class='listlefta'>Board Name</td><td class='listrighta'><input type='text' class='inputbox' name='name' value=\"" . $boardname . "\" /></td></tr>"; echo "<tr><td class='listlefta'>Board Description</td><td class='listrighta'><input type='text' class='inputbox' name='description' value='" . trim(file_get_contents("db/boarddescription.dat")) . "' /></td></tr>"; echo "<tr><td class='listlefta'>Number Of Topics Per Page</td><td class='listrighta'><input type='text' class='inputbox' name='topics' value='" . trim(file_get_contents("db/topicsperpage.dat")) . "' /></td></tr>"; echo "<tr><td class='listlefta'>Recalculate Smilies</td><td class='listrighta'><input type='checkbox' class='inputBox' name='smiley' value='yes' /></td></tr>"; ?> </table> <?php if ($_GET['error'] == 1) { echo "<div class='error'>Please enter a board name!</div>"; } if ($_GET['error'] == 2) { echo "<div class='error'>Please enter a board description!</div>"; } if ($_GET['error'] == 3) { echo "<div class='error'>Please enter a valid number of topics per page!</div>"; }
inputBox.name = "option[]"; cell.appendChild(inputBox); } } function del(num) { document.getElementById("table").deleteRow(num); for (i = 2; i < document.getElementById("table").rows.length; i++) { document.getElementById("table").rows[i].cells[0].lastChild.setAttribute("onClick","del("+i+");"); } } </script> <?php outHtml2("Add Poll:", "viewTopics.php?forumId=" . $_GET['forumId']); ?> <form action="addPollExecute.php?forumId=<?php echo $_GET['forumId']; ?> " method="post"> <table class="tbl" id="table"> <tr> <td class="tblleft"><u>Poll Question</u></td> <td class="tblright"><input type="text" name="pollQuestion"/></td> </tr> <tr> <td class="tblleft"><u>Number Of Days (0 is forever)</u></td> <td class="tblright"><input type="text" name="pollLength" value="0" /></td> </tr>
<?php include "common.php"; if ($_SESSION['loggedIn'] == true) { header("location: index.php"); exit; } outHtml1("Login"); ?> <?php outHtml2("Login:"******"index.php", false); ?> <form method="POST" action="loginExecute.php"> <table class='list'> <tr> <td class='listlefta'>Username</td> <td class='listrighta'><input type="text" name="username" /></td> </tr> <tr> <td class='listlefta'>Password</td> <td class='listrighta'><input type="password" name="password" /></td> </tr> <tr> <td class='listlefta'>Remember Me</td> <td class='listrighta'><input type="checkbox" name="remember" value="checked" /></td> </tr> </table> <?php
$fileC = file("db/forumList.dat"); foreach ($fileC as $item) { $temp = new Forum($item); if ($temp->getForumId() == $_GET['forumId']) { $forum = $temp; } } outHtml1("Edit Foru"); ?> <!-- TinyMCE --> <script type="text/javascript" src="tiny_mce/tiny_mce.js"></script> <script type="text/javascript" src="tiny_mce_init.js"></script> <?php outHtml2("Edit Forum:", "index.php"); ?> <form action="forumListEditExecute.php?forumId=<?php echo $forum->getForumId(); ?> " method="post"> <div id="forumDiv"> Forum Name:<br /> <input type="text" name="name" class="textboxes" value="<?php echo $forum->getForumName(); ?> " /><br /> Forum Description:<br /> <div style="margin-top: 10px; margin-left: 5%;"> <textarea name="description" class="textboxes" style="width: 95%; height: 150px"><?php
<?php include "common.php"; outHtml1("User Admin"); outHtml2("User Admin:", "editUser.php?userId=" . $_SESSION['user']->getUserId()); ?> <table class='list' style="margin-top: 10px; margin-bottom: 10px; font-family: Trebuchet MS;"> <tr> <td class='listname' style="background: url(images/bar.png) repeat-x; color: white;"><u>Username</u></td> <td class='listlevel' style="background: url(images/bar.png) repeat-x; color: white;"><u>Level</u></td> <td class='listbanned' style="background: url(images/bar.png) repeat-x; color: white;"><u>Banned</u></td> </tr> </table> <form action="userAdminExecute.php" method="post"> <table class='list'> <?php $dir = dir("db/Users/"); $count = 0; while ($filename = $dir->read()) { if ($filename != "." && $filename != "..") { $temp = new User(file_get_contents("db/Users/" . $filename)); echo "<tr><td class='listname'>" . $temp->getUserId() . "</td>"; echo "<td class='listlevel'><input type='text' name='" . $temp->getUserId() . "[]' value='" . $temp->getLevel() . "' /></td>"; if ($temp->isBanned() == 'false') { $checked = ""; } else { $checked = " checked"; } echo "<td class='listlevel'><input type='checkbox' name='" . $temp->getUserId() . "[]' value='yes'" . $checked . " /></td></tr>";
$pm = $temp; if ($pm->isRead() == 'false') { $statusChange = true; $lineArr = explode("~", $line); $lineArr[4] = 'true'; $str .= implode("~", $lineArr) . "\n"; } } else { $str .= $line . "\n"; } } if ($statusChange) { file_put_contents("db/PMs/" . $_SESSION['user']->getUserId() . ".dat", $str); } outHtml1("View Message"); outHtml2("View Message:", "pmInbox.php"); ?> <table class="tbl"> <tr> <td class="tblleft">Sender</td> <td class="tblright"><?php echo "<a href='viewUser.php?userId=" . $pm->getSender()->getUserId() . "'>" . $pm->getSender()->getUserId() . "</a>"; ?> </td> </tr> <tr> <td class="tblleft">Date</td> <td class="tblright"><?php echo $pm->getDate(); ?>
<?php include "common.php"; $fileC = file("db/forumList.dat"); foreach ($fileC as $line) { $temp = new Forum($line); if ($temp->getForumId() == $_GET['forumId']) { $forum = $temp; } } $_SESSION['forum'] = $forum; outHtml1($forum->getForumName()); outHtml2($forum->getForumName(), "index.php"); ?> <table class='list' style="margin-top: 10px; margin-bottom: 10px; font-family: Trebuchet MS;"> <tr> <td class='listtopicname' style="background: url(images/bar.png) repeat-x; color: white;"><u>Topic</u></td> <td class='listtopiccreator' style="background: url(images/bar.png) repeat-x; color: white;"><u>Creator</u></td> <td class='listtopicposts' style="background: url(images/bar.png) repeat-x; color: white;"><u>No. Posts</u></td> <td class='listtopicdate' style="font-size: 12px; background: url(images/bar.png) repeat-x; color: white;"><u>Date Last Post / Date Created</u></td> </tr> </table> <?php $frId = $_GET['forumId']; $topicsperpage = trim(file_get_contents("db/topicsperpage.dat")); if (!isset($_GET['page'])) { $pageNo = 0; } else { $pageNo = $_GET['page']; } $topicArr = array();
<?php include "common.php"; $topic = new Topic(file_get_contents("db/Topics/" . $_GET['topicId'] . "/topic.dat")); outHtml1("Edit Topic"); ?> <?php outHtml2("Edit Topic:", "viewTopics.php?forumId=" . $topic->getForumId()); ?> <form action="editTopicExecute.php?topicId=<?php echo htmlentities($_GET['topicId']) . "&forumId=" . $topic->getForumId(); ?> " method="post"> <div id="topicDiv"> Topic Name:<br /> <input type="text" name="name" id="name" value="<?php echo $topic->getTopicName(); ?> " /><br /> <input type="submit" value="Update" /> <?php if ($_GET['error'] == 1) { echo "<div class='error'>Please enter a topic name!</div>"; } ?> </div> </form> <?php
<?php include "common.php"; outHtml1("Compose"); ?> <!-- TinyMCE --> <script type="text/javascript" src="tiny_mce/tiny_mce.js"></script> <script type="text/javascript" src="tiny_mce_init.js"></script> <?php outHtml2("Compose:", "index.php"); ?> <form action="pmComposeExecute.php?userId=<?php echo $_GET['userId']; ?> " method="post"> <table class="tbl"> <tr> <td class="tblleft">To</td> <td class="tblright"><?php echo $_GET['userId']; ?> </td> </tr> <tr> <td class="tblleft">Subject</td> <td class="tblright"><input type="text" name="subject" /></td> </tr> <tr> <td class="tblleft">Message</td>
{ var str = document.getElementById("tbl").rows[row].cells[2].innerHTML; if (str.lastIndexOf("<div class=") == -1) { str = str.substring(str.indexOf("Quote</a")+9); } else { str = str.substring(str.indexOf("Quote</a")+9,str.lastIndexOf("<div class=")); } return "<blockquote class='quote'><span style='font-size: 12px; font-weight: bold;'>Quote: "+ document.getElementById("tbl").rows[row].cells[0].firstChild.innerHTML +"</span><hr />"+ str +"</blockquote>"; } </script> <?php outHtml2($_SESSION['forum']->getForumName(), "viewTopics.php?forumId=" . $_SESSION['forum']->getForumId()); if ($_SESSION['loggedIn'] == true) { if ($_SESSION['user']->getLevel() > 1) { echo "<div id='adminControls'>Moderator Controls: "; if ($topic->isLocked() == "false") { echo "<a href='lockExecute.php?mode=lock&topicId=" . htmlentities($_GET["topicId"]) . "'>Lock</a> "; } else { echo "<a href='lockExecute.php?mode=unlock&topicId=" . htmlentities($_GET["topicId"]) . "'>Unlock</a> "; } if ($topic->isSticky() == "false") { echo "<a href='stickyExecute.php?mode=sticky&forumId=" . $_SESSION['forum']->getForumId() . "&topicId=" . htmlentities($_GET["topicId"]) . "'>Sticky</a> "; } else { echo "<a href='stickyExecute.php?mode=unsticky&forumId=" . $_SESSION['forum']->getForumId() . "&topicId=" . htmlentities($_GET["topicId"]) . "'>Unsticky</a> "; } echo "</div>"; }
<?php include "common.php"; if ($_SESSION['loggedIn'] == true) { header("location: index.php"); exit; } outHtml1("Register"); outHtml2("Register", "index.php", false); ?> <form method="POST" action="registerExecute.php"> <table class='list'> <tr> <td class='listlefta'>Username</td> <td class='listrighta'><input type="text" name="username"></td> </tr> <tr> <td class='listlefta'>Password</td> <td class='listrighta'><input type="password" name="password"></td> </tr> <tr> <td class='listlefta'>Email Address</td> <td class='listrighta'><input type="text" name="email"></td> </tr> <tr> <td class='listlefta'>Hide Email</td> <td class='listrighta'><input type="checkbox" name="hideEmail" value="yes"></td> </tr> </table> <?php
<?php include "common.php"; if ($_SESSION['user']->getUserId() != $_GET['userId']) { header("Location: index.php"); } outHtml1("Edit Your Profile"); ?> <!-- TinyMCE --> <script type="text/javascript" src="tiny_mce/tiny_mce.js"></script> <script type="text/javascript" src="tiny_mce_init.js"></script> <?php outHtml2("Edit Your Profile", "index.php"); ?> <form method="post" action="editExecute.php"> <table class='list'> <?php $temp = new User(file_get_contents("db/Users/" . $_GET['userId'] . ".dat")); echo "<tr><td class='listleftb'>Name</td><td colspan='2' class='listrightb'>" . $temp->getUserId() . "</td></tr>"; echo "<tr><td class='listleftb'>Password</td><td colspan='2' class='listrightb'><input type='password' class='inputBox' name='password' value='" . $temp->getPassword() . "' /></td></tr>"; echo "<tr><td class='listleftb'>Email Address</td><td colspan='2' class='listrightb'><input type='text' class='inputBox' name='email' value='" . $temp->getEmail() . "' /></td></tr>"; echo "<tr><td class='listleftb'>Join Date</td><td colspan='2' class='listrightb'>" . $temp->getJoinDate() . "</td></tr>"; echo "<tr><td class='listleftb'>No Of Posts</td><td colspan='2' class='listrightb'>" . $temp->getNoPosts() . "</td></tr>"; echo "<tr><td class='listleftb'>No Of Topics</td><td colspan='2' class='listrightb'>" . $temp->getNoTopics() . "</td></tr>"; echo "<tr><td class='listleftb'>Level</td><td colspan='2' class='listrightb'>" . $temp->getLevel() . "</td></tr>"; echo "<tr><td class='listleftb'>Signature</td><td colspan='2' class='listrightb'><textarea name='sig'>" . $temp->getSig() . "</textarea></td></tr>"; if ($temp->ishideEmail()) { $hideEmail = " checked"; }
<?php include "common.php"; outHtml1("Move Topic"); outHtml2("Move Topic:", $_SERVER['HTTP_REFERER']); ?> <p style="margin-left: 5%;">Click on the forum to which the topic is going to be moved.</p> <table class='list' style="margin-top: 10px; margin-bottom: 10px; font-family: Trebuchet MS;"> <tr><td class="listcell" style="background: url(images/bar.png) repeat-x; color: white;"><u>Forum</u></td></tr> </table> <?php $forumArr = array(); $fileC = file("db/forumList.dat"); foreach ($fileC as $line) { $temp = new Forum($line); if ($temp->getForumId() != $_GET['forumId']) { array_push($forumArr, $temp); } } echo "<table class='list'>"; foreach ($forumArr as $item) { echo "<tr>\r\n\t\t\t\t\t\t<td class='listcell'><a href='moveTopicExecute.php?oldForumId=" . $_GET['forumId'] . "&topicId=" . $_GET['topicId'] . "&forumId=" . $item->getForumId() . "'>" . $item->getForumName() . "</a></td>\r\n\t\t\t\t\t</tr>"; } echo "</table>"; ?> <?php outHtml3();
<?php include "common.php"; outHtml1("Inbox"); outHtml2("Inbox:", "index.php"); ?> <table class='list' style="margin-top: 10px; margin-bottom: 10px; font-family: Trebuchet MS;"> <tr> <td class='listsubject' style="background: url(images/bar.png) repeat-x; color: white;"><u>Subject</u></td> <td class='listsender' style="background: url(images/bar.png) repeat-x; color: white;"><u>Sender</u></td> <td class='listdate' style="font-size: 12px; padding: 10px 0px 10px 0px; background: url(images/bar.png) repeat-x; color: white;"><u>Date Sent</u></td> </tr> </table> <?php $fileC = file("db/PMs/" . $_SESSION['user']->getUserId() . ".dat"); $messageArr = array(); foreach ($fileC as $line) { if (trim($line) != "") { array_push($messageArr, new PM($line)); } } if (sizeOf($messageArr) > 0) { echo "<table class='list'>"; $messageArr = array_reverse($messageArr); foreach ($messageArr as $item) { if ($item->isRead() == 'false') { $style = " style='font-weight: bold;'"; } else { $style = "";