<?php //Include the PS_Pagination class require_once 'php/db_interface/autoload.php'; $login = new login(true); if (isset($_POST['sendTweet'])) { comms::ListUpdatedSendMessages(); } /// REMOVE SOMETHING if (isset($_GET['delete_id'])) { $adminList = new adminControlWatchlist($_GET['delete_id']); $adminList->Remove(); highlights::watchlistHighlight($_GET['delete_id'], W_ROW_DELETE, 0, highlights::EVENT_START_DAY); } // Create all new tickers $counter = 1; while (true) { if (!isset($_POST["ticker" . $counter]) || strlen(trim($_POST["ticker" . $counter])) <= 0) { break; } $tradeType = $_POST["type" . $counter]; $tickerName = $_POST["ticker" . $counter]; $tickerLow = floatval($_POST["low" . $counter]); $tickerHigh = floatval($_POST["high" . $counter]); $className = adminControlWatchlist::GetWatchClassName($tradeType); $newTicker = new $className(); $newTicker->AddNewTickerAndWatch($tickerName, $tickerLow, $tickerHigh); $counter++; } // Load the information from the database $tradeTypesToUseInDropdown = array(PULLBACK_TRADE, BACKDRAFT_TRADE, BREAKOUT_TRADE, BREAKDOWN_TRADE);
// e('Unit authenticated ok '); } socket_close($ary[1]); } else { // I am child - do stuff required and then die //var_dump($remote_ip); //var_dump($authDevices); if (in_array($remote_ip, $authDevices) == true) { $authok = true; //check that the IP address has been authenticated //var_dump($authok); } else { $authok = false; //var_dump($authok); } $comms = new comms(); $RXData = $comms->unPack($buf, $rxsocket, $remote_ip, $remote_port, $authok); if ($RXData == "AuthOK") { socket_close($ary[1]); if (socket_write($ary[0], $remote_ip, strlen($remote_ip)) === false) { echo "socket_write() failed. Reason: " . socket_strerror(socket_last_error($ary[0])); } socket_close($ary[0]); e('Unit authenticated ok '); } die; //kill child process } } } } while (true);