From aff1ed5d2c17c16e561df74a04821bf6e8c363e5 Mon Sep 17 00:00:00 2001 From: freddiebarrsmith Date: Fri, 5 Dec 2014 03:57:06 +0000 Subject: [PATCH] Create lizardry2.php --- lizardry2.php | 5759 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 5759 insertions(+) create mode 100644 lizardry2.php diff --git a/lizardry2.php b/lizardry2.php new file mode 100644 index 0000000..9d4835d --- /dev/null +++ b/lizardry2.php @@ -0,0 +1,5759 @@ + + + + +Beautiful Information + + + + + +connect_errno) { +printf("Connect failed: %s\n", $mysqli->connect_error); +exit(); +} +// Sets sql charset to utf-8 +$mysqli->set_charset("utf8"); +// Pie: HostType +// Bar: CPUs +// Pie: OS +$i = 0; +$hostType = array(); +$result = mysqli_query($mysqli, 'SELECT COUNT(HostType) AS "Num" FROM serverlist GROUP BY HostType;'); +while($row = mysqli_fetch_row($result)){ +// puts the value for COUNT(HostType) into $num{i}, so $num0, $num1, $num2, etc. +$hostType[$i] = $row[0]; +$i = $i + 1; +} +$i = 0; +$CPUamout = array(); +$result = mysqli_query($mysqli, 'SELECT COUNT(CPUamount) AS "Num" FROM serverlist GROUP BY CPUamount;'); +while($row = mysqli_fetch_row($result)){ +$CPUamount[$i] = $row[0]; +$i = $i + 1; +} +$i = 0; +$OS = array(); +$result = mysqli_query($mysqli, 'SELECT COUNT(OS) AS "Num" FROM serverlist GROUP BY OS;'); +while($row = mysqli_fetch_row($result)){ +$OS[$i] = $row[0]; +$i = $i + 1; +} +?> + + + + + + + + + + + +
+ +
+ +
+ +
+ +