. */ session_start(); // hide all error error_reporting(0); if (!isset($_SESSION["mikhmon"])) { header("Location:../admin.php?id=login"); } else { // load session MikroTik $session = $_GET['session']; $serveractive = $_GET['server']; // load config include('../include/config.php'); include('../include/readcfg.php'); // lang include('../include/lang.php'); include('../lang/'.$langid.'.php'); // routeros api include_once('../lib/routeros_api.class.php'); include_once('../lib/formatbytesbites.php'); $API = new RouterosAPI(); $API->debug = false; $API->connect($iphost, $userhost, decrypt($passwdhost)); if ($serveractive != "") { $gethotspotactive = $API->comm("/ip/hotspot/active/print", array("?server" => "" . $serveractive . "")); $TotalReg = count($gethotspotactive); $counthotspotactive = $API->comm("/ip/hotspot/active/print", array( "count-only" => "", "?server" => "" . $serveractive . "" )); } else { $gethotspotactive = $API->comm("/ip/hotspot/active/print"); $TotalReg = count($gethotspotactive); $counthotspotactive = $API->comm("/ip/hotspot/active/print", array( "count-only" => "", )); } } ?>
| Server | User | Address | Mac Address | Uptime | Bytes In | Bytes Out | Time Left | Login By | = $_comment ?> | "; echo " | " . $server . " | "; echo "" . $user . " | "; echo "" . $address . " | "; echo "" . $mac . " | "; echo "" . $uptime . " | "; echo "" . $bytesi . " | "; echo "" . $byteso . " | "; echo "" . $usesstime . " | "; echo "" . $loginby . " | "; echo "" . $comment . " | "; echo ""; } ?>
|---|