Merge branch 'Development' into feature/radius
This commit is contained in:
commit
6c45ef730e
13
CHANGELOG.md
13
CHANGELOG.md
@ -2,6 +2,19 @@
|
|||||||
|
|
||||||
# CHANGELOG
|
# CHANGELOG
|
||||||
|
|
||||||
|
## 2023.8.30
|
||||||
|
|
||||||
|
- Upload Logo from settings
|
||||||
|
- Fix Print value
|
||||||
|
- Fix Time when editing prepaid
|
||||||
|
|
||||||
|
## 2023.8.28
|
||||||
|
|
||||||
|
- Extend expiration if buy same package
|
||||||
|
- Fix calendar
|
||||||
|
- Add recharge time
|
||||||
|
- Fix allow balance transfer
|
||||||
|
|
||||||
## 2023.8.24
|
## 2023.8.24
|
||||||
|
|
||||||
- Balance transfer between Customer
|
- Balance transfer between Customer
|
||||||
|
@ -16,11 +16,8 @@
|
|||||||
|
|
||||||
<body style='background-color: #FBFBFB;'>
|
<body style='background-color: #FBFBFB;'>
|
||||||
<div id='main-container'>
|
<div id='main-container'>
|
||||||
<div class='header'>
|
<img src="img/logo.png" class="img-responsive" alt="Logo" />
|
||||||
<div class="header-box wrapper">
|
<hr>
|
||||||
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo" /></a></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- contents area start -->
|
<!-- contents area start -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
@ -228,6 +228,7 @@ CREATE TABLE
|
|||||||
`plan_name` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
`plan_name` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||||
`price` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
`price` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||||
`recharged_on` date NOT NULL,
|
`recharged_on` date NOT NULL,
|
||||||
|
`recharged_time` time NOT NULL DEFAULT '00:00:00',
|
||||||
`expiration` date NOT NULL,
|
`expiration` date NOT NULL,
|
||||||
`time` time NOT NULL,
|
`time` time NOT NULL,
|
||||||
`method` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
`method` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||||
@ -271,6 +272,7 @@ CREATE TABLE
|
|||||||
`plan_id` int(10) NOT NULL,
|
`plan_id` int(10) NOT NULL,
|
||||||
`namebp` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
`namebp` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||||
`recharged_on` date NOT NULL,
|
`recharged_on` date NOT NULL,
|
||||||
|
`recharged_time` time NOT NULL DEFAULT '00:00:00',
|
||||||
`expiration` date NOT NULL,
|
`expiration` date NOT NULL,
|
||||||
`time` time NOT NULL,
|
`time` time NOT NULL,
|
||||||
`status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
`status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||||
|
@ -16,11 +16,8 @@
|
|||||||
|
|
||||||
<body style='background-color: #FBFBFB;'>
|
<body style='background-color: #FBFBFB;'>
|
||||||
<div id='main-container'>
|
<div id='main-container'>
|
||||||
<div class='header'>
|
<img src="img/logo.png" class="img-responsive" alt="Logo" />
|
||||||
<div class="header-box wrapper">
|
<hr>
|
||||||
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo" /></a></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
<h4> PHPNuxBill Installer </h4>
|
<h4> PHPNuxBill Installer </h4>
|
||||||
|
@ -15,11 +15,8 @@
|
|||||||
|
|
||||||
<body style='background-color: #FBFBFB;'>
|
<body style='background-color: #FBFBFB;'>
|
||||||
<div id='main-container'>
|
<div id='main-container'>
|
||||||
<div class='header'>
|
<img src="img/logo.png" class="img-responsive" alt="Logo" />
|
||||||
<div class="header-box wrapper">
|
<hr>
|
||||||
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo"/></a></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
<h4> PHPNuxBill Installer </h4>
|
<h4> PHPNuxBill Installer </h4>
|
||||||
|
@ -82,11 +82,8 @@ $wConfig = "../config.php";
|
|||||||
|
|
||||||
<body style='background-color: #FBFBFB;'>
|
<body style='background-color: #FBFBFB;'>
|
||||||
<div id='main-container'>
|
<div id='main-container'>
|
||||||
<div class='header'>
|
<img src="img/logo.png" class="img-responsive" alt="Logo" />
|
||||||
<div class="header-box wrapper">
|
<hr>
|
||||||
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo"/></a></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
<h4> PHPNuxBill Installer </h4>
|
<h4> PHPNuxBill Installer </h4>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<title>PHPNuxBill Installer</title>
|
<title>PHPNuxBill Installer</title>
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico">
|
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico">
|
||||||
@ -12,20 +13,27 @@
|
|||||||
<link type='text/css' href='css/style.css' rel='stylesheet' />
|
<link type='text/css' href='css/style.css' rel='stylesheet' />
|
||||||
<link type='text/css' href="css/bootstrap.min.css" rel="stylesheet">
|
<link type='text/css' href="css/bootstrap.min.css" rel="stylesheet">
|
||||||
</head>
|
</head>
|
||||||
|
<?php if (!file_exists('../pages')) rename('../pages_template', '../pages'); ?>
|
||||||
|
|
||||||
<body style='background-color: #FBFBFB;'>
|
<body style='background-color: #FBFBFB;'>
|
||||||
<div id='main-container'>
|
<div id='main-container'>
|
||||||
<div class='header'>
|
<img src="img/logo.png" class="img-responsive" alt="Logo" />
|
||||||
<div class="header-box wrapper">
|
<hr>
|
||||||
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo"/></a></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
<h4> PHPNuxBill Installer </h4>
|
<h4> PHPNuxBill Installer </h4>
|
||||||
<p>
|
<p>
|
||||||
<strong>Congratulations!</strong><br>
|
<strong>Congratulations!</strong><br>
|
||||||
You have just install PHPNuxBill !<br>
|
You have just install PHPNuxBill !<br><br>
|
||||||
|
<span class="text-danger">But wait!!<br>
|
||||||
|
<ol>
|
||||||
|
<li>Don't forget to rename folder <b>pages_example</b> to <b>pages</b>.<br>
|
||||||
|
if it not yet renamed</li>
|
||||||
|
<li>Activate <a href="https://github.com/hotspotbilling/phpnuxbill/wiki/Cron-Jobs" target="_blank">Cronjob</a> for Expired and Reminder.</li>
|
||||||
|
<li>Check <a href="https://github.com/hotspotbilling/phpnuxbill/wiki/How-It-Works---Cara-kerja" target="_blank">how PHPNuxbill Works</a></li>
|
||||||
|
<li><a href="https://github.com/hotspotbilling/phpnuxbill/wiki#login-page-mikrotik" target="_blank">how to link Mikrotik Login to PHPNuxBill</a></li>
|
||||||
|
<li>or use <a href="https://github.com/hotspotbilling/phpnuxbill-mikrotik-login-template" target="_blank">Mikrotik Login Template for PHPNuxBill</a></li>
|
||||||
|
</ol>
|
||||||
|
</span><br><br>
|
||||||
To Login Admin Portal:<br>
|
To Login Admin Portal:<br>
|
||||||
Use this link -
|
Use this link -
|
||||||
<?php
|
<?php
|
||||||
@ -43,4 +51,5 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="footer">Copyright © 2021 PHPNuxBill. All Rights Reserved<br /><br /></div>
|
<div class="footer">Copyright © 2021 PHPNuxBill. All Rights Reserved<br /><br /></div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
@ -16,11 +16,8 @@
|
|||||||
|
|
||||||
<body style='background-color: #FBFBFB;'>
|
<body style='background-color: #FBFBFB;'>
|
||||||
<div id='main-container'>
|
<div id='main-container'>
|
||||||
<div class='header'>
|
<img src="img/logo.png" class="img-responsive" alt="Logo" />
|
||||||
<div class="header-box wrapper">
|
<hr>
|
||||||
<div class="hd-logo"><a href="#"><img src="img/logo.png" alt="Logo" /></a></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="span12">
|
<div class="span12">
|
||||||
<h4> PHPNuxBill Updater </h4>
|
<h4> PHPNuxBill Updater </h4>
|
||||||
|
@ -33,6 +33,63 @@ class File
|
|||||||
rmdir($path);
|
rmdir($path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function resizeCropImage($source_file, $dst_dir, $max_width, $max_height, $quality = 80)
|
||||||
|
{
|
||||||
|
$imgsize = getimagesize($source_file);
|
||||||
|
$width = $imgsize[0];
|
||||||
|
$height = $imgsize[1];
|
||||||
|
$mime = $imgsize['mime'];
|
||||||
|
|
||||||
|
switch ($mime) {
|
||||||
|
case 'image/gif':
|
||||||
|
$image_create = "imagecreatefromgif";
|
||||||
|
$image = "imagegif";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'image/png':
|
||||||
|
$image_create = "imagecreatefrompng";
|
||||||
|
$image = "imagepng";
|
||||||
|
$quality = 7;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'image/jpeg':
|
||||||
|
$image_create = "imagecreatefromjpeg";
|
||||||
|
$image = "imagejpeg";
|
||||||
|
$quality = 80;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($max_width == 0) {
|
||||||
|
$max_width = $width;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($max_height == 0) {
|
||||||
|
$max_height = $height;
|
||||||
|
}
|
||||||
|
|
||||||
|
$widthRatio = $max_width / $width;
|
||||||
|
$heightRatio = $max_height / $height;
|
||||||
|
$ratio = min($widthRatio, $heightRatio);
|
||||||
|
$nwidth = (int)$width * $ratio;
|
||||||
|
$nheight = (int)$height * $ratio;
|
||||||
|
|
||||||
|
$dst_img = imagecreatetruecolor($nwidth, $nheight);
|
||||||
|
$white = imagecolorallocate($dst_img, 255, 255, 255);
|
||||||
|
imagefill($dst_img, 0, 0, $white);
|
||||||
|
$src_img = $image_create($source_file);
|
||||||
|
imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $nwidth, $nheight, $width, $height);
|
||||||
|
|
||||||
|
$image($dst_img, $dst_dir, $quality);
|
||||||
|
|
||||||
|
if ($dst_img) imagedestroy($dst_img);
|
||||||
|
if ($src_img) imagedestroy($src_img);
|
||||||
|
return file_exists($dst_dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* file path fixer
|
* file path fixer
|
||||||
|
@ -12,11 +12,14 @@ class Mikrotik
|
|||||||
|
|
||||||
public static function getClient($ip, $user, $pass)
|
public static function getClient($ip, $user, $pass)
|
||||||
{
|
{
|
||||||
|
global $ui;
|
||||||
try {
|
try {
|
||||||
$iport = explode(":", $ip);
|
$iport = explode(":", $ip);
|
||||||
return new RouterOS\Client($iport[0], $user, $pass, ($iport[1]) ? $iport[1] : null);
|
return new RouterOS\Client($iport[0], $user, $pass, ($iport[1]) ? $iport[1] : null);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
die("Unable to connect to the router.<br>" . $e->getMessage());
|
$ui->assign("error_meesage","Unable to connect to the router.<br>" . $e->getMessage());
|
||||||
|
$ui->display('router-error.tpl');
|
||||||
|
die();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -216,10 +219,10 @@ class Mikrotik
|
|||||||
|
|
||||||
public static function removePpoeUser($client, $username)
|
public static function removePpoeUser($client, $username)
|
||||||
{
|
{
|
||||||
$printRequest = new RouterOS\Request(
|
|
||||||
'/ppp secret print .proplist=name',
|
$printRequest = new RouterOS\Request('/ppp/secret/print');
|
||||||
RouterOS\Query::where('name', $username)
|
$printRequest->setArgument('.proplist', '.id');
|
||||||
);
|
$printRequest->setQuery(RouterOS\Query::where('name', $username));
|
||||||
$id = $client->sendSync($printRequest)->getProperty('.id');
|
$id = $client->sendSync($printRequest)->getProperty('.id');
|
||||||
|
|
||||||
$removeRequest = new RouterOS\Request('/ppp/secret/remove');
|
$removeRequest = new RouterOS\Request('/ppp/secret/remove');
|
||||||
|
@ -22,6 +22,7 @@ class Package
|
|||||||
global $_c, $_L, $_notifmsg;
|
global $_c, $_L, $_notifmsg;
|
||||||
$date_now = date("Y-m-d H:i:s");
|
$date_now = date("Y-m-d H:i:s");
|
||||||
$date_only = date("Y-m-d");
|
$date_only = date("Y-m-d");
|
||||||
|
$time_only = date("H:i:s");
|
||||||
$time = date("H:i:s");
|
$time = date("H:i:s");
|
||||||
|
|
||||||
if ($id_customer == '' or $router_name == '' or $plan_id == '') {
|
if ($id_customer == '' or $router_name == '' or $plan_id == '') {
|
||||||
@ -40,6 +41,7 @@ class Package
|
|||||||
$t->plan_name = $p['name_plan'];
|
$t->plan_name = $p['name_plan'];
|
||||||
$t->price = $p['price'];
|
$t->price = $p['price'];
|
||||||
$t->recharged_on = $date_only;
|
$t->recharged_on = $date_only;
|
||||||
|
$t->recharged_time = date("H:i:s");
|
||||||
$t->expiration = $date_only;
|
$t->expiration = $date_only;
|
||||||
$t->time = $time;
|
$t->time = $time;
|
||||||
$t->method = "$gateway - $channel";
|
$t->method = "$gateway - $channel";
|
||||||
@ -100,11 +102,29 @@ class Package
|
|||||||
Mikrotik::addHotspotUser($client, $p, $c);
|
Mikrotik::addHotspotUser($client, $p, $c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($b['namebp'] == $p['name_plan']) {
|
||||||
|
// if it same internet plan, expired will extend
|
||||||
|
if ($p['validity_unit'] == 'Months') {
|
||||||
|
$date_exp = date("Y-m-d", strtotime($b['expiration'] . ' +' . $p['validity'] . ' months'));
|
||||||
|
} else if ($p['validity_unit'] == 'Days') {
|
||||||
|
$date_exp = date("Y-m-d", strtotime($b['expiration'] . ' +' . $p['validity'] . ' days'));
|
||||||
|
} else if ($p['validity_unit'] == 'Hrs') {
|
||||||
|
$datetime = explode(' ', date("Y-m-d H:i:s", strtotime($b['expiration'] . ' ' . $b['time'] . ' +' . $p['validity'] . ' hours')));
|
||||||
|
$date_exp = $datetime[0];
|
||||||
|
$time = $datetime[1];
|
||||||
|
} else if ($p['validity_unit'] == 'Mins') {
|
||||||
|
$datetime = explode(' ', date("Y-m-d H:i:s", strtotime($b['expiration'] . ' ' . $b['time'] . ' +' . $p['validity'] . ' minutes')));
|
||||||
|
$date_exp = $datetime[0];
|
||||||
|
$time = $datetime[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$b->customer_id = $id_customer;
|
$b->customer_id = $id_customer;
|
||||||
$b->username = $c['username'];
|
$b->username = $c['username'];
|
||||||
$b->plan_id = $plan_id;
|
$b->plan_id = $plan_id;
|
||||||
$b->namebp = $p['name_plan'];
|
$b->namebp = $p['name_plan'];
|
||||||
$b->recharged_on = $date_only;
|
$b->recharged_on = $date_only;
|
||||||
|
$b->recharged_time = $time_only;
|
||||||
$b->expiration = $date_exp;
|
$b->expiration = $date_exp;
|
||||||
$b->time = $time;
|
$b->time = $time;
|
||||||
$b->status = "on";
|
$b->status = "on";
|
||||||
@ -120,6 +140,7 @@ class Package
|
|||||||
$t->plan_name = $p['name_plan'];
|
$t->plan_name = $p['name_plan'];
|
||||||
$t->price = $p['price'];
|
$t->price = $p['price'];
|
||||||
$t->recharged_on = $date_only;
|
$t->recharged_on = $date_only;
|
||||||
|
$t->recharged_time = $time_only;
|
||||||
$t->expiration = $date_exp;
|
$t->expiration = $date_exp;
|
||||||
$t->time = $time;
|
$t->time = $time;
|
||||||
$t->method = "$gateway - $channel";
|
$t->method = "$gateway - $channel";
|
||||||
@ -139,6 +160,7 @@ class Package
|
|||||||
$d->plan_id = $plan_id;
|
$d->plan_id = $plan_id;
|
||||||
$d->namebp = $p['name_plan'];
|
$d->namebp = $p['name_plan'];
|
||||||
$d->recharged_on = $date_only;
|
$d->recharged_on = $date_only;
|
||||||
|
$d->recharged_time = $time_only;
|
||||||
$d->expiration = $date_exp;
|
$d->expiration = $date_exp;
|
||||||
$d->time = $time;
|
$d->time = $time;
|
||||||
$d->status = "on";
|
$d->status = "on";
|
||||||
@ -154,6 +176,7 @@ class Package
|
|||||||
$t->plan_name = $p['name_plan'];
|
$t->plan_name = $p['name_plan'];
|
||||||
$t->price = $p['price'];
|
$t->price = $p['price'];
|
||||||
$t->recharged_on = $date_only;
|
$t->recharged_on = $date_only;
|
||||||
|
$t->recharged_time = $time_only;
|
||||||
$t->expiration = $date_exp;
|
$t->expiration = $date_exp;
|
||||||
$t->time = $time;
|
$t->time = $time;
|
||||||
$t->method = "$gateway - $channel";
|
$t->method = "$gateway - $channel";
|
||||||
@ -176,11 +199,30 @@ class Package
|
|||||||
Mikrotik::addPpoeUser($client, $p, $c);
|
Mikrotik::addPpoeUser($client, $p, $c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ($b['namebp'] == $p['name_plan']) {
|
||||||
|
// if it same internet plan, expired will extend
|
||||||
|
if ($p['validity_unit'] == 'Months') {
|
||||||
|
$date_exp = date("Y-m-d", strtotime($b['expiration'] . ' +' . $p['validity'] . ' months'));
|
||||||
|
} else if ($p['validity_unit'] == 'Days') {
|
||||||
|
$date_exp = date("Y-m-d", strtotime($b['expiration'] . ' +' . $p['validity'] . ' days'));
|
||||||
|
} else if ($p['validity_unit'] == 'Hrs') {
|
||||||
|
$datetime = explode(' ', date("Y-m-d H:i:s", strtotime($b['expiration'] . ' ' . $b['time'] . ' +' . $p['validity'] . ' hours')));
|
||||||
|
$date_exp = $datetime[0];
|
||||||
|
$time = $datetime[1];
|
||||||
|
} else if ($p['validity_unit'] == 'Mins') {
|
||||||
|
$datetime = explode(' ', date("Y-m-d H:i:s", strtotime($b['expiration'] . ' ' . $b['time'] . ' +' . $p['validity'] . ' minutes')));
|
||||||
|
$date_exp = $datetime[0];
|
||||||
|
$time = $datetime[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$b->customer_id = $id_customer;
|
$b->customer_id = $id_customer;
|
||||||
$b->username = $c['username'];
|
$b->username = $c['username'];
|
||||||
$b->plan_id = $plan_id;
|
$b->plan_id = $plan_id;
|
||||||
$b->namebp = $p['name_plan'];
|
$b->namebp = $p['name_plan'];
|
||||||
$b->recharged_on = $date_only;
|
$b->recharged_on = $date_only;
|
||||||
|
$b->recharged_time = $time_only;
|
||||||
$b->expiration = $date_exp;
|
$b->expiration = $date_exp;
|
||||||
$b->time = $time;
|
$b->time = $time;
|
||||||
$b->status = "on";
|
$b->status = "on";
|
||||||
@ -196,6 +238,7 @@ class Package
|
|||||||
$t->plan_name = $p['name_plan'];
|
$t->plan_name = $p['name_plan'];
|
||||||
$t->price = $p['price'];
|
$t->price = $p['price'];
|
||||||
$t->recharged_on = $date_only;
|
$t->recharged_on = $date_only;
|
||||||
|
$t->recharged_time = $time_only;
|
||||||
$t->expiration = $date_exp;
|
$t->expiration = $date_exp;
|
||||||
$t->time = $time;
|
$t->time = $time;
|
||||||
$t->method = "$gateway - $channel";
|
$t->method = "$gateway - $channel";
|
||||||
@ -206,6 +249,7 @@ class Package
|
|||||||
if (!$_c['radius_mode']) {
|
if (!$_c['radius_mode']) {
|
||||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||||
Mikrotik::removeHotspotUser($client, $c['username']);
|
Mikrotik::removeHotspotUser($client, $c['username']);
|
||||||
|
Mikrotik::removePpoeUser($client, $c['username']);
|
||||||
Mikrotik::addPpoeUser($client, $p, $c);
|
Mikrotik::addPpoeUser($client, $p, $c);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -215,6 +259,7 @@ class Package
|
|||||||
$d->plan_id = $plan_id;
|
$d->plan_id = $plan_id;
|
||||||
$d->namebp = $p['name_plan'];
|
$d->namebp = $p['name_plan'];
|
||||||
$d->recharged_on = $date_only;
|
$d->recharged_on = $date_only;
|
||||||
|
$d->recharged_time = $time_only;
|
||||||
$d->expiration = $date_exp;
|
$d->expiration = $date_exp;
|
||||||
$d->time = $time;
|
$d->time = $time;
|
||||||
$d->status = "on";
|
$d->status = "on";
|
||||||
@ -230,6 +275,7 @@ class Package
|
|||||||
$t->plan_name = $p['name_plan'];
|
$t->plan_name = $p['name_plan'];
|
||||||
$t->price = $p['price'];
|
$t->price = $p['price'];
|
||||||
$t->recharged_on = $date_only;
|
$t->recharged_on = $date_only;
|
||||||
|
$t->recharged_time = $time_only;
|
||||||
$t->expiration = $date_exp;
|
$t->expiration = $date_exp;
|
||||||
$t->time = $time;
|
$t->time = $time;
|
||||||
$t->method = "$gateway - $channel";
|
$t->method = "$gateway - $channel";
|
||||||
@ -282,11 +328,14 @@ class Package
|
|||||||
if (!$_c['radius_mode']) {
|
if (!$_c['radius_mode']) {
|
||||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||||
Mikrotik::removeHotspotUser($client, $c['username']);
|
Mikrotik::removeHotspotUser($client, $c['username']);
|
||||||
|
Mikrotik::removePpoeUser($client, $c['username']);
|
||||||
Mikrotik::addHotspotUser($client, $p, $c);
|
Mikrotik::addHotspotUser($client, $p, $c);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!$_c['radius_mode']) {
|
if (!$_c['radius_mode']) {
|
||||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||||
|
Mikrotik::removeHotspotUser($client, $c['username']);
|
||||||
|
Mikrotik::removePpoeUser($client, $c['username']);
|
||||||
Mikrotik::addHotspotUser($client, $p, $c);
|
Mikrotik::addHotspotUser($client, $p, $c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -294,12 +343,15 @@ class Package
|
|||||||
if ($b) {
|
if ($b) {
|
||||||
if (!$_c['radius_mode']) {
|
if (!$_c['radius_mode']) {
|
||||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||||
|
Mikrotik::removeHotspotUser($client, $c['username']);
|
||||||
Mikrotik::removePpoeUser($client, $c['username']);
|
Mikrotik::removePpoeUser($client, $c['username']);
|
||||||
Mikrotik::addPpoeUser($client, $p, $c);
|
Mikrotik::addPpoeUser($client, $p, $c);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!$_c['radius_mode']) {
|
if (!$_c['radius_mode']) {
|
||||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
||||||
|
Mikrotik::removeHotspotUser($client, $c['username']);
|
||||||
|
Mikrotik::removePpoeUser($client, $c['username']);
|
||||||
Mikrotik::addPpoeUser($client, $p, $c);
|
Mikrotik::addPpoeUser($client, $p, $c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ if (isset($_GET['renewal'])) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (_post('send') == 'balance') {
|
if (_post('send') == 'balance') {
|
||||||
if ($config['allow_balance_transfer'] == 'yes') {
|
if ($config['enable_balance'] == 'yes' && $config['allow_balance_transfer'] == 'yes') {
|
||||||
$target = ORM::for_table('tbl_customers')->where('username', _post('username'))->find_one();
|
$target = ORM::for_table('tbl_customers')->where('username', _post('username'))->find_one();
|
||||||
if (!$target) {
|
if (!$target) {
|
||||||
r2(U . 'home', 'd', Lang::T('Username not found'));
|
r2(U . 'home', 'd', Lang::T('Username not found'));
|
||||||
|
@ -114,7 +114,6 @@ switch ($action) {
|
|||||||
|
|
||||||
case 'print':
|
case 'print':
|
||||||
$id = _post('id');
|
$id = _post('id');
|
||||||
|
|
||||||
$d = ORM::for_table('tbl_transactions')->where('id', $id)->find_one();
|
$d = ORM::for_table('tbl_transactions')->where('id', $id)->find_one();
|
||||||
$ui->assign('d', $d);
|
$ui->assign('d', $d);
|
||||||
|
|
||||||
@ -168,6 +167,7 @@ switch ($action) {
|
|||||||
$id_plan = _post('id_plan');
|
$id_plan = _post('id_plan');
|
||||||
$recharged_on = _post('recharged_on');
|
$recharged_on = _post('recharged_on');
|
||||||
$expiration = _post('expiration');
|
$expiration = _post('expiration');
|
||||||
|
$time = _post('time');
|
||||||
|
|
||||||
$id = _post('id');
|
$id = _post('id');
|
||||||
$d = ORM::for_table('tbl_user_recharges')->find_one($id);
|
$d = ORM::for_table('tbl_user_recharges')->find_one($id);
|
||||||
@ -180,8 +180,9 @@ switch ($action) {
|
|||||||
run_hook('edit_customer_plan'); #HOOK
|
run_hook('edit_customer_plan'); #HOOK
|
||||||
$d->username = $username;
|
$d->username = $username;
|
||||||
$d->plan_id = $id_plan;
|
$d->plan_id = $id_plan;
|
||||||
$d->recharged_on = $recharged_on;
|
//$d->recharged_on = $recharged_on;
|
||||||
$d->expiration = $expiration;
|
$d->expiration = $expiration;
|
||||||
|
$d->time = $time;
|
||||||
$d->save();
|
$d->save();
|
||||||
Package::changeTo($username, $id_plan);
|
Package::changeTo($username, $id_plan);
|
||||||
_log('[' . $admin['username'] . ']: ' . 'Edit Plan for Customer ' . $d['username'] . ' to [' . $d['plan_name'] . '][' . Lang::moneyFormat($d['price']) . ']', 'Admin', $admin['id']);
|
_log('[' . $admin['username'] . ']: ' . 'Edit Plan for Customer ' . $d['username'] . ' to [' . $d['plan_name'] . '][' . Lang::moneyFormat($d['price']) . ']', 'Admin', $admin['id']);
|
||||||
@ -365,19 +366,17 @@ switch ($action) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'refill-post':
|
case 'refill-post':
|
||||||
$user = _post('id_customer');
|
|
||||||
$code = _post('code');
|
$code = _post('code');
|
||||||
|
$user = ORM::for_table('tbl_customers')->where('id', _post('id_customer'))->find_one();
|
||||||
$v1 = ORM::for_table('tbl_voucher')->where('code', $code)->where('status', 0)->find_one();
|
$v1 = ORM::for_table('tbl_voucher')->where('code', $code)->where('status', 0)->find_one();
|
||||||
|
|
||||||
run_hook('refill_customer'); #HOOK
|
run_hook('refill_customer'); #HOOK
|
||||||
if ($v1) {
|
if ($v1) {
|
||||||
if (Package::rechargeUser($user, $v1['routers'], $v1['id_plan'], "Refill", "Voucher")) {
|
if (Package::rechargeUser($user['id'], $v1['routers'], $v1['id_plan'], "Refill", "Voucher")) {
|
||||||
$v1->status = "1";
|
$v1->status = "1";
|
||||||
$v1->user = $c['username'];
|
$v1->user = $user['username'];
|
||||||
$v1->save();
|
$v1->save();
|
||||||
$c = ORM::for_table('tbl_customers')->where('id', $id_customer)->find_one();
|
$in = ORM::for_table('tbl_transactions')->where('username', $user['username'])->order_by_desc('id')->find_one();
|
||||||
$in = ORM::for_table('tbl_transactions')->where('username', $c['username'])->order_by_desc('id')->find_one();
|
|
||||||
$ui->assign('in', $in);
|
$ui->assign('in', $in);
|
||||||
$ui->assign('date', date("Y-m-d H:i:s"));
|
$ui->assign('date', date("Y-m-d H:i:s"));
|
||||||
$ui->display('invoice.tpl');
|
$ui->display('invoice.tpl');
|
||||||
|
@ -17,6 +17,12 @@ switch ($action) {
|
|||||||
if ($admin['user_type'] != 'Admin') {
|
if ($admin['user_type'] != 'Admin') {
|
||||||
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
r2(U . "dashboard", 'e', $_L['Do_Not_Access']);
|
||||||
}
|
}
|
||||||
|
if (file_exists('system/uploads/logo.png')) {
|
||||||
|
$logo = 'system/uploads/logo.png?' . time();
|
||||||
|
} else {
|
||||||
|
$logo = 'system/uploads/logo.default.png';
|
||||||
|
}
|
||||||
|
$ui->assign('logo', $logo);
|
||||||
run_hook('view_app_settings'); #HOOK
|
run_hook('view_app_settings'); #HOOK
|
||||||
$ui->display('app-settings.tpl');
|
$ui->display('app-settings.tpl');
|
||||||
break;
|
break;
|
||||||
@ -221,6 +227,13 @@ switch ($action) {
|
|||||||
$tawkto = _post('tawkto');
|
$tawkto = _post('tawkto');
|
||||||
$radius_mode = _post('radius_mode') * 1;
|
$radius_mode = _post('radius_mode') * 1;
|
||||||
run_hook('save_settings'); #HOOK
|
run_hook('save_settings'); #HOOK
|
||||||
|
|
||||||
|
|
||||||
|
if (!empty($_FILES['logo']['name'])) {
|
||||||
|
if (file_exists('system/uploads/logo.png')) unlink('system/uploads/logo.png');
|
||||||
|
File::resizeCropImage($_FILES['logo']['tmp_name'], 'system/uploads/logo.png', 1078, 200, 100);
|
||||||
|
if (file_exists($_FILES['logo']['tmp_name'])) unlink($_FILES['logo']['tmp_name']);
|
||||||
|
}
|
||||||
if ($company == '') {
|
if ($company == '') {
|
||||||
r2(U . 'settings/app', 'e', $_L['All_field_is_required']);
|
r2(U . 'settings/app', 'e', $_L['All_field_is_required']);
|
||||||
} else {
|
} else {
|
||||||
|
@ -26,187 +26,16 @@ switch ($action) {
|
|||||||
case 'activation-post':
|
case 'activation-post':
|
||||||
$code = _post('code');
|
$code = _post('code');
|
||||||
$v1 = ORM::for_table('tbl_voucher')->where('code', $code)->where('status', 0)->find_one();
|
$v1 = ORM::for_table('tbl_voucher')->where('code', $code)->where('status', 0)->find_one();
|
||||||
|
|
||||||
$c = ORM::for_table('tbl_customers')->find_one($user['id']);
|
|
||||||
$p = ORM::for_table('tbl_plans')->find_one($v1['id_plan']);
|
|
||||||
$b = ORM::for_table('tbl_user_recharges')->where('customer_id', $user['id'])->find_one();
|
|
||||||
|
|
||||||
$date_now = date("Y-m-d H:i:s");
|
|
||||||
$date_only = date("Y-m-d");
|
|
||||||
$time = date("H:i:s");
|
|
||||||
|
|
||||||
$mikrotik = Mikrotik::info($v1['routers']);
|
|
||||||
if ($p['validity_unit'] == 'Months') {
|
|
||||||
$date_exp = date("Y-m-d", strtotime('+' . $p['validity'] . ' month'));
|
|
||||||
} else if ($p['validity_unit'] == 'Days') {
|
|
||||||
$date_exp = date("Y-m-d", strtotime('+' . $p['validity'] . ' day'));
|
|
||||||
} else if ($p['validity_unit'] == 'Hrs') {
|
|
||||||
$datetime = explode(' ', date("Y-m-d H:i:s", strtotime('+' . $p['validity'] . ' hour')));
|
|
||||||
$date_exp = $datetime[0];
|
|
||||||
$time = $datetime[1];
|
|
||||||
} else if ($p['validity_unit'] == 'Mins') {
|
|
||||||
$datetime = explode(' ', date("Y-m-d H:i:s", strtotime('+' . $p['validity'] . ' minute')));
|
|
||||||
$date_exp = $datetime[0];
|
|
||||||
$time = $datetime[1];
|
|
||||||
}
|
|
||||||
run_hook('customer_activate_voucher'); #HOOK
|
run_hook('customer_activate_voucher'); #HOOK
|
||||||
if ($v1) {
|
if ($v1) {
|
||||||
if ($v1['type'] == 'Hotspot') {
|
if (Package::rechargeUser($user['id'], $v1['routers'], $v1['id_plan'], "Activation", "Voucher")) {
|
||||||
if ($b) {
|
|
||||||
if (!$config['radius_mode']) {
|
|
||||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
|
||||||
Mikrotik::removeHotspotUser($client, $c['username']);
|
|
||||||
Mikrotik::addHotspotUser($client, $p, $c);
|
|
||||||
}
|
|
||||||
$b->customer_id = $user['id'];
|
|
||||||
$b->username = $c['username'];
|
|
||||||
$b->plan_id = $v1['id_plan'];
|
|
||||||
$b->namebp = $p['name_plan'];
|
|
||||||
$b->recharged_on = $date_only;
|
|
||||||
$b->expiration = $date_exp;
|
|
||||||
$b->time = $time;
|
|
||||||
$b->status = "on";
|
|
||||||
$b->method = "voucher";
|
|
||||||
$b->routers = $v1['routers'];
|
|
||||||
$b->type = "Hotspot";
|
|
||||||
$b->save();
|
|
||||||
|
|
||||||
// insert table transactions
|
|
||||||
$t = ORM::for_table('tbl_transactions')->create();
|
|
||||||
$t->invoice = "INV-" . Package::_raid(5);
|
|
||||||
$t->username = $c['username'];
|
|
||||||
$t->plan_name = $p['name_plan'];
|
|
||||||
$t->price = $p['price'];
|
|
||||||
$t->recharged_on = $date_only;
|
|
||||||
$t->expiration = $date_exp;
|
|
||||||
$t->time = $time;
|
|
||||||
$t->method = "voucher";
|
|
||||||
$t->routers = $v1['routers'];
|
|
||||||
$t->type = "Hotspot";
|
|
||||||
$t->save();
|
|
||||||
} else {
|
|
||||||
if (!$config['radius_mode']) {
|
|
||||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
|
||||||
Mikrotik::addHotspotUser($client, $p, $c);
|
|
||||||
}
|
|
||||||
|
|
||||||
$d = ORM::for_table('tbl_user_recharges')->create();
|
|
||||||
$d->customer_id = $user['id'];
|
|
||||||
$d->username = $c['username'];
|
|
||||||
$d->plan_id = $v1['id_plan'];
|
|
||||||
$d->namebp = $p['name_plan'];
|
|
||||||
$d->recharged_on = $date_only;
|
|
||||||
$d->expiration = $date_exp;
|
|
||||||
$d->time = $time;
|
|
||||||
$d->status = "on";
|
|
||||||
$d->method = "voucher";
|
|
||||||
$d->routers = $v1['routers'];
|
|
||||||
$d->type = "Hotspot";
|
|
||||||
$d->save();
|
|
||||||
|
|
||||||
// insert table transactions
|
|
||||||
$t = ORM::for_table('tbl_transactions')->create();
|
|
||||||
$t->invoice = "INV-" . Package::_raid(5);
|
|
||||||
$t->username = $c['username'];
|
|
||||||
$t->plan_name = $p['name_plan'];
|
|
||||||
$t->price = $p['price'];
|
|
||||||
$t->recharged_on = $date_only;
|
|
||||||
$t->expiration = $date_exp;
|
|
||||||
$t->time = $time;
|
|
||||||
$t->method = "voucher";
|
|
||||||
$t->routers = $v1['routers'];
|
|
||||||
$t->type = "Hotspot";
|
|
||||||
$t->save();
|
|
||||||
}
|
|
||||||
|
|
||||||
$v1->status = "1";
|
$v1->status = "1";
|
||||||
$v1->user = $c['username'];
|
$v1->user = $user['username'];
|
||||||
$v1->save();
|
$v1->save();
|
||||||
// Telegram to Admin
|
|
||||||
Message::sendTelegram('#u' . $c['username'] . " Activate #Voucher #Hotspot\n" . $p['name_plan'] .
|
|
||||||
"\nCode: " . $code .
|
|
||||||
"\nRouter: " . $v1['routers'] .
|
|
||||||
"\nPrice: " . $p['price']);
|
|
||||||
} else {
|
|
||||||
if ($b) {
|
|
||||||
if (!$config['radius_mode']) {
|
|
||||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
|
||||||
Mikrotik::removePpoeUser($client, $c['username']);
|
|
||||||
Mikrotik::addPpoeUser($client, $p, $c);
|
|
||||||
}
|
|
||||||
|
|
||||||
$b->customer_id = $user['id'];
|
|
||||||
$b->username = $c['username'];
|
|
||||||
$b->plan_id = $v1['id_plan'];
|
|
||||||
$b->namebp = $p['name_plan'];
|
|
||||||
$b->recharged_on = $date_only;
|
|
||||||
$b->expiration = $date_exp;
|
|
||||||
$b->time = $time;
|
|
||||||
$b->status = "on";
|
|
||||||
$b->method = "voucher";
|
|
||||||
$b->routers = $v1['routers'];
|
|
||||||
$b->type = "PPPOE";
|
|
||||||
$b->save();
|
|
||||||
|
|
||||||
// insert table transactions
|
|
||||||
$t = ORM::for_table('tbl_transactions')->create();
|
|
||||||
$t->invoice = "INV-" . Package::_raid(5);
|
|
||||||
$t->username = $c['username'];
|
|
||||||
$t->plan_name = $p['name_plan'];
|
|
||||||
$t->price = $p['price'];
|
|
||||||
$t->recharged_on = $date_only;
|
|
||||||
$t->expiration = $date_exp;
|
|
||||||
$t->time = $time;
|
|
||||||
$t->method = "voucher";
|
|
||||||
$t->routers = $v1['routers'];
|
|
||||||
$t->type = "PPPOE";
|
|
||||||
$t->save();
|
|
||||||
} else {
|
|
||||||
if (!$config['radius_mode']) {
|
|
||||||
$client = Mikrotik::getClient($mikrotik['ip_address'], $mikrotik['username'], $mikrotik['password']);
|
|
||||||
Mikrotik::addPpoeUser($client, $p, $c);
|
|
||||||
}
|
|
||||||
|
|
||||||
$d = ORM::for_table('tbl_user_recharges')->create();
|
|
||||||
$d->customer_id = $user['id'];
|
|
||||||
$d->username = $c['username'];
|
|
||||||
$d->plan_id = $v1['id_plan'];
|
|
||||||
$d->namebp = $p['name_plan'];
|
|
||||||
$d->recharged_on = $date_only;
|
|
||||||
$d->expiration = $date_exp;
|
|
||||||
$d->time = $time;
|
|
||||||
$d->status = "on";
|
|
||||||
$d->method = "voucher";
|
|
||||||
$d->routers = $v1['routers'];
|
|
||||||
$d->type = "PPPOE";
|
|
||||||
$d->save();
|
|
||||||
|
|
||||||
// insert table transactions
|
|
||||||
$t = ORM::for_table('tbl_transactions')->create();
|
|
||||||
$t->invoice = "INV-" . Package::_raid(5);
|
|
||||||
$t->username = $c['username'];
|
|
||||||
$t->plan_name = $p['name_plan'];
|
|
||||||
$t->price = $p['price'];
|
|
||||||
$t->recharged_on = $date_only;
|
|
||||||
$t->expiration = $date_exp;
|
|
||||||
$t->time = $time;
|
|
||||||
$t->method = "voucher";
|
|
||||||
$t->routers = $v1['routers'];
|
|
||||||
$t->type = "PPPOE";
|
|
||||||
$t->save();
|
|
||||||
}
|
|
||||||
|
|
||||||
$v1->status = "1";
|
|
||||||
$v1->user = $c['username'];
|
|
||||||
$v1->save();
|
|
||||||
// Telegram to Admin
|
|
||||||
Message::sendTelegram('#u' . $c['username'] . " Activate #Voucher #PPPOE\n" . $p['name_plan'] .
|
|
||||||
"\nCode: " . $code .
|
|
||||||
"\nRouter: " . $v1['routers'] .
|
|
||||||
"\nPrice: " . $p['price']);
|
|
||||||
}
|
|
||||||
|
|
||||||
r2(U . "voucher/list-activated", 's', $_L['Activation_Vouchers_Successfully']);
|
r2(U . "voucher/list-activated", 's', $_L['Activation_Vouchers_Successfully']);
|
||||||
|
} else {
|
||||||
|
r2(U . 'voucher/activation', 'e', "Failed to refill account");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
r2(U . 'voucher/activation', 'e', $_L['Voucher_Not_Valid']);
|
r2(U . 'voucher/activation', 'e', $_L['Voucher_Not_Valid']);
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@ date_default_timezone_set($config['timezone']);
|
|||||||
|
|
||||||
$textExpired = Lang::getNotifText('expired');
|
$textExpired = Lang::getNotifText('expired');
|
||||||
|
|
||||||
$d = ORM::for_table('tbl_user_recharges')->where('status', 'on')->where('expiration', date("Y-m-d"))->find_many();
|
$d = ORM::for_table('tbl_user_recharges')->where('status', 'on')->where_lte('expiration', date("Y-m-d"))->find_many();
|
||||||
echo "Found ".count($d)." user(s)\n";
|
echo "Found ".count($d)." user(s)\n";
|
||||||
run_hook('cronjob'); #HOOK
|
run_hook('cronjob'); #HOOK
|
||||||
|
|
||||||
|
@ -384,3 +384,4 @@ $_L['Send_Balance'] = 'Send Balance';
|
|||||||
$_L['Received_Balance'] = 'Received Balance';
|
$_L['Received_Balance'] = 'Received Balance';
|
||||||
$_L['Minimum_Balance_Transfer'] = 'Minimum Balance Transfer';
|
$_L['Minimum_Balance_Transfer'] = 'Minimum Balance Transfer';
|
||||||
$_L['Minimum_Transfer'] = 'Minimum Transfer';
|
$_L['Minimum_Transfer'] = 'Minimum Transfer';
|
||||||
|
$_L['Company_Logo'] = 'Company Logo';
|
||||||
|
@ -13,5 +13,9 @@
|
|||||||
],
|
],
|
||||||
"2023.8.23" : [
|
"2023.8.23" : [
|
||||||
"ALTER TABLE `tbl_customers` CHANGE `pppoe_password` `pppoe_password` VARCHAR(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT 'For PPPOE Login';"
|
"ALTER TABLE `tbl_customers` CHANGE `pppoe_password` `pppoe_password` VARCHAR(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '0' COMMENT 'For PPPOE Login';"
|
||||||
|
],
|
||||||
|
"2023.8.28" : [
|
||||||
|
"ALTER TABLE `tbl_user_recharges` ADD `recharged_time` time NOT NULL DEFAULT '00:00:00' AFTER `recharged_on`;",
|
||||||
|
"ALTER TABLE `tbl_transactions` ADD `recharged_time` time NOT NULL DEFAULT '00:00:00' AFTER `recharged_on`;"
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -1,6 +1,6 @@
|
|||||||
{include file="sections/header.tpl"}
|
{include file="sections/header.tpl"}
|
||||||
|
|
||||||
<form class="form-horizontal" method="post" role="form" action="{$_url}settings/app-post">
|
<form class="form-horizontal" method="post" role="form" action="{$_url}settings/app-post" enctype="multipart/form-data">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12 col-md-12">
|
<div class="col-sm-12 col-md-12">
|
||||||
<div class="panel panel-primary panel-hovered panel-stacked mb30">
|
<div class="panel panel-primary panel-hovered panel-stacked mb30">
|
||||||
@ -17,10 +17,19 @@
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<input type="text" required class="form-control" id="company" name="company"
|
<input type="text" required class="form-control" id="company" name="company"
|
||||||
value="{$_c['CompanyName']}">
|
value="{$_c['CompanyName']}">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<span class="help-block col-md-4">{$_L['App_Name_Help_Text']}</span>
|
<span class="help-block col-md-4">{$_L['App_Name_Help_Text']}</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-md-2 control-label">{Lang::T('Company Logo')}</label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<input type="file" class="form-control" id="logo" name="logo" accept="image/*">
|
||||||
|
<span class="help-block">For PDF Reports | Beset size 1078 x 200 | uploaded image will be autosize</span>
|
||||||
|
</div>
|
||||||
|
<span class="help-block col-md-4">
|
||||||
|
<a href="./{$logo}" target="_blank"><img src="./{$logo}" height="48" alt="logo for PDF"></a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-2 control-label">{Lang::T('Company Footer')}</label>
|
<label class="col-md-2 control-label">{Lang::T('Company Footer')}</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
|
@ -73,7 +73,8 @@
|
|||||||
class="pull-right">{if $package['status']=='on'}yes{else}no{/if}</span>
|
class="pull-right">{if $package['status']=='on'}yes{else}no{/if}</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
{$_L['Created_On']} <span class="pull-right">{Lang::dateFormat($package['recharged_on'])}</span>
|
{$_L['Created_On']} <span
|
||||||
|
class="pull-right">{Lang::dateAndTimeFormat($package['recharged_on'],$package['recharged_time'])}</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
{$_L['Expires_On']} <span
|
{$_L['Expires_On']} <span
|
||||||
@ -116,9 +117,9 @@
|
|||||||
<td>{$ds['plan_name']}</td>
|
<td>{$ds['plan_name']}</td>
|
||||||
<td>{Lang::moneyFormat($ds['price'])}</td>
|
<td>{Lang::moneyFormat($ds['price'])}</td>
|
||||||
<td>{$ds['type']}</td>
|
<td>{$ds['type']}</td>
|
||||||
<td class="text-success">{date($_c['date_format'], strtotime($ds['recharged_on']))}</td>
|
<td class="text-success">{Lang::dateAndTimeFormat($ds['recharged_on'],$ds['recharged_time'])}
|
||||||
<td class="text-danger">{date($_c['date_format'], strtotime($ds['expiration']))}
|
</td>
|
||||||
{$ds['time']}</td>
|
<td class="text-danger">{Lang::dateAndTimeFormat($ds['expiration'],$ds['time'])}</td>
|
||||||
<td>{$ds['method']}</td>
|
<td>{$ds['method']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
@ -146,12 +147,9 @@
|
|||||||
<td>{$ds['routers']}</td>
|
<td>{$ds['routers']}</td>
|
||||||
<td>{$ds['payment_channel']}</td>
|
<td>{$ds['payment_channel']}</td>
|
||||||
<td>{Lang::moneyFormat($ds['price'])}</td>
|
<td>{Lang::moneyFormat($ds['price'])}</td>
|
||||||
<td class="text-primary">{date("{$_c['date_format']} H:i",
|
<td class="text-primary">{Lang::dateTimeFormat($ds['created_date'])}</td>
|
||||||
strtotime($ds['created_date']))}</td>
|
<td class="text-danger">{Lang::dateTimeFormat($ds['expired_date'])}</td>
|
||||||
<td class="text-danger">{date("{$_c['date_format']} H:i",
|
<td class="text-success">{if $ds['status']!=1}{Lang::dateTimeFormat($ds['paid_date'])}{/if}</td>
|
||||||
strtotime($ds['expired_date']))}</td>
|
|
||||||
<td class="text-success">{if $ds['status']!=1}{date("{$_c['date_format']} H:i",
|
|
||||||
strtotime($ds['paid_date']))}{/if}</td>
|
|
||||||
<td>{if $ds['status']==1}{$_L['UNPAID']}
|
<td>{if $ds['status']==1}{$_L['UNPAID']}
|
||||||
{elseif $ds['status']==2}{$_L['PAID']}
|
{elseif $ds['status']==2}{$_L['PAID']}
|
||||||
{elseif $ds['status']==3}{$_L['FAILED']}
|
{elseif $ds['status']==3}{$_L['FAILED']}
|
||||||
|
@ -108,9 +108,9 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>{$no++}</td>
|
<td>{$no++}</td>
|
||||||
<td><a href="{$_url}customers/viewu/{$expired['username']}">{$expired['username']}</a></td>
|
<td><a href="{$_url}customers/viewu/{$expired['username']}">{$expired['username']}</a></td>
|
||||||
<td>{date($_c['date_format'], strtotime($expired['recharged_on']))}
|
<td>{Lang::dateAndTimeFormat($expired['recharged_on'],$expired['recharged_time'])}
|
||||||
</td>
|
</td>
|
||||||
<td>{date($_c['date_format'], strtotime($expired['expiration']))} {$expired['time']}
|
<td>{Lang::dateAndTimeFormat($expired['expiration'],$expired['time'])}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -33,15 +33,14 @@
|
|||||||
============================================<br>
|
============================================<br>
|
||||||
{$_L['Type']} : <b>{$d['type']}</b><br>
|
{$_L['Type']} : <b>{$d['type']}</b><br>
|
||||||
{$_L['Plan_Name']} : <b>{$d['plan_name']}</b><br>
|
{$_L['Plan_Name']} : <b>{$d['plan_name']}</b><br>
|
||||||
{$_L['Plan_Price']} : <b>{Lang::moneyFormat($in['price'])}</b><br>
|
{$_L['Plan_Price']} : <b>{Lang::moneyFormat($d['price'])}</b><br>
|
||||||
<br>
|
<br>
|
||||||
{$_L['Username']} : <b>{$d['username']}</b><br>
|
{$_L['Username']} : <b>{$d['username']}</b><br>
|
||||||
{$_L['Password']} : **********<br>
|
{$_L['Password']} : **********<br>
|
||||||
{if $in['type'] != 'Balance'}
|
{if $in['type'] != 'Balance'}
|
||||||
<br>
|
<br>
|
||||||
{$_L['Created_On']} : <b>{date($_c['date_format'], strtotime($d['recharged_on']))}</b><br>
|
{$_L['Created_On']} : <b>{Lang::dateAndTimeFormat($d['recharged_on'],$d['recharged_time'])}</b><br>
|
||||||
{$_L['Expires_On']} : <b>{date($_c['date_format'], strtotime($d['expiration']))}
|
{$_L['Expires_On']} : <b>{Lang::dateAndTimeFormat($d['expiration'],$d['time'])}</b><br>
|
||||||
{$d['time']}</b><br>
|
|
||||||
{/if}
|
{/if}
|
||||||
============================================<br>
|
============================================<br>
|
||||||
<center>{$_c['note']}</center>
|
<center>{$_c['note']}</center>
|
||||||
|
@ -24,9 +24,8 @@
|
|||||||
{$_L['Password']} : **********<br>
|
{$_L['Password']} : **********<br>
|
||||||
{if $in['type'] != 'Balance'}
|
{if $in['type'] != 'Balance'}
|
||||||
<br>
|
<br>
|
||||||
{$_L['Created_On']} : <b>{date($_c['date_format'], strtotime($in['recharged_on']))}</b><br>
|
{$_L['Created_On']} : <b>{Lang::dateAndTimeFormat($in['recharged_on'],$in['recharged_time'])}</b><br>
|
||||||
{$_L['Expires_On']} : <b>{date($_c['date_format'], strtotime($in['expiration']))}
|
{$_L['Expires_On']} : <b>{Lang::dateAndTimeFormat($in['expiration'],$in['time'])}</b><br>
|
||||||
{$in['time']}</b><br>
|
|
||||||
{/if}
|
{/if}
|
||||||
=====================================================<br>
|
=====================================================<br>
|
||||||
<center>{$_c['note']}</center>
|
<center>{$_c['note']}</center>
|
||||||
|
@ -3,14 +3,17 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-sm-12">
|
<div class="col-sm-12">
|
||||||
<div class="panel panel-primary">
|
<div class="panel panel-primary">
|
||||||
<div class="panel-heading"><h3 class="panel-title">{$_L['Recharge_Account']}</h3></div>
|
<div class="panel-heading">
|
||||||
|
<h3 class="panel-title">{$_L['Recharge_Account']}</h3>
|
||||||
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<form class="form-horizontal" method="post" role="form" action="{$_url}prepaid/edit-post">
|
<form class="form-horizontal" method="post" role="form" action="{$_url}prepaid/edit-post">
|
||||||
<input type="hidden" name="id" value="{$d['id']}">
|
<input type="hidden" name="id" value="{$d['id']}">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-2 control-label">{$_L['Select_Account']}</label>
|
<label class="col-md-2 control-label">{$_L['Select_Account']}</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<input type="text" class="form-control" id="username" name="username" value="{$d['username']}" readonly>
|
<input type="text" class="form-control" id="username" name="username"
|
||||||
|
value="{$d['username']}" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -19,7 +22,8 @@
|
|||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<select id="id_plan" name="id_plan" class="form-control select2">
|
<select id="id_plan" name="id_plan" class="form-control select2">
|
||||||
{foreach $p as $ps}
|
{foreach $p as $ps}
|
||||||
<option value="{$ps['id']}" {if $d['plan_id'] eq $ps['id']} selected {/if}>{$ps['name_plan']}</option>
|
<option value="{$ps['id']}" {if $d['plan_id'] eq $ps['id']} selected {/if}>
|
||||||
|
{$ps['name_plan']}</option>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@ -28,25 +32,26 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-2 control-label">{$_L['Created_On']}</label>
|
<label class="col-md-2 control-label">{$_L['Created_On']}</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="input-group date" id="datepicker1">
|
<input type="date" class="form-control" id="recharged_on" name="recharged_on" readonly
|
||||||
<input type="text" class="form-control" id="recharged_on" name="recharged_on" value="{$d['recharged_on']}">
|
value="{$d['recharged_on']} {$d['recharged_time']}">
|
||||||
<span class="input-group-addon ion ion-calendar"></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-2 control-label">{$_L['Expires_On']}</label>
|
<label class="col-md-2 control-label">{$_L['Expires_On']}</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-4">
|
||||||
<div class="input-group date" id="datepicker2">
|
<input type="date" class="form-control" id="expiration" name="expiration"
|
||||||
<input type="text" class="form-control" id="expiration" name="expiration" value="{$d['expiration']}">
|
value="{$d['expiration']}">
|
||||||
<span class="input-group-addon ion ion-calendar"></span>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<input type="text" class="form-control" id="time" name="time" placeholder="00:00:00"
|
||||||
|
value="{$d['time']}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="col-lg-offset-2 col-lg-10">
|
<div class="col-lg-offset-2 col-lg-10">
|
||||||
<button class="btn btn-success waves-effect waves-light" type="submit">{$_L['Edit']}</button>
|
<button class="btn btn-success waves-effect waves-light"
|
||||||
|
type="submit">{$_L['Edit']}</button>
|
||||||
Or <a href="{$_url}prepaid/list">{$_L['Cancel']}</a>
|
Or <a href="{$_url}prepaid/list">{$_L['Cancel']}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -12,7 +12,8 @@
|
|||||||
<div class="input-group-addon">
|
<div class="input-group-addon">
|
||||||
<span class="fa fa-search"></span>
|
<span class="fa fa-search"></span>
|
||||||
</div>
|
</div>
|
||||||
<input type="text" name="username" class="form-control" placeholder="{$_L['Search_by_Username']}..." value="{$cari}">
|
<input type="text" name="username" class="form-control"
|
||||||
|
placeholder="{$_L['Search_by_Username']}..." value="{$cari}">
|
||||||
<div class="input-group-btn">
|
<div class="input-group-btn">
|
||||||
<button class="btn btn-success" type="submit">{$_L['Search']}</button>
|
<button class="btn btn-success" type="submit">{$_L['Search']}</button>
|
||||||
</div>
|
</div>
|
||||||
@ -20,7 +21,8 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<a href="{$_url}prepaid/recharge" class="btn btn-primary btn-block waves-effect"><i class="ion ion-android-add"> </i> {$_L['Recharge_Account']}</a>
|
<a href="{$_url}prepaid/recharge" class="btn btn-primary btn-block waves-effect"><i
|
||||||
|
class="ion ion-android-add"> </i> {$_L['Recharge_Account']}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
@ -40,16 +42,18 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
{foreach $d as $ds}
|
{foreach $d as $ds}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{$ds['username']}</td>
|
<td><a href="{$_url}customers/viewu/{$ds['username']}">{$ds['username']}</a></td>
|
||||||
<td>{$ds['namebp']}</td>
|
<td>{$ds['namebp']}</td>
|
||||||
<td>{$ds['type']}</td>
|
<td>{$ds['type']}</td>
|
||||||
<td>{$ds['recharged_on']}</td>
|
<td>{Lang::dateAndTimeFormat($ds['recharged_on'],$ds['recharged_time'])}</td>
|
||||||
<td>{$ds['expiration']} {$ds['time']}</td>
|
<td>{Lang::dateAndTimeFormat($ds['expiration'],$ds['time'])}</td>
|
||||||
<td>{$ds['method']}</td>
|
<td>{$ds['method']}</td>
|
||||||
<td>{$ds['routers']}</td>
|
<td>{$ds['routers']}</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{$_url}prepaid/edit/{$ds['id']}" class="btn btn-warning btn-xs">{$_L['Edit']}</a>
|
<a href="{$_url}prepaid/edit/{$ds['id']}"
|
||||||
<a href="{$_url}prepaid/delete/{$ds['id']}" id="{$ds['id']}" class="btn btn-danger btn-xs">{$_L['Delete']}</a>
|
class="btn btn-warning btn-xs">{$_L['Edit']}</a>
|
||||||
|
<a href="{$_url}prepaid/delete/{$ds['id']}" id="{$ds['id']}"
|
||||||
|
class="btn btn-danger btn-xs">{$_L['Delete']}</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
@ -39,8 +39,8 @@
|
|||||||
<td class="text-center">{$ds['plan_name']}</td>
|
<td class="text-center">{$ds['plan_name']}</td>
|
||||||
<td class="text-center">{$ds['type']}</td>
|
<td class="text-center">{$ds['type']}</td>
|
||||||
<td class="text-right">{Lang::moneyFormat($ds['price'])}</td>
|
<td class="text-right">{Lang::moneyFormat($ds['price'])}</td>
|
||||||
<td>{date($_c['date_format'], strtotime($ds['recharged_on']))}</td>
|
<td>{Lang::dateAndTimeFormat($ds['recharged_on'],$ds['recharged_time'])}</td>
|
||||||
<td>{date($_c['date_format'], strtotime($ds['expiration']))} {$ds['time']}</td>
|
<td>{Lang::dateAndTimeFormat($ds['expiration'],$ds['time'])}</td>
|
||||||
<td class="text-center">{$ds['method']}</td>
|
<td class="text-center">{$ds['method']}</td>
|
||||||
<td class="text-center">{$ds['routers']}</td>
|
<td class="text-center">{$ds['routers']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -39,8 +39,8 @@
|
|||||||
<td class="text-center">{$ds['plan_name']}</td>
|
<td class="text-center">{$ds['plan_name']}</td>
|
||||||
<td class="text-center">{$ds['type']}</td>
|
<td class="text-center">{$ds['type']}</td>
|
||||||
<td class="text-right">{Lang::moneyFormat($ds['price'])}</td>
|
<td class="text-right">{Lang::moneyFormat($ds['price'])}</td>
|
||||||
<td>{date($_c['date_format'], strtotime($ds['recharged_on']))}</td>
|
<td>{Lang::dateAndTimeFormat($ds['recharged_on'],$ds['recharged_time'])}</td>
|
||||||
<td>{date($_c['date_format'], strtotime($ds['expiration']))} {$ds['time']}</td>
|
<td>{Lang::dateAndTimeFormat($ds['expiration'],$ds['time'])}</td>
|
||||||
<td class="text-center">{$ds['method']}</td>
|
<td class="text-center">{$ds['method']}</td>
|
||||||
<td class="text-center">{$ds['routers']}</td>
|
<td class="text-center">{$ds['routers']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -42,8 +42,8 @@
|
|||||||
<td>{$ds['type']}</td>
|
<td>{$ds['type']}</td>
|
||||||
<td>{$ds['plan_name']}</td>
|
<td>{$ds['plan_name']}</td>
|
||||||
<td class="text-right">{Lang::moneyFormat($ds['price'])}</td>
|
<td class="text-right">{Lang::moneyFormat($ds['price'])}</td>
|
||||||
<td>{date($_c['date_format'], strtotime($ds['recharged_on']))}</td>
|
<td>{Lang::dateAndTimeFormat($ds['recharged_on'],$ds['recharged_time'])}</td>
|
||||||
<td>{date($_c['date_format'], strtotime($ds['expiration']))} {$ds['time']}</td>
|
<td>{Lang::dateAndTimeFormat($ds['expiration'],$ds['time'])}</td>
|
||||||
<td>{$ds['method']}</td>
|
<td>{$ds['method']}</td>
|
||||||
<td>{$ds['routers']}</td>
|
<td>{$ds['routers']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -53,8 +53,8 @@
|
|||||||
<td>{$ds['type']}</td>
|
<td>{$ds['type']}</td>
|
||||||
<td>{$ds['plan_name']}</td>
|
<td>{$ds['plan_name']}</td>
|
||||||
<td class="text-right">{Lang::moneyFormat($ds['price'])}</td>
|
<td class="text-right">{Lang::moneyFormat($ds['price'])}</td>
|
||||||
<td>{date($_c['date_format'], strtotime($ds['recharged_on']))}</td>
|
<td>{Lang::dateAndTimeFormat($ds['recharged_on'],$ds['recharged_time'])}</td>
|
||||||
<td>{date($_c['date_format'], strtotime($ds['expiration']))} {$ds['time']}</td>
|
<td>{Lang::dateAndTimeFormat($ds['expiration'],$ds['time'])}</td>
|
||||||
<td>{$ds['method']}</td>
|
<td>{$ds['method']}</td>
|
||||||
<td>{$ds['routers']}</td>
|
<td>{$ds['routers']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -10,19 +10,13 @@
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-3 control-label">{$_L['From_Date']}</label>
|
<label class="col-md-3 control-label">{$_L['From_Date']}</label>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<div class="input-group" id="datepicker1">
|
|
||||||
<input type="date" class="form-control" value="{$tdate}" name="fdate" id="fdate">
|
<input type="date" class="form-control" value="{$tdate}" name="fdate" id="fdate">
|
||||||
<span class="input-group-addon"><i class=" ion ion-calendar"></i></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-3 control-label">{$_L['To_Date']}</label>
|
<label class="col-md-3 control-label">{$_L['To_Date']}</label>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<div class="input-group date" id="datepicker2">
|
|
||||||
<input type="date" class="form-control" value="{$mdate}" name="tdate" id="tdate">
|
<input type="date" class="form-control" value="{$mdate}" name="tdate" id="tdate">
|
||||||
<span class="input-group-addon"><i class=" ion ion-calendar"></i></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
59
ui/ui/router-error.tpl
Normal file
59
ui/ui/router-error.tpl
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||||
|
<title>Router Error - PHPNuxBill</title>
|
||||||
|
<link rel="shortcut icon" href="ui/ui/images/logo.png" type="image/x-icon" />
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="ui/ui/styles/bootstrap.min.css">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="ui/ui/fonts/ionicons/css/ionicons.min.css">
|
||||||
|
<link rel="stylesheet" href="ui/ui/fonts/font-awesome/css/font-awesome.min.css">
|
||||||
|
<link rel="stylesheet" href="ui/ui/fonts/MaterialDesign/css/materialdesignicons.min.css">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="ui/ui/styles/adminlte.min.css">
|
||||||
|
<link rel="stylesheet" href="ui/ui/styles/skin-blue.min.css">
|
||||||
|
<style>
|
||||||
|
::-moz-selection {
|
||||||
|
/* Code for Firefox */
|
||||||
|
color: red;
|
||||||
|
background: yellow;
|
||||||
|
}
|
||||||
|
|
||||||
|
::selection {
|
||||||
|
color: red;
|
||||||
|
background: yellow;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="hold-transition skin-blue">
|
||||||
|
<div class="container">
|
||||||
|
<section class="content-header">
|
||||||
|
<h1 class="text-center">
|
||||||
|
Router Error
|
||||||
|
</h1>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="content">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-3"></div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="alert alert-danger text-center">
|
||||||
|
{$error_meesage}
|
||||||
|
</div>
|
||||||
|
<a href="javascript::history.back()" onclick="history.back()" class="btn btn-warning btn-block">back</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<footer class="footer text-center">
|
||||||
|
PHPNuxBill by <a href="https://github.com/hotspotbilling/phpnuxbill" rel="nofollow noreferrer noopener"
|
||||||
|
target="_blank">iBNuX</a>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
@ -26,9 +26,8 @@
|
|||||||
<td>{$ds['plan_name']}</td>
|
<td>{$ds['plan_name']}</td>
|
||||||
<td>{Lang::moneyFormat($ds['price'])}</td>
|
<td>{Lang::moneyFormat($ds['price'])}</td>
|
||||||
<td>{$ds['type']}</td>
|
<td>{$ds['type']}</td>
|
||||||
<td class="text-success">{date($_c['date_format'], strtotime($ds['recharged_on']))}</td>
|
<td>{Lang::dateAndTimeFormat($ds['recharged_on'],$ds['recharged_time'])}</td>
|
||||||
<td class="text-danger">{date($_c['date_format'], strtotime($ds['expiration']))}
|
<td>{Lang::dateAndTimeFormat($ds['expiration'],$ds['time'])}</td>
|
||||||
{$ds['time']}</td>
|
|
||||||
<td>{$ds['method']}</td>
|
<td>{$ds['method']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
|
@ -84,14 +84,14 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td class="small text-info text-uppercase text-normal">{$_L['Created_On']}</td>
|
<td class="small text-info text-uppercase text-normal">{$_L['Created_On']}</td>
|
||||||
<td class="small mb15">
|
<td class="small mb15">
|
||||||
{if $_bill['time'] ne ''}{date($_c['date_format'], strtotime($_bill['recharged_on']))}
|
{if $_bill['time'] ne ''}{Lang::dateAndTimeFormat($_bill['recharged_on'],$_bill['recharged_time'])}
|
||||||
{/if} </td>
|
{/if} </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="small text-danger text-uppercase text-normal">{$_L['Expires_On']}</td>
|
<td class="small text-danger text-uppercase text-normal">{$_L['Expires_On']}</td>
|
||||||
<td class="small mb15">
|
<td class="small mb15">
|
||||||
{if $_bill['time'] ne ''}{date($_c['date_format'], strtotime($_bill['expiration']))}
|
{if $_bill['time'] ne ''}{Lang::dateAndTimeFormat($_bill['expiration'],$_bill['time'])}{/if}
|
||||||
{$_bill['time']}{/if} </td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{if $_bill['type'] == 'Hotspot' && $_bill['status'] == 'on'}
|
{if $_bill['type'] == 'Hotspot' && $_bill['status'] == 'on'}
|
||||||
{if $nux_ip}
|
{if $nux_ip}
|
||||||
@ -138,7 +138,7 @@
|
|||||||
}, 2000);
|
}, 2000);
|
||||||
</script>
|
</script>
|
||||||
{/if}
|
{/if}
|
||||||
{if $_c['enable_balance'] == 'yes'}
|
{if $_c['enable_balance'] == 'yes' && $_c['allow_balance_transfer'] == 'yes'}
|
||||||
<div class="box box-primary box-solid mb30">
|
<div class="box box-primary box-solid mb30">
|
||||||
<div class="box-header">
|
<div class="box-header">
|
||||||
<h4 class="box-title">{Lang::T("Transfer Balance")}</h4>
|
<h4 class="box-title">{Lang::T("Transfer Balance")}</h4>
|
||||||
@ -151,11 +151,12 @@
|
|||||||
placeholder="{$_L['Username']}">
|
placeholder="{$_L['Username']}">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-5">
|
<div class="col-sm-5">
|
||||||
<input type="number" id="balance" name="balance" autocomplete="off" class="form-control" required
|
<input type="number" id="balance" name="balance" autocomplete="off" class="form-control"
|
||||||
placeholder="{$_L['Balance']}">
|
required placeholder="{$_L['Balance']}">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-sm-2" align="center">
|
<div class="form-group col-sm-2" align="center">
|
||||||
<button class="btn btn-success btn-block" id="sendBtn" type="submit" name="send" value="balance"><i class="glyphicon glyphicon-send"></i></button>
|
<button class="btn btn-success btn-block" id="sendBtn" type="submit" name="send"
|
||||||
|
value="balance"><i class="glyphicon glyphicon-send"></i></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"version": "2023.8.24"
|
"version": "2023.8.30"
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user