Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/web-scripts/status.php
blob: 5050b4b06d338980954378cbb25f4ced423fe216 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<html>
<head>
<?php

print "<title>Build master status</title>\n";
print "<link rel=\"stylesheet\" type=\"text/css\" href=\"/static/style.css\">\n";
print "</head>\n";
print "<body>\n";
print "<a href=\"/\">Start page</a><br>\n";

$mysql = new mysqli("localhost", "webserver", "empty", "buildmaster");
if ($mysql->connect_error) {
  die("Connection failed: " . $mysql->connect_error);
}

if ( ! $result = $mysql -> query(
    "SELECT MAX(`package_sources`.`commit_time`) AS `last`" .
    "FROM `package_sources`"
  ))
  die($mysql->error);

if ($result -> num_rows > 0) {

  $row = $result->fetch_assoc();
  print "latest package source is from " . $row["last"] . ".<br>\n";
}

?>
</body>
</html>