@ 2014-05-29T22:49:32Z <?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 - Profile</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 />
<?php
if (isset($_GET['action']))
{
if ($_GET['action'] == 'edit')
{
if (isset($_GET['id']))
{
// Connect to MySQLi
$sqli = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME) or die(mysqli_errno());
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$id = $_GET['id'];
$query = mysqli_query($sqli, "SELECT * FROM members WHERE id='$id'") or die("Error: ".mysqli_error($sqli));
$checkuser = mysqli_num_rows($query);
// Check if user exists
if($checkuser != 1)
{
// Username not exist
echo '<span class="text">Username does not exist in the database!</span><br />';
}
else
{
while ($row = mysqli_fetch_array($query))
{
?>
<table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<form method="post" action="">
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td colspan="3"><strong>Profile Edit</strong></td>
</tr>
<tr>
<td colspan="3"><?php if(isset($message)) { echo $message; } ?></td>
</tr>
<tr>
<td width="78">Username</td>
<td width="6">:</td>
<td width="294"><input name="username" type="text" id="username" value="<?php echo $row['username'] ?>" readonly="readonly"></td>
</tr>
<tr>
<td width="78">E-mail</td>
<td width="6">:</td>
<td width="294"><input name="email" type="text" id="email" value="<?php echo $row['email'] ?>" readonly="readonly"></td>
</tr>
<tr>
<td width="78">New Password</td>
<td width="6">:</td>
<td width="294"><input name="password" type="text" id="password" readonly="readonly"></td>
</tr>
<tr>
<td width="78">New Password Repeat</td>
<td width="6">:</td>
<td width="294"><input name="passwordrepeat" type="text" id="passwordrepeat" readonly="readonly"></td>
</tr>
<tr>
<td colspan="3"><strong>Member Edit</strong></td>
</tr>
<tr>
<td colspan="3"><strong>Current Password</strong></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><input type="submit" name="save" value="Save"></td>
</tr>
</table>
</td>
</form>
</tr>
</table>
<?php
}
}
}
else
{
echo '<span class="text">No ID!</span><br />';
}
}
}
else
{
if (isset($_GET['id']))
{
// Connect to MySQLi
$sqli = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME) or die(mysqli_errno());
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$id = $_GET['id'];
$query = mysqli_query($sqli, "SELECT * FROM members WHERE id='$id'") or die("Error: ".mysqli_error($sqli));
$checkuser = mysqli_num_rows($query);
// Check if user exists
if($checkuser != 1)
{
// Username not exist
echo '<span class="text">Username does not exist in the database!</span><br />';
}
else
{
while ($row = mysqli_fetch_array($query))
{
echo '<span class="text">Username: ';
echo $row['username'];
echo '</span> <br/>';
echo '<span class="text">Level: ';
echo $row['level'];
echo '</span> <br/>';
}
}
}
elseif (isset($_SESSION['username']) && $_SESSION['id']))
{
// Connect to MySQLi
$sqli = mysqli_connect(DB_HOST, DB_USER, DB_PASS, DB_NAME) or die(mysqli_errno());
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$id = $_SESSION['id'];
$query = mysqli_query($sqli, "SELECT * FROM members WHERE id='$id'") or die("Error: ".mysqli_error($sqli));
$checkuser = mysqli_num_rows($query);
// Check if user exists
if($checkuser != 1)
{
// Username not exist
echo '<span class="text">Username does not exist in the database!</span><br />';
}
else
{
while ($row = mysqli_fetch_array($query))
{
echo '<span class="text">Username: ';
echo $row['username'];
echo '</span> <br/>';
echo '<span class="text">Level: ';
echo $row['level'];
echo '</span> <br/>';
}
echo '<a href="?action=edit">EDIT PROFILE</a><br/>';
}
}
else
{
echo '<span class="text">No ID!</span><br />';
}
}
$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.012 0.038 12.53 5.4.28 0.013 0.064 12.41 5.4.27 0.009 0.061 12.41 5.4.26 0.009 0.066 12.41 5.4.25 0.012 0.063 12.41 5.4.24 0.013 0.054 12.41 5.4.23 0.014 0.050 12.40 5.4.22 0.010 0.052 12.40 5.4.21 0.006 0.056 12.40 5.4.20 0.015 0.063 12.41 5.4.19 0.009 0.038 12.40 5.4.18 0.007 0.048 12.39 5.4.17 0.014 0.050 12.40 5.4.16 0.013 0.052 12.39 5.4.15 0.009 0.048 12.39 5.4.14 0.008 0.041 12.08 5.4.13 0.011 0.038 12.07 5.4.12 0.012 0.062 12.03 5.4.11 0.011 0.056 12.03 5.4.10 0.019 0.057 12.03 5.4.9 0.017 0.055 12.03 5.4.8 0.013 0.069 12.02 5.4.7 0.010 0.061 12.02 5.4.6 0.008 0.053 12.02 5.4.5 0.012 0.048 12.02 5.4.4 0.013 0.055 12.01 5.4.3 0.019 0.045 12.00 5.4.2 0.009 0.051 12.00 5.4.1 0.011 0.045 12.00 5.4.0 0.011 0.047 11.49 5.3.28 0.044 0.064 12.71 5.3.27 0.011 0.072 12.72 5.3.26 0.010 0.062 12.72 5.3.25 0.009 0.058 12.72 5.3.24 0.016 0.063 12.72 5.3.23 0.010 0.048 12.71 5.3.22 0.018 0.053 12.68 5.3.21 0.010 0.062 12.68 5.3.20 0.011 0.045 12.68 5.3.19 0.016 0.061 12.68 5.3.18 0.011 0.056 12.67 5.3.17 0.005 0.046 12.67 5.3.16 0.007 0.041 12.67 5.3.15 0.010 0.053 12.68 5.3.14 0.008 0.064 12.66 5.3.13 0.008 0.048 12.66 5.3.12 0.008 0.042 12.66 5.3.11 0.008 0.040 12.66 5.3.10 0.011 0.045 12.12 5.3.9 0.008 0.042 12.09 5.3.8 0.014 0.079 12.08 5.3.7 0.016 0.049 12.08 5.3.6 0.008 0.041 12.07 5.3.5 0.012 0.042 12.02 5.3.4 0.008 0.042 12.02 5.3.3 0.007 0.039 11.97 5.3.2 0.006 0.039 11.76 5.3.1 0.011 0.039 11.72 5.3.0 0.009 0.053 11.71 5.2.17 0.005 0.048 9.21 5.2.16 0.009 0.049 9.22 5.2.15 0.011 0.033 9.22 5.2.14 0.006 0.033 9.21 5.2.13 0.009 0.029 9.17 5.2.12 0.014 0.035 9.18 5.2.11 0.006 0.036 9.18 5.2.10 0.005 0.033 9.18 5.2.9 0.008 0.029 9.18 5.2.8 0.008 0.031 9.17 5.2.7 0.006 0.035 9.17 5.2.6 0.008 0.035 9.13 5.2.5 0.010 0.037 9.10 5.2.4 0.006 0.032 9.07 5.2.3 0.009 0.028 9.05 5.2.2 0.010 0.030 9.04 5.2.1 0.006 0.041 8.96 5.2.0 0.005 0.046 8.82 5.1.6 0.009 0.025 8.11 5.1.5 0.008 0.035 8.11 5.1.4 0.005 0.037 8.09 5.1.3 0.005 0.056 8.43 5.1.2 0.010 0.035 8.46 5.1.1 0.009 0.026 8.18 5.1.0 0.005 0.032 8.18 5.0.5 0.007 0.026 6.66 5.0.4 0.009 0.025 6.52 5.0.3 0.008 0.060 6.33 5.0.2 0.007 0.031 6.30 5.0.1 0.016 0.023 6.29 5.0.0 0.012 0.047 6.28 4.4.9 0.015 0.043 4.78 4.4.8 0.005 0.031 4.76 4.4.7 0.007 0.022 4.75 4.4.6 0.007 0.019 4.76 4.4.5 0.013 0.051 4.77 4.4.4 0.005 0.029 4.71 4.4.3 0.014 0.052 4.76 4.4.2 0.003 0.022 4.84 4.4.1 0.003 0.015 4.85 4.4.0 0.005 0.022 4.76 4.3.11 0.004 0.018 4.67 4.3.10 0.003 0.016 4.67 4.3.9 0.003 0.015 4.63 4.3.8 0.001 0.027 4.59 4.3.7 0.003 0.018 4.63 4.3.6 0.004 0.016 4.63 4.3.5 0.005 0.014 4.63 4.3.4 0.005 0.023 4.54 4.3.3 0.002 0.017 3.35 4.3.2 0.003 0.018 3.33 4.3.1 0.003 0.016 3.26 4.3.0 0.017 0.017 7.98
preferences:dark mode live preview
143.44 ms | 1394 KiB | 7 Q