Completed
Push — v3.0 ( e28df5...5be1a9 )
by Samir
13:00
created
astpp/application/modules/accounts/views/view_bulk_account_creation.php 1 patch
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,11 +60,12 @@
 block discarded – undo
60 60
 						   $validation_array=json_decode($validation_errors);
61 61
 						   if(is_object($validation_array)){
62 62
 						   $validation_array = get_object_vars($validation_array);
63
-						   foreach($validation_array as $key=>$value)
64
-					  echo $value."<br/>";
63
+						   foreach($validation_array as $key=>$value) {
64
+						   					  echo $value."<br/>";
65
+						   }
66
+						   } else {
67
+						   					  echo $validation_errors;
65 68
 						   }
66
-						   else
67
-					  echo $validation_errors;
68 69
                            
69 70
 						}
70 71
 						?>
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/rates/models/rates_model.php 1 patch
Braces   +22 added lines, -17 removed lines patch added patch discarded remove patch
@@ -50,10 +50,11 @@  discard block
 block discarded – undo
50 50
 		$this->db_model->build_search('termination_rates_list_search');
51 51
 		$this->db->from('outbound_routes');
52 52
 		if ($flag) {
53
-			if ($export)
54
-				$this->db->limit($limit, $start);
53
+			if ($export) {
54
+							$this->db->limit($limit, $start);
55
+			}
55 56
 			$result = $this->db->get();
56
-		}else {
57
+		} else {
57 58
 			$result = $this->db->count_all_results();
58 59
 		}
59 60
 		return $result;
@@ -71,10 +72,11 @@  discard block
 block discarded – undo
71 72
        
72 73
 		$this->db_model->build_search('origination_rate_list_search');
73 74
 		if ($flag) {
74
-			if ($export)
75
-				$this->db->limit($limit, $start);
75
+			if ($export) {
76
+							$this->db->limit($limit, $start);
77
+			}
76 78
 			$result = $this->db_model->select("*", "routes", $where, "id", "ASC", $limit, $start);
77
-		}else {
79
+		} else {
78 80
 			$result = $this->db_model->countQuery("*", "routes", $where);
79 81
 		}
80 82
 // 	echo "<pre>";print_r($result->result());exit;
@@ -90,10 +92,11 @@  discard block
 block discarded – undo
90 92
 
91 93
 		$this->db_model->build_search('origination_rate_list_search');
92 94
 		if ($flag) {
93
-			if ($export)
94
-				$this->db->limit($limit, $start);
95
+			if ($export) {
96
+							$this->db->limit($limit, $start);
97
+			}
95 98
 			$result = $this->db_model->select("*", "routes", $where, "id", "ASC", $limit, $start);
96
-		}else {
99
+		} else {
97 100
 			$result = $this->db_model->countQuery("*", "routes", $where);
98 101
 		}
99 102
 		return $result;
@@ -301,10 +304,11 @@  discard block
 block discarded – undo
301 304
         }
302 305
         
303 306
         $updateflg = $this->db_model->build_batch_update_array($update_array);
304
-        if ($updateflg)
305
-            return $this->db->update("outbound_routes");
306
-        else
307
-            return false;
307
+        if ($updateflg) {
308
+                    return $this->db->update("outbound_routes");
309
+        } else {
310
+                    return false;
311
+        }
308 312
     }
309 313
     function origination_rate_batch_update($update_array) {
310 314
         $this->db_model->build_search('origination_rate_list_search');
@@ -313,10 +317,11 @@  discard block
 block discarded – undo
313 317
             $this->db->where("reseller_id", $account_data['id']);
314 318
         }
315 319
         $updateflg = $this->db_model->build_batch_update_array($update_array);
316
-        if ($updateflg)
317
-            return $this->db->update("routes");
318
-        else
319
-            return false;
320
+        if ($updateflg) {
321
+                    return $this->db->update("routes");
322
+        } else {
323
+                    return false;
324
+        }
320 325
     }
321 326
     function getreseller_rates_list($flag, $start = 0, $limit = 0, $export = false) {
322 327
         $this->db_model->build_search('resellerrates_list_search');
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/rates/controllers/rates.php 1 patch
Braces   +21 added lines, -25 removed lines patch added patch discarded remove patch
@@ -34,8 +34,9 @@  discard block
 block discarded – undo
34 34
 		$this->load->library('csvreader');
35 35
 	ini_set("memory_limit","2048M");
36 36
 	ini_set("max_execution_time","259200");
37
-		if ($this->session->userdata('user_login') == FALSE)
38
-			redirect(base_url() . '/astpp/login');
37
+		if ($this->session->userdata('user_login') == FALSE) {
38
+					redirect(base_url() . '/astpp/login');
39
+		}
39 40
 	}
40 41
 
41 42
 	function termination_rates_list() {
@@ -109,18 +110,17 @@  discard block
 block discarded – undo
109 110
 			  $data['check_header']=$check_header;
110 111
 			  $data['page_title'] = 'Termination Rates Preview';
111 112
 			  $this->session->set_userdata('import_termination_rate_csv',$actual_file_name);
112
-			}else{
113
+			} else{
113 114
 			  $data['error'] = "File Uploading Fail Please Try Again";
114 115
 			}
115 116
 					}
116
-				}
117
-				else{
117
+				} else{
118 118
 					$data['error']=="File Uploading Fail Please Try Again";
119 119
 				}
120
-			}else {
120
+			} else {
121 121
 				$data['error'] = "Invalid file format : Only CSV file allows to import records(Can't import empty file)";
122 122
 			}
123
-		}else{
123
+		} else{
124 124
 		$invalid_flag=true;
125 125
 		}
126 126
 		if ($invalid_flag) {
@@ -163,8 +163,7 @@  discard block
 block discarded – undo
163 163
 		if($str != ""){
164 164
 		  $invalid_array[$i]=$csv_data;
165 165
 		  $invalid_array[$i]['error'] = $str;
166
-		}
167
-		else{
166
+		} else{
168 167
 		  $csv_data['trunk_id']=$trunkID;
169 168
 		  $csv_data['pattern'] = "^" . $csv_data['pattern'] . ".*";
170 169
 		  $new_final_arr[$i]=$csv_data;
@@ -252,19 +251,17 @@  discard block
 block discarded – undo
252 251
 						$data['page_title'] = "Origination Rates Preview";
253 252
 						$data['check_header']=$check_header;
254 253
 						$this->session->set_userdata('import_origination_rate_csv',$actual_file_name);
255
-					}else{
254
+					} else{
256 255
 						$data['error'] = "File Uploading Fail Please Try Again";
257 256
 					}
258 257
 				}
259
-			 }   
260
-			else{
258
+			 } else{
261 259
 					$data['error']=="File Uploading Fail Please Try Again";
262 260
 				}
263
-		   }
264
-		   else {
261
+		   } else {
265 262
 				$data['error'] = "Invalid file format : Only CSV file allows to import records(Can't import empty file)";
266 263
 			}
267
-			}else{
264
+			} else{
268 265
 		$invalid_flag=true;
269 266
 			}
270 267
 		if ($invalid_flag) {
@@ -308,8 +305,7 @@  discard block
 block discarded – undo
308 305
 		if($str != ""){
309 306
 		  $invalid_array[$i]=$csv_data;
310 307
 		  $invalid_array[$i]['error'] = $str;
311
-		}
312
-		else{
308
+		} else{
313 309
 		  $csv_data['pricelist_id']=$pricelistID;
314 310
 		  $csv_data['trunk_id']=$trunkid;
315 311
 		  $csv_data['pattern'] = "^" . $csv_data['pattern'] . ".*";
@@ -371,12 +367,10 @@  discard block
 block discarded – undo
371 367
 		$count = count($error_field);
372 368
 		$str.= $count > 1 ? ' are not valid' : ' is not Valid';
373 369
 		return $str;
374
-		  }
375
-		  else{
370
+		  } else{
376 371
 		  return false;
377 372
 		  }
378
-	  }
379
-	  else{
373
+	  } else{
380 374
 	  $str=rtrim($str,',');
381 375
 		$error_field=explode(',',$str);
382 376
 		$count = count($error_field);
@@ -617,13 +611,15 @@  discard block
 block discarded – undo
617 611
 		$where = array('accountid' => $accountid);
618 612
 		$instant_search=$this->session->userdata('left_panel_search_'.$accounttype.'_pattern'); 
619 613
 		$like_str=!empty($instant_search) ? "(blocked_patterns like '%$instant_search%'  OR  destination like '%$instant_search%' )" :null;
620
-		if(!empty($like_str))
621
-		$this->db->where($like_str);
614
+		if(!empty($like_str)) {
615
+				$this->db->where($like_str);
616
+		}
622 617
 		$count_all = $this->db_model->countQuery("*", "block_patterns", $where);
623 618
 		$paging_data = $this->form->load_grid_config($count_all, $_GET['rp'], $_GET['page']);
624 619
 		$json_data = $paging_data["json_paging"];
625
-		if(!empty($like_str))
626
-		$this->db->where($like_str);
620
+		if(!empty($like_str)) {
621
+				$this->db->where($like_str);
622
+		}
627 623
 		$pattern_data = $this->db_model->getSelect("*", "block_patterns", $where, "id", "ASC", $paging_data["paging"]["page_no"], $paging_data["paging"]["start"]);
628 624
 		$grid_fields = json_decode($this->rates_form->build_pattern_list_for_customer($accountid,$accounttype));
629 625
 		$json_data['rows'] = $this->form->build_grid($pattern_data, $grid_fields);
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/rates/libraries/rates_form.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,8 +20,9 @@  discard block
 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 rates_form {
27 28
 	function __construct($library_name = '') {
@@ -62,8 +63,9 @@  discard block
 block discarded – undo
62 63
 	function get_origination_rate_form_fields() {
63 64
 	 $logintype=$this->CI->session->userdata('userlevel_logintype');
64 65
 		$trunk=null;
65
-		if($logintype !=1)
66
-	  $trunk = array('Force Trunk', 'trunk_id', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'name', 'trunks', 'build_dropdown', 'where_arr', array("status" => "0"));
66
+		if($logintype !=1) {
67
+			  $trunk = array('Force Trunk', 'trunk_id', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'name', 'trunks', 'build_dropdown', 'where_arr', array("status" => "0"));
68
+		}
67 69
 		$form['forms'] = array(base_url() . 'rates/origination_rate_save/', array('id' => 'origination_rate_form', 'method' => 'POST', 'name' => 'origination_rate_form'));
68 70
 		$form['Rate Information'] = array(
69 71
 			array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''),
@@ -165,8 +167,9 @@  discard block
 block discarded – undo
165 167
 	function origination_rate_batch_update_form() {
166 168
 	$logintype=$this->CI->session->userdata('userlevel_logintype');
167 169
 			$trunk=null;
168
-		if($logintype !=1)
169
-	  $trunk = array('Force Trunk', array('name'=> 'trunk_id[trunk_id]','id'=>'trunk_id'), 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'name', 'trunks', 'build_dropdown', 'where_arr', array("status" => "0"),array('name'=>'trunk_id[operator]','class'=>'update_drp'), 'update_drp_type');
170
+		if($logintype !=1) {
171
+			  $trunk = array('Force Trunk', array('name'=> 'trunk_id[trunk_id]','id'=>'trunk_id'), 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'name', 'trunks', 'build_dropdown', 'where_arr', array("status" => "0"),array('name'=>'trunk_id[operator]','class'=>'update_drp'), 'update_drp_type');
172
+		}
170 173
 		$form['forms'] = array("rates/origination_rate_batch_update/",array('id' => "origination_rate_batch_update"));        
171 174
 		$form['Batch Update'] = array(
172 175
 			array('Connect Cost', 'INPUT', array('name' => 'connectcost[connectcost]','id'=>'connectcost', 'value' => '', 'size' => '20',  'class' => "text field "), '', 'Tool tips info', '1', array('name'=>'connectcost[operator]','class'=>'update_drp'), '', '', '', 'update_int_type', ''),
Please login to merge, or discard this patch.
astpp/application/modules/rates/views/view_import_termination_rate.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
 							foreach($csv_value as $field_name => $field_val){
105 105
 								if($csv_key == 0){
106 106
 									echo "<th>".ucfirst($field_name)."</th>";
107
-								}else{
107
+								} else{
108 108
 									echo "<td class='portlet-content'>".$field_val."</td>";   
109 109
 								}
110 110
 							}
Please login to merge, or discard this patch.
astpp/application/modules/rates/views/view_import_origination_rate.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@
 block discarded – undo
116 116
 							foreach($csv_value as $field_name => $field_val){
117 117
 								if($csv_key == 0){
118 118
 									echo "<th>".ucfirst($field_name)."</th>";
119
-								}else{
119
+								} else{
120 120
 									echo "<td class='portlet-content'>".$field_val."</td>";   
121 121
 								}
122 122
 							}
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/signup/models/signup_model.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
 						"status"=>0,
81 81
 						"assign_date"=>date('Y-m-d H:i:s')
82 82
 						 );
83
-			}else{
83
+			} else{
84 84
 			$charge_res=$charge_res->result_array();
85 85
 			//echo "<pre>"; print_r($charge_res); exit;
86 86
 			$charge_acc_arr = array("charge_id"=>'id',
Please login to merge, or discard this patch.
astpp/application/modules/signup/views/view_forgotpassword.php 1 patch
Braces   +11 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 					<span class="login_error">
42 42
                         <?php if (isset($astpp_notification)){ ?>
43 43
                         Login unsuccessful. Please make sure you entered the correct username and password, and that your account is active.
44
-						<?php }else{
44
+						<?php } else{
45 45
 						 echo "&nbsp;";
46 46
 						} ?>
47 47
                     </span>
@@ -78,10 +78,18 @@  discard block
 block discarded – undo
78 78
 										<div class="input-group col-md-12 margin-t-15 padding-r-32 padding-l-32">
79 79
 												<span class="input-group-addon"><i class="fa fa-envelope"></i></span>
80 80
 
81
-												<input type="text" class="form-control" id="email" name="email" placeholder="User Name OR Email" value = "<?php if (isset($value['email'])) echo  $value['email']; else ''; ?>" style="height:40px;">
81
+												<input type="text" class="form-control" id="email" name="email" placeholder="User Name OR Email" value = "<?php if (isset($value['email'])) {
82
+	echo  $value['email'];
83
+} else {
84
+	'';
85
+}
86
+?>" style="height:40px;">
82 87
 										</div> 
83 88
 
84
-												<?php if (isset($error['email'])) echo $error['email']; ?>              
89
+												<?php if (isset($error['email'])) {
90
+	echo $error['email'];
91
+}
92
+?>              
85 93
 											<div style="width: 97.67%; float: left;text-align: left; margin: 2% 22%;">
86 94
 													<span id="e_name" style="color:red;"> </span>
87 95
 											</div>
Please login to merge, or discard this patch.
astpp/application/modules/signup/views/view_confirmpassword.php 1 patch
Braces   +20 added lines, -4 removed lines patch added patch discarded remove patch
@@ -77,16 +77,32 @@
 block discarded – undo
77 77
 <div class="col-md-12 margin-t-20 padding-r-32 padding-l-32">
78 78
 <label class="col-md-5 no-padding" style="text-align: left;">Password</label>
79 79
 <div class="col-md-7 no-padding">
80
-<input type="text" name="password" required value="<?php if (isset($value['password'])) echo  $value['password']; else ''; ?>" id="password" size="15" maxlength="40" class="form-control"  />
81
-<div class='error-style col-md-12 no-padding' style='color:red; font-size: 13px;' id="une"><?php if (isset($error['password'])) echo $error['password']; ?></div>
80
+<input type="text" name="password" required value="<?php if (isset($value['password'])) {
81
+	echo  $value['password'];
82
+} else {
83
+	'';
84
+}
85
+?>" id="password" size="15" maxlength="40" class="form-control"  />
86
+<div class='error-style col-md-12 no-padding' style='color:red; font-size: 13px;' id="une"><?php if (isset($error['password'])) {
87
+	echo $error['password'];
88
+}
89
+?></div>
82 90
 </div>
83 91
 </div>
84 92
 
85 93
 <div class="col-md-12 margin-t-10 padding-r-32 padding-l-32">
86 94
 <label class="col-md-5 no-padding" style="text-align: left;">Confirm Password</label>
87 95
 <div class="col-md-7 no-padding">
88
-<input type="text" name="confirmpassword" required value="<?php if (isset($value['confirm_password'])) echo  $value['confirm_password']; else ''; ?>" id="confirm_password" size="15" maxlength="40" class="form-control"  />
89
-<div class='error-style col-md-12' style='color:red; font-size: 13px;' id="conpas"><?php if (isset($error['confirm_password'])) echo $error['confirm_password']; ?></div>
96
+<input type="text" name="confirmpassword" required value="<?php if (isset($value['confirm_password'])) {
97
+	echo  $value['confirm_password'];
98
+} else {
99
+	'';
100
+}
101
+?>" id="confirm_password" size="15" maxlength="40" class="form-control"  />
102
+<div class='error-style col-md-12' style='color:red; font-size: 13px;' id="conpas"><?php if (isset($error['confirm_password'])) {
103
+	echo $error['confirm_password'];
104
+}
105
+?></div>
90 106
 </div>
91 107
 </div>
92 108
 
Please login to merge, or discard this patch.