diff --git a/system/controllers/routers.php b/system/controllers/routers.php
index 45fb59aa..e8c83089 100644
--- a/system/controllers/routers.php
+++ b/system/controllers/routers.php
@@ -69,6 +69,7 @@ switch ($action) {
$username = _post('username');
$password = _post('password');
$description = _post('description');
+ $enabled = _post('enabled')*1;
$msg = '';
if(Validator::Length($name,30,4) == false){
@@ -99,6 +100,7 @@ switch ($action) {
$d->username = $username;
$d->password = $password;
$d->description = $description;
+ $d->enabled = $enabled;
$d->save();
r2(U . 'routers/list', 's', $_L['Created_Successfully']);
@@ -114,7 +116,7 @@ switch ($action) {
$username = _post('username');
$password = _post('password');
$description = _post('description');
-
+ $enabled = $_POST['enabled']*1;
$msg = '';
if(Validator::Length($name,30,4) == false){
$msg .= 'Name should be between 5 to 30 characters'. '
';
@@ -163,25 +165,28 @@ switch ($action) {
$d->username = $username;
$d->password = $password;
$d->description = $description;
+ $d->enabled = $enabled;
$d->save();
- $p = ORM::for_table('tbl_plans')->where('routers',$oldname)->find_result_set();
- $p->set('routers',$name);
- $p->save();
- $p = ORM::for_table('tbl_payment_gateway')->where('routers',$oldname)->find_result_set();
- $p->set('routers',$name);
- $p->save();
- $p = ORM::for_table('tbl_pool')->where('routers',$oldname)->find_result_set();
- $p->set('routers',$name);
- $p->save();
- $p = ORM::for_table('tbl_transactions')->where('routers',$oldname)->find_result_set();
- $p->set('routers',$name);
- $p->save();
- $p = ORM::for_table('tbl_user_recharges')->where('routers',$oldname)->find_result_set();
- $p->set('routers',$name);
- $p->save();
- $p = ORM::for_table('tbl_voucher')->where('routers',$oldname)->find_result_set();
- $p->set('routers',$name);
- $p->save();
+ if($name!=$oldname){
+ $p = ORM::for_table('tbl_plans')->where('routers',$oldname)->find_result_set();
+ $p->set('routers',$name);
+ $p->save();
+ $p = ORM::for_table('tbl_payment_gateway')->where('routers',$oldname)->find_result_set();
+ $p->set('routers',$name);
+ $p->save();
+ $p = ORM::for_table('tbl_pool')->where('routers',$oldname)->find_result_set();
+ $p->set('routers',$name);
+ $p->save();
+ $p = ORM::for_table('tbl_transactions')->where('routers',$oldname)->find_result_set();
+ $p->set('routers',$name);
+ $p->save();
+ $p = ORM::for_table('tbl_user_recharges')->where('routers',$oldname)->find_result_set();
+ $p->set('routers',$name);
+ $p->save();
+ $p = ORM::for_table('tbl_voucher')->where('routers',$oldname)->find_result_set();
+ $p->set('routers',$name);
+ $p->save();
+ }
r2(U . 'routers/list', 's', $_L['Updated_Successfully']);
}else{
r2(U . 'routers/edit/'.$id, 'e', $msg);
diff --git a/system/controllers/services.php b/system/controllers/services.php
index dc2d8480..15f82b09 100644
--- a/system/controllers/services.php
+++ b/system/controllers/services.php
@@ -109,6 +109,7 @@ switch ($action) {
$validity = _post('validity');
$validity_unit = _post('validity_unit');
$routers = _post('routers');
+ $enabled = _post('enabled')*1;
$msg = '';
if (Validator::UnsignedNumber($validity) == false) {
@@ -172,6 +173,7 @@ switch ($action) {
$d->validity_unit = $validity_unit;
$d->shared_users = $sharedusers;
$d->routers = $routers;
+ $d->enabled = $enabled;
$d->save();
r2(U . 'services/hotspot', 's', $_L['Created_Successfully']);
@@ -196,6 +198,7 @@ switch ($action) {
$validity = _post('validity');
$validity_unit = _post('validity_unit');
$routers = _post('routers');
+ $enabled = _post('enabled')*1;
$msg = '';
if (Validator::UnsignedNumber($validity) == false) {
@@ -264,6 +267,7 @@ switch ($action) {
$d->validity_unit = $validity_unit;
$d->shared_users = $sharedusers;
$d->routers = $routers;
+ $d->enabled = $enabled;
$d->save();
r2(U . 'services/hotspot', 's', $_L['Updated_Successfully']);
@@ -357,6 +361,7 @@ switch ($action) {
$validity_unit = _post('validity_unit');
$routers = _post('routers');
$pool = _post('pool_name');
+ $enabled = _post('enabled')*1;
$msg = '';
if (Validator::UnsignedNumber($validity) == false) {
@@ -415,6 +420,7 @@ switch ($action) {
$d->validity_unit = $validity_unit;
$d->routers = $routers;
$d->pool = $pool;
+ $d->enabled = $enabled;
$d->save();
r2(U . 'services/pppoe', 's', $_L['Created_Successfully']);
@@ -432,6 +438,7 @@ switch ($action) {
$validity_unit = _post('validity_unit');
$routers = _post('routers');
$pool = _post('pool_name');
+ $enabled = _post('enabled')*1;
$msg = '';
if (Validator::UnsignedNumber($validity) == false) {
@@ -495,6 +502,7 @@ switch ($action) {
$d->validity_unit = $validity_unit;
$d->routers = $routers;
$d->pool = $pool;
+ $d->enabled = $enabled;
$d->save();
r2(U . 'services/pppoe', 's', $_L['Updated_Successfully']);
diff --git a/system/lan/indonesia/common.lan.php b/system/lan/indonesia/common.lan.php
index 6259ed43..4c4b7e68 100644
--- a/system/lan/indonesia/common.lan.php
+++ b/system/lan/indonesia/common.lan.php
@@ -254,3 +254,5 @@ $_L['Explain_Coverage_of_router'] = 'Jelaskan Cakupan wilayah hotspot';
$_L['Name_of_Area_that_router_operated'] = 'Nama Lokasi/Wilayah Router beroperasi';
$_L['Payment_Notification_URL_Recurring_Notification_URL_Pay_Account_Notification_URL'] = 'Payment Notification URL, Recurring Notification URL, Pay Account Notification URL';
$_L['Finish_Redirect_URL_Unfinish_Redirect_URL_Error_Redirect_URL'] = 'Finish Redirect URL, Unfinish Redirect URL, Error Redirect URL';
+$_L['Status'] = 'Status';
+$_L['Status'] = 'Status';
diff --git a/system/radius.php b/system/radius.php
new file mode 100644
index 00000000..bd6ae1de
--- /dev/null
+++ b/system/radius.php
@@ -0,0 +1,26 @@
+find_many();
+foreach($result as $value){
+ $config[$value['setting']]=$value['value'];
+}
+date_default_timezone_set($config['timezone']);
\ No newline at end of file
diff --git a/ui/ui/hotspot-add.tpl b/ui/ui/hotspot-add.tpl
index d3338abc..de8d0096 100644
--- a/ui/ui/hotspot-add.tpl
+++ b/ui/ui/hotspot-add.tpl
@@ -5,118 +5,127 @@