index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-04-04 16:21:30 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-04-04 16:21:30 +0200 |
commit | d0748b2c4b25fb01706ae225c0181c2e25804a8a (patch) | |
tree | 12689715a874e7dc766f463f5d15c03ffda1fea5 /web-scripts | |
parent | 4373d24cb27dcafcbb43af4ef24eb6ae1957aa39 (diff) |
-rw-r--r-- | web-scripts/status.php | 30 |
diff --git a/web-scripts/status.php b/web-scripts/status.php new file mode 100644 index 0000000..5050b4b --- /dev/null +++ b/web-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> |