SHARE
TWEET

Untitled

a guest May 19th, 2017 43 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. session_start();
  3. require("includes/configure.php");
  4.  
  5. $con = mysql_connect("$configure[dbservname]","$configure[dbuname]","$configure[dbpaswd]");
  6. if (!$con)
  7.   {
  8.   die('Could not connect to MySQL. There is an error in your configure.php file: ' . mysql_error());
  9.   }
  10.  
  11. $db_selected = mysql_select_db("$configure[dbname]", $con);
  12. if (!$db_selected)
  13.   {
  14.   die ("MySQL can\'t use the specified database : " . mysql_error());
  15.   }
  16.  
  17. mysql_select_db("$configure[dbname]", $con);
  18.  
  19. $cat_query = mysql_query("SELECT * FROM categories");
  20. $for_query = mysql_query("SELECT * FROM forums WHERE id = " . $row[forum_id]);
  21.  
  22. include("header.php");
  23. include("navigation.php");
  24.  
  25. ?>
  26. <!-- Start Login Box -->
  27. <div align="left">
  28.    <table border="1">
  29.      <tr>
  30.         <td>Welcome back, Sajuuk!</td>
  31.         <td>Hello there Guest! <br /><a href="register.php">Register an account with us</a> or log in below!</td>
  32.      </tr>
  33.      <tr>
  34.         <td>You were online last time at 12:00PM GMT</td>
  35.         <td>Username: <input type="text" /></td>
  36.      </tr>
  37.      <tr>
  38.         <td>You currently have 0 Private Messages</td>
  39.         <td>Password: <input type="password" /><form action="success.php" method="get"><input type="submit" /></form></td>
  40.      </tr>
  41.    </div>
  42. </table>
  43. <!-- End Login Box -->
  44. <br />
  45. <!-- Start Welcome box -->
  46. <if condition="$show['unregistered']">
  47. <table border="1">
  48.    <tr>
  49.        <td><strong>Welcome to the forums!</strong></td>
  50.    </tr>
  51.    <tr>
  52.        <td>You are currently viewing this forum as an unregistered user. This means you are restricted to viewing forums and threads only. To be able to communicate privately with other users and post messages, you will need to <a href="register.php">create an account</a>. <b>This forum is not constructed as it should be, I am only showing you what the final product for the forum will be.</td>
  53.    </tr>
  54. </table>
  55. <else />
  56. </if>
  57. <!-- End Welcome box -->
  58. <br />
  59. <!-- Start Main Forums -->
  60. <table border="1">
  61.    <tr>
  62.       <td>Status</td>
  63.       <td>Forum Name / Description</td>
  64.       <td>Threads</td>
  65.       <td>Posts</td>
  66.       <td>Last Post</td>
  67.    </tr>
  68.    <?php echo mysql_error();
  69.          while($row = mysql_fetch_array($cat_query)) {
  70.          // Display category,
  71.  
  72.          while($frm = mysql_fetch_array($for_query)) {
  73.          // Display forum(s)
  74.          }
  75.    }
  76.    ?>
  77.    <?php /*
  78. while($row = mysql_fetch_array($result))
  79.  
  80.            {
  81.            echo "<tr>";
  82.            echo "<td colspan=\"5\">" . $row[category_name] . "::" . $row[category_desc] . "</td>";
  83.            echo "</tr>";
  84.            echo "<tr>";
  85.            echo "<td>" . "<b>Open!</b>" . "</td>";
  86.            echo '<td>' . "<a href=\"forumview.php?id=$row[forum_id]\">" . $row[forum_name] . "</a>" . '<br />' . $row[forum_desc] . '</td>';
  87.            echo "<td>" . $row[total_thread_count] . "</td>";
  88.            echo "<td>" . $row[total_post_count] . "</td>";
  89.            echo "<td>" . $row[latest_post_forum] . "</td>";
  90.            echo "</tr>";
  91.            }
  92. */
  93.   ?>
  94. </table>
  95. <br />
  96. <!-- End Main Forums -->
  97.  
  98. <!-- Start Who is Online -->
  99. <table border="1">
  100.    <tr>
  101.       <td>Who is Viewing the forums? <a href="online.php">Complete Listings</a></td>
  102.    </tr>
  103.    <tr>
  104.       <td>There are 2 registered users, 3 guests and one search engine spider viewing the forums right now.<br />
  105.           The maximum number of users, guests and search engine spiders combined totals 5.<br />
  106.           <a href="user.php?id=1"><span style="color: purple;font-weight: bold;"><i>Sajuuk</i></span></a>, <!-- <a href="user.php?id="2">Invsible</a> --><a href="user.php?id=3"><span style="color: purple;font-weight: bold;font-style: italic;">Alex</span></a>
  107.       </td>
  108.    </tr>
  109.    <tr>
  110.        <td>Forum Statistics</td>
  111.    </tr>
  112.    <tr>
  113.        <td>2 Threads and 3 Posts have been made on these forums.<br />
  114.            20 Bugs have been filed in the bug tracker so far.<br />
  115.            The newest user to join this forum is <a href="user.php?id=3">Alex</a>
  116.        </td>
  117.    </tr>
  118. </table>
  119. <!-- End Who is Online -->
  120. <br />
  121. <?php include("footer.php"); ?>
RAW Paste Data
Want to get better at PHP?
Learn to code PHP in 2017
Top