index : archweb32 | |
Archlinux32 website | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-04-17 10:04:07 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-04-17 10:04:07 +0200 |
commit | 5c5ed42237757efcf698a36c37cf9bd0630232c3 (patch) | |
tree | 184a92122c95c33ccb09aa5db2955af2d32e2771 /buildmaster/build-slaves.php | |
parent | 8af016645fee5c0b22e69d46de9b3401c1bc82d3 (diff) |
-rw-r--r-- | buildmaster/build-slaves.php | 46 |
diff --git a/buildmaster/build-slaves.php b/buildmaster/build-slaves.php index b6afc2d..9a45afd 100644 --- a/buildmaster/build-slaves.php +++ b/buildmaster/build-slaves.php @@ -1,28 +1,30 @@ -<html><head><title>list of build slaves</title></head><body> <?php - $conn = new mysqli("localhost","webserver","empty","buildmaster"); - if ($conn->connect_error) { - die("Connection to mysql database failed: " . $conn->connect_error); - } + include "lib/mysql.php"; + + $result = mysql_run_query( + "SELECT" . + " `build_slaves`.`name`," . + "`build_slaves`.`operator`," . + "`package_sources`.`pkgbase`," . + "`build_slaves`.`last_connection`," . + "`build_slaves`.`logged_lines`," . + "`build_slaves`.`last_action`" . + " FROM `build_slaves`" . + " LEFT JOIN `build_assignments` ON" . + " `build_slaves`.`currently_building`=`build_assignments`.`id`" . + " LEFT JOIN `package_sources` ON" . + " `build_assignments`.`package_source`=`package_sources`.`id`" . + " ORDER BY `build_slaves`.`last_connection`" + ); - if (!$result = - $conn->query( - "SELECT" . - " `build_slaves`.`name`," . - "`build_slaves`.`operator`," . - "`package_sources`.`pkgbase`," . - "`build_slaves`.`last_connection`," . - "`build_slaves`.`logged_lines`," . - "`build_slaves`.`last_action`" . - " FROM `build_slaves`" . - " LEFT JOIN `build_assignments` ON" . - " `build_slaves`.`currently_building`=`build_assignments`.`id`" . - " LEFT JOIN `package_sources` ON" . - " `build_assignments`.`package_source`=`package_sources`.`id`" . - " ORDER BY `build_slaves`.`last_connection`" - )) - die($conn->error); +?> +<html> + <head> + <title>list of build slaves</title> + </head> + <body> +<?php print "<table border=1>\n"; if ($result->num_rows > 0) { |