. */ session_start(); // hide all error error_reporting(0); ini_set('max_execution_time', 300); if (!isset($_SESSION["mikhmon"])) { header("Location:../admin.php?id=login"); } else { $qpid = $_GET['qpid']; $rem = $_GET['remove']; $charup = array( "lower" => "abcd", "upper" => " ABCD", "upplow" => " aBcD", "mix" => " 5ab2c34d", "mix1" => " 5AB2C34D", "mix2" => "5aB2c34D", ); $charvc = array( "lower" => " abcd2345", "upper" => " ABCD2345", "upplow" => " aBcD2345", "num" => " 1234", ); if(isset($qpid) && isset($rem)){ $API->comm("/system/script/remove", array( ".id" => "$qpid", )); echo ''; } // get quick print $getquickprint = $API->comm("/system/script/print", array("?.id" => "$qpid")); $quickprintdetails = $getquickprint[0]; $qpid = $quickprintdetails['.id']; $quickprintsource = explode("#",$quickprintdetails['source']); $package = $quickprintsource[1]; $server = $quickprintsource[2]; $usermode = $quickprintsource[3]; $userlength = $quickprintsource[4]; $prefix = $quickprintsource[5]; $char = $quickprintsource[6]; $profile = $quickprintsource[7]; $timelimit = $quickprintsource[8]; $datalimit = $quickprintsource[9]; $comment = $quickprintsource[10]; if($usermode == "up"){ $tusermode = $_user_pass; $tchar = $charup[$char]; }elseif($usermode == "vc"){ $tusermode = $_user_user; $tchar = $charvc[$char]; } if (substr(formatBytes2($datalimit, 2), -2) == "MB") { $udatalimit = $datalimit / 1048576; $xdatalimit = 1048576; $MG = "MB"; } elseif (substr(formatBytes2($datalimit, 2), -2) == "GB") { $udatalimit = $datalimit / 1073741824; $xdatalimit = 1073741824; $MG = "GB"; } else{ $udatalimit = ""; $xdatalimit = 1048576; $MG = "MB"; } // array color $color = array('1' => 'bg-blue', 'bg-indigo', 'bg-purple', 'bg-pink', 'bg-red', 'bg-yellow', 'bg-green', 'bg-teal', 'bg-cyan', 'bg-grey', 'bg-light-blue'); $srvlist = $API->comm("/ip/hotspot/print"); $getprofile = $API->comm("/ip/hotspot/user/profile/print"); if (isset($_POST['name'])) { $name = ($_POST['name']); $sname = "Quick_Print_".(preg_replace('/\s+/', '-', $_POST['name'])); $server = ($_POST['server']); $user = ($_POST['user']); $userl = ($_POST['userl']); $prefix = ($_POST['prefix']); $char = ($_POST['char']); $profile = ($_POST['profile']); $timelimit = ($_POST['timelimit']); $datalimit = ($_POST['datalimit']); $adcomment = ($_POST['adcomment']); $mbgb = ($_POST['mbgb']); if ($timelimit == "") { $timelimit = "0"; } else { $timelimit = $timelimit; } if ($datalimit == "") { $datalimit = "0"; } else { $datalimit = $datalimit * $mbgb; } if ($adcomment == "") { $adcomment = ""; } else { $adcomment = $adcomment; } $getprofile = $API->comm("/ip/hotspot/user/profile/print", array("?name" => "$profile")); $ponlogin = $getprofile[0]['on-login']; $getvalid = explode(",", $ponlogin)[3]; $getprice = explode(",", $ponlogin)[2]; $getsprice = explode(",", $ponlogin)[4]; $getlock = explode(",", $ponlogin)[6]; $source = '#'.$name.'#'.$server.'#'.$user.'#'.$userl.'#'.$prefix.'#'.$char.'#'.$profile.'#'.$timelimit.'#'.$datalimit.'#'.$adcomment.'#'.$getvalid.'#'.$getprice.'_'.$getsprice.'#'.$getlock; if (isset($qpid)){ $API->comm("/system/script/set", array( ".id" => "$qpid", "name" => "$sname", "source" => "$source", "comment" => "QuickPrintMikhmon", )); }else{ $API->comm("/system/script/add", array( "name" => "$sname", "source" => "$source", "comment" => "QuickPrintMikhmon", )); } echo ""; } } ?>
| = $_package ?> | Server | = $_user_mode ?> | = $_user_length ?> | = $_prefix ?> | = $_profile ?> | = $_time_limit ?> | = $_data_limit ?> | = $_validity ?> | = $_price ?> | = $_selling_price ?> | = $_lock_user ?> | = $_comment ?> | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|   | = $package; ?> | = $server ?> | = $usermode ?> | = $userlength ?> | = $prefix ?> | = $profile ?> | = $timelimit ?> | = formatBytes($datalimit, 2) ?> | = $validity ?> | = $price ?> | = $sprice ?> | = $userlock ?> | = $comment ?> |