. */ 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']; $load = $_GET['load']; // lang include('../include/lang.php'); include('../lang/'.$langid.'.php'); // load config include('../include/config.php'); include('../include/readcfg.php'); // routeros api include_once('../lib/routeros_api.class.php'); include_once('../lib/formatbytesbites.php'); $API = new RouterosAPI(); $API->debug = false; if ($load == "sysresource") { $API->connect($iphost, $userhost, decrypt($passwdhost)); // get MikroTik system clock $getclock = $API->comm("/system/clock/print"); $clock = $getclock[0]; $timezone = $getclock[0]['time-zone-name']; date_default_timezone_set($timezone); // get system resource MikroTik $getresource = $API->comm("/system/resource/print"); $resource = $getresource[0]; // get routeboard info $getrouterboard = $API->comm("/system/routerboard/print"); $routerboard = $getrouterboard[0]; ?>

".$_uptime." : " . formatDTM($resource['uptime']); ?>
".$_model." : " . $routerboard['model'] . "
Router OS : " . $resource['version']; ?>
".$_free_memory." : " . formatBytes($resource['free-memory'], 2) . "
".$_free_hdd." : " . formatBytes($resource['free-hdd-space'], 2) ?>
connect($iphost, $userhost, decrypt($passwdhost)); // get & counting hotspot users $countallusers = $API->comm("/ip/hotspot/user/print", array("count-only" => "")); if ($countallusers < 2) { $uunit = "item"; } elseif ($countallusers > 1) { $uunit = "items"; } // get & counting hotspot active $counthotspotactive = $API->comm("/ip/hotspot/active/print", array("count-only" => "")); if ($counthotspotactive < 2) { $hunit = "item"; } elseif ($counthotspotactive > 1) { $hunit = "items"; } ?>

Hotspot

connect($iphost, $userhost, decrypt($passwdhost)); // move hotspot log to disk $getlogging = $API->comm("/system/logging/print", array("?prefix" => "->", )); $logging = $getlogging[0]; if ($logging['prefix'] == "->") { } else { $API->comm("/system/logging/add", array("action" => "disk", "prefix" => "->", "topics" => "hotspot,info,debug", )); } // get hotspot log $getlog = $API->comm("/log/print", array("?topics" => "hotspot,info,debug", )); $log = array_reverse($getlog); //$THotspotLog = count($getlog); if ($livereport == "disable") { $logh = "457px"; $lreport = "style='display:none;'"; } else { $logh = "350px"; $lreport = "style='display:block;'"; } ?>
"; if (substr($log[$i]['message'], 0, 2) == "->") { echo ""; //echo substr($mess[1], 0,2); echo ""; echo ""; } else { } echo ""; } ?>
(IP)
" . $time . ""; if (count($mess) > 6) { echo $mess[1] . ":" . $mess[2] . ":" . $mess[3] . ":" . $mess[4] . ":" . $mess[5] . ":" . $mess[6]; } else { echo $mess[1]; } echo ""; if (count($mess) > 6) { echo str_replace("trying to", "", $mess[7] . " " . $mess[8] . " " . $mess[9] . " " . $mess[10]); } else { echo str_replace("trying to", "", $mess[2] . " " . $mess[3] . " " . $mess[4] . " " . $mess[5]); } echo "