Completed
Push — v3.0 ( 541912...7b8f24 )
by Samir
12:38 queued 01:00
created
web_interface/astpp/application/modules/pricing/libraries/pricing_form.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,8 +21,9 @@  discard block
 block discarded – undo
21 21
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
22 22
 ###############################################################################
23 23
 
24
-if (!defined('BASEPATH'))
25
-	exit('No direct script access allowed');
24
+if (!defined('BASEPATH')) {
25
+	exit('No direct script access allowed');
26
+}
26 27
 
27 28
 class pricing_form {
28 29
 	function __construct($library_name = '') {
@@ -41,8 +42,7 @@  discard block
 block discarded – undo
41 42
 		array('Markup(%)', 'INPUT', array('name' => 'markup', 'value' => "0" ,  'size' => '20',  'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter account number'),
42 43
 		array('Status', 'status', 'SELECT', '', '', 'tOOL TIP', 'Please Select Status', '', '', '', 'set_status'),
43 44
 		);
44
-	}
45
-	else{
45
+	} else{
46 46
 	  $form['Rate Group Information'] = array(
47 47
 		array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''),
48 48
 		array('', 'HIDDEN', array('name' => 'status', 'value' => '1'), '', '', ''),
Please login to merge, or discard this patch.
astpp/application/modules/refill_coupon/models/refill_coupon_model.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,10 +33,11 @@
 block discarded – undo
33 33
 		$reseller_id=$accountinfo['type']==1 ? $accountinfo['id'] : 0;
34 34
 		$where=array('reseller_id'=>$reseller_id);
35 35
 		if ($flag) {
36
-		if($export)
37
-		  $query = $this->db_model->select("*", "refill_coupon",$where, "id", "ASC",'','');
38
-		else
39
-		$query = $this->db_model->select("*", "refill_coupon",$where, "id", "ASC", $limit, $start);
36
+		if($export) {
37
+				  $query = $this->db_model->select("*", "refill_coupon",$where, "id", "ASC",'','');
38
+		} else {
39
+				$query = $this->db_model->select("*", "refill_coupon",$where, "id", "ASC", $limit, $start);
40
+		}
40 41
 		} else {
41 42
 			$query = $this->db_model->countQuery("*", "refill_coupon",$where);
42 43
 		}
Please login to merge, or discard this patch.
astpp/application/modules/refill_coupon/controllers/refill_coupon.php 1 patch
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -32,8 +32,9 @@  discard block
 block discarded – undo
32 32
 		  $this->load->library("refill_coupon_form");
33 33
 		  $this->load->library("astpp/form");
34 34
 		  $this->load->library("session");
35
-		  if ($this->session->userdata('user_login') == FALSE)
36
-			redirect(base_url() . 'login/login');
35
+		  if ($this->session->userdata('user_login') == FALSE) {
36
+		  			redirect(base_url() . 'login/login');
37
+		  }
37 38
 	  }
38 39
 	function refill_coupon_list(){
39 40
 	if($this->session->userdata('logintype') == 0 || $this->session->userdata('logintype') == 3){
@@ -120,8 +121,7 @@  discard block
 block discarded – undo
120 121
 				$data['validation_errors'] = validation_errors();
121 122
 				echo $data['validation_errors'];
122 123
 				exit;
123
-		}
124
-		else {    
124
+		} else {    
125 125
 		  if($account_length<=strlen($add_array['prefix'])){
126 126
 			  echo json_encode(array("count_error"=>"You Can Not Create ".$add_array['count']." Accounts with ".$add_array['prefix']." prefix."));
127 127
 			  exit;      
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 		  if($currentlength > 0 && $add_array['count'] > $currentlength){
134 134
 			echo json_encode(array("count_error"=>"You Can Create Maximum ".$currentlength." accounts with ".$add_array['prefix']." prefix"));
135 135
 			exit;      
136
-		  }else{
136
+		  } else{
137 137
 			$this->refill_coupon_model->add_refill_coupon($add_array);
138 138
 			echo json_encode(array("SUCCESS"=> "Refill coupon created successfully!"));
139 139
 			exit;
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/animap/controllers/animap.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,9 @@
 block discarded – undo
32 32
 		$this->load->library('astpp/form');
33 33
 		$this->load->model('animap_model');
34 34
 
35
-		if ($this->session->userdata('user_login') == FALSE)
36
-			redirect(base_url() . '/astpp/login');
35
+		if ($this->session->userdata('user_login') == FALSE) {
36
+					redirect(base_url() . '/astpp/login');
37
+		}
37 38
 	}
38 39
 
39 40
 	function animap_add() {
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/animap/libraries/animap_form.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,9 @@
 block discarded – undo
22 22
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
23 23
 ###############################################################################
24 24
 
25
-if (!defined('BASEPATH'))
26
-	exit('No direct script access allowed');
25
+if (!defined('BASEPATH')) {
26
+	exit('No direct script access allowed');
27
+}
27 28
 
28 29
 class Animap_form {
29 30
 	  	function __construct($library_name = '') {
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/taxes/models/taxes_model.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 		$this->db_model->build_search('taxes_list_search');
31 31
 		if ($this->session->userdata('logintype') == 1 || $this->session->userdata('logintype') == 5) {
32 32
 			$where = array("reseller_id"=>$this->session->userdata["accountinfo"]['id']);
33
-		}else{
33
+		} else{
34 34
 		$where =array("reseller_id"=>0);
35 35
 		}
36 36
 		if ($flag) {
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 		$data["creation_date"] = date("Y-m-d H:i:s");
47 47
 		 if ($this->session->userdata('logintype') == 1 || $this->session->userdata('logintype') == 5) {
48 48
 	  $data['reseller_id'] = $this->session->userdata["accountinfo"]['id'];
49
-		 }else{
49
+		 } else{
50 50
 	  $data['reseller_id'] =0;
51 51
 		 }
52 52
 		$this->db->insert("taxes", $data);
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/taxes/controllers/taxes.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,9 @@
 block discarded – undo
32 32
 		$this->load->library('astpp/form');
33 33
 		$this->load->model('taxes_model');
34 34
 
35
-		if ($this->session->userdata('user_login') == FALSE)
36
-			redirect(base_url() . '/astpp/login');
35
+		if ($this->session->userdata('user_login') == FALSE) {
36
+					redirect(base_url() . '/astpp/login');
37
+		}
37 38
 	}
38 39
 
39 40
 	function taxes_add() {
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/taxes/libraries/taxes_form.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,9 @@
 block discarded – undo
20 20
 # You should have received a copy of the GNU Affero General Public License
21 21
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
22 22
 ###############################################################################
23
-if (!defined('BASEPATH'))
24
-	exit('No direct script access allowed');
23
+if (!defined('BASEPATH')) {
24
+	exit('No direct script access allowed');
25
+}
25 26
 
26 27
 class Taxes_form {
27 28
 	function __construct() {
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/package/models/package_model.php 1 patch
Braces   +14 added lines, -17 removed lines patch added patch discarded remove patch
@@ -50,11 +50,12 @@  discard block
 block discarded – undo
50 50
 	 $this->db->select('pricelist_id');
51 51
 	 $account_info=(array)$this->db->get('accounts')->first_row();     
52 52
 	 $where=array('pricelist_id'=>$account_info['pricelist_id']);
53
-	  if(!empty($like_str))
54
-	  $this->db->where($like_str); 
53
+	  if(!empty($like_str)) {
54
+	  	  $this->db->where($like_str);
55
+	  }
55 56
 	 if ($flag) {
56 57
 	   $query = $this->db_model->select("*", "packages", $where, "id", "ASC", $limit, $start);
57
-	 }else {
58
+	 } else {
58 59
 	   $query = $this->db_model->countQuery("*", "packages", $where);
59 60
 	 }
60 61
 	  return $query;
@@ -120,8 +121,7 @@  discard block
 block discarded – undo
120 121
 		$this->db->where_in('accountid',$acc_arr);
121 122
 		if($flag){
122 123
 		  $this->db->select('*');
123
-		}
124
-		else{
124
+		} else{
125 125
 		  $this->db->select('count(id) as count');
126 126
 		}
127 127
 		if($flag){
@@ -129,27 +129,26 @@  discard block
 block discarded – undo
129 129
 		}
130 130
 			if (isset($_GET['sortname']) && $_GET['sortname'] != 'undefined'){
131 131
 				$this->db->order_by($_GET['sortname'], ($_GET['sortorder']=='undefined')?'desc':$_GET['sortorder']);
132
-			}else{
132
+			} else{
133 133
 				$this->db->order_by('seconds','desc');
134 134
 			}
135 135
 		$result=$this->db->get('counters');
136 136
 // 	    echo $this->db->last_query();exit;    
137 137
 		if($flag){
138 138
 		  return $result;
139
-		}else{
139
+		} else{
140 140
 		  $result=$result->result_array();
141 141
 		  return $result[0]['count'];
142 142
 		}
143
-	  }else{
143
+	  } else{
144 144
 			if($flag){
145 145
 				$query=(object)array('num_rows'=>0);
146
-			}
147
-			else{
146
+			} else{
148 147
 				$query=0;
149 148
 			}
150 149
 	  return $query;
151 150
 		}
152
-	}else{
151
+	} else{
153 152
           
154 153
 		 if($result->num_rows() >0){
155 154
 		$acc_arr=array();
@@ -162,8 +161,7 @@  discard block
 block discarded – undo
162 161
          
163 162
 		 if($flag){
164 163
 	  $this->db->select('*');
165
-		 }
166
-		 else{
164
+		 } else{
167 165
 		  $this->db->select('count(id) as count');
168 166
 		 }
169 167
 		 if($flag){
@@ -176,17 +174,16 @@  discard block
 block discarded – undo
176 174
 		  if($flag){
177 175
 	        
178 176
 		return $result;
179
-		  }else{
177
+		  } else{
180 178
 		$result=$result->result_array();
181 179
 		
182 180
 		return $result[0]['count'];
183 181
 		  }
184
-		 }else{
182
+		 } else{
185 183
 		  if($flag){
186 184
 	          
187 185
 		  $query=(object)array('num_rows'=>0);
188
-		  }
189
-		  else{
186
+		  } else{
190 187
 		  $query=0;
191 188
 		  }
192 189
 // 	echo $this->db->last_query();exit;    
Please login to merge, or discard this patch.