Skip to content
Permalink
Browse files

Update frontpage

  • Loading branch information
Marlamin committed Mar 15, 2020
1 parent 365ab89 commit 27a240ccf685bc0bad42d770f0bb357bf619e786
Showing with 10 additions and 4 deletions.
  1. +9 −3 index.php
  2. +1 −1 scripts/updateGitHistory.php
@@ -2,22 +2,22 @@
<div class='container-fluid'>
<h3>Welcome to WoW.tools!</h3>
<p>
Having had many different sites for many of the tools I work on, I decided to move them all under one roof. This is what WoW.tools is, a collection for all those tools under one roof, allowing for better integration between the tools and costing me less time to keep everything up-to-date separately. Keep in mind many of the tools are still only meant for the technical/datamining minded amongst you, some stuff might not be friendly to beginners at this stage. I plan on adding tutorials/guides on how to get started doing some basic stuff.
WoW.tools is a collection of several tools that interact with/display data from World of Warcraft. Please keep in mind these tools are meant for those with basic technical/datamining skills. For the basics on datamining, check out <a href='https://docs.google.com/document/d/1y1fHaZ1PrLvUTNM8crz081b4t8_pXjOYPxnagc-Y94c/' target='_BLANK'>this Google doc</a>.
</p>
<div class='row'>
<div class='col-md-4'>
<?php $updatedago = strtotime("now") - $memcached->get("github.commits.lastupdated"); ?>
<h4>Recent updates</h4>
<table class='table table-condensed table-striped table-hover' style='width: 100%'>
<thead><tr><th>Description <small style='float: right'>Updates every 5 minutes, last updated <?=$updatedago?> seconds ago</small></th></tr></thead>
<thead><tr><th>Description <small style='float: right'>Updates every 5 minutes, last updated <?=$updatedago?> seconds ago</small></th><th>&nbsp;</th></tr></thead>
<?php
if(!$memcached->get("github.commits.json")){
require_once("scripts/updateGitHistory.php");
}

$commits = json_decode($memcached->get("github.commits.json"));
foreach($commits as $commit){
echo "<tr><td>[".$commit->repo."] <a target='_BLANK' href='".$commit->url."'>".$commit->message."</a><br><span class='text-muted'>By <b>".$commit->author."</b> on <b>".date("Y-m-d H:i:s", $commit->timestamp)."</b></span></td></tr>";
echo "<tr><td>[".$commit->repo."] <a target='_BLANK' href='".$commit->url."'>".$commit->message."</a></td><td><span class='text-muted'>By <b>".$commit->author."</b> on <b>".date("Y-m-d H:i:s", $commit->timestamp)."</b></span></td></tr>";
}
?>
</table>
@@ -63,8 +63,14 @@
<thead><tr><th>Amount</th><th>User</th><th>Submitted on</th><th>Status</th></tr></thead>
<?php
$suggestions = $pdo->query("SELECT userid, DATE_FORMAT( submitted, \"%M %d\" ) as submitday, status, COUNT(*) as count FROM wow_rootfiles_suggestions GROUP BY userid, status, DATE_FORMAT( submitted, \"%M %d\" ) ORDER BY submitted DESC LIMIT 0,15")->fetchAll();
$i = 0;
foreach($suggestions as $row){
if($i > 13)
continue;

echo "<tr><td>".$row['count']." files</td><td>".getUsernameByUserID($row['userid'])."</td><td>".$row['submitday']."</td><td>".$row['status']."</td></tr>";

$i++;
}
?>
</table>
@@ -24,6 +24,6 @@
}

usort($commits, "compareTimestamp");
$memcached->set("github.commits.json", json_encode(array_slice($commits, 0, 10)));
$memcached->set("github.commits.json", json_encode(array_slice($commits, 0, 14)));
$memcached->set("github.commits.lastupdated", strtotime("now"));
}

0 comments on commit 27a240c

Please sign in to comment.
You can’t perform that action at this time.