Passed
Push — v3.0 ( ee545b...afe0c2 )
by Samir
152:57 queued 117:51
created
web_interface/astpp/application/modules/summary/controllers/summary.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -327,14 +327,14 @@  discard block
 block discarded – undo
327 327
             unset($_POST['advance_search']);
328 328
             $this->session->set_userdata('customersummary_reports_search', $this->input->post());
329 329
         }
330
-        redirect(base_url() . 'summary/customer/');
330
+        redirect(base_url().'summary/customer/');
331 331
     }
332 332
 
333 333
     function customer_clearsearchfilter() {
334 334
         $this->session->set_userdata('advance_search', 0);
335 335
         $this->session->set_userdata('customersummary_reports_search', "");
336 336
         $this->session->set_userdata('customersummary_reports_export', "");
337
-        redirect(base_url() . 'summary/customer/');
337
+        redirect(base_url().'summary/customer/');
338 338
     }
339 339
 
340 340
     /**
@@ -343,11 +343,11 @@  discard block
 block discarded – undo
343 343
     function summary_search_info($entity) {
344 344
         $group_by_str = null;
345 345
         $select_str = null;
346
-        $group_by_time=null;
346
+        $group_by_time = null;
347 347
         $group_by_1 = null;
348 348
         $group_by_2 = null;
349 349
         $group_by_3 = null;
350
-        $order_str=null;
350
+        $order_str = null;
351 351
         $custom_total_array = array();
352 352
         $custom_search = array();
353 353
         $export_select_str = null;
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/summary/libraries/summary_form.php 1 patch
Spacing   +92 added lines, -92 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 # along with this program.  If not, see <http://www.gnu.org/licenses/>
21 21
 ############################################################################
22 22
 
23
-if (!defined('BASEPATH'))
23
+if ( ! defined('BASEPATH'))
24 24
 	exit('No direct script access allowed');
25 25
 
26 26
 class Summary_form {
@@ -33,9 +33,9 @@  discard block
 block discarded – undo
33 33
 		$form['Search'] = array(
34 34
 	array('From Date', 'INPUT', array('name' => 'callstart[]', 'id' => 'customer_from_date', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '', 'start_date[start_date-date]'),
35 35
 			array('To Date', 'INPUT', array('name' => 'callstart[]', 'id' => 'customer_to_date', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '', 'end_date[end_date-date]'),
36
-			array('Account', 'provider_id', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'IF(`deleted`=1,concat( first_name, " ", last_name, " ", "(", number, ")^" ),concat( first_name, " ", last_name, " ", "(", number, ")" )) as number', 'accounts', 'build_dropdown_deleted', 'where_arr', array("reseller_id" => "0","type"=>"3")),
36
+			array('Account', 'provider_id', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'IF(`deleted`=1,concat( first_name, " ", last_name, " ", "(", number, ")^" ),concat( first_name, " ", last_name, " ", "(", number, ")" )) as number', 'accounts', 'build_dropdown_deleted', 'where_arr', array("reseller_id" => "0", "type"=>"3")),
37 37
 			array('Trunk', 'trunk_id', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'IF(`status`=2, concat(name,"","^"),name) as name', 'trunks', 'build_dropdown_deleted', '', array("status" => "1")),
38
-			array('Code ', 'INPUT', array('name' => 'pattern[pattern]', 'value' => '', 'size' => '20',  'class' => "text field "), '', 'Tool tips info', '1', 'pattern[pattern-string]', '', '', '', 'search_string_type', ''),
38
+			array('Code ', 'INPUT', array('name' => 'pattern[pattern]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'pattern[pattern-string]', '', '', '', 'search_string_type', ''),
39 39
 			array(' Code Destination ', 'INPUT', array('name' => 'notes[notes]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'notes[notes-string]', '', '', '', 'search_string_type', ''), 
40 40
 			array('', 'HIDDEN', 'ajax_search', '1', '', '', ''),
41 41
 			array('', 'HIDDEN', 'advance_search', '1', '', '', ''));
@@ -44,124 +44,124 @@  discard block
 block discarded – undo
44 44
 
45 45
 		return $form;
46 46
 	}
47
-	function build_providersummary(){
47
+	function build_providersummary() {
48 48
 		
49 49
 $account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
50
-$currency_id=$account_info['currency_id'];
51
-$currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id);	
50
+$currency_id = $account_info['currency_id'];
51
+$currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id);	
52 52
 		
53
-		$new_arr=array();
54
-	if($this->CI->session->userdata('advance_search')=='1'){
55
-		$search_array=$this->CI->session->userdata('providersummary_reports_search');
56
-				if(isset($search_array['time']) && !empty($search_array['time'])){
57
-				   $new_arr[]=array($search_array['time'], "151", $search_array['time']."(callstart)", "", "", "");
53
+		$new_arr = array();
54
+	if ($this->CI->session->userdata('advance_search') == '1') {
55
+		$search_array = $this->CI->session->userdata('providersummary_reports_search');
56
+				if (isset($search_array['time']) && ! empty($search_array['time'])) {
57
+				   $new_arr[] = array($search_array['time'], "151", $search_array['time']."(callstart)", "", "", "");
58 58
 				}
59
-		if(isset($search_array['groupby_1']) && !empty($search_array['groupby_1'])){
60
-					$first_column_groupby=$search_array['groupby_1'];
61
-					if($first_column_groupby == 'provider_id'){
62
-						$new_arr[]=array("Account", "151", "provider_id", "first_name,last_name,number", "accounts", "build_concat_string");    
63
-					} elseif ($first_column_groupby =='pattern'){
64
-						$new_arr[]=array("Code", "65", "pattern", "pattern", "", "get_only_numeric_val");
65
-						$new_arr[]=array("Destination", "85", "notes", "", "", "");    
66
-					} elseif($first_column_groupby =='trunk_id'){
67
-						$new_arr[]=array("Trunk", "151", "trunk_id", "name", "trunks", "get_field_name");
68
-					} elseif($first_column_groupby == 'package_id'){
69
-						$new_arr[]=array("Package", "151", "package_id", "first_name,last_name,number", "accounts", "build_concat_string");    
59
+		if (isset($search_array['groupby_1']) && ! empty($search_array['groupby_1'])) {
60
+					$first_column_groupby = $search_array['groupby_1'];
61
+					if ($first_column_groupby == 'provider_id') {
62
+						$new_arr[] = array("Account", "151", "provider_id", "first_name,last_name,number", "accounts", "build_concat_string");    
63
+					} elseif ($first_column_groupby == 'pattern') {
64
+						$new_arr[] = array("Code", "65", "pattern", "pattern", "", "get_only_numeric_val");
65
+						$new_arr[] = array("Destination", "85", "notes", "", "", "");    
66
+					} elseif ($first_column_groupby == 'trunk_id') {
67
+						$new_arr[] = array("Trunk", "151", "trunk_id", "name", "trunks", "get_field_name");
68
+					} elseif ($first_column_groupby == 'package_id') {
69
+						$new_arr[] = array("Package", "151", "package_id", "first_name,last_name,number", "accounts", "build_concat_string");    
70 70
 					}
71 71
 				}
72
-				if(isset($search_array['groupby_2']) && !empty($search_array['groupby_2'])){
73
-					$third_column_groupby=$search_array['groupby_2'];
74
-					if($third_column_groupby == 'provider_id'){
75
-						$new_arr[]=array("Account", "151", "provider_id", "first_name,last_name,number", "accounts", "build_concat_string");    
76
-					} elseif ($third_column_groupby =='pattern'){
77
-						$new_arr[]=array("Code", "65", "pattern", "pattern", "", "get_only_numeric_val");
78
-						$new_arr[]=array("Destination", "85", "notes", "", "", "");    
79
-					} elseif($third_column_groupby=='trunk_id'){
80
-						$new_arr[]=array("Trunk", "151", "trunk_id", "name", "trunks", "get_field_name");
81
-					} elseif($third_column_groupby == 'package_id'){
82
-						$new_arr[]=array("Package", "151", "package_id", "first_name,last_name,number", "accounts", "build_concat_string");    
72
+				if (isset($search_array['groupby_2']) && ! empty($search_array['groupby_2'])) {
73
+					$third_column_groupby = $search_array['groupby_2'];
74
+					if ($third_column_groupby == 'provider_id') {
75
+						$new_arr[] = array("Account", "151", "provider_id", "first_name,last_name,number", "accounts", "build_concat_string");    
76
+					} elseif ($third_column_groupby == 'pattern') {
77
+						$new_arr[] = array("Code", "65", "pattern", "pattern", "", "get_only_numeric_val");
78
+						$new_arr[] = array("Destination", "85", "notes", "", "", "");    
79
+					} elseif ($third_column_groupby == 'trunk_id') {
80
+						$new_arr[] = array("Trunk", "151", "trunk_id", "name", "trunks", "get_field_name");
81
+					} elseif ($third_column_groupby == 'package_id') {
82
+						$new_arr[] = array("Package", "151", "package_id", "first_name,last_name,number", "accounts", "build_concat_string");    
83 83
 					}
84 84
 				}
85
-				if(isset($search_array['groupby_3']) && !empty($search_array['groupby_3'])){
86
-					$fifth_column_groupby=$search_array['groupby_3'];
87
-					if($fifth_column_groupby == 'provider_id'){
88
-						$new_arr[]=array("Account", "151", "provider_id", "first_name,last_name,number", "accounts", "build_concat_string");    
89
-					} elseif ($fifth_column_groupby =='pattern'){
90
-						$new_arr[]=array("Code", "65", "pattern", "pattern", "", "get_only_numeric_val");
91
-						$new_arr[]=array("Destination", "85", "notes", "", "", "");    
92
-					} elseif($fifth_column_groupby == 'trunk_id'){
93
-						$new_arr[]=array("Trunk", "151", "trunk_id", "name", "trunks", "get_field_name");
94
-					} elseif($fifth_column_groupby == 'package_id'){
95
-						$new_arr[]=array("Package", "151", "package_id", "first_name,last_name,number", "accounts", "build_concat_string");    
85
+				if (isset($search_array['groupby_3']) && ! empty($search_array['groupby_3'])) {
86
+					$fifth_column_groupby = $search_array['groupby_3'];
87
+					if ($fifth_column_groupby == 'provider_id') {
88
+						$new_arr[] = array("Account", "151", "provider_id", "first_name,last_name,number", "accounts", "build_concat_string");    
89
+					} elseif ($fifth_column_groupby == 'pattern') {
90
+						$new_arr[] = array("Code", "65", "pattern", "pattern", "", "get_only_numeric_val");
91
+						$new_arr[] = array("Destination", "85", "notes", "", "", "");    
92
+					} elseif ($fifth_column_groupby == 'trunk_id') {
93
+						$new_arr[] = array("Trunk", "151", "trunk_id", "name", "trunks", "get_field_name");
94
+					} elseif ($fifth_column_groupby == 'package_id') {
95
+						$new_arr[] = array("Package", "151", "package_id", "first_name,last_name,number", "accounts", "build_concat_string");    
96 96
 					}
97 97
 				}
98 98
 	}
99
-		if(empty($new_arr))
100
-			$new_arr[]=array("Account", "453", "provider_id", "first_name,last_name,number", "accounts", "build_concat_string");
99
+		if (empty($new_arr))
100
+			$new_arr[] = array("Account", "453", "provider_id", "first_name,last_name,number", "accounts", "build_concat_string");
101 101
 		$fixed_arr = array(
102 102
 			array("Attempted Calls", "130", "attempted_calls", "", "", ""),
103 103
 			array("Completed Calls", "130", "description", "", "", ""),
104
-			array("Duration","85","billable",'','',''),
105
-			array("ASR","83","asr",'','',''),
106
-			array("ACD","83","acd  ",'','',''),
107
-			array("MCD","83","mcd",'','',''),
108
-			array("Billable","102","billable",'','',''),
109
-			array("Cost($currency)","117","cost",'','',''),
104
+			array("Duration", "85", "billable", '', '', ''),
105
+			array("ASR", "83", "asr", '', '', ''),
106
+			array("ACD", "83", "acd  ", '', '', ''),
107
+			array("MCD", "83", "mcd", '', '', ''),
108
+			array("Billable", "102", "billable", '', '', ''),
109
+			array("Cost($currency)", "117", "cost", '', '', ''),
110 110
 			);
111
-		$grid_field_arr = json_encode(array_merge($new_arr,$fixed_arr));
111
+		$grid_field_arr = json_encode(array_merge($new_arr, $fixed_arr));
112 112
 		return $grid_field_arr;
113 113
 	}
114 114
 	function build_grid_buttons_providersummary() {
115
-	   $buttons_json = json_encode(array(array("Export","btn btn-xing" ," fa fa-download fa-lg", "button_action", "/summary/provider_export_csv/", 'single')));
115
+	   $buttons_json = json_encode(array(array("Export", "btn btn-xing", " fa fa-download fa-lg", "button_action", "/summary/provider_export_csv/", 'single')));
116 116
 	   return $buttons_json;
117 117
 	}
118 118
 	function get_resellersummary_search_form() {
119
-		$form['forms'] = array("",array('id' => "resellersummary_search"));
119
+		$form['forms'] = array("", array('id' => "resellersummary_search"));
120 120
 		$form['Search'] = array(
121 121
 			array('From Date', 'INPUT', array('name' => 'callstart[]', 'id' => 'customer_from_date', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '', 'start_date[start_date-date]'),
122 122
 			array('To Date', 'INPUT', array('name' => 'callstart[]', 'id' => 'customer_to_date', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '', 'end_date[end_date-date]'),
123
-			array('Account', 'reseller_id', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'IF(`deleted`=1,concat( first_name, " ", last_name, " ", "(", number, ")^" ),concat( first_name, " ", last_name, " ", "(", number, ")" )) as number', 'accounts', 'build_dropdown_deleted', 'where_arr', array("reseller_id" => "0","type"=>"1")),
123
+			array('Account', 'reseller_id', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'IF(`deleted`=1,concat( first_name, " ", last_name, " ", "(", number, ")^" ),concat( first_name, " ", last_name, " ", "(", number, ")" )) as number', 'accounts', 'build_dropdown_deleted', 'where_arr', array("reseller_id" => "0", "type"=>"1")),
124 124
 			array('Code ', 'INPUT', array('name' => 'pattern[pattern]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'pattern[pattern-string]', '', '', '', 'search_string_type', ''),
125 125
 			array('Destination ', 'INPUT', array('name' => 'notes[notes]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'notes[notes-string]', '', '', '', 'search_string_type', ''), 
126
-			array('', 'HIDDEN', 'ajax_search', '1', '', '', ''),array('', 'HIDDEN', 'advance_search', '1', '', '', ''));
126
+			array('', 'HIDDEN', 'ajax_search', '1', '', '', ''), array('', 'HIDDEN', 'advance_search', '1', '', '', ''));
127 127
 		$form['button_search'] = array('name' => 'action', 'id' => "resellersummary_search_btn", 'content' => 'Search', 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right');
128 128
 		$form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => 'Clear', 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10');
129 129
 
130 130
 		return $form;
131 131
 	}
132
-	function build_resellersummary($new_column_arr){
132
+	function build_resellersummary($new_column_arr) {
133 133
 		
134 134
 $account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
135
-$currency_id=$account_info['currency_id'];
136
-$currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id);		
135
+$currency_id = $account_info['currency_id'];
136
+$currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id);		
137 137
 		
138
-$column_arr=array(
139
-			array("Attempted Calls", "120", "attempted_calls", "", "", "","","true","center"),
140
-			array("Completed Calls", "120", "description", "", "", "","","true","center"),
141
-			array("Duration","91","billable",'','','',"","true","center"),
142
-			array("ASR","78","asr",'','','',"","true","center"),
143
-			array("ACD","78","acd  ",'','','',"","true","center"),
144
-			array("MCD","78","mcd",'','','',"","true","center"),
145
-			array("Billable","80","billable",'','','',"","true","center"),
146
-			array("Debit($currency)","100","cost",'','','',"","true","right"),
147
-			array("Cost($currency)","100","price",'','','',"","true","right"),            
148
-			array("Profit($currency)", "100", "profit", "", "", "","","true","right"),
138
+$column_arr = array(
139
+			array("Attempted Calls", "120", "attempted_calls", "", "", "", "", "true", "center"),
140
+			array("Completed Calls", "120", "description", "", "", "", "", "true", "center"),
141
+			array("Duration", "91", "billable", '', '', '', "", "true", "center"),
142
+			array("ASR", "78", "asr", '', '', '', "", "true", "center"),
143
+			array("ACD", "78", "acd  ", '', '', '', "", "true", "center"),
144
+			array("MCD", "78", "mcd", '', '', '', "", "true", "center"),
145
+			array("Billable", "80", "billable", '', '', '', "", "true", "center"),
146
+			array("Debit($currency)", "100", "cost", '', '', '', "", "true", "right"),
147
+			array("Cost($currency)", "100", "price", '', '', '', "", "true", "right"),            
148
+			array("Profit($currency)", "100", "profit", "", "", "", "", "true", "right"),
149 149
 			);
150
-		$grid_field_arr = json_encode(array_merge($new_column_arr,$column_arr));
150
+		$grid_field_arr = json_encode(array_merge($new_column_arr, $column_arr));
151 151
 		return $grid_field_arr;
152 152
 	}
153 153
 	function build_grid_buttons_resellersummary() {
154
-		 $buttons_json = json_encode(array(array("Export","btn btn-xing" ," fa fa-download fa-lg", "button_action", "/summary/reseller_export_csv/", 'single')));
154
+		 $buttons_json = json_encode(array(array("Export", "btn btn-xing", " fa fa-download fa-lg", "button_action", "/summary/reseller_export_csv/", 'single')));
155 155
 		return $buttons_json;
156 156
 	}
157 157
 	function get_customersummary_search_form() {
158 158
         
159
-		$form['forms'] = array(base_url() . 'summary/customer_search',array('id' => "customersummary_search","name"=>"customersummary_search"));
159
+		$form['forms'] = array(base_url().'summary/customer_search', array('id' => "customersummary_search", "name"=>"customersummary_search"));
160 160
 		$form['Search'] = array(
161 161
 			array('From Date', 'INPUT', array('name' => 'callstart[]', 'id' => 'customer_from_date', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '', 'start_date[start_date-date]'),
162 162
 			array('To Date', 'INPUT', array('name' => 'callstart[]', 'id' => 'customer_to_date', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '', 'end_date[end_date-date]'),
163
-		array('Accounts', 'accountid', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'IF(`deleted`=1,concat( first_name, " ", last_name, " ", "(", number, ")^" ),concat( first_name, " ", last_name, " ", "(", number, ")" )) as number', 'accounts', 'build_dropdown_deleted', 'where_arr', array("reseller_id" => "0","type"=>"GLOBAL")),
164
-			array('Code ', 'INPUT', array('name' => 'pattern[pattern]', 'value' => '', 'size' => '20',  'class' => "text field "), '', 'Tool tips info', '1', 'pattern[pattern-string]', '', '', '', 'search_string_type', ''),
163
+		array('Accounts', 'accountid', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'IF(`deleted`=1,concat( first_name, " ", last_name, " ", "(", number, ")^" ),concat( first_name, " ", last_name, " ", "(", number, ")" )) as number', 'accounts', 'build_dropdown_deleted', 'where_arr', array("reseller_id" => "0", "type"=>"GLOBAL")),
164
+			array('Code ', 'INPUT', array('name' => 'pattern[pattern]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'pattern[pattern-string]', '', '', '', 'search_string_type', ''),
165 165
 			array('Code Destination ', 'INPUT', array('name' => 'notes[notes]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'notes[notes-string]', '', '', '', 'search_string_type', ''),
166 166
 			array('', 'HIDDEN', 'ajax_search', '1', '', '', ''),
167 167
 			array('', 'HIDDEN', 'advance_search', '1', '', '', '')
@@ -176,29 +176,29 @@  discard block
 block discarded – undo
176 176
 
177 177
 		return $form;
178 178
 	}
179
-	function build_customersummary($new_column_arr){
179
+	function build_customersummary($new_column_arr) {
180 180
 		
181 181
 $account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
182
-$currency_id=$account_info['currency_id'];
183
-$currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id);		
182
+$currency_id = $account_info['currency_id'];
183
+$currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id);		
184 184
 		
185
-		$column_arr=array(
186
-			array("Attempted Calls", "120", "attempted_calls", "", "", "","","true","center"),
187
-			array("Completed Calls", "120", "description", "", "", "","","true","center"),
188
-			array("Duration","95","billable",'','','',"","true","center"),
189
-			array("ASR","85","asr",'','','',"","true","center"),
190
-			array("ACD","85","acd  ",'','','',"","true","center"),
191
-			array("MCD","85","mcd",'','','',"","true","center"),
192
-			array("Billable","90","billable",'','','',"","true","right"),
193
-			array("Debit($currency)","87","cost",'','','',"","true","right"),
194
-			array("Cost($currency)","85","price",'','','',"","true","right"),            
195
-			array("Profit($currency)", "93", "profit", "", "", "","","true","right"),
185
+		$column_arr = array(
186
+			array("Attempted Calls", "120", "attempted_calls", "", "", "", "", "true", "center"),
187
+			array("Completed Calls", "120", "description", "", "", "", "", "true", "center"),
188
+			array("Duration", "95", "billable", '', '', '', "", "true", "center"),
189
+			array("ASR", "85", "asr", '', '', '', "", "true", "center"),
190
+			array("ACD", "85", "acd  ", '', '', '', "", "true", "center"),
191
+			array("MCD", "85", "mcd", '', '', '', "", "true", "center"),
192
+			array("Billable", "90", "billable", '', '', '', "", "true", "right"),
193
+			array("Debit($currency)", "87", "cost", '', '', '', "", "true", "right"),
194
+			array("Cost($currency)", "85", "price", '', '', '', "", "true", "right"),            
195
+			array("Profit($currency)", "93", "profit", "", "", "", "", "true", "right"),
196 196
 			);
197
-		$grid_field_arr = json_encode(array_merge($new_column_arr,$column_arr));
197
+		$grid_field_arr = json_encode(array_merge($new_column_arr, $column_arr));
198 198
 		return $grid_field_arr;
199 199
 	}
200 200
 	function build_grid_buttons_customersummary() {
201
-		$buttons_json = json_encode(array(array("Export","btn btn-xing" ," fa fa-download fa-lg", "button_action", "/summary/customer_export_csv/", 'single')));
201
+		$buttons_json = json_encode(array(array("Export", "btn btn-xing", " fa fa-download fa-lg", "button_action", "/summary/customer_export_csv/", 'single')));
202 202
 		return $buttons_json;
203 203
 	}
204 204
 
Please login to merge, or discard this patch.
astpp/application/modules/summary/views/view_resellersummary_report.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -38,18 +38,18 @@  discard block
 block discarded – undo
38 38
                                 <legend><b>Search</b></legend>
39 39
                                 <div class="col-md-4 no-padding">
40 40
                                     <label class="search_label col-md-12 no-padding">From Date</label>
41
-                                    <input type="text" name="callstart[]" value="<?php echo isset($session_info['callstart'][0]) ? $session_info['callstart'][0] : date("Y-m-d") . " 00:00:00"; ?>" id="reseller_from_date" size="20" class="col-md-5 form-control text field "  />
41
+                                    <input type="text" name="callstart[]" value="<?php echo isset($session_info['callstart'][0]) ? $session_info['callstart'][0] : date("Y-m-d")." 00:00:00"; ?>" id="reseller_from_date" size="20" class="col-md-5 form-control text field "  />
42 42
                                 </div>
43 43
                                 <div class="col-md-4 no-padding">
44 44
                                     <label class="search_label col-md-12 no-padding">To Date</label>
45
-                                    <input type="text" name="callstart[]" value="<?php echo isset($session_info['callstart'][1]) ? $session_info['callstart'][1] : date("Y-m-d") . " 23:59:59"; ?>" id="reseller_to_date" size="20" class="col-md-5 form-control text field "  />
45
+                                    <input type="text" name="callstart[]" value="<?php echo isset($session_info['callstart'][1]) ? $session_info['callstart'][1] : date("Y-m-d")." 23:59:59"; ?>" id="reseller_to_date" size="20" class="col-md-5 form-control text field "  />
46 46
                                 </div>
47 47
                                 <div class="col-md-4 no-padding">
48 48
                                     <label class="search_label col-md-12 no-padding">Account</label>
49 49
 
50 50
                                     <select name="accountid" class='col-md-5 form-control selectpicker' data-live-search='true'>
51 51
                                         <option value=''>--Select--</option>
52
-                                        <?php if (!empty($accountlist)) {
52
+                                        <?php if ( ! empty($accountlist)) {
53 53
 											foreach ($accountlist as $key => $value) {
54 54
 												?>
55 55
                                                 <optgroup label="<?php echo $key ?>">
@@ -71,13 +71,13 @@  discard block
 block discarded – undo
71 71
                                 </div>
72 72
                                 <div class="col-md-4 no-padding">
73 73
                                     <label class="search_label col-md-12 no-padding">Code </label>
74
-                                    <input type="text" name="pattern[pattern]" value="<?php echo (isset($session_info['pattern']) && isset($session_info['pattern']['pattern']) && !empty($session_info['pattern']['pattern'])) ? $session_info['pattern']['pattern'] : ''; ?>" size="20" maxlength="15" class="col-md-5 form-control text field "/>
74
+                                    <input type="text" name="pattern[pattern]" value="<?php echo (isset($session_info['pattern']) && isset($session_info['pattern']['pattern']) && ! empty($session_info['pattern']['pattern'])) ? $session_info['pattern']['pattern'] : ''; ?>" size="20" maxlength="15" class="col-md-5 form-control text field "/>
75 75
                                     <select name="pattern[pattern-string]" class='col-md-5 form-control selectpicker' style='margin-left:5px;' data-live-search='true'>
76 76
                                         <?php
77
-										if (!empty($search_string_type)) {
77
+										if ( ! empty($search_string_type)) {
78 78
 											foreach ($search_string_type as $key => $value) {
79 79
 												$selected = null;
80
-												if (isset($session_info['pattern']) && isset($session_info['pattern']['pattern']) && !empty($session_info['pattern']['pattern']) && $session_info['pattern']['pattern-string'] == $key) {
80
+												if (isset($session_info['pattern']) && isset($session_info['pattern']['pattern']) && ! empty($session_info['pattern']['pattern']) && $session_info['pattern']['pattern-string'] == $key) {
81 81
 													$selected = "selected";
82 82
 												}
83 83
 												?>
@@ -89,13 +89,13 @@  discard block
 block discarded – undo
89 89
                                 </div>
90 90
                                 <div class="col-md-4 no-padding">
91 91
                                     <label class="search_label col-md-12 no-padding">Destination </label>
92
-                                    <input type="text" name="notes[notes]" value="<?php echo (isset($session_info['notes']) && isset($session_info['notes']['notes']) && !empty($session_info['notes']['notes'])) ? $session_info['notes']['notes'] : ''; ?>" size="20" class="col-md-5 form-control text field "  />
92
+                                    <input type="text" name="notes[notes]" value="<?php echo (isset($session_info['notes']) && isset($session_info['notes']['notes']) && ! empty($session_info['notes']['notes'])) ? $session_info['notes']['notes'] : ''; ?>" size="20" class="col-md-5 form-control text field "  />
93 93
                                     <select name="notes[notes-string]" class='col-md-5 form-control selectpicker' style='margin-left:5px;' data-live-search='true'>
94 94
                                         <?php
95
-										if (!empty($search_string_type)) {
95
+										if ( ! empty($search_string_type)) {
96 96
 											foreach ($search_string_type as $key => $value) {
97 97
 												$selected = null;
98
-												if (isset($session_info['notes']) && isset($session_info['notes']['notes']) && !empty($session_info['notes']['notes']) && $session_info['notes']['notes-string'] == $key) {
98
+												if (isset($session_info['notes']) && isset($session_info['notes']['notes']) && ! empty($session_info['notes']['notes']) && $session_info['notes']['notes-string'] == $key) {
99 99
 													$selected = "selected";
100 100
 												}
101 101
 												?>
@@ -120,10 +120,10 @@  discard block
 block discarded – undo
120 120
                                     <label class="search_label col-md-12 no-padding">Group By #time</label>
121 121
                                     <select name="time" class='col-md-5 form-control' style='margin-left:5px; selectpicker' data-live-search='true'>
122 122
                                         <?php
123
-										if (!empty($groupby_time)) {
123
+										if ( ! empty($groupby_time)) {
124 124
 											foreach ($groupby_time as $key => $value) {
125 125
 												$selected = null;
126
-												if (isset($session_info['time']) && !empty($session_info['time']) && $session_info['time'] == $key) {
126
+												if (isset($session_info['time']) && ! empty($session_info['time']) && $session_info['time'] == $key) {
127 127
 													$selected = "selected";
128 128
 												}
129 129
 												?>
@@ -137,10 +137,10 @@  discard block
 block discarded – undo
137 137
                                     <label class="search_label col-md-12 no-padding">Group By #1</label>
138 138
                                     <select name="groupby_1" class='col-md-5 form-control selectpicker' style='margin-left:5px;' data-live-search='true'>
139 139
                                     <?php
140
-									if (!empty($groupby_field)) {
140
+									if ( ! empty($groupby_field)) {
141 141
 										foreach ($groupby_field as $key => $value) {
142 142
 											$selected = null;
143
-											if (isset($session_info['groupby_1']) && !empty($session_info['groupby_1']) && $session_info['groupby_1'] == $key) {
143
+											if (isset($session_info['groupby_1']) && ! empty($session_info['groupby_1']) && $session_info['groupby_1'] == $key) {
144 144
 												$selected = "selected";
145 145
 											}
146 146
 											?>
@@ -154,10 +154,10 @@  discard block
 block discarded – undo
154 154
                                     <label class="search_label col-md-12 no-padding">Group By #2</label>
155 155
                                     <select name="groupby_2" class='col-md-5 form-control selectpicker' style='margin-left:5px;' data-live-search='true'>
156 156
                                         <?php
157
-										if (!empty($groupby_field)) {
157
+										if ( ! empty($groupby_field)) {
158 158
 											foreach ($groupby_field as $key => $value) {
159 159
 												$selected = null;
160
-												if (isset($session_info['groupby_2']) && !empty($session_info['groupby_2']) && $session_info['groupby_2'] == $key) {
160
+												if (isset($session_info['groupby_2']) && ! empty($session_info['groupby_2']) && $session_info['groupby_2'] == $key) {
161 161
 													$selected = "selected";
162 162
 												}
163 163
 												?>
@@ -171,10 +171,10 @@  discard block
 block discarded – undo
171 171
                                     <label class="search_label col-md-12 no-padding">Group By #3</label>
172 172
                                     <select name="groupby_3" class='col-md-5 form-control selectpicker' style='margin-left:5px;' data-live-search='true'>
173 173
                                     <?php
174
-									if (!empty($groupby_field)) {
174
+									if ( ! empty($groupby_field)) {
175 175
 										foreach ($groupby_field as $key => $value) {
176 176
 											$selected = null;
177
-											if (isset($session_info['groupby_3']) && !empty($session_info['groupby_3']) && $session_info['groupby_3'] == $key) {
177
+											if (isset($session_info['groupby_3']) && ! empty($session_info['groupby_3']) && $session_info['groupby_3'] == $key) {
178 178
 												$selected = "selected";
179 179
 											}
180 180
 											?>
@@ -193,10 +193,10 @@  discard block
 block discarded – undo
193 193
                                     <label class="search_label col-md-6" style="font-size:17px;text-align:right;">Display records in </label>
194 194
                                     <select name="search_in" class='col-md-5 form-control selectpicker' style='background: #ddd; width: 23% !important;' data-live-search='true'>
195 195
 <?php
196
-if (!empty($search_report)) {
196
+if ( ! empty($search_report)) {
197 197
 	foreach ($search_report as $key => $value) {
198 198
 		$selected = null;
199
-		if (isset($session_info['search_in']) && isset($session_info['search_in']) && !empty($session_info['search_in']) && $session_info['search_in'] == $key) {
199
+		if (isset($session_info['search_in']) && isset($session_info['search_in']) && ! empty($session_info['search_in']) && $session_info['search_in'] == $key) {
200 200
 			//echo $key;exit;
201 201
 			$selected = "selected";
202 202
 		}
Please login to merge, or discard this patch.
astpp/application/modules/summary/views/view_customersummary_report.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -38,18 +38,18 @@  discard block
 block discarded – undo
38 38
                                 <legend><b>Search</b></legend>
39 39
                                 <div class="col-md-4 no-padding">
40 40
                                     <label class="search_label col-md-12 no-padding">From Date</label>
41
-                                    <input type="text" name="callstart[]" value="<?php echo isset($session_info['callstart'][0]) ? $session_info['callstart'][0] : date("Y-m-d") . " 00:00:00"; ?>" id="customer_from_date" size="20" class="col-md-5 form-control text field "  />
41
+                                    <input type="text" name="callstart[]" value="<?php echo isset($session_info['callstart'][0]) ? $session_info['callstart'][0] : date("Y-m-d")." 00:00:00"; ?>" id="customer_from_date" size="20" class="col-md-5 form-control text field "  />
42 42
                                 </div>
43 43
                                 <div class="col-md-4 no-padding">
44 44
                                     <label class="search_label col-md-12 no-padding">To Date</label>
45
-                                    <input type="text" name="callstart[]" value="<?php echo isset($session_info['callstart'][1]) ? $session_info['callstart'][1] : date("Y-m-d") . " 23:59:59"; ?>" id="customer_to_date" size="20" class="col-md-5 form-control text field "  />
45
+                                    <input type="text" name="callstart[]" value="<?php echo isset($session_info['callstart'][1]) ? $session_info['callstart'][1] : date("Y-m-d")." 23:59:59"; ?>" id="customer_to_date" size="20" class="col-md-5 form-control text field "  />
46 46
                                 </div>
47 47
                                 <div class="col-md-4 no-padding">
48 48
                                     <label class="search_label col-md-12 no-padding">Account</label>
49 49
 
50 50
                                     <select name="accountid" class='col-md-5 form-control selectpicker' data-live-search='true'>
51 51
                                         <option value=''>--Select--</option>
52
-                                        <?php if (!empty($accountlist)) {
52
+                                        <?php if ( ! empty($accountlist)) {
53 53
 											foreach ($accountlist as $key => $value) {
54 54
 												?>
55 55
                                                 <optgroup label="<?php echo $key ?>">
@@ -71,13 +71,13 @@  discard block
 block discarded – undo
71 71
                                 </div>
72 72
                                 <div class="col-md-4 no-padding">
73 73
                                     <label class="search_label col-md-12 no-padding">Code </label>
74
-                                    <input type="text" name="pattern[pattern]" value="<?php echo (isset($session_info['pattern']) && isset($session_info['pattern']['pattern']) && !empty($session_info['pattern']['pattern'])) ? $session_info['pattern']['pattern'] : ''; ?>" size="20" maxlength="15" class="col-md-5 form-control text field "/>
74
+                                    <input type="text" name="pattern[pattern]" value="<?php echo (isset($session_info['pattern']) && isset($session_info['pattern']['pattern']) && ! empty($session_info['pattern']['pattern'])) ? $session_info['pattern']['pattern'] : ''; ?>" size="20" maxlength="15" class="col-md-5 form-control text field "/>
75 75
                                     <select name="pattern[pattern-string]" class='col-md-5 form-control selectpicker' style='margin-left:5px;' data-live-search='true'>
76 76
                                         <?php
77
-										if (!empty($search_string_type)) {
77
+										if ( ! empty($search_string_type)) {
78 78
 											foreach ($search_string_type as $key => $value) {
79 79
 												$selected = null;
80
-												if (isset($session_info['pattern']) && isset($session_info['pattern']['pattern']) && !empty($session_info['pattern']['pattern']) && $session_info['pattern']['pattern-string'] == $key) {
80
+												if (isset($session_info['pattern']) && isset($session_info['pattern']['pattern']) && ! empty($session_info['pattern']['pattern']) && $session_info['pattern']['pattern-string'] == $key) {
81 81
 													$selected = "selected";
82 82
 												}
83 83
 												?>
@@ -89,13 +89,13 @@  discard block
 block discarded – undo
89 89
                                 </div>
90 90
                                 <div class="col-md-4 no-padding">
91 91
                                     <label class="search_label col-md-12 no-padding">Destination </label>
92
-                                    <input type="text" name="notes[notes]" value="<?php echo (isset($session_info['notes']) && isset($session_info['notes']['notes']) && !empty($session_info['notes']['notes'])) ? $session_info['notes']['notes'] : ''; ?>" size="20" class="col-md-5 form-control text field "  />
92
+                                    <input type="text" name="notes[notes]" value="<?php echo (isset($session_info['notes']) && isset($session_info['notes']['notes']) && ! empty($session_info['notes']['notes'])) ? $session_info['notes']['notes'] : ''; ?>" size="20" class="col-md-5 form-control text field "  />
93 93
                                     <select name="notes[notes-string]" class='col-md-5 form-control selectpicker' style='margin-left:5px;' data-live-search='true'>
94 94
                                         <?php
95
-										if (!empty($search_string_type)) {
95
+										if ( ! empty($search_string_type)) {
96 96
 											foreach ($search_string_type as $key => $value) {
97 97
 												$selected = null;
98
-												if (isset($session_info['notes']) && isset($session_info['notes']['notes']) && !empty($session_info['notes']['notes']) && $session_info['notes']['notes-string'] == $key) {
98
+												if (isset($session_info['notes']) && isset($session_info['notes']['notes']) && ! empty($session_info['notes']['notes']) && $session_info['notes']['notes-string'] == $key) {
99 99
 													$selected = "selected";
100 100
 												}
101 101
 												?>
@@ -120,10 +120,10 @@  discard block
 block discarded – undo
120 120
                                     <label class="search_label col-md-12 no-padding">Group By #Time</label>
121 121
                                     <select name="time" class='col-md-5 form-control selectpicker' style='margin-left:5px;' data-live-search='true'>
122 122
                                         <?php
123
-										if (!empty($groupby_time)) {
123
+										if ( ! empty($groupby_time)) {
124 124
 											foreach ($groupby_time as $key => $value) {
125 125
 												$selected = null;
126
-												if (isset($session_info['time']) && !empty($session_info['time']) && $session_info['time'] == $key) {
126
+												if (isset($session_info['time']) && ! empty($session_info['time']) && $session_info['time'] == $key) {
127 127
 													$selected = "selected";
128 128
 												}
129 129
 												?>
@@ -137,10 +137,10 @@  discard block
 block discarded – undo
137 137
                                     <label class="search_label col-md-12 no-padding">Group By #1</label>
138 138
                                     <select name="groupby_1" class='col-md-5 form-control selectpicker' style='margin-left:5px;' data-live-search='true'>
139 139
                                         <?php
140
-										if (!empty($groupby_field)) {
140
+										if ( ! empty($groupby_field)) {
141 141
 											foreach ($groupby_field as $key => $value) {
142 142
 												$selected = null;
143
-												if (isset($session_info['groupby_1']) && !empty($session_info['groupby_1']) && $session_info['groupby_1'] == $key) {
143
+												if (isset($session_info['groupby_1']) && ! empty($session_info['groupby_1']) && $session_info['groupby_1'] == $key) {
144 144
 													$selected = "selected";
145 145
 												}
146 146
 												?>
@@ -154,10 +154,10 @@  discard block
 block discarded – undo
154 154
                                     <label class="search_label col-md-12 no-padding">Group By #2</label>
155 155
                                     <select name="groupby_2" class='col-md-5 form-control selectpicker' style='margin-left:5px;' data-live-search='true'>
156 156
                                             <?php
157
-											if (!empty($groupby_field)) {
157
+											if ( ! empty($groupby_field)) {
158 158
 												foreach ($groupby_field as $key => $value) {
159 159
 													$selected = null;
160
-													if (isset($session_info['groupby_2']) && !empty($session_info['groupby_2']) && $session_info['groupby_2'] == $key) {
160
+													if (isset($session_info['groupby_2']) && ! empty($session_info['groupby_2']) && $session_info['groupby_2'] == $key) {
161 161
 														$selected = "selected";
162 162
 													}
163 163
 													?>
@@ -171,10 +171,10 @@  discard block
 block discarded – undo
171 171
                                     <label class="search_label col-md-12 no-padding">Group By #3</label>
172 172
                                     <select name="groupby_3" class='col-md-5 form-control selectpicker' style='margin-left:5px;' data-live-search='true'>
173 173
                                             <?php
174
-											if (!empty($groupby_field)) {
174
+											if ( ! empty($groupby_field)) {
175 175
 												foreach ($groupby_field as $key => $value) {
176 176
 													$selected = null;
177
-													if (isset($session_info['groupby_3']) && !empty($session_info['groupby_3']) && $session_info['groupby_3'] == $key) {
177
+													if (isset($session_info['groupby_3']) && ! empty($session_info['groupby_3']) && $session_info['groupby_3'] == $key) {
178 178
 														$selected = "selected";
179 179
 													}
180 180
 													?>
@@ -193,10 +193,10 @@  discard block
 block discarded – undo
193 193
                                     <label class="search_label col-md-6" style="font-size:17px;text-align:right;">Display records in </label>
194 194
                                     <select name="search_in" class='col-md-5 form-control selectpicker' style='background: #ddd; width: 23% !important;' data-live-search='true'>
195 195
 <?php
196
-if (!empty($search_report)) {
196
+if ( ! empty($search_report)) {
197 197
 	foreach ($search_report as $key => $value) {
198 198
 		$selected = null;
199
-		if (isset($session_info['search_in']) && isset($session_info['search_in']) && !empty($session_info['search_in']) && $session_info['search_in'] == $key) {
199
+		if (isset($session_info['search_in']) && isset($session_info['search_in']) && ! empty($session_info['search_in']) && $session_info['search_in'] == $key) {
200 200
 			//echo $key;exit;
201 201
 			$selected = "selected";
202 202
 		}
Please login to merge, or discard this patch.
astpp/application/modules/summary/views/view_providersummary_report.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -38,18 +38,18 @@  discard block
 block discarded – undo
38 38
                                 <legend><b>Search</b></legend>
39 39
                                 <div class="col-md-4 no-padding">
40 40
                                     <label class="search_label col-md-12 no-padding">From Date</label>
41
-                                    <input type="text" name="callstart[]" value="<?php echo isset($session_info['callstart'][0]) ? $session_info['callstart'][0] : date("Y-m-d") . " 00:00:00"; ?>" id="provider_from_date" size="20" class="col-md-5 form-control text field "  />
41
+                                    <input type="text" name="callstart[]" value="<?php echo isset($session_info['callstart'][0]) ? $session_info['callstart'][0] : date("Y-m-d")." 00:00:00"; ?>" id="provider_from_date" size="20" class="col-md-5 form-control text field "  />
42 42
                                 </div>
43 43
                                 <div class="col-md-4 no-padding">
44 44
                                     <label class="search_label col-md-12 no-padding">To Date</label>
45
-                                    <input type="text" name="callstart[]" value="<?php echo isset($session_info['callstart'][1]) ? $session_info['callstart'][1] : date("Y-m-d") . " 23:59:59"; ?>" id="provider_to_date" size="20" class="col-md-5 form-control text field "  />
45
+                                    <input type="text" name="callstart[]" value="<?php echo isset($session_info['callstart'][1]) ? $session_info['callstart'][1] : date("Y-m-d")." 23:59:59"; ?>" id="provider_to_date" size="20" class="col-md-5 form-control text field "  />
46 46
                                 </div>
47 47
                                 <div class="col-md-4 no-padding">
48 48
                                     <label class="search_label col-md-12 no-padding">Account</label>
49 49
 
50 50
                                     <select name="provider_id" class='col-md-5 form-control selectpicker' data-live-search='true'>
51 51
                                         <option value=''>--Select--</option>
52
-                                        <?php if (!empty($accountlist)) {
52
+                                        <?php if ( ! empty($accountlist)) {
53 53
 											foreach ($accountlist as $key => $value) {
54 54
 												?>
55 55
                                                 <optgroup label="<?php echo $key ?>">
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
                                     <select name="trunk_id" class='col-md-5 form-control selectpicker' data-live-search='true'>
75 75
                                         <option value=''>--Select--</option>
76 76
                                         <?php
77
-										if (!empty($trunklist)) {
77
+										if ( ! empty($trunklist)) {
78 78
 											foreach ($trunklist as $key => $value) {
79 79
 												$selected = null;
80 80
 												if (isset($session_info['trunk_id']) && $session_info['trunk_id'] > 0 && $key == $session_info['trunk_id']) {
@@ -88,13 +88,13 @@  discard block
 block discarded – undo
88 88
                                 </div>
89 89
                                 <div class="col-md-4 no-padding">
90 90
                                     <label class="search_label col-md-12 no-padding">Code </label>
91
-                                    <input type="text" name="pattern[pattern]" value="<?php echo (isset($session_info['pattern']) && isset($session_info['pattern']['pattern']) && !empty($session_info['pattern']['pattern'])) ? $session_info['pattern']['pattern'] : ''; ?>" size="20" maxlength="15" class="col-md-5 form-control text field "/>
91
+                                    <input type="text" name="pattern[pattern]" value="<?php echo (isset($session_info['pattern']) && isset($session_info['pattern']['pattern']) && ! empty($session_info['pattern']['pattern'])) ? $session_info['pattern']['pattern'] : ''; ?>" size="20" maxlength="15" class="col-md-5 form-control text field "/>
92 92
                                     <select name="pattern[pattern-string]" class='col-md-5 form-control selectpicker' style='margin-left:5px;' data-live-search='true'>
93 93
                                         <?php
94
-										if (!empty($search_string_type)) {
94
+										if ( ! empty($search_string_type)) {
95 95
 											foreach ($search_string_type as $key => $value) {
96 96
 												$selected = null;
97
-												if (isset($session_info['pattern']) && isset($session_info['pattern']['pattern']) && !empty($session_info['pattern']['pattern']) && $session_info['pattern']['pattern-string'] == $key) {
97
+												if (isset($session_info['pattern']) && isset($session_info['pattern']['pattern']) && ! empty($session_info['pattern']['pattern']) && $session_info['pattern']['pattern-string'] == $key) {
98 98
 													$selected = "selected";
99 99
 												}
100 100
 												?>
@@ -106,13 +106,13 @@  discard block
 block discarded – undo
106 106
                                 </div>
107 107
                                 <div class="col-md-4 no-padding">
108 108
                                     <label class="search_label col-md-12 no-padding">Destination </label>
109
-                                    <input type="text" name="notes[notes]" value="<?php echo (isset($session_info['notes']) && isset($session_info['notes']['notes']) && !empty($session_info['notes']['notes'])) ? $session_info['notes']['notes'] : ''; ?>" size="20" class="col-md-5 form-control text field "  />
109
+                                    <input type="text" name="notes[notes]" value="<?php echo (isset($session_info['notes']) && isset($session_info['notes']['notes']) && ! empty($session_info['notes']['notes'])) ? $session_info['notes']['notes'] : ''; ?>" size="20" class="col-md-5 form-control text field "  />
110 110
                                     <select name="notes[notes-string]" class='col-md-5 form-control selectpicker' style='margin-left:5px;' data-live-search='true'>
111 111
                                     <?php
112
-									   if (!empty($search_string_type)) {
112
+									   if ( ! empty($search_string_type)) {
113 113
 										foreach ($search_string_type as $key => $value) {
114 114
 											$selected = null;
115
-											if (isset($session_info['notes']) && isset($session_info['notes']['notes']) && !empty($session_info['notes']['notes']) && $session_info['notes']['notes-string'] == $key) {
115
+											if (isset($session_info['notes']) && isset($session_info['notes']['notes']) && ! empty($session_info['notes']['notes']) && $session_info['notes']['notes-string'] == $key) {
116 116
 												$selected = "selected";
117 117
 											}
118 118
 									?>
@@ -137,10 +137,10 @@  discard block
 block discarded – undo
137 137
                                     <label class="search_label col-md-12 no-padding">Group By #time</label>
138 138
                                     <select name="time" class='col-md-5 form-control selectpicker' style='margin-left:5px;'data-live-search='true'>
139 139
                                         <?php
140
-										if (!empty($groupby_time)) {
140
+										if ( ! empty($groupby_time)) {
141 141
 											foreach ($groupby_time as $key => $value) {
142 142
 												$selected = null;
143
-												if (isset($session_info['time']) && !empty($session_info['time']) && $session_info['time'] == $key) {
143
+												if (isset($session_info['time']) && ! empty($session_info['time']) && $session_info['time'] == $key) {
144 144
 													$selected = "selected";
145 145
 												}
146 146
 												?>
@@ -154,10 +154,10 @@  discard block
 block discarded – undo
154 154
                                     <label class="search_label col-md-12 no-padding">Group By #1</label>
155 155
                                     <select name="groupby_1" class='col-md-5 form-control selectpicker' style='margin-left:5px;' data-live-search='true'>
156 156
                                         <?php
157
-										if (!empty($groupby_field)) {
157
+										if ( ! empty($groupby_field)) {
158 158
 											foreach ($groupby_field as $key => $value) {
159 159
 												$selected = null;
160
-												if (isset($session_info['groupby_1']) && !empty($session_info['groupby_1']) && $session_info['groupby_1'] == $key) {
160
+												if (isset($session_info['groupby_1']) && ! empty($session_info['groupby_1']) && $session_info['groupby_1'] == $key) {
161 161
 													$selected = "selected";
162 162
 												}
163 163
 												?>
@@ -171,10 +171,10 @@  discard block
 block discarded – undo
171 171
                                     <label class="search_label col-md-12 no-padding">Group By #2</label>
172 172
                                     <select name="groupby_2" class='col-md-5 form-control selectpicker' style='margin-left:5px;' data-live-search='true'>
173 173
                                         <?php
174
-										if (!empty($groupby_field)) {
174
+										if ( ! empty($groupby_field)) {
175 175
 											foreach ($groupby_field as $key => $value) {
176 176
 												$selected = null;
177
-												if (isset($session_info['groupby_2']) && !empty($session_info['groupby_2']) && $session_info['groupby_2'] == $key) {
177
+												if (isset($session_info['groupby_2']) && ! empty($session_info['groupby_2']) && $session_info['groupby_2'] == $key) {
178 178
 													$selected = "selected";
179 179
 												}
180 180
 												?>
@@ -188,10 +188,10 @@  discard block
 block discarded – undo
188 188
                                     <label class="search_label col-md-12 no-padding">Group By #3</label>
189 189
                                     <select name="groupby_3" class='col-md-5 form-control selectpicker' style='margin-left:5px;' data-live-search='true'>
190 190
                                         <?php
191
-										if (!empty($groupby_field)) {
191
+										if ( ! empty($groupby_field)) {
192 192
 											foreach ($groupby_field as $key => $value) {
193 193
 												$selected = null;
194
-												if (isset($session_info['groupby_3']) && !empty($session_info['groupby_3']) && $session_info['groupby_3'] == $key) {
194
+												if (isset($session_info['groupby_3']) && ! empty($session_info['groupby_3']) && $session_info['groupby_3'] == $key) {
195 195
 													$selected = "selected";
196 196
 												}
197 197
 												?>
@@ -210,10 +210,10 @@  discard block
 block discarded – undo
210 210
                                     <label class="search_label col-md-6" style="font-size:17px;text-align:right;">Display records in </label>
211 211
                                     <select name="search_in" class='col-md-5 form-control selectpicker' style='background: #ddd; width: 23% !important;' data-live-search='true'>
212 212
 <?php
213
-if (!empty($search_report)) {
213
+if ( ! empty($search_report)) {
214 214
 	foreach ($search_report as $key => $value) {
215 215
 		$selected = null;
216
-		if (isset($session_info['search_in']) && isset($session_info['search_in']) && !empty($session_info['search_in']) && $session_info['search_in'] == $key) {
216
+		if (isset($session_info['search_in']) && isset($session_info['search_in']) && ! empty($session_info['search_in']) && $session_info['search_in'] == $key) {
217 217
 			//echo $key;exit;
218 218
 			$selected = "selected";
219 219
 		}
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/ipmap/models/ipmap_model.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -51,9 +51,9 @@  discard block
 block discarded – undo
51 51
 				$value[] = $value1['id'];
52 52
 			}
53 53
 			//$this->db->where_in('accountid', $value);
54
-			if(!empty($value)){
54
+			if ( ! empty($value)) {
55 55
 		 		$this->db->where_in('accountid', $value);	
56
-		 	} else{
56
+		 	} else {
57 57
 		 		$this->db->where_in('accountid', '0');
58 58
 		 	}            
59 59
 		}
@@ -62,10 +62,10 @@  discard block
 block discarded – undo
62 62
          ASTPP  3.0 
63 63
 	 in customer login show ipmap (ACL) module
64 64
  	 *******/
