<?php require_once 'connection.php'; $data = new dataClass(); if (isset($_POST['action']) && !empty($_POST['action'])) { $action = $_POST['action']; switch ($action) { case 'checkLogin': $data->checkLogin(); break; } } //startPHP ////////////////// class dataClass { function checkLogin() { // username and password sent from form $myusername = $_POST['myusername']; $mypassword = $_POST['mypassword']; // To protect MySQL injection (more detail about MySQL injection) $myusername = stripslashes($myusername); $myusername = mysql_real_escape_string($myusername); $sql = "SELECT * FROM user WHERE username='******'"; $result = mysql_query($sql); $currentUser = mysql_fetch_array($result); $salt = $currentUser['salt']; $mypassword = stripslashes($mypassword); $mypassword = mysql_real_escape_string($mypassword); //$saltedMD5Pass = md5($mypassword . $salt);
<?php require_once '/var/www/connection.php'; $data = new dataClass(); if (isset($_POST['action']) && !empty($_POST['action'])) { $action = $_POST['action']; switch ($action) { case 'changeUsername': $data->changeUsername(); break; case 'changePassword': $data->changePassword(); break; case 'updateNodeName_': $data->updateNodeName_(); break; case 'tableNamesLoad': $data->tableNamesLoad(); break; case 'checkLoadNames': $data->checkLoadNames(); break; case 'server_1_stop': $data->server_1_stop(); break; case 'server_1': $data->server_1(); break; case 'read_log': $data->read_log(); break;
<?php require_once 'execute.php'; require_once 'connection.php'; define("HTTP_HOST", "192.168.1.102"); define("REMOTE_PORT", 2222); $data = new dataClass(); if (isset($_POST['action']) && !empty($_POST['action'])) { $action = $_POST['action']; switch ($action) { case 'execPerlOFF': $data->execPerlOFF(); break; case 'execPerlON': $data->execPerlON(); break; case 'getPortNumber': $data->getPortNumber(); break; case 'viewPort': $data->viewPort(); break; case 'remove_file': $data->remove_file(); break; case 'getXMLData': $data->getXMLData(); break; case 'xmlHASH': $data->xmlHASH(); break;
<?php require_once '/var/www/connection.php'; $data = new dataClass(); if (isset($_POST['action']) && !empty($_POST['action'])) { $action = $_POST['action']; switch ($action) { case 'getPortNumber': $data->getPortNumber(); break; case 'frameLoadLight': $data->frameLoadLight(); break; case 'frameExecute': $data->frameExecute(); break; case 'frameLoadSocket': $data->frameLoadSocket(); break; } } //startPHP ////////////////// class dataClass { function frameLoadSocket() { $liids = ""; $stack = array(); $result = mysql_query("SELECT * FROM nodes"); while ($row = mysql_fetch_array($result)) {
<?php require_once '/var/www/connection.php'; $data = new dataClass(); if (isset($_POST['action']) && !empty($_POST['action'])) { $action = $_POST['action']; switch ($action) { case 'addSchedule': $data->addSchedule(); break; case 'refreshSchedules': $data->refreshSchedules(); break; case 'activeOrNot': $data->activeOrNot(); break; case 'deleteSchedule': $data->deleteSchedule(); break; } } //startPHP //////////////////checkLoadNames class dataClass { public function deleteSchedule() { $schedule = $_POST['deleteSchedule']; $typeAndIdArray = explode("_", $schedule); $type = $typeAndIdArray[0]; $id = $typeAndIdArray[1];
<?php require_once '/var/www/connection.php'; $data = new dataClass(); if (isset($_POST['action']) && !empty($_POST['action'])) { $action = $_POST['action']; switch ($action) { case 'add_rule': $data->add_rule(); break; case 'refreshRules': $data->refreshRules(); break; case 'removeRule': $data->removeRule(); break; case 'updateIndex': $data->updateIndex(); break; } } //startPHP //////////////////checkLoadNames class dataClass { public function updateIndex() { $id = $_POST['id']; $index = $_POST['index']; $updateQuery = "UPDATE `rules` SET `index`= '{$index}' WHERE `id` = '{$id}'"; mysql_query($updateQuery);
<?php require_once '/var/www/connection.php'; $data = new dataClass(); if (isset($_POST['action']) && !empty($_POST['action'])) { $action = $_POST['action']; switch ($action) { case 'loadNodeData': $data->loadNodeData(); break; case 'updateGroup': $data->updateGroup(); break; case 'create_new_group': $data->create_new_group(); break; case 'remove_group': $data->remove_group(); break; case 'remove_from_groups': $data->remove_from_groups(); break; case 'add_n_to_g': $data->add_n_to_g(); break; } } //startPHP //////////////////checkLoadNames class dataClass {
<?php include 'execute.php'; define("HTTP_HOST", "192.168.1.102"); define("REMOTE_PORT", 2222); $data = new dataClass(); if (isset($_POST['action']) && !empty($_POST['action'])) { $action = $_POST['action']; switch ($action) { case 'getRequest': $data->getRequest(); break; case 'execPerlOFF': $data->execPerlOFF(); break; case 'execPerlON': $data->execPerlON(); break; case 'getPortNumber': $data->getPortNumber(); break; case 'setPortPermissions': $data->setPortPermissions(); break; } } class dataClass { public function getRequest() { //$request = "http://" . $_SERVER['HTTP_HOST'] . ":" . $_SERVER['REMOTE_PORT'] . "/" . $_SERVER['PHP_SELF'] . "?" . $_SERVER['QUERY_STRING'];