13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | | Kode Voucher |
24 |
25 |
26 | |
27 |
28 |
29 |
30 |
31 |
32 | | Username |
33 | Password |
34 |
35 |
36 | |
37 | |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | |
48 |
49 |
50 |
51 |
52 |
53 | | |
54 |
55 |
56 |
57 |
58 | | Login: http:// |
59 |
60 |
61 |
62 |
63 |
64 | |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/voucher/template-thermal.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | |
7 |
8 |
9 |  |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | | Kode Voucher |
24 |
25 |
26 | |
27 |
28 |
29 |
30 |
31 |
32 | | Username |
33 | Password |
34 |
35 |
36 | |
37 | |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | |
48 |
49 |
50 |
51 |
52 |
53 | | |
54 |
55 |
56 |
57 |
58 | | Login: http:// |
59 |
60 |
61 |
62 |
63 |
64 | |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/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 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | | Kode Voucher |
21 |
22 |
23 | |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | | Username |
32 |
33 |
34 | |
35 |
36 |
37 | | Password |
38 |
39 |
40 | |
41 |
42 |
43 |
44 | | Username |
45 | Password |
46 |
47 |
48 | |
49 | |
50 |
51 |
52 |
53 |
54 | |
55 |
56 |
57 |
58 |
59 | |
60 |
61 |
62 |
63 |
64 | | |
65 |
66 |
67 |
68 |
69 | | Login: http:// |
70 |
71 |
72 |
73 |
74 |
75 | |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/voucher/template.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | | Kode Voucher |
21 |
22 |
23 | |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | | Username |
32 |
33 |
34 | |
35 |
36 |
37 | | Password |
38 |
39 |
40 | |
41 |
42 |
43 |
44 | | Username |
45 | Password |
46 |
47 |
48 | |
49 | |
50 |
51 |
52 |
53 |
54 | |
55 |
56 |
57 |
58 |
59 | |
60 |
61 |
62 |
63 |
64 | | |
65 |
66 |
67 |
68 |
69 | | Login: http:// |
70 |
71 |
72 |
73 |
74 |
75 | |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/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 |
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 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 | |
66 | Server |
67 | User |
68 | Address |
69 | Mac Address |
70 | Uptime |
71 | Bytes Out |
72 | Login By |
73 |
74 |
75 |
76 | ";
89 | echo " | ";
90 | echo "" . $server . " | ";
91 | echo " " .$user." | ";
92 | echo "" . $address . " | ";
93 | echo "" . $mac . " | ";
94 | echo "" . $uptime . " | ";
95 | echo "" . $byteso . " | ";
96 | echo "" . $loginby . " | ";
97 | echo "";
98 | }
99 | ?>
100 |
101 |
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-
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 |
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 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 | |
53 | Name |
54 | Shared Users |
55 | Rate Limit |
56 | Expired Mode |
57 | Validity |
58 | Grace Period |
59 | Price |
60 | Lock User |
61 | Total User |
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 " $pname | ";
78 | //$profiledetalis = $ARRAY[$i];echo "" . $profiledetalis['name'];echo " | ";
79 | echo "" . $psharedu;echo " | ";
80 | echo "" . $pratelimit;echo " | ";
81 |
82 | 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 " | ";
98 | echo "";
99 | // get validity
100 | $getvalid = explode(",",$ponlogin);
101 | echo $getvalid[3];
102 |
103 | echo " | ";
104 | echo "";
105 |
106 | $getgracep= explode(",",$ponlogin);
107 | echo $getgracep[4];
108 | echo " | ";
109 |
110 | 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 " | ";
125 | echo "";
126 |
127 | $getgracep= explode(",",$ponlogin);
128 | echo $getgracep[6];
129 | echo " | ";
130 | 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 " | ";
140 | echo "";
141 | }
142 | ?>
143 |
144 |
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 |
104 |
105 |
106 |
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 |
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 (">\"'-_~`@#$%^&*(){}[]|:;'.,?+=".indexOf(chr) >= 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 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
65 |
73 |
74 |
75 |
76 |
77 | Status Voucher
78 | ";?>
79 |
80 |
81 |
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 |
140 | ";
142 | echo " ";
143 | echo " ";
144 | echo " | $title1 | ";
145 | echo " $user | ";
146 | echo " ";
147 | echo " ";
148 | echo " | $title2 | ";
149 | echo " $profile | ";
150 | echo " ";
151 | echo " ";
152 | echo " | $title3 | ";
153 | echo " $uptime | ";
154 | echo " ";
155 | echo " ";
156 | echo " | $title4 | ";
157 | echo " $byteo | ";
158 | echo " ";
159 | if($limitup == "1s" || $uptime == $limitup || $getbyteo == $limitbyte){
160 | echo " ";
161 | echo " | Status | ";
162 | echo " $title16 | ";
163 | echo " ";
164 | echo " ";
165 | echo " ";
166 | }else{
167 | echo " ";
168 | echo " | $title5 | ";
169 | echo " $dataleft | ";
170 | echo " ";
171 | echo " ";
172 | echo " | $title6 | ";
173 | echo " $cekall | ";
174 | echo " ";
175 | echo " ";
176 | echo " | $title7 | ";
177 | echo " $strd $strt | ";
178 | echo " ";
179 | echo " ";
180 | echo " | $title8 | ";
181 | echo " $exp | ";
182 | echo " ";
183 | echo " ";
184 | echo " | Status | ";
185 | echo " $title15 | ";
186 | echo " ";
187 | echo " | ";
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 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 | |
86 |
87 |
88 |
89 |
90 | |
91 |
92 |
93 |
94 |
95 | |
96 |
97 |
110 | |
111 |
112 |
113 |
114 |
115 | |
116 |
117 | Bytes Out
118 | |
119 |
120 |
121 |
122 |
123 | |
124 | Print |
125 |
126 |
127 |
128 | ";
147 | echo "      ";
148 | if($udisabled == "true"){ $tcolor = "#ccc"; echo " | ";}else{ $tcolor = "#000";echo "";}
149 | echo "" . $userver;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 " ". $uname." ";echo ' | | ';
153 | echo "" . $uprofile;echo " | ";
154 | echo "" . $uuptime;echo " | ";
155 | echo "" . $ubyteso;echo " | ";
156 | echo ""; if($uname == "default-trial"){}else{echo "".$ucomment."";}; echo $utimelimit.' '.$udatalimit." | ";
157 | echo "";
158 |
159 | if(substr($ucomment,0,2) == "vc" || substr($ucomment,0,2) == "up"){echo "Default";echo " | ";
160 | }
161 | echo "";
162 | if(substr($ucomment,0,2) == "vc" || substr($ucomment,0,2) == "up"){echo " QR";echo " | ";
163 | }
164 | echo "";
165 | if(substr($ucomment,0,2) == "vc" || substr($ucomment,0,2) == "up"){echo " Small";echo " | ";
166 | }
167 | echo "";
168 | }
169 | ?>
170 |
171 |
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 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 | | User Log |
166 |
167 |
168 | | Date |
169 | Time |
170 | Username |
171 | address |
172 | Mac Address |
173 | Validity |
174 |
175 |
176 | ";
182 | echo "";
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 " | ";
191 | echo "";
192 | $ltime = $getname[1];
193 | echo $ltime;
194 | echo " | ";
195 | echo "";
196 | $username = $getname[2];
197 | echo $username;
198 | echo " | ";
199 | echo "";
200 | $addr = $getname[4];
201 | echo $addr;
202 | echo " | ";
203 | echo "";
204 | $mac = $getname[5];
205 | echo $mac;
206 | echo " | ";
207 | echo "";
208 | $val = $getname[6];
209 | echo $val;
210 | echo " | ";
211 | echo "";
212 | }
213 | ?>
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
236 |
237 |
238 | ";
241 | echo " ";
242 | echo " ";
243 | echo '';
244 | echo "";
245 | echo "";
246 |
247 | ?>
248 |
249 |
250 |
251 |
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 | |