65
-		if( $accountinfo['type'] == '0'){
66
-		$where=array('accountid'=>$accountinfo['id']);
67
-		}else{
68
-		$where='';
65
+		if ($accountinfo['type'] == '0') {
66
+		$where = array('accountid'=>$accountinfo['id']);
67
+		} else {
68
+		$where = '';
69 69
 		}
70 70
 		/**************************************************************************************************************/
71 71
 		if ($flag) {
@@ -93,11 +93,11 @@  discard block
 block discarded – undo
93 93
     in customer login show ipmap (ACL) module
94 94
     *******/
95 95
 	$account_data = $this->session->userdata("accountinfo");
96
-	if($account_data['type'] == '0'){
96
+	if ($account_data['type'] == '0') {
97 97
 	$add_array['accountid'] = $account_data['id'];
98 98
 	 }
99 99
 	 /*******************************************************************/
100
-	$data = array('created_date'=>gmdate('Y-m-d H:i:s'),'name' => $add_array['name'], 'ip' => $add_array['ip'], 'prefix' => $add_array['prefix'], 'accountid' => $add_array['accountid'],'status' => $add_array['status'] ,'context' => 'default');
100
+	$data = array('created_date'=>gmdate('Y-m-d H:i:s'), 'name' => $add_array['name'], 'ip' => $add_array['ip'], 'prefix' => $add_array['prefix'], 'accountid' => $add_array['accountid'], 'status' => $add_array['status'], 'context' => 'default');
101 101
 	$this->db->insert("ip_map", $data);
102 102
 	return $this->db->insert_id();
103 103
 	}
@@ -108,11 +108,11 @@  discard block
 block discarded – undo
108 108
     in customer login show ipmap (ACL) module
109 109
     *******/
110 110
 	 $account_data = $this->session->userdata("accountinfo");
111
-	   if($account_data['type'] == '0'){
111
+	   if ($account_data['type'] == '0') {
112 112
 	   $add_array['accountid'] = $account_data['id'];
113 113
 	   }
114 114
 	   /************************************************************************************************/
115
-		$data = array('last_modified_date'=>gmdate('Y-m-d H:i:s'),'name' => $add_array['name'], 'ip' => $add_array['ip'], 'prefix' => $add_array['prefix'], 'accountid' => $add_array['accountid'],'status' => $add_array['status'] , 'context' => 'default');
115
+		$data = array('last_modified_date'=>gmdate('Y-m-d H:i:s'), 'name' => $add_array['name'], 'ip' => $add_array['ip'], 'prefix' => $add_array['prefix'], 'accountid' => $add_array['accountid'], 'status' => $add_array['status'], 'context' => 'default');
116 116
 		$this->db->where("id", $id);
117 117
 		return $this->db->update("ip_map", $data);
118 118
        
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/ipmap/controllers/ipmap.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 		$this->load->library('astpp/form');
33 33
 		$this->load->model('ipmap_model');
34 34
 		if ($this->session->userdata('user_login') == FALSE)
35
-			redirect(base_url() . '/astpp/login');
35
+			redirect(base_url().'/astpp/login');
36 36
 		 }
37 37
 	function ipmap_add() {
38 38
 		$data['username'] = $this->session->userdata('user_name');
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
      	ASTPP  3.0 
53 53
    	in customer login show ipmap (ACL) module
54 54
    	*****************************************/
55
-		 $ip=explode("/",$value['ip']);
55
+		 $ip = explode("/", $value['ip']);
56 56
 		 $edit_data = $value;
57
-		 $edit_data['ip']=$ip[0];
57
+		 $edit_data['ip'] = $ip[0];
58 58
 		}
59 59
 		/*************************************************************************************************/
60 60
 		$data['form'] = $this->form->build_form($this->ipmap_form->get_ipmap_form_fields(), $edit_data);
@@ -64,11 +64,11 @@  discard block
 block discarded – undo
64 64
 	function ipmap_save() {
65 65
 		$add_array = $this->input->post();
66 66
 		$ip = $add_array['ip'];
67
-		if (strpos($ip,'/') !== false) {
68
-		   $add_array['ip']=$add_array['ip'];
67
+		if (strpos($ip, '/') !== false) {
68
+		   $add_array['ip'] = $add_array['ip'];
69 69
 		}
70
-		else{
71
-		   $add_array['ip']=$add_array['ip'].'/32';
70
+		else {
71
+		   $add_array['ip'] = $add_array['ip'].'/32';
72 72
 		}
73 73
 		$data['form'] = $this->form->build_form($this->ipmap_form->get_ipmap_form_fields(), $add_array);
74 74
 		if ($add_array['id'] != '') {
@@ -78,13 +78,13 @@  discard block
 block discarded – undo
78 78
 				echo $data['validation_errors'];
79 79
 				exit;
80 80
 			} else {
81
-				 $ip_free= $this->ipmap_model->edit_ipmap($add_array, $add_array['id']);
81
+				 $ip_free = $this->ipmap_model->edit_ipmap($add_array, $add_array['id']);
82 82
 				 if ($ip_free) {
83 83
 					$this->load->library('freeswitch_lib');
84 84
 					$this->load->module('freeswitch/freeswitch');
85 85
 					$command = "api reloadacl";
86 86
 					$response = $this->freeswitch_model->reload_freeswitch($command);
87
-					$this->session->set_userdata('astpp_notification',$response);
87
+					$this->session->set_userdata('astpp_notification', $response);
88 88
 				}
89 89
 				echo json_encode(array("SUCCESS"=> " IP Map updated successfully!"));
90 90
 				exit;
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 					$this->load->module('freeswitch/freeswitch');
103 103
 					$command = "api reloadacl";
104 104
 					$response = $this->freeswitch_model->reload_freeswitch($command);
105
-					$this->session->set_userdata('astpp_notification',$response);
105
+					$this->session->set_userdata('astpp_notification', $response);
106 106
 				}               
107 107
 				echo json_encode(array("SUCCESS"=> " IP Map added successfully!"));
108 108
 				exit;
@@ -110,24 +110,24 @@  discard block
 block discarded – undo
110 110
 		}
111 111
 	}
112 112
 	  function ipmap_delete($id) {
113
-		$ip_free=$this->ipmap_model-> remove_ipmap($id);
113
+		$ip_free = $this->ipmap_model-> remove_ipmap($id);
114 114
 		 if ($ip_free) {
115 115
 					$this->load->library('freeswitch_lib');
116 116
 					$this->load->module('freeswitch/freeswitch');
117 117
 					$command = "api reloadacl";
118 118
 					$response = $this->freeswitch_model->reload_freeswitch($command);
119
-					$this->session->set_userdata('astpp_notification',$response);
119
+					$this->session->set_userdata('astpp_notification', $response);
120 120
 				}
121 121
 		$this->session->set_flashdata('astpp_notification', 'IP Map removed successfully!');
122 122
 		/*********************
123 123
      	ASTPP  3.0 
124 124
    	in customer login show ipmap (ACL) module
125 125
    	*****************************************/
126
-   	$accountdata=$this->session->userdata['accountinfo'];
127
-		if($accountdata['type'] == '0'){
128
-		redirect(base_url() . 'user/user_ipmap_detail/');
129
-		}else{
130
-		redirect(base_url() . 'ipmap/ipmap_detail/');
126
+   	$accountdata = $this->session->userdata['accountinfo'];
127
+		if ($accountdata['type'] == '0') {
128
+		redirect(base_url().'user/user_ipmap_detail/');
129
+		} else {
130
+		redirect(base_url().'ipmap/ipmap_detail/');
131 131
 		}
132 132
 		/*********************************************************************/
133 133
 	}
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 			$this->session->set_userdata('ipmap_list_search', $action);
143 143
 		}
144 144
 		if (@$ajax_search != 1) {
145
-			redirect(base_url() . 'ipmap/ipmap_list/');
145
+			redirect(base_url().'ipmap/ipmap_list/');
146 146
 		}
147 147
 	}
148 148
 
@@ -173,35 +173,35 @@  discard block
 block discarded – undo
173 173
 		$paging_data = $this->form->load_grid_config($count_all, $_GET['rp'], $_GET['page']);
174 174
 		$json_data = $paging_data["json_paging"];
175 175
 		$query = $this->ipmap_model->ipmap_list(true, $paging_data["paging"]["start"], $paging_data["paging"]["page_no"]);
176
-		$query =$query->result_array();
176
+		$query = $query->result_array();
177 177
 		foreach ($query as $key => $value) {
178
-		 $ipmap_checkbox='<input type="checkbox" name="chkAll" id="'.$value['id'].'" class="ace chkRefNos" onclick="clickchkbox('.$value['id'].')" value=' .$value['id'].'><lable class="lbl"></lable>';
179
-		 if($account_data['type'] == '0'){
180
-		 $ret_url = '<a href="'. base_url() .'user/user_ipmap_edit/'.$value['id'].'" class="btn btn-royelblue btn-sm"  rel="facebox" title="Edit">&nbsp;<i class="fa fa-pencil-square-o fa-fw"></i></a>&nbsp;<a href="'. base_url() .'user/user_ipmap_delete/' . $value['id'].'" class="btn btn-royelblue btn-sm" title="Delete" onClick="return get_alert_msg();">&nbsp;<i class="fa fa-trash fa-fw"></i></a>';
181
-		 $account_name='';
178
+		 $ipmap_checkbox = '<input type="checkbox" name="chkAll" id="'.$value['id'].'" class="ace chkRefNos" onclick="clickchkbox('.$value['id'].')" value='.$value['id'].'><lable class="lbl"></lable>';
179
+		 if ($account_data['type'] == '0') {
180
+		 $ret_url = '<a href="'.base_url().'user/user_ipmap_edit/'.$value['id'].'" class="btn btn-royelblue btn-sm"  rel="facebox" title="Edit">&nbsp;<i class="fa fa-pencil-square-o fa-fw"></i></a>&nbsp;<a href="'.base_url().'user/user_ipmap_delete/'.$value['id'].'" class="btn btn-royelblue btn-sm" title="Delete" onClick="return get_alert_msg();">&nbsp;<i class="fa fa-trash fa-fw"></i></a>';
181
+		 $account_name = '';
182 182
 		 $json_data['rows'][] = array('cell' => array(
183 183
 		 $ipmap_checkbox,
184 184
 		 $value['name'],
185 185
 		 $value['ip'],
186 186
 		 $value['prefix'],
187
-		 $this->common->get_status('status', 'ip_map',$value),
188
-		 $this->common->convert_GMT_to('','',$value['created_date']),
189
-		 $this->common->convert_GMT_to('','',$value['last_modified_date']),
187
+		 $this->common->get_status('status', 'ip_map', $value),
188
+		 $this->common->convert_GMT_to('', '', $value['created_date']),
189
+		 $this->common->convert_GMT_to('', '', $value['last_modified_date']),
190 190
 		 $ret_url,
191 191
          
192 192
 		  ));
193
-		 }else{
194
-		 $ret_url = '<a href="'. base_url() .'ipmap/ipmap_edit/'.$value['id'].'" class="btn btn-royelblue btn-sm"  rel="facebox" title="Edit">&nbsp;<i class="fa fa-pencil-square-o fa-fw"></i></a>&nbsp;<a href="'. base_url() .'ipmap/ipmap_delete/' . $value['id'].'" class="btn btn-royelblue btn-sm" title="Delete" onClick="return get_alert_msg();">&nbsp;<i class="fa fa-trash fa-fw"></i></a>';
195
-		 $account_name =$this->common->build_concat_string("first_name,last_name,number", "accounts",$value['accountid']);
193
+		 } else {
194
+		 $ret_url = '<a href="'.base_url().'ipmap/ipmap_edit/'.$value['id'].'" class="btn btn-royelblue btn-sm"  rel="facebox" title="Edit">&nbsp;<i class="fa fa-pencil-square-o fa-fw"></i></a>&nbsp;<a href="'.base_url().'ipmap/ipmap_delete/'.$value['id'].'" class="btn btn-royelblue btn-sm" title="Delete" onClick="return get_alert_msg();">&nbsp;<i class="fa fa-trash fa-fw"></i></a>';
195
+		 $account_name = $this->common->build_concat_string("first_name,last_name,number", "accounts", $value['accountid']);
196 196
 		 $json_data['rows'][] = array('cell' => array(
197 197
 		 $ipmap_checkbox,
198 198
 		 $account_name,
199 199
 		 $value['name'],
200 200
 		 $value['ip'],
201 201
 		 $value['prefix'],
202
-		 $this->common->get_status('status', 'ip_map',$value),
203
-		 $this->common->convert_GMT_to('','',$value['created_date']),
204
-		 $this->common->convert_GMT_to('','',$value['last_modified_date']),
202
+		 $this->common->get_status('status', 'ip_map', $value),
203
+		 $this->common->convert_GMT_to('', '', $value['created_date']),
204
+		 $this->common->convert_GMT_to('', '', $value['last_modified_date']),
205 205
 		 $ret_url,
206 206
          
207 207
 		  ));
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/ipmap/libraries/ipmap_form.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  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'))
23
+if ( ! defined('BASEPATH'))
24 24
 	exit('No direct script access allowed');
25 25
 
26 26
 class Ipmap_form {
@@ -39,12 +39,12 @@  discard block
 block discarded – undo
39 39
      in customer login show ipmap (ACL) module
40 40
      *****************************************/
41 41
 		$logintype = $this->CI->session->userdata('logintype');
42
-	   if($account_type == '0' || $logintype == '0'){
43
-		$account=null;
44
-		$form['forms'] = array(base_url() . 'user/user_ipmap_save/', array('id' => 'ipmap_form', 'method' => 'POST', 'name' => 'ipmap_form'));
45
-	   }else{
46
-	   $account=array('Account', 'accountid', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'first_name,last_name,number', 'accounts', 'build_concat_dropdown', 'where_arr', array("reseller_id" => "0", "type" => "0,3", "deleted" => "0","status" => "0"));
47
-		$form['forms'] = array(base_url() . 'ipmap/ipmap_save/', array('id' => 'ipmap_form', 'method' => 'POST', 'name' => 'ipmap_form'));
42
+	   if ($account_type == '0' || $logintype == '0') {
43
+		$account = null;
44
+		$form['forms'] = array(base_url().'user/user_ipmap_save/', array('id' => 'ipmap_form', 'method' => 'POST', 'name' => 'ipmap_form'));
45
+	   } else {
46
+	   $account = array('Account', 'accountid', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'first_name,last_name,number', 'accounts', 'build_concat_dropdown', 'where_arr', array("reseller_id" => "0", "type" => "0,3", "deleted" => "0", "status" => "0"));
47
+		$form['forms'] = array(base_url().'ipmap/ipmap_save/', array('id' => 'ipmap_form', 'method' => 'POST', 'name' => 'ipmap_form'));
48 48
 	   }
49 49
 	   /***********************************************************************************************/
50 50
 		$form['IP map'] = array(
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
    	    *****************************************/
56 56
 			$account,
57 57
 			/**********************************************************************************************/
58
-			array('Name', 'INPUT', array('name' => 'name', 'size' => '20',  'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter account number'),
58
+			array('Name', 'INPUT', array('name' => 'name', 'size' => '20', 'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter account number'),
59 59
 		   /*ASTPP  3.0 
60 60
    	    in customer login show ipmap (ACL) module
61 61
    	    *****************************************/
@@ -71,16 +71,16 @@  discard block
 block discarded – undo
71 71
 	}
72 72
 
73 73
 	function get_ipmap_search_form($account_data = '') {
74
-		$accountinfo=$this->CI->session->userdata('accountinfo');
75
-		$reseller_id=$accountinfo['type']==1 ? $accountinfo['id']:0;
74
+		$accountinfo = $this->CI->session->userdata('accountinfo');
75
+		$reseller_id = $accountinfo['type'] == 1 ? $accountinfo['id'] : 0;
76 76
 	/*********************
77 77
      	    ASTPP  3.0 
78 78
    	    in customer login show ipmap (ACL) module
79 79
    	    *****************************************/
80
-	 if($account_data =='0'){
81
-		   $account=null;
82
-		}else{
83
-		 $account=array('Account', 'accountid', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'first_name,last_name,number', 'accounts', 'build_concat_dropdown', 'where_arr', array("reseller_id" => $reseller_id,"type"=>"0", "deleted" => "0"));
80
+	 if ($account_data == '0') {
81
+		   $account = null;
82
+		} else {
83
+		 $account = array('Account', 'accountid', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'first_name,last_name,number', 'accounts', 'build_concat_dropdown', 'where_arr', array("reseller_id" => $reseller_id, "type"=>"0", "deleted" => "0"));
84 84
 		}
85 85
 		/***************************************************************************************/
86 86
 		$form['forms'] = array("", array('id' => "ipmap_search"));
@@ -110,16 +110,16 @@  discard block
 block discarded – undo
110 110
     in customer Add/Edit show Ipmap (ACL) module.
111 111
     *******/
112 112
 	function build_ipmap_list_for_admin($account_data = '') {
113
-			if($account_data == '0'){
113
+			if ($account_data == '0') {
114 114
 			$grid_field_arr = json_encode(array(
115
-			array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "", "", "","","false","center"),
115
+			array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "", "", "", "", "false", "center"),
116 116
 			array("Name", "100", "name", "", "", ""),
117 117
 			array("IP", "240", "ip", "", "", ""),
118 118
 			array("Prefix", "240", "prefix", "", "", ""),
119 119
 			 /*
120 120
             ASTPP  3.0  creation field show in grid
121 121
             */
122
-			array("Status", "180", "status", "status", "ip_map", "get_status","","true","center"),
122
+			array("Status", "180", "status", "status", "ip_map", "get_status", "", "true", "center"),
123 123
 			array("Created Date", "150", "creation_date", "creation_date", "creation_date", "convert_GMT_to"),
124 124
 			array("Modified Date Date", "170", "last_modified_date", "last_modified_date", "last_modified_date", "convert_GMT_to"),
125 125
             
@@ -127,19 +127,19 @@  discard block
 block discarded – undo
127 127
 			array("Action", "205", "", "", "", array("EDIT" => array("url" => "ipmap/ipmap_edit/", "mode" => "popup", 'popup'),
128 128
 					"DELETE" => array("url" => "ipmap/ipmap_delete/", "mode" => "single")))
129 129
 				));
130
-			}else{
130
+			} else {
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"),
133
-		   array("Account", "200", "accountid", "first_name,last_name,number", "accounts", "get_field_name_coma_new","","true","center"),
134
-		   array("Name", "190", "name", "", "", "","","true","center"),
135
-		   array("IP", "170", "ip", "", "", "","","true","center"),
136
-		   array("Prefix", "100", "prefix", "", "", "","","true","center"),
132
+		   array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "", "", "", "", "false", "center"),
133
+		   array("Account", "200", "accountid", "first_name,last_name,number", "accounts", "get_field_name_coma_new", "", "true", "center"),
134
+		   array("Name", "190", "name", "", "", "", "", "true", "center"),
135
+		   array("IP", "170", "ip", "", "", "", "", "true", "center"),
136
+		   array("Prefix", "100", "prefix", "", "", "", "", "true", "center"),
137 137
 			/*
138 138
             ASTPP  3.0  creation field show in grid
139 139
             */
140
-			array("Status", "160", "status", "status", "ip_map", "get_status","","true","center"),
141
-			array("Created Date", "150", "creation_date", "creation_date", "creation_date", "convert_GMT_to","","true","center"),
142
-			array("Modified Date", "170", "last_modified_date", "last_modified_date", "last_modified_date", "convert_GMT_to","","true","center"),
140
+			array("Status", "160", "status", "status", "ip_map", "get_status", "", "true", "center"),
141
+			array("Created Date", "150", "creation_date", "creation_date", "creation_date", "convert_GMT_to", "", "true", "center"),
142
+			array("Modified Date", "170", "last_modified_date", "last_modified_date", "last_modified_date", "convert_GMT_to", "", "true", "center"),
143 143
 			/********************************************************************/
144 144
 		   array("Action", "100", "", "", "", array("EDIT" => array("url" => "ipmap/ipmap_edit/", "mode" => "popup", 'popup'),
145 145
 					"DELETE" => array("url" => "ipmap/ipmap_delete/", "mode" => "single")))
@@ -150,8 +150,8 @@  discard block
 block discarded – undo
150 150
 	/**********************************************************************************************************/
151 151
 
152 152
 	function build_grid_buttons() {
153
-		$buttons_json = json_encode(array(array("Add" , "btn btn-line-warning btn" , "fa fa-plus-circle fa-lg", "button_action", "/ipmap/ipmap_add/", "popup"),
154
-			array("Delete", "btn btn-line-danger","fa fa-times-circle fa-lg",  "button_action", "/ipmap/ipmap_delete_multiple/")
153
+		$buttons_json = json_encode(array(array("Add", "btn btn-line-warning btn", "fa fa-plus-circle fa-lg", "button_action", "/ipmap/ipmap_add/", "popup"),
154
+			array("Delete", "btn btn-line-danger", "fa fa-times-circle fa-lg", "button_action", "/ipmap/ipmap_delete_multiple/")
155 155
 			));
156 156
 		return $buttons_json;
157 157
 	}
@@ -161,9 +161,9 @@  discard block
 block discarded – undo
161 161
     in customer Add/Edit show Ipmap (ACL) module.
162 162
     *******/
163 163
     
164
-	function build_grid_buttons_user(){
165
-	 $buttons_json = json_encode(array(array("Create" , "btn btn-line-warning btn" , "fa fa-plus-circle fa-lg", "button_action", "/user/user_ipmap_add/", "popup"),
166
-			array("Delete", "btn btn-line-danger","fa fa-times-circle fa-lg",  "button_action", "/user/user_ipmap_delete_multiple/")
164
+	function build_grid_buttons_user() {
165
+	 $buttons_json = json_encode(array(array("Create", "btn btn-line-warning btn", "fa fa-plus-circle fa-lg", "button_action", "/user/user_ipmap_add/", "popup"),
166
+			array("Delete", "btn btn-line-danger", "fa fa-times-circle fa-lg", "button_action", "/user/user_ipmap_delete_multiple/")
167 167
 			));
168 168
 		return $buttons_json;
169 169
 	}
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/login/controllers/login.php 1 patch
Spacing   +75 added lines, -75 removed lines patch added patch discarded remove patch
@@ -31,23 +31,23 @@  discard block
 block discarded – undo
31 31
 		$this->load->model('db_model');
32 32
 	}
33 33
     
34
-	function set_lang_global($post=false){ 
35
-	if(!is_array($post)){
36
-		$str=trim($post);
37
-		$new_arr[$str]=$str;
38
-		$post=$new_arr;
34
+	function set_lang_global($post = false) { 
35
+	if ( ! is_array($post)) {
36
+		$str = trim($post);
37
+		$new_arr[$str] = $str;
38
+		$post = $new_arr;
39 39
 	}
40
-	if(isset($post['fr_FR'])){
41
-	 $language=$post['fr_FR'];
40
+	if (isset($post['fr_FR'])) {
41
+	 $language = $post['fr_FR'];
42 42
 	 $this->session->set_userdata('user_language', $language);
43 43
 	}
44
-	if(isset($post['es_ES'])){
45
-	 $language=$post['es_ES'];
44
+	if (isset($post['es_ES'])) {
45
+	 $language = $post['es_ES'];
46 46
 	 $this->session->set_userdata('user_language', $language);         
47 47
 	}       
48
-	if(isset($post['en_EN'])){
49
-	 $language=$post['en_EN'];
50
-	 $this->session->unset_userdata('user_language',$language);
48
+	if (isset($post['en_EN'])) {
49
+	 $language = $post['en_EN'];
50
+	 $this->session->unset_userdata('user_language', $language);
51 51
 	} 
52 52
 	$this->locale->set_lang();
53 53
 	return true;
@@ -55,17 +55,17 @@  discard block
 block discarded – undo
55 55
 
56 56
 	function index() {
57 57
 		if ($this->session->userdata('user_login') == FALSE) {
58
-			if (!empty($_POST) && trim($_POST['username']) != '' && trim($_POST['password']) != '') {
59
-			$_POST['password']=$this->common->encode($_POST['password']);
58
+			if ( ! empty($_POST) && trim($_POST['username']) != '' && trim($_POST['password']) != '') {
59
+			$_POST['password'] = $this->common->encode($_POST['password']);
60 60
 				$user_valid = $this->Auth_model->verify_login($_POST['username'], $_POST['password']);
61 61
                 
62 62
 				if ($user_valid == 1) {
63 63
 					$this->session->set_userdata('user_login', TRUE);
64 64
 			$where = "number = '".$this->db->escape_str($_POST['username'])."' OR email = '".$this->db->escape_str($_POST['username'])."'";
65
-					$result = $this->db_model->getSelect("*", "accounts",$where);
65
+					$result = $this->db_model->getSelect("*", "accounts", $where);
66 66
 					$result = $result->result_array();
67 67
 					$result = $result[0];
68
-					 $logintype=$result['type']== -1 ? 2: $result['type'];
68
+					 $logintype = $result['type'] == -1 ? 2 : $result['type'];
69 69
 					$this->session->set_userdata('logintype', $logintype);
70 70
 					$this->session->set_userdata('userlevel_logintype', $result['type']);
71 71
 					$this->session->set_userdata('username', $_POST['username']);
@@ -118,15 +118,15 @@  discard block
 block discarded – undo
118 118
 					if ($result['type'] == 0 || $result['type'] == 1) {
119 119
 						$menu_list = $this->permission->get_module_access($result['type']);
120 120
 						$this->session->set_userdata('mode_cur', 'user');
121
-						if($result['type'] == 1){
122
-							redirect(base_url() . 'dashboard/');
123
-						}else{
124
-							redirect(base_url() . 'user/user/');
121
+						if ($result['type'] == 1) {
122
+							redirect(base_url().'dashboard/');
123
+						} else {
124
+							redirect(base_url().'user/user/');
125 125
 						}
126 126
 					} else {
127 127
 						$menu_list = $this->permission->get_module_access($result['type']);
128 128
 						$this->session->set_userdata('mode_cur', 'admin');
129
-						redirect(base_url() . 'dashboard/');
129
+						redirect(base_url().'dashboard/');
130 130
 					}
131 131
 				} else {
132 132
 		   
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 			$this->session->set_userdata('user_login', FALSE);
152 152
 			$data['app_name'] = 'ASTPP - Open Source Billing Solution';
153 153
 			$this->load->view('view_login', $data);
154
-		}else {
154
+		} else {
155 155
 	/*
156 156
 	*
157 157
 	* Purpose : Display logo based on domain name
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 	//              echo $data['user_logo'];exit;
174 174
 /***************************************************************************************/
175 175
 		if ($this->session->userdata('logintype') == '2') {
176
-		redirect(base_url() . 'dashboard/');
176
+		redirect(base_url().'dashboard/');
177 177
 		} else {
178 178
 		redirect(base_url().'user/user/');
179 179
 		}
@@ -184,25 +184,25 @@  discard block
 block discarded – undo
184 184
 		$this->session->sess_destroy();
185 185
 		redirect(base_url());
186 186
 	}
187
-  function paypal_response(){
188
-	  if(count($_POST)>0)
187
+  function paypal_response() {
188
+	  if (count($_POST) > 0)
189 189
 	  {
190
-		$response_arr=$_POST;
191
-		$fp=fopen("/var/log/astpp/astpp_payment.log","w+");
190
+		$response_arr = $_POST;
191
+		$fp = fopen("/var/log/astpp/astpp_payment.log", "w+");
192 192
 		$date = date("Y-m-d H:i:s");
193
-		fwrite($fp,"====================".$date."===============================\n");
194
-		foreach($response_arr as $key => $value){	  
195
-			fwrite($fp,$key.":::>".$value."\n");
193
+		fwrite($fp, "====================".$date."===============================\n");
194
+		foreach ($response_arr as $key => $value) {	  
195
+			fwrite($fp, $key.":::>".$value."\n");
196 196
 		}
197 197
 		$payment_check = $this->db_model->countQuery("txn_id", "payments", array("txn_id" => $response_arr['txn_id']));
198
-		if( ($response_arr["payment_status"] == "Pending" || $response_arr["payment_status"] == "Complete" || $response_arr["payment_status"] == "Completed" ) && $payment_check == 0){
198
+		if (($response_arr["payment_status"] == "Pending" || $response_arr["payment_status"] == "Complete" || $response_arr["payment_status"] == "Completed") && $payment_check == 0) {
199 199
 
200
-			$paypal_tax = (array)$this->db->get_where("system", array("name" => "paypal_tax","group_title"=>"paypal"))->first_row();
201
-			$paypal_tax =$paypal_tax['value'];
200
+			$paypal_tax = (array)$this->db->get_where("system", array("name" => "paypal_tax", "group_title"=>"paypal"))->first_row();
201
+			$paypal_tax = $paypal_tax['value'];
202 202
 			$balance_amt = $actual_amount = $response_arr["custom"];
203
-			$paypal_fee = (array)$this->db->get_where("system", array("name" => "paypal_fee","group_title"=>"paypal"))->first_row();
203
+			$paypal_fee = (array)$this->db->get_where("system", array("name" => "paypal_fee", "group_title"=>"paypal"))->first_row();
204 204
 			$paypal_fee = $paypal_fee['value'];
205
-			$paypalfee = ($paypal_fee == 0)?'0':$response_arr["mc_gross"];
205
+			$paypalfee = ($paypal_fee == 0) ? '0' : $response_arr["mc_gross"];
206 206
 			$account_data = (array)$this->db->get_where("accounts", array("id" => $response_arr["item_number"]))->first_row();
207 207
 			$currency = (array)$this->db->get_where('currency', array("id"=>$account_data["currency_id"]))->first_row();
208 208
 			$date = date('Y-m-d H:i:s');
@@ -216,35 +216,35 @@  discard block
 block discarded – undo
216 216
 							"currency_rate"=>$currency["currencyrate"],
217 217
 							"transaction_details"=>json_encode($response_arr),
218 218
 							"date"=>$date);
219
-			 $paymentid=$this->db->insert('payment_transaction',$payment_trans_array);
220
-			 $parent_id =$account_data['reseller_id'] > 0 ? $account_data['reseller_id'] : '-1';
219
+			 $paymentid = $this->db->insert('payment_transaction', $payment_trans_array);
220
+			 $parent_id = $account_data['reseller_id'] > 0 ? $account_data['reseller_id'] : '-1';
221 221
 		 $payment_arr = array("accountid"=> $response_arr["item_number"],
222
-		 		"payment_mode"=>"1","credit"=>$balance_amt,
222
+		 		"payment_mode"=>"1", "credit"=>$balance_amt,
223 223
 				"type"=>"PAYPAL",
224 224
 				"payment_by"=>$parent_id,
225 225
 				"notes"=>"Payment Made by Paypal on date:-".$date,
226 226
 				"paypalid"=>$paymentid,
227 227
 				"txn_id"=>$response_arr["txn_id"],
228
-				'payment_date'=>gmdate('Y-m-d H:i:s',strtotime($response_arr['payment_date'])));
228
+				'payment_date'=>gmdate('Y-m-d H:i:s', strtotime($response_arr['payment_date'])));
229 229
 		 $this->db->insert('payments', $payment_arr);
230 230
 		 $this->db->select('invoiceid');
231
-		 $this->db->order_by('id','desc');
231
+		 $this->db->order_by('id', 'desc');
232 232
 		 $this->db->limit(1);
233
- 		 $last_invoice_result=(array)$this->db->get('invoices')->first_row();
234
- 		 $last_invoice_ID=isset($last_invoice_result['invoiceid'] ) && $last_invoice_result['invoiceid'] > 0 ?$last_invoice_result['invoiceid'] : 1;
235
- 		 $reseller_id=$account_data['reseller_id'] > 0 ? $account_data['reseller_id'] : 0;
236
-		 $where="accountid IN ('".$reseller_id."','1')";
233
+ 		 $last_invoice_result = (array)$this->db->get('invoices')->first_row();
234
+ 		 $last_invoice_ID = isset($last_invoice_result['invoiceid']) && $last_invoice_result['invoiceid'] > 0 ? $last_invoice_result['invoiceid'] : 1;
235
+ 		 $reseller_id = $account_data['reseller_id'] > 0 ? $account_data['reseller_id'] : 0;
236
+		 $where = "accountid IN ('".$reseller_id."','1')";
237 237
 		 $this->db->where($where);
238 238
 		 $this->db->select('*');
239 239
 		 $this->db->order_by('accountid', 'desc');
240 240
 		 $this->db->limit(1);
241 241
 			 $invoiceconf = $this->db->get('invoice_conf');
242 242
 			 $invoiceconf = (array)$invoiceconf->first_row();
243
-		 $invoice_prefix=$invoiceconf['invoice_prefix'];
243
+		 $invoice_prefix = $invoiceconf['invoice_prefix'];
244 244
 
245
-		 $due_date = gmdate("Y-m-d H:i:s",strtotime(gmdate("Y-m-d H:i:s")." +".$invoiceconf['interval']." days"));  
246
-		 $invoice_id=$this->generate_receipt($account_data['id'],$balance_amt,$account_data,$last_invoice_ID+1,$invoice_prefix,$due_date);
247
-		 $details_insert=array(
245
+		 $due_date = gmdate("Y-m-d H:i:s", strtotime(gmdate("Y-m-d H:i:s")." +".$invoiceconf['interval']." days"));  
246
+		 $invoice_id = $this->generate_receipt($account_data['id'], $balance_amt, $account_data, $last_invoice_ID + 1, $invoice_prefix, $due_date);
247
+		 $details_insert = array(
248 248
 			'created_date'=>$date,
249 249
 			'credit'=>$balance_amt,
250 250
 			'debit'=>'-',
@@ -254,34 +254,34 @@  discard block
 block discarded – undo
254 254
 			'description'=>"Payment Made by Paypal on date:-".$date,
255 255
 			'item_type'=>'PAYMENT',
256 256
 	  			'before_balance'=>$account_data['balance'],
257
-			'after_balance'=>$account_data['balance']+$balance_amt,
257
+			'after_balance'=>$account_data['balance'] + $balance_amt,
258 258
 			);
259 259
 		$this->db->insert("invoice_details", $details_insert); 
260
-		$this->db_model->update_balance($balance_amt,$account_data["id"],"credit");            
261
-		if($parent_id > 0){
262
-			  $reseller_ids=$this->common->get_parent_info($parent_id,0);
263
-			  $reseller_ids=rtrim($reseller_ids,",");
264
-			  $reseller_arr=explode(",",$reseller_ids);
265
-			  if(!empty($reseller_arr)){
266
-			foreach($reseller_arr as $key=>$reseller_id){
260
+		$this->db_model->update_balance($balance_amt, $account_data["id"], "credit");            
261
+		if ($parent_id > 0) {
262
+			  $reseller_ids = $this->common->get_parent_info($parent_id, 0);
263
+			  $reseller_ids = rtrim($reseller_ids, ",");
264
+			  $reseller_arr = explode(",", $reseller_ids);
265
+			  if ( ! empty($reseller_arr)) {
266
+			foreach ($reseller_arr as $key=>$reseller_id) {
267 267
 			  $account_data = (array)$this->db->get_where("accounts", array("id" => $reseller_id))->first_row();
268 268
 			  $this->db->select('invoiceid');
269
-				  $this->db->order_by('id','desc');
269
+				  $this->db->order_by('id', 'desc');
270 270
 				  $this->db->limit(1);
271
- 					  $last_invoice_result=(array)$this->db->get('invoices')->first_row();
272
- 					  $last_invoice_ID=$last_invoice_result['invoiceid'];
273
- 		 		  $reseller_id=$account_data['reseller_id'] > 0 ? $account_data['reseller_id'] : 0;
274
-					  $where="accountid IN ('".$reseller_id."','1')";
271
+ 					  $last_invoice_result = (array)$this->db->get('invoices')->first_row();
272
+ 					  $last_invoice_ID = $last_invoice_result['invoiceid'];
273
+ 		 		  $reseller_id = $account_data['reseller_id'] > 0 ? $account_data['reseller_id'] : 0;
274
+					  $where = "accountid IN ('".$reseller_id."','1')";
275 275
 					  $this->db->where($where);
276 276
 				  $this->db->select('*');
277 277
 				  $this->db->order_by('accountid', 'desc');
278 278
 				  $this->db->limit(1);
279 279
 				  $invoiceconf = $this->db->get('invoice_conf');
280 280
 				  $invoiceconf = (array)$invoiceconf->first_row();
281
-					  $invoice_prefix=$invoiceconf['invoice_prefix'];
282
-		 		  $due_date = gmdate("Y-m-d H:i:s",strtotime(gmdate("Y-m-d H:i:s")." +".$invoiceconf['interval']." days"));
283
-		 		  $invoice_id=$this->generate_receipt($account_data['id'],$balance_amt,$account_data,$last_invoice_ID+1,$invoice_prefix,$due_date);
284
-			  $parent_id=$account_data['reseller_id'] > 0 ? $account_data['reseller_id'] : -1;
281
+					  $invoice_prefix = $invoiceconf['invoice_prefix'];
282
+		 		  $due_date = gmdate("Y-m-d H:i:s", strtotime(gmdate("Y-m-d H:i:s")." +".$invoiceconf['interval']." days"));
283
+		 		  $invoice_id = $this->generate_receipt($account_data['id'], $balance_amt, $account_data, $last_invoice_ID + 1, $invoice_prefix, $due_date);
284
+			  $parent_id = $account_data['reseller_id'] > 0 ? $account_data['reseller_id'] : -1;
285 285
 			  $payment_arr = array("accountid"=> $account_data["id"],
286 286
 		 					"payment_mode"=>"1",
287 287
 		 					"credit"=>$balance_amt,
@@ -290,9 +290,9 @@  discard block
 block discarded – undo
290 290
 							"notes"=>"Your account has been credited due to your customer account recharge done by paypal",
291 291
 							"paypalid"=>$paymentid,
292 292
 							"txn_id"=>$response_arr["txn_id"],
293
-							'payment_date'=>gmdate('Y-m-d H:i:s',strtotime($response_arr['payment_date'])));
293
+							'payment_date'=>gmdate('Y-m-d H:i:s', strtotime($response_arr['payment_date'])));
294 294
 	 			  $this->db->insert('payments', $payment_arr);
295
-			  $details_insert=array(
295
+			  $details_insert = array(
296 296
 				'created_date'=>$date,
297 297
 				'credit'=>$balance_amt,
298 298
 				'debit'=>'-',
@@ -302,31 +302,31 @@  discard block
 block discarded – undo
302 302
 				'description'=>"Your account has been credited due to your customer account recharge done by paypal",
303 303
 				'item_type'=>'PAYMENT',
304 304
 		  	        'before_balance'=>$account_data['balance'],
305
-				'after_balance'=>$account_data['balance']+$balance_amt,
305
+				'after_balance'=>$account_data['balance'] + $balance_amt,
306 306
 			   );
307 307
 		          $this->db->insert("invoice_details", $details_insert); 
308
-	          	  $this->db_model->update_balance($balance_amt,$account_data["id"],"credit");  			         
308
+	          	  $this->db_model->update_balance($balance_amt, $account_data["id"], "credit");  			         
309 309
 			}
310 310
 		      }
311 311
 		}
312
-		redirect(base_url() . 'user/user/');
312
+		redirect(base_url().'user/user/');
313 313
         }
314 314
       }         
315
-	redirect(base_url() . 'user/user/');
315
+	redirect(base_url().'user/user/');
316 316
     }
317 317
 
318 318
     /**
319 319
      * @param integer $last_invoice_ID
320 320
      * @param string $due_date
321 321
      */
322
-    function generate_receipt($accountid,$amount,$accountinfo,$last_invoice_ID,$invoice_prefix,$due_date){
323
-		$invoice_data = array("accountid"=>$accountid,"invoice_prefix" =>$invoice_prefix,"invoiceid"=>'0000'.$last_invoice_ID,"reseller_id"=>$accountinfo['reseller_id'],"invoice_date"=>gmdate("Y-m-d H:i:s"),"from_date"=>  gmdate("Y-m-d H:i:s"),"to_date"=>gmdate("Y-m-d H:i:s"),"due_date"=>$due_date,"status"=>1,"balance"=>$accountinfo['balance'],"amount"=>$amount,"type"=>'R',"confirm"=>'1');            
324
-        $this->db->insert("invoices",$invoice_data);
322
+    function generate_receipt($accountid, $amount, $accountinfo, $last_invoice_ID, $invoice_prefix, $due_date) {
323
+		$invoice_data = array("accountid"=>$accountid, "invoice_prefix" =>$invoice_prefix, "invoiceid"=>'0000'.$last_invoice_ID, "reseller_id"=>$accountinfo['reseller_id'], "invoice_date"=>gmdate("Y-m-d H:i:s"), "from_date"=>  gmdate("Y-m-d H:i:s"), "to_date"=>gmdate("Y-m-d H:i:s"), "due_date"=>$due_date, "status"=>1, "balance"=>$accountinfo['balance'], "amount"=>$amount, "type"=>'R', "confirm"=>'1');            
324
+        $this->db->insert("invoices", $invoice_data);
325 325
         $invoiceid = $this->db->insert_id();    
326 326
         return  $invoiceid;  
327 327
     }
328 328
     
329
-    function get_language_text(){
329
+    function get_language_text() {
330 330
    // echo '<pre>'; print_r($_POST); exit;
331 331
       echo gettext($_POST['display']); 
332 332
  	}  
Please login to merge, or discard this patch.