Completed
Push — v3.0 ( 23635d...e28df5 )
by Samir
23s
created
web_interface/astpp/application/modules/did/language/spanish/did_lang.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -1,43 +1,43 @@
 block discarded – undo
1
-<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
1
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2 2
 
3 3
 //did list
4
-$lang['DID.MANAGE_DIDs']='Gestionar DIDs';
5
-$lang['DID.NUMBER']='Número';
6
-$lang['DID.COUNTRY']='País';
7
-$lang['DID.PROVIDER']='Proveedor';
8
-$lang['DID.ACCOUNT']='Cuenta';
9
-$lang['DID.LIMIT_LEN']='Limitar<br/>Longitud';
10
-$lang['DID.DIALSTRING']='Marcar cadena';
11
-$lang['DID.SETUP_FEE']='Establecer<br/>cuota';
12
-$lang['DID.DISCONNECTION_FEE']='Desconexión<br/>cuota';
13
-$lang['DID.MONTHLY']='Mensual';
14
-$lang['DID.CONNECT']='Conectar';
15
-$lang['DID.INCLUDED']='Incluido';
16
-$lang['DID.COST']='Costo';
17
-$lang['DID.INCREMENTS']='Incrementos';
18
-$lang['DID.PRORATE']='Prorratear';
19
-$lang['DID.BILLON_ALLOCATION']='Proyecto de ley sobre la asignación de';
20
-$lang['DID.MAX_CHANNELS']='Max canales';
4
+$lang['DID.MANAGE_DIDs'] = 'Gestionar DIDs';
5
+$lang['DID.NUMBER'] = 'Número';
6
+$lang['DID.COUNTRY'] = 'País';
7
+$lang['DID.PROVIDER'] = 'Proveedor';
8
+$lang['DID.ACCOUNT'] = 'Cuenta';
9
+$lang['DID.LIMIT_LEN'] = 'Limitar<br/>Longitud';
10
+$lang['DID.DIALSTRING'] = 'Marcar cadena';
11
+$lang['DID.SETUP_FEE'] = 'Establecer<br/>cuota';
12
+$lang['DID.DISCONNECTION_FEE'] = 'Desconexión<br/>cuota';
13
+$lang['DID.MONTHLY'] = 'Mensual';
14
+$lang['DID.CONNECT'] = 'Conectar';
15
+$lang['DID.INCLUDED'] = 'Incluido';
16
+$lang['DID.COST'] = 'Costo';
17
+$lang['DID.INCREMENTS'] = 'Incrementos';
18
+$lang['DID.PRORATE'] = 'Prorratear';
19
+$lang['DID.BILLON_ALLOCATION'] = 'Proyecto de ley sobre la asignación de';
20
+$lang['DID.MAX_CHANNELS'] = 'Max canales';
21 21
 
22 22
 //search
23
-$lang['DID.SEARCH']='Buscar';
24
-$lang['DID.SEARCH_DID']='Buscar DID';
23
+$lang['DID.SEARCH'] = 'Buscar';
24
+$lang['DID.SEARCH_DID'] = 'Buscar DID';
25 25
 
26 26
 
27 27
 // add/edit did
28
-$lang['DID.ADDNEW_DID']='Añadir nuevo DID';
29
-$lang['DID.DID_INFO']='DID Información';
30
-$lang['DID.PROVINCE']='Provincia';
31
-$lang['DID.CITY']='Ciudad';
28
+$lang['DID.ADDNEW_DID'] = 'Añadir nuevo DID';
29
+$lang['DID.DID_INFO'] = 'DID Información';
30
+$lang['DID.PROVINCE'] = 'Provincia';
31
+$lang['DID.CITY'] = 'Ciudad';
32 32
 
33
-$lang['DID.DID_SETTING']='DID Ajuste';
33
+$lang['DID.DID_SETTING'] = 'DID Ajuste';
34 34
 
35
-$lang['DID.DID_BILLING']='DID Facturación';
36
-$lang['DID.DID_TAX']='DID Impuesto';
35
+$lang['DID.DID_BILLING'] = 'DID Facturación';
36
+$lang['DID.DID_TAX'] = 'DID Impuesto';
37 37
 
38 38
 //import did
39
-$lang['DID.IMPORT_DID']='Importar DIDs';
40
-$lang['DID.SELECT_file']='Seleccionar el archivo';
41
-$lang['DID.MSG']='El archivo debe estar en el siguiente formato: número <br />, cuenta, connectcost, includedseconds, monthlycost, el costo, las extensiones, el estado, proveedor, país, provincia, ciudad, incremento
39
+$lang['DID.IMPORT_DID'] = 'Importar DIDs';
40
+$lang['DID.SELECT_file'] = 'Seleccionar el archivo';
41
+$lang['DID.MSG'] = 'El archivo debe estar en el siguiente formato: número <br />, cuenta, connectcost, includedseconds, monthlycost, el costo, las extensiones, el estado, proveedor, país, provincia, ciudad, incremento
42 42
      <br/> El archivo tendrá los campos de texto escapados con comillas y los campos separados por comas.';
43 43
 ?>
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/did/language/english/did_lang.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -1,43 +1,43 @@
 block discarded – undo
1
-<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
1
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
2 2
 
3 3
 //DID list
4
-$lang['DID.MANAGE_DIDs']='Manage DIDs';
5
-$lang['DID.NUMBER']='Number';
6
-$lang['DID.COUNTRY']='Country';
7
-$lang['DID.PROVIDER']='Provider';
8
-$lang['DID.ACCOUNT']='Account';
9
-$lang['DID.LIMIT_LEN']='Limit<br/>Length';
10
-$lang['DID.DIALSTRING']='Dialstring';
11
-$lang['DID.SETUP_FEE']='Setup<br/>Fee';
12
-$lang['DID.DISCONNECTION_FEE']='Disconnection<br/>Fee';
13
-$lang['DID.MONTHLY']='Monthly';
14
-$lang['DID.CONNECT']='Connect';
15
-$lang['DID.INCLUDED']='Included';
16
-$lang['DID.COST']='Cost';
17
-$lang['DID.INCREMENTS']='Increments';
18
-$lang['DID.PRORATE']='Prorate';
19
-$lang['DID.BILLON_ALLOCATION']='Bill on Allocation';
20
-$lang['DID.MAX_CHANNELS']='Max Channels';
4
+$lang['DID.MANAGE_DIDs'] = 'Manage DIDs';
5
+$lang['DID.NUMBER'] = 'Number';
6
+$lang['DID.COUNTRY'] = 'Country';
7
+$lang['DID.PROVIDER'] = 'Provider';
8
+$lang['DID.ACCOUNT'] = 'Account';
9
+$lang['DID.LIMIT_LEN'] = 'Limit<br/>Length';
10
+$lang['DID.DIALSTRING'] = 'Dialstring';
11
+$lang['DID.SETUP_FEE'] = 'Setup<br/>Fee';
12
+$lang['DID.DISCONNECTION_FEE'] = 'Disconnection<br/>Fee';
13
+$lang['DID.MONTHLY'] = 'Monthly';
14
+$lang['DID.CONNECT'] = 'Connect';
15
+$lang['DID.INCLUDED'] = 'Included';
16
+$lang['DID.COST'] = 'Cost';
17
+$lang['DID.INCREMENTS'] = 'Increments';
18
+$lang['DID.PRORATE'] = 'Prorate';
19
+$lang['DID.BILLON_ALLOCATION'] = 'Bill on Allocation';
20
+$lang['DID.MAX_CHANNELS'] = 'Max Channels';
21 21
 
