Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once("session.php");
- require_once("class.user.php");
- $auth_user = new USER();
- $user_id = $_SESSION['user_session'];
- $stmt = $auth_user->runQuery("SELECT * FROM users WHERE user_id=:user_id");
- $stmt->execute(array(":user_id"=>$user_id));
- $userRow=$stmt->fetch(PDO::FETCH_ASSOC);
- ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" id="www-roblox-com">
- <head><title>
- zahhblox
- </title><link id="ctl00_Imports" rel="stylesheet" type="text/css" href="/includes/css/AllCSS.css"/>
- <link rel="stylesheet" href="/includes/css/forumdef.css" type="text/css"/><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta http-equiv="Content-Language" content="en-us"/></head>
- <body>
- <div id="Container">
- <div id="Header">
- <div id="Banner">
- <div id="Options">
- <div id="Authentication">
- <span>Logged in as <a href="/profile.php?id=<?php print($userRow['user_id']); ?>"><?php print($userRow['user_name']); ?></a> | <a href="/logout.php">Logout</a></span>
- </div>
- <div id="Settings"></div>
- </div>
- <div id="Logo">
- <a id="ctl00_rbxImage_Logo" title="ROBLOX" href="https://zahhblox.xyz" style="display:inline-block;cursor:pointer;"><img src="/includes/img/roblox_logo.png" border="0" alt="ROBLOX" blankurl="http://t6.roblox.com:80/blank-224x59.gif"/></a>
- </div>
- <div id="Alerts">
- <table style="width:100%;height:100%">
- <tr>
- <td valign="middle">
- <div id="AlertSpace">
- <div id="RobuxAlert">
- <a id="ctl00_rbxAlerts_RobuxAlertIconHyperLink" class="RobuxAlertIcon" href="#"><img src="http://besterestbloxerest.cf/assets/images/robux.png" style="border-width:0px;" /></a>
- <a id="ctl00_rbxAlerts_RobuxAlertCaptionHyperLink" class="RobuxAlertCaption" href="#"><?php print($userRow['robux']); ?> ROBUX</a>
- </div>
- </div>
- </td>
- </tr>
- </table>
- </div>
- </div>
- <div class="Navigation">
- <span><a id="ctl00_Menu_hlMyRoblox" class="MenuItem" href="/profile.php?id=<?php print($userRow['user_id']); ?>">My ROBLOX</a></span>
- <span class="Separator"> | </span>
- <span><a id="ctl00_Menu_hlGames" class="MenuItem" href="/games.php">Games</a></span>
- <span class="Separator"> | </span>
- <span><a id="ctl00_Menu_hlCatalog" class="MenuItem" href="/catalog.php">Catalog</a></span>
- <span class="Separator"> | </span>
- <span><a id="ctl00_Menu_hlBrowse" class="MenuItem" href="/users.php">People</a></span>
- <span class="Separator"> | </span>
- <span><a id="ctl00_Menu_hlForum" class="MenuItem" href="/forum.php">Forum</a></span>
- <span class="Separator"> | </span>
- <span><a id="ctl00_Menu_hlForum" class="MenuItem" href="/settings.php">Settings</a></span>
- </div>
- </div>
- <?php
- if(empty($_GET["id"])) {
- header("Location: https://zahhblox.xyz/forum.php");
- exit;
- }
- $id = $_GET["id"];
- $page = (int)$_GET["page"];
- if(empty($_GET['page'])) {
- header('Location: https://zahhblox.xyz/topic.php?id='.$id.'&page=1');
- }
- $stmte = $auth_user->runQuery("SELECT * FROM `topics` WHERE `id` = :id");
- $stmte->execute(array(":id"=>$id));
- if ($stmte->rowCount() == 0) {
- echo '<center>This topic doesn\'t exist!</center>';
- exit();
- }
- $stmtf = $auth_user->runQuery("SELECT * FROM `threads` WHERE `topic` = :id ORDER BY `lastupdated` DESC");
- $stmtf->execute(array(":id"=>$id))
- ?>
- <div id="Body">
- <table width="100%" cellspacing="0" cellpadding="0" border="0">
- <tr>
- <td>
- </td>
- </tr>
- <tr valign="bottom">
- <td>
- <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
- <tr valign="top">
- <!-- left column -->
- <td> </td>
- <!-- center column -->
- <td id="ctl00_cphRoblox_CenterColumn" width="95%" class="CenterColumn">
- <br>
- <span id="ctl00_cphRoblox_ThreadView1">
- <table cellpadding="0" width="100%">
- <tr>
- <td colspan="2" align="left"><span id="ctl00_cphRoblox_ThreadView1_ctl00_Whereami1" name="Whereami1">
- <span id="ctl00_cphRoblox_ThreadView1_ctl00_Whereami1_ctl00_MenuScript"></span></span></td>
- </tr>
- <tr>
- <td>
-
- </td>
- </tr>
- <tr>
- <td valign="bottom" align="left"><a id="ctl00_cphRoblox_ThreadView1_ctl00_NewThreadLinkTop" href="/newpost.php?id=<?php print($_GET["id"]); ?>"><img id="ctl00_cphRoblox_ThreadView1_ctl00_NewThreadImageTop" src="/includes/img/newtopic.gif" border="0"/></a></td>
- </tr>
- <tr>
- <td valign="top" colspan="2"><table id="ctl00_cphRoblox_ThreadView1_ctl00_ThreadList" class="tableBorder" cellspacing="1" cellpadding="3" border="0" width="100%">
- <tr>
- <th class="tableHeaderText" align="left" colspan="2" height="25"> Thread </th><th class="tableHeaderText" align="center" nowrap="nowrap"> Started By </th><th class="tableHeaderText" align="center"> Replies </th><th class="tableHeaderText" align="center"> Views </th><th class="tableHeaderText" align="center" nowrap="nowrap"> Last Post </th>
- </tr><?php
- $host = "localhost";
- $db_name = "zahhblox_db";
- $username = "zahhblox";
- $password = "1234567890?!1010";
- try{
- $dbcon = new PDO("mysql:host=".$host. ";dbname=".$db_name, $username, $password);
- $dbcon->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT);
- $dbcon->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
- }catch (exception $e){
- echo 'We could not connect to the database. Please try again shortly as we sent a team of potatoes to fix this issue.';
- exit;
- }
- $results = ($page - 1) * 10;
- $stmt = $dbcon->prepare("SELECT * FROM threads WHERE `topic` = :id ORDER BY `lastupdated` DESC LIMIT $results, 20");
- $stmt->execute(array(":id"=>$id));
- $stmt2 = $dbcon->prepare("SELECT * FROM threads");
- $stmt2->execute();
- $totalpages = ceil($stmt2->rowCount()/10);
- if ($stmt->rowCount() == 0) {
- echo 'Nothing found.';
- }
- foreach ($stmt as $thread) {
- $namestr = strip_tags($thread['name']);
- $bodystr = strip_tags($thread['body']);
- $profile = $auth_user->runQuery("SELECT * FROM `users` WHERE `user_id` = :id");
- $profile->execute(array(":id"=>$thread['uid']));
- $presult = $profile->fetch(PDO::FETCH_ASSOC);
- $lpost = $auth_user->runQuery("SELECT * FROM `users` WHERE `user_id` = :id");
- $lpost->execute(array(":id"=>$thread['lastposter']));
- $lresult = $lpost->fetch(PDO::FETCH_ASSOC);
- echo '<tr>
- <td class="forumRow" align="center" valign="middle" width="25"></td><td class="forumRow" height="25"><a class="linkSmallBold" href="/thread.php?id='; print($thread['id']); echo '">'; print($namestr); echo '</a></td><td class="forumRowHighlight" align="left" width="100"> <a class="linkSmall" href="/profile.php?id='; print($presult['user_id']); echo '">'; print($presult['user_name']); echo '</a></td><td class="forumRowHighlight" align="center" width="50"><span class="normalTextSmaller">'; print($thread['replies']); echo '</span></td><td class="forumRowHighlight" align="center" width="50"><span class="normalTextSmaller">'; print($thread['views']); echo '</span></td><td class="forumRowHighlight" align="center" width="140" nowrap="nowrap">by <a class="linkSmall" href="/profile.php?id='; print($lresult['user_id']); echo '">'; print($lresult['user_name']); echo '</a><a href="/web/20080722032542/http://www.roblox.com:80/Forum/ShowPost.aspx?PostID=1905779#1905779"></a></td>
- </tr>';
- }
- ?>
- <td class="forumHeaderBackgroundAlternate" colspan="6"> </td>
- </tr>
- </table><span id="ctl00_cphRoblox_ThreadView1_ctl00_Pager"><table cellspacing="0" cellpadding="0" border="0" width="100%">
- <tr>
- <td><span class="normalTextSmallBold">Page <?php echo $page; ?> of <?php echo $totalpages; ?></span></td><td align="right"><?php if($page +1 > $totalpages) { exit; } ?> <b><?php echo $page; ?></b> <a href="/topic.php?id=<?php echo $id; ?>&page=<?php echo $page + 1; ?>"><?php echo $page + 1; ?></a> <a href="/topic.php?id=<?php echo $id; ?>&page=<?php echo $page + 2; ?>"><?php echo $page + 2; ?></a></td>
- </tr>
- </table></span></td>
- </tr>
- <tr>
- <td colspan="2">
-
- </td>
- </tr>
- <tr>
- <td class="CenterColumn"> </td>
- <!-- right margin -->
- <td class="RightColumn"> </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement