@ 2014-06-04T18:27:12Z <?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");
if (isset($_POST['add']))
{
//forumreplies
if (isset($_POST['forumid']) && empty(!$_POST['forumid']))
{
// 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();
}
$saveThread = TRUE;
$emptyStory = FALSE;
$emptyText = FALSE;
$subject = mysqli_real_escape_string($sqli, $_POST['subject']);
$text = mysqli_real_escape_string($sqli, $_POST['text']);
$fid = mysqli_real_escape_string($sqli, $_POST['forumid']);
$query = mysqli_query($sqli,"SELECT * FROM forumcat WHERE id='$fid'") or die("Error: ".mysqli_error($sqli));
$results = mysqli_num_rows($query);
if ($results == 0)
{
$error = "No such CategoryID.";
}
else
{
$timestamp = date('Y-m-d H:i:s');
$userid = $_SESSION['id'];
if (empty($subject))
{
$emptySubject = TRUE;
$saveThread = FALSE;
}
elseif (empty($text))
{
$emptyText = TRUE;
$saveThread = FALSE;
}
if ($saveThread == TRUE)
{
$addquery = mysqli_query($sqli,"INSERT INTO forumtopics (`threadname`, `text`, `categoryid`, `userid`, `timestamp`) VALUES ('$subject', '$text', '$fid', '$userid', '$timestamp')");
$tid = mysqli_insert_id($addquery);
header("location:forummessage.php?added=thread&fid=$fid&tid=$tid");
}
}
}
else
{
echo "No ForumID set.";
}
}
?>
<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="logout.php">Logout<a/>
<br />
<hr />
<br />
<?
elseif (isset($_GET['added']) && ($_GET['added'] == 'thread'))
{
?>
<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="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td colspan="3"><strong>Thread Created</strong></td>
</tr>
<tr>
<td colspan="3"><a href="forum.php?fid=$_GET['fid']&tid=$_GET['tid']">Link to thread.</a></td>
</tr>
</table>
</td>
</tr>
</table>
<?php
}
elseif (isset($_GET['action']) && $_GET['action'] == 'new')
{
if (isset($_GET['type']) && $_GET['type'] == 'thread')
{
if (isset($_GET['fid']) && empty(!$_GET['fid']))
{
?>
<table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td>
<strong>Forums</strong>
</td>
</tr>
<tr>
<form method="post" action="">
<input name="forumid" type="hidden" id="forumid" value="<?php echo $_GET['fid'] ?>">
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td colspan="3"><strong>Create Thread</strong></td>
</tr>
<tr>
<td colspan="3">$error</td>
</tr>
<tr>
<td width="78"><strong>Subject</strong></td>
<td width="6">:</td>
<td width="294"><input name="subject" type="text" id="subject"></td>
</tr>
<tr>
<td>Story</td>
<td>:</td>
<td><textarea name="text" type="text" id="text" rows="3"></textarea></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><input type="submit" name="add" value="Post"></td>
</tr>
</table>
</td>
</form>
</tr>
</table>
<?php
}
else
{
echo "Forum ID missing.";
}
}
}
else
{
echo "Nothing to see here.";
}
?>
<?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.000 0.040 18.95 5.4.28 0.010 0.033 19.22 5.4.27 0.003 0.037 19.33 5.4.26 0.000 0.040 19.03 5.4.25 0.013 0.030 19.07 5.4.24 0.000 0.047 19.21 5.4.23 0.007 0.040 19.09 5.4.22 0.000 0.053 19.19 5.4.21 0.000 0.053 19.07 5.4.20 0.003 0.043 19.19 5.4.19 0.003 0.037 18.98 5.4.18 0.003 0.037 19.12 5.4.17 0.000 0.040 18.86 5.4.16 0.000 0.040 19.22 5.4.15 0.003 0.037 19.12 5.4.14 0.000 0.043 16.52 5.4.13 0.003 0.037 16.49 5.4.12 0.000 0.037 16.40 5.4.11 0.000 0.037 16.46 5.4.10 0.003 0.047 16.35 5.4.9 0.000 0.057 16.45 5.4.8 0.007 0.040 16.50 5.4.7 0.003 0.040 16.55 5.4.6 0.003 0.050 16.16 5.4.5 0.000 0.037 16.52 5.4.4 0.007 0.033 16.55 5.4.3 0.000 0.037 16.48 5.4.2 0.007 0.050 16.53 5.4.1 0.003 0.043 16.24 5.4.0 0.003 0.033 15.94 5.3.28 0.003 0.067 14.57 5.3.27 0.003 0.040 14.64 5.3.26 0.000 0.040 14.45 5.3.25 0.000 0.070 14.66 5.3.24 0.003 0.033 14.56 5.3.23 0.000 0.037 14.44 5.3.22 0.007 0.067 14.52 5.3.21 0.003 0.043 14.48 5.3.20 0.000 0.037 14.43 5.3.19 0.000 0.037 14.52 5.3.18 0.007 0.040 14.55 5.3.17 0.003 0.060 14.45 5.3.16 0.003 0.043 14.43 5.3.15 0.000 0.047 14.52 5.3.14 0.000 0.040 14.49 5.3.13 0.000 0.040 14.41 5.3.12 0.000 0.083 14.40 5.3.11 0.003 0.060 14.48 5.3.10 0.000 0.037 13.95 5.3.9 0.003 0.033 13.89 5.3.8 0.000 0.037 14.00 5.3.7 0.000 0.037 14.11 5.3.6 0.000 0.037 14.05 5.3.5 0.000 0.037 13.75 5.3.4 0.000 0.047 14.04 5.3.3 0.003 0.040 13.75 5.3.2 0.000 0.043 13.49 5.3.1 0.007 0.027 13.61 5.3.0 0.000 0.037 13.73 5.2.17 0.007 0.057 11.16 5.2.16 0.010 0.047 11.01 5.2.15 0.000 0.050 11.01 5.2.14 0.003 0.027 11.19 5.2.13 0.000 0.037 11.02 5.2.12 0.000 0.050 11.22 5.2.11 0.000 0.033 10.99 5.2.10 0.003 0.027 10.95 5.2.9 0.000 0.057 11.16 5.2.8 0.000 0.037 10.95 5.2.7 0.010 0.023 11.12 5.2.6 0.000 0.030 11.10 5.2.5 0.000 0.030 10.88 5.2.4 0.000 0.037 10.86 5.2.3 0.003 0.027 10.81 5.2.2 0.003 0.033 10.98 5.2.1 0.003 0.027 10.77 5.2.0 0.000 0.030 10.67 5.1.6 0.000 0.033 9.98 5.1.5 0.000 0.027 9.98 5.1.4 0.003 0.023 9.98 5.1.3 0.003 0.030 10.26 5.1.2 0.000 0.030 10.47 5.1.1 0.000 0.037 9.98 5.1.0 0.000 0.033 10.05 5.0.5 0.000 0.023 9.98 5.0.4 0.003 0.020 9.98 5.0.3 0.000 0.033 9.98 5.0.2 0.000 0.020 9.98 5.0.1 0.000 0.020 9.98 5.0.0 0.000 0.040 9.98 4.4.9 0.000 0.013 9.98 4.4.8 0.000 0.013 9.98 4.4.7 0.000 0.017 9.98 4.4.6 0.000 0.033 9.98 4.4.5 0.000 0.020 9.98 4.4.4 0.000 0.023 9.98 4.4.3 0.000 0.017 9.98 4.4.2 0.000 0.013 9.98 4.4.1 0.000 0.017 9.98 4.4.0 0.000 0.027 9.98 4.3.11 0.000 0.017 9.98 4.3.10 0.000 0.020 9.98 4.3.9 0.000 0.013 9.98 4.3.8 0.000 0.050 9.98 4.3.7 0.003 0.020 9.98 4.3.6 0.000 0.023 9.98 4.3.5 0.000 0.020 9.98 4.3.4 0.000 0.023 9.98 4.3.3 0.000 0.017 9.98 4.3.2 0.003 0.013 9.98 4.3.1 0.003 0.027 9.98 4.3.0 0.007 0.010 9.98
preferences:dark mode live preview
135.65 ms | 1394 KiB | 7 Q