<?php /**************************************************************************** * jqgrid.php * v1.1.1 * * Controls data to be displays in grid. * ****************************************************************************/ session_start(); require_once "../../libs/db.php"; $hydro = new Hydro("hydro"); $rowlimit = $_GET['rows']; $page = $_GET['page']; $sidx = $_GET['sidx']; $sord = $_GET['sord']; print $hydro->GetAllUser($rowlimit, $page, $sidx, $sord);
* ****************************************************************************/ session_start(); if (!empty($_GET["logout"])) { session_unset(); } require_once "../master/master.php"; require_once "../libs/db.php"; $ini = parse_ini_file("../libs/site.ini"); $revision = $ini["rev"]; $_SESSION["auth"] = 0; $_SESSION["user"] = ""; $_SESSION["username"] = ""; if (!empty($_POST["password"])) { //check their password $hydro = new Hydro("hydro"); $user = $hydro->CheckLogin($_POST["name"], $_POST["password"]); if (!empty($user) && !empty($user[0])) { $user = $user[0]; if (!empty($user["user"])) { $_SESSION["user"] = $user["user"]; } if (!empty($user["description"])) { $_SESSION["username"] = $user["description"]; } $_SESSION["auth"] = 1; $_SESSION["last_activity"] = time(); $_SESSION["timezone"] = $_POST["timezone"]; header("Location: /reports/live"); } }
<?php /**************************************************************************** * ajax.php * v1.1.1 * * Allows Ajax calls to be made to file and be sent to the correct function. * ****************************************************************************/ session_start(); require_once "db.php"; require_once "functions.php"; $hydro = new Hydro("hydro"); //Edit if ($_REQUEST["format"] == "SetUser") { echo json_encode($hydro->SetUser($_REQUEST["id"], $_REQUEST["user"], $_REQUEST["password"], $_REQUEST["description"], $_REQUEST["email"])); } else { if ($_REQUEST["format"] == "SetPumps") { echo json_encode($hydro->SetPumps($_REQUEST["pumps"])); } else { if ($_REQUEST["format"] == "SetSystems") { echo json_encode($hydro->SetSystems($_REQUEST["hydro"], $_REQUEST["pump_1"], $_REQUEST["pump_2"], $_REQUEST["cam"])); } else { if ($_REQUEST["format"] == "SetSettings") { echo json_encode($hydro->SetSettings($_REQUEST["start"], $_REQUEST["end"], $_REQUEST["water_full"], $_REQUEST["water_empty"], $_REQUEST["water_high"], $_REQUEST["water_low"], $_REQUEST["air_high"], $_REQUEST["air_low"])); //Delete } else { if ($_REQUEST["format"] == "DeleteUser") { echo json_encode($hydro->DeleteUser($_REQUEST["id"])); //Get Data } else {
<?php /**************************************************************************** * jqgrid.php * v1.1.1 * * Controls data to be displays in grid. * ****************************************************************************/ session_start(); require_once "../../libs/db.php"; require_once "../constants.php"; $hydro = new Hydro("hydro"); $starttime = $_GET['starttime']; $endtime = $_GET['endtime']; $localtime = $_GET['localtime']; print $hydro->GetReportChart($starttime, $endtime, $localtime, $maxlimit);
<?php /**************************************************************************** * jqgrid.php * v1.1.1 * * Controls data to be displays in grid. * ****************************************************************************/ session_start(); require_once "../../libs/db.php"; $hydro = new Hydro("hydro"); $rowlimit = $_GET['rows']; $page = $_GET['page']; $sidx = $_GET['sidx']; $sord = $_GET['sord']; $starttime = $_GET['starttime']; $endtime = $_GET['endtime']; $localtime = $_GET['localtime']; print $hydro->GetReportGrid($rowlimit, $page, $sidx, $sord, $starttime, $endtime, $localtime);