=h){return false}}return true};this._ap=function(h,q,l,o){var k=this.image;var p=qrcode.height;var j=this._al;j[0]=0;j[1]=0;j[2]=0;var n=h;while(n>=0&&k[q+n*qrcode.width]&&j[1]<=l){j[1]++;n--}if(n<0||j[1]>l){return NaN}while(n>=0&&!k[q+n*qrcode.width]&&j[0]<=l){j[0]++;n--}if(j[0]>l){return NaN}n=h+1;while(nl){return NaN}while(n
l){return NaN}var m=j[0]+j[1]+j[2];if(5*Math.abs(m-o)>=2*o){return NaN}return this._ao(j)?this._an(j,n):NaN};this._cu=function(l,o,n){var m=l[0]+l[1]+l[2];var t=this._an(l,n);var k=this._ap(o,Math.floor(t),2*l[1],m);if(!isNaN(k)){var s=(l[0]+l[1]+l[2])/3;var q=this._cv.length;for(var p=0;p>1);var m=new Array(0,0,0);for(var k=0;k>1):-((k+1)>>1));m[0]=0;m[1]=0;m[2]=0;var n=p;while(n=10&&a<=26){this.dataLengthMode=1}else{if(a>=27&&a<=40){this.dataLengthMode=2}}}this._gd=function(f){var k=0;if(f>(this._cw-f+1);this._cw-=f;return k}else{if(f>(8-(f-(this._cw+1))));this._cw=this._cw-f%8;if(this._cw<0){this._cw=8+this._cw}return k}else{if(f>(8-(f-(this._cw+1+8)));k=g+d+l;this._cw=this._cw-(f-8)%8;if(this._cw<0){this._cw=8+this._cw}return k}else{return 0}}}};this.NextMode=function(){if((this._ed>this.blocks.length-this._en-2)){return 0}else{return this._gd(4)}};this.getDataLength=function(d){var e=0;while(true){if((d>>e)==1){break}e++}return this._gd(qrcode._eo[this.dataLengthMode][e])};this.getRomanAndFigureString=function(h){var f=h;var g=0;var j="";var d=new Array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":");do{if(f>1){g=this._gd(11);var i=Math.floor(g/45);var e=g%45;j+=d[i];j+=d[e];f-=2}else{if(f==1){g=this._gd(6);j+=d[g];f-=1}}}while(f>0);return j};this.getFigureString=function(f){var d=f;var e=0;var g="";do{if(d>=3){e=this._gd(10);if(e<100){g+="0"}if(e<10){g+="0"}d-=3}else{if(d==2){e=this._gd(7);if(e<10){g+="0"}d-=2}else{if(d==1){e=this._gd(4);d-=1}}}g+=e}while(d>0);return g};this.get8bitByteArray=function(g){var e=g;var f=0;var d=new Array();do{f=this._gd(8);d.push(f);e--}while(e>0);return d};this.getKanjiString=function(j){var g=j;var i=0;var h="";do{i=this._gd(13);var e=i%192;var f=i/192;var k=(f<<8)+e;var d=0;if(k+33088<=40956){d=k+33088}else{d=k+49472}h+=String.fromCharCode(d);g--}while(g>0);return h};this.parseECIValue=function(){var f=0;var e=this._gd(8);if((e&128)==0){f=e&127}if((e&192)==128){var d=this._gd(8);f=((e&63)<<8)|d}if((e&224)==192){var g=this._gd(8);f=((e&31)<<16)|g}return f};this.__defineGetter__("DataByte",function(){var h=new Array();var e=1;var f=2;var d=4;var n=7;var p=8;do{var l=this.NextMode();if(l==0){if(h.length>0){break}else{throw"Empty data block"}}if(l!=e&&l!=f&&l!=d&&l!=p&&l!=n){throw"Invalid mode: "+l+" in (block:"+this._ed+" bit:"+this._cw+")"}if(l==n){var o=this.parseECIValue()}else{var g=this.getDataLength(l);if(g<1){throw"Invalid data length: "+g}switch(l){case e:var m=this.getFigureString(g);var k=new Array(m.length);for(var i=0;iwhere('id', $routes['2'])->where('username', $user['username'])->findOne();
if ($bill['type'] == 'Hotspot' && $bill['status'] == 'on') {
- $dvc = Package::getDevice($d);
+ $p = ORM::for_table('tbl_plans')->find_one($bill['plan_id']);
+ $dvc = Package::getDevice($p);
if (file_exists($dvc) && $_app_stage != 'demo') {
require_once $dvc;
- if ((new $d['device'])->online_customer($user, $bill['routers'])) {
+ if ((new $p['device'])->online_customer($user, $bill['routers'])) {
die(''.Lang::T('You are Online, Logout?').'');
} else {
if (!empty($_SESSION['nux-mac']) && !empty($_SESSION['nux-ip'])) {
diff --git a/system/controllers/dashboard.php b/system/controllers/dashboard.php
index 7f5e7acb..387ddaa4 100644
--- a/system/controllers/dashboard.php
+++ b/system/controllers/dashboard.php
@@ -24,7 +24,7 @@ $reset_day = $config['reset_day'];
if(empty($reset_day)){
$reset_day = 1;
}
-
+$reset_day = 20;
//first day of month
if($reset_day >= date("d")){
$first_day_month = date('Y-m-'.$reset_day);
diff --git a/system/controllers/home.php b/system/controllers/home.php
index ce172d87..ee582821 100644
--- a/system/controllers/home.php
+++ b/system/controllers/home.php
@@ -230,5 +230,6 @@ $ui->assign('unpaid', ORM::for_table('tbl_payment_gateway')
->where('username', $user['username'])
->where('status', 1)
->find_one());
+$ui->assign('code', alphanumeric(_get('code')));
run_hook('view_customer_dashboard'); #HOOK
$ui->display('user-dashboard.tpl');
diff --git a/system/controllers/login.php b/system/controllers/login.php
index 9bf565ba..4f3538f9 100644
--- a/system/controllers/login.php
+++ b/system/controllers/login.php
@@ -182,6 +182,7 @@ switch ($do) {
default:
run_hook('customer_view_login'); #HOOK
if ($config['disable_registration'] == 'yes') {
+ $ui->assign('code', alphanumeric(_get('code')));
$ui->display('user-login-noreg.tpl');
} else {
$ui->display('user-login.tpl');
diff --git a/system/controllers/voucher.php b/system/controllers/voucher.php
index 8abcd235..bd08865d 100644
--- a/system/controllers/voucher.php
+++ b/system/controllers/voucher.php
@@ -17,6 +17,7 @@ switch ($action) {
case 'activation':
run_hook('view_activate_voucher'); #HOOK
+ $ui->assign('code', alphanumeric(_get('code')));
$ui->display('user-activation.tpl');
break;
diff --git a/system/lan/english.json b/system/lan/english.json
index b321a49f..3268664e 100644
--- a/system/lan/english.json
+++ b/system/lan/english.json
@@ -642,5 +642,7 @@
"Time": "Time",
"Data": "Data",
"Category": "Category",
- "later": "later"
+ "later": "later",
+ "Package_Details": "Package Details",
+ "Summary": "Summary"
}
\ No newline at end of file
diff --git a/ui/ui/user-activation.tpl b/ui/ui/user-activation.tpl
index 69ecb87d..7f36045b 100644
--- a/ui/ui/user-activation.tpl
+++ b/ui/ui/user-activation.tpl
@@ -2,34 +2,33 @@
-
+
-
+
{include file="$_path/../pages/Order_Voucher.html"}
-
-
-
-
-
-
{Lang::T('Voucher Activation')}
-