@ 2014-05-29T23:09:09Z <?php
ini_set('display_errors', 'On');
error_reporting(E_ALL);
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$start = $time;
session_start();
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"></td>
</tr>
<tr>
<td width="78">New Password Repeat</td>
<td width="6">:</td>
<td width="294"><input name="passwordrepeat" type="text" id="passwordrepeat"></td>
</tr>
<tr>
<td colspan="3"><strong> </strong></td>
</tr>
<tr>
<td colspan="3"><strong>Save</strong></td>
</tr>
<tr>
<td width="78">Current Password</td>
<td width="6">:</td>
<td width="294"><input name="passwordcurrent" type="text" id="passwordcurrent"></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']) && isset($_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))
{
?>
<table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td width="78">Username</td>
<td width="6">:</td>
<td width="294"><?php echo $row['username'] ?></td>
</tr>
<tr>
<td width="78">Level</td>
<td width="6">:</td>
<td width="294"><?php echo $row['level'] ?></td>
</tr>
<tr>
<td colspan="3"><a href="?action=edit&id=<?php .$id. ?>"><strong>Edit Profile</strong></a></td>
</tr>
</table>
</td>
</tr>
</table>
<?php
}
}
}
else
{
echo $_SESSION['username'];
echo $_SESSION['id'];
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.008 0.047 12.53 5.4.28 0.008 0.054 12.41 5.4.27 0.009 0.055 12.41 5.4.26 0.008 0.058 12.41 5.4.25 0.008 0.056 12.41 5.4.24 0.012 0.055 12.41 5.4.23 0.021 0.072 12.40 5.4.22 0.009 0.064 12.40 5.4.21 0.013 0.050 12.40 5.4.20 0.009 0.054 12.40 5.4.19 0.012 0.043 12.39 5.4.18 0.017 0.060 12.40 5.4.17 0.007 0.047 12.41 5.4.16 0.008 0.042 12.40 5.4.15 0.006 0.042 12.39 5.4.14 0.012 0.039 12.09 5.4.13 0.015 0.058 12.07 5.4.12 0.011 0.061 12.04 5.4.11 0.011 0.054 12.03 5.4.10 0.008 0.038 12.03 5.4.9 0.008 0.038 12.03 5.4.8 0.006 0.041 12.03 5.4.7 0.007 0.037 12.03 5.4.6 0.007 0.039 12.02 5.4.5 0.007 0.043 12.03 5.4.4 0.015 0.040 12.01 5.4.3 0.006 0.039 12.01 5.4.2 0.008 0.038 12.01 5.4.1 0.009 0.038 12.01 5.4.0 0.008 0.041 11.50 5.3.28 0.007 0.040 12.71 5.3.27 0.007 0.042 12.72 5.3.26 0.007 0.042 12.71 5.3.25 0.006 0.041 12.72 5.3.24 0.008 0.041 12.72 5.3.23 0.009 0.039 12.71 5.3.22 0.008 0.042 12.68 5.3.21 0.009 0.041 12.68 5.3.20 0.009 0.039 12.68 5.3.19 0.010 0.038 12.68 5.3.18 0.008 0.045 12.68 5.3.17 0.010 0.065 12.66 5.3.16 0.010 0.051 12.67 5.3.15 0.014 0.059 12.67 5.3.14 0.031 0.129 12.66 5.3.13 0.028 0.075 12.66 5.3.12 0.011 0.051 12.66 5.3.11 0.011 0.043 12.66 5.3.10 0.012 0.055 12.12 5.3.9 0.013 0.054 12.09 5.3.8 0.021 0.074 12.09 5.3.7 0.009 0.053 12.09 5.3.6 0.015 0.063 12.07 5.3.5 0.019 0.071 12.02 5.3.4 0.011 0.049 12.02 5.3.3 0.009 0.053 11.98 5.3.2 0.016 0.042 11.77 5.3.1 0.011 0.046 11.72 5.3.0 0.010 0.048 11.71
preferences:dark mode live preview
138.52 ms | 1394 KiB | 7 Q