Passed
Pull Request — v3.0 (#189)
by
unknown
10:51
created
astpp/application/modules/accounts/libraries/accounts_form.php 1 patch
Spacing   +123 added lines, -123 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
22 22
 ###############################################################################
23 23
 
24
-if (!defined('BASEPATH'))
24
+if ( ! defined('BASEPATH'))
25 25
 	exit('No direct script access allowed');
26 26
 
27 27
 class Accounts_form {
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 		$type = $entity_type == 'customer' ? 0 : 3;
37 37
 		$uname = $this->CI->common->find_uniq_rendno_customer(common_model::$global_config['system_config']['cardlength'], 'number', 'accounts');
38 38
 		$pin = Common_model::$global_config['system_config']['pinlength'];
39
-		$pin_number=$this->CI->common->find_uniq_rendno($pin, 'pin', 'accounts');
39
+		$pin_number = $this->CI->common->find_uniq_rendno($pin, 'pin', 'accounts');
40 40
 		$uname_user = $this->CI->common->find_uniq_rendno('10', 'number', 'accounts');
41 41
 		$password = $this->CI->common->generate_password();
42 42
 		$logintype = $this->CI->session->userdata('logintype');
@@ -48,33 +48,33 @@  discard block
 block discarded – undo
48 48
 		}
49 49
 		$sip_device = null;
50 50
 		$opensips_device = null;
51
-		if (!$entity_type) {
51
+		if ( ! $entity_type) {
52 52
 			$entity_type = 'customer';
53 53
 		}
54
-		$params=array('name' => 'number', 'value' => $uname, 'size' => '20', 'class' => "text field medium", 'id' => 'number','readonly'=>true);
54
+		$params = array('name' => 'number', 'value' => $uname, 'size' => '20', 'class' => "text field medium", 'id' => 'number', 'readonly'=>true);
55 55
         
56 56
 		if ($id > 0) {
57 57
 			$readable = 'disabled';
58
-			$val = 'accounts.email.' . $id;
59
-			$account_val='accounts.number.'.$id;
58
+			$val = 'accounts.email.'.$id;
59
+			$account_val = 'accounts.number.'.$id;
60 60
 			$password = array('Password', 'PASSWORD', array('name' => 'password', 'id' => 'password_show', 'onmouseover' => 'seetext(password_show)', 'onmouseout' => 'hidepassword(password_show)', 'size' => '20', 'class' => "text field medium"), 'required|', 'tOOL TIP', '');
61 61
 			$balance = array('Balance', 'INPUT', array('name' => 'balance', 'size' => '20', 'readonly' => true, 'class' => "text field medium"), '', 'tOOL TIP', '');
62
-			$account=array('Account', 'INPUT',$params, 'required|integer|greater_than[0]|is_unique[' . $account_val . ']', 'tOOL TIP', '');
62
+			$account = array('Account', 'INPUT', $params, 'required|integer|greater_than[0]|is_unique['.$account_val.']', 'tOOL TIP', '');
63 63
 			/*             * ******************************** */
64 64
 		} else {
65 65
 			$val = 'accounts.email';
66
-			$account_val='accounts.number';
66
+			$account_val = 'accounts.number';
67 67
 			 if (common_model::$global_config['system_config']['opensips'] == 0) {
68 68
 				$sip_device = array('Create Opensips Device', 'opensips_device_flag', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_prorate');
69 69
 			} else {
70 70
 			  $sip_device = array('Create SIP Device', 'sip_device_flag', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_prorate');   
71 71
 		}
72
-			$account = array('Account', 'INPUT',$params, 'required|integer|greater_than[0]|is_unique[' . $account_val . ']', 'tOOL TIP', '', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;color: #1bcb61;" title="Generate Account" class="change_number fa fa-refresh" ></i>');      
72
+			$account = array('Account', 'INPUT', $params, 'required|integer|greater_than[0]|is_unique['.$account_val.']', 'tOOL TIP', '', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;color: #1bcb61;" title="Generate Account" class="change_number fa fa-refresh" ></i>');      
73 73
 			$password = array('Password', 'INPUT', array('name' => 'password', 'value' => $password, 'size' => '20', 'class' => "text field medium", 'id' => 'password'), 'required|', 'tOOL TIP', '', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;color: #1bcb61;" title="Reset Password" class="change_pass fa fa-refresh" ></i>');
74
-			$balance = array('Balance', 'INPUT', array('name' => 'balance', 'size' => '20','class' => "text field medium"), '', 'tOOL TIP', '');
74
+			$balance = array('Balance', 'INPUT', array('name' => 'balance', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', '');
75 75
 		}
76 76
 		$pin = array('Pin', 'INPUT', array('name' => 'pin', 'value' => $pin_number, 'size' => '20', 'class' => "text field medium", 'id' => 'change_pin'), 'required|is_numeric', 'tOOL TIP', '', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;color: #1bcb61;" title="Generate Pin" class="change_pin fa fa-refresh" ></i>');
77
-		$form['forms'] = array(base_url() . 'accounts/' . $entity_type . '_save/'.$id."/", array("id" => "customer_form", "name" => "customer_form"));
77
+		$form['forms'] = array(base_url().'accounts/'.$entity_type.'_save/'.$id."/", array("id" => "customer_form", "name" => "customer_form"));
78 78
 		$form[gettext('Account Profile')] = array(
79 79
 		array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''),
80 80
 		array('', 'HIDDEN', array('name' => 'type', 'value' => $type), '', '', ''),
@@ -82,16 +82,16 @@  discard block
 block discarded – undo
82 82
 			$password,
83 83
 			$pin,
84 84
 			array(gettext('First Name'), 'INPUT', array('name' => 'first_name', 'id' => 'first_name', 'size' => '15', 'class' => "text field medium"), 'required', 'tOOL TIP', ''),
85
-			array(gettext('Last Name'), 'INPUT', array('name' => 'last_name', 'size' => '15',  'class' => "text field medium"), 'trim|xss_clean', 'tOOL TIP', ''),
85
+			array(gettext('Last Name'), 'INPUT', array('name' => 'last_name', 'size' => '15', 'class' => "text field medium"), 'trim|xss_clean', 'tOOL TIP', ''),
86 86
 			array(gettext('Company'), 'INPUT', array('name' => 'company_name', 'size' => '15', 'class' => 'text field medium'), 'trim|xss_clean', 'tOOL TIP', ''),
87 87
 			array(gettext('Phone'), 'INPUT', array('name' => 'telephone_1', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', ''),
88 88
 			array(gettext('Mobile'), 'INPUT', array('name' => 'telephone_2', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', ''),
89
-			array(gettext('Email'), 'INPUT', array('name' => 'email', 'size' => '50',  'class' => "text field medium"), 'required|valid_email|is_unique[' . $val . ']', 'tOOL TIP', ''),
90
-			array(gettext('Address 1'), 'INPUT', array('name' => 'address_1', 'size' => '15',  'class' => "text field medium"), '', 'tOOL TIP', ''),
89
+			array(gettext('Email'), 'INPUT', array('name' => 'email', 'size' => '50', 'class' => "text field medium"), 'required|valid_email|is_unique['.$val.']', 'tOOL TIP', ''),
90
+			array(gettext('Address 1'), 'INPUT', array('name' => 'address_1', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', ''),
91 91
 			array(gettext('Address 2'), 'INPUT', array('name' => 'address_2', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', ''),
92
-			array(gettext('City'), 'INPUT', array('name' => 'city', 'size' => '20',  'class' => "text field medium"), '', 'tOOL TIP', ''),
93
-			array(gettext('Province/State'), 'INPUT', array('name' => 'province', 'size' => '15',  'class' => "text field medium"), '', 'tOOL TIP', ''),
94
-			array(gettext('Zip/Postal Code'), 'INPUT', array('name' => 'postal_code', 'size' => '15',  'class' => "text field medium"), 'trim|xss_clean', 'tOOL TIP', ''),
92
+			array(gettext('City'), 'INPUT', array('name' => 'city', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', ''),
93
+			array(gettext('Province/State'), 'INPUT', array('name' => 'province', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', ''),
94
+			array(gettext('Zip/Postal Code'), 'INPUT', array('name' => 'postal_code', 'size' => '15', 'class' => "text field medium"), 'trim|xss_clean', 'tOOL TIP', ''),
95 95
 			array(gettext('Country'), array('name' => 'country_id', 'class' => 'country_id'), 'SELECT', '', array("name" => "country_id", "rules" => "required"), 'tOOL TIP', 'Please Enter account number', 'id', 'country', 'countrycode', 'build_dropdown', '', ''),
96 96
 			array(gettext('Timezone'), array('name' => 'timezone_id', 'class' => 'timezone_id'), 'SELECT', '', array("name" => "timezone_id", "rules" => "required"), 'tOOL TIP', 'Please Enter account number', 'id', 'gmtzone', 'timezone', 'build_dropdown', '', ''),
97 97
 			array(gettext('Currency'), array('name' => 'currency_id', 'class' => 'currency_id'), 'SELECT', '', array("name" => "currency_id", "rules" => "required"), 'tOOL TIP', 'Please Enter account number', 'id', 'currencyname,currency', 'currency', 'build_concat_dropdown', '', array())
@@ -105,9 +105,9 @@  discard block
 block discarded – undo
105 105
 			array(gettext('Number Translation'), 'INPUT', array('name' => 'dialed_modify', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', ''),
106 106
 			array(gettext('Concurrent Calls'), 'INPUT', array('name' => 'maxchannels', 'size' => '20', 'class' => "text field medium"), 'numeric', 'tOOL TIP', ''),
107 107
 			array(gettext('Interval'), 'INPUT', array('name' => 'interval', 'size' => '20', 'class' => "text field medium"), 'numeric', 'tOOL TIP', ''),
108
-			array(gettext('First Used'), 'INPUT', array('name' => 'first_used', 'size' => '20', 'readonly' => true,  'class' => "text field medium", 'value' => '0000-00-00 00:00:00'), '', 'tOOL TIP', ''),
108
+			array(gettext('First Used'), 'INPUT', array('name' => 'first_used', 'size' => '20', 'readonly' => true, 'class' => "text field medium", 'value' => '0000-00-00 00:00:00'), '', 'tOOL TIP', ''),
109 109
 		array(gettext('Account Valid Days'), 'INPUT', array('name' => 'validfordays', 'size' => '20', 'class' => "text field medium"), 'trim|numeric|xss_clean', 'tOOL TIP', ''),
110
-		array(gettext('Expiry Date'), 'INPUT', array('name' => 'expiry', 'size' => '20',  'class' => "text field medium", 'value' => $expiry_date, 'id' => 'expiry'), '', 'tOOL TIP', ''),
110
+		array(gettext('Expiry Date'), 'INPUT', array('name' => 'expiry', 'size' => '20', 'class' => "text field medium", 'value' => $expiry_date, 'id' => 'expiry'), '', 'tOOL TIP', ''),
111 111
 		);
112 112
 		
113 113
 		$form[gettext('Billing Settings')] = array(
@@ -121,12 +121,12 @@  discard block
 block discarded – undo
121 121
 			array(gettext('LC Charge / Min'), 'INPUT', array('name' => 'charge_per_min', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', ''),           
122 122
 			array(gettext('Tax'), 'tax_id', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'taxes_description', 'taxes', 'build_dropdown', 'where_arr', array('status' => 0, "reseller_id" => $loginid), 'multi'),
123 123
 		);
124
-	if($id==0){
124
+	if ($id == 0) {
125 125
 	  $form[gettext('Alert Threshold')] = array(
126 126
 			array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''),
127 127
 			array(gettext('Email Alerts ?'), 'notify_flag', 'SELECT', '', '', 'tOOL TIP', '', '', '', '', 'custom_status'),
128
-			array(gettext('Balance Below'), 'INPUT', array('name' => 'notify_credit_limit', 'size' => '20',  'class' => "text field medium"), 'valid_decimal', 'tOOL TIP', ''),
129
-			array(gettext('Email'), 'INPUT', array('name' => 'notify_email', 'size' => '50',  'class' => "text field medium"), 'valid_email', 'tOOL TIP', ''),
128
+			array(gettext('Balance Below'), 'INPUT', array('name' => 'notify_credit_limit', 'size' => '20', 'class' => "text field medium"), 'valid_decimal', 'tOOL TIP', ''),
129
+			array(gettext('Email'), 'INPUT', array('name' => 'notify_email', 'size' => '50', 'class' => "text field medium"), 'valid_email', 'tOOL TIP', ''),
130 130
 	  );
131 131
 	}
132 132
 		$form['button_save'] = array('name' => 'action', 'content' => gettext('Save'), 'value' => 'save', 'type' => 'submit', 'class' => 'btn btn-line-parrot');
@@ -138,12 +138,12 @@  discard block
 block discarded – undo
138 138
 	}
139 139
 
140 140
 	function customer_alert_threshold($entity_type) {
141
-		$form['forms'] = array(base_url() . 'accounts/' . $entity_type . '_alert_threshold_save/' . $entity_type . "/", array("id" => "customer_alert_threshold", "name" => "customer_alert_threshold"));
141
+		$form['forms'] = array(base_url().'accounts/'.$entity_type.'_alert_threshold_save/'.$entity_type."/", array("id" => "customer_alert_threshold", "name" => "customer_alert_threshold"));
142 142
 		$form[gettext('Alert Threshold')] = array(
143 143
 			array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''),
144 144
 			array(gettext('Email Alerts ?'), 'notify_flag', 'SELECT', '', '', 'tOOL TIP', '', '', '', '', 'custom_status'),
145
-			array(gettext('Balance Below'), 'INPUT', array('name' => 'notify_credit_limit', 'size' => '20',  'class' => "text field medium"), 'valid_decimal', 'tOOL TIP', ''),
146
-			array(gettext('Email'), 'INPUT', array('name' => 'notify_email', 'size' => '50',  'class' => "text field medium"), 'valid_email', 'tOOL TIP', ''),
145
+			array(gettext('Balance Below'), 'INPUT', array('name' => 'notify_credit_limit', 'size' => '20', 'class' => "text field medium"), 'valid_decimal', 'tOOL TIP', ''),
146
+			array(gettext('Email'), 'INPUT', array('name' => 'notify_email', 'size' => '50', 'class' => "text field medium"), 'valid_email', 'tOOL TIP', ''),
147 147
 		);
148 148
 		$form['button_save'] = array('name' => 'action', 'content' => gettext('Save'), 'value' => 'save', 'type' => 'submit', 'class' => 'btn btn-line-parrot');
149 149
 		return $form;
@@ -164,12 +164,12 @@  discard block
 block discarded – undo
164 164
 				$sip_device = array(gettext('Create SIP Device'), 'sip_device_flag', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'custom_status');
165 165
 			}
166 166
 		}
167
-		$form['forms'] = array(base_url() . 'accounts/customer_bulk_save/', array("id" => "customer_bulk_form", "name" => "customer_bulk_form"));
167
+		$form['forms'] = array(base_url().'accounts/customer_bulk_save/', array("id" => "customer_bulk_form", "name" => "customer_bulk_form"));
168 168
 		$form[gettext('General Details')] = array(
169
-			array(gettext('Account Count'), 'INPUT', array('name' => 'count', 'size' => '20',  'class' => "text field medium"), 'trim|required|numeric|xss_clean', 'tOOL TIP', ''),
170
-			array(gettext('Start Prefix'), 'INPUT', array('name' => 'prefix', 'size' => '20',  'class' => "text field medium"), 'trim|required|numeric|xss_clean', 'tOOL TIP', ''),
171
-			array(gettext('Acc. Number Length'), 'INPUT', array('name' => 'account_length', 'size' => '20',  'class' => "text field medium"), 'trim|required|numeric|xss_clean', 'tOOL TIP', ''),
172
-			array(gettext('Company'), 'INPUT', array('name' => 'company_name',  'size' => '15', 'class' => 'text field medium'), 'trim|required|xss_clean', 'tOOL TIP', ''),
169
+			array(gettext('Account Count'), 'INPUT', array('name' => 'count', 'size' => '20', 'class' => "text field medium"), 'trim|required|numeric|xss_clean', 'tOOL TIP', ''),
170
+			array(gettext('Start Prefix'), 'INPUT', array('name' => 'prefix', 'size' => '20', 'class' => "text field medium"), 'trim|required|numeric|xss_clean', 'tOOL TIP', ''),
171
+			array(gettext('Acc. Number Length'), 'INPUT', array('name' => 'account_length', 'size' => '20', 'class' => "text field medium"), 'trim|required|numeric|xss_clean', 'tOOL TIP', ''),
172
+			array(gettext('Company'), 'INPUT', array('name' => 'company_name', 'size' => '15', 'class' => 'text field medium'), 'trim|required|xss_clean', 'tOOL TIP', ''),
173 173
 			array(gettext('Country'), array('name' => 'country_id', 'class' => 'country_id'), 'SELECT', '', array("name" => "country_id", "rules" => "required"), 'tOOL TIP', 'Please Enter account number', 'id', 'country', 'countrycode', 'build_dropdown', '', ''),
174 174
 			array(gettext('Timezone'), array('name' => 'timezone_id', 'class' => 'timezone_id'), 'SELECT', '', array("name" => "timezone_id", "rules" => "required"), 'tOOL TIP', 'Please Enter account number', 'id', 'gmtzone', 'timezone', 'build_dropdown', '', ''),
175 175
 			array(gettext('Generate Pin'), 'pin', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_pin_allow_customer'),
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 			array(gettext('Billing Schedule'), array('name' => 'sweep_id', 'id' => 'sweep_id', 'class' => 'sweep_id'), 'SELECT', '', '', 'tOOL TIP', '', 'id', 'sweep', 'sweeplist', 'build_dropdown', '', ''),
185 185
 			array(gettext('Billing Day'), array("name" => 'invoice_day', "class" => "invoice_day"), 'SELECT', '', '', 'tOOL TIP', '', '', '', '', 'set_invoice_option'),
186 186
 			array(gettext('Currency'), array('name' => 'currency_id', 'class' => 'currency_id'), 'SELECT', '', array("name" => "currency_id", "rules" => "required"), 'tOOL TIP', 'Please Enter account number', 'id', 'currencyname,currency', 'currency', 'build_concat_dropdown', '', array()),
187
-			array(gettext('Balance'), 'INPUT', array('name' => 'balance', 'size' => '20',  'class' => "text field medium"), 'trim|numeric|greater_than[0]|currency_decimal|xss_clean', 'tOOL TIP', ''),
187
+			array(gettext('Balance'), 'INPUT', array('name' => 'balance', 'size' => '20', 'class' => "text field medium"), 'trim|numeric|greater_than[0]|currency_decimal|xss_clean', 'tOOL TIP', ''),
188 188
 			array(gettext('Credit Limit'), 'INPUT', array('name' => 'credit_limit', 'size' => '20', 'class' => "text field medium"), 'trim|currency_decimal|xss_clean', 'tOOL TIP', ''),
189 189
 			array(gettext('Valid Days'), 'INPUT', array('name' => 'validfordays', 'size' => '20', 'class' => "text field medium"), 'trim|numeric|xss_clean', 'tOOL TIP', ''),
190 190
 		array(gettext('Allow Local Calls'), 'local_call', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'custom_status'),
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 	}
197 197
 
198 198
 	function get_customer_callerid_fields() {
199
-		$form['forms'] = array(base_url() . 'accounts/customer_add_callerid/', array("id" => "callerid_form"));
199
+		$form['forms'] = array(base_url().'accounts/customer_add_callerid/', array("id" => "callerid_form"));
200 200
 		$form[gettext('Information')] = array(
201 201
 			array('', 'HIDDEN', array('name' => 'flag'), '', '', '', ''),
202 202
 			array(gettext('Account'), 'INPUT', array('name' => 'accountid', 'size' => '20', 'readonly' => true, 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'),
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 	}
211 211
 
212 212
 	function get_customer_payment_fields($currency, $number, $currency_id, $id) {
213
-		$form['forms'] = array(base_url() . 'accounts/customer_payment_save/', array('id' => 'acccount_charges_form', 'method' => 'POST', 'name' => 'acccount_charges_form'));
213
+		$form['forms'] = array(base_url().'accounts/customer_payment_save/', array('id' => 'acccount_charges_form', 'method' => 'POST', 'name' => 'acccount_charges_form'));
214 214
 		$form['​Refill information'] = array(
215 215
 			array('', 'HIDDEN', array('name' => 'id', 'value' => $id), '', '', '', ''),
216 216
 			array('', 'HIDDEN', array('name' => 'account_currency', 'value' => $currency_id), '', '', ''),
@@ -227,11 +227,11 @@  discard block
 block discarded – undo
227 227
 	function get_form_reseller_fields($id = false) {
228 228
 		$readable = false;
229 229
 		$invoice_config = null;
230
-		$concurrent_calls=null;
230
+		$concurrent_calls = null;
231 231
 		$logintype = $this->CI->session->userdata('logintype');
232 232
 		$uname = $this->CI->common->find_uniq_rendno(common_model::$global_config['system_config']['cardlength'], 'number', 'accounts');
233 233
 		$password = $this->CI->common->generate_password();
234
-		$params=array('name' => 'number', 'value' => $uname, 'size' => '20', 'class' => "text field medium", 'id' => 'number','readonly'=>true);
234
+		$params = array('name' => 'number', 'value' => $uname, 'size' => '20', 'class' => "text field medium", 'id' => 'number', 'readonly'=>true);
235 235
 		if ($logintype == 1 || $logintype == 5) {
236 236
 			$account_data = $this->CI->session->userdata("accountinfo");
237 237
 			$loginid = $account_data['id'];
@@ -239,18 +239,18 @@  discard block
 block discarded – undo
239 239
 			$loginid = "0";
240 240
 		}
241 241
 		if ($id > 0) {
242
-			$val = 'accounts.email.' . $id;
243
-			$account_val='accounts.number.'.$id;
242
+			$val = 'accounts.email.'.$id;
243
+			$account_val = 'accounts.number.'.$id;
244 244
 			$readable = 'disabled';
245
-			$password = array('Password', 'PASSWORD', array('name' => 'password', 'id' => 'password_show', 'onmouseover' => 'seetext(password_show)', 'onmouseout' => 'hidepassword(password_show)', 'size' => '20',  'class' => "text field medium"), 'required|notMatch[number]|', 'tOOL TIP', '');
246
-			$concurrent_calls=array('Concurrent Calls', 'INPUT', array('name' => 'maxchannels', 'size' => '20', 'class' => "text field medium"), 'numeric', 'tOOL TIP', '');
247
-			$account=array('Account', 'INPUT',$params, 'required|integer|greater_than[0]|is_unique[' . $account_val . ']', 'tOOL TIP', '');
245
+			$password = array('Password', 'PASSWORD', array('name' => 'password', 'id' => 'password_show', 'onmouseover' => 'seetext(password_show)', 'onmouseout' => 'hidepassword(password_show)', 'size' => '20', 'class' => "text field medium"), 'required|notMatch[number]|', 'tOOL TIP', '');
246
+			$concurrent_calls = array('Concurrent Calls', 'INPUT', array('name' => 'maxchannels', 'size' => '20', 'class' => "text field medium"), 'numeric', 'tOOL TIP', '');
247
+			$account = array('Account', 'INPUT', $params, 'required|integer|greater_than[0]|is_unique['.$account_val.']', 'tOOL TIP', '');
248 248
 		} else {
249 249
 			$val = 'accounts.email';
250
-			$account_val='accounts.number';
250
+			$account_val = 'accounts.number';
251 251
 			$invoice_config = array('Use same credential for Invoice Config', 'invoice_config_flag', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_prorate');
252 252
 			$password = array('Password', 'INPUT', array('name' => 'password', 'value' => $password, 'size' => '20', 'class' => "text field medium", 'id' => 'password'), 'required|', 'tOOL TIP', '', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;color: #1bcb61;" title="Reset Password" class="change_pass fa fa-refresh" ></i>');
253
-			$account = array('Account', 'INPUT',$params, 'required|integer|greater_than[0]|is_unique[' . $account_val . ']', 'tOOL TIP', '', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;color: #1bcb61;" title="Generate Account" class="change_number fa fa-refresh" ></i>');
253
+			$account = array('Account', 'INPUT', $params, 'required|integer|greater_than[0]|is_unique['.$account_val.']', 'tOOL TIP', '', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;color: #1bcb61;" title="Generate Account" class="change_number fa fa-refresh" ></i>');
254 254
 		}
255 255
 		if ($id == "") {
256 256
 			$reg_url = array('', 'HIDDEN', array('name' => 'id'), '', '', '', '');
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
 			$reg_url = array('Registration URL', 'INPUT', array('name' => 'registration_url', 'size' => '20', 'readonly' => true, 'class' => "text field medium"), 'tOOL TIP', '');
259 259
 		}
260 260
 		/*         * ****************************************************************** */
261
-		$form['forms'] = array(base_url() . 'accounts/reseller_save/', array("id" => "reseller_form", "name" => "reseller_form"));
261
+		$form['forms'] = array(base_url().'accounts/reseller_save/', array("id" => "reseller_form", "name" => "reseller_form"));
262 262
 		$form['Client Panel Access'] = array(
263 263
 			array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''),
264 264
 			array('', 'HIDDEN', array('name' => 'type', 'value' => '1'), '', '', ''),
@@ -275,12 +275,12 @@  discard block
 block discarded – undo
275 275
 			array(gettext('Billing Day'), array("name" => 'invoice_day', "class" => "invoice_day"), 'SELECT', '', '', 'tOOL TIP', '', '', '', '', 'set_invoice_option'),
276 276
 			array(gettext('Currency'), array('name' => 'currency_id', 'class' => 'currency_id'), 'SELECT', '', array("name" => "currency_id", "rules" => "required"), 'tOOL TIP', 'Please Enter account number', 'id', 'currencyname,currency', 'currency', 'build_concat_dropdown', '', array()),
277 277
 			array(gettext('Account Type'), array('name' => 'posttoexternal', 'disabled' => $readable, 'class' => 'posttoexternal', 'id' => 'posttoexternal'), 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_account_type'),
278
-			array(gettext('Credit Limit'), 'INPUT', array('name' => 'credit_limit', 'size' => '20',  'class' => "text field medium"), '', 'tOOL TIP', ''),
278
+			array(gettext('Credit Limit'), 'INPUT', array('name' => 'credit_limit', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', ''),
279 279
 			array(gettext('Tax'), 'tax_id', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'taxes_description', 'taxes', 'build_dropdown', 'where_arr', array('status' => 0, 'reseller_id' => $loginid), 'multi'),
280 280
 		);
281 281
 
282 282
 }
283
-else{
283
+else {
284 284
 			$form[gettext('Billing Information')] = array(
285 285
 			array(gettext('Rate Group'), 'pricelist_id', 'SELECT', '', array("name" => "pricelist_id", 'rules' => 'required'), 'tOOL TIP', 'Please Enter account number', 'id', 'name', 'pricelists', 'build_dropdown', 'where_arr', array("status" => "0", "reseller_id" => "0")),
286 286
             
@@ -288,31 +288,31 @@  discard block
 block discarded – undo
288 288
 			array(gettext('Billing Day'), array("name" => 'invoice_day', "class" => "invoice_day"), 'SELECT', '', '', 'tOOL TIP', '', '', '', '', 'set_invoice_option'),
289 289
 			array(gettext('Currency'), array('name' => 'currency_id', 'class' => 'currency_id'), 'SELECT', '', array("name" => "currency_id", "rules" => "required"), 'tOOL TIP', 'Please Enter account number', 'id', 'currencyname,currency', 'currency', 'build_concat_dropdown', '', array()),
290 290
 			array(gettext('Account Type'), array('name' => 'posttoexternal', 'disabled' => $readable, 'class' => 'posttoexternal', 'id' => 'posttoexternal'), 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_account_type'),
291
-			array(gettext('Credit Limit'), 'INPUT', array('name' => 'credit_limit', 'size' => '20',  'class' => "text field medium"), '', 'tOOL TIP', ''),
291
+			array(gettext('Credit Limit'), 'INPUT', array('name' => 'credit_limit', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', ''),
292 292
 			array(gettext('Tax'), 'tax_id', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'taxes_description', 'taxes', 'build_dropdown', 'where_arr', array('status' => 0, 'reseller_id' => $loginid), 'multi'),
293 293
 			$invoice_config,
294 294
 		);
295 295
 	}
296 296
 		$form[gettext('Reseller Profile')] = array(
297
-			array(gettext('First Name'), 'INPUT', array('name' => 'first_name', 'id' => 'first_name', 'size' => '50',  'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', ''),
298
-			array(gettext('Last Name'), 'INPUT', array('name' => 'last_name', 'size' => '15',  'class' => "text field medium"), 'trim|xss_clean', 'tOOL TIP', ''),
299
-			array(gettext('Company'), 'INPUT', array('name' => 'company_name',  'size' => '50', 'class' => 'text field medium'), 'trim|xss_clean', 'tOOL TIP', ''),
297
+			array(gettext('First Name'), 'INPUT', array('name' => 'first_name', 'id' => 'first_name', 'size' => '50', 'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', ''),
298
+			array(gettext('Last Name'), 'INPUT', array('name' => 'last_name', 'size' => '15', 'class' => "text field medium"), 'trim|xss_clean', 'tOOL TIP', ''),
299
+			array(gettext('Company'), 'INPUT', array('name' => 'company_name', 'size' => '50', 'class' => 'text field medium'), 'trim|xss_clean', 'tOOL TIP', ''),
300 300
 			array(gettext('Telephone 1'), 'INPUT', array('name' => 'telephone_1', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', ''),
301 301
 			array(gettext('Telephone 2'), 'INPUT', array('name' => 'telephone_2', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', ''),
302
-			array(gettext('Email'), 'INPUT', array('name' => 'email', 'size' => '50', 'class' => "text field medium"), 'required|valid_email|is_unique[' . $val . ']', 'tOOL TIP', ''),
302
+			array(gettext('Email'), 'INPUT', array('name' => 'email', 'size' => '50', 'class' => "text field medium"), 'required|valid_email|is_unique['.$val.']', 'tOOL TIP', ''),
303 303
 			array(gettext('Address 1'), 'INPUT', array('name' => 'address_1', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', ''),
304
-			array(gettext('Address 2'), 'INPUT', array('name' => 'address_2', 'size' => '15',  'class' => "text field medium"), '', 'tOOL TIP', ''),
304
+			array(gettext('Address 2'), 'INPUT', array('name' => 'address_2', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', ''),
305 305
 			array(gettext('City'), 'INPUT', array('name' => 'city', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', ''),
306 306
 			array(gettext('Province/State'), 'INPUT', array('name' => 'province', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', ''),
307
-			array(gettext('Zip/Postal Code'), 'INPUT', array('name' => 'postal_code', 'size' => '15',  'class' => "text field medium"), 'trim|xss_clean', 'tOOL TIP', ''),
307
+			array(gettext('Zip/Postal Code'), 'INPUT', array('name' => 'postal_code', 'size' => '15', 'class' => "text field medium"), 'trim|xss_clean', 'tOOL TIP', ''),
308 308
 			array(gettext('Country'), array('name' => 'country_id', 'class' => 'country_id'), 'SELECT', '', array("name" => "country_id", "rules" => "required"), 'tOOL TIP', 'Please Enter account number', 'id', 'country', 'countrycode', 'build_dropdown', '', ''),
309 309
 			array(gettext('Timezone'), array('name' => 'timezone_id', 'class' => 'timezone_id'), 'SELECT', '', array("name" => "timezone_id", "rules" => "required"), 'tOOL TIP', 'Please Enter account number', 'id', 'gmtzone', 'timezone', 'build_dropdown', '', ''),
310 310
 			array(gettext('Account Status'), 'status', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_status'),
311 311
 		);
312
-		if($id==0){
312
+		if ($id == 0) {
313 313
 	  $form[gettext('Alert Threshold')] = array(
314 314
 	  array('Email Alert?', 'notify_flag', 'SELECT', '', '', 'tOOL TIP', '', '', '', '', 'custom_status'),
315
-		  array(gettext('Balance Below'), 'INPUT', array('name' => 'notify_credit_limit', 'size' => '20',  'class' => "text field medium"), '', 'tOOL TIP', ''),
315
+		  array(gettext('Balance Below'), 'INPUT', array('name' => 'notify_credit_limit', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', ''),
316 316
 		  array(gettext('Email'), 'INPUT', array('name' => 'notify_email', 'size' => '50', 'class' => "text field medium"), 'valid_email', 'tOOL TIP', ''),
317 317
 	  );
318 318
 	}
@@ -323,24 +323,24 @@  discard block
 block discarded – undo
323 323
 
324 324
 	function get_form_admin_fields($entity_type = '', $id = false) {
325 325
 	  $uname = $this->CI->common->find_uniq_rendno(common_model::$global_config['system_config']['cardlength'], 'number', 'accounts');
326
-	  $params=array('name' => 'number', 'value' => $uname, 'size' => '20', 'class' => "text field medium", 'id' => 'number','readonly'=>true);
326
+	  $params = array('name' => 'number', 'value' => $uname, 'size' => '20', 'class' => "text field medium", 'id' => 'number', 'readonly'=>true);
327 327
 		if ($id > 0) {
328
-			$val = 'accounts.email.' . $id;
329
-			$account_val='accounts.number.'.$id;
330
-			$password = array('Password', 'PASSWORD', array('name' => 'password', 'id' => 'password_show', 'onmouseover' => 'seetext(password_show)', 'onmouseout' => 'hidepassword(password_show)', 'size' => '20',  'class' => "text field medium"), 'required|notMatch[number]|', 'tOOL TIP', '');
331
-			$account=array('Account', 'INPUT',$params, 'required|is_unique[' . $account_val . ']', 'tOOL TIP', '');
328
+			$val = 'accounts.email.'.$id;
329
+			$account_val = 'accounts.number.'.$id;
330
+			$password = array('Password', 'PASSWORD', array('name' => 'password', 'id' => 'password_show', 'onmouseover' => 'seetext(password_show)', 'onmouseout' => 'hidepassword(password_show)', 'size' => '20', 'class' => "text field medium"), 'required|notMatch[number]|', 'tOOL TIP', '');
331
+			$account = array('Account', 'INPUT', $params, 'required|is_unique['.$account_val.']', 'tOOL TIP', '');
332 332
 		} else {
333 333
 			$val = 'accounts.email';
334
-			$account_val='accounts.number';
334
+			$account_val = 'accounts.number';
335 335
 			$password = $this->CI->common->generate_password();
336
-			$password = array('Password', 'INPUT', array('name' => 'password', 'value' => $password, 'size' => '20','class' => "text field medium", 'id' => 'password'), 'required|', 'tOOL TIP', '', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;color: #1bcb61;" title="Reset Password" class="change_pass fa fa-refresh" ></i>');
337
-			$account = array('Account', 'INPUT',$params, 'required|is_unique[' . $account_val . ']', 'tOOL TIP', '', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;color: #1bcb61;" title="Generate Account" class="change_number fa fa-refresh" ></i>');
336
+			$password = array('Password', 'INPUT', array('name' => 'password', 'value' => $password, 'size' => '20', 'class' => "text field medium", 'id' => 'password'), 'required|', 'tOOL TIP', '', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;color: #1bcb61;" title="Reset Password" class="change_pass fa fa-refresh" ></i>');
337
+			$account = array('Account', 'INPUT', $params, 'required|is_unique['.$account_val.']', 'tOOL TIP', '', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;color: #1bcb61;" title="Generate Account" class="change_number fa fa-refresh" ></i>');
338 338
 			/*             * ****************** */
339 339
 		}
340 340
 
341 341
         
342 342
 		$type = $entity_type == 'admin' ? 2 : 4;
343
-		$form['forms'] = array(base_url() . 'accounts/' . $entity_type . '_save/', array("id" => "admin_form", "name" => "admin_form"));
343
+		$form['forms'] = array(base_url().'accounts/'.$entity_type.'_save/', array("id" => "admin_form", "name" => "admin_form"));
344 344
 		$form['Client Panel Access'] = array(
345 345
 			array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''),
346 346
 			array('', 'HIDDEN', array('name' => 'type', 'value' => $type), '', '', ''),
@@ -348,17 +348,17 @@  discard block
 block discarded – undo
348 348
 			$password,
349 349
 				/*                 * ********************* */
350 350
 		);
351
-		$form[gettext($entity_type . ' Profile')] = array(
351
+		$form[gettext($entity_type.' Profile')] = array(
352 352
 			array(gettext('First Name'), 'INPUT', array('name' => 'first_name', 'id' => 'first_name', 'size' => '15', 'maxlength' => '40', 'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter account number'),
353 353
 			array(gettext('Last Name'), 'INPUT', array('name' => 'last_name', 'size' => '15', 'class' => "text field medium"), 'trim|xss_clean', 'tOOL TIP', 'Please Enter Password'),
354
-			array(gettext('Company'), 'INPUT', array('name' => 'company_name',  'size' => '15', 'class' => 'text field medium'), 'trim|xss_clean', 'tOOL TIP', ''),
355
-			array(gettext('Telephone 1'), 'INPUT', array('name' => 'telephone_1', 'size' => '15',  'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
354
+			array(gettext('Company'), 'INPUT', array('name' => 'company_name', 'size' => '15', 'class' => 'text field medium'), 'trim|xss_clean', 'tOOL TIP', ''),
355
+			array(gettext('Telephone 1'), 'INPUT', array('name' => 'telephone_1', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
356 356
 			array(gettext('Telephone 2'), 'INPUT', array('name' => 'telephone_2', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
357
-			array(gettext('Email'), 'INPUT', array('name' => 'email', 'size' => '50',  'class' => "text field medium"), 'required|valid_email|is_unique[' . $val . ']', 'tOOL TIP', ''),
358
-			array(gettext('Address 1'), 'INPUT', array('name' => 'address_1', 'size' => '15','class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
359
-			array(gettext('Address 2'), 'INPUT', array('name' => 'address_2', 'size' => '15',  'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
357
+			array(gettext('Email'), 'INPUT', array('name' => 'email', 'size' => '50', 'class' => "text field medium"), 'required|valid_email|is_unique['.$val.']', 'tOOL TIP', ''),
358
+			array(gettext('Address 1'), 'INPUT', array('name' => 'address_1', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
359
+			array(gettext('Address 2'), 'INPUT', array('name' => 'address_2', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
360 360
 			array(gettext('City'), 'INPUT', array('name' => 'city', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
361
-			array(gettext('Province/State'), 'INPUT', array('name' => 'province', 'size' => '15',  'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
361
+			array(gettext('Province/State'), 'INPUT', array('name' => 'province', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
362 362
 			array(gettext('Zip/Postal Code'), 'INPUT', array('name' => 'postal_code', 'size' => '15', 'class' => "text field medium"), 'trim|xss_clean', 'tOOL TIP', 'Please Enter Password'),
363 363
 			array(gettext('Country'), array('name' => 'country_id', 'class' => 'country_id'), 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'country', 'countrycode', 'build_dropdown', '', ''),
364 364
 			array(gettext('Timezone'), array('name' => 'timezone_id', 'class' => 'timezone_id'), 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'gmtzone', 'timezone', 'build_dropdown', '', ''),
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
 		$form['forms'] = array("accounts/customer_batch_update/", array('id' => "reseller_batch_update"));
405 405
 		$form[gettext('Batch Update')] = array(
406 406
 			array(gettext('Rate Group'), array('name' => 'pricelist_id[pricelist_id]', 'id' => 'pricelist_id'), 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'name', 'pricelists', 'build_dropdown', 'where_arr', array("status" => "0", "reseller_id" => "0"), array('name' => 'pricelist_id[operator]', 'class' => 'update_drp'), 'update_drp_type'),
407
-			array(gettext('Balance'), 'INPUT', array('name' => 'balance[balance]', 'id' => 'balance', 'value' => '', 'size' => '20',  'class' => "text field "), '', 'Tool tips info', '1', array('name' => 'balance[operator]', 'class' => 'update_drp'), '', '', '', 'update_int_type', ''),
407
+			array(gettext('Balance'), 'INPUT', array('name' => 'balance[balance]', 'id' => 'balance', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', array('name' => 'balance[operator]', 'class' => 'update_drp'), '', '', '', 'update_int_type', ''),
408 408
 			$status,
409 409
 		);
410 410
 		$form['button_search'] = array('name' => 'action', 'id' => "batch_update_btn", 'content' => gettext('Update'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right');
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
 
420 420
 	function get_search_customer_form() {
421 421
 		$logintype = $this->CI->session->userdata('userlevel_logintype');
422
-		 if($logintype != 1){
422
+		 if ($logintype != 1) {
423 423
 		$form['forms'] = array("", array('id' => "account_search"));
424 424
 		$form[gettext('Search')] = array(
425 425
 			array(gettext('Account'), 'INPUT', array('name' => 'number[number]', '', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '1', 'number[number-string]', '', '', '', 'search_string_type', ''),
@@ -525,15 +525,15 @@  discard block
 block discarded – undo
525 525
     function build_account_list_for_admin() {
526 526
         // array(display name, width, db_field_parent_table,feidname, db_field_child_table,function name);
527 527
         $grid_field_arr = json_encode(array(
528
-            array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "", "", "","","false","center"),
529
-            array(gettext("Account"), "135", "number", "number", "accounts", "account_number_icon", "EDITABLE","true","left"),
530
-            array(gettext("First Name"), "150", "first_name", "", "", "","","true","center"),
531
-            array(gettext("Last Name"), "150", "last_name", "", "", "","","true","center"),
532
-            array(gettext("Company"), "150", "company_name", "", "", "","","true","center"),
533
-            array(gettext("Email"), "170", "email", "", "", "","","true","center"),
534
-            array(gettext("Phone"), "150", "telephone_1", "", "", "","","true","center"),
535
-            array(gettext("Country"), "110", "country_id", "country", "countrycode", "get_field_name","","true","center"),
536
-            array(gettext("Status"), "110", "status", "status", "accounts", "get_status","","true","center"),
528
+            array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "", "", "", "", "false", "center"),
529
+            array(gettext("Account"), "135", "number", "number", "accounts", "account_number_icon", "EDITABLE", "true", "left"),
530
+            array(gettext("First Name"), "150", "first_name", "", "", "", "", "true", "center"),
531
+            array(gettext("Last Name"), "150", "last_name", "", "", "", "", "true", "center"),
532
+            array(gettext("Company"), "150", "company_name", "", "", "", "", "true", "center"),
533
+            array(gettext("Email"), "170", "email", "", "", "", "", "true", "center"),
534
+            array(gettext("Phone"), "150", "telephone_1", "", "", "", "", "true", "center"),
535
+            array(gettext("Country"), "110", "country_id", "country", "countrycode", "get_field_name", "", "true", "center"),
536
+            array(gettext("Status"), "110", "status", "status", "accounts", "get_status", "", "true", "center"),
537 537
             /*******************************************************************/
538 538
             array(gettext("Action"), "100", "", "", "", array(
539 539
                     "EDIT" => array("url" => "accounts/admin_edit/", "mode" => "single"),
@@ -545,24 +545,24 @@  discard block
 block discarded – undo
545 545
 
546 546
     function build_account_list_for_customer() {
547 547
       $account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
548
-      $currency_id=$account_info['currency_id'];
549
-      $currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id);
548
+      $currency_id = $account_info['currency_id'];
549
+      $currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id);
550 550
       
551 551
 	  // array(display name, width, db_field_parent_table,feidname, db_field_child_table,function name);
552 552
 	  $grid_field_arr = json_encode(array(
553
-		array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "","","","","false","center"),
554
-		array(gettext("Account"), "125", "number", "number", "accounts", "account_number_icon", "EDITABLE","true","left"),
555
-			array(gettext("First Name"), "95", "first_name", "", "", "","","true","center"),
556
-			array(gettext("Last Name"), "95", "last_name", "", "", "","","true","center"),
557
-			array(gettext("Company"), "85", "company_name", "", "", "","","true","center"),
558
-			array(gettext("Rate Group"), "85", "pricelist_id", "name", "pricelists", "get_field_name","","true","center"),
559
-			array(gettext("Balance")." ($currency)", "100", "balance", "balance", "balance", "convert_to_currency_account","","true","right"),
560
-			array(gettext("Credit Limit")." ($currency)", "120", "credit_limit", "credit_limit", "credit_limit", "convert_to_currency_account","","true","right"),
561
-			array(gettext("First Used"), "80", "first_used", "", "", "","","true","center"),
562
-			array(gettext("Expiry Date"), "80", "expiry", "", "", "","","true","center"),
563
-			array("CC", "45", "maxchannels", "", "", "","","true","center"),
564
-			array(gettext("Status"), "90", "status", "status", "accounts", "get_status","","true","center"),
565
-			array(gettext("Created Date"), "90", "creation", "", "", "","","true","center"),
553
+		array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "", "", "", "", "false", "center"),
554
+		array(gettext("Account"), "125", "number", "number", "accounts", "account_number_icon", "EDITABLE", "true", "left"),
555
+			array(gettext("First Name"), "95", "first_name", "", "", "", "", "true", "center"),
556
+			array(gettext("Last Name"), "95", "last_name", "", "", "", "", "true", "center"),
557
+			array(gettext("Company"), "85", "company_name", "", "", "", "", "true", "center"),
558
+			array(gettext("Rate Group"), "85", "pricelist_id", "name", "pricelists", "get_field_name", "", "true", "center"),
559
+			array(gettext("Balance")." ($currency)", "100", "balance", "balance", "balance", "convert_to_currency_account", "", "true", "right"),
560
+			array(gettext("Credit Limit")." ($currency)", "120", "credit_limit", "credit_limit", "credit_limit", "convert_to_currency_account", "", "true", "right"),
561
+			array(gettext("First Used"), "80", "first_used", "", "", "", "", "true", "center"),
562
+			array(gettext("Expiry Date"), "80", "expiry", "", "", "", "", "true", "center"),
563
+			array("CC", "45", "maxchannels", "", "", "", "", "true", "center"),
564
+			array(gettext("Status"), "90", "status", "status", "accounts", "get_status", "", "true", "center"),
565
+			array(gettext("Created Date"), "90", "creation", "", "", "", "", "true", "center"),
566 566
 			/************************************************************************/
567 567
 			array(gettext("Action"), "140", "", "", "", array("PAYMENT" => array("url" => "accounts/customer_payment_process_add/", "mode" => "single"),
568 568
 					"CALLERID" => array("url" => "accounts/customer_add_callerid/", "mode" => "popup"),
@@ -574,21 +574,21 @@  discard block
 block discarded – undo
574 574
 
575 575
 	function build_account_list_for_reseller() {
576 576
 	$account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
577
-	$currency_id=$account_info['currency_id'];
578
-	$currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id);
577
+	$currency_id = $account_info['currency_id'];
578
+	$currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id);
579 579
 	
580 580
         // array(display name, width, db_field_parent_table,feidname, db_field_child_table,function name);
581
-        $grid_field_arr = json_encode(array(array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "", "", "","","false","center"),
582
-            array(gettext("Account"), "105", "number", "", "", "", "EDITABLE","true","center"),
583
-            array(gettext("First Name"), "120", "first_name", "", "", "","","true","center"),
584
-            array(gettext("Last Name"), "115", "last_name", "", "", "","","true","center"),
585
-            array(gettext("Company"), "130", "company_name", "", "", "","","true","center"),
586
-            array(gettext("Rate Group"), "95", "pricelist_id", "name", "pricelists", "get_field_name","","true","center"),
587
-            array(gettext("Account Type"), "107", "posttoexternal", "posttoexternal", "posttoexternal", "get_account_type","","true","center"),
588
-            array(gettext("Balance")." ($currency)", "100", "balance", "balance", "balance", "convert_to_currency","","true","right"),
589
-            array(gettext("Credit Limit")." ($currency)", "120", "credit_limit", "credit_limit", "credit_limit", "convert_to_currency","","true","right"),
590
-            array(gettext("Status"), "110", "status", "status", "accounts", "get_status","","true","center"),
591
-            array(gettext("Created Date"), "90", "creation", "", "", "","","true","center"),          
581
+        $grid_field_arr = json_encode(array(array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "", "", "", "", "false", "center"),
582
+            array(gettext("Account"), "105", "number", "", "", "", "EDITABLE", "true", "center"),
583
+            array(gettext("First Name"), "120", "first_name", "", "", "", "", "true", "center"),
584
+            array(gettext("Last Name"), "115", "last_name", "", "", "", "", "true", "center"),
585
+            array(gettext("Company"), "130", "company_name", "", "", "", "", "true", "center"),
586
+            array(gettext("Rate Group"), "95", "pricelist_id", "name", "pricelists", "get_field_name", "", "true", "center"),
587
+            array(gettext("Account Type"), "107", "posttoexternal", "posttoexternal", "posttoexternal", "get_account_type", "", "true", "center"),
588
+            array(gettext("Balance")." ($currency)", "100", "balance", "balance", "balance", "convert_to_currency", "", "true", "right"),
589
+            array(gettext("Credit Limit")." ($currency)", "120", "credit_limit", "credit_limit", "credit_limit", "convert_to_currency", "", "true", "right"),
590
+            array(gettext("Status"), "110", "status", "status", "accounts", "get_status", "", "true", "center"),
591
+            array(gettext("Created Date"), "90", "creation", "", "", "", "", "true", "center"),          
592 592
             /**************************************************************/
593 593
             array(gettext("Action"), "139", "", "", "", array("PAYMENT" => array("url" => "accounts/customer_payment_process_add/", "mode" => "single"),
594 594
                     "CALLERID" => array("url" => "accounts/customer_add_callerid/", "mode" => 'popup'),
@@ -608,7 +608,7 @@  discard block
 block discarded – undo
608 608
              // array(display name, width, db_field_parent_table,feidname, db_field_child_table,function name);
609 609
         $buttons_json = json_encode(array(
610 610
             array(gettext("Create Customer"), "btn btn-line-warning btn", "fa fa-plus-circle fa-lg", "button_action", "/accounts/customer_add/"),
611
-            array(gettext("Mass Create"), "btn btn-line-warning btn", "fa fa-plus-circle fa-lg", "button_action", "/accounts/customer_bulk_creation/", "popup","medium"),
611
+            array(gettext("Mass Create"), "btn btn-line-warning btn", "fa fa-plus-circle fa-lg", "button_action", "/accounts/customer_bulk_creation/", "popup", "medium"),
612 612
             $provider,
613 613
             array(gettext("Export"), "btn btn-xing", " fa fa-download fa-lg", "button_action", "/accounts/customer_export_cdr_xls/", 'single'),
614 614
             array(gettext("Delete"), "btn btn-line-danger", "fa fa-times-circle fa-lg", "button_action", "/accounts/customer_selected_delete/")
@@ -636,23 +636,23 @@  discard block
 block discarded – undo
636 636
 
637 637
     function build_ip_list_for_customer($accountid, $accountype) {
638 638
         $grid_field_arr = json_encode(array(
639
-            array(gettext('Name'), "180", "name", "", "", "","","true","center"),
640
-            array(gettext('IP'), "180", "ip", "", "", "","","true","center"),
641
-            array(gettext('Prefix'), "180", "prefix", "", "", "","","true","center"),
642
-            array(gettext('Created Date'), "174", "created_date", "created_date", "created_date", "convert_GMT_to","","true","center"),
643
-            array(gettext('Modified Date'), "160", "last_modified_date", "last_modified_date", "last_modified_date", "convert_GMT_to","","true","center"),
644
-            array(gettext('Action'), "150", "", "", "", array("DELETE" => array("url" => "accounts/" . $accountype . "_ipmap_action/delete/$accountid/$accountype/", "mode" => "single")))
639
+            array(gettext('Name'), "180", "name", "", "", "", "", "true", "center"),
640
+            array(gettext('IP'), "180", "ip", "", "", "", "", "true", "center"),
641
+            array(gettext('Prefix'), "180", "prefix", "", "", "", "", "true", "center"),
642
+            array(gettext('Created Date'), "174", "created_date", "created_date", "created_date", "convert_GMT_to", "", "true", "center"),
643
+            array(gettext('Modified Date'), "160", "last_modified_date", "last_modified_date", "last_modified_date", "convert_GMT_to", "", "true", "center"),
644
+            array(gettext('Action'), "150", "", "", "", array("DELETE" => array("url" => "accounts/".$accountype."_ipmap_action/delete/$accountid/$accountype/", "mode" => "single")))
645 645
                 ));
646 646
         return $grid_field_arr;
647 647
     }
648 648
 
649 649
     function build_animap_list_for_customer($accountid, $accounttype) {
650 650
         $grid_field_arr = json_encode(array(
651
-            array(gettext("Caller ID"), "200", "number", "", "", "","","true","center"),
652
-            array(gettext("Status"), "180", "status", "status", "ani_map", "get_status_new","","true","center"),
653
-            array(gettext("Created Date"), "200", "creation_date", "creation_date", "creation_date", "convert_GMT_to","","true","center"),
654
-            array(gettext("Modified Date"), "170", "last_modified_date", "last_modified_date", "last_modified_date", "convert_GMT_to","","true","center"),
655
-            array(gettext("Action"), "200", "", "", "", array("DELETE" => array("url" => "accounts/" . $accounttype . "_animap_action/delete/$accountid/", "mode" => "single")))
651
+            array(gettext("Caller ID"), "200", "number", "", "", "", "", "true", "center"),
652
+            array(gettext("Status"), "180", "status", "status", "ani_map", "get_status_new", "", "true", "center"),
653
+            array(gettext("Created Date"), "200", "creation_date", "creation_date", "creation_date", "convert_GMT_to", "", "true", "center"),
654
+            array(gettext("Modified Date"), "170", "last_modified_date", "last_modified_date", "last_modified_date", "convert_GMT_to", "", "true", "center"),
655
+            array(gettext("Action"), "200", "", "", "", array("DELETE" => array("url" => "accounts/".$accounttype."_animap_action/delete/$accountid/", "mode" => "single")))
656 656
                 ));
657 657
         return $grid_field_arr;
658 658
     }
@@ -668,13 +668,13 @@  discard block
 block discarded – undo
668 668
 
669 669
     function set_block_pattern_action_buttons($id) {
670 670
         $ret_url = '';
671
-        $ret_url .= '<a href="/did/delete/' . $id . '/" class="icon delete_image" title="Delete" onClick="return get_alert_msg();">&nbsp;</a>';
671
+        $ret_url .= '<a href="/did/delete/'.$id.'/" class="icon delete_image" title="Delete" onClick="return get_alert_msg();">&nbsp;</a>';
672 672
         return $ret_url;
673 673
     }
674 674
 
675 675
     function build_animap_list() {
676 676
         $grid_field_arr = json_encode(array(array("Caller ID", "180", "number", "", "", ""),
677
-            array(gettext("status"),"180","status","status","animap","get_status"),    
677
+            array(gettext("status"), "180", "status", "status", "animap", "get_status"),    
678 678
             array(gettext("Action"), "130", "", "", "",
679 679
                 array(
680 680
                     "EDIT_ANIMAP" => array("url" => "accounts/callingcards_animap_list_edit/", "mode" => "single"),
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/email/views/view_email_brod.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -236,7 +236,7 @@
 block discarded – undo
236 236
  <div class="container">
237 237
  <form method="post" action="<?= base_url()?>email/email_client_get/" enctype="multipart/form-data" name="myform" id="myform" onsubmit="return(regvalidate())">
238 238
      <span  style="margin-left:10px; text-align: center;background-color: none;color:#DD191D;">
239
-                    <? if(isset($error) && !empty($error)) {
239
+                    <? if (isset($error) && ! empty($error)) {
240 240
 						echo $error;
241 241
 					}?>
242 242
                  </span>
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/charges/libraries/charges_form.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
23 23
 ###############################################################################
24 24
 
25
-if (!defined('BASEPATH'))
25
+if ( ! defined('BASEPATH'))
26 26
 	exit('No direct script access allowed');
27 27
 
28 28
 class Charges_form {
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 	}
32 32
    
33 33
 	function get_charge_form_fields() {
34
-		$form['forms'] = array(base_url() . 'charges/periodiccharges_save/', array('id' => 'charges_form', 'method' => 'POST', 'name' => 'charges_form'));
34
+		$form['forms'] = array(base_url().'charges/periodiccharges_save/', array('id' => 'charges_form', 'method' => 'POST', 'name' => 'charges_form'));
35 35
 		$form['Information'] = array(
36 36
 			array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''),
37 37
 			array('Name', 'INPUT', array('name' => 'description', 'size' => '20', 'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter account number'),
@@ -52,13 +52,13 @@  discard block
 block discarded – undo
52 52
 			$account_data = $this->CI->session->userdata("accountinfo");
53 53
 			$loginid = $account_data['id'];
54 54
 
55
-		}else{
55
+		} else {
56 56
 			$loginid = "0";
57 57
 		}
58 58
 		$form['forms'] = array("", array('id' => "charges_search"));
59 59
 		$form['Search'] = array(
60 60
 			array('Name', 'INPUT', array('name' => 'description[description]', '', 'size' => '20', 'class' => "text field"), '', 'tOOL TIP', '1', 'description[description-string]', '', '', '', 'search_string_type', ''),
61
-			array('Rate Group', 'pricelist_id', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'name', 'pricelists', 'build_dropdown', 'where_arr', array('status'=>0,'reseller_id'=>$loginid)),
61
+			array('Rate Group', 'pricelist_id', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'name', 'pricelists', 'build_dropdown', 'where_arr', array('status'=>0, 'reseller_id'=>$loginid)),
62 62
 			array('Amount', 'INPUT', array('name' => 'charge[charge]', 'value' => '', 'size' => '20', 'class' => "text field"), '', 'Tool tips info', '1', 'charge[charge-integer]', '', '', '', 'search_int_type', ''),
63 63
 			array('Billing Cycle', 'sweep_id', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'sweep', 'sweeplist', 'build_dropdown', '', ''), 
64 64
 			array('Status', 'status', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_search_status'),
@@ -77,28 +77,28 @@  discard block
 block discarded – undo
77 77
 	function build_charge_list_for_admin() {
78 78
 		
79 79
 		  $account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
80
-	$currency_id=$account_info['currency_id'];
81
-	 $currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id);
80
+	$currency_id = $account_info['currency_id'];
81
+	 $currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id);
82 82
 		
83 83
 		// array(display name, width, db_field_parent_table,feidname, db_field_child_table,function name);
84
-		$grid_field_arr = json_encode(array(array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "", "", "","","false","center"),
84
+		$grid_field_arr = json_encode(array(array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "", "", "", "", "false", "center"),
85 85
 /**
86 86
 ASTPP  3.0 
87 87
 For DID edit on DID number
88 88
 **/
89
-		array(gettext("Name"), "140", "description", "", "", "","EDITABLE","true","center"),
89
+		array(gettext("Name"), "140", "description", "", "", "", "EDITABLE", "true", "center"),
90 90
 /**************************************************/
91
-			array(gettext("Rate Group"), "140", "pricelist_id", "name", "pricelists", "get_field_name","","true","center"),
92
-			array("Amount($currency)", "125", "charge", "charge", "charge", "convert_to_currency","","true","right"),
93
-			array(gettext("Prorate"), "125", "pro_rate", "pro_rate", "charges", "get_prorate","","true","center"),
94
-			array(gettext("Billing Cycle"), "130", "sweep_id", "sweep", "sweeplist", "get_field_name","","true","center"),
91
+			array(gettext("Rate Group"), "140", "pricelist_id", "name", "pricelists", "get_field_name", "", "true", "center"),
92
+			array("Amount($currency)", "125", "charge", "charge", "charge", "convert_to_currency", "", "true", "right"),
93
+			array(gettext("Prorate"), "125", "pro_rate", "pro_rate", "charges", "get_prorate", "", "true", "center"),
94
+			array(gettext("Billing Cycle"), "130", "sweep_id", "sweep", "sweeplist", "get_field_name", "", "true", "center"),
95 95
 			/**
96 96
 	    ASTPP  3.0 
97 97
 	    Show Creation date,last_modified date in reseller grid with admin login
98 98
 			 **/
99
-			array(gettext("Status"), "125", "status", "status", "charges", "get_status","","true","center"),
100
-			array(gettext("Created Date"), "150", "creation_date", "", "", "","","true","center"),
101
-			 array(gettext("Modified Date"), "150", "last_modified_date", "", "", "","","true","center"),
99
+			array(gettext("Status"), "125", "status", "status", "charges", "get_status", "", "true", "center"),
100
+			array(gettext("Created Date"), "150", "creation_date", "", "", "", "", "true", "center"),
101
+			 array(gettext("Modified Date"), "150", "last_modified_date", "", "", "", "", "true", "center"),
102 102
 			/************************************************/
103 103
 		   /*
104 104
             ASTPP  3.0 
@@ -114,8 +114,8 @@  discard block
 block discarded – undo
114 114
     /********************************************/
115 115
 
116 116
 	function build_grid_buttons() {
117
-		$buttons_json = json_encode(array(array("Create" , "btn btn-line-warning btn" , "fa fa-plus-circle fa-lg", "button_action", "/charges/periodiccharges_add/", "popup"),
118
-			array("Delete", "btn btn-line-danger","fa fa-times-circle fa-lg",  "button_action", "/charges/periodiccharges_delete_multiple/")
117
+		$buttons_json = json_encode(array(array("Create", "btn btn-line-warning btn", "fa fa-plus-circle fa-lg", "button_action", "/charges/periodiccharges_add/", "popup"),
118
+			array("Delete", "btn btn-line-danger", "fa fa-times-circle fa-lg", "button_action", "/charges/periodiccharges_delete_multiple/")
119 119
 			));
120 120
 		return $buttons_json;
121 121
 	}
@@ -123,15 +123,15 @@  discard block
 block discarded – undo
123 123
 	function build_charges_list_for_customer($accountid, $accounttype) {
124 124
 		
125 125
 		$account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
126
-		$currency_id=$account_info['currency_id'];
127
-		$currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id);		
126
+		$currency_id = $account_info['currency_id'];
127
+		$currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id);		
128 128
 		
129
-		$grid_field_arr = json_encode(array(array("Name", "140", "description", "", "", "","","true","center"),
130
-			array("Amount($currency)", "140", "charge", "charge", "charge", "convert_to_currency","","true","right"),
131
-			array("Prorate", "125", "pro_rate", "pro_rate", "charges", "get_prorate","","true","center"),
132
-			array("Billing Cycle", "170", "sweep_id", "sweep", "sweeplist", "get_field_name","","true","center"),
133
-			array("Created Date", "150", "creation_date", "", "", "","","true","center"),
134
-			 array("Modified Date", "150", "last_modified_date", "", "", "","","true","center"),
129
+		$grid_field_arr = json_encode(array(array("Name", "140", "description", "", "", "", "", "true", "center"),
130
+			array("Amount($currency)", "140", "charge", "charge", "charge", "convert_to_currency", "", "true", "right"),
131
+			array("Prorate", "125", "pro_rate", "pro_rate", "charges", "get_prorate", "", "true", "center"),
132
+			array("Billing Cycle", "170", "sweep_id", "sweep", "sweeplist", "get_field_name", "", "true", "center"),
133
+			array("Created Date", "150", "creation_date", "", "", "", "", "true", "center"),
134
+			 array("Modified Date", "150", "last_modified_date", "", "", "", "", "true", "center"),
135 135
 			array("Action", "150", "", "", "", array("DELETE" => array("url" => "accounts/".$accounttype."_subscription_action/delete/$accountid/$accounttype/", "mode" => "single")))
136 136
 				));
137 137
 		return $grid_field_arr;
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/did/views/view_did_import.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
               <div class="col-md-12">
17 17
             	<div class="w-box">
18 18
             	 <span  style="margin-left:10px; text-align: center;background-color: none;color:#1c8400;">
19
-                    <? if(isset($error) && !empty($error)) {
19
+                    <? if (isset($error) && ! empty($error)) {
20 20
 						echo $error;
21 21
 					}?>
22 22
                  </span>
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/user/views/view_user_speeddial.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@
 block discarded – undo
131 131
                                             </label>
132 132
                                             </div>
133 133
                                                <div class="col-md-3">
134
-                                            <input class="col-md-2 form-control" name="speed_dial_<?php echo $i; ?>" id="speed_dial_<?php echo $i; ?>" size="16" type="text"  value="<?php if (isset($speeddial[$i]) && !empty($speeddial[$i])) {
134
+                                            <input class="col-md-2 form-control" name="speed_dial_<?php echo $i; ?>" id="speed_dial_<?php echo $i; ?>" size="16" type="text"  value="<?php if (isset($speeddial[$i]) && ! empty($speeddial[$i])) {
135 135
 		echo $speeddial[$i];
136 136
 	} ?>">
137 137
                                                </div>
Please login to merge, or discard this patch.
astpp/application/modules/user/views/view_user_invoices_config.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -206,13 +206,13 @@
 block discarded – undo
206 206
 				</div>
207 207
 		</div>	
208 208
 <?php
209
-	if($account_data['logo']  != ''){
210
-		 $logo=$account_data['file'];
211
-	}else{
212
-		 $logo=$account_data['logo'];
209
+	if ($account_data['logo'] != '') {
210
+		 $logo = $account_data['file'];
211
+	} else {
212
+		 $logo = $account_data['logo'];
213 213
 	}
214
-		  if($logo != ''){        
215
-			 $file_name= base_url()."upload/$logo";
214
+		  if ($logo != '') {        
215
+			 $file_name = base_url()."upload/$logo";
216 216
 ?>
217 217
 
218 218
 		<div class='col-md-12 no-padding'>
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/invoices/views/view_invoiceconf.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
         <div class="w-section inverse no-padding">
14 14
             <?php echo $form; ?>
15 15
             <?php
16
-			if(isset($validation_errors) && $validation_errors != ''){ ?>
16
+			if (isset($validation_errors) && $validation_errors != '') { ?>
17 17
                 <script>
18 18
                 var ERR_STR = '<?php echo $validation_errors; ?>';
19 19
                 print_error(ERR_STR);
Please login to merge, or discard this patch.
web_interface/astpp/application/controllers/newmail.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,23 +29,23 @@
 block discarded – undo
29 29
 		parent::__construct();
30 30
 	}
31 31
 	
32
-	function index(){
32
+	function index() {
33 33
 		$data['account_info'] = $this->session->userdata['accountinfo'];
34 34
 		$data['username'] = $this->session->userdata('user_name');
35 35
 		$data['page_title'] = "Test Mail";
36
-		$this->load->view('view_newmail',$data);
36
+		$this->load->view('view_newmail', $data);
37 37
 	}
38
-	function customer_mail_result($flag=FALSE){
38
+	function customer_mail_result($flag = FALSE) {
39 39
 	$account_info = $this->session->userdata['accountinfo'];
40 40
 		$post_array = $this->input->post();
41
-	$post_array['accountid']=$account_info['id'];
42
-	$post_array['history_id']=0;
43
-	$post_array['email']=$post_array['to'];
41
+	$post_array['accountid'] = $account_info['id'];
42
+	$post_array['history_id'] = 0;
43
+	$post_array['email'] = $post_array['to'];
44 44
 	unset($post_array['to']);
45
-	$this->email_lib->send_email($post_array,$post_array,'','',0,0);
45
+	$this->email_lib->send_email($post_array, $post_array, '', '', 0, 0);
46 46
 		$this->thanks();
47 47
 	}
48
-	function thanks(){
48
+	function thanks() {
49 49
 			$this->load->view('view_mail_response');
50 50
 	}	
51 51
 
Please login to merge, or discard this patch.
web_interface/astpp/application/config/cron.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -9,15 +9,15 @@
 block discarded – undo
9 9
 */
10 10
 
11 11
 $astpp_config = parse_ini_file("/var/lib/astpp/astpp-config.conf");
12
-$config['SERVER_NAME'] 		= $astpp_config['base_url'];	// Your web site url
13
-$config['CRON_TIME_LIMIT']	= 0;								// 0 = no time limit
14
-$config['argv']			= array("LowBalance"=>"lowbalance/low_balance",
12
+$config['SERVER_NAME'] = $astpp_config['base_url']; // Your web site url
13
+$config['CRON_TIME_LIMIT'] = 0; // 0 = no time limit
14
+$config['argv'] = array("LowBalance"=>"lowbalance/low_balance",
15 15
 					"Lowcredit"=>"lowcreditlimit/low_creditlimit",
16 16
 					"UpdateBalance" => "updateBalance/GetUpdateBalance",
17 17
 						"CurrencyUpdate" => "currencyupdate/update_currency",
18 18
 					"GenerateInvoice" => "generateInvoice/getInvoiceData",
19 19
 					"FeedBack"=>"feedback/customer_feedback_result/TRUE",
20 20
 					"BroadcastEmail" => "broadcastemail/broadcast_email");
21
-$config['CRON_BETA_MODE']	= false;							// Beta Mode (useful for blocking submissions for testing)
21
+$config['CRON_BETA_MODE'] = false; // Beta Mode (useful for blocking submissions for testing)
22 22
 
23 23
 ?>
Please login to merge, or discard this patch.