forked from kevinowino869/mitrobill
Registration no need has voucher
This commit is contained in:
@ -22,7 +22,7 @@ if($admin['user_type'] != 'Admin' AND $admin['user_type'] != 'Sales'){
|
||||
switch ($action) {
|
||||
case 'list':
|
||||
$ui->assign('xfooter', '<script type="text/javascript" src="ui/lib/c/bandwidth.js"></script>');
|
||||
|
||||
|
||||
$name = _post('name');
|
||||
if ($name != ''){
|
||||
$paginator = Paginator::bootstrap('tbl_bandwidth','name_bw','%'.$name.'%');
|
||||
@ -31,7 +31,7 @@ switch ($action) {
|
||||
$paginator = Paginator::bootstrap('tbl_bandwidth');
|
||||
$d = ORM::for_table('tbl_bandwidth')->offset($paginator['startpoint'])->limit($paginator['limit'])->order_by_desc('id')->find_many();
|
||||
}
|
||||
|
||||
|
||||
$ui->assign('d',$d);
|
||||
$ui->assign('paginator',$paginator);
|
||||
$ui->display('bandwidth.tpl');
|
||||
@ -67,12 +67,12 @@ switch ($action) {
|
||||
$rate_down_unit = _post('rate_down_unit');
|
||||
$rate_up = _post('rate_up');
|
||||
$rate_up_unit = _post('rate_up_unit');
|
||||
|
||||
|
||||
$msg = '';
|
||||
if(Validator::Length($name,16,4) == false){
|
||||
$msg .= 'Name should be between 5 to 15 characters'. '<br>';
|
||||
}
|
||||
|
||||
|
||||
if($rate_down_unit == 'Kbps'){ $unit_rate_down = $rate_down * 1024; }else{ $unit_rate_down = $rate_down * 1048576; }
|
||||
if($rate_up_unit == 'Kbps'){ $unit_rate_up = $min_up * 1024; }else{ $unit_rate_up = $min_up * 1048576; }
|
||||
|
||||
@ -89,7 +89,7 @@ switch ($action) {
|
||||
$d->rate_up = $rate_up;
|
||||
$d->rate_up_unit = $rate_up_unit;
|
||||
$d->save();
|
||||
|
||||
|
||||
r2(U . 'bandwidth/list', 's', $_L['Created_Successfully']);
|
||||
}else{
|
||||
r2(U . 'bandwidth/add', 'e', $msg);
|
||||
@ -129,7 +129,7 @@ switch ($action) {
|
||||
$d->rate_up = $rate_up;
|
||||
$d->rate_up_unit = $rate_up_unit;
|
||||
$d->save();
|
||||
|
||||
|
||||
r2(U . 'bandwidth/list', 's', $_L['Updated_Successfully']);
|
||||
}else{
|
||||
r2(U . 'bandwidth/edit/'.$id, 'e', $msg);
|
||||
|
Reference in New Issue
Block a user