@ 2014-07-14T14:46:49Z <?php
ini_set('display_errors', 'On');
error_reporting(E_ALL);
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$start = $time;
session_start();
require 'connect.php';
require 'functions.php';
header("Content-Type: text/html; charset=utf-8");
// 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();
}
if (!isset($_GET['goal']) || !is_numeric($_GET['goal']) || ($_GET['goal'] < 0))
{
//Make sure ID=1 always exist
$goal = 1;
}
else
{
$goal = (int)$_GET['goal'];
}
//Donations
$donationgoalquery = mysqli_query($sqli, "SELECT * FROM donationgoal WHERE id='$goal'") or die("Error: ".mysqli_error($sqli));
$donationgoal = mysqli_fetch_assoc($donationgoalquery);
$goalexist = mysqli_num_rows($donationgoalquery);
$limit = 10;
$donatinlistquery = mysqli_query($sqli, "SELECT * FROM donationlist WHERE donationgoal='$goal' ORDER BY ID DESC LIMIT 0, $limit") or die("Error: ".mysqli_error($sqli));
$donationlist = array();
$donationsinlist = mysqli_num_rows($donatinlistquery);
while ($row = mysqli_fetch_array($donatinlistquery))
{
$uid = $row['userid'];
$userquery = mysqli_query($sqli, "SELECT * FROM members WHERE id='$uid'") or die("Error: ".mysqli_error($sqli));
$userexists = mysqli_num_rows($userquery);
if ($userexists == 0)
{
$username = "<deleted user>";
}
else
{
$userrow = mysqli_fetch_assoc($userquery);
$username = $userrow['username'];
}
$donationlist[] = array(
"id" => $row['id'],
"donorname" => $row['donorname'],
"twitchname" => $row['twitchname'],
"userid" => $row['userid'],
"username" => $username,
"amount" => $row['amount'],
"timestamp" => $row['timestamp'],
"message" => $row['message'],
);
}
$donationcollected = 0;
$donatinlisttotalquery = mysqli_query($sqli, "SELECT * FROM donationlist WHERE donationgoal='$goal'") or die("Error: ".mysqli_error($sqli));
while ($row = mysqli_fetch_array($donatinlistquery))
{
$donationcollected+= $row['amount'];
}
//FORUMS
$limit = 5;
$forumquery = mysqli_query($sqli, "SELECT * FROM forumtopics ORDER BY lastpost DESC LIMIT 0, $limit") or die("Error: ".mysqli_error($sqli));
$forumposts = array();
while ($row = mysqli_fetch_array($forumquery))
{
$uid = $row['lastpostuserid'];
$userquery = mysqli_query($sqli, "SELECT * FROM members WHERE id='$uid'") or die("Error: ".mysqli_error($sqli));
$userexists = mysqli_num_rows($userquery);
if ($userexists == 0)
{
$username = "<deleted user>";
}
else
{
$userrow = mysqli_fetch_assoc($userquery);
$username = $userrow['username'];
}
$forumposts[] = array(
"id" => $row['id'],
"threadname" => $row['threadname'],
"lastpost" => $row['lastpost'],
"userid" => $row['userid'],
"username" => $username,
"categoryid" => $row['categoryid']
);
}
//EVENT
$limit = 1;
$eventquery = mysqli_query($sqli, "SELECT * FROM events ORDER BY id DESC LIMIT 0, $limit") or die("Error: ".mysqli_error($sqli));
$events = array();
$counter = 0;
while ($row = mysqli_fetch_array($eventquery))
{
$events[] = array(
"id" => $row['id'],
"name" => $row['name'],
"timestamp" => $row['timestamp'],
"picturethumbnail" => $row['picturethumbnail']
);
}
//TOPINFOTEXT
$textquery = mysqli_query($sqli, "SELECT * FROM toptext ORDER BY id") or die("Error: ".mysqli_error($sqli));
$textresult = mysqli_fetch_assoc($textquery);
//Latest Tweet
$twitterquery = mysqli_query($sqli, "SELECT * FROM twitterinfo WHERE twittername='indiehjaerta'") or die("Error: ".mysqli_error($sqli));
$twitterresult = mysqli_fetch_assoc($twitterquery);
$twitterText = $twitterresult['text'];
$twitterTime = time_elapsed_string($twitterresult['timeposted']);
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title>indiehjaerta.com ♥</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<!-- Font's -->
<link href='http://fonts.googleapis.com/css?family=Oswald:400,300' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,300,400' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Roboto:300,300italic' rel='stylesheet' type='text/css'>
<link href="stylesheet/style.css" rel="stylesheet" type="text/css" />
<link href="stylesheet/donation.css" rel="stylesheet" type="text/css" />
</head>
<body>
<script type="text/javascript">
$(function() {
$('#TopBarLogin').click(function() {
$('#LoginPopUp').show();
return false;
});
});
</script>
<script type="text/javascript">
$(document).mouseup(function (e)
{
var container = $("#LoginPopUp");
if (!container.is(e.target) && container.has(e.target).length === 0)
{
container.hide();
}
});
</script>
<script type="text/javascript">
$(function() {
if (navigator.userAgent.toLowerCase().indexOf("chrome") >= 0) {
var intervalId = 0;
$(window).load(function() {
intervalId = setInterval(function () { // << somehow this does the trick!
if ($('input:-webkit-autofill').length > 0) {
clearInterval(intervalId);
$('input:-webkit-autofill').each(function () {
var text = $(this).val();
var name = $(this).attr('name');
$(this).after(this.outerHTML).remove();
$('input[name=' + name + ']').val(text);
});
}
}, 1);
});
}
});
</script>
<div id="TopBarImageContainer">
<div id="TopBarImage"></div>
</div>
<div id="MainContent">
<a href="#">
<span class="DivLink">
<div id="TopBarLogin">
<span class="TopBarText">LOGIN
<div id="TopBarTriangleDown"></div>
</span>
</div>
</span>
</a>
<a href="register.php">
<span class="DivLink">
<div id="TopBarCreateAccount">
<span class="TopBarText">CREATE AN ACCOUNT</span>
</div>
</span>
</a>
<div id="TopBarUserMenu">
<div id="TopBarUserMenuProfile">
<a href="profile.php">
<span class="TopBarText">
<div id="TopBarUserMenuProfileImage"></div>
<span class="DivLink">
PROFILE
</span>
</span>
</a>
</div>
<div id="TopBarUserMenuMessages">
<a href="messages.php">
<span class="TopBarText">
<div id="TopBarUserMenuMessagesImage"></div>
<span class="DivLink">
MESSAGES
</span>
</span>
</a>
</div>
<div id="TopBarUserMenuSupport">
<a href="support.php">
<span class="TopBarText">
<div id="TopBarUserMenuSupportImage"></div>
<span class="DivLink">
SUPPORT
</span>
</span>
</a>
</div>
</div>
<div id="LoginPopUp">
<form method="post" action="">
<input name="username" type="text" id="username" placeholder="Username" style="display: none" />
<input name="password" type="password" id="password" placeholder="Password" style="display: none" />
<input class="TopLoginInput" name="username" type="text" id="username" placeholder="Username" /><br />
<input class="TopLoginInput" name="password" type="password" id="password" placeholder="Password" /><br />
<input class="TopLoginButton" type="submit" name="login" value="">
</form>
</div>
<div id="LogoMenu">
<div id="SocialTopLinks">
<div id="SocialTopTwitterLink">
<a href="http://www.twitter.com/indiehjaerta">
<span class="DivLink"></span>
</a>
</div>
<div id="SocialTopFacebookLink">
<a href="http://www.facebook.com/indiehjaerta">
<span class="DivLink"></span>
</a>
</div>
<div id="SocialTopYouTubeLink">
<a href="https://www.youtube.com/indiehjaerta">
<span class="DivLink"></span>
</a>
</div>
<div id="SocialTopInstagramLink">
<a href="http://www.instagram.com/indiehjaerta">
<span class="DivLink"></span>
</a>
</div>
<div id="SocialTopTwitchLink">
<a href="http://www.twitch.tv/indiehjaerta">
<span class="DivLink"></span>
</a>
</div>
</div>
<div id="TopLogo">
<a href="default.php"><span class="DivLink"></span></a>
</div>
<div id="MenuLinkSeparator"></div>
<div id="MenuLinks">
<a href="default.php" class="Menu">HOME</a>
<a href="about.php" class="Menu">ABOUT</a>
<a href="blog.php" class="Menu">BLOG</a>
<a href="events.php" class="Menu">EVENTS</a>
<a href="forums.php" class="Menu">FORUMS</a>
<a href="contact.php" class="Menu">CONTACT</a>
</div>
<div id="TwitterContent">
<img src="images/twitter-tweet.png" class="TwitterLogo" />
<div id="TwitterTextDiv">
<span class="TwitterText">
<?php echo $twitterText ?>
</span>
</div>
<div id="TwitterTimeDiv">
<span class="TwitterTextTime">
<?php echo $twitterTime ?>
</span>
</div>
</div>
</div>
<div id="Container">
<div id="InfoHeader">
<span class="TopInfoText"><?php echo $textresult['text']?></span>
</div>
<div id="Content">
<div id="PageContent">
<span id="PageHeadline">DONATIONGOAL</span>
<br /><br />
<?php
if ($goalexist == 0)
{
echo '<span class="DonationMessage">No donation goal found.</span>';
}
else
{
echo $donationgoal['name']. '<br />';
echo $donationcollected. ' / ' .$donationgoal['amount']. '<br />';
echo '<br />'
if ($donationsinlist > 0)
{
echo 'Showing latest ' .$donationsinlist. ' donations.';
echo 'Name - Amount - Date - Message';
foreach ($donationlist as $donation)
{
echo $donation['donorname']. ' - ';
echo $donation['amount']. ' - ';
echo $donation['timestamp']. ' - ';
echo $donation['message']. ' - ';
/*
"id" => $row['id'],
"donorname" => $row['donorname'],
"twitchname" => $row['twitchname'],
"userid" => $row['userid'],
"username" => $username,
"amount" => $row['amount'],
"timestamp" => $row['timestamp'],
"message" => $row['message'],
*/
}
}
echo '<br />';
echo 'NOTICE: Donations are NOT updated in realtime.';
}
?>
</div>
</div>
<div id="NewsLetterBanner">
</div>
<div id="SiteInfoContainer">
<div id="ForumPostsContainer">
<img src="images/icon-forum-large.png" class="ForumPostsIcon" />
<span class="ForumPostsText">FORUM POSTS</span><br />
<?php
$counter = 0;
foreach ($forumposts as $posts)
{
$counter++;
$dateandtime = getdate(strtotime($posts['lastpost']));
$min = $dateandtime['minutes'];
$hr = $dateandtime['hours'];
$d = $dateandtime['mday'];
$m = $dateandtime['mon'];
$y = $dateandtime['year'];
$hr = str_pad($hr, 2, '0', STR_PAD_LEFT);
$min = str_pad($min, 2, '0', STR_PAD_LEFT);
$monthName = date("F", mktime(0, 0, 0, $m, 10));
$ordinaldate = ordinal($d);
?>
<div class="ForumPostContainer">
<a href="forums.php?fid=<?php echo $posts['categoryid'] ?>&tid=<?php echo $posts['id'] ?>" class="FrontpageForumLink"><?php echo $posts['threadname'] ?></a>
<span class="ForumPostInfo">
<?php
echo 'posted by <a href="profile.php?id=' .$posts['userid']. '">' .$posts['username']. '</a> at ' .$hr. ':' .$min. ' on ' .$monthName. ' ' .$ordinaldate. ', ' .$y;
?>
</span>
</div>
<?php
if ($counter != 5)
{
?>
<img src="images/forumpostsseparator.png" class="ForumPostsSeparator" />
<?php
}
}
?>
</div>
<img src="images/shortseparator2.png" class="ShortSeparator" />
<div id="EventContainer">
<img src="images/icon-calendar-large.png" class="EventsIcon" />
<span class="ForumPostsText">UPCOMING EVENT</span><br />
<?php
foreach ($events as $event)
{
$dateandtime = getdate(strtotime($event['timestamp']));
$d = $dateandtime['mday'];
$m = $dateandtime['mon'];
$y = $dateandtime['year'];
$d = str_pad($d, 2, '0', STR_PAD_LEFT);
$m = str_pad($m, 2, '0', STR_PAD_LEFT);
echo '<span class="EventDate">'.$y.'.'.$m.'.'.$d.'</span>';
echo '<span class="EventTitle">' .strtoupper($event['name']). '</span>';
if (strlen($event['picturethumbnail']) > 4)
{
echo '<img src="images/' .$event['picturethumbnail']. '" class="EventThumbnail" />';
}
echo '<a href="events.php?id=' .$event['id']. '"><img src="images/buttonreadmoreevent.png" class="ButtonReadMoreEvent" /></a>';
}
?>
</div>
</div>
</div>
<div id="Bot">
<div class="BotLinkDiv">
<span class="BotLinkHeadline">LINK-TEXTS</span><br />
<a href="" class="BotLinkText">LINK1</a><br />
<a href="" class="BotLinkText">LINK2</a><br />
<a href="" class="BotLinkText">LINK3</a><br />
<a href="" class="BotLinkText">LINK4</a><br />
<a href="" class="BotLinkText">LINK5</a><br />
<a href="" class="BotLinkText">LINK6</a><br />
</div>
<div class="BotLinkDiv">
<span class="BotLinkHeadline">LINK-TEXTS</span><br />
<a href="" class="BotLinkText">LINK1</a><br />
<a href="" class="BotLinkText">LINK2</a><br />
<a href="" class="BotLinkText">LINK3</a><br />
<a href="" class="BotLinkText">LINK4</a><br />
<a href="" class="BotLinkText">LINK5</a><br />
<a href="" class="BotLinkText">LINK6</a><br />
</div>
<div class="BotLinkDiv">
<span class="BotLinkHeadline">ACCOUNT</span><br />
<a href="" class="BotLinkText">LOGIN</a><br />
<a href="" class="BotLinkText">CREATE ACCOUNT</a><br />
<a href="" class="BotLinkText">FORGOT PASSWORD</a><br />
<a href="" class="BotLinkText">PROFILE</a><br />
</div>
<div class="BotLinkDiv">
<span class="BotLinkTextJoin">NOT A MEMBER?</span>
<a href="register.php"><img src="images/buttonjoinnow.png" clas="BotButtonJoinNow" /></a>
</div>
<div class="BotLinkDiv">
<span class="BotLinkHeadline">SOCIAL</span><br />
<a href="http://www.twitch.tv/indiehjaerta" class="BotLinkText">TWITCH</a><br />
<a href="http://www.facebook.com/indiehjaerta" class="BotLinkText">FACEBOOK</a><br />
<a href="http://www.twitter.com/indiehjaerta" class="BotLinkText">TWITTER</a><br />
<a href="http://www.youtube.com/indiehjaerta" class="BotLinkText">YOUTUBE</a><br />
<a href="http://www.instagram.com/indiehjaerta" class="BotLinkText">INSTAGRAM</a><br />
</div>
<div class="BotLinkDiv">
<span class="BotLinkHeadline">SUPPORT</span><br />
<a href="" class="BotLinkText">LINK1</a><br /><!-- CONTACT FORM -->
<a href="" class="BotLinkText">LINK2</a><br /><!-- TWITCH MESSAGE -->
<a href="" class="BotLinkText">LINK3</a><br /><!-- F.A.Q. -->
<a href="" class="BotLinkText">LINK4</a><br /><!-- SUPPORT FORUMS -->
<a href="" class="BotLinkText">LINK5</a><br />
<a href="" class="BotLinkText">LINK6</a><br />
</div>
<div id="BotLogo">
<a href="#"><span class="DivLink"></span></a>
</div>
<?php
$time = microtime();
$time = explode(' ', $time);
$time = $time[1] + $time[0];
$finish = $time;
$total_time = round(($finish - $start), 4);
?>
<span class="BotLogoText">Page generated in <?php echo $total_time ?> seconds.</span>
</div>
</div>
</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.30 0.005 0.037 12.56 5.4.29 0.006 0.049 12.56 5.4.28 0.007 0.042 12.46 5.4.27 0.006 0.036 12.46 5.4.26 0.007 0.046 12.46 5.4.25 0.007 0.044 12.46 5.4.24 0.010 0.038 12.46 5.4.23 0.008 0.038 12.45 5.4.22 0.007 0.039 12.45 5.4.21 0.003 0.038 12.45 5.4.20 0.007 0.045 12.45 5.4.19 0.010 0.041 12.45 5.4.18 0.004 0.037 12.45 5.4.17 0.005 0.037 12.46 5.4.16 0.005 0.036 12.45 5.4.15 0.004 0.048 12.45 5.4.14 0.008 0.039 12.14 5.4.13 0.006 0.036 12.12 5.4.12 0.005 0.036 12.08 5.4.11 0.007 0.034 12.08 5.4.10 0.007 0.033 12.08 5.4.9 0.007 0.047 12.08 5.4.8 0.004 0.038 12.09 5.4.7 0.007 0.033 12.08 5.4.6 0.007 0.048 12.08 5.4.5 0.006 0.036 12.08 5.4.4 0.008 0.042 12.06 5.4.3 0.007 0.034 12.06 5.4.2 0.005 0.043 12.06 5.4.1 0.008 0.034 12.06 5.4.0 0.009 0.037 11.55 5.3.28 0.009 0.044 12.71 5.3.27 0.008 0.049 12.73 5.3.26 0.005 0.047 12.71 5.3.25 0.003 0.041 12.72 5.3.24 0.004 0.041 12.72 5.3.23 0.006 0.038 12.71 5.3.22 0.005 0.038 12.68 5.3.21 0.005 0.039 12.68 5.3.20 0.016 0.045 12.68 5.3.19 0.005 0.038 12.68 5.3.18 0.004 0.039 12.67 5.3.17 0.008 0.041 12.67 5.3.16 0.010 0.041 12.67 5.3.15 0.009 0.040 12.67 5.3.14 0.005 0.039 12.66 5.3.13 0.006 0.043 12.66 5.3.12 0.007 0.037 12.66 5.3.11 0.007 0.046 12.65 5.3.10 0.009 0.034 12.14 5.3.9 0.005 0.038 12.12 5.3.8 0.003 0.038 12.11 5.3.7 0.006 0.037 12.11 5.3.6 0.004 0.040 12.10 5.3.5 0.003 0.039 12.04 5.3.4 0.004 0.038 12.04 5.3.3 0.009 0.033 12.00 5.3.2 0.008 0.040 11.78 5.3.1 0.010 0.048 11.75 5.3.0 0.004 0.039 11.73 5.2.17 0.004 0.031 9.25 5.2.16 0.012 0.034 9.25 5.2.15 0.006 0.034 9.25 5.2.14 0.006 0.036 9.25 5.2.13 0.005 0.028 9.22 5.2.12 0.008 0.030 9.21 5.2.11 0.006 0.038 9.22 5.2.10 0.008 0.029 9.22 5.2.9 0.006 0.038 9.22 5.2.8 0.007 0.035 9.21 5.2.7 0.007 0.041 9.21 5.2.6 0.005 0.041 9.16 5.2.5 0.010 0.031 9.13 5.2.4 0.004 0.030 9.11 5.2.3 0.009 0.037 9.09 5.2.2 0.005 0.034 9.09 5.2.1 0.008 0.030 9.00 5.2.0 0.003 0.030 8.87 5.1.6 0.004 0.023 8.16 5.1.5 0.005 0.035 8.16 5.1.4 0.003 0.033 8.14 5.1.3 0.003 0.039 8.49 5.1.2 0.006 0.035 8.51 5.1.1 0.004 0.030 8.23 5.1.0 0.001 0.039 8.24 5.0.5 0.003 0.028 6.73 5.0.4 0.004 0.028 6.59 5.0.3 0.004 0.031 6.41 5.0.2 0.006 0.027 6.37 5.0.1 0.005 0.027 6.35 5.0.0 0.005 0.029 6.34 4.4.9 0.004 0.026 4.78 4.4.8 0.004 0.017 4.75 4.4.7 0.001 0.017 4.75 4.4.6 0.001 0.026 4.75 4.4.5 0.007 0.013 4.77 4.4.4 0.001 0.027 4.71 4.4.3 0.003 0.017 4.76 4.4.2 0.004 0.023 4.85 4.4.1 0.003 0.016 4.85 4.4.0 0.005 0.034 4.76 4.3.11 0.003 0.015 4.67 4.3.10 0.006 0.021 4.67 4.3.9 0.003 0.016 4.63 4.3.8 0.002 0.026 4.61 4.3.7 0.003 0.020 4.63 4.3.6 0.003 0.021 4.63 4.3.5 0.004 0.025 4.63 4.3.4 0.003 0.027 4.57 4.3.3 0.002 0.024 3.38 4.3.2 0.001 0.022 3.37 4.3.1 0.002 0.018 3.30 4.3.0 0.003 0.020 32.19
preferences:dark mode live preview
144.27 ms | 1394 KiB | 7 Q