22 22
 //search
23
-$lang['DID.SEARCH']='Search';
24
-$lang['DID.SEARCH_DID']='Search DID';
23
+$lang['DID.SEARCH'] = 'Search';
24
+$lang['DID.SEARCH_DID'] = 'Search DID';
25 25
 
26 26
 
27 27
 // add/edit did
28
-$lang['DID.ADDNEW_DID']='Add New DID';
29
-$lang['DID.DID_INFO']='DID Information';
30
-$lang['DID.PROVINCE']='Province';
31
-$lang['DID.CITY']='City';
28
+$lang['DID.ADDNEW_DID'] = 'Add New DID';
29
+$lang['DID.DID_INFO'] = 'DID Information';
30
+$lang['DID.PROVINCE'] = 'Province';
31
+$lang['DID.CITY'] = 'City';
32 32
 
33
-$lang['DID.DID_SETTING']='DID Setting';
33
+$lang['DID.DID_SETTING'] = 'DID Setting';
34 34
 
35
-$lang['DID.DID_BILLING']='DID Billing';
36
-$lang['DID.DID_TAX']='DID Taxe';
35
+$lang['DID.DID_BILLING'] = 'DID Billing';
36
+$lang['DID.DID_TAX'] = 'DID Taxe';
37 37
 
38 38
 //import did
39
-$lang['DID.IMPORT_DID']='Import DIDs';
40
-$lang['DID.SELECT_FILE']='Select the file';
41
-$lang['DID.MSG']='File must be in the following format:<br />number, account, connectcost, includedseconds, monthlycost, cost,extensions, status, provider, country, province, city, increment
39
+$lang['DID.IMPORT_DID'] = 'Import DIDs';
40
+$lang['DID.SELECT_FILE'] = 'Select the file';
41
+$lang['DID.MSG'] = 'File must be in the following format:<br />number, account, connectcost, includedseconds, monthlycost, cost,extensions, status, provider, country, province, city, increment
42 42
     <br/><br/>The file shall have the text fields escaped with quotation marks and the fields seperated by commas.';
43 43
 ?>
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/package/controllers/package.php 1 patch
Spacing   +129 added lines, -129 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
         $this->load->library('csvreader');
36 36
 
37 37
         if ($this->session->userdata('user_login') == FALSE)
38
-            redirect(base_url() . '/astpp/login');
38
+            redirect(base_url().'/astpp/login');
39 39
     }
40 40
 
41 41
    
@@ -66,12 +66,12 @@  discard block
 block discarded – undo
66 66
 
67 67
         echo json_encode($json_data);
68 68
     }
69
-    function package_list_reseller($accountid,$accounttype){
69
+    function package_list_reseller($accountid, $accounttype) {
70 70
 	$json_data = array();
71
-        $count_all = $this->package_model->get_reseller_package_list(false,$accountid,$accounttype);
71
+        $count_all = $this->package_model->get_reseller_package_list(false, $accountid, $accounttype);
72 72
         $paging_data = $this->form->load_grid_config($count_all, $_GET['rp'], $_GET['page']);
73 73
         $json_data = $paging_data["json_paging"];
74
-        $query = $this->package_model->get_reseller_package_list(true,$accountid,$accounttype,$paging_data["paging"]["start"], $paging_data["paging"]["page_no"]);
74
+        $query = $this->package_model->get_reseller_package_list(true, $accountid, $accounttype, $paging_data["paging"]["start"], $paging_data["paging"]["page_no"]);
75 75
         $grid_fields = json_decode($this->package_form->build_package_list_for_reseller());
76 76
         $json_data['rows'] = $this->form->build_grid($query, $grid_fields);
77 77
         echo json_encode($json_data);
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
             $this->session->set_userdata('package_list_search', $action);
88 88
         }
89 89
         if (@$ajax_search != 1) {
90
-            redirect(base_url() . 'package/package_list/');
90
+            redirect(base_url().'package/package_list/');
91 91
         }
92 92
     }
93 93
     
@@ -105,30 +105,30 @@  discard block
 block discarded – undo
105 105
     function package_edit($edit_id = '') {
106 106
 		$data['page_title'] = 'Package Details';
107 107
         $accountinfo = $this->session->userdata("accountinfo");
108
-        $reseller_id=$accountinfo['type'] == 1 ? $accountinfo['id']:0;
109
-        $package_result = $this->db_model->getSelect("*", " packages", array('id' => $edit_id,"reseller_id"=>$reseller_id));
108
+        $reseller_id = $accountinfo['type'] == 1 ? $accountinfo['id'] : 0;
109
+        $package_result = $this->db_model->getSelect("*", " packages", array('id' => $edit_id, "reseller_id"=>$reseller_id));
110 110
         if ($package_result->num_rows > 0) {
111
-            $package_info=(array)$package_result->first_row();
111
+            $package_info = (array)$package_result->first_row();
112 112
             $data['form'] = $this->form->build_form($this->package_form->get_package_form_fields($package_info['id']), $package_info);
113
-            $data['edit_id']=$package_info['id'];
113
+            $data['edit_id'] = $package_info['id'];
114 114
             $this->load->view('view_packages_edit', $data);
115 115
         } else {
116
-            redirect(base_url() . 'package/package_list/');
116
+            redirect(base_url().'package/package_list/');
117 117
         }
118 118
     }
119 119
 
120
-    function package_save($id="") {
120
+    function package_save($id = "") {
121 121
         $add_array = $this->input->post();
122 122
         $data['form'] = $this->form->build_form($this->package_form->get_package_form_fields($add_array['id']), $add_array);
123 123
         if ($add_array['id'] != '') {
124 124
             if ($this->form_validation->run() == FALSE) {
125
-                $data['edit_id']= $add_array['id'];
125
+                $data['edit_id'] = $add_array['id'];
126 126
                 $data['validation_errors'] = validation_errors();
127 127
                 $this->load->view('view_packages_edit', $data);
128 128
             } else {
129 129
                 $this->package_model->edit_package($add_array, $add_array['id']);
130 130
                 $this->session->set_flashdata('astpp_errormsg', 'Package updated successfully!');
131
-                redirect(base_url() . 'package/package_list/');
131
+                redirect(base_url().'package/package_list/');
132 132
                 exit;
133 133
             }
134 134
         } else {
@@ -143,14 +143,14 @@  discard block
 block discarded – undo
143 143
 ASTPP  3.0 
144 144
 For Email Broadcast when package is add
145 145
 **/
146
-		$accountinfo = $this->db_model->getSelect("*", "accounts", array("pricelist_id" => $add_array['pricelist_id'],"status"=>0, "deleted"=>0));
146
+		$accountinfo = $this->db_model->getSelect("*", "accounts", array("pricelist_id" => $add_array['pricelist_id'], "status"=>0, "deleted"=>0));
147 147
 		$accountinfo = $accountinfo->result_array();
148 148
                 $this->session->set_flashdata('astpp_errormsg', 'Package added successfully!');
149
-		foreach($accountinfo as $key => $value){
149
+		foreach ($accountinfo as $key => $value) {
150 150
 			$this->common->mail_to_users('add_package', $value);
151 151
 		}
152 152
 /**************************************/
153
-                redirect(base_url() . 'package/package_list/');
153
+                redirect(base_url().'package/package_list/');
154 154
                 exit;
155 155
             }
156 156
         }
@@ -166,14 +166,14 @@  discard block
 block discarded – undo
166 166
 	$package_detail = $this->db_model->getSelect("*", "packages", array("id"=>$id));
167 167
 	$package_detail = $package_detail->result_array();
168 168
 	$package_detail = $package_detail[0];
169
-	$accountinfo = $this->db_model->getSelect("*", "accounts", array("pricelist_id" => $package_detail['pricelist_id'],"status"=>0, "deleted"=>0)); 
169
+	$accountinfo = $this->db_model->getSelect("*", "accounts", array("pricelist_id" => $package_detail['pricelist_id'], "status"=>0, "deleted"=>0)); 
170 170
         $this->package_model->remove_package($id);
171 171
         $this->session->set_flashdata('astpp_notification', 'Package removed successfully!');
172
-	foreach($accountinfo->result_array() as $key => $value){
172
+	foreach ($accountinfo->result_array() as $key => $value) {
173 173
 		$this->common->mail_to_users('remove_package', $value);
174 174
 	}	
175 175
 /******************************************/
176
-        redirect(base_url() . 'package/package_list/');
176
+        redirect(base_url().'package/package_list/');
177 177
     }
178 178
     
179 179
     function package_delete_multiple() {
@@ -183,28 +183,28 @@  discard block
 block discarded – undo
183 183
         echo $this->db->delete("packages");
184 184
     }
185 185
 
186
-    function package_pattern_list($package_id){
186
+    function package_pattern_list($package_id) {
187 187
 		$data['page_title'] = 'Package Codes';
188
-        if(!empty($package_id)){
188
+        if ( ! empty($package_id)) {
189 189
             $data['grid_fields'] = $this->package_form->build_pattern_list_for_customer($package_id);
190 190
             $data['grid_buttons'] = $this->package_form->set_pattern_grid_buttons($package_id);
191 191
             $data["edit_id"] = $package_id;
192
-            $this->load->view("view_package_pattern_list",$data);
193
-        }else{
192
+            $this->load->view("view_package_pattern_list", $data);
193
+        } else {
194 194
             redirect(base_url()."package/package_list/");
195 195
         }    
196 196
     }
197
-    function package_pattern_list_json($package_id){
197
+    function package_pattern_list_json($package_id) {
198 198
         $json_data = array();
199
-        $instant_search=$this->session->userdata('left_panel_search_package_pattern');
200
-        $like_str=!empty($instant_search) ? "(patterns like '%$instant_search%'  OR destination like '%$instant_search%' )" :null;
201
-        if(!empty($like_str))
199
+        $instant_search = $this->session->userdata('left_panel_search_package_pattern');
200
+        $like_str = ! empty($instant_search) ? "(patterns like '%$instant_search%'  OR destination like '%$instant_search%' )" : null;
201
+        if ( ! empty($like_str))
202 202
         $this->db->where($like_str);
203 203
         $where = array('package_id' => $package_id);
204 204
         $count_all = $this->db_model->countQuery("*", "package_patterns", $where);
205 205
         $paging_data = $this->form->load_grid_config($count_all, $_GET['rp'], $_GET['page']);
206 206
         $json_data = $paging_data["json_paging"];
207
-        if(!empty($like_str))
207
+        if ( ! empty($like_str))
208 208
         $this->db->where($like_str);
209 209
         $pattern_data = $this->db_model->select("*", "package_patterns", $where, "id", "ASC", $paging_data["paging"]["page_no"], $paging_data["paging"]["start"]);
210 210
         
@@ -237,11 +237,11 @@  discard block
 block discarded – undo
237 237
 
238 238
         echo json_encode($json_data);
239 239
     }
240
-    function package_counter_report_export(){
240
+    function package_counter_report_export() {
241 241
         $query = $this->db_model->getSelect("*", "counters", '');
242 242
         $outbound_array = array();
243 243
         ob_clean();
244
-        $outbound_array[] = array("Package Name", "Account",  "Used Seconds");
244
+        $outbound_array[] = array("Package Name", "Account", "Used Seconds");
245 245
         if ($query->num_rows() > 0) {
246 246
 
247 247
             foreach ($query->result_array() as $row) {
@@ -253,10 +253,10 @@  discard block
 block discarded – undo
253 253
                 }
254 254
             }
255 255
         $this->load->helper('csv');
256
-        array_to_csv($outbound_array, 'Usage_Report_' . date("Y-m-d") . '.csv');
256
+        array_to_csv($outbound_array, 'Usage_Report_'.date("Y-m-d").'.csv');
257 257
     
258 258
     }
259
-    function package_pattern_json($package_id){
259
+    function package_pattern_json($package_id) {
260 260
         $json_data = array();
261 261
         $where = array('package_id' => $package_id);
262 262
 
@@ -283,37 +283,37 @@  discard block
 block discarded – undo
283 283
     function package_patterns_add_json($accountid) {
284 284
         $this->load->module('rates/rates');
285 285
         $json_data = array();
286
-        $count_all = $this->rates_model->getunblocked_package_pattern($accountid,false);
286
+        $count_all = $this->rates_model->getunblocked_package_pattern($accountid, false);
287 287
         $paging_data = $this->form->load_grid_config($count_all, $_GET['rp'], $_GET['page']);
288 288
         $json_data = $paging_data["json_paging"];
289 289
 
290
-        $query = $this->rates->rates_model->getunblocked_package_pattern($accountid,true, $paging_data["paging"]["start"], $paging_data["paging"]["page_no"]);
290
+        $query = $this->rates->rates_model->getunblocked_package_pattern($accountid, true, $paging_data["paging"]["start"], $paging_data["paging"]["page_no"]);
291 291
         $grid_fields = json_decode($this->rates->rates_form->build_block_pattern_list_for_customer());
292 292
         $json_data['rows'] = $this->rates->form->build_grid($query, $grid_fields);
293 293
 
294 294
         echo json_encode($json_data);
295 295
     }
296 296
     function package_patterns_add_info($packageid) {	
297
-        $result = $this->package_model->insert_package_pattern($this->input->post('prefixies', true),$packageid);
297
+        $result = $this->package_model->insert_package_pattern($this->input->post('prefixies', true), $packageid);
298 298
         unset($_POST);
299 299
         echo $result;
300 300
         exit;
301 301
     }
302 302
     function package_patterns_delete($packageid, $patternid) {
303 303
         $this->db->delete("package_patterns", array("id" => $patternid));
304
-        redirect(base_url() . "package/package_pattern_list/$packageid");
304
+        redirect(base_url()."package/package_pattern_list/$packageid");
305 305
     }
306
-    function package_patterns_selected_delete(){
306
+    function package_patterns_selected_delete() {
307 307
         $ids = $this->input->post("selected_ids", true);
308 308
         $where = "id IN ($ids)";
309 309
         unset($_POST);
310
-        echo $this->db->delete("package_patterns",$where);
310
+        echo $this->db->delete("package_patterns", $where);
311 311
     }
312 312
     
313
-    function package_quick_search($module_name){
313
+    function package_quick_search($module_name) {
314 314
         $action = $this->input->post();
315
-        $this->session->set_userdata('left_panel_search_package_pattern',"");
316
-        if(!empty($action['left_panel_search'])){
315
+        $this->session->set_userdata('left_panel_search_package_pattern', "");
316
+        if ( ! empty($action['left_panel_search'])) {
317 317
             $this->session->set_userdata('left_panel_search_package_pattern', $action['left_panel_search']);
318 318
         }
319 319
     }
@@ -322,22 +322,22 @@  discard block
 block discarded – undo
322 322
 	function package_patterns_import($edit_id) {
323 323
 		//echo "nick";exit;
324 324
         $data['page_title'] = 'Import Package Patterns';
325
-        $this->session->set_userdata('import_package_code_csv',"");
326
-        $error_data =  $this->session->userdata('import_package_code_csv_error');
325
+        $this->session->set_userdata('import_package_code_csv', "");
326
+        $error_data = $this->session->userdata('import_package_code_csv_error');
327 327
         $full_path = $this->config->item('rates-file-path');
328
-        if(file_exists($full_path.$error_data) && $error_data != ""){
328
+        if (file_exists($full_path.$error_data) && $error_data != "") {
329 329
             unlink($full_path.$error_data);
330
-            $this->session->set_userdata('import_package_code_csv_error',"");
330
+            $this->session->set_userdata('import_package_code_csv_error', "");
331 331
         }
332 332
         $data['edit_id'] = $edit_id;
333 333
         $this->load->view('view_import_package_code', $data);
334 334
     }
335 335
     
336 336
     
337
-    function package_patterns_download_sample_file($file_name){
337
+    function package_patterns_download_sample_file($file_name) {
338 338
         $this->load->helper('download');
339 339
 		$full_path = base_url()."assets/Rates_File/".$file_name.".csv";
340
-        $arrContextOptions=array(
340
+        $arrContextOptions = array(
341 341
 			"ssl"=>array(
342 342
 			"verify_peer"=>false,
343 343
 			"verify_peer_name"=>false,
@@ -348,75 +348,75 @@  discard block
 block discarded – undo
348 348
     }
349 349
     
350 350
     
351
-    function package_patterns_preview_file($edit_id){
352
-	$invalid_flag= false;
353
-	$data=array();
351
+    function package_patterns_preview_file($edit_id) {
352
+	$invalid_flag = false;
353
+	$data = array();
354 354
 	$data['page_title'] = 'Import Package Patterns';
355
-	$check_header=$this->input->post('check_header',true);
356
-	if(empty($_FILES) || !isset($_FILES)){
355
+	$check_header = $this->input->post('check_header', true);
356
+	if (empty($_FILES) || ! isset($_FILES)) {
357 357
 	  redirect(base_url()."package/package_pattern_list/");
358 358
 	}
359
-	$get_extension=strpos($_FILES['package_code_import']['name'],'.');
359
+	$get_extension = strpos($_FILES['package_code_import']['name'], '.');
360 360
 	$new_final_arr_key = $this->config->item('package-code-field');
361
-	if(!$get_extension){
362
-		$data['error']= "Please Upload File Atleast";
361
+	if ( ! $get_extension) {
362
+		$data['error'] = "Please Upload File Atleast";
363 363
         }
364 364
         //echo "<pre>";print_r($_FILES);exit;
365
-        if (isset($_FILES['package_code_import']['name']) && $_FILES['package_code_import']['name'] != "" ) {
366
-            list($txt,$ext) = explode(".", $_FILES['package_code_import']['name']);
365
+        if (isset($_FILES['package_code_import']['name']) && $_FILES['package_code_import']['name'] != "") {
366
+            list($txt, $ext) = explode(".", $_FILES['package_code_import']['name']);
367 367
             
368
-            if($ext == "csv" && $_FILES['package_code_import']['size'] > 0){ 
368
+            if ($ext == "csv" && $_FILES['package_code_import']['size'] > 0) { 
369 369
                 $error = $_FILES['package_code_import']['error'];
370 370
                 if ($error == 0) {
371 371
                     $uploadedFile = $_FILES["package_code_import"]["tmp_name"];
372
-                    $csv_data=$this->csvreader->parse_file($uploadedFile,$new_final_arr_key,$check_header);
373
-                    if(!empty($csv_data)){
372
+                    $csv_data = $this->csvreader->parse_file($uploadedFile, $new_final_arr_key, $check_header);
373
+                    if ( ! empty($csv_data)) {
374 374
 		    $full_path = $this->config->item('rates-file-path');
375 375
 		    //echo "<pre>";print_r($full_path);exit;
376
-                    $actual_file_name = "ASTPP-ORIGIN-RATES-".date("Y-m-d H:i:s"). "." . $ext;
376
+                    $actual_file_name = "ASTPP-ORIGIN-RATES-".date("Y-m-d H:i:s").".".$ext;
377 377
                     //echo "<pre>";print_r($actual_file_name);exit;
378
-                    if (move_uploaded_file($uploadedFile,$full_path.$actual_file_name)) {
379
-			$flag=false;
378
+                    if (move_uploaded_file($uploadedFile, $full_path.$actual_file_name)) {
379
+			$flag = false;
380 380
 			//$data['trunkid']=isset($_POST['trunk_id']) && $_POST['trunk_id'] > 0 ? $_POST['trunk_id'] : 0;
381 381
                         $data['csv_tmp_data'] = $csv_data;
382 382
                         //$data['pricelistid'] = $_POST['pricelist_id'];
383 383
                         $data['page_title'] = "Package Patterns Preview";
384
-                        $data['check_header']=$check_header;
385
-                        $this->session->set_userdata('import_package_code_csv',$actual_file_name);
386
-                    }else{
384
+                        $data['check_header'] = $check_header;
385
+                        $this->session->set_userdata('import_package_code_csv', $actual_file_name);
386
+                    } else {
387 387
                         $data['error'] = "File Uploading Fail Please Try Again";
388 388
                     }
389 389
                 }
390 390
              }   
391
-            else{
392
-                    $data['error']=="File Uploading Fail Please Try Again";
391
+            else {
392
+                    $data['error'] == "File Uploading Fail Please Try Again";
393 393
                 }
394 394
            }
395 395
            else {
396 396
                 $data['error'] = "Invalid file format : Only CSV file allows to import records(Can't import empty file)";
397 397
             }
398
-            }else{
399
-		$invalid_flag=true;
398
+            } else {
399
+		$invalid_flag = true;
400 400
             }
401 401
         if ($invalid_flag) {
402 402
             $str = '';
403 403
             if (empty($_FILES['package_code_import']['name'])) {
404
-                $str.= '<br/>Please Select File.';
404
+                $str .= '<br/>Please Select File.';
405 405
             }
406
-            $data['error']=$str;
406
+            $data['error'] = $str;
407 407
         }
408 408
          $data['edit_id'] = $edit_id;
409 409
         $this->load->view('view_import_package_code', $data);
410 410
     }
411 411
     
412 412
     
413
-    function package_patterns_import_file($edit_id,$check_header=false) {
413
+    function package_patterns_import_file($edit_id, $check_header = false) {
414 414
 		//echo $edit_id."===="; exit;
415 415
        $new_final_arr = array();
416 416
         $invalid_array = array();
417 417
         $new_final_arr_key = $this->config->item('package-code-field');
418 418
 	$screen_path = $this->config->item('screen_path');
419
-	$reseller_id=0;
419
+	$reseller_id = 0;
420 420
         if ($this->session->userdata('logintype') == 1 || $this->session->userdata('logintype') == 5) {
421 421
             $reseller_id = $this->session->userdata["accountinfo"]['id'];
422 422
         }
@@ -424,113 +424,113 @@  discard block
 block discarded – undo
424 424
 		$full_path = $this->config->item('rates-file-path');
425 425
 		//echo "<pre>";print_r($full_path);exit;
426 426
         $originationrate_file_name = $this->session->userdata('import_package_code_csv');	
427
-        $csv_tmp_data = $this->csvreader->parse_file($full_path.$originationrate_file_name,$new_final_arr_key,$check_header); 
427
+        $csv_tmp_data = $this->csvreader->parse_file($full_path.$originationrate_file_name, $new_final_arr_key, $check_header); 
428 428
         //echo "<pre>";print_r($csv_tmp_data);exit;
429
-	$i=0; 
430
-	     $pattern_arr=array();
429
+	$i = 0; 
430
+	     $pattern_arr = array();
431 431
         foreach ($csv_tmp_data as $key => $csv_data) {	
432
-	  if(isset($csv_data['patterns']) && $csv_data['patterns']!= '' && $i != 0){
433
-	    $str=null;
434
-	    $pattern=$csv_data['patterns'];
435
-	     if(!in_array($csv_data['patterns'],$pattern_arr)){
432
+	  if (isset($csv_data['patterns']) && $csv_data['patterns'] != '' && $i != 0) {
433
+	    $str = null;
434
+	    $pattern = $csv_data['patterns'];
435
+	     if ( ! in_array($csv_data['patterns'], $pattern_arr)) {
436 436
 			$this->db->select('count(id) as count');
437
-			$this->db->where('patterns',"^".$csv_data['patterns'].".*");
438
-			$this->db->where('package_id',$edit_id);
439
-			$pattern_res=(array)$this->db->get('package_patterns')->first_row();
440
-			if($pattern_res['count'] ==0){
441
-			$csv_data['destination']= isset($csv_data['destination'])? $csv_data['destination'] :'';
442
-			$str=$this->data_validate($csv_data);
443
-			if($str != ""){
444
-			$invalid_array[$i]=$csv_data;
437
+			$this->db->where('patterns', "^".$csv_data['patterns'].".*");
438
+			$this->db->where('package_id', $edit_id);
439
+			$pattern_res = (array)$this->db->get('package_patterns')->first_row();
440
+			if ($pattern_res['count'] == 0) {
441
+			$csv_data['destination'] = isset($csv_data['destination']) ? $csv_data['destination'] : '';
442
+			$str = $this->data_validate($csv_data);
443
+			if ($str != "") {
444
+			$invalid_array[$i] = $csv_data;
445 445
 			$invalid_array[$i]['error'] = $str;
446 446
 	    }
447
-	    else{
448
-	      $csv_data['patterns'] = "^" . $csv_data['patterns'] . ".*";
447
+	    else {
448
+	      $csv_data['patterns'] = "^".$csv_data['patterns'].".*";
449 449
 	      $csv_data['package_id'] = $edit_id;
450
-	      $new_final_arr[$i]=$csv_data;
451
-	      $pattern_arr[$csv_data['patterns']]=$csv_data['patterns'];
450
+	      $new_final_arr[$i] = $csv_data;
451
+	      $pattern_arr[$csv_data['patterns']] = $csv_data['patterns'];
452 452
 	    }
453
-	    }else{
454
-			$invalid_array[$i]=$csv_data;
453
+	    } else {
454
+			$invalid_array[$i] = $csv_data;
455 455
 			$invalid_array[$i]['error'] = "Duplicate pattern found from  database.";
456 456
 	     }
457
-	  }else{
458
-		  $invalid_array[$i]=$csv_data;
457
+	  } else {
458
+		  $invalid_array[$i] = $csv_data;
459 459
 	      $invalid_array[$i]['error'] = "Duplicate pattern found from import file";
460 460
 		  }
461
-		  $pattern_arr[$csv_data['patterns']]=$pattern;
461
+		  $pattern_arr[$csv_data['patterns']] = $pattern;
462 462
 	  }
463 463
 
464 464
           $i++;
465 465
         }
466
-          if(!empty($new_final_arr)){
466
+          if ( ! empty($new_final_arr)) {
467 467
   	    $result = $this->package_model->bulk_insert_package_pattern($new_final_arr);
468 468
           }
469 469
        //unlink($full_path.$originationrate_file_name);
470
-	 $count=count($invalid_array);
470
+	 $count = count($invalid_array);
471 471
 	 //echo "<pre>";print_r($count);exit;
472
-        if($count >0){
472
+        if ($count > 0) {
473 473
             $session_id = "-1";
474 474
             $fp = fopen($full_path.$session_id.'.csv', 'w');
475
-            foreach($new_final_arr_key as $key=>$value){
476
-	      $custom_array[0][$key]=ucfirst($key);
475
+            foreach ($new_final_arr_key as $key=>$value) {
476
+	      $custom_array[0][$key] = ucfirst($key);
477 477
             }
478
-            $custom_array[0]['error']= "Error";
479
-            $invalid_array =array_merge($custom_array,$invalid_array);
480
-            foreach($invalid_array as $err_data){
481
-                    fputcsv($fp,$err_data);
478
+            $custom_array[0]['error'] = "Error";
479
+            $invalid_array = array_merge($custom_array, $invalid_array);
480
+            foreach ($invalid_array as $err_data) {
481
+                    fputcsv($fp, $err_data);
482 482
             }
483 483
             fclose($fp);
484 484
            $this->session->set_userdata('import_package_code_csv_error', $session_id.".csv");
485 485
            $data["error"] = $invalid_array;
486 486
            $data['packageid'] = $edit_id;
487 487
            $data['impoted_count'] = count($new_final_arr);
488
-           $data['failure_count'] = count($invalid_array)-1;
488
+           $data['failure_count'] = count($invalid_array) - 1;
489 489
            $data['page_title'] = 'Package Patterns Import Error';
490 490
            //print_r($data)	;exit;
491
-           $this->load->view('view_import_error',$data);
492
-         } else{
491
+           $this->load->view('view_import_error', $data);
492
+         } else {
493 493
 	   $this->session->set_flashdata('astpp_errormsg', 'Package patterns imported successfully!');
494 494
 	   //echo base_url()."package/package_pattern_list/" . $edit_id . "/";exit;
495
-           redirect(base_url()."package/package_pattern_list/" . $edit_id . "/");
495
+           redirect(base_url()."package/package_pattern_list/".$edit_id."/");
496 496
            }
497 497
     }
498 498
     
499
-	  function data_validate($csvdata){
500
-          $str=null;
499
+	  function data_validate($csvdata) {
500
+          $str = null;
501 501
 	  $alpha_regex = "/^[a-z ,.'-]+$/i";
502 502
 	  $alpha_numeric_regex = "/^[a-z0-9 ,.'-]+$/i";
503 503
 	  $email_regex = "/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/"; 
504
-	  $str.= $csvdata['patterns']!= '' ? null : 'Code,';
505
-	  $str=rtrim($str,',');
506
-	  if(!$str){
507
-	      $str.= is_numeric($csvdata['patterns']) ? null : 'Code,';
504
+	  $str .= $csvdata['patterns'] != '' ? null : 'Code,';
505
+	  $str = rtrim($str, ',');
506
+	  if ( ! $str) {
507
+	      $str .= is_numeric($csvdata['patterns']) ? null : 'Code,';
508 508
 
509
-			$str.= preg_match( $alpha_numeric_regex, $csvdata['destination'] ) ? null :'Destination,';
509
+			$str .= preg_match($alpha_numeric_regex, $csvdata['destination']) ? null : 'Destination,';
510 510
 	      
511
-	      if($str){
512
-		$str=rtrim($str,',');
513
-		$error_field=explode(',',$str);
511
+	      if ($str) {
512
+		$str = rtrim($str, ',');
513
+		$error_field = explode(',', $str);
514 514
 		$count = count($error_field);
515
-		$str.= $count > 1 ? ' are not valid' : ' is not Valid';
515
+		$str .= $count > 1 ? ' are not valid' : ' is not Valid';
516 516
 		return $str;
517 517
 	      }
518
-	      else{
518
+	      else {
519 519
 	      return false;
520 520
 	      }
521 521
 	  }
522
-	  else{
523
-	  $str=rtrim($str,',');
524
-	    $error_field=explode(',',$str);
522
+	  else {
523
+	  $str = rtrim($str, ',');
524
+	    $error_field = explode(',', $str);
525 525
 	    $count = count($error_field);
526
-	    $str.= $count > 1 ? ' are required' : ' is Required';
526
+	    $str .= $count > 1 ? ' are required' : ' is Required';
527 527
     return $str;
528 528
     }
529 529
   }
530 530
     
531
-    function package_patterns_error_download(){
531
+    function package_patterns_error_download() {
532 532
         $this->load->helper('download');
533
-        $error_data =  $this->session->userdata('import_package_code_csv_error');
533
+        $error_data = $this->session->userdata('import_package_code_csv_error');
534 534
         $full_path = $this->config->item('rates-file-path');
535 535
         $data = file_get_contents($full_path.$error_data);
536 536
         force_download("Package_Code_error.csv", $data); 
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/package/libraries/package_form.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -22,19 +22,19 @@  discard block
 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'))
25
+if ( ! defined('BASEPATH'))
26 26
     exit('No direct script access allowed');
27 27
 
28 28
 class Package_form {
29 29
 
30
-    function get_package_form_fields($id='') {
31
-        $form['forms'] = array(base_url() . 'package/package_save/'.$id."/",array('id'=>'packeage_form','method'=>'POST','name'=>'packeage_form'));
30
+    function get_package_form_fields($id = '') {
31
+        $form['forms'] = array(base_url().'package/package_save/'.$id."/", array('id'=>'packeage_form', 'method'=>'POST', 'name'=>'packeage_form'));
32 32
         $form['Package Information'] = array(
33 33
             array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''),
34 34
             array('', 'HIDDEN', array('name' => 'status', 'value' => '1'), '', '', ''),
35
-            array('Name', 'INPUT', array('name' => 'package_name', 'size' => '20',  'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', ''),
36
-            array('Rate Group', 'pricelist_id', 'SELECT', '', 'dropdown', 'tOOL TIP', 'Please Enter account number', 'id', 'name', 'pricelists', 'build_dropdown', 'where_arr', array("status" => "0","reseller_id" => "0")),
37
-            array('Included Seconds', 'INPUT', array('name' => 'includedseconds', 'size' => '20',  'class' => "text field medium"), 'trim|is_numeric|required|xss_clean', 'tOOL TIP', ''),
35
+            array('Name', 'INPUT', array('name' => 'package_name', 'size' => '20', 'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', ''),
36
+            array('Rate Group', 'pricelist_id', 'SELECT', '', 'dropdown', 'tOOL TIP', 'Please Enter account number', 'id', 'name', 'pricelists', 'build_dropdown', 'where_arr', array("status" => "0", "reseller_id" => "0")),
37
+            array('Included Seconds', 'INPUT', array('name' => 'includedseconds', 'size' => '20', 'class' => "text field medium"), 'trim|is_numeric|required|xss_clean', 'tOOL TIP', ''),
38 38
 /**
39 39
 ASTPP  3.0 
40 40
 Add For Package Inbound or Outbound or both?
@@ -53,13 +53,13 @@  discard block
 block discarded – undo
53 53
         $form['forms'] = array("", array('id' => "package_search"));
54 54
         $form['Search'] = array(
55 55
             array('Name', 'INPUT', array('name' => 'package_name[package_name]', '', 'size' => '20', 'class' => "text field"), '', 'tOOL TIP', '1', 'package_name[package_name-string]', '', '', '', 'search_string_type', ''),
56
-            array('Rate Group', 'pricelist_id', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'name', 'pricelists', 'build_dropdown', 'where_arr', array("status" => "0","reseller_id" => "0")),
56
+            array('Rate Group', 'pricelist_id', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'name', 'pricelists', 'build_dropdown', 'where_arr', array("status" => "0", "reseller_id" => "0")),
57 57
             array('Included Seconds', 'INPUT', array('name' => 'includedseconds[includedseconds]', 'value' => '', 'size' => '20', 'class' => "text field"), '', 'Tool tips info', '1', 'includedseconds[includedseconds-integer]', '', '', '', 'search_int_type', ''),
58 58
 /**
59 59
 ASTPP  3.0 
60 60
 Add For Package Inbound or Outbound or both?
61 61
 **/ 	    
62
- 	    array('Applicable For?', 'applicable_for', 'SELECT', '', '', 'tOOL TIP', '', '', '', '', 'set_package_type', '',''),
62
+ 	    array('Applicable For?', 'applicable_for', 'SELECT', '', '', 'tOOL TIP', '', '', '', '', 'set_package_type', '', ''),
63 63
 /*********************************************/
64 64
 		array('Status', 'status', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_search_status', '', ''),
65 65
             
@@ -75,28 +75,28 @@  discard block
 block discarded – undo
75 75
 
76 76
     function build_package_list_for_admin() {
77 77
         // array(display name, width, db_field_parent_table,feidname, db_field_child_table,function name);
78
-        $grid_field_arr = json_encode(array(array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "", "", "","","false","center"),
78
+        $grid_field_arr = json_encode(array(array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "", "", "", "", "false", "center"),
79 79
 /**
80 80
 ASTPP  3.0 
81 81
 For Package edit on Name
82 82
 **/ 
83
-            array("Name", "170", "package_name", "", "", "","EDITABLE","true","center"),
83
+            array("Name", "170", "package_name", "", "", "", "EDITABLE", "true", "center"),
84 84
 /***********************************/
85
-            array("Rate Group", "150", "pricelist_id", "name", "pricelists", "get_field_name","","true","center"),
86
-            array("Included Seconds", "160", "includedseconds", "", "", "","","true","center"),
85
+            array("Rate Group", "150", "pricelist_id", "name", "pricelists", "get_field_name", "", "true", "center"),
86
+            array("Included Seconds", "160", "includedseconds", "", "", "", "", "true", "center"),
87 87
 /**
88 88
 ASTPP  3.0 
89 89
 Add For Package Inbound or Outbound or both?
90 90
 **/	    
91
-	    array("Applicable For?", "200", "applicable_for", "applicable_for", "applicable_for", "get_package_type","","true","center"),
91
+	    array("Applicable For?", "200", "applicable_for", "applicable_for", "applicable_for", "get_package_type", "", "true", "center"),
92 92
 /****************************************************/
93 93
 	    /*
94 94
             ASTPP  3.0 
95 95
             Creation date,last modified date show in grid
96 96
             */
97
-             array("Status", "140", "status", "status", "packages", "get_status","","true","center"),
98
-            array("Created Date", "120", "creation_date", "creation_date", "creation_date", "convert_GMT_to","","true","center"),
99
-            array("Modified Date", "140", "last_modified_date", "last_modified_date", "last_modified_date", "convert_GMT_to","","true","center"),
97
+             array("Status", "140", "status", "status", "packages", "get_status", "", "true", "center"),
98
+            array("Created Date", "120", "creation_date", "creation_date", "creation_date", "convert_GMT_to", "", "true", "center"),
99
+            array("Modified Date", "140", "last_modified_date", "last_modified_date", "last_modified_date", "convert_GMT_to", "", "true", "center"),
100 100
             /***************************************************************/
101 101
             /*
102 102
 	    ASTPP  3.0 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     }
112 112
 
113 113
     function build_grid_buttons() {
114
-        $buttons_json = json_encode(array(array("Create","btn btn-line-warning btn","fa fa-plus-circle fa-lg", "button_action", "/package/package_add/"),
114
+        $buttons_json = json_encode(array(array("Create", "btn btn-line-warning btn", "fa fa-plus-circle fa-lg", "button_action", "/package/package_add/"),
115 115
             array("Delete", "btn btn-line-danger", "fa fa-times-circle fa-lg", "button_action", "/package/package_delete_multiple/")
116 116
             ));
117 117
         return $buttons_json;
@@ -121,15 +121,15 @@  discard block
 block discarded – undo
121 121
 
122 122
     function build_package_counter_list_for_admin() {
123 123
      // array(display name, width, db_field_parent_table,feidname, db_field_child_table,function name);
124
-        $grid_field_arr = json_encode(array(array("Package Name", "430", "package_id", "package_name", "packages", "get_field_name","","true","center"),
125
-            array("Account", "420", "accountid", "first_name,last_name,number", "accounts", "get_field_name_coma_new","","true","center"),
126
-            array("Used Seconds", "420", "seconds", "", "", "","","true","center"),
124
+        $grid_field_arr = json_encode(array(array("Package Name", "430", "package_id", "package_name", "packages", "get_field_name", "", "true", "center"),
125
+            array("Account", "420", "accountid", "first_name,last_name,number", "accounts", "get_field_name_coma_new", "", "true", "center"),
126
+            array("Used Seconds", "420", "seconds", "", "", "", "", "true", "center"),
127 127
                 ));
128 128
         return $grid_field_arr;
129 129
     }
130 130
     function build_pattern_list_for_customer($packageid) {
131 131
         $grid_field_arr = json_encode(array(
132
-            array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "", "", "","","false","center"),
132
+            array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "", "", "", "", "false", "center"),
133 133
             array("Code", "450", "patterns", "patterns", "", "get_only_numeric_val"),
134 134
             array("Destination", "450", "destination", "", "", ""),
135 135
             array("Action", "100", "", "", "", array("DELETE" => array("url" => "package/package_patterns_delete/$packageid/", "mode" => "single")))
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         return $grid_field_arr;
138 138
     }
139 139
     function set_pattern_grid_buttons($packageid) {
140
-        $buttons_json = json_encode(array(array("Create","btn btn-line-warning btn","fa fa-plus-circle fa-lg", "button_action", "/package/customer_add_patterns/$packageid", "popup")));
140
+        $buttons_json = json_encode(array(array("Create", "btn btn-line-warning btn", "fa fa-plus-circle fa-lg", "button_action", "/package/customer_add_patterns/$packageid", "popup")));
141 141
         return $buttons_json;
142 142
     }
143 143
 
@@ -145,17 +145,17 @@  discard block
 block discarded – undo
145 145
 
146 146
 function build_package_counter_report() {
147 147
         $buttons_json = json_encode(array(
148
-            array("Export","btn btn-xing" ," fa fa-download fa-lg", "button_action", "/package/package_counter_report_export/", 'single')
148
+            array("Export", "btn btn-xing", " fa fa-download fa-lg", "button_action", "/package/package_counter_report_export/", 'single')
149 149
             
150 150
             ));
151 151
         return $buttons_json;
152 152
     }
153
-    function build_package_list_for_reseller(){
153
+    function build_package_list_for_reseller() {
154 154
             $grid_field_arr = json_encode(array(
155
-            array("Name", "310", "package_name", "", "", "","","true","center"),
156
-            array("Rate Group", "250", "pricelist_id", "name", "pricelists", "get_field_name","","true","center"),
157
-            array("Included Seconds", "260", "includedseconds", "", "", "","","true","center"),
158
-            array("Status", "160", "status", "status", "status", "get_status","","true","center"),
155
+            array("Name", "310", "package_name", "", "", "", "", "true", "center"),
156
+            array("Rate Group", "250", "pricelist_id", "name", "pricelists", "get_field_name", "", "true", "center"),
157
+            array("Included Seconds", "260", "includedseconds", "", "", "", "", "true", "center"),
158
+            array("Status", "160", "status", "status", "status", "get_status", "", "true", "center"),
159 159
                 ));
160 160
         return $grid_field_arr;
161 161
     }
Please login to merge, or discard this patch.
astpp/application/modules/package/views/view_package_pattern_list.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -24,32 +24,32 @@
 block discarded – undo
24 24
             <div class="col-md-12 no-padding color-three border_box"> 
25 25
                 <div class="pull-left">
26 26
                     <ul class="breadcrumb">
27
-                        <li><a href="<?= base_url() . "package/package_list/";?>">Package List </a></li>
27
+                        <li><a href="<?= base_url()."package/package_list/"; ?>">Package List </a></li>
28 28
                         <li class="active">
29
-                            <a href="<?= base_url() . "package/package_edit/". $edit_id . "/";?>">Details </a>
29
+                            <a href="<?= base_url()."package/package_edit/".$edit_id."/"; ?>">Details </a>
30 30
                         </li>
31 31
                         <li class="active">
32
-                            <a href="<?= base_url() . "package/package_pattern_list/". $edit_id . "/";?>">Codes </a>
32
+                            <a href="<?= base_url()."package/package_pattern_list/".$edit_id."/"; ?>">Codes </a>
33 33
                         </li>
34 34
                     </ul>
35 35
                 </div>
36 36
                   <ul class="breadcrumb">
37 37
                 <li class="active pull-right">
38
-		      <a href="<?= base_url() . "package/package_edit/" . strtolower($accounttype) . $edit_id . "/"; ?>"> <i class="fa fa-fast-backward" aria-hidden="true"></i> Back</a></li>
38
+		      <a href="<?= base_url()."package/package_edit/".strtolower($accounttype).$edit_id."/"; ?>"> <i class="fa fa-fast-backward" aria-hidden="true"></i> Back</a></li>
39 39
 		      </ul>
40 40
             </div> 
41 41
             <div class="padding-15 col-md-12">
42 42
                 <div class="col-md-12 no-padding">
43 43
                     <div class="pull-left margin-t-10">
44 44
                         <span class="btn btn-line-warning">
45
-                            <a href='<?php echo base_url() . "/package/package_patterns_add/" . $edit_id . "/"; ?>' rel="facebox_medium" title="Add">
45
+                            <a href='<?php echo base_url()."/package/package_patterns_add/".$edit_id."/"; ?>' rel="facebox_medium" title="Add">
46 46
                                 <i class="fa fa-plus-circle fa-lg"></i> Add
47 47
                             </a>
48 48
                         </span>
49 49
                     </div>
50 50
                     
51 51
                     <div class="pull-left margin-t-10" style="padding-left:5px">
52
-						<a href='<?php echo base_url() . "/package/package_patterns_import/" . $edit_id . "/"; ?>' title="Import">
52
+						<a href='<?php echo base_url()."/package/package_patterns_import/".$edit_id."/"; ?>' title="Import">
53 53
                         <span class="btn btn-line-blue">
54 54
                             
55 55
                                 <i class="fa fa-upload fa-lg"></i> Import
Please login to merge, or discard this patch.
astpp/application/modules/package/views/view_packages_edit.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -10,15 +10,15 @@
 block discarded – undo
10 10
             <div class="col-md-12 no-padding color-three border_box"> 
11 11
                 <div class="pull-left">
12 12
                     <ul class="breadcrumb">
13
-                        <li><a href="<?= base_url() . "package/package_list/";?>">Package List </a></li>
13
+                        <li><a href="<?= base_url()."package/package_list/"; ?>">Package List </a></li>
14 14
                         <li class="active">
15
-                            <a href="<?= base_url() . "package/package_edit/". $edit_id . "/";?>">Details </a>
15
+                            <a href="<?= base_url()."package/package_edit/".$edit_id."/"; ?>">Details </a>
16 16
                         </li>
17 17
                     </ul>
18 18
                 </div>
19 19
                   <ul class="breadcrumb">
20 20
                 <li class="active pull-right">
21
-		      <a href="<?= base_url() . "package/package_list/"?>"> <i class="fa fa-fast-backward" aria-hidden="true"></i> Back</a></li>
21
+		      <a href="<?= base_url()."package/package_list/"?>"> <i class="fa fa-fast-backward" aria-hidden="true"></i> Back</a></li>
22 22
 		      </ul>
23 23
             </div>
24 24
             <div class="padding-15 col-md-12">
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/package/views/view_package_add.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
         <div class="w-section inverse no-padding">
13 13
             <?php echo $form; ?>
14 14
              <?php
15
-                if(isset($validation_errors) && $validation_errors != ''){ ?>
15
+                if (isset($validation_errors) && $validation_errors != '') { ?>
16 16
                     <script>
17 17
                         var ERR_STR = '<?php echo $validation_errors; ?>';
18 18
                         print_error(ERR_STR);
Please login to merge, or discard this patch.
astpp/application/modules/package/views/view_import_package_code.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -2,20 +2,20 @@  discard block
 block discarded – undo
2 2
 <? startblock('extra_head') ?>
3 3
 <? endblock() ?>
4 4
 <? startblock('page-title') ?>
5
-<?= $page_title;?>
5
+<?= $page_title; ?>
6 6
 <? endblock() ?>
7 7
 <? startblock('content') ?>        
8
-   <?php if(!isset($csv_tmp_data)){ ?>
8
+   <?php if ( ! isset($csv_tmp_data)) { ?>
9 9
    
10 10
 <section class="slice color-three padding-t-20">
11 11
 	<div class="w-section inverse no-padding">
12 12
     	<div class="container">
13
-    	 <form method="post" action="<?= base_url().'package/package_patterns_preview_file/'.$edit_id . "/"?>" enctype="multipart/form-data" id="package_code">
13
+    	 <form method="post" action="<?= base_url().'package/package_patterns_preview_file/'.$edit_id."/"?>" enctype="multipart/form-data" id="package_code">
14 14
         	<div class="row">
15 15
               <div class="col-md-12">
16 16
             	<div class="w-box">
17 17
                    <span  style="margin-left:10px; text-align: center;background-color: none;color:#DD191D;">
18
-                    <? if(isset($error) && !empty($error)) {
18
+                    <? if (isset($error) && ! empty($error)) {
19 19
                         echo $error;
20 20
                     }?>
21 21
                    </span>            	
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
                                </div>
36 36
                            </div>
37 37
 				<?
38
-				 $logintype=$this->session->userdata('userlevel_logintype');
38
+				 $logintype = $this->session->userdata('userlevel_logintype');
39 39
 				       // $trunk=null;
40
-				 if($logintype !=1) { ?>
40
+				 if ($logintype != 1) { ?>
41 41
                            <div class="col-md-12 no-padding">
42 42
                               
43 43
                                <div>
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
                <div class="col-md-12 padding-b-10">
86 86
                    <div class="pull-right">
87 87
                      <input class="btn btn-line-parrot" id="import_package_code" type="submit" name="action" value="Import" />
88
-					<a href="<?= base_url().'package/package_pattern_list/'. $edit_id . "/"?>"><input class="btn btn-line-sky margin-x-10" id="ok" type="button" name="action" value="Cancel"/> </a>
88
+					<a href="<?= base_url().'package/package_pattern_list/'.$edit_id."/"?>"><input class="btn btn-line-sky margin-x-10" id="ok" type="button" name="action" value="Cancel"/> </a>
89 89
 
90 90
                    </div>
91 91
                </div>
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 <?}?>    
99 99
         
100 100
 <?php
101
-    if(isset($csv_tmp_data) && !empty($csv_tmp_data)){ ?>
101
+    if (isset($csv_tmp_data) && ! empty($csv_tmp_data)) { ?>
102 102
 
103 103
 <section class="slice color-three">
104 104
 	<div class="w-section inverse no-padding">
@@ -107,14 +107,14 @@  discard block
 block discarded – undo
107 107
              <div class="col-md-12 margin-t-10">
108 108
             <form id="import_form" name="import_form" action="<?=base_url()?>package/package_patterns_import_file/<?=$edit_id?>/<?=$check_header?>/" method="POST">
109 109
             <table width="100%" border="1"  class="details_table table">
110
-                <?  $cnt =7;
111
-                    foreach($csv_tmp_data as $csv_key => $csv_value){
112
-                        if($csv_key <  15){
110
+                <?  $cnt = 7;
111
+                    foreach ($csv_tmp_data as $csv_key => $csv_value) {
112
+                        if ($csv_key < 15) {
113 113
                             echo "<tr>";
114
-                            foreach($csv_value as $field_name => $field_val){
115
-                                if($csv_key == 0){
114
+                            foreach ($csv_value as $field_name => $field_val) {
115
+                                if ($csv_key == 0) {
116 116
                                     echo "<th>".ucfirst($field_name)."</th>";
117
-                                }else{
117
+                                } else {
118 118
                                     echo "<td class='portlet-content'>".$field_val."</td>";   
119 119
                                 }
120 120
                             }
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/package/views/view_import_error.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
     </div> 
44 44
 <br/>
45 45
 
46
-                    <?php if(isset($packageid) && $packageid!= ""){ ?>
46
+                    <?php if (isset($packageid) && $packageid != "") { ?>
47 47
 <div class="col-md-12 padding-b-10">
48 48
                    <div class="pull-right">
49 49
                         <a href="<?= base_url().'package/package_pattern_list/'.$packageid?>"><input class="btn btn-line-sky margin-x-10" id="back_to_list" type="button" name="action" value="Back to Package Patterns List" /> </a>
Please login to merge, or discard this patch.