|
@@ -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();"> </a>'; |
|
671
|
+ $ret_url .= '<a href="/did/delete/'.$id.'/" class="icon delete_image" title="Delete" onClick="return get_alert_msg();"> </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"), |