Registration no need has voucher
This commit is contained in:
parent
eb3c84d333
commit
dd116ee248
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@ system/config.php
|
||||
ui/compiled/*.php
|
||||
ui/cache/*.php
|
||||
test.php
|
||||
pages/
|
@ -41,7 +41,7 @@
|
||||
<div class="btn-group btn-group-justified" role="group">
|
||||
<a href="https://github.com/ibnux/phpmixbill/releases" class="btn btn-primary">Download</a>
|
||||
<a href="https://github.com/ibnux/phpmixbill" class="btn btn-success">Source</a>
|
||||
<a href="https://ibnux.github.io/phpmixbill/diskusi.html" class="btn btn-info">Disquss</a>
|
||||
<a href="https://github.com/ibnux/phpmixbill/discussions" class="btn btn-info">Discussions</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -1,12 +1,13 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
|
||||
* PHP Mikrotik Billing (https://ibnux.github.io/phpmixbill/)
|
||||
|
||||
|
||||
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
* @copyright Copyright (C) 2014-2015 PHP Mikrotik Billing
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
|
||||
**/
|
||||
**/
|
||||
|
||||
if (isset($routes['1'])) {
|
||||
$do = $routes['1'];
|
||||
@ -14,33 +15,33 @@ if (isset($routes['1'])) {
|
||||
$do = 'login-display';
|
||||
}
|
||||
|
||||
switch($do){
|
||||
switch ($do) {
|
||||
case 'post':
|
||||
$username = _post('username');
|
||||
$password = _post('password');
|
||||
if($username != '' AND $password != ''){
|
||||
$d = ORM::for_table('tbl_customers')->where('username',$username)->find_one();
|
||||
if($d){
|
||||
$d_pass = $d['password'];
|
||||
if(Password::_uverify($password,$d_pass) == true){
|
||||
$_SESSION['uid'] = $d['id'];
|
||||
$d->last_login = date('Y-m-d H:i:s');
|
||||
$d->save();
|
||||
_log($username .' '. $_L['Login_Successful'],'User',$d['id']);
|
||||
r2(U.'home');
|
||||
}else{
|
||||
_msglog('e',$_L['Invalid_Username_or_Password']);
|
||||
_log($username .' '. $_L['Failed_Login'],'User');
|
||||
r2(U.'login');
|
||||
}
|
||||
}else{
|
||||
_msglog('e',$_L['Invalid_Username_or_Password']);
|
||||
r2(U.'login');
|
||||
}
|
||||
}else{
|
||||
_msglog('e',$_L['Invalid_Username_or_Password']);
|
||||
r2(U.'login');
|
||||
}
|
||||
$username = _post('username');
|
||||
$password = _post('password');
|
||||
if ($username != '' and $password != '') {
|
||||
$d = ORM::for_table('tbl_customers')->where('username', $username)->find_one();
|
||||
if ($d) {
|
||||
$d_pass = $d['password'];
|
||||
if (Password::_uverify($password, $d_pass) == true) {
|
||||
$_SESSION['uid'] = $d['id'];
|
||||
$d->last_login = date('Y-m-d H:i:s');
|
||||
$d->save();
|
||||
_log($username . ' ' . $_L['Login_Successful'], 'User', $d['id']);
|
||||
r2(U . 'home');
|
||||
} else {
|
||||
_msglog('e', $_L['Invalid_Username_or_Password']);
|
||||
_log($username . ' ' . $_L['Failed_Login'], 'User');
|
||||
r2(U . 'login');
|
||||
}
|
||||
} else {
|
||||
_msglog('e', $_L['Invalid_Username_or_Password']);
|
||||
r2(U . 'login');
|
||||
}
|
||||
} else {
|
||||
_msglog('e', $_L['Invalid_Username_or_Password']);
|
||||
r2(U . 'login');
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@ -52,4 +53,3 @@ switch($do){
|
||||
$ui->display('login.tpl');
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -26,256 +26,60 @@ switch ($do) {
|
||||
$password = _post('password');
|
||||
$cpassword = _post('cpassword');
|
||||
$address = _post('address');
|
||||
$phonenumber = _post('phonenumber');
|
||||
$code = _post('kodevoucher');
|
||||
$v1 = ORM::for_table('tbl_voucher')->where('code', $code)->where('status', 0)->find_one();
|
||||
if ($v1) {
|
||||
$msg = '';
|
||||
if (Validator::Length($username, 35, 2) == false) {
|
||||
$msg .= 'Username should be between 3 to 55 characters' . '<br>';
|
||||
}
|
||||
if (Validator::Length($fullname, 36, 2) == false) {
|
||||
$msg .= 'Full Name should be between 3 to 25 characters' . '<br>';
|
||||
}
|
||||
if (!Validator::Length($password, 35, 2)) {
|
||||
$msg .= 'Password should be between 3 to 35 characters' . '<br>';
|
||||
}
|
||||
if ($password != $cpassword) {
|
||||
$msg .= $_L['PasswordsNotMatch'] . '<br>';
|
||||
}
|
||||
$phonenumber = _post('username');
|
||||
$msg = '';
|
||||
if (Validator::Length($username, 35, 2) == false) {
|
||||
$msg .= 'Username should be between 3 to 55 characters' . '<br>';
|
||||
}
|
||||
if (Validator::Length($fullname, 36, 2) == false) {
|
||||
$msg .= 'Full Name should be between 3 to 25 characters' . '<br>';
|
||||
}
|
||||
if (!Validator::Length($password, 35, 2)) {
|
||||
$msg .= 'Password should be between 3 to 35 characters' . '<br>';
|
||||
}
|
||||
if ($password != $cpassword) {
|
||||
$msg .= $_L['PasswordsNotMatch'] . '<br>';
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_customers')->where('username', $username)->find_one();
|
||||
if ($d) {
|
||||
$msg .= $_L['account_already_exist'] . '<br>';
|
||||
}
|
||||
if ($msg == '') {
|
||||
$d = ORM::for_table('tbl_customers')->create();
|
||||
$d->username = $username;
|
||||
$d->password = $password;
|
||||
$d->fullname = $fullname;
|
||||
$d->address = $address;
|
||||
$d->phonenumber = $phonenumber;
|
||||
if ($d->save()) {
|
||||
$user = $d->id();
|
||||
//check voucher plan
|
||||
$p = ORM::for_table('tbl_plans')->find_one($v1['id_plan']);
|
||||
$c = ORM::for_table('tbl_customers')->find_one($user);
|
||||
$p = ORM::for_table('tbl_plans')->find_one($v1['id_plan']);
|
||||
|
||||
$date_now = date("Y-m-d H:i:s");
|
||||
$date_only = date("Y-m-d");
|
||||
$time = date("H:i:s");
|
||||
|
||||
$mikrotik = Router::_info($v1['routers']);
|
||||
$date_exp = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") + $p['validity'], date("Y")));
|
||||
|
||||
if ($v1['type'] == 'Hotspot') {
|
||||
try {
|
||||
$iport = explode(":", $mikrotik['ip_address']);
|
||||
$client = new RouterOS\Client($iport[0], $mikrotik['username'], $mikrotik['password'], ($iport[1]) ? $iport[1] : null);
|
||||
} catch (Exception $e) {
|
||||
die("Unable to connect to the router.<br>".$e->getMessage());
|
||||
}
|
||||
/* iBNuX Added:
|
||||
* Time limit to Mikrotik
|
||||
* 'Time_Limit', 'Data_Limit', 'Both_Limit'
|
||||
*/
|
||||
$addRequest = new RouterOS\Request('/ip/hotspot/user/add');
|
||||
if ($p['typebp'] == "Limited") {
|
||||
if ($p['limit_type'] == "Time_Limit") {
|
||||
if ($p['time_unit'] == 'Hrs')
|
||||
$timelimit = $p['time_limit'] . ":00:00";
|
||||
else
|
||||
$timelimit = "00:" . $p['time_limit'] . ":00";
|
||||
$client->sendSync(
|
||||
$addRequest
|
||||
->setArgument('name', $c['username'])
|
||||
->setArgument('profile', $p['name_plan'])
|
||||
->setArgument('password', $c['password'])
|
||||
->setArgument('limit-uptime', $timelimit)
|
||||
);
|
||||
} else if ($p['limit_type'] == "Data_Limit") {
|
||||
if ($p['data_unit'] == 'GB')
|
||||
$datalimit = $p['data_limit'] . "000000000";
|
||||
else
|
||||
$datalimit = $p['data_limit'] . "000000";
|
||||
$client->sendSync(
|
||||
$addRequest
|
||||
->setArgument('name', $c['username'])
|
||||
->setArgument('profile', $p['name_plan'])
|
||||
->setArgument('password', $c['password'])
|
||||
->setArgument('limit-bytes-total', $datalimit)
|
||||
);
|
||||
} else if ($p['limit_type'] == "Both_Limit") {
|
||||
if ($p['time_unit'] == 'Hrs')
|
||||
$timelimit = $p['time_limit'] . ":00:00";
|
||||
else
|
||||
$timelimit = "00:" . $p['time_limit'] . ":00";
|
||||
if ($p['data_unit'] == 'GB')
|
||||
$datalimit = $p['data_limit'] . "000000000";
|
||||
else
|
||||
$datalimit = $p['data_limit'] . "000000";
|
||||
$client->sendSync(
|
||||
$addRequest
|
||||
->setArgument('name', $c['username'])
|
||||
->setArgument('profile', $p['name_plan'])
|
||||
->setArgument('password', $c['password'])
|
||||
->setArgument('limit-uptime', $timelimit)
|
||||
->setArgument('limit-bytes-total', $datalimit)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$client->sendSync(
|
||||
$addRequest
|
||||
->setArgument('name', $c['username'])
|
||||
->setArgument('profile', $p['name_plan'])
|
||||
->setArgument('password', $c['password'])
|
||||
);
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_user_recharges')->create();
|
||||
$d->customer_id = $user;
|
||||
$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-" . _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->user = $c['username'];
|
||||
$v1->save();
|
||||
} else {
|
||||
try {
|
||||
$iport = explode(":", $mikrotik['ip_address']);
|
||||
$client = new RouterOS\Client($iport[0], $mikrotik['username'], $mikrotik['password'], ($iport[1]) ? $iport[1] : null);
|
||||
} catch (Exception $e) {
|
||||
die("Unable to connect to the router.<br>".$e->getMessage());
|
||||
}
|
||||
$addRequest = new RouterOS\Request('/ppp/secret/add');
|
||||
$client->sendSync(
|
||||
$addRequest
|
||||
->setArgument('name', $c['username'])
|
||||
->setArgument('service', 'pppoe')
|
||||
->setArgument('profile', $p['name_plan'])
|
||||
->setArgument('password', $c['password'])
|
||||
);
|
||||
|
||||
$d = ORM::for_table('tbl_user_recharges')->create();
|
||||
$d->customer_id = $user;
|
||||
$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-" . _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();
|
||||
}
|
||||
r2(U . 'login', 's', $_L['Register_Success']);
|
||||
} else {
|
||||
$ui->assign('username', $username);
|
||||
$ui->assign('fullname', $fullname);
|
||||
$ui->assign('address', $address);
|
||||
$ui->assign('phonenumber', $phonenumber);
|
||||
$ui->assign('notify', '<div class="alert alert-danger">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<div>Failed to register</div></div>');
|
||||
$ui->display('register.tpl');
|
||||
}
|
||||
//r2(U . 'register', 's', $_L['account_created_successfully']);
|
||||
$d = ORM::for_table('tbl_customers')->where('username', $username)->find_one();
|
||||
if ($d) {
|
||||
$msg .= $_L['account_already_exist'] . '<br>';
|
||||
}
|
||||
if ($msg == '') {
|
||||
$d = ORM::for_table('tbl_customers')->create();
|
||||
$d->username = $username;
|
||||
$d->password = $password;
|
||||
$d->fullname = $fullname;
|
||||
$d->address = $address;
|
||||
$d->phonenumber = $phonenumber;
|
||||
if ($d->save()) {
|
||||
$user = $d->id();
|
||||
r2(U . 'login', 's', $_L['Register_Success']);
|
||||
} else {
|
||||
$ui->assign('username', $username);
|
||||
$ui->assign('fullname', $fullname);
|
||||
$ui->assign('address', $address);
|
||||
$ui->assign('phonenumber', $phonenumber);
|
||||
$ui->assign('notify', '<div class="alert alert-danger">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<div>' . $msg . '</div></div>');
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<div>Failed to register</div></div>');
|
||||
$ui->display('register.tpl');
|
||||
}
|
||||
//r2(U . 'register', 's', $_L['account_created_successfully']);
|
||||
} else {
|
||||
$ui->assign('username', $username);
|
||||
$ui->assign('fullname', $fullname);
|
||||
$ui->assign('address', $address);
|
||||
$ui->assign('phonenumber', $phonenumber);
|
||||
$ui->assign('notify', '<div class="alert alert-danger">
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<div>' . $_L['Voucher_Not_Valid'] . '</div></div>');
|
||||
<button type="button" class="close" data-dismiss="alert">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<div>' . $msg . '</div></div>');
|
||||
$ui->display('register.tpl');
|
||||
//r2(U . 'register', 'e', $_L['Voucher_Not_Valid']);
|
||||
}
|
||||
/*$password = _post('password');
|
||||
if($username != '' AND $password != ''){
|
||||
$d = ORM::for_table('tbl_customers')->where('username',$username)->find_one();
|
||||
if($d){
|
||||
$d_pass = $d['password'];
|
||||
if(Password::_uverify($password,$d_pass) == true){
|
||||
$_SESSION['uid'] = $d['id'];
|
||||
$d->last_login = date('Y-m-d H:i:s');
|
||||
$d->save();
|
||||
_log($username .' '. $_L['Login_Successful'],'User',$d['id']);
|
||||
r2(U.'home');
|
||||
}else{
|
||||
_msglog('e',$_L['Invalid_Username_or_Password']);
|
||||
_log($username .' '. $_L['Failed_Login'],'User');
|
||||
r2(U.'login');
|
||||
}
|
||||
}else{
|
||||
_msglog('e',$_L['Invalid_Username_or_Password']);
|
||||
r2(U.'login');
|
||||
}
|
||||
}else{
|
||||
_msglog('e',$_L['Invalid_Username_or_Password']);
|
||||
r2(U.'login');
|
||||
}*/
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -204,9 +204,11 @@ switch ($action) {
|
||||
|
||||
case 'app-post':
|
||||
$company = _post('company');
|
||||
$theme = _post('theme');
|
||||
$telegram_bot = _post('telegram_bot');
|
||||
$telegram_target_id = _post('telegram_target_id');
|
||||
$sms_url = _post('sms_url');
|
||||
$address = _post('address');
|
||||
if ($company == '' or $theme == '' or $address == '') {
|
||||
if ($company == '') {
|
||||
r2(U . 'settings/app', 'e', $_L['All_field_is_required']);
|
||||
} else {
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'CompanyName')->find_one();
|
||||
@ -222,9 +224,38 @@ switch ($action) {
|
||||
$d->value = $phone;
|
||||
$d->save();
|
||||
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'theme')->find_one();
|
||||
$d->value = $theme;
|
||||
$d->save();
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'telegram_bot')->find_one();
|
||||
if($d){
|
||||
$d->value = $telegram_bot;
|
||||
$d->save();
|
||||
}else{
|
||||
$d = ORM::for_table('tbl_appconfig')->create();
|
||||
$d->setting = 'telegram_bot';
|
||||
$d->value = $telegram_bot;
|
||||
$d->save();
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'telegram_target_id')->find_one();
|
||||
if($d){
|
||||
$d->value = $telegram_target_id;
|
||||
$d->save();
|
||||
}else{
|
||||
$d = ORM::for_table('tbl_appconfig')->create();
|
||||
$d->setting = 'telegram_target_id';
|
||||
$d->value = $telegram_target_id;
|
||||
$d->save();
|
||||
}
|
||||
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'sms_url')->find_one();
|
||||
if($d){
|
||||
$d->setting = $sms_url;
|
||||
$d->save();
|
||||
}else{
|
||||
$d = ORM::for_table('tbl_appconfig')->create();
|
||||
$d->setting = 'sms_url';
|
||||
$d->value = $sms_url;
|
||||
$d->save();
|
||||
}
|
||||
|
||||
$note = _post('note');
|
||||
$d = ORM::for_table('tbl_appconfig')->where('setting', 'note')->find_one();
|
||||
|
@ -1,57 +1,83 @@
|
||||
{include file="sections/header.tpl"}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12">
|
||||
<div class="panel panel-default panel-hovered panel-stacked mb30">
|
||||
<div class="panel-heading">{$_L['General_Settings']}</div>
|
||||
<div class="panel-body">
|
||||
|
||||
<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" >
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-12">
|
||||
<div class="panel panel-default panel-hovered panel-stacked mb30">
|
||||
<div class="panel-heading">{$_L['General_Settings']}</div>
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['App_Name']}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" id="company" name="company" value="{$_c['CompanyName']}">
|
||||
<span class="help-block">{$_L['App_Name_Help_Text']}</span>
|
||||
</div>
|
||||
<label class="col-md-2 control-label">{$_L['App_Name']}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" required class="form-control" id="company" name="company" value="{$_c['CompanyName']}">
|
||||
<span class="help-block">{$_L['App_Name_Help_Text']}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Address']}</label>
|
||||
<div class="col-md-6">
|
||||
<textarea class="form-control" id="address" name="address" rows="3">{$_c['address']}</textarea>
|
||||
<span class="help-block">{$_L['You_can_use_html_tag']}</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Address']}</label>
|
||||
<div class="col-md-6">
|
||||
<textarea class="form-control" id="address" name="address" rows="3">{$_c['address']}</textarea>
|
||||
<span class="help-block">{$_L['You_can_use_html_tag']}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Phone_Number']}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" id="phone" name="phone" value="{$_c['phone']}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">{$_L['Phone_Number']}</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" id="phone" name="phone" value="{$_c['phone']}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group hidden">
|
||||
<label class="col-md-2 control-label">Theme</label>
|
||||
<div class="col-md-6">
|
||||
<select name="theme" id="theme" class="form-control">
|
||||
<option value="default" {if $_c['theme'] eq 'default'}selected="selected" {/if}>Default</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">Theme</label>
|
||||
<div class="col-md-6">
|
||||
<select name="theme" id="theme" class="form-control">
|
||||
<option value="default" {if $_c['theme'] eq 'default'}selected="selected" {/if}>Default</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">Note Invoice</label>
|
||||
<div class="col-md-6">
|
||||
<textarea class="form-control" id="note" name="note" rows="3">{$_c['note']}</textarea>
|
||||
<span class="help-block">{$_L['You_can_use_html_tag']}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-heading">Telegram Notification</div>
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">Telegram Bot Token</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" id="telegram_bot" name="telegram_bot" value="{$_c['telegram_bot']}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-lg-offset-2 col-lg-10">
|
||||
<button class="btn btn-primary waves-effect waves-light" type="submit">{$_L['Save']}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">Telegram Target ID</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" id="telegram_target_id" name="telegram_target_id" value="{$_c['telegram_target_id']}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-heading">SMS/Whatsapp Notification</div>
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">Server URL</label>
|
||||
<div class="col-md-6">
|
||||
<input type="text" class="form-control" id="sms_url" name="sms_url" value="{$_c['sms_url']}" placeholder="https://domain/?param_number=[number]¶m_text=[text]&secret=">
|
||||
<p class="help-block">Must include <b>[text]</b> & <b>[number]</b>, it will be replaced.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-heading">Invoice</div>
|
||||
<div class="panel-body">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">Note Invoice</label>
|
||||
<div class="col-md-6">
|
||||
<textarea class="form-control" id="note" name="note" rows="3">{$_c['note']}</textarea>
|
||||
<span class="help-block">{$_L['You_can_use_html_tag']}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-lg-offset-2 col-lg-10">
|
||||
<button class="btn btn-primary waves-effect waves-light" type="submit">{$_L['Save']}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{include file="sections/footer.tpl"}
|
||||
|
@ -65,10 +65,6 @@
|
||||
<input type="text" name="address" id="address" value="{$address}" class="md-input">
|
||||
<label>{$_L['Address']}</label>
|
||||
</div>
|
||||
<div class="md-input-container md-float-label">
|
||||
<input type="text" required class="md-input" value="{$phonenumber}" id="phonenumber" name="phonenumber">
|
||||
<label>{$_L['Phone_Number']}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -86,11 +82,6 @@
|
||||
<input type="password" required class="md-input" id="cpassword" name="cpassword">
|
||||
<label>{$_L['Confirm_Password']}</label>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="md-input-container md-float-label">
|
||||
<input type="text" required class="md-input" id="kodevoucher" name="kodevoucher">
|
||||
<label>{$_L['Code_Voucher']}</label>
|
||||
</div>
|
||||
<div class="btn-group btn-group-justified mb15">
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-primary waves-effect waves-light" type="submit">{$_L['Register']}</button>
|
||||
|
@ -263,9 +263,9 @@
|
||||
</ul>
|
||||
</li>
|
||||
<li {if $_system_menu eq 'disquss'}class="active"{/if}>
|
||||
<a href="{$_url}disquss">
|
||||
<a href="https://github.com/ibnux/phpmixbill/discussions" target="_blank">
|
||||
<i class="ion ion-chatbubbles"></i>
|
||||
<span class="text">Disquss</span>
|
||||
<span class="text">Discussions</span>
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
|
@ -2,34 +2,6 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">{$_L['Welcome']}, {$_user['fullname']}</div>
|
||||
<div class="panel-body" style="height:296px;max-height:296px;overflow:scroll;">
|
||||
<p>{$_L['Welcome_Text_User']}</p>
|
||||
<ul>
|
||||
<li> {$_L['Account_Information']}</li>
|
||||
<li> <a href="{$_url}voucher/activation">{$_L['Voucher_Activation']}</a></li>
|
||||
<li> <a href="{$_url}voucher/list-activated">{$_L['List_Activated_Voucher']}</a></li>
|
||||
<li> <a href="{$_url}accounts/change-password">{$_L['Change_Password']}</a></li>
|
||||
<li> {$_L['Order_Voucher']}</li>
|
||||
<li> {$_L['Private_Message']}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<br class="visible-xs-inline visible-sm-inline">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">{$_L['Announcement']}</div>
|
||||
<div class="panel-body" style="height:296px;max-height:296px;overflow:scroll;">
|
||||
{include file="$_path/../pages/Announcement.html"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="panel panel-default table-condensed">
|
||||
<div class="panel-heading">{$_L['Account_Information']}</div>
|
||||
<table class="table table-striped table-bordered">
|
||||
@ -51,9 +23,7 @@
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<br class="visible-xs-inline visible-sm-inline">
|
||||
<br>
|
||||
<div class="panel panel-primary panel-hovered panel-stacked mb30">
|
||||
<div class="panel-heading">{$_L['Voucher_Activation']}</div>
|
||||
<div class="panel-body">
|
||||
@ -74,6 +44,15 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<br class="visible-xs-inline visible-sm-inline">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">{$_L['Announcement']}</div>
|
||||
<div class="panel-body" style="height:296px;max-height:296px;overflow:scroll;">
|
||||
{include file="$_path/../pages/Announcement.html"}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{include file="sections/user-footer.tpl"}
|
||||
|
Loading…
x
Reference in New Issue
Block a user