@ 2014-05-30T21:13:18Z <?php
ini_set('display_errors', 'On');
error_reporting(E_ALL);
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$start = $time;
define("DB_HOST","mysql117.loopia.se");
define("DB_USER","normal@i103189");
define("DB_PASS","KungMicke87");
define("DB_NAME","indiehjaerta_com");
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>indiehjaerta.com - Forum</title>
<link href="style_test.css" rel="stylesheet" type="text/css" />
</head>
<body>
<a href="login.php">Login<a/> -
<a href="admin.php">Admin<a/> -
<a href="members.php">Members<a/> -
<a href="register.php">Register<a/> -
<a href="blog.php">Blog<a/> -
<a href="news.php">News<a/> -
<a href="event.php">Event<a/> -
<a href="forum.php">Forum<a/> -
<a href="profile.php">Profile<a/> -
<a href="logout.php">Logout<a/>
<br /> <br />
<!-- New Post Start -->
<!-- New Post End -->
<!-- List Forum Category Threads - Start -->
<?php
if (isset($_GET['fid']))
{
if (isset($_GET['tid']))
{
// Connect to MySQLi
$sqli = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME) or die("Error: ".mysqli_error($sqli));
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$tid = $_GET['tid'];
$query = mysqli_query($sqli, "SELECT * FROM forumtopics WHERE id='$tid'") or die("Error: ".mysqli_error($sqli));
$checkthreadexists = mysqli_num_rows($query);
// Check if we have ny threads in this category
if($checkthreadexists == 0)
{
// No threads
echo '<span class="text">No such topic ID exists!</span><br />';
}
else
{
$row = mysqli_fetch_array($query);
$uid = $row['userid'];
$userquery = mysqli_query($sqli, "SELECT * FROM members WHERE id='$uid'") or die("Error: ".mysqli_error($sqli));
$userrow = mysqli_fetch_array($userquery);
echo '<table border="0">';
echo '<tr> ';
echo '<th></th>';
echo '<th></th>';
echo '<th><span class="text"><span class="text">' .$row['threadname']. '</span></th>';
echo '<th></th>';
echo '</tr>';
echo '<tr>';
echo '<td><a href="profile.php?id=' .$uid. '"><span class="text">' .$userrow['username']. '</span></a></td>';
echo '<td></td>';
echo '<td><span class="text">' .$row['text']. '</span></td>';
echo '<td></td>';
echo '</tr>';
echo '</table><br />';
}
}
else
{
// Connect to MySQLi
$sqli = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME) or die("Error: ".mysqli_error($sqli));
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$fid = $_GET['fid'];
$query = mysqli_query($sqli, "SELECT * FROM forumtopics WHERE categoryid='$fid' ORDER BY id") or die("Error: ".mysqli_error($sqli)); //Don't order by ID!
$checknumthreads = mysqli_num_rows($query);
// Check if we have ny threads in this category
if($checknumthreads == 0)
{
// No threads
echo '<span class="text">No forums threads found in the database!</span><br />';
}
else
{
?>
<table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td>
<strong>Forums</strong>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td><strong>Name</strong></td>
<td></td>
<td><strong>Replies</strong></td>
<td><strong>Last Post</strong></td>
</tr>
<?php
while ($row = mysqli_fetch_array($query))
{
?>
<tr>
<td><a href="?fid=<?php echo $_GET['fid'] ?> &tid= <?php echo $row['id'] ?>" style="color: black"><?php echo $row['threadname'] ?></a></td>
<td></td>
<td>0</td>
<td>00:00</td>
</tr>
<?php
}
?>
</table>
</td>
</tr>
</table>
<?php
}
?>
<!-- List Forum Category Threads - End -->
<!-- List Forum Categories - Start -->
<?php
}
else
{
// Connect to MySQLi
$sqli = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME) or die("Error: ".mysqli_error($sqli));
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$query = mysqli_query($sqli, "SELECT * FROM forumcat ORDER BY id") or die("Error: ".mysqli_error($sqli));
$checknumforums = mysqli_num_rows($query);
// Check if we have any forum categories
if($checknumforums == 0)
{
// No forums
echo '<span class="text">No forums found in the database!</span><br />';
}
else
{
?>
<table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td>
<strong>Forums</strong>
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td><strong>Name</strong></td>
<td></td>
<td><strong>Threads</strong></td>
<td><strong>Last Post</strong></td>
</tr>
<?php
while ($row = mysqli_fetch_array($query))
{
?>
<tr>
<td><a href="?fid=<?php echo $row['id'] ?>" style="color: black"><?php echo $row['forumname'] ?></a></td>
<td></td>
<td>0</td>
<td>00:00</td>
</tr>
<?php
}
?>
</table>
</td>
</tr>
</table>
<?php
}
}
?>
<!-- List Forum Categories - End -->
<?php
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$finish = $time;
$total_time = round(($finish - $start), 4);
echo '<span class="text">Page generated in '.$total_time.' seconds.</span><br />';
?>
</body>
</html>
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).
Version System time (s) User time (s) Memory (MiB) 5.4.29 0.011 0.067 12.51 5.4.28 0.024 0.081 12.40 5.4.27 0.013 0.059 12.41 5.4.26 0.015 0.091 12.40 5.4.25 0.019 0.073 12.41 5.4.24 0.021 0.096 12.41 5.4.23 0.014 0.067 12.39 5.4.22 0.011 0.067 12.39 5.4.21 0.012 0.049 12.39 5.4.20 0.010 0.071 12.40 5.4.19 0.012 0.059 12.39 5.4.18 0.011 0.061 12.39 5.4.17 0.024 0.078 12.40 5.4.16 0.018 0.049 12.39 5.4.15 0.010 0.047 12.39 5.4.14 0.007 0.038 12.09 5.4.13 0.007 0.037 12.06 5.4.12 0.016 0.046 12.04 5.4.11 0.007 0.042 12.03 5.4.10 0.009 0.041 12.03 5.4.9 0.016 0.073 12.03 5.4.8 0.014 0.067 12.03 5.4.7 0.012 0.068 12.02 5.4.6 0.034 0.090 12.02 5.4.5 0.017 0.072 12.02 5.4.4 0.015 0.049 12.01 5.4.3 0.013 0.052 12.01 5.4.2 0.013 0.044 12.00 5.4.1 0.014 0.054 12.01 5.4.0 0.016 0.079 11.50 5.3.28 0.017 0.058 12.71 5.3.27 0.011 0.050 12.73 5.3.26 0.014 0.060 12.72 5.3.25 0.007 0.051 12.72 5.3.24 0.008 0.049 12.72 5.3.23 0.020 0.096 12.71 5.3.22 0.011 0.040 12.68 5.3.21 0.013 0.061 12.68 5.3.20 0.011 0.049 12.68 5.3.19 0.013 0.072 12.68 5.3.18 0.009 0.063 12.68 5.3.17 0.014 0.048 12.67 5.3.16 0.009 0.052 12.67 5.3.15 0.010 0.040 12.68 5.3.14 0.010 0.051 12.66 5.3.13 0.008 0.052 12.66 5.3.12 0.010 0.047 12.66 5.3.11 0.010 0.039 12.66 5.3.10 0.006 0.053 12.13 5.3.9 0.010 0.051 12.10 5.3.8 0.010 0.054 12.09 5.3.7 0.013 0.048 12.09 5.3.6 0.015 0.060 12.08 5.3.5 0.011 0.053 12.02 5.3.4 0.009 0.040 12.02 5.3.3 0.009 0.039 11.98 5.3.2 0.011 0.040 11.76 5.3.1 0.007 0.054 11.72 5.3.0 0.008 0.071 11.71
preferences:dark mode live preview
140.38 ms | 1394 KiB | 7 Q