Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/status.php
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-04-11 16:54:13 +0200
committerErich Eckner <git@eckner.net>2018-04-11 16:54:13 +0200
commit6d93913ca2893a7fc5499c0cb5d6e70831e7af50 (patch)
tree2e3b2e0a9779f75200648857852a9bc8171750ef /scripts/status.php
status quo
Diffstat (limited to 'scripts/status.php')
-rw-r--r--scripts/status.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/scripts/status.php b/scripts/status.php
new file mode 100644
index 0000000..5050b4b
--- /dev/null
+++ b/scripts/status.php
@@ -0,0 +1,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>