index : archweb32 | |
Archlinux32 website | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-04-12 10:28:31 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-04-12 10:28:31 +0200 |
commit | 5036d7a7172055a24ae9fa493e37998b725966eb (patch) | |
tree | 82956ba699664612f283109c104ae4533c5fc080 /buildmaster/status.php | |
parent | 4b2dcc3b53fafcab1f1912990fd5468795108a18 (diff) |
-rw-r--r-- | buildmaster/status.php | 30 |
diff --git a/buildmaster/status.php b/buildmaster/status.php new file mode 100644 index 0000000..5050b4b --- /dev/null +++ b/buildmaster/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> |