@@ -50,11 +50,12 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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; |
@@ -34,8 +34,9 @@ discard block |
||
34 | 34 | $this->load->model('package_model'); |
35 | 35 | $this->load->library('csvreader'); |
36 | 36 | |
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 | |
@@ -190,7 +191,7 @@ discard block |
||
190 | 191 | $data['grid_buttons'] = $this->package_form->set_pattern_grid_buttons($package_id); |
191 | 192 | $data["edit_id"] = $package_id; |
192 | 193 | $this->load->view("view_package_pattern_list",$data); |
193 | - }else{ |
|
194 | + } else{ |
|
194 | 195 | redirect(base_url()."package/package_list/"); |
195 | 196 | } |
196 | 197 | } |
@@ -198,14 +199,16 @@ discard block |
||
198 | 199 | $json_data = array(); |
199 | 200 | $instant_search=$this->session->userdata('left_panel_search_package_pattern'); |
200 | 201 | $like_str=!empty($instant_search) ? "(patterns like '%$instant_search%' OR destination like '%$instant_search%' )" :null; |
201 | - if(!empty($like_str)) |
|
202 | - $this->db->where($like_str); |
|
202 | + if(!empty($like_str)) { |
|
203 | + $this->db->where($like_str); |
|
204 | + } |
|
203 | 205 | $where = array('package_id' => $package_id); |
204 | 206 | $count_all = $this->db_model->countQuery("*", "package_patterns", $where); |
205 | 207 | $paging_data = $this->form->load_grid_config($count_all, $_GET['rp'], $_GET['page']); |
206 | 208 | $json_data = $paging_data["json_paging"]; |
207 | - if(!empty($like_str)) |
|
208 | - $this->db->where($like_str); |
|
209 | + if(!empty($like_str)) { |
|
210 | + $this->db->where($like_str); |
|
211 | + } |
|
209 | 212 | $pattern_data = $this->db_model->select("*", "package_patterns", $where, "id", "ASC", $paging_data["paging"]["page_no"], $paging_data["paging"]["start"]); |
210 | 213 | |
211 | 214 | $grid_fields = json_decode($this->package_form->build_pattern_list_for_customer($package_id)); |
@@ -383,19 +386,17 @@ discard block |
||
383 | 386 | $data['page_title'] = "Package Patterns Preview"; |
384 | 387 | $data['check_header']=$check_header; |
385 | 388 | $this->session->set_userdata('import_package_code_csv',$actual_file_name); |
386 | - }else{ |
|
389 | + } else{ |
|
387 | 390 | $data['error'] = "File Uploading Fail Please Try Again"; |
388 | 391 | } |
389 | 392 | } |
390 | - } |
|
391 | - else{ |
|
393 | + } else{ |
|
392 | 394 | $data['error']=="File Uploading Fail Please Try Again"; |
393 | 395 | } |
394 | - } |
|
395 | - else { |
|
396 | + } else { |
|
396 | 397 | $data['error'] = "Invalid file format : Only CSV file allows to import records(Can't import empty file)"; |
397 | 398 | } |
398 | - }else{ |
|
399 | + } else{ |
|
399 | 400 | $invalid_flag=true; |
400 | 401 | } |
401 | 402 | if ($invalid_flag) { |
@@ -443,18 +444,17 @@ discard block |
||
443 | 444 | if($str != ""){ |
444 | 445 | $invalid_array[$i]=$csv_data; |
445 | 446 | $invalid_array[$i]['error'] = $str; |
446 | - } |
|
447 | - else{ |
|
447 | + } else{ |
|
448 | 448 | $csv_data['patterns'] = "^" . $csv_data['patterns'] . ".*"; |
449 | 449 | $csv_data['package_id'] = $edit_id; |
450 | 450 | $new_final_arr[$i]=$csv_data; |
451 | 451 | $pattern_arr[$csv_data['patterns']]=$csv_data['patterns']; |
452 | 452 | } |
453 | - }else{ |
|
453 | + } else{ |
|
454 | 454 | $invalid_array[$i]=$csv_data; |
455 | 455 | $invalid_array[$i]['error'] = "Duplicate pattern found from database."; |
456 | 456 | } |
457 | - }else{ |
|
457 | + } else{ |
|
458 | 458 | $invalid_array[$i]=$csv_data; |
459 | 459 | $invalid_array[$i]['error'] = "Duplicate pattern found from import file"; |
460 | 460 | } |
@@ -514,12 +514,10 @@ discard block |
||
514 | 514 | $count = count($error_field); |
515 | 515 | $str.= $count > 1 ? ' are not valid' : ' is not Valid'; |
516 | 516 | return $str; |
517 | - } |
|
518 | - else{ |
|
517 | + } else{ |
|
519 | 518 | return false; |
520 | 519 | } |
521 | - } |
|
522 | - else{ |
|
520 | + } else{ |
|
523 | 521 | $str=rtrim($str,','); |
524 | 522 | $error_field=explode(',',$str); |
525 | 523 | $count = count($error_field); |
@@ -22,8 +22,9 @@ |
||
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 Package_form { |
29 | 30 |
@@ -113,7 +113,7 @@ |
||
113 | 113 | foreach($csv_value as $field_name => $field_val){ |
114 | 114 | if($csv_key == 0){ |
115 | 115 | echo "<th>".ucfirst($field_name)."</th>"; |
116 | - }else{ |
|
116 | + } else{ |
|
117 | 117 | echo "<td class='portlet-content'>".$field_val."</td>"; |
118 | 118 | } |
119 | 119 | } |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | if ($flag) { |
94 | 94 | if (isset($_GET['sortname']) && $_GET['sortname'] != 'undefined'){ |
95 | 95 | $this->db->order_by($_GET['sortname'], ($_GET['sortorder']=='undefined')?'desc':$_GET['sortorder']); |
96 | - }else{ |
|
96 | + } else{ |
|
97 | 97 | $this->db->order_by('invoice_date', 'desc'); |
98 | 98 | } |
99 | 99 | } |
@@ -307,10 +307,11 @@ discard block |
||
307 | 307 | $this->db->where($where); |
308 | 308 | $this->db->order_by("callstart desc"); |
309 | 309 | if ($flag) { |
310 | - if (!$export) |
|
311 | - $this->db->limit($limit, $start); |
|
310 | + if (!$export) { |
|
311 | + $this->db->limit($limit, $start); |
|
312 | + } |
|
312 | 313 | $this->db->select('callstart,callerid,callednum,pattern,notes,billseconds,disposition,debit,cost,accountid,pricelist_id,calltype,is_recording,trunk_id,uniqueid'); |
313 | - }else { |
|
314 | + } else { |
|
314 | 315 | $this->db->select('count(*) as count,sum(billseconds) as billseconds,sum(debit) as total_debit,sum(cost) as total_cost,group_concat(distinct(pricelist_id)) as pricelist_ids,group_concat(distinct(trunk_id)) as trunk_ids'); |
315 | 316 | } |
316 | 317 | $result = $this->db->get($table_name); |
@@ -387,15 +388,13 @@ discard block |
||
387 | 388 | if($result->num_rows() > 0){ |
388 | 389 | if($flag){ |
389 | 390 | return $result; |
390 | - } |
|
391 | - else{ |
|
391 | + } else{ |
|
392 | 392 | return $result->num_rows(); |
393 | 393 | } |
394 | - }else{ |
|
394 | + } else{ |
|
395 | 395 | if($flag){ |
396 | 396 | $result=(object)array('num_rows'=>0); |
397 | - } |
|
398 | - else{ |
|
397 | + } else{ |
|
399 | 398 | $result=0; |
400 | 399 | } |
401 | 400 | return $result; |
@@ -452,7 +451,7 @@ discard block |
||
452 | 451 | if ($logintype == 1 || $logintype == 5) { |
453 | 452 | |
454 | 453 | $where = array("accountid" => $this->session->userdata["accountinfo"]['id']); |
455 | - }else{ |
|
454 | + } else{ |
|
456 | 455 | $where=array('id'=> $accountid); |
457 | 456 | } |
458 | 457 | $query = $this->db_model->getSelect("*","invoice_conf",$where); |
@@ -475,10 +474,11 @@ discard block |
||
475 | 474 | $this->db->where($where); |
476 | 475 | $this->db->order_by("callstart","desc"); |
477 | 476 | if ($flag) { |
478 | - if (!$export) |
|
479 | - $this->db->limit($limit, $start); |
|
477 | + if (!$export) { |
|
478 | + $this->db->limit($limit, $start); |
|
479 | + } |
|
480 | 480 | $this->db->select('callstart,callerid,callednum,pattern,notes,billseconds,disposition,cost,accountid,pricelist_id,calltype,is_recording,trunk_id,uniqueid'); |
481 | - }else { |
|
481 | + } else { |
|
482 | 482 | $this->db->select('count(*) as count,sum(billseconds) as billseconds,sum(cost) as total_cost,group_concat(distinct(trunk_id)) as trunk_ids'); |
483 | 483 | } |
484 | 484 | $result = $this->db->get('cdrs'); |
@@ -41,7 +41,7 @@ |
||
41 | 41 | if($system_config["paypal_mode"]==0){ |
42 | 42 | $data["paypal_url"] = $system_config["paypal_url"]; |
43 | 43 | $data["paypal_email_id"] = $system_config["paypal_id"]; |
44 | - }else{ |
|
44 | + } else{ |
|
45 | 45 | $data["paypal_url"] = $system_config["paypal_sandbox_url"]; |
46 | 46 | $data["paypal_email_id"] = $system_config["paypal_sandbox_id"]; |
47 | 47 | } |
@@ -36,8 +36,9 @@ discard block |
||
36 | 36 | } |
37 | 37 | |
38 | 38 | function index() { |
39 | - if ($this->session->userdata('user_login') == FALSE) |
|
40 | - redirect(base_url() . 'login/login'); |
|
39 | + if ($this->session->userdata('user_login') == FALSE) { |
|
40 | + redirect(base_url() . 'login/login'); |
|
41 | + } |
|
41 | 42 | $data['page_title'] = 'Dashboard'; |
42 | 43 | $this->load->view('view_user_dashboard', $data); |
43 | 44 | } |
@@ -266,7 +267,7 @@ discard block |
||
266 | 267 | $this->session->set_flashdata('astpp_notification', 'Insuffiecient fund to purchase this did'); |
267 | 268 | redirect(base_url() . "user/user_didlist/"); |
268 | 269 | } |
269 | - }else{ |
|
270 | + } else{ |
|
270 | 271 | $this->session->set_flashdata('astpp_notification', 'This DID already purchased by someone.'); |
271 | 272 | redirect(base_url() . "user/user_didlist/"); |
272 | 273 | } |
@@ -298,7 +299,7 @@ discard block |
||
298 | 299 | $this->session->set_flashdata('astpp_notification', 'DID Removed Successfully.'); |
299 | 300 | redirect(base_url() . "user/user_didlist/"); |
300 | 301 | } |
301 | - }else{ |
|
302 | + } else{ |
|
302 | 303 | $this->session->set_flashdata('astpp_notification', 'DID not found.'); |
303 | 304 | redirect(base_url() . "user/user_didlist/"); |
304 | 305 | } |
@@ -355,8 +356,9 @@ discard block |
||
355 | 356 | $markup = $this->common->get_field_name('markup', 'pricelists', array('id'=>$account_data["pricelist_id"])); |
356 | 357 | $markup = ($markup > 0)?$markup:1; |
357 | 358 | $action['cost']['cost'] = $this->common_model->add_calculate_currency($action['cost']['cost'], "", '', true, false); |
358 | - if($account_data['type']!=3) |
|
359 | - $action['cost']['cost']=($action['cost']['cost'] - ($action['cost']['cost']*$markup)/100); |
|
359 | + if($account_data['type']!=3) { |
|
360 | + $action['cost']['cost']=($action['cost']['cost'] - ($action['cost']['cost']*$markup)/100); |
|
361 | + } |
|
360 | 362 | } |
361 | 363 | $this->session->set_userdata('user_rates_list_search', $action); |
362 | 364 | } |
@@ -695,7 +697,7 @@ discard block |
||
695 | 697 | $this->session->set_userdata('accountinfo', $result[0]); |
696 | 698 | $this->session->set_flashdata('astpp_errormsg',' Your profile updated successfully!'); |
697 | 699 | redirect(base_url() . 'user/user_myprofile/'); |
698 | - }else{ |
|
700 | + } else{ |
|
699 | 701 | $this->session->set_flashdata('astpp_notification', 'Something wrong.Please contact to administrator.'); |
700 | 702 | } |
701 | 703 | } |
@@ -729,7 +731,7 @@ discard block |
||
729 | 731 | $this->session->set_flashdata('astpp_errormsg', 'Password updated successfully!'); |
730 | 732 | redirect(base_url() . 'user/user_change_password/'); |
731 | 733 | } |
732 | - }else{ |
|
734 | + } else{ |
|
733 | 735 | $data_array['id']=$accountinfo['id']; |
734 | 736 | $data['form'] = $this->form->build_form($this->user_form->get_userprofile_change_password(),$data_array); |
735 | 737 | } |
@@ -745,7 +747,7 @@ discard block |
||
745 | 747 | $data['form_search'] = $this->form->build_serach_form($this->user_form->build_user_refill_report_search()); |
746 | 748 | if($accountinfo['type'] == 1){ |
747 | 749 | $this->load->view('view_reseller_refill_report', $data); |
748 | - }else{ |
|
750 | + } else{ |
|
749 | 751 | $this->load->view('view_user_refill_report', $data); |
750 | 752 | } |
751 | 753 | } |
@@ -829,19 +831,18 @@ discard block |
||
829 | 831 | } else { |
830 | 832 | $payment = ' <button style="padding: 0 8px;" class="btn btn-success" type="button">Paid</button>'; |
831 | 833 | } |
832 | - }else{ |
|
834 | + } else{ |
|
833 | 835 | $payment = ''; |
834 | 836 | } |
835 | 837 | if($value['generate_type'] == 1){ |
836 | 838 | $invoice_type='Manually'; |
837 | - }else{ |
|
839 | + } else{ |
|
838 | 840 | $invoice_type='Automatically'; |
839 | 841 | } |
840 | 842 | |
841 | 843 | if($value['type'] == 'R'){ |
842 | 844 | $icon = '<div class="flx_font flx_magenta">R</div>'; |
843 | - } |
|
844 | - else |
|
845 | + } else |
|
845 | 846 | { |
846 | 847 | $icon = '<div class="flx_font flx_drk_pink">I</div>'; |
847 | 848 | |
@@ -904,7 +905,7 @@ discard block |
||
904 | 905 | $amount = $this->input->post("value",true); |
905 | 906 | $amount = $this->common_model->add_calculate_currency($amount,"","",true,false); |
906 | 907 | echo number_format($amount,2); |
907 | - }else{ |
|
908 | + } else{ |
|
908 | 909 | $this->payment->index(); |
909 | 910 | } |
910 | 911 | } |
@@ -1092,7 +1093,7 @@ discard block |
||
1092 | 1093 | $this->db->where('reseller_pricing.note','dids.number',false); |
1093 | 1094 | $this->db->where('reseller_pricing.reseller_id',$accountinfo['reseller_id']); |
1094 | 1095 | $this->db->from('dids,reseller_pricing'); |
1095 | - }else{ |
|
1096 | + } else{ |
|
1096 | 1097 | $this->db->where('parent_id',0); |
1097 | 1098 | $this->db->where('accountid',0); |
1098 | 1099 | $this->db->select('id,number,setup,monthlycost'); |
@@ -1393,7 +1394,7 @@ discard block |
||
1393 | 1394 | ); |
1394 | 1395 | $this->db->insert("ani_map", $insert_arr); |
1395 | 1396 | $this->session->set_flashdata('astpp_errormsg', 'Add Caller ID Sucessfully!'); |
1396 | - }else{ |
|
1397 | + } else{ |
|
1397 | 1398 | $this->session->set_flashdata('astpp_notification', 'Please Enter Caller ID value.'); |
1398 | 1399 | } |
1399 | 1400 | } else { |
@@ -1538,7 +1539,7 @@ discard block |
||
1538 | 1539 | if($action=="GET_AMT"){ |
1539 | 1540 | $amount = $this->input->post("value",true); |
1540 | 1541 | $this->payment->convert_amount($amount); |
1541 | - }else{ |
|
1542 | + } else{ |
|
1542 | 1543 | $this->payment->index(); |
1543 | 1544 | } |
1544 | 1545 | } |
@@ -1573,34 +1574,25 @@ discard block |
||
1573 | 1574 | $minimum_fund=(array)$this->db->get_where('system',array("name"=>"minimum_fund_transfer"),1)->first_row(); |
1574 | 1575 | if ($post_array['toaccountid'] == $account_info['number']) { |
1575 | 1576 | $this->session->set_flashdata('astpp_notification', 'You can not transfer fund in same account.'); |
1576 | - } |
|
1577 | - elseif ($reseller_id != $account_info['reseller_id']) { |
|
1577 | + } elseif ($reseller_id != $account_info['reseller_id']) { |
|
1578 | 1578 | $this->session->set_flashdata('astpp_notification', 'You can only transfer fund in same level account.'); |
1579 | - } |
|
1580 | - elseif ($post_array['toaccountid'] == '') { |
|
1579 | + } elseif ($post_array['toaccountid'] == '') { |
|
1581 | 1580 | $this->session->set_flashdata('astpp_notification', 'Please enter To account number.'); |
1582 | - } |
|
1583 | - elseif (empty($post_array['credit'])) { |
|
1581 | + } elseif (empty($post_array['credit'])) { |
|
1584 | 1582 | $this->session->set_flashdata('astpp_notification', 'Please enter a amount.'); |
1585 | - } |
|
1586 | - elseif ($post_array['credit'] > $balance) { |
|
1583 | + } elseif ($post_array['credit'] > $balance) { |
|
1587 | 1584 | $this->session->set_flashdata('astpp_notification', 'You have insufficient balance.'); |
1588 | - } |
|
1589 | - elseif ($toid <= 0 || !isset($post_array['toaccountid'])) { |
|
1585 | + } elseif ($toid <= 0 || !isset($post_array['toaccountid'])) { |
|
1590 | 1586 | $this->session->set_flashdata('astpp_notification', 'Please enter valid account number.'); |
1591 | - } |
|
1592 | - elseif ($post_array['credit'] < 0) { |
|
1587 | + } elseif ($post_array['credit'] < 0) { |
|
1593 | 1588 | $this->session->set_flashdata('astpp_notification', 'Please enter amount greater then 0.'); |
1594 | - } |
|
1595 | - elseif ($minimum_fund['value'] >= $post_array['credit']) { |
|
1589 | + } elseif ($minimum_fund['value'] >= $post_array['credit']) { |
|
1596 | 1590 | $this->session->set_flashdata('astpp_notification', 'You need to enter minimum amount of fund transfer ' . $minimum_fund['value'] . ' .'); |
1597 | - } |
|
1598 | - elseif (!isset($toid) || !isset($post_array['toaccountid'])) { |
|
1591 | + } elseif (!isset($toid) || !isset($post_array['toaccountid'])) { |
|
1599 | 1592 | $this->session->set_flashdata('astpp_notification', 'Please enter valid account number!'); |
1600 | - } |
|
1601 | - elseif ($post_array['credit'] < 0 || $post_array['credit'] > $balance) { |
|
1593 | + } elseif ($post_array['credit'] < 0 || $post_array['credit'] > $balance) { |
|
1602 | 1594 | $this->session->set_flashdata('astpp_notification', 'Insuffiecient amount !'); |
1603 | - }else{ |
|
1595 | + } else{ |
|
1604 | 1596 | $from['id'] = $post_array['id']; |
1605 | 1597 | $from['account_currency'] = $post_array['account_currency']; |
1606 | 1598 | $from['accountid'] = $post_array['fromaccountid']; |
@@ -1635,7 +1627,7 @@ discard block |
||
1635 | 1627 | $this->session->set_flashdata('astpp_notification', 'Sorry We are not able to process this request.'); |
1636 | 1628 | } |
1637 | 1629 | } |
1638 | - }else{ |
|
1630 | + } else{ |
|
1639 | 1631 | $this->session->set_flashdata('astpp_notification', 'Account number not found.'); |
1640 | 1632 | } |
1641 | 1633 | } else { |
@@ -1727,7 +1719,7 @@ discard block |
||
1727 | 1719 | $this->user_model->user_opensips_edit($add_array, $add_array['id']); |
1728 | 1720 | echo json_encode(array("SUCCESS"=> " OpenSips updated successfully!")); |
1729 | 1721 | exit; |
1730 | - }else{ |
|
1722 | + } else{ |
|
1731 | 1723 | echo json_encode($auth_flag); |
1732 | 1724 | exit; |
1733 | 1725 | } |
@@ -1744,7 +1736,7 @@ discard block |
||
1744 | 1736 | $this->user_model->user_opensips_add($add_array); |
1745 | 1737 | echo json_encode(array("SUCCESS"=> "OpenSips added successfully!")); |
1746 | 1738 | exit; |
1747 | - }else{ |
|
1739 | + } else{ |
|
1748 | 1740 | echo json_encode($auth_flag); |
1749 | 1741 | exit; |
1750 | 1742 | } |
@@ -1765,10 +1757,10 @@ discard block |
||
1765 | 1757 | $auth_flag = $auth_flag->num_rows(); |
1766 | 1758 | if($auth_flag == 0){ |
1767 | 1759 | return "TRUE"; |
1768 | - }else{ |
|
1760 | + } else{ |
|
1769 | 1761 | return array("username_error"=>"Duplicate Username Found.Username Must be Unique"); |
1770 | 1762 | } |
1771 | - }else{ |
|
1763 | + } else{ |
|
1772 | 1764 | return array("username_error"=>"User name is required field."); |
1773 | 1765 | } |
1774 | 1766 | return "0"; |
@@ -78,10 +78,11 @@ |
||
78 | 78 | } |
79 | 79 | |
80 | 80 | function get_userprofile_form_fields($dataArr = false) { |
81 | - if ($dataArr['id'] > 0) |
|
82 | - $val = 'accounts.email.' . $dataArr['id']; |
|
83 | - else |
|
84 | - $val = 'accounts.email'; |
|
81 | + if ($dataArr['id'] > 0) { |
|
82 | + $val = 'accounts.email.' . $dataArr['id']; |
|
83 | + } else { |
|
84 | + $val = 'accounts.email'; |
|
85 | + } |
|
85 | 86 | $uname = $this->CI->common->find_uniq_rendno(common_model::$global_config['system_config']['cardlength'], 'number', 'accounts'); |
86 | 87 | $password = $this->CI->common->generate_password(); |
87 | 88 | $logintype=$this->CI->session->userdata('logintype'); |
@@ -62,8 +62,9 @@ |
||
62 | 62 | $this->db->where('callstart >=',$start_date." 00:00:00"); |
63 | 63 | $this->db->where('callstart <=',$end_date." 23:59:59"); |
64 | 64 | $this->db->where('reseller_id',$parent_id); |
65 | - if($group_flag) |
|
66 | - $this->db->group_by("DAY(callstart)"); |
|
65 | + if($group_flag) { |
|
66 | + $this->db->group_by("DAY(callstart)"); |
|
67 | + } |
|
67 | 68 | $result=$this->db->get($table); |
68 | 69 | return $result; |
69 | 70 | } |