├── voucher ├── temp.php ├── variable.php ├── index.php ├── default-small.php ├── template-small.php ├── default-thermal.php ├── template-thermal.php ├── default.php ├── template.php ├── print.php └── editor.php ├── img ├── logo.png ├── favicon.png ├── menubg.png ├── logo.png.bak ├── textures.png ├── logokemangi.png ├── textures.png.bak └── index.php ├── plugins ├── font-awesome │ └── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 ├── bootstrap │ └── css │ │ ├── bootstrap-reboot.min.css │ │ └── bootstrap-reboot.css └── jquery │ └── core.js ├── README.md ├── js ├── autoreload.js ├── index.php ├── mikhmon.js └── adminlte.min.js ├── include ├── config.php ├── index.php ├── headhtml.php ├── login.php ├── log.php ├── about.php ├── hotspotactive.php ├── userprofile.php ├── uplogo.php ├── adduser.php ├── users.php ├── userlog.php ├── adduserprofile.php ├── selling.php ├── menu.php ├── settings.php └── userprofilebyname.php ├── css ├── index.php └── mikhmon.css ├── lib ├── index.php └── formatbytesbites.php ├── process ├── index.php ├── removeuserprofile.php ├── removehost.php ├── resethotspotuser.php ├── removehotspotuser.php ├── disablehotspotuser.php ├── enablehotspotuser.php ├── removeuseractive.php ├── removehotspotuserbycomment.php ├── getvalidprice.php └── reboot.php ├── status ├── status.php └── index.php ├── admin.php └── index.php /voucher/temp.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laksa19/mikhmonv2/HEAD/img/logo.png -------------------------------------------------------------------------------- /img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laksa19/mikhmonv2/HEAD/img/favicon.png -------------------------------------------------------------------------------- /img/menubg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laksa19/mikhmonv2/HEAD/img/menubg.png -------------------------------------------------------------------------------- /img/logo.png.bak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laksa19/mikhmonv2/HEAD/img/logo.png.bak -------------------------------------------------------------------------------- /img/textures.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laksa19/mikhmonv2/HEAD/img/textures.png -------------------------------------------------------------------------------- /img/logokemangi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laksa19/mikhmonv2/HEAD/img/logokemangi.png -------------------------------------------------------------------------------- /img/textures.png.bak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laksa19/mikhmonv2/HEAD/img/textures.png.bak -------------------------------------------------------------------------------- /plugins/font-awesome/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laksa19/mikhmonv2/HEAD/plugins/font-awesome/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /plugins/font-awesome/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laksa19/mikhmonv2/HEAD/plugins/font-awesome/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /plugins/font-awesome/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laksa19/mikhmonv2/HEAD/plugins/font-awesome/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /plugins/font-awesome/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laksa19/mikhmonv2/HEAD/plugins/font-awesome/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /plugins/font-awesome/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laksa19/mikhmonv2/HEAD/plugins/font-awesome/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MIKHMON V2 2 | MikroTik Hotspot Monitor V2 3 | 4 | New design and easy to use. 5 | 6 | # NEW BUILD MIKHMON V3 7 | [MIKHMON v3](https://github.com/laksa19/mikhmonv3) 8 | -------------------------------------------------------------------------------- /js/autoreload.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ var interval = "5000"; setInterval(function() { $("#reloadHome").load("./include/home.php"); }, interval); setInterval(function() { $("#reloadHotspotActive").load("./include/hotspotactive.php"); }, interval);}); -------------------------------------------------------------------------------- /include/config.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /voucher/variable.php: -------------------------------------------------------------------------------- 1 | 2 | Logo : 3 | 4 | 5 | Hotspotname : 6 | 7 | 8 | Username : 9 | 10 | 11 | Password : 12 | 13 | 14 | Validity : 15 | 16 | 17 | Time Limit : 18 | 19 | 20 | Data Limit : 21 | 22 | 23 | Price : 24 | 25 | 26 | QR Code : 27 | 28 | 29 | Number Voucher: 30 | 31 | 32 | 33 | Conditional : 34 | $usermode = "vc" 35 | username=password 36 | 37 | $usermode = "up" 38 | username&password -------------------------------------------------------------------------------- /css/index.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | echo ""; 19 | ?> 20 | 21 | -------------------------------------------------------------------------------- /img/index.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | echo ""; 19 | ?> 20 | 21 | -------------------------------------------------------------------------------- /js/index.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | echo ""; 19 | ?> 20 | 21 | -------------------------------------------------------------------------------- /lib/index.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | echo ""; 19 | ?> 20 | 21 | -------------------------------------------------------------------------------- /include/index.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | echo ""; 19 | ?> 20 | 21 | -------------------------------------------------------------------------------- /process/index.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | echo ""; 19 | ?> 20 | 21 | -------------------------------------------------------------------------------- /voucher/index.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | echo ""; 19 | ?> 20 | 21 | -------------------------------------------------------------------------------- /process/removeuserprofile.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | session_start(); 19 | // hide all error 20 | error_reporting(0); 21 | 22 | $API->comm("/ip/hotspot/user/profile/remove", array( 23 | ".id"=> "$removeuserprofile",)); 24 | echo ""; 25 | ?> -------------------------------------------------------------------------------- /process/removehost.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | session_start(); 19 | // hide all error 20 | error_reporting(0); 21 | 22 | // remove host 23 | $API->comm("/ip/hotspot/host/remove", array( 24 | ".id"=> "$removehost",)); 25 | // redirect to host 26 | echo ""; 27 | ?> -------------------------------------------------------------------------------- /process/resethotspotuser.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | session_start(); 19 | // hide all error 20 | error_reporting(0); 21 | 22 | $API->comm("/ip/hotspot/user/set", array( 23 | ".id"=> "$resethotspotuser", "limit-uptime" => "0")); 24 | echo ""; 25 | 26 | ?> -------------------------------------------------------------------------------- /css/mikhmon.css: -------------------------------------------------------------------------------- 1 | .mbg{ 2 | font-family: 'Helvetica', arial, sans-serif; 3 | background: url('../img/textures.png'); 4 | background-color: rgb(52, 58, 64); 5 | font-size: 14px; 6 | } 7 | .bg-trp{ 8 | background-color: transparent; 9 | padding: 5px; 10 | } 11 | .btn-mrg{ 12 | margin: 3px; 13 | } 14 | .cl-w{ 15 | color:#fff; 16 | } 17 | .settings { 18 | width: 500px; 19 | } 20 | .div-t{ 21 | overflow-x:auto; 22 | overflow-y:auto; 23 | max-height: 75vh; 24 | } 25 | .loader { 26 | z-index: 1; 27 | width: 50px; 28 | height: 50px; 29 | border: 10px solid #f3f3f3; 30 | border-radius: 50%; 31 | border-top: 10px solid #3498db; 32 | width: 5px; 33 | height: 5px; 34 | -webkit-animation: spin 2s linear infinite; 35 | animation: spin 2s linear infinite; 36 | } 37 | 38 | @-webkit-keyframes spin { 39 | 0% { -webkit-transform: rotate(0deg); } 40 | 100% { -webkit-transform: rotate(360deg); } 41 | } 42 | 43 | @keyframes spin { 44 | 0% { transform: rotate(0deg); } 45 | 100% { transform: rotate(360deg); } 46 | } 47 | @media screen and (max-width: 850px) { 48 | 49 | .settings { 50 | width: auto; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /process/removehotspotuser.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | session_start(); 19 | // hide all error 20 | error_reporting(0); 21 | 22 | $API->comm("/ip/hotspot/user/remove", array( 23 | ".id"=> "$removehotspotuser", 24 | )); 25 | if($_SESSION['ubp'] != ""){ 26 | echo ""; 27 | }elseif($_SESSION['ubc'] != ""){ 28 | echo ""; 29 | }else{ 30 | echo ""; 31 | } 32 | 33 | ?> -------------------------------------------------------------------------------- /process/disablehotspotuser.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | session_start(); 19 | // hide all error 20 | error_reporting(0); 21 | 22 | $API->comm("/ip/hotspot/user/set", array( 23 | ".id"=> "$disablehotspotuser", 24 | "disabled" => "yes", 25 | )); 26 | if($_SESSION['ubp'] != ""){ 27 | echo ""; 28 | }elseif($_SESSION['ubc'] != ""){ 29 | echo ""; 30 | }else{ 31 | echo ""; 32 | } 33 | 34 | 35 | ?> -------------------------------------------------------------------------------- /process/enablehotspotuser.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | session_start(); 19 | // hide all error 20 | error_reporting(0); 21 | 22 | $API->comm("/ip/hotspot/user/set", array( 23 | ".id"=> "$enablehotspotuser", 24 | "disabled" => "no", 25 | )); 26 | if($_SESSION['ubp'] != ""){ 27 | echo ""; 28 | }elseif($_SESSION['ubc'] != ""){ 29 | echo ""; 30 | }else{ 31 | echo ""; 32 | } 33 | 34 | 35 | ?> -------------------------------------------------------------------------------- /lib/formatbytesbites.php: -------------------------------------------------------------------------------- 1 | 'Byte', 6 | '1' => 'KiB', 7 | '2' => 'MiB', 8 | '3' => 'GiB', 9 | '4' => 'TiB', 10 | '5' => 'PiB', 11 | '6' => 'EiB', 12 | '7' => 'ZiB', 13 | '8' => 'YiB' 14 | ); 15 | 16 | for($i = 0; $size >= 1024 && $i <= count($unit); $i++){ 17 | $size = $size/1024; 18 | } 19 | 20 | return round($size, $decimals).' '.$unit[$i]; 21 | } 22 | 23 | // function format bytes2 24 | function formatBytes2($size, $decimals = 0){ 25 | $unit = array( 26 | '0' => 'Byte', 27 | '1' => 'KB', 28 | '2' => 'MB', 29 | '3' => 'GB', 30 | '4' => 'TB', 31 | '5' => 'PB', 32 | '6' => 'EB', 33 | '7' => 'ZB', 34 | '8' => 'YB' 35 | ); 36 | 37 | for($i = 0; $size >= 1000 && $i <= count($unit); $i++){ 38 | $size = $size/1000; 39 | } 40 | 41 | return round($size, $decimals).''.$unit[$i]; 42 | } 43 | 44 | 45 | // function format bites 46 | function formatBites($size, $decimals = 0){ 47 | $unit = array( 48 | '0' => 'bps', 49 | '1' => 'kbps', 50 | '2' => 'Mbps', 51 | '3' => 'Gbps', 52 | '4' => 'Tbps', 53 | '5' => 'Pbps', 54 | '6' => 'Ebps', 55 | '7' => 'Zbps', 56 | '8' => 'Ybps' 57 | ); 58 | 59 | for($i = 0; $size >= 1000 && $i <= count($unit); $i++){ 60 | $size = $size/1000; 61 | } 62 | 63 | return round($size, $decimals).' '.$unit[$i]; 64 | } 65 | ?> -------------------------------------------------------------------------------- /process/removeuseractive.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | session_start(); 19 | // hide all error 20 | error_reporting(0); 21 | 22 | // get user active 23 | $getuser = $API->comm("/ip/hotspot/active/print", array( 24 | "?.id"=> "$removeuseractive",)); 25 | $user = $getuser[0]['user']; 26 | // get cookie id 27 | $getcookie = $API->comm("/ip/hotspot/cookie/print", array( 28 | "?user"=> "$user",)); 29 | $ck = $getcookie[0]['.id']; 30 | // remove cookie 31 | $API->comm("/ip/hotspot/cookie/remove", array( 32 | ".id"=> "$ck",)); 33 | // remove user active 34 | $API->comm("/ip/hotspot/active/remove", array( 35 | ".id"=> "$removeuseractive",)); 36 | // redirect to user active 37 | echo ""; 38 | ?> -------------------------------------------------------------------------------- /process/removehotspotuserbycomment.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | session_start(); 19 | // hide all error 20 | error_reporting(0); 21 | $getuser = $API->comm("/ip/hotspot/user/print", array( 22 | "?comment" => "$removehotspotuserbycomment", 23 | "?uptime" => "00:00:00" 24 | )); 25 | $TotalReg = count($getuser); 26 | 27 | $_SESSION['ubp'] = $getuser[0]['profile']; 28 | $_SESSION['ubc'] = ""; 29 | 30 | for ($i=0; $i<$TotalReg; $i++){ 31 | $userdetails = $getuser[$i]; 32 | $uid = $userdetails['.id']; 33 | 34 | $API->comm("/ip/hotspot/user/remove", array( 35 | ".id"=> "$uid",)); 36 | } 37 | if($_SESSION['ubp'] != ""){ 38 | echo ""; 39 | }else{ 40 | echo ""; 41 | } 42 | 43 | ?> -------------------------------------------------------------------------------- /include/headhtml.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | session_start(); 19 | // hide all error 20 | error_reporting(0); 21 | 22 | ?> 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | .:: MIKHMON <?php echo $hotspotname;?> ::. 38 | 39 | 40 |
-------------------------------------------------------------------------------- /status/status.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | session_start(); 19 | // hide all error 20 | error_reporting(0); 21 | include_once('../include/config.php'); 22 | include_once('../lib/routeros_api.class.php'); 23 | 24 | $API = new RouterosAPI(); 25 | $API->debug = false; 26 | $API->connect( $iphost, $userhost, decrypt($passwdhost)); 27 | 28 | $uname = $_GET['name']; 29 | if($uname != ""){ 30 | $getname = $API->comm("/sys/sch/print", array("?name" => "$uname")); 31 | $exp = $getname[0]['next-run']; 32 | 33 | } 34 | ?> 35 | 36 | 37 | 38 | Voucher-<?php echo $hotspotname."-".$uname;?> 39 | 40 | 41 | 48 | 49 | 50 |
51 | 52 | -------------------------------------------------------------------------------- /process/getvalidprice.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | session_start(); 19 | // hide all error 20 | error_reporting(0); 21 | include_once('../include/config.php'); 22 | include_once('../lib/routeros_api.class.php'); 23 | 24 | $API = new RouterosAPI(); 25 | $API->debug = false; 26 | $API->connect( $iphost, $userhost, decrypt($passwdhost)); 27 | 28 | $uprofname = $_GET['name']; 29 | if($uprofname != ""){ 30 | $getprofile = $API->comm("/ip/hotspot/user/profile/print", array("?name" => "$uprofname")); 31 | $ponlogin = $getprofile[0]['on-login']; 32 | $getvalid = "Validity : ".explode(",",$ponlogin)[3]; 33 | $getprice = explode(",",$ponlogin)[2]; 34 | $getlock = "| Lock User : ".explode(",",$ponlogin)[6]; 35 | if($getprice == 0){ 36 | }else{ 37 | if($curency == "Rp" || $curency == "rp" || $curency == "IDR" || $curency == "idr"){ 38 | $price = "| Price : ".$curency." ".number_format($getprice,0,",","."); 39 | }else{ 40 | $price = "| Price : ".$curency." ".number_format($getprice); 41 | } 42 | } 43 | echo ''.$getvalid.' '.$price.' '.$getlock.''; 44 | } 45 | ?> -------------------------------------------------------------------------------- /voucher/default-small.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 47 | 48 | 49 |
9 | 10 | 11 | 12 | 43 | 44 | 45 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 |
Kode Voucher
UsernamePassword
42 |
46 |
-------------------------------------------------------------------------------- /voucher/template-small.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 47 | 48 | 49 |
9 | 10 | 11 | 12 | 43 | 44 | 45 |
13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 |
Kode Voucher
UsernamePassword
42 |
46 |
-------------------------------------------------------------------------------- /include/login.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | session_start(); 19 | ?> 20 | 21 |
22 |
23 | 46 |
47 |
48 | 49 | -------------------------------------------------------------------------------- /process/reboot.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | session_start(); 19 | // hide all error 20 | error_reporting(0); 21 | if(!isset($_SESSION["$userhost"])){ 22 | session_destroy(); 23 | echo ""; 24 | echo " 36 |
37 |
38 |
39 | 40 |
41 | 42 |
43 |
44 | 45 | "; 48 | echo ""; 49 | echo ""; 50 | echo ""; 51 | echo ""; 52 | } 53 | ?> 54 |
" . $log[$i]['time'];echo "" . $log[$i]['message'];echo "
55 |
56 |
57 |
58 |
59 | 60 |
61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /voucher/default-thermal.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
logo
14 | 15 | 16 | 17 | 18 | 65 | 66 | 67 |
19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 |
Kode Voucher
UsernamePassword
46 | qrcode 47 |
Login: http://
64 |
-------------------------------------------------------------------------------- /voucher/template-thermal.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | "; 168 | echo " "; 169 | echo " "; 170 | echo " "; 171 | echo " "; 172 | echo " "; 173 | echo " "; 174 | echo " "; 175 | echo " "; 176 | echo " "; 177 | echo " "; 178 | echo " "; 179 | echo " "; 180 | echo " "; 181 | echo " "; 182 | echo " "; 183 | echo " "; 184 | echo " "; 185 | echo " "; 186 | echo " "; 187 | echo "
logo
14 | 15 | 16 | 17 | 18 | 65 | 66 | 67 |
19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 |
Kode Voucher
UsernamePassword
46 | qrcode 47 |
Login: http://
64 |
-------------------------------------------------------------------------------- /admin.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | session_start(); 19 | // hide all error 20 | error_reporting(0); 21 | $id = $_GET['id']; 22 | include_once('./include/headhtml.php'); 23 | include_once('./include/config.php'); 24 | include_once('./lib/routeros_api.class.php'); 25 | 26 | 27 | if($id == "login" || substr($url,-1) == "p"){ 28 | 29 | if(isset($_POST['login'])){ 30 | $user = $_POST['user']; 31 | $pass = $_POST['pass']; 32 | if($user == $userhost && $pass == decrypt($passwdhost)){ 33 | $_SESSION["$userhost"]=$user; 34 | echo ""; 35 | }elseif ($user == $useradm && $pass == decrypt($passadm)){ 36 | $_SESSION["$userhost"]=$user; 37 | echo ""; 38 | }else{ 39 | $error = '
Alert!
Invalid username or password.
'; 40 | } 41 | } 42 | 43 | include_once('./include/login.php'); 44 | 45 | }elseif(!isset($_SESSION["$userhost"])){ 46 | echo ""; 47 | }elseif($id == "settings"){ 48 | echo "
"; 49 | include_once('./include/settings.php'); 50 | echo "
"; 51 | }elseif($id == "connect"){ 52 | $API = new RouterosAPI(); 53 | $API->debug = false; 54 | $API->connect( $iphost, $userhost, decrypt($passwdhost)); 55 | $getidentity = $API->comm("/system/identity/print"); 56 | $identity = $getidentity[0]['name']; 57 | if($identity == "" ){ 58 | $_SESSION["connect"] = "Not connected"; 59 | echo ""; 60 | }else{ 61 | $_SESSION["connect"] = "Connected"; 62 | echo ""; 63 | } 64 | }elseif($id == "uplogo"){ 65 | include_once('./include/uplogo.php'); 66 | }elseif($id == "reboot"){ 67 | include_once('./process/reboot.php'); 68 | } 69 | ?> -------------------------------------------------------------------------------- /voucher/default.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 76 | 77 | 78 |
logo
11 | 12 | 13 | 14 | 15 | 55 | 56 | 57 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 |
16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 |
Kode Voucher
Username
Password
UsernamePassword
54 |
58 | qrcode 59 |
Login: http://
75 |
-------------------------------------------------------------------------------- /voucher/template.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 76 | 77 | 78 |
logo
11 | 12 | 13 | 14 | 15 | 55 | 56 | 57 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 |
16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 |
Kode Voucher
Username
Password
UsernamePassword
54 |
58 | qrcode 59 |
Login: http://
75 |
-------------------------------------------------------------------------------- /include/about.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | session_start(); 19 | // hide all error 20 | error_reporting(0); 21 | include_once('./config.php'); 22 | if(!isset($_SESSION["$userhost"])){ 23 | echo ""; 24 | echo ""; 25 | } 26 | ?> 27 |
28 | 29 |
30 |
31 |
32 |
33 |
34 |

MikroTik Hotspot Monitor

35 |
36 | 37 |
38 |
39 |
40 |
41 |

42 | Aplikasi ini dipersembahkan untuk pengusaha hotspot di manapun Anda berada. 43 | Semoga makin sukses. 44 |

45 |

46 |

69 |

70 |

71 | Terima kasih untuk semua yang telah mendukung pengembangan MIKHMON. 72 |

73 |
74 | Copyright © 2018 Laksamadi Guko 75 |
76 |
77 |
78 |
79 |
80 | 81 |
82 | 83 |
84 | 85 |
86 | 87 |
88 |
89 | -------------------------------------------------------------------------------- /plugins/bootstrap/css/bootstrap-reboot.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Reboot v4.1.0 (https://getbootstrap.com/) 3 | * Copyright 2011-2018 The Bootstrap Authors 4 | * Copyright 2011-2018 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) 7 | */*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg:not(:root){overflow:hidden}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important} 8 | /*# sourceMappingURL=bootstrap-reboot.min.css.map */ -------------------------------------------------------------------------------- /include/hotspotactive.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | session_start(); 19 | // hide all error 20 | error_reporting(0); 21 | include_once('./config.php'); 22 | if(!isset($_SESSION["$userhost"])){ 23 | echo ""; 24 | echo ""; 25 | }else{ 26 | 27 | // routeros api 28 | include_once('./config.php'); 29 | include_once('../lib/routeros_api.class.php'); 30 | include_once('../lib/formatbytesbites.php'); 31 | $API = new RouterosAPI(); 32 | $API->debug = false; 33 | $API->connect( $iphost, $userhost, decrypt($passwdhost)); 34 | 35 | $gethotspotactive = $API->comm("/ip/hotspot/active/print"); 36 | $TotalReg = count($gethotspotactive); 37 | 38 | $counthotspotactive = $API->comm("/ip/hotspot/active/print", array( 39 | "count-only" => "",)); 40 | 41 | } 42 | ?> 43 |
44 | 45 |
46 |
47 |
48 |
49 |

1){ 52 | echo "$counthotspotactive items";};echo""; 53 | ?>

54 |
55 | 56 |
57 | 58 |
59 |
60 | 61 |
62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | "; 89 | echo ""; 90 | echo ""; 91 | echo ""; 92 | echo ""; 93 | echo ""; 94 | echo ""; 95 | echo ""; 96 | echo ""; 97 | echo ""; 98 | } 99 | ?> 100 | 101 |
ServerUserAddressMac AddressUptimeBytes OutLogin By
" . $server . " " .$user."" . $address . "" . $mac . "" . $uptime . "" . $byteso . "" . $loginby . "
102 |
103 |
104 |
105 |
106 | 107 |
108 | 109 |
110 | 111 |
112 |
113 | -------------------------------------------------------------------------------- /voucher/print.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | session_start(); 19 | ?> 20 | debug = false; 38 | $API->connect( $iphost, $userhost, decrypt($passwdhost)); 39 | 40 | if($userp != ""){ 41 | $usermode = explode('-',$userp)[0]; 42 | $user = explode('-',$userp)[1]; 43 | $getuser = $API->comm("/ip/hotspot/user/print", array("?name"=> "$user")); 44 | $TotalReg = count($getuser); 45 | }elseif($id != ""){ 46 | $usermode = explode('-',$id)[0]; 47 | $getuser = $API->comm('/ip/hotspot/user/print', array("?comment" => "$id", "?uptime"=> "0s")); 48 | $TotalReg = count($getuser); 49 | } 50 | $getuprofile = $getuser[0]['profile']; 51 | 52 | 53 | $getprofile = $API->comm("/ip/hotspot/user/profile/print", array("?name" => "$getuprofile")); 54 | $ponlogin = $getprofile[0]['on-login']; 55 | $validity = explode(",",$ponlogin)[3]; 56 | $getprice = explode(",",$ponlogin)[2]; 57 | if($getprice == 0){ 58 | $price = ""; 59 | }else{ 60 | if($curency == "Rp" || $curency == "rp" || $curency == "IDR" || $curency == "idr"){ 61 | $price = $curency." ".number_format($getprice,0,",","."); 62 | }else{ 63 | $price = $curency." ".number_format($getprice); 64 | } 65 | } 66 | 67 | $logo = "../img/logo.png"; 68 | 69 | ?> 70 | 71 | 72 | 73 | Voucher-<?php echo $hotspotname."-".$getuprofile."-".$id; ?> 74 | 75 | 76 | 77 | 116 | 117 | 118 | 119 | 134 | 145 | 146 | 147 | 148 | 149 | 150 | -------------------------------------------------------------------------------- /voucher/editor.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | session_start(); 19 | ?> 20 | 49 | 50 | 51 | 52 | .:: MIKHMON Template Editor::. 53 | 54 | 55 | 56 | 57 | 58 | 76 | 77 | 78 |
79 | 80 | 81 | 84 | 95 | 96 | 97 | 102 | 119 | 120 |
82 | | Variable 83 | 85 | | Editor 86 | Close 87 | Default 88 | Thermal 89 | Small 90 | | Reset 91 | Default 92 | Thermal 93 | Small 94 |
98 | 101 | 103 | 118 |
121 |
122 | 123 | 124 | -------------------------------------------------------------------------------- /include/userprofile.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | 19 | // hide all error 20 | error_reporting(0); 21 | 22 | // get user profile 23 | $getprofile = $API->comm("/ip/hotspot/user/profile/print"); 24 | $TotalReg = count($getprofile); 25 | // count user profile 26 | $countprofile = $API->comm("/ip/hotspot/user/profile/print", array( 27 | "count-only" => "",)); 28 | 29 | ?> 30 |
31 |
32 |
33 |
34 |
35 |
36 |

37 | 1){echo "$countprofile items ";} 40 | ?> 41 |

42 |
43 | 44 |
45 |
46 |
47 | 48 |
49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | "; 69 | $profiledetalis = $getprofile[$i]; 70 | $pid = $profiledetalis['.id']; 71 | $pname = $profiledetalis['name']; 72 | $psharedu = $profiledetalis['shared-users']; 73 | $pratelimit = $profiledetalis['rate-limit']; 74 | $ponlogin = $profiledetalis['on-login']; 75 | 76 | echo ""; 77 | echo ""; 78 | //$profiledetalis = $ARRAY[$i];echo ""; 79 | echo ""; 80 | echo ""; 81 | 82 | echo ""; 98 | echo ""; 104 | echo ""; 109 | 110 | echo ""; 125 | echo ""; 130 | echo ""; 140 | echo ""; 141 | } 142 | ?> 143 | 144 |
NameShared
Users
Rate
Limit
Expired ModeValidityGrace
Period
Price Lock
User
Total
User
       $pname" . $profiledetalis['name'];echo "" . $psharedu;echo "" . $pratelimit;echo ""; 83 | $getexpmode = explode(",",$ponlogin); 84 | // get expired mode 85 | $expmode = $getexpmode[1]; 86 | if($expmode == "rem"){ 87 | echo "Remove"; 88 | }elseif($expmode == "ntf"){ 89 | echo "Notice"; 90 | }elseif($expmode == "remc"){ 91 | echo "Remove & Record"; 92 | }elseif($expmode == "ntfc"){ 93 | echo "Notice & Record"; 94 | }else{ 95 | 96 | } 97 | echo ""; 99 | // get validity 100 | $getvalid = explode(",",$ponlogin); 101 | echo $getvalid[3]; 102 | 103 | echo ""; 105 | 106 | $getgracep= explode(",",$ponlogin); 107 | echo $getgracep[4]; 108 | echo ""; 111 | // get price 112 | $getprice = explode(",",$ponlogin); 113 | $price = trim($getprice[2]); 114 | if($price == "" || $price == "0" ){ 115 | echo ""; 116 | }else{ 117 | if($curency == "Rp" || $curency == "rp" || $curency == "IDR" || $curency == "idr"){ 118 | echo number_format($price,0,",","."); 119 | }else{ 120 | echo number_format($price); 121 | } 122 | } 123 | 124 | echo ""; 126 | 127 | $getgracep= explode(",",$ponlogin); 128 | echo $getgracep[6]; 129 | echo ""; 131 | 132 | $countuser = $API->comm("/ip/hotspot/user/print", array( 133 | "count-only" => "", 134 | "?profile" => "$pname", 135 | )); 136 | if($countuser < 2 ){echo "$countuser"; 137 | }elseif($countuser > 1){ 138 | echo "$countuser";} 139 | echo "
145 |
146 |
147 |
148 |
149 | 150 |
151 | 152 |
153 | 154 |
155 | 156 |
157 |
158 | -------------------------------------------------------------------------------- /plugins/bootstrap/css/bootstrap-reboot.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Reboot v4.1.0 (https://getbootstrap.com/) 3 | * Copyright 2011-2018 The Bootstrap Authors 4 | * Copyright 2011-2018 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) 7 | */ 8 | *, 9 | *::before, 10 | *::after { 11 | box-sizing: border-box; 12 | } 13 | 14 | html { 15 | font-family: sans-serif; 16 | line-height: 1.15; 17 | -webkit-text-size-adjust: 100%; 18 | -ms-text-size-adjust: 100%; 19 | -ms-overflow-style: scrollbar; 20 | -webkit-tap-highlight-color: transparent; 21 | } 22 | 23 | @-ms-viewport { 24 | width: device-width; 25 | } 26 | 27 | article, aside, dialog, figcaption, figure, footer, header, hgroup, main, nav, section { 28 | display: block; 29 | } 30 | 31 | body { 32 | margin: 0; 33 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; 34 | font-size: 1rem; 35 | font-weight: 400; 36 | line-height: 1.5; 37 | color: #212529; 38 | text-align: left; 39 | background-color: #fff; 40 | } 41 | 42 | [tabindex="-1"]:focus { 43 | outline: 0 !important; 44 | } 45 | 46 | hr { 47 | box-sizing: content-box; 48 | height: 0; 49 | overflow: visible; 50 | } 51 | 52 | h1, h2, h3, h4, h5, h6 { 53 | margin-top: 0; 54 | margin-bottom: 0.5rem; 55 | } 56 | 57 | p { 58 | margin-top: 0; 59 | margin-bottom: 1rem; 60 | } 61 | 62 | abbr[title], 63 | abbr[data-original-title] { 64 | text-decoration: underline; 65 | -webkit-text-decoration: underline dotted; 66 | text-decoration: underline dotted; 67 | cursor: help; 68 | border-bottom: 0; 69 | } 70 | 71 | address { 72 | margin-bottom: 1rem; 73 | font-style: normal; 74 | line-height: inherit; 75 | } 76 | 77 | ol, 78 | ul, 79 | dl { 80 | margin-top: 0; 81 | margin-bottom: 1rem; 82 | } 83 | 84 | ol ol, 85 | ul ul, 86 | ol ul, 87 | ul ol { 88 | margin-bottom: 0; 89 | } 90 | 91 | dt { 92 | font-weight: 700; 93 | } 94 | 95 | dd { 96 | margin-bottom: .5rem; 97 | margin-left: 0; 98 | } 99 | 100 | blockquote { 101 | margin: 0 0 1rem; 102 | } 103 | 104 | dfn { 105 | font-style: italic; 106 | } 107 | 108 | b, 109 | strong { 110 | font-weight: bolder; 111 | } 112 | 113 | small { 114 | font-size: 80%; 115 | } 116 | 117 | sub, 118 | sup { 119 | position: relative; 120 | font-size: 75%; 121 | line-height: 0; 122 | vertical-align: baseline; 123 | } 124 | 125 | sub { 126 | bottom: -.25em; 127 | } 128 | 129 | sup { 130 | top: -.5em; 131 | } 132 | 133 | a { 134 | color: #007bff; 135 | text-decoration: none; 136 | background-color: transparent; 137 | -webkit-text-decoration-skip: objects; 138 | } 139 | 140 | a:hover { 141 | color: #0056b3; 142 | text-decoration: underline; 143 | } 144 | 145 | a:not([href]):not([tabindex]) { 146 | color: inherit; 147 | text-decoration: none; 148 | } 149 | 150 | a:not([href]):not([tabindex]):hover, a:not([href]):not([tabindex]):focus { 151 | color: inherit; 152 | text-decoration: none; 153 | } 154 | 155 | a:not([href]):not([tabindex]):focus { 156 | outline: 0; 157 | } 158 | 159 | pre, 160 | code, 161 | kbd, 162 | samp { 163 | font-family: monospace, monospace; 164 | font-size: 1em; 165 | } 166 | 167 | pre { 168 | margin-top: 0; 169 | margin-bottom: 1rem; 170 | overflow: auto; 171 | -ms-overflow-style: scrollbar; 172 | } 173 | 174 | figure { 175 | margin: 0 0 1rem; 176 | } 177 | 178 | img { 179 | vertical-align: middle; 180 | border-style: none; 181 | } 182 | 183 | svg:not(:root) { 184 | overflow: hidden; 185 | } 186 | 187 | table { 188 | border-collapse: collapse; 189 | } 190 | 191 | caption { 192 | padding-top: 0.75rem; 193 | padding-bottom: 0.75rem; 194 | color: #6c757d; 195 | text-align: left; 196 | caption-side: bottom; 197 | } 198 | 199 | th { 200 | text-align: inherit; 201 | } 202 | 203 | label { 204 | display: inline-block; 205 | margin-bottom: 0.5rem; 206 | } 207 | 208 | button { 209 | border-radius: 0; 210 | } 211 | 212 | button:focus { 213 | outline: 1px dotted; 214 | outline: 5px auto -webkit-focus-ring-color; 215 | } 216 | 217 | input, 218 | button, 219 | select, 220 | optgroup, 221 | textarea { 222 | margin: 0; 223 | font-family: inherit; 224 | font-size: inherit; 225 | line-height: inherit; 226 | } 227 | 228 | button, 229 | input { 230 | overflow: visible; 231 | } 232 | 233 | button, 234 | select { 235 | text-transform: none; 236 | } 237 | 238 | button, 239 | html [type="button"], 240 | [type="reset"], 241 | [type="submit"] { 242 | -webkit-appearance: button; 243 | } 244 | 245 | button::-moz-focus-inner, 246 | [type="button"]::-moz-focus-inner, 247 | [type="reset"]::-moz-focus-inner, 248 | [type="submit"]::-moz-focus-inner { 249 | padding: 0; 250 | border-style: none; 251 | } 252 | 253 | input[type="radio"], 254 | input[type="checkbox"] { 255 | box-sizing: border-box; 256 | padding: 0; 257 | } 258 | 259 | input[type="date"], 260 | input[type="time"], 261 | input[type="datetime-local"], 262 | input[type="month"] { 263 | -webkit-appearance: listbox; 264 | } 265 | 266 | textarea { 267 | overflow: auto; 268 | resize: vertical; 269 | } 270 | 271 | fieldset { 272 | min-width: 0; 273 | padding: 0; 274 | margin: 0; 275 | border: 0; 276 | } 277 | 278 | legend { 279 | display: block; 280 | width: 100%; 281 | max-width: 100%; 282 | padding: 0; 283 | margin-bottom: .5rem; 284 | font-size: 1.5rem; 285 | line-height: inherit; 286 | color: inherit; 287 | white-space: normal; 288 | } 289 | 290 | progress { 291 | vertical-align: baseline; 292 | } 293 | 294 | [type="number"]::-webkit-inner-spin-button, 295 | [type="number"]::-webkit-outer-spin-button { 296 | height: auto; 297 | } 298 | 299 | [type="search"] { 300 | outline-offset: -2px; 301 | -webkit-appearance: none; 302 | } 303 | 304 | [type="search"]::-webkit-search-cancel-button, 305 | [type="search"]::-webkit-search-decoration { 306 | -webkit-appearance: none; 307 | } 308 | 309 | ::-webkit-file-upload-button { 310 | font: inherit; 311 | -webkit-appearance: button; 312 | } 313 | 314 | output { 315 | display: inline-block; 316 | } 317 | 318 | summary { 319 | display: list-item; 320 | cursor: pointer; 321 | } 322 | 323 | template { 324 | display: none; 325 | } 326 | 327 | [hidden] { 328 | display: none !important; 329 | } 330 | /*# sourceMappingURL=bootstrap-reboot.css.map */ -------------------------------------------------------------------------------- /include/uplogo.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | 19 | // hide all error 20 | error_reporting(0); 21 | if(!isset($_SESSION["$userhost"])){ 22 | echo ""; 23 | } 24 | ?> 25 |
Nama file : ' . basename($_FILES["UploadLogo"]["name"]). '.
'; 38 | }else{ 39 | $galat = '
File name is : ' . basename($_FILES["UploadLogo"]["name"]). '.
'; 40 | } 41 | $uploadOk = 1; 42 | } else { 43 | if($curency == "Rp" || $curency == "rp" || $curency == "IDR" || $curency == "idr"){ 44 | $galat = '
File bukan gambar.
'; 45 | }else{ 46 | $galat = '
File is not an image.
'; 47 | } 48 | $uploadOk = 0; 49 | } 50 | 51 | 52 | // Check file size 53 | if ($_FILES["UploadLogo"]["size"] > 2000000) { 54 | if($curency == "Rp" || $curency == "rp" || $curency == "IDR" || $curency == "idr"){ 55 | $galat = '
Ukuran file terlalu besar.
'; 56 | }else{ 57 | $galat = '
File is too large.
'; 58 | } 59 | $uploadOk = 0; 60 | } 61 | // Allow certain file formats 62 | if( basename($_FILES["UploadLogo"]["name"] != "logo.png")) { 63 | if($curency == "Rp" || $curency == "rp" || $curency == "IDR" || $curency == "idr"){ 64 | $galat = '
Hanya bisa upload logo.png.
'; 65 | }else{ 66 | $galat = '
Alert!
Only logo.png are allowed.
'; 67 | } 68 | $uploadOk = 0; 69 | } 70 | // Check if $uploadOk is set to 0 by an error 71 | if ($uploadOk == 0) { 72 | if($curency == "Rp" || $curency == "rp" || $curency == "IDR" || $curency == "idr"){ 73 | $galat = '
Alert!
File tidak diupload.
'; 74 | }else{ 75 | $galat = '
Alert!
File was not uploaded.
'; 76 | } 77 | 78 | // if everything is ok, try to upload file 79 | } else { 80 | if (move_uploaded_file($_FILES["UploadLogo"]["tmp_name"], $logo_file)) { 81 | if($curency == "Rp" || $curency == "rp" || $curency == "IDR" || $curency == "idr"){ 82 | $galat = '
Success!
File '. basename( $_FILES["UploadLogo"]["name"]). ' telah diupload.
'; 83 | }else{ 84 | $galat = '
Success!
The File '. basename( $_FILES["UploadLogo"]["name"]). ' has been uploaded.
'; 85 | } 86 | 87 | } else { 88 | if($curency == "Rp" || $curency == "rp" || $curency == "IDR" || $curency == "idr"){ 89 | $galat = '
Alert!
Terjadi masalah ketika upload file.
'; 90 | }else{ 91 | $galat = '
Alert!
There was an error uploading your file
'; 92 | } 93 | 94 | } 95 | } 96 | } 97 | ?> 98 | 99 |
100 |
101 |
102 |

Upload Logo Voucher

103 |
104 |
105 | 106 |
107 |
108 | 109 |
110 |
111 | 112 | 113 |
114 |
115 | 116 |
117 |
118 |
119 |
120 |
121 | 125 |
126 |
127 | -------------------------------------------------------------------------------- /include/adduser.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | session_start(); 19 | // hide all error 20 | error_reporting(0); 21 | 22 | 23 | if(!isset($_SESSION["$userhost"])){ 24 | echo " 78 |
79 |
80 |
81 |
82 | 83 | 84 | 93 | 94 | 95 | 96 | 106 | 107 | 108 | 109 | 110 | 111 | 119 | 120 | 121 | 130 | 131 | 132 | 133 | 134 | 135 | 148 | 149 | 150 | 151 | 152 | 153 | 166 | 167 |
85 | Close"; 87 | }else{ 88 | echo " Close"; 89 | } 90 | ?> 91 | 92 |
Server 97 | 105 |
Name
Password 112 |
113 | 114 |
115 | 116 |
117 |
118 |
Profile 122 | 129 |
Time Limit
Data Limit 136 |
137 | 138 |
139 | 140 | 144 | 145 |
146 |
147 |
Comment
154 | 155 |

156 | Format Time Limit.
157 | [wdhm] Contoh : 30d = 30hari, 12h = 12jam, 4w3d = 31hari. 158 |

159 | 160 |

161 | Format Time Limit.
162 | [wdhm] Example : 30d = 30days, 12h = 12hours, 4w3d = 31days. 163 |

164 | 165 |
168 |
169 |
170 |
171 | 172 |
173 | 174 |
175 | 176 | 177 | 178 | 179 | -------------------------------------------------------------------------------- /js/mikhmon.js: -------------------------------------------------------------------------------- 1 | //enable disable input on change 2 | function RequiredV(){ 3 | var exp = document.getElementById('expmode').value; 4 | var val = document.getElementById('validity').style; 5 | var grp = document.getElementById('graceperiod').style; 6 | var vali = document.getElementById('validi'); 7 | var grpi = document.getElementById('gracepi'); 8 | if (exp === 'rem' || exp === 'remc') { 9 | val.display= 'table-row'; 10 | vali.type = 'text'; 11 | if (vali.value === "") { 12 | vali.value = ""; 13 | } 14 | $("#validi").focus(); 15 | grp.display = 'table-row'; 16 | grpi.type = 'text'; 17 | if (grpi.value === "") { 18 | grpi.value = "5m"; 19 | } 20 | } else if (exp === 'ntf' || exp === 'ntfc') { 21 | val.display= 'table-row'; 22 | vali.type = 'text'; 23 | if (vali.value === "") { 24 | vali.value = ""; 25 | } 26 | $("#validi").focus(); 27 | grp.display = 'none'; 28 | grpi.type = 'hidden'; 29 | } else { 30 | val.display = 'none'; 31 | grp.display = 'none'; 32 | vali.type = 'hidden'; 33 | grpi.type = 'hidden'; 34 | } 35 | } 36 | 37 | //enable disable input on ready 38 | $(document).ready(function(){ 39 | var exp = document.getElementById('expmode').value; 40 | var val = document.getElementById('validity').style; 41 | var grp = document.getElementById('graceperiod').style; 42 | var vali = document.getElementById('validi'); 43 | var grpi = document.getElementById('gracepi'); 44 | if (exp === 'rem' || exp === 'remc') { 45 | val.display= 'table-row'; 46 | vali.type = 'text'; 47 | $("#validi").focus(); 48 | grp.display = 'table-row'; 49 | grpi.type = 'text'; 50 | } else if (exp === 'ntf' || exp === 'ntfc') { 51 | val.display = 'table-row'; 52 | vali.type = 'text'; 53 | $("#validi").focus(); 54 | grp.display = 'none'; 55 | grpi.type = 'hidden'; 56 | } else { 57 | val.display = 'none'; 58 | grp.display = 'none'; 59 | vali.type = 'hidden'; 60 | grpi.type = 'hidden'; 61 | } 62 | }); 63 | 64 | // default user length 65 | function defUserl(){ 66 | var usr = document.getElementById('user').value; 67 | var num = document.getElementById('num').style; 68 | var lower = document.getElementById('lower').style; 69 | var upper = document.getElementById('upper').style; 70 | var upplow = document.getElementById('upplow').style; 71 | var lower1 = document.getElementById('lower1').style; 72 | var upper1 = document.getElementById('upper1').style; 73 | var upplow1 = document.getElementById('upplow1').style; 74 | var mix = document.getElementById('mix').style; 75 | var mix1 = document.getElementById('mix1').style; 76 | var mix2 = document.getElementById('mix2').style; 77 | if(usr === 'up'){ 78 | $('select[name=userl] option:first').html('4'); 79 | $('select[name=char] option:first').html('abcd'); 80 | lower.display = 'block'; 81 | upper.display = 'block'; 82 | upplow.display = 'block'; 83 | lower1.display = 'none'; 84 | upper1.display = 'none'; 85 | upplow1.display = 'none'; 86 | num.display = 'none'; 87 | mix.display = 'block'; 88 | mix1.display = 'block'; 89 | mix2.display = 'block'; 90 | }else if(usr === 'vc'){ 91 | $('select[name=userl] option:first').html('8'); 92 | $('select[name=char] option:first').html('abcd1234'); 93 | lower.display = 'none'; 94 | upper.display = 'none'; 95 | upplow.display = 'none'; 96 | lower1.display = 'block'; 97 | upper1.display = 'block'; 98 | upplow1.display = 'block'; 99 | num.display = 'block'; 100 | mix.display = 'block'; 101 | mix1.display = 'block'; 102 | mix2.display = 'block'; 103 | }} 104 | 105 | // get valid $ price 106 | function GetVP(){ 107 | var prof = document.getElementById('uprof').value; 108 | var url = "./process/getvalidprice.php?name="; 109 | var getvalidprice = url+prof 110 | $("#GetValidPrice").load(getvalidprice); 111 | } 112 | 113 | 114 | //table filter 115 | function fTable() { 116 | var input, filter, table, tr, td, i; 117 | input = document.getElementById("filterTable"); 118 | filter = input.value.toUpperCase(); 119 | table = document.getElementById("tFilter"); 120 | tr = table.getElementsByTagName("tr"); 121 | for (i = 1; i < tr.length; i++) { 122 | td = tr[i].getElementsByTagName("td")[1]; 123 | if (td) { 124 | if (td.innerHTML.toUpperCase().indexOf(filter) > -1) { 125 | tr[i].style.display = ""; 126 | } else { 127 | tr[i].style.display = "none"; 128 | } 129 | } 130 | } 131 | } 132 | 133 | function fTable1() { 134 | var input, filter, table, tr, td, i; 135 | input = document.getElementById("filterTable1"); 136 | filter = input.value.toUpperCase(); 137 | table = document.getElementById("tFilter"); 138 | tr = table.getElementsByTagName("tr"); 139 | for (i = 1; i < tr.length; i++) { 140 | td = tr[i].getElementsByTagName("td")[2]; 141 | if (td) { 142 | if (td.innerHTML.toUpperCase().indexOf(filter) > -1) { 143 | tr[i].style.display = ""; 144 | } else { 145 | tr[i].style.display = "none"; 146 | } 147 | } 148 | } 149 | } 150 | 151 | function fTable2() { 152 | var input, filter, table, tr, td, i; 153 | input = document.getElementById("filterTable2"); 154 | filter = input.value.toUpperCase(); 155 | table = document.getElementById("tFilter"); 156 | tr = table.getElementsByTagName("tr"); 157 | for (i = 1; i < tr.length; i++) { 158 | td = tr[i].getElementsByTagName("td")[7]; 159 | if (td) { 160 | if (td.innerHTML.toUpperCase().indexOf(filter) > -1) { 161 | tr[i].style.display = ""; 162 | } else { 163 | tr[i].style.display = "none"; 164 | } 165 | } 166 | } 167 | } 168 | 169 | function fTable3() { 170 | var input, filter, table, tr, td, i; 171 | input = document.getElementById("filterTable3"); 172 | filter = input.value.toUpperCase(); 173 | table = document.getElementById("tFilter"); 174 | tr = table.getElementsByTagName("tr"); 175 | for (i = 1; i < tr.length; i++) { 176 | td = tr[i].getElementsByTagName("td")[5]; 177 | if (td) { 178 | if (td.innerHTML.toUpperCase().indexOf(filter) > -1) { 179 | tr[i].style.display = ""; 180 | } else { 181 | tr[i].style.display = "none"; 182 | } 183 | } 184 | } 185 | } 186 | 187 | document.getElementById("comment").onkeypress = function(e) { 188 | var chr = String.fromCharCode(e.which); 189 | if (">= 0) 190 | return false; 191 | }; -------------------------------------------------------------------------------- /status/index.php: -------------------------------------------------------------------------------- 1 | debug = false; 8 | if($curency == "Rp" || $curency == "rp" || $curency == "IDR" || $curency == "idr"){ 9 | $title = "Status Voucher"; 10 | $title1 = "User/Kode Voucher"; 11 | $title2 = "Paket"; 12 | $title3 = "Lama Terhubung"; 13 | $title4 = "Pemakaian Data"; 14 | $title5 = "Sisa Data"; 15 | $title6 = "Masa Aktif"; 16 | $title7 = "Dari"; 17 | $title8 = "Sampai"; 18 | $title9 = "tidak terdaftar."; 19 | $title10 = "sudah kadaluarsa."; 20 | $title11 = "Tanggal"; 21 | $title12 = "Cek Status"; 22 | $title13 = " Hari"; 23 | $title14 = " Jam"; 24 | $title15 = "Aktif"; 25 | $title16 = "Expired"; 26 | }else{ 27 | $title = "Voucher Status"; 28 | $title1 = "User/Voucher Code"; 29 | $title2 = "Profile"; 30 | $title3 = "Uptime"; 31 | $title4 = "Data Usage"; 32 | $title5 = "Data Remaining"; 33 | $title6 = "Validity"; 34 | $title7 = "Start"; 35 | $title8 = "End"; 36 | $title9 = "not registered."; 37 | $title10 = "expired."; 38 | $title11 = "Date"; 39 | $title12 = "Check Status"; 40 | $title13 = " Day"; 41 | $title14 = " Hour"; 42 | $title15 = "Active"; 43 | $title16 = "Expired"; 44 | } 45 | if($curency == "Rp" || $curency == "rp" || $curency == "IDR" || $curency == "idr"){ 46 | $s = ""; 47 | }else{$s = "s";} 48 | ?> 49 | 50 | 51 | 52 | <?php echo $title." ".$hotspotname;?> 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 65 | 73 | 74 | 75 | 76 |
77 |

Status Voucher

78 |

";?>

79 |
80 |
81 |
82 |
83 |
84 |
85 | 86 |
87 | 88 |
89 |
90 |
91 |
92 |
93 |
94 | connect( $iphost, $userhost, decrypt($passwdhost))) { 98 | $getuser = $API->comm("/ip/hotspot/user/print", array("?name"=> "$name")); 99 | $user = $getuser[0]['name']; 100 | $profile = $getuser[0]['profile']; 101 | $uptime = formatDTM($getuser[0]['uptime']); 102 | $getbytein = $getuser[0]['bytes-in']; 103 | $getbyteo = $getuser[0]['bytes-out']; 104 | $getbytetot = ($getbytein + $getbyteo); 105 | $bytetot = formatBytes2($getbyteo, 2); 106 | $limitup = $getuser[0]['limit-uptime']; 107 | $limitbyte = $getuser[0]['limit-bytes-total']; 108 | if($limitbyte == ""){$dataleft = "Unlimited";}else{$dataleft = formatBytes2($limitbyte-$getbytetot,2);} 109 | 110 | $getprofile = $API->comm("/ip/hotspot/user/profile/print", array("?name"=> "$profile",)); 111 | $ponlogin = $getprofile[0]['on-login']; 112 | $getvalid = explode(",",$ponlogin)[3]; 113 | $unit = substr($getvalid,-1); 114 | if($unit == "d"){$getvalid = substr($getvalid,0, strlen($getvalid)-1)." ".$title13;} 115 | elseif($unit == "h"){$getvalid = substr($getvalid,0, strlen($getvalid)-1)." ".$title14;} 116 | 117 | $API->write('/system/scheduler/print', false); 118 | $API->write('?=name='.$name.''); 119 | $ARRAY1 = $API->read(); 120 | $regtable = $ARRAY1[0]; 121 | $exp = $regtable['next-run']; 122 | $strd = $regtable['start-date']; 123 | $strt = $regtable['start-time']; 124 | } 125 | if($user == "" || $exp == ""){ 126 | echo "

User $name $title9

"; 127 | }elseif($limitup == "1s" || $uptime == $limitup || $getbyteo == $limitbyte){ 128 | echo "

User $name $title10

"; 129 | } 130 | if($user == "" || $exp == ""){}else{ 131 | ?> 132 |
133 |
134 |
135 |

136 | 137 | User Details 138 |

139 |
140 | "; 142 | echo ""; 143 | echo " "; 144 | echo " "; 145 | echo " "; 146 | echo " "; 147 | echo " "; 148 | echo " "; 149 | echo " "; 150 | echo " "; 151 | echo " "; 152 | echo " "; 153 | echo " "; 154 | echo " "; 155 | echo " "; 156 | echo " "; 157 | echo " "; 158 | echo " "; 159 | if($limitup == "1s" || $uptime == $limitup || $getbyteo == $limitbyte){ 160 | echo " "; 161 | echo " "; 162 | echo " "; 163 | echo " "; 164 | echo "
$title1 $user
$title2 $profile
$title3 $uptime
$title4 $byteo
Status$title16
"; 165 | echo "
"; 166 | }else{ 167 | echo "
$title5 $dataleft
$title6$cekall
$title7$strd $strt
$title8$exp
Status$title15
"; 188 | echo ""; 189 | } 190 | } 191 | $API->disconnect(); 192 | 193 | } 194 | 195 | ?> 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | -------------------------------------------------------------------------------- /js/adminlte.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * AdminLTE v3.0.0-alpha (https://adminlte.io) 3 | * Copyright 2014-2018 Abdullah Almsaeed 4 | * Licensed under MIT (https://github.com/almasaeed2010/AdminLTE/blob/master/LICENSE) 5 | */ 6 | !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.adminlte={})}(this,function(e){"use strict";var i,t,o,n,r,a,s,c,f,l,u,d,h,p,_,g,y,m,v,C,D,E,A,O,w,b,L,S,j,T,I,Q,R,P,x,B,M,k,H,N,Y,U,V,G,W,X,z,F,q,J,K,Z,$,ee,te,ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ie=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},oe=(i=jQuery,t="ControlSidebar",o="lte.control.sidebar",n=i.fn[t],r=".control-sidebar",a='[data-widget="control-sidebar"]',s=".main-header",c="control-sidebar-open",f="control-sidebar-slide-open",l={slide:!0},u=function(){function n(e,t){ie(this,n),this._element=e,this._config=this._getConfig(t)}return n.prototype.show=function(){this._config.slide?i("body").removeClass(f):i("body").removeClass(c)},n.prototype.collapse=function(){this._config.slide?i("body").addClass(f):i("body").addClass(c)},n.prototype.toggle=function(){this._setMargin(),i("body").hasClass(c)||i("body").hasClass(f)?this.show():this.collapse()},n.prototype._getConfig=function(e){return i.extend({},l,e)},n.prototype._setMargin=function(){i(r).css({top:i(s).outerHeight()})},n._jQueryInterface=function(t){return this.each(function(){var e=i(this).data(o);if(e||(e=new n(this,i(this).data()),i(this).data(o,e)),"undefined"===e[t])throw new Error(t+" is not a function");e[t]()})},n}(),i(document).on("click",a,function(e){e.preventDefault(),u._jQueryInterface.call(i(this),"toggle")}),i.fn[t]=u._jQueryInterface,i.fn[t].Constructor=u,i.fn[t].noConflict=function(){return i.fn[t]=n,u._jQueryInterface},u),re=(d=jQuery,h="Layout",p="lte.layout",_=d.fn[h],g=".main-sidebar",y=".main-header",m=".content-wrapper",v=".main-footer",C="hold-transition",D=function(){function n(e){ie(this,n),this._element=e,this._init()}return n.prototype.fixLayoutHeight=function(){var e={window:d(window).height(),header:d(y).outerHeight(),footer:d(v).outerHeight(),sidebar:d(g).height()},t=this._max(e);d(m).css("min-height",t-e.header),d(g).css("min-height",t-e.header)},n.prototype._init=function(){var e=this;d("body").removeClass(C),this.fixLayoutHeight(),d(g).on("collapsed.lte.treeview expanded.lte.treeview collapsed.lte.pushmenu expanded.lte.pushmenu",function(){e.fixLayoutHeight()}),d(window).resize(function(){e.fixLayoutHeight()}),d("body, html").css("height","auto")},n.prototype._max=function(t){var n=0;return Object.keys(t).forEach(function(e){t[e]>n&&(n=t[e])}),n},n._jQueryInterface=function(t){return this.each(function(){var e=d(this).data(p);e||(e=new n(this),d(this).data(p,e)),t&&e[t]()})},n}(),d(window).on("load",function(){D._jQueryInterface.call(d("body"))}),d.fn[h]=D._jQueryInterface,d.fn[h].Constructor=D,d.fn[h].noConflict=function(){return d.fn[h]=_,D._jQueryInterface},D),ae=(E=jQuery,A="PushMenu",w="."+(O="lte.pushmenu"),b=E.fn[A],L={COLLAPSED:"collapsed"+w,SHOWN:"shown"+w},S={screenCollapseSize:768},j={TOGGLE_BUTTON:'[data-widget="pushmenu"]',SIDEBAR_MINI:".sidebar-mini",SIDEBAR_COLLAPSED:".sidebar-collapse",BODY:"body",OVERLAY:"#sidebar-overlay",WRAPPER:".wrapper"},T="sidebar-collapse",I="sidebar-open",Q=function(){function n(e,t){ie(this,n),this._element=e,this._options=E.extend({},S,t),E(j.OVERLAY).length||this._addOverlay()}return n.prototype.show=function(){E(j.BODY).addClass(I).removeClass(T);var e=E.Event(L.SHOWN);E(this._element).trigger(e)},n.prototype.collapse=function(){E(j.BODY).removeClass(I).addClass(T);var e=E.Event(L.COLLAPSED);E(this._element).trigger(e)},n.prototype.toggle=function(){(E(window).width()>=this._options.screenCollapseSize?!E(j.BODY).hasClass(T):E(j.BODY).hasClass(I))?this.collapse():this.show()},n.prototype._addOverlay=function(){var e=this,t=E("
",{id:"sidebar-overlay"});t.on("click",function(){e.collapse()}),E(j.WRAPPER).append(t)},n._jQueryInterface=function(t){return this.each(function(){var e=E(this).data(O);e||(e=new n(this),E(this).data(O,e)),t&&e[t]()})},n}(),E(document).on("click",j.TOGGLE_BUTTON,function(e){e.preventDefault();var t=e.currentTarget;"pushmenu"!==E(t).data("widget")&&(t=E(t).closest(j.TOGGLE_BUTTON)),Q._jQueryInterface.call(E(t),"toggle")}),E.fn[A]=Q._jQueryInterface,E.fn[A].Constructor=Q,E.fn[A].noConflict=function(){return E.fn[A]=b,Q._jQueryInterface},Q),se=(R=jQuery,P="Treeview",B="."+(x="lte.treeview"),M=R.fn[P],k={SELECTED:"selected"+B,EXPANDED:"expanded"+B,COLLAPSED:"collapsed"+B,LOAD_DATA_API:"load"+B},H=".nav-item",N=".nav-treeview",Y=".menu-open",V="menu-open",G={trigger:(U='[data-widget="treeview"]')+" "+".nav-link",animationSpeed:300,accordion:!0},W=function(){function i(e,t){ie(this,i),this._config=t,this._element=e}return i.prototype.init=function(){this._setupListeners()},i.prototype.expand=function(e,t){var n=this,i=R.Event(k.EXPANDED);if(this._config.accordion){var o=t.siblings(Y).first(),r=o.find(N).first();this.collapse(r,o)}e.slideDown(this._config.animationSpeed,function(){t.addClass(V),R(n._element).trigger(i)})},i.prototype.collapse=function(e,t){var n=this,i=R.Event(k.COLLAPSED);e.slideUp(this._config.animationSpeed,function(){t.removeClass(V),R(n._element).trigger(i),e.find(Y+" > "+N).slideUp(),e.find(Y).removeClass(V)})},i.prototype.toggle=function(e){var t=R(e.currentTarget),n=t.next();if(n.is(N)){e.preventDefault();var i=t.parents(H).first();i.hasClass(V)?this.collapse(R(n),i):this.expand(R(n),i)}},i.prototype._setupListeners=function(){var t=this;R(document).on("click",this._config.trigger,function(e){t.toggle(e)})},i._jQueryInterface=function(n){return this.each(function(){var e=R(this).data(x),t=R.extend({},G,R(this).data());e||(e=new i(R(this),t),R(this).data(x,e)),"init"===n&&e[n]()})},i}(),R(window).on(k.LOAD_DATA_API,function(){R(U).each(function(){W._jQueryInterface.call(R(this),"init")})}),R.fn[P]=W._jQueryInterface,R.fn[P].Constructor=W,R.fn[P].noConflict=function(){return R.fn[P]=M,W._jQueryInterface},W),ce=(X=jQuery,z="Widget",q="."+(F="lte.widget"),J=X.fn[z],K={EXPANDED:"expanded"+q,COLLAPSED:"collapsed"+q,REMOVED:"removed"+q},$="collapsed-card",ee={animationSpeed:"normal",collapseTrigger:(Z={DATA_REMOVE:'[data-widget="remove"]',DATA_COLLAPSE:'[data-widget="collapse"]',CARD:".card",CARD_HEADER:".card-header",CARD_BODY:".card-body",CARD_FOOTER:".card-footer",COLLAPSED:".collapsed-card"}).DATA_COLLAPSE,removeTrigger:Z.DATA_REMOVE},te=function(){function n(e,t){ie(this,n),this._element=e,this._parent=e.parents(Z.CARD).first(),this._settings=X.extend({},ee,t)}return n.prototype.collapse=function(){var e=this;this._parent.children(Z.CARD_BODY+", "+Z.CARD_FOOTER).slideUp(this._settings.animationSpeed,function(){e._parent.addClass($)});var t=X.Event(K.COLLAPSED);this._element.trigger(t,this._parent)},n.prototype.expand=function(){var e=this;this._parent.children(Z.CARD_BODY+", "+Z.CARD_FOOTER).slideDown(this._settings.animationSpeed,function(){e._parent.removeClass($)});var t=X.Event(K.EXPANDED);this._element.trigger(t,this._parent)},n.prototype.remove=function(){this._parent.slideUp();var e=X.Event(K.REMOVED);this._element.trigger(e,this._parent)},n.prototype.toggle=function(){this._parent.hasClass($)?this.expand():this.collapse()},n.prototype._init=function(e){var t=this;this._parent=e,X(this).find(this._settings.collapseTrigger).click(function(){t.toggle()}),X(this).find(this._settings.removeTrigger).click(function(){t.remove()})},n._jQueryInterface=function(t){return this.each(function(){var e=X(this).data(F);e||(e=new n(X(this),e),X(this).data(F,"string"==typeof t?e:t)),"string"==typeof t&&t.match(/remove|toggle/)?e[t]():"object"===("undefined"==typeof t?"undefined":ne(t))&&e._init(X(this))})},n}(),X(document).on("click",Z.DATA_COLLAPSE,function(e){e&&e.preventDefault(),te._jQueryInterface.call(X(this),"toggle")}),X(document).on("click",Z.DATA_REMOVE,function(e){e&&e.preventDefault(),te._jQueryInterface.call(X(this),"remove")}),X.fn[z]=te._jQueryInterface,X.fn[z].Constructor=te,X.fn[z].noConflict=function(){return X.fn[z]=J,te._jQueryInterface},te);e.ControlSidebar=oe,e.Layout=re,e.PushMenu=ae,e.Treeview=se,e.Widget=ce,Object.defineProperty(e,"__esModule",{value:!0})}); 7 | //# sourceMappingURL=adminlte.min.js.map -------------------------------------------------------------------------------- /include/users.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | 19 | // hide all error 20 | error_reporting(0); 21 | ini_set('max_execution_time', 300); 22 | 23 | 24 | if($prof == "all"){ 25 | $getuser = $API->comm("/ip/hotspot/user/print"); 26 | $TotalReg = count($getuser); 27 | 28 | $counttuser = $API->comm("/ip/hotspot/user/print", array( 29 | "count-only" => "")); 30 | }elseif($prof != "all"){ 31 | $getuser = $API->comm("/ip/hotspot/user/print", array( 32 | "?profile" => "$prof", 33 | )); 34 | $TotalReg = count($getuser); 35 | 36 | $counttuser = $API->comm("/ip/hotspot/user/print", array( 37 | "count-only" => "", 38 | "?profile" => "$prof", 39 | )); 40 | 41 | } 42 | if($comm != ""){ 43 | $getuser = $API->comm("/ip/hotspot/user/print", array( 44 | "?comment" => "$comm", 45 | //"?uptime" => "00:00:00" 46 | )); 47 | $TotalReg = count($getuser); 48 | 49 | $counttuser = $API->comm("/ip/hotspot/user/print", array( 50 | "count-only" => "", 51 | "?comment" => "$comm", 52 | )); 53 | if($counttuser == 0){echo "";} 54 | } 55 | $getprofile = $API->comm("/ip/hotspot/user/profile/print"); 56 | $TotalReg2 = count($getprofile); 57 | 58 | ?> 59 |
60 |
61 |
62 |
63 |
64 |

65 | 1){echo "$counttuser items "; 68 | } 69 | if($counttuser == 0 ){echo "";} 70 | if($comm != ""){ 71 | echo ' Show All Remove All'; 72 | } 73 | ?> 74 |

75 |
76 | 77 |
78 |
79 |
80 | 81 |
82 | 83 | 84 | 85 | 86 | 91 | 96 | 111 | 116 | 119 | 124 | 125 | 126 | 127 | 128 | "; 147 | echo "";}else{ $tcolor = "#000";echo "";} 149 | echo ""; 150 | if($uname == $upass){$usermode = "vc";}else{$usermode = "up";} 151 | $popup = "javascript:window.open('./voucher/print.php?user=".$usermode."-".$uname."&qr=no','_blank','width=310,height=450').print();"; 152 | echo "'; 153 | echo ""; 154 | echo ""; 155 | echo ""; 156 | echo ""; 157 | echo ""; 160 | } 161 | echo ""; 163 | } 164 | echo ""; 166 | } 167 | echo ""; 168 | } 169 | ?> 170 | 171 |
87 |
88 | 89 |
90 |
92 |
93 | 94 |
95 |
97 | 110 | 112 |
113 | 114 |
115 |
117 | Bytes Out 118 | 120 |
121 | 122 |
123 |
Print
      "; 148 | if($udisabled == "true"){ $tcolor = "#ccc"; echo "" . $userver;echo " ". $uname." ";echo '" . $uprofile;echo "" . $uuptime;echo "" . $ubyteso;echo ""; if($uname == "default-trial"){}else{echo "".$ucomment."";}; echo $utimelimit.' '.$udatalimit.""; 158 | 159 | if(substr($ucomment,0,2) == "vc" || substr($ucomment,0,2) == "up"){echo "Default";echo ""; 162 | if(substr($ucomment,0,2) == "vc" || substr($ucomment,0,2) == "up"){echo " QR";echo ""; 165 | if(substr($ucomment,0,2) == "vc" || substr($ucomment,0,2) == "up"){echo " Small";echo "
172 |
173 |
174 |
175 |
176 | 177 |
178 | 179 |
180 | 181 |
182 |
183 | 184 | 185 | 186 | -------------------------------------------------------------------------------- /include/userlog.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | session_start(); 19 | // hide all error 20 | error_reporting(0); 21 | 22 | if(!isset($_SESSION["$userhost"])){ 23 | echo ""; 24 | }else{ 25 | 26 | $idhr = $_GET['idhr']; 27 | $idbl = $_GET['idbl']; 28 | $remdata = ($_POST['remdata']); 29 | 30 | if(isset($remdata)){ 31 | if(strlen($idhr) > "0"){ 32 | if ($API->connect( $iphost, $userhost, decrypt($passwdhost))) { 33 | $API->write('/system/script/print', false); 34 | $API->write('?source='.$idhr.'', false); 35 | $API->write('=.proplist=.id'); 36 | $ARREMD = $API->read(); 37 | for ($i=0;$iwrite('/system/script/remove', false); 39 | $API->write('=.id=' . $ARREMD[$i]['.id']); 40 | $READ = $API->read(); 41 | 42 | } 43 | } 44 | }elseif(strlen($idbl) > "0"){ 45 | if ($API->connect( $iphost, $userhost, decrypt($passwdhost))) { 46 | $API->write('/system/script/print', false); 47 | $API->write('?owner='.$idbl.'', false); 48 | $API->write('=.proplist=.id'); 49 | $ARREMD = $API->read(); 50 | for ($i=0;$iwrite('/system/script/remove', false); 52 | $API->write('=.id=' . $ARREMD[$i]['.id']); 53 | $READ = $API->read(); 54 | 55 | } 56 | } 57 | 58 | } 59 | echo ""; 60 | } 61 | 62 | } 63 | 64 | 65 | if(strlen($idhr) > "0"){ 66 | if ($API->connect( $iphost, $userhost, decrypt($passwdhost))) { 67 | $API->write('/system/script/print', false); 68 | $API->write('?=source='.$idhr.''); 69 | $ARRAY = $API->read(); 70 | $API->disconnect(); 71 | } 72 | $filedownload = $idhr; 73 | $shf = "hidden"; 74 | $shd = "text"; 75 | }elseif(strlen($idbl) > "0"){ 76 | if ($API->connect( $iphost, $userhost, decrypt($passwdhost))) { 77 | $API->write('/system/script/print', false); 78 | $API->write('?=owner='.$idbl.''); 79 | $ARRAY = $API->read(); 80 | $API->disconnect(); 81 | } 82 | $filedownload = $idbl; 83 | $shf = "hidden"; 84 | $shd = "text"; 85 | }elseif($idhr == "" || $idbl == ""){ 86 | if ($API->connect( $iphost, $userhost, decrypt($passwdhost))) { 87 | $API->write('/system/script/print', false); 88 | $API->write('?=comment=mikhmon'); 89 | $ARRAY = $API->read(); 90 | $API->disconnect(); 91 | } 92 | $filedownload = "all"; 93 | $shf = "text"; 94 | $shd = "hidden"; 95 | } 96 | ?> 97 | 144 |
145 |
146 |
147 |
148 |
149 |

User Log

150 |
151 | 152 |
153 |
154 |
155 |
156 | 157 |   158 | 159 | 160 |
161 |
162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | "; 182 | echo ""; 191 | echo ""; 195 | echo ""; 199 | echo ""; 203 | echo ""; 207 | echo ""; 211 | echo ""; 212 | } 213 | ?> 214 |
User Log
DateTimeUsernameaddressMac AddressValidity
"; 183 | $getname = explode("-|-",$regtable['name']); 184 | $getowner = $regtable['owner']; 185 | $tgl = $getname[0]; 186 | $getdy = explode("/",$tgl); 187 | $m = $getdy[0]; 188 | $dy = $getdy[1]."/".$getdy[2]; 189 | echo "$m/$dy"; 190 | echo ""; 192 | $ltime = $getname[1]; 193 | echo $ltime; 194 | echo ""; 196 | $username = $getname[2]; 197 | echo $username; 198 | echo ""; 200 | $addr = $getname[4]; 201 | echo $addr; 202 | echo ""; 204 | $mac = $getname[5]; 205 | echo $mac; 206 | echo ""; 208 | $val = $getname[6]; 209 | echo $val; 210 | echo "
215 |
216 |
217 | 218 |
219 | 220 |
221 | 222 |
223 | 224 |
225 | 226 | 227 | 252 |
253 | 254 | 290 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | session_start(); 19 | // hide all error 20 | error_reporting(0); 21 | 22 | // load ip user pass MikroTik 23 | include('./include/config.php'); 24 | 25 | if(!isset($_SESSION["$userhost"])){ 26 | header("Location:./admin.php?id=login"); 27 | }else{ 28 | 29 | // routeros api 30 | include_once('./lib/routeros_api.class.php'); 31 | include_once('./lib/formatbytesbites.php'); 32 | $API = new RouterosAPI(); 33 | $API->debug = false; 34 | $API->connect( $iphost, $userhost, decrypt($passwdhost)); 35 | 36 | $getidentity = $API->comm("/system/identity/print"); 37 | $identity = $getidentity[0]['name']; 38 | if($identity == ""){ 39 | session_destroy(); 40 | echo ""; 41 | } 42 | // check url 43 | $url = $_SERVER['REQUEST_URI']; 44 | // get variable 45 | $hotspot = $_GET['hotspot']; 46 | $hotspotuser = $_GET['hotspot-user']; 47 | $userbyname = $_GET['hotspot-user']; 48 | $removeuseractive = $_GET['remove-user-active']; 49 | $removehost = $_GET['remove-host']; 50 | $removeipbinding = $_GET['remove-ip-binding']; 51 | $removehotspotuser = $_GET['remove-hotspot-user']; 52 | $removeuserprofile = $_GET['remove-user-profile']; 53 | $resethotspotuser = $_GET['reset-hotspot-user']; 54 | $removehotspotuserbycomment = $_GET['remove-hotspot-user-by-comment']; 55 | $enablehotspotuser = $_GET['enable-hotspot-user']; 56 | $disablehotspotuser = $_GET['disable-hotspot-user']; 57 | $enableipbinding = $_GET['enable-ip-binding']; 58 | $disableipbinding = $_GET['disable-ip-binding']; 59 | $userprofile = $_GET['user-profile']; 60 | $userprofilebyname = $_GET['user-profile']; 61 | $macbinding = $_GET['mac']; 62 | $ipbinding = $_GET['addr']; 63 | $srv = $_GET['srv']; 64 | $prof = $_GET['profile']; 65 | $comm = $_GET['comment']; 66 | 67 | } 68 | ?> 69 | 77 | 78 | Logout..."; 82 | 83 | session_destroy(); 84 | echo ""; 85 | } 86 | 87 | // redirect to home 88 | elseif(substr($url,-1) == "/" || substr($url,-9) == "index.php"){ 89 | ?> 90 | Bad request! redirect to Home......"; 113 | 114 | echo ""; 115 | } 116 | 117 | // hotspot add users 118 | elseif($hotspot == "add-user"){ 119 | $_SESSION['hua'] = ""; 120 | include_once('./include/adduser.php'); 121 | } 122 | 123 | // hotspot users 124 | elseif($hotspot == "users" && $prof == "all"){ 125 | $_SESSION['ubp'] = ""; 126 | $_SESSION['hua'] = ""; 127 | $_SESSION['ubc'] = ""; 128 | include_once('./include/users.php'); 129 | } 130 | 131 | // hotspot users filter by profile 132 | elseif($hotspot == "users" && $prof!= ""){ 133 | $_SESSION['ubp'] = $prof; 134 | $_SESSION['hua'] = ""; 135 | $_SESSION['ubc'] = ""; 136 | include_once('./include/users.php'); 137 | } 138 | 139 | // hotspot users filter by comment 140 | elseif($hotspot == "users" && $comm!= ""){ 141 | $_SESSION['ubc'] = $comm; 142 | $_SESSION['hua'] = ""; 143 | $_SESSION['ubp'] = ""; 144 | include_once('./include/users.php'); 145 | } 146 | 147 | // add hotspot user 148 | elseif($hotspotuser == "add"){ 149 | include_once('./include/adduser.php'); 150 | } 151 | 152 | // add hotspot user 153 | elseif($hotspotuser == "generate"){ 154 | include_once('./include/generateuser.php'); 155 | } 156 | 157 | // hotspot users filter by name 158 | elseif(substr($hotspotuser,0,1) == "*"){ 159 | $_SESSION['ubn'] = $hotspotuser; 160 | $_SESSION['hua'] = ""; 161 | include_once('./include/userbyname.php'); 162 | }elseif($hotspotuser != ""){ 163 | $_SESSION['ubn'] = $hotspotuser; 164 | include_once('./include/userbyname.php'); 165 | } 166 | 167 | // remove hotspot user 168 | elseif($removehotspotuser != ""){ 169 | echo " Processing..."; 170 | 171 | include_once('./process/removehotspotuser.php'); 172 | } 173 | 174 | // remove hotspot user by comment 175 | elseif($removehotspotuserbycomment != ""){ 176 | echo " Processing..."; 177 | 178 | include_once('./process/removehotspotuserbycomment.php'); 179 | } 180 | 181 | // reset hotspot user 182 | elseif($resethotspotuser != ""){ 183 | echo " Processing..."; 184 | 185 | include_once('./process/resethotspotuser.php'); 186 | } 187 | 188 | // enable hotspot user 189 | elseif($enablehotspotuser != ""){ 190 | echo " Processing..."; 191 | 192 | include_once('./process/enablehotspotuser.php'); 193 | } 194 | 195 | // disable hotspot user 196 | elseif($disablehotspotuser != ""){ 197 | echo " Processing..."; 198 | 199 | include_once('./process/disablehotspotuser.php'); 200 | } 201 | 202 | // user profile 203 | elseif($hotspot == "user-profiles"){ 204 | include_once('./include/userprofile.php'); 205 | } 206 | 207 | // add user profile 208 | elseif($userprofile == "add"){ 209 | include_once('./include/adduserprofile.php'); 210 | } 211 | 212 | // User profile by name 213 | elseif(substr($userprofile,0,1) == "*"){ 214 | include_once('./include/userprofilebyname.php'); 215 | }elseif($userprofile != ""){ 216 | include_once('./include/userprofilebyname.php'); 217 | } 218 | 219 | 220 | // remove user profile 221 | elseif($removeuserprofile != ""){ 222 | echo " Processing..."; 223 | 224 | include_once('./process/removeuserprofile.php'); 225 | } 226 | 227 | // hotspot active 228 | elseif($hotspot == "active"){ 229 | $_SESSION['ubp'] = ""; 230 | $_SESSION['hua'] = "hotspotactive"; 231 | $_SESSION['ubc'] = ""; 232 | include_once('./include/hotspotactive.php'); 233 | } 234 | 235 | // hotspot hosts 236 | elseif($hotspot == "hosts" || $hotspot == "hostp" || $hotspot == "hosta"){ 237 | include_once('./include/hosts.php'); 238 | } 239 | 240 | // hotspot bindings 241 | elseif($hotspot == "binding"){ 242 | include_once('./include/binding.php'); 243 | } 244 | 245 | // hotspot Ip Bindings 246 | elseif($hotspot == "ipbinding"){ 247 | include_once('./include/ipbinding.php'); 248 | } 249 | 250 | // enable hotspot user 251 | elseif($enableipbinding != ""){ 252 | echo " Processing..."; 253 | 254 | include_once('./process/enableipbinding.php'); 255 | } 256 | 257 | // disable hotspot user 258 | elseif($disableipbinding != ""){ 259 | echo " Processing..."; 260 | 261 | include_once('./process/disableipbinding.php'); 262 | } 263 | 264 | // remove user active 265 | elseif($removeuseractive != ""){ 266 | echo " Processing..."; 267 | 268 | include_once('./process/removeuseractive.php'); 269 | } 270 | 271 | // remove host 272 | elseif($removehost != ""){ 273 | echo " Processing..."; 274 | 275 | include_once('./process/removehost.php'); 276 | } 277 | 278 | // remove ipbinding 279 | elseif($removeipbinding != ""){ 280 | echo " Processing..."; 281 | 282 | include_once('./process/removeipbinding.php'); 283 | } 284 | 285 | // makebinding 286 | elseif($macbinding != ""){ 287 | echo " Processing..."; 288 | 289 | include_once('./process/makebinding.php'); 290 | } 291 | 292 | // selling 293 | elseif($hotspot == "selling"){ 294 | include_once('./include/selling.php'); 295 | } 296 | ?> 297 |
298 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | -------------------------------------------------------------------------------- /include/adduserprofile.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | session_start(); 19 | // hide all error 20 | error_reporting(0); 21 | 22 | 23 | if(!isset($_SESSION["$userhost"])){ 24 | echo " 84 |
85 |
86 |
87 |
88 | 89 | 90 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 133 | 134 | 135 | 168 | 169 |
91 | Close 92 | 93 |
Name
Shared Users
Rate limit [up/down]
Expired Mode 106 | 114 |
Price
Lock User 127 | 132 |
136 | 137 |

138 | Expired Mode adalah kontrol untuk user hotspot.
139 | Pilihan : Remove, Notice, Remove & Record,Notice & Record. 140 |

    141 |
  • Remove : User akan dihapus ketika sudah grace period habis.
  • 142 |
  • Notice : User tidah dihapus dan akan mendapatkan notifikasi setelah user expired.
  • 143 |
  • Record : Menyimpan data harga tiap user yang login. Untuk menghitung total penjualan user hotspot.
  • 144 |
145 |

146 |

Lock User : Username/Kode voucher hanya bisa digunakan pada 1 perangkat saja.

147 |

148 | Format Validity & Grace Period.
149 | [wdhm] Contoh : 30d = 30hari, 12h = 12jam, 4w3d = 31hari. 150 |

151 | 152 |

153 | Expired Mode is the control for the hotspot user.
154 | Options : Remove, Notice, Remove & Record, Notice & Record. 155 |

    156 |
  • Remove: User will be deleted when the grace period expires.
  • 157 |
  • Notice: User will not deleted and get notification after user expiration.
  • 158 |
  • Record: Save the price of each user login. To calculate total sales of hotspot users.
  • 159 |
160 |

161 |

Lock User : Username can only be used on 1 device only

162 |

163 | Format Validity & Grace Period.
164 | [wdhm] Example : 30d = 30days, 12h = 12hours, 4w3d = 31days. 165 |

166 | 167 |
170 |
171 |
172 |
173 | 174 |
175 | 176 | 177 | 178 | 179 | 180 | 181 | -------------------------------------------------------------------------------- /plugins/jquery/core.js: -------------------------------------------------------------------------------- 1 | /* global Symbol */ 2 | // Defining this global in .eslintrc.json would create a danger of using the global 3 | // unguarded in another place, it seems safer to define global only for this module 4 | 5 | define( [ 6 | "./var/arr", 7 | "./var/document", 8 | "./var/getProto", 9 | "./var/slice", 10 | "./var/concat", 11 | "./var/push", 12 | "./var/indexOf", 13 | "./var/class2type", 14 | "./var/toString", 15 | "./var/hasOwn", 16 | "./var/fnToString", 17 | "./var/ObjectFunctionString", 18 | "./var/support", 19 | "./var/isFunction", 20 | "./var/isWindow", 21 | "./core/DOMEval", 22 | "./core/toType" 23 | ], function( arr, document, getProto, slice, concat, push, indexOf, 24 | class2type, toString, hasOwn, fnToString, ObjectFunctionString, 25 | support, isFunction, isWindow, DOMEval, toType ) { 26 | 27 | "use strict"; 28 | 29 | var 30 | version = "3.3.1", 31 | 32 | // Define a local copy of jQuery 33 | jQuery = function( selector, context ) { 34 | 35 | // The jQuery object is actually just the init constructor 'enhanced' 36 | // Need init if jQuery is called (just allow error to be thrown if not included) 37 | return new jQuery.fn.init( selector, context ); 38 | }, 39 | 40 | // Support: Android <=4.0 only 41 | // Make sure we trim BOM and NBSP 42 | rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; 43 | 44 | jQuery.fn = jQuery.prototype = { 45 | 46 | // The current version of jQuery being used 47 | jquery: version, 48 | 49 | constructor: jQuery, 50 | 51 | // The default length of a jQuery object is 0 52 | length: 0, 53 | 54 | toArray: function() { 55 | return slice.call( this ); 56 | }, 57 | 58 | // Get the Nth element in the matched element set OR 59 | // Get the whole matched element set as a clean array 60 | get: function( num ) { 61 | 62 | // Return all the elements in a clean array 63 | if ( num == null ) { 64 | return slice.call( this ); 65 | } 66 | 67 | // Return just the one element from the set 68 | return num < 0 ? this[ num + this.length ] : this[ num ]; 69 | }, 70 | 71 | // Take an array of elements and push it onto the stack 72 | // (returning the new matched element set) 73 | pushStack: function( elems ) { 74 | 75 | // Build a new jQuery matched element set 76 | var ret = jQuery.merge( this.constructor(), elems ); 77 | 78 | // Add the old object onto the stack (as a reference) 79 | ret.prevObject = this; 80 | 81 | // Return the newly-formed element set 82 | return ret; 83 | }, 84 | 85 | // Execute a callback for every element in the matched set. 86 | each: function( callback ) { 87 | return jQuery.each( this, callback ); 88 | }, 89 | 90 | map: function( callback ) { 91 | return this.pushStack( jQuery.map( this, function( elem, i ) { 92 | return callback.call( elem, i, elem ); 93 | } ) ); 94 | }, 95 | 96 | slice: function() { 97 | return this.pushStack( slice.apply( this, arguments ) ); 98 | }, 99 | 100 | first: function() { 101 | return this.eq( 0 ); 102 | }, 103 | 104 | last: function() { 105 | return this.eq( -1 ); 106 | }, 107 | 108 | eq: function( i ) { 109 | var len = this.length, 110 | j = +i + ( i < 0 ? len : 0 ); 111 | return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); 112 | }, 113 | 114 | end: function() { 115 | return this.prevObject || this.constructor(); 116 | }, 117 | 118 | // For internal use only. 119 | // Behaves like an Array's method, not like a jQuery method. 120 | push: push, 121 | sort: arr.sort, 122 | splice: arr.splice 123 | }; 124 | 125 | jQuery.extend = jQuery.fn.extend = function() { 126 | var options, name, src, copy, copyIsArray, clone, 127 | target = arguments[ 0 ] || {}, 128 | i = 1, 129 | length = arguments.length, 130 | deep = false; 131 | 132 | // Handle a deep copy situation 133 | if ( typeof target === "boolean" ) { 134 | deep = target; 135 | 136 | // Skip the boolean and the target 137 | target = arguments[ i ] || {}; 138 | i++; 139 | } 140 | 141 | // Handle case when target is a string or something (possible in deep copy) 142 | if ( typeof target !== "object" && !isFunction( target ) ) { 143 | target = {}; 144 | } 145 | 146 | // Extend jQuery itself if only one argument is passed 147 | if ( i === length ) { 148 | target = this; 149 | i--; 150 | } 151 | 152 | for ( ; i < length; i++ ) { 153 | 154 | // Only deal with non-null/undefined values 155 | if ( ( options = arguments[ i ] ) != null ) { 156 | 157 | // Extend the base object 158 | for ( name in options ) { 159 | src = target[ name ]; 160 | copy = options[ name ]; 161 | 162 | // Prevent never-ending loop 163 | if ( target === copy ) { 164 | continue; 165 | } 166 | 167 | // Recurse if we're merging plain objects or arrays 168 | if ( deep && copy && ( jQuery.isPlainObject( copy ) || 169 | ( copyIsArray = Array.isArray( copy ) ) ) ) { 170 | 171 | if ( copyIsArray ) { 172 | copyIsArray = false; 173 | clone = src && Array.isArray( src ) ? src : []; 174 | 175 | } else { 176 | clone = src && jQuery.isPlainObject( src ) ? src : {}; 177 | } 178 | 179 | // Never move original objects, clone them 180 | target[ name ] = jQuery.extend( deep, clone, copy ); 181 | 182 | // Don't bring in undefined values 183 | } else if ( copy !== undefined ) { 184 | target[ name ] = copy; 185 | } 186 | } 187 | } 188 | } 189 | 190 | // Return the modified object 191 | return target; 192 | }; 193 | 194 | jQuery.extend( { 195 | 196 | // Unique for each copy of jQuery on the page 197 | expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), 198 | 199 | // Assume jQuery is ready without the ready module 200 | isReady: true, 201 | 202 | error: function( msg ) { 203 | throw new Error( msg ); 204 | }, 205 | 206 | noop: function() {}, 207 | 208 | isPlainObject: function( obj ) { 209 | var proto, Ctor; 210 | 211 | // Detect obvious negatives 212 | // Use toString instead of jQuery.type to catch host objects 213 | if ( !obj || toString.call( obj ) !== "[object Object]" ) { 214 | return false; 215 | } 216 | 217 | proto = getProto( obj ); 218 | 219 | // Objects with no prototype (e.g., `Object.create( null )`) are plain 220 | if ( !proto ) { 221 | return true; 222 | } 223 | 224 | // Objects with prototype are plain iff they were constructed by a global Object function 225 | Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; 226 | return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; 227 | }, 228 | 229 | isEmptyObject: function( obj ) { 230 | 231 | /* eslint-disable no-unused-vars */ 232 | // See https://github.com/eslint/eslint/issues/6125 233 | var name; 234 | 235 | for ( name in obj ) { 236 | return false; 237 | } 238 | return true; 239 | }, 240 | 241 | // Evaluates a script in a global context 242 | globalEval: function( code ) { 243 | DOMEval( code ); 244 | }, 245 | 246 | each: function( obj, callback ) { 247 | var length, i = 0; 248 | 249 | if ( isArrayLike( obj ) ) { 250 | length = obj.length; 251 | for ( ; i < length; i++ ) { 252 | if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { 253 | break; 254 | } 255 | } 256 | } else { 257 | for ( i in obj ) { 258 | if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { 259 | break; 260 | } 261 | } 262 | } 263 | 264 | return obj; 265 | }, 266 | 267 | // Support: Android <=4.0 only 268 | trim: function( text ) { 269 | return text == null ? 270 | "" : 271 | ( text + "" ).replace( rtrim, "" ); 272 | }, 273 | 274 | // results is for internal usage only 275 | makeArray: function( arr, results ) { 276 | var ret = results || []; 277 | 278 | if ( arr != null ) { 279 | if ( isArrayLike( Object( arr ) ) ) { 280 | jQuery.merge( ret, 281 | typeof arr === "string" ? 282 | [ arr ] : arr 283 | ); 284 | } else { 285 | push.call( ret, arr ); 286 | } 287 | } 288 | 289 | return ret; 290 | }, 291 | 292 | inArray: function( elem, arr, i ) { 293 | return arr == null ? -1 : indexOf.call( arr, elem, i ); 294 | }, 295 | 296 | // Support: Android <=4.0 only, PhantomJS 1 only 297 | // push.apply(_, arraylike) throws on ancient WebKit 298 | merge: function( first, second ) { 299 | var len = +second.length, 300 | j = 0, 301 | i = first.length; 302 | 303 | for ( ; j < len; j++ ) { 304 | first[ i++ ] = second[ j ]; 305 | } 306 | 307 | first.length = i; 308 | 309 | return first; 310 | }, 311 | 312 | grep: function( elems, callback, invert ) { 313 | var callbackInverse, 314 | matches = [], 315 | i = 0, 316 | length = elems.length, 317 | callbackExpect = !invert; 318 | 319 | // Go through the array, only saving the items 320 | // that pass the validator function 321 | for ( ; i < length; i++ ) { 322 | callbackInverse = !callback( elems[ i ], i ); 323 | if ( callbackInverse !== callbackExpect ) { 324 | matches.push( elems[ i ] ); 325 | } 326 | } 327 | 328 | return matches; 329 | }, 330 | 331 | // arg is for internal usage only 332 | map: function( elems, callback, arg ) { 333 | var length, value, 334 | i = 0, 335 | ret = []; 336 | 337 | // Go through the array, translating each of the items to their new values 338 | if ( isArrayLike( elems ) ) { 339 | length = elems.length; 340 | for ( ; i < length; i++ ) { 341 | value = callback( elems[ i ], i, arg ); 342 | 343 | if ( value != null ) { 344 | ret.push( value ); 345 | } 346 | } 347 | 348 | // Go through every key on the object, 349 | } else { 350 | for ( i in elems ) { 351 | value = callback( elems[ i ], i, arg ); 352 | 353 | if ( value != null ) { 354 | ret.push( value ); 355 | } 356 | } 357 | } 358 | 359 | // Flatten any nested arrays 360 | return concat.apply( [], ret ); 361 | }, 362 | 363 | // A global GUID counter for objects 364 | guid: 1, 365 | 366 | // jQuery.support is not used in Core but other projects attach their 367 | // properties to it so it needs to exist. 368 | support: support 369 | } ); 370 | 371 | if ( typeof Symbol === "function" ) { 372 | jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; 373 | } 374 | 375 | // Populate the class2type map 376 | jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), 377 | function( i, name ) { 378 | class2type[ "[object " + name + "]" ] = name.toLowerCase(); 379 | } ); 380 | 381 | function isArrayLike( obj ) { 382 | 383 | // Support: real iOS 8.2 only (not reproducible in simulator) 384 | // `in` check used to prevent JIT error (gh-2145) 385 | // hasOwn isn't used here due to false negatives 386 | // regarding Nodelist length in IE 387 | var length = !!obj && "length" in obj && obj.length, 388 | type = toType( obj ); 389 | 390 | if ( isFunction( obj ) || isWindow( obj ) ) { 391 | return false; 392 | } 393 | 394 | return type === "array" || length === 0 || 395 | typeof length === "number" && length > 0 && ( length - 1 ) in obj; 396 | } 397 | 398 | return jQuery; 399 | } ); 400 | -------------------------------------------------------------------------------- /include/selling.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | session_start(); 19 | // hide all error 20 | error_reporting(0); 21 | 22 | if(!isset($_SESSION["$userhost"])){ 23 | echo ""; 24 | }else{ 25 | 26 | 27 | $idhr = $_GET['idhr']; 28 | $idbl = $_GET['idbl']; 29 | $remdata = ($_POST['remdata']); 30 | 31 | if(isset($remdata)){ 32 | if(strlen($idhr) > "0"){ 33 | if ($API->connect( $iphost, $userhost, decrypt($passwdhost))) { 34 | $API->write('/system/script/print', false); 35 | $API->write('?source='.$idhr.'', false); 36 | $API->write('=.proplist=.id'); 37 | $ARREMD = $API->read(); 38 | for ($i=0;$iwrite('/system/script/remove', false); 40 | $API->write('=.id=' . $ARREMD[$i]['.id']); 41 | $READ = $API->read(); 42 | 43 | } 44 | } 45 | }elseif(strlen($idbl) > "0"){ 46 | if ($API->connect( $iphost, $userhost, decrypt($passwdhost))) { 47 | $API->write('/system/script/print', false); 48 | $API->write('?owner='.$idbl.'', false); 49 | $API->write('=.proplist=.id'); 50 | $ARREMD = $API->read(); 51 | for ($i=0;$iwrite('/system/script/remove', false); 53 | $API->write('=.id=' . $ARREMD[$i]['.id']); 54 | $READ = $API->read(); 55 | 56 | } 57 | } 58 | 59 | } 60 | echo ""; 61 | } 62 | 63 | } 64 | 65 | 66 | if(strlen($idhr) > "0"){ 67 | if ($API->connect( $iphost, $userhost, decrypt($passwdhost))) { 68 | $API->write('/system/script/print', false); 69 | $API->write('?=source='.$idhr.''); 70 | $ARRAY = $API->read(); 71 | $API->disconnect(); 72 | } 73 | $filedownload = $idhr; 74 | $shf = "hidden"; 75 | $shd = "submit"; 76 | }elseif(strlen($idbl) > "0"){ 77 | if ($API->connect( $iphost, $userhost, decrypt($passwdhost))) { 78 | $API->write('/system/script/print', false); 79 | $API->write('?=owner='.$idbl.''); 80 | $ARRAY = $API->read(); 81 | $API->disconnect(); 82 | } 83 | $filedownload = $idbl; 84 | $shf = "hidden"; 85 | $shd = "submit"; 86 | }elseif($idhr == "" || $idbl == ""){ 87 | if ($API->connect( $iphost, $userhost, decrypt($passwdhost))) { 88 | $API->write('/system/script/print', false); 89 | $API->write('?=comment=mikhmon'); 90 | $ARRAY = $API->read(); 91 | $API->disconnect(); 92 | } 93 | $filedownload = "all"; 94 | $shf = "text"; 95 | $shd = "hidden"; 96 | } 97 | ?> 98 | 145 |
146 |
147 |
148 |
149 |
150 |

Selling Report

151 |
152 | 153 |
154 |
155 |
156 | 157 |

158 | 159 |

    160 |
  • Filter berdasarkan hari klik pada [19/2018].
  • 161 |
  • Filter berdasarkan bulan klik pada [jan/].
  • 162 |
  • Click CSV untuk mengunduh.
  • 163 |
  • Disarankan untuk menghapus laporan penjualan setelah mengunduh laporan CSV.
  • 164 |
165 | 166 |
    167 |
  • Filter by day click on [19/2018].
  • 168 |
  • Filter by month day click on [jan/].
  • 169 |
  • Klik CSV to download.
  • 170 |
  • It is recommended to delete the sales report after download the CSV report.
  • 171 |
172 | 173 |

174 |
175 |   176 | 177 | 178 | 179 |
180 |
181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | "; 201 | echo ""; 210 | echo ""; 214 | echo ""; 218 | echo ""; 222 | echo ""; 223 | } 224 | ?> 225 |
Selling report ,Total
DateTimeUsernamePrice
"; 202 | $getname = explode("-|-",$regtable['name']); 203 | $getowner = $regtable['owner']; 204 | $tgl = $getname[0]; 205 | $getdy = explode("/",$tgl); 206 | $m = $getdy[0]; 207 | $dy = $getdy[1]."/".$getdy[2]; 208 | echo "$m/$dy"; 209 | echo ""; 211 | $ltime = $getname[1]; 212 | echo $ltime; 213 | echo ""; 215 | $username = $getname[2]; 216 | echo $username; 217 | echo ""; 219 | $price = $getname[3]; 220 | echo $price; 221 | echo "
226 |
227 |
228 | 229 |
230 | 231 |
232 | 233 |
234 | 235 |
236 | 237 | 238 | 275 |
276 | 277 | 296 | -------------------------------------------------------------------------------- /include/menu.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | session_start(); 19 | // hide all error 20 | error_reporting(0); 21 | 22 | 23 | if(!isset($_SESSION["$userhost"])){ 24 | echo " 91 | 114 | 115 | 116 | 271 | 272 |
273 | 274 |
275 |
276 |
277 |
278 |

279 |
280 |
281 | 285 |
286 |
287 |
288 |
289 | 290 | -------------------------------------------------------------------------------- /include/settings.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | 19 | // hide all error 20 | error_reporting(0); 21 | 22 | include_once('./config.php'); 23 | include_once('../lib/routeros_api.class.php'); 24 | $API = new RouterosAPI(); 25 | $API->debug = false; 26 | 27 | 28 | if(!isset($_SESSION["$userhost"])){ 29 | header("Location:./"); 30 | } 31 | 32 | $url = $_SERVER['REQUEST_URI']; 33 | if(isset($_POST['save'])){ 34 | $setupdata = ($_POST['setupdata']); 35 | $siphost = ($_POST['ipmik']); 36 | $suserhost = ($_POST['usermik']); 37 | $spasswdhost = encrypt($_POST['passmik']); 38 | $suseradm = ($_POST['useradm']); 39 | $spassadm = encrypt($_POST['passadm']); 40 | $shotspotname = ($_POST['hotspotname']); 41 | $sdnsname = ($_POST['dnsname']); 42 | $scurency = ($_POST['curency']); 43 | $reload = ($_POST['areload']); 44 | $iface = ($_POST['iface']); 45 | if($reload < 5 ){$sareload = 5;}elseif($reload >= 5){$sareload = $reload;} 46 | 47 | // Save Local 48 | if($setupdata == "local"){ 49 | $mconfig = './include/config.php'; 50 | $handleconfig = fopen($mconfig, 'w') or die('Cannot open file: '.$mconfig); 51 | 52 | $dataconfig = ''; 53 | 54 | fwrite($handleconfig, $dataconfig); 55 | 56 | $mareload = './js/autoreload.js'; 57 | $handleareload = fopen($mareload, 'w') or die('Cannot open file: '.$mareload); 58 | 59 | $dataareload = ' $(document).ready(function(){ var interval = "'.$sareload.'000"; setInterval(function() { $("#reloadHome").load("./include/home.php"); }, interval); setInterval(function() { $("#reloadHotspotActive").load("./include/hotspotactive.php"); }, interval);});'; 60 | 61 | fwrite($handleareload, $dataareload); 62 | 63 | 64 | // Export to MikroTik 65 | }elseif($setupdata == "export"){ 66 | $API->connect( $iphost, $userhost, decrypt($passwdhost)); 67 | $arrID=$API->comm("/system/script/getall", 68 | array( 69 | ".proplist"=> ".id", 70 | "?name" => "mikhmonv2", 71 | )); 72 | $API->comm("/system/script/remove", array( 73 | ".id" => $arrID[0][".id"], 74 | )); 75 | 76 | $export = "$shotspotname-|-$sdnsname-|-$scurency-|-$sareload-|-$iface"; 77 | 78 | $API->comm("/system/script/add", array( 79 | "name" => "mikhmonv2", 80 | "source" => "$export", 81 | )); 82 | 83 | 84 | //Import from MikroTik 85 | }elseif($setupdata == "import"){ 86 | $API->connect( $iphost, $userhost, decrypt($passwdhost)); 87 | $getmikhmondata = $API->comm("/system/script/print", array( 88 | "?name" => "mikhmonv2")); 89 | $import = $getmikhmondata[0]['source']; 90 | if($import == ""){}else{ 91 | $importv = explode("-|-",$import); 92 | $shotspotname = $importv[0]; 93 | $sdnsname = $importv[1]; 94 | $scurency = $importv[2]; 95 | $sareload = $importv[3]; 96 | $iface = $importv[4]; 97 | 98 | $mconfig = './include/config.php'; 99 | $handleconfig = fopen($mconfig, 'w') or die('Cannot open file: '.$mconfig); 100 | 101 | $dataconfig = ''; 102 | 103 | fwrite($handleconfig, $dataconfig); 104 | 105 | $mareload = './js/autoreload.js'; 106 | $handleareload = fopen($mareload, 'w') or die('Cannot open file: '.$mareload); 107 | 108 | $dataareload = ' $(document).ready(function(){ var interval = "'.$sareload.'000"; setInterval(function() { $("#reloadHome").load("./include/home.php"); }, interval); setInterval(function() { $("#reloadHotspotActive").load("./include/hotspotactive.php"); }, interval);});'; 109 | 110 | fwrite($handleareload, $dataareload); 111 | } 112 | } 113 | $_SESSION["connect"] = ""; 114 | include('./include/config.php'); 115 | $_SESSION["$userhost"]=$userhost; 116 | } 117 | ?> 118 | 134 | 135 | 136 |
137 |
138 |
139 |

Mikhmon Settings

140 |
141 |
142 |
143 |
144 |
145 |

MikroTik". $_SESSION["connect"]."";?>

146 |
147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 163 | 164 |
IP MikroTik
Username
Password 156 |
157 | 158 |
159 | 160 |
161 |
162 |
165 | 182 |
183 |
184 |
185 |

Admin

186 |
187 | 188 | 189 | 190 | 191 | 192 | 193 | 201 | 202 | 203 | 206 | 207 |
Username
Password 194 |
195 | 196 |
197 | 198 |
199 |
200 |
204 | Please change username and password Admin. 205 |
208 |
209 |
210 |
211 |

Mikhmon Data

212 |
213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 |
Hotspot Name
DNS Name
Curency
Auto Reload 225 |
226 | 227 |
228 | sec 229 |
230 |
231 |
Traffic Ether
Mikhmon V2.12
240 |
241 |
242 | 243 |
244 | 245 |
246 |
247 | 248 | 257 | 258 | 259 | 260 | 261 | 262 | -------------------------------------------------------------------------------- /include/userprofilebyname.php: -------------------------------------------------------------------------------- 1 | . 17 | */ 18 | session_start(); 19 | // hide all error 20 | error_reporting(0); 21 | 22 | 23 | if(!isset($_SESSION["$userhost"])){ 24 | echo " 123 |
124 |
125 |
126 |
127 | 128 | 129 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 173 | 174 | 175 | 208 | 209 |
130 | Close 131 | 132 | Remove 133 |
Name
Shared Users
Rate limit [up/down]
Expired Mode 146 | 154 |
Price
Lock User 167 | 172 |
176 | 177 |

178 | Expired Mode adalah kontrol untuk user hotspot.
179 | Pilihan : Remove, Notice, Remove & Record,Notice & Record. 180 |

    181 |
  • Remove : User akan dihapus ketika sudah grace period habis.
  • 182 |
  • Notice : User tidah dihapus dan akan mendapatkan notifikasi setelah user expired.
  • 183 |
  • Record : Menyimpan data harga tiap user yang login. Untuk menghitung total penjualan user hotspot.
  • 184 |
185 |

186 |

Lock User : Username/Kode voucher hanya bisa digunakan pada 1 perangkat saja.

187 |

188 | Format Validity & Grace Period.
189 | [wdhm] Contoh : 30d = 30hari, 12h = 12jam, 4w3d = 31hari. 190 |

191 | 192 |

193 | Expired Mode is the control for the hotspot user.
194 | Options : Remove, Notice, Remove & Record, Notice & Record. 195 |

    196 |
  • Remove: User will be deleted when the grace period expires.
  • 197 |
  • Notice: User will not deleted and get notification after user expiration.
  • 198 |
  • Record: Save the price of each user login. To calculate total sales of hotspot users.
  • 199 |
200 |

201 |

Lock User : Username can only be used on 1 device only

202 |

203 | Format Validity & Grace Period.
204 | [wdhm] Example : 30d = 30days, 12h = 12hours, 4w3d = 31days. 205 |

206 | 207 |
210 |
211 |
212 | 213 |
214 | 215 |
216 | 217 |
218 | 219 | 220 | --------------------------------------------------------------------------------