echo "<br /><label>Character</label><select name='character'>"; foreach ($characters as $character) { echo "<option value='" . $character['name'] . "'>" . $character['name'] . "</option>"; } echo "</select><br /><br />"; echo "<textarea style='width: 99%;' name='body'>" . @$_POST['body'] . "</textarea>"; echo "<input type='submit' value='Comment'>"; echo "</form>"; } } echo "<center>" . $pages . "</center>"; foreach ($comments as $comment) { if ($ide->isAdmin()) { $delete = "<a href='#' onClick=\"if(confirm('Are you sure you want to delete this comment?')) window.location.href='" . WEBSITE . "/index.php/home/delete_comment/" . $comment['id'] . "';\" ><img src='" . WEBSITE . "/public/images/false.gif'></a>"; } else { if ($ide->isLogged()) { if (in_array($comment['author'], $characters[0])) { $delete = "<a href='#' onClick=\"if(confirm('Are you sure you want to delete this comment?')) window.location.href='" . WEBSITE . "/index.php/home/delete_comment/" . $comment['id'] . "';\" ><img src='" . WEBSITE . "/public/images/false.gif'></a>"; } else { $delete = ""; } } else { $delete = ""; } } echo "<div class='comment'>"; echo "<div class='commentBody'>" . $comment['body'] . "</div>"; echo "<div class='commentFooter'>" . $delete . " Posted on: " . UNIX_TimeStamp($comment['time']) . " by <a href='" . WEBSITE . "/index.php/character/view/" . $comment['author'] . "'>" . $comment['author'] . "</a></div>"; echo "</div>"; } echo "<center>" . $pages . "</center>";
<?php require "config.php"; $ide = new IDE(); try { $ide->loadInjections("home"); } catch (Exception $e) { error($e->getMessage()); } foreach ($news['news'] as $value) { echo "<div class='news'>"; echo "<div class='newsTitle'>" . $value['title'] . "</div>"; echo "<div class='newsBody'>" . $value['body'] . "</div>"; echo "<div class='newsFooter'>Posted on: " . UNIX_TimeStamp($value['time']) . " </div>"; echo "<div class='viewComments'><a href='" . WEBSITE . "/index.php/home/view/" . $value['id'] . "'>View comments</a></div>"; echo "</div>"; } echo "<div class='readArchive'><a href='" . WEBSITE . "/index.php/home/archive'>Go to archive posts</a></div>";
if ($ide->isLogged()) { if ($isModerator or $ide->isAdmin()) { echo "<fieldset class='moderatingPanel'>"; echo "<legend>Moderating panel</legend>"; echo "<a href='#' onClick=\"if(confirm('Are you sure you want to delete this thread?')) window.location.href='" . WEBSITE . "/index.php/forum/delete_thread/" . $id . "';\">Delete thread</a>"; echo "</fieldset>"; } } if ($board[0]['closed'] == 1 or $thread[0]['closed'] == 1) { echo "<a href='" . WEBSITE . "/index.php/forum/reply/" . $thread[0]['id'] . "'><img style='margin-bottom: -10px;' src='" . WEBSITE . "/public/images/forum/closedReply.png'></a>"; } else { echo "<a href='" . WEBSITE . "/index.php/forum/reply/" . $thread[0]['id'] . "'><img style='margin-bottom: -10px;' src='" . WEBSITE . "/public/images/forum/reply.png'></a>"; } foreach ($posts as $post) { echo "<div class='forumPost'>"; echo "<div class='forumPostDate'>#" . $post['id'] . " Posted on: " . UNIX_TimeStamp($post['time']) . " (" . ago($post['time']) . ")</div>"; echo "<table width='100%'>"; echo "<div class='postTitle'>" . $post['title'] . "</div>"; echo "<td valign='top' class='forumPostLeft' width='15%'>"; echo "<div class='forumPostAuthor'><a href='" . WEBSITE . "/index.php/character/view/" . $post['author'] . "'><b>" . ucfirst($post['author']) . "</b></a></div>"; echo "</td>"; echo "<td valign='top' class='forumPostRight'>"; echo "<div class='forumPostText'>" . $post['text'] . "</div>"; echo "</td>"; echo "</table>"; echo "<div class='postToolBar'>"; echo "<form style='display: inline; float: right;' method='post' action='" . WEBSITE . "/index.php/forum/reply/" . $thread[0]['id'] . "'><textarea style='display: none;' name='post'><quote>Quote <b>" . $post['author'] . "</b> " . $post['text'] . "</quote><br /></textarea><input type='image' src='" . WEBSITE . "/public/images/forum/quote.png'></form>"; if ($ide->isLogged()) { if (in_array($post['author'], $characters[0]) or $isModerator == true or $ide->isAdmin() == true) { echo "<a href='#' onClick=\"if(confirm('Are you sure you want to delete this post?')) window.location.href='" . WEBSITE . "/index.php/forum/delete_post/" . $post['id'] . "';\"><img style='float: right;' src='" . WEBSITE . "/public/images/false.gif'></a>"; echo "<a href='" . WEBSITE . "/index.php/forum/edit/" . $post['id'] . "'><img src='" . WEBSITE . "/public/images/forum/edit.png'></a>";
<?php echo "<div class='toolbar'>"; echo "<a href='" . WEBSITE . "/index.php/admin/add_news'>Add news</a> | "; echo "</div>"; if (count($news) == 0) { alert("There is no news yet."); } else { echo "<table width='100%'>"; echo "<tr><td><center><b>ID</b></center></td><td><center><b>Title</b></center></td><td><center><b>Created</b></center></td><td><center><b>Edit</b></center></td><td><center><b>Edit</b></center></td></tr>"; foreach ($news as $value) { echo "<tr class='highlight'><td><center>" . $value['id'] . "</center></td><td><center>" . $value['title'] . "</center></td><td><center>" . UNIX_TimeStamp($value['time']) . "</center></td><td><center><a href='" . WEBSITE . "/index.php/admin/edit_news/" . $value['id'] . "'><img src='" . WEBSITE . "/public/images/edit.gif'></a></center></td><td><center><a href='#' onClick=\"if(confirm('Are you sure you want to remove " . $value['title'] . " news?')) window.location.href='" . WEBSITE . "/index.php/admin/delete_news/" . $value['id'] . "';\"><img src='" . WEBSITE . "/public/images/false.gif'></a></center></td></tr>"; } echo "</table>"; } echo "<center>" . $pages . "</center>";
</td></tr> <tr><td width='30%'>Comment</td><td><?php echo $player->getComment(); ?> </td></tr> <tr><td width='30%'>Account Status</td><td><?php echo $status = $account->isPremium() ? "Premium" : "Free"; ?> </td></tr> <tr><td width='30%'>Group</td><td><?php echo $config['groups'][$player->getGroup()]; ?> </td></tr> <tr><td width='30%'>Status</td><td><?php echo $status = $player->isOnline() ? "<font color='green'>Online</font>" : "<font color='red'>Offline</font>"; ?> </td></tr> <tr><td width='30%'>Created</td><td><?php echo UNIX_TimeStamp($player->getCreated()); ?> </td></tr> </table> <?php $GLOBALS['player'] = $player; $ide = new IDE(); try { $ide->loadInjections("character_view"); } catch (Exception $e) { error($e->getMessage()); } }