@@ -42,8 +42,7 @@ discard block |
||
42 | 42 | } |
43 | 43 | } |
44 | 44 | return $fp; |
45 | - } |
|
46 | - else { |
|
45 | + } else { |
|
47 | 46 | return false; |
48 | 47 | } |
49 | 48 | } |
@@ -86,8 +85,7 @@ discard block |
||
86 | 85 | } |
87 | 86 | |
88 | 87 | return $response; |
89 | - } |
|
90 | - else { |
|
88 | + } else { |
|
91 | 89 | // echo "no handle"; |
92 | 90 | } |
93 | 91 | } |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | $color='#1A1919'; |
152 | 152 | } |
153 | 153 | $balance_str = '<span style="color:'.$color.'; font-size: 10px;"><b>('.$variable.' : '.$value.')</b></span>'; |
154 | - }else{ |
|
154 | + } else{ |
|
155 | 155 | $balance_str = ''; |
156 | 156 | } |
157 | 157 | |
@@ -223,11 +223,11 @@ discard block |
||
223 | 223 | if((common_model::$global_config['system_config']['paypal_status']== 1 && strtolower($sub_menu_lables["menu_label"]) =='recharge') ||(common_model::$global_config['system_config']['opensips']== 1 && $sub_menu_lables["menu_label"] =='Opensips')|| |
224 | 224 | (common_model::$global_config['system_config']['opensips']== 0 && $sub_menu_lables["menu_label"] =='SIP Devices') || |
225 | 225 | (($acc_info['type'] == '3' || $acc_info['type'] == '0') && $acc_info['allow_ip_management'] == '1' && strtolower($sub_menu_lables["menu_label"]) == 'ip settings')){ |
226 | - }else{?> |
|
226 | + } else{?> |
|
227 | 227 | <li><a href="<?php echo base_url().$sub_menu_lables["module_url"];?>"><?php echo gettext($sub_menu_lables["menu_label"]);?></a></li> |
228 | 228 | <?}?> |
229 | 229 | <?} ?> |
230 | - <?php }else{ |
|
230 | + <?php } else{ |
|
231 | 231 | if(common_model::$global_config['system_config']['opensips']==0 && $menu_key !='System Configuration'){ ?> |
232 | 232 | <li><a href=""><span><?=$sub_menu_key;?></span><i class="fa fa-caret-right pull-right"></i></a> |
233 | 233 | <? } if(common_model::$global_config['system_config']['opensips']==1) {?> |
@@ -208,7 +208,7 @@ |
||
208 | 208 | <?php |
209 | 209 | if($account_data['logo'] != ''){ |
210 | 210 | $logo=$account_data['file']; |
211 | - }else{ |
|
211 | + } else{ |
|
212 | 212 | $logo=$account_data['logo']; |
213 | 213 | } |
214 | 214 | if($logo != ''){ |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | ? unserialize(CUSTOMEREDIT_ARRAY) :($uri_arr[0]=="accounts"&& $entity_name =='provider' |
77 | 77 | ? unserialize(PROVIDEREDIT_ARRAY) :($uri_arr[0]=="accounts"&& $entity_name =='reseller' |
78 | 78 | ? unserialize(RESELLEREDIT_ARRAY) : ($uri_arr[0] =="package" ? unserialize(PACKAGEEDIT_ARRAY):false) )))); |
79 | - }else{ |
|
79 | + } else{ |
|
80 | 80 | $menu_info=null; |
81 | 81 | $current_menu_url=$uri_arr[0]."/".$uri_arr[1]."/"; |
82 | 82 | $new_menu_info=array(); |
@@ -113,23 +113,23 @@ discard block |
||
113 | 113 | if($acc_info['type'] == '3' || $acc_info['type'] == '0'){ |
114 | 114 | if($value == "user/user_ipmap/" && $acc_info['allow_ip_management'] == '1'){ |
115 | 115 | $value_flag=false; |
116 | - }elseif(in_array('user/user_sipdevices/',$menu_info) && $value == "user/user_sipdevices/" && common_model::$global_config['system_config']['opensips']== 0){ |
|
116 | + } elseif(in_array('user/user_sipdevices/',$menu_info) && $value == "user/user_sipdevices/" && common_model::$global_config['system_config']['opensips']== 0){ |
|
117 | 117 | $value_flag=false; |
118 | - }else{ |
|
118 | + } else{ |
|
119 | 119 | $value_flag=true; |
120 | 120 | } |
121 | - }else{ |
|
121 | + } else{ |
|
122 | 122 | if(common_model::$global_config['system_config']['opensips'] == 1 ){ |
123 | 123 | if($value != "accounts/".$entity_name."_opensips/"){ |
124 | 124 | $value_flag=true; |
125 | - }else{ |
|
125 | + } else{ |
|
126 | 126 | $value_flag=false; |
127 | 127 | } |
128 | 128 | } |
129 | 129 | if(common_model::$global_config['system_config']['opensips']== 0 ){ |
130 | 130 | if($value != "accounts/".$entity_name."_sipdevices/"){ |
131 | 131 | $value_flag=true; |
132 | - }else{ |
|
132 | + } else{ |
|
133 | 133 | $value_flag=false; |
134 | 134 | } |
135 | 135 | } |
@@ -137,8 +137,9 @@ discard block |
||
137 | 137 | |
138 | 138 | if($value_flag){ |
139 | 139 | $class = ($value == $uri_arr[0]."/".$uri_arr[1]."/" ) ? 'active' : ''; |
140 | - if($i==0) |
|
141 | - $class=($uri_arr[1]== $entity_name."_save") ? 'active': $class; |
|
140 | + if($i==0) { |
|
141 | + $class=($uri_arr[1]== $entity_name."_save") ? 'active': $class; |
|
142 | + } |
|
142 | 143 | |
143 | 144 | echo "<li class='$class'><a href ='$url'>$key</a></li>"; |
144 | 145 | } |
@@ -1,4 +1,6 @@ discard block |
||
1 | -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
|
1 | +<?php if ( ! defined('BASEPATH')) { |
|
2 | + exit('No direct script access allowed'); |
|
3 | +} |
|
2 | 4 | |
3 | 5 | // ------------------------------------------------------------------------ |
4 | 6 | |
@@ -309,10 +311,11 @@ discard block |
||
309 | 311 | if ( ! function_exists('form_table_row_4')) |
310 | 312 | { |
311 | 313 | function form_table_row_4($label, $field, $span, $wh = '10', $wd = '') { |
312 | - if (wd == '') |
|
313 | - echo '<th width="'.$wh.'%"><label>'.$label.'</label></th><td>'; |
|
314 | - else |
|
315 | - echo '<th width="'.$wh.'%"><label>'.$label.'</label></th><td width="'.$wd.'%">'; |
|
314 | + if (wd == '') { |
|
315 | + echo '<th width="'.$wh.'%"><label>'.$label.'</label></th><td>'; |
|
316 | + } else { |
|
317 | + echo '<th width="'.$wh.'%"><label>'.$label.'</label></th><td width="'.$wd.'%">'; |
|
318 | + } |
|
316 | 319 | echo $field; |
317 | 320 | echo '<br/><span class="helptext">'.$span.'</span>'; |
318 | 321 | echo '</td></tr>'; |
@@ -34,8 +34,9 @@ discard block |
||
34 | 34 | $this->load->library('astpp/form'); |
35 | 35 | $this->load->model('charges_model'); |
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 | function periodiccharges_add() { |
@@ -182,13 +183,15 @@ discard block |
||
182 | 183 | OR charges.charge like '%$instant_search%' |
183 | 184 | )" |
184 | 185 | :null; |
185 | - if(!empty($like_str)) |
|
186 | - $this->db->where($like_str); |
|
186 | + if(!empty($like_str)) { |
|
187 | + $this->db->where($like_str); |
|
188 | + } |
|
187 | 189 | $count_all = $this->db_model->getCountWithJion($table, $select, $where, $jionTable, $jionCondition, $type); |
188 | 190 | $paging_data = $this->form->load_grid_config($count_all, $_GET['rp'], $_GET['page']); |
189 | 191 | $json_data = $paging_data["json_paging"]; |
190 | - if(!empty($like_str)) |
|
191 | - $this->db->where($like_str); |
|
192 | + if(!empty($like_str)) { |
|
193 | + $this->db->where($like_str); |
|
194 | + } |
|
192 | 195 | $account_charge_list = $this->db_model->getAllJionQuery($table, $select, $where, $jionTable, $jionCondition, $type, $paging_data["paging"]["page_no"], $paging_data["paging"]["start"], $order_by, $order_type, ""); |
193 | 196 | $grid_fields = json_decode($this->charges_form->build_charges_list_for_customer($accountid, $accounttype)); |
194 | 197 | $json_data['rows'] = $this->form->build_grid($account_charge_list, $grid_fields); |
@@ -39,8 +39,9 @@ discard block |
||
39 | 39 | $where['callstart <=']=date('Y-m-d') . " 23:59:59"; |
40 | 40 | } |
41 | 41 | $this->db->where($where); |
42 | - if(!empty($group_by)) |
|
43 | - $this->db->group_by($group_by); |
|
42 | + if(!empty($group_by)) { |
|
43 | + $this->db->group_by($group_by); |
|
44 | + } |
|
44 | 45 | if ($flag) { |
45 | 46 | if ($export) { |
46 | 47 | $result = $this->db_model->select($select . ",COUNT(*) AS attempts, AVG(billseconds) AS acd,MAX(billseconds) AS mcd,SUM(billseconds) AS duration,SUM(CASE WHEN calltype !='free' THEN billseconds ELSE 0 END) as billable,SUM(CASE WHEN billseconds > 0 THEN 1 ELSE 0 END) as completed,SUM(debit) AS debit,SUM(cost) AS cost", "reseller_cdrs", '', $order, 'asc', '', '', ''); |
@@ -66,8 +67,9 @@ discard block |
||
66 | 67 | $where['callstart <=']=date('Y-m-d') . " 23:59:59"; |
67 | 68 | } |
68 | 69 | $this->db->where($where); |
69 | - if(!empty($group_by)) |
|
70 | - $this->db->group_by($group_by); |
|
70 | + if(!empty($group_by)) { |
|
71 | + $this->db->group_by($group_by); |
|
72 | + } |
|
71 | 73 | if ($flag) { |
72 | 74 | if ($export) { |
73 | 75 | $result = $this->db_model->select($select . ",COUNT(*) AS attempts, AVG(billseconds) AS acd,MAX(billseconds) AS mcd,SUM(billseconds) AS duration,SUM(CASE WHEN calltype !='free' THEN billseconds ELSE 0 END) as billable,SUM(CASE WHEN billseconds > 0 THEN 1 ELSE 0 END) as completed,SUM(cost) AS cost", "cdrs", '', $order, 'asc', '', '', ''); |
@@ -96,8 +98,9 @@ discard block |
||
96 | 98 | $where['callstart <=']=date('Y-m-d') . " 23:59:59"; |
97 | 99 | } |
98 | 100 | $this->db->where($where); |
99 | - if(!empty($group_by)) |
|
100 | - $this->db->group_by($group_by); |
|
101 | + if(!empty($group_by)) { |
|
102 | + $this->db->group_by($group_by); |
|
103 | + } |
|
101 | 104 | if ($flag) { |
102 | 105 | if ($export) { |
103 | 106 | $result = $this->db_model->select($select . ",COUNT(*) AS attempts, AVG(billseconds) AS acd,MAX(billseconds) AS mcd,SUM(billseconds) AS duration,SUM(CASE WHEN calltype !='free' THEN billseconds ELSE 0 END) as billable,SUM(CASE WHEN billseconds > 0 THEN 1 ELSE 0 END) as completed,SUM(debit) AS debit,SUM(cost) AS cost", "cdrs", '', $order, 'asc', '', '', ''); |
@@ -38,8 +38,9 @@ discard block |
||
38 | 38 | $this->fpdf = new PDF('P', 'pt'); |
39 | 39 | $this->fpdf->initialize('P', 'mm', 'A4'); |
40 | 40 | |
41 | - if ($this->session->userdata('user_login') == FALSE) |
|
42 | - redirect(base_url().'/astpp/login'); |
|
41 | + if ($this->session->userdata('user_login') == FALSE) { |
|
42 | + redirect(base_url().'/astpp/login'); |
|
43 | + } |
|
43 | 44 | } |
44 | 45 | function customer() { |
45 | 46 | $data['page_title'] = 'Customer Summary Report'; |
@@ -202,7 +203,7 @@ discard block |
||
202 | 203 | $new_arr[] = $row1['notes']; |
203 | 204 | } elseif ($search_arr['groupby_3'] == 'trunk_id') { |
204 | 205 | $new_arr[] = $this->common->get_field_name('name', 'trunks', $row1['trunk_id']); |
205 | - } elseif ($search_arr['groupby_3'] == 'package_id') { |
|
206 | + } elseif ($search_arr['groupby_3'] == 'package_id') { |
|
206 | 207 | $new_arr[] = $this->common->get_field_name('package_name', 'packages', $row1['package_id']); |
207 | 208 | } |
208 | 209 | if (empty($new_arr)) { |
@@ -20,8 +20,9 @@ discard block |
||
20 | 20 | # along with this program. If not, see <http://www.gnu.org/licenses/> |
21 | 21 | ############################################################################ |
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 Summary_form { |
27 | 28 | function __construct() { |
@@ -96,8 +97,9 @@ discard block |
||
96 | 97 | } |
97 | 98 | } |
98 | 99 | } |
99 | - if(empty($new_arr)) |
|
100 | - $new_arr[]=array("Account", "453", "provider_id", "first_name,last_name,number", "accounts", "build_concat_string"); |
|
100 | + if(empty($new_arr)) { |
|
101 | + $new_arr[]=array("Account", "453", "provider_id", "first_name,last_name,number", "accounts", "build_concat_string"); |
|
102 | + } |
|
101 | 103 | $fixed_arr = array( |
102 | 104 | array("Attempted Calls", "130", "attempted_calls", "", "", ""), |
103 | 105 | array("Completed Calls", "130", "description", "", "", ""), |