$offset = htmlspecialchars($_GET["offset"]); $count = htmlspecialchars($_GET["count"]); $res = _monitor(['action' => 'monitorselect', 'conf' => $conf, 'con' => $con, 'offset' => $offset, 'count' => $count]); echo $res['list']; break; case "hostCreate": $hostname = htmlspecialchars($_GET["hostname"]); $ipaddress = htmlspecialchars($_GET["ipaddress"]); $res = _host(['action' => 'hostinsert', 'conf' => $conf, 'con' => $con, 'hostname' => $hostname, 'ipaddress' => $ipaddress]); echo $res['list']; break; case "monitorCreate": $monitorname = htmlspecialchars($_GET["monitorname"]); $monitortype = htmlspecialchars($_GET["monitortype"]); $monitortimeout = htmlspecialchars($_GET["monitortimeout"]); $monitorretry = htmlspecialchars($_GET["monitorretry"]); $monitorargument = htmlspecialchars($_GET["monitorargument"]); $res = _monitor(['action' => 'monitorinsert', 'conf' => $conf, 'con' => $con, 'monitorname' => $monitorname, 'monitortype' => $monitortype, 'timeout' => $monitortimeout, 'retry' => $monitorretry, 'argument' => $monitorargument]); echo $res['list']; break; case "hostDelete": $host_id = htmlspecialchars($_GET["host_id"]); $res = _host(['action' => 'hostdelete', 'conf' => $conf, 'con' => $con, 'host_id' => $host_id]); echo $res['list']; break; case "monitorDelete": $monitor_id = htmlspecialchars($_GET["monitor_id"]); $res = _monitor(['action' => 'monitordelete', 'conf' => $conf, 'con' => $con, 'monitor_id' => $monitor_id]); echo $res['list']; break; }
<?php /* * Infrastructure related configuration * Set parameters here that is related to development environment */ return array('baseURL' => 'phplucidframe', 'siteDomain' => _host(), 'db' => array('default' => array('engine' => 'mysql', 'host' => 'localhost', 'port' => '', 'database' => '', 'username' => '', 'password' => '', 'prefix' => '', 'collation' => 'utf8_general_ci')), 'siteReceiverEmail' => '*****@*****.**', 'siteSenderEmail' => '*****@*****.**');
/** * Test cases for _p() */ public function testForFunctionUnderscoreP() { $this->assertEqual(_p('baseURL'), 'phplucidframe'); $this->assertEqual(_p('siteDomain'), _host()); $this->assertEqual(_p('db.default.host'), 'localhost'); $this->assertEqual(_p('db.default.collation'), 'utf8_general_ci'); }