Completed
Pull Request — v3.0 (#136)
by
unknown
25:07
created
web_interface/astpp/application/modules/user/libraries/user_form.php 3 patches
Indentation   +469 added lines, -469 removed lines patch added patch discarded remove patch
@@ -23,63 +23,63 @@  discard block
 block discarded – undo
23 23
 
24 24
 if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 
25 25
 class User_form{
26
-    function __construct($library_name = '') {
27
-        $this->CI = & get_instance();
28
-    }
26
+	function __construct($library_name = '') {
27
+		$this->CI = & get_instance();
28
+	}
29 29
 
30 30
 
31 31
 function build_packages_list_for_user(){
32
-        $grid_field_arr = json_encode(array(
33
-            array(gettext("Name"), "310", "package_name", "", "", "","","true","center"),
34
-            array(gettext("Rate Group"), "250", "pricelist_id", "name", "pricelists", "get_field_name","","true","center"),
35
-            array(gettext("Included Seconds"), "260", "includedseconds", "", "", "","","true","center"),
36
-            array(gettext("Status"), "160", "status", "status", "status", "get_status","","true","center"),
37
-                ));
38
-        return $grid_field_arr;
32
+		$grid_field_arr = json_encode(array(
33
+			array(gettext("Name"), "310", "package_name", "", "", "","","true","center"),
34
+			array(gettext("Rate Group"), "250", "pricelist_id", "name", "pricelists", "get_field_name","","true","center"),
35
+			array(gettext("Included Seconds"), "260", "includedseconds", "", "", "","","true","center"),
36
+			array(gettext("Status"), "160", "status", "status", "status", "get_status","","true","center"),
37
+				));
38
+		return $grid_field_arr;
39 39
 }
40
-    function build_refill_list_for_user() {
41
-      $grid_field_arr = json_encode(array(
40
+	function build_refill_list_for_user() {
41
+	  $grid_field_arr = json_encode(array(
42 42
 	
43
-            array(gettext("Date"), "225", "payment_date", "", "", ""),
44
-            array(gettext("Amount"), "250", "credit", "credit", "credit", "convert_to_currency"),
45
-            array(gettext("Refill By"), "230", "payment_by", "payment_by", "payment_by", "get_refill_by"),
46
-            array(gettext("Note"), "290", "notes", "", "", "")
47
-                ));
48
-        return $grid_field_arr;
49
-    }
43
+			array(gettext("Date"), "225", "payment_date", "", "", ""),
44
+			array(gettext("Amount"), "250", "credit", "credit", "credit", "convert_to_currency"),
45
+			array(gettext("Refill By"), "230", "payment_by", "payment_by", "payment_by", "get_refill_by"),
46
+			array(gettext("Note"), "290", "notes", "", "", "")
47
+				));
48
+		return $grid_field_arr;
49
+	}
50 50
     
51 51
         
52
-    function build_emails_list_for_user() {
53
-        $grid_field_arr = json_encode(array(
54
-            array(gettext("Date"), "110", "date", "", "", "","","true","center"),
55
-            array(gettext("From"), "170", "from", "", "", "","","true","center"),
56
-            array(gettext("Body"), "550", "body", "", "", "","","true","center"),
57
-            array(gettext("Attachement"), "100", "attachment", "attachment", "attachment", "attachment_icons","","true","center"),
58
-            array(gettext("Status"), "100", "status", "status", "status", "email_status","","true","center"),
59
-                ));
60
-        return $grid_field_arr;
61
-    }
62
-    function build_user_emails_search(){
63
-        $form['forms'] = array("", array('id' => "user_emails_search"));
64
-        $form['Search'] = array(
65
-	    array(gettext('From Date'), 'INPUT', array('name' => 'date[]', 'id' => 'customer_cdr_from_date', 'size' => '20',
52
+	function build_emails_list_for_user() {
53
+		$grid_field_arr = json_encode(array(
54
+			array(gettext("Date"), "110", "date", "", "", "","","true","center"),
55
+			array(gettext("From"), "170", "from", "", "", "","","true","center"),
56
+			array(gettext("Body"), "550", "body", "", "", "","","true","center"),
57
+			array(gettext("Attachement"), "100", "attachment", "attachment", "attachment", "attachment_icons","","true","center"),
58
+			array(gettext("Status"), "100", "status", "status", "status", "email_status","","true","center"),
59
+				));
60
+		return $grid_field_arr;
61
+	}
62
+	function build_user_emails_search(){
63
+		$form['forms'] = array("", array('id' => "user_emails_search"));
64
+		$form['Search'] = array(
65
+		array(gettext('From Date'), 'INPUT', array('name' => 'date[]', 'id' => 'customer_cdr_from_date', 'size' => '20',
66 66
  'class' => "text field "), '', 'tOOL TIP', '', 'date[date-date]'),
67 67
 		array(gettext('To Date'), 'INPUT', array('name' => 'date[]', 'id' => 'customer_cdr_to_date', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '', 'date[date-date]'),
68 68
 		array(gettext('From'), 'INPUT', array('name' => 'from[from]', '','id'=>'from', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '1', 'from[from-string]', '', '', '', 'search_string_type', ''),
69 69
 		array(gettext('Body'), 'INPUT', array('name' => 'body[body]', '','id'=>'body', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '1', 'body[body-string]', '', '', '', 'search_string_type', ''),  
70 70
 		array('', 'HIDDEN', 'ajax_search', '1', '', '', ''),         
71 71
 		array('', 'HIDDEN', 'advance_search', '1', '', '', '')
72
-        );
73
-        $form['button_search'] = array('name' => 'action', 'id' => "user_email_search_btn", 'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right');
74
-        $form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => gettext('Clear'), 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10');
75
-        return $form;
76
-    }
72
+		);
73
+		$form['button_search'] = array('name' => 'action', 'id' => "user_email_search_btn", 'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right');
74
+		$form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => gettext('Clear'), 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10');
75
+		return $form;
76
+	}
77 77
    
78
-    function get_userprofile_form_fields($dataArr = false) {
79
-        if ($dataArr['id'] > 0)
80
-            $val = 'accounts.email.' . $dataArr['id'];
81
-        else
82
-            $val = 'accounts.email';
78
+	function get_userprofile_form_fields($dataArr = false) {
79
+		if ($dataArr['id'] > 0)
80
+			$val = 'accounts.email.' . $dataArr['id'];
81
+		else
82
+			$val = 'accounts.email';
83 83
 			$uname = $this->CI->common->find_uniq_rendno(common_model::$global_config['system_config']['cardlength'], 'number', 'accounts');
84 84
 			$password = $this->CI->common->generate_password();
85 85
 			$logintype=$this->CI->session->userdata('logintype');
@@ -87,289 +87,289 @@  discard block
 block discarded – undo
87 87
 			$form['forms'] = array(base_url() . 'user/user_myprofile/', array("id" => "user_form", "name" => "user_form"));
88 88
 
89 89
 			$form['User Profile'] = array(
90
-            array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''),
91
-            array('', 'HIDDEN', array('name' => 'type', 'value' => '0'), '', '', ''),
92
-            array(gettext('Account Number'), 'INPUT', array('name' => 'number', 'value' => $uname, 'size' => '20', 'readonly' => true,  'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'),
93
-            $pin,
94
-            array(gettext('Company'), 'INPUT', array('name' => 'company_name', 'size' => '15', 'class' => 'text field medium'), 'trim|xss_clean', 'tOOL TIP', ''),
95
-            array(gettext('First Name'), 'INPUT', array('name' => 'first_name', 'id' => 'first_name', 'size' => '15',  'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter account number'),
96
-            array(gettext('Last Name'), 'INPUT', array('name' => 'last_name', 'size' => '15',  'class' => "text field medium"), 'trim|alpha_dash|xss_clean', 'tOOL TIP', 'Please Enter Password'),
97
-            array(gettext('Telephone 1'), 'INPUT', array('name' => 'telephone_1', 'size' => '15',  'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
98
-            array(gettext('Telephone 2'), 'INPUT', array('name' => 'telephone_2', 'size' => '15',  'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
99
-            array(gettext('Email'), 'INPUT', array('name' => 'email', 'size' => '50',  'class' => "text field medium"), 'required|valid_email|is_unique[' . $val . ']', 'tOOL TIP', 'Please Enter Password'),
100
-            array(gettext('Address 1'), 'INPUT', array('name' => 'address_1', 'size' => '15',  'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
101
-            array(gettext('Address 2'), 'INPUT', array('name' => 'address_2', 'size' => '15',  'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
102
-            array(gettext('City'), 'INPUT', array('name' => 'city', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
103
-            array(gettext('Province/State'), 'INPUT', array('name' => 'province', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
104
-            array(gettext('Zip/Postal Code'), 'INPUT', array('name' => 'postal_code', 'size' => '15', 'class' => "text field medium"), 'trim|xss_clean', 'tOOL TIP', 'Please Enter Password'),
105
-            array(gettext('Country'), array('name' => 'country_id', 'class' => 'country_id'), 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'country', 'countrycode', 'build_dropdown', '', ''),
106
-            array(gettext('Timezone'), array('name' => 'timezone_id', 'class' => 'timezone_id'), 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'gmtzone', 'timezone', 'build_dropdown', '', '')
107
-        );
108
-        $form['button_save'] = array('name' => 'action', 'content' => gettext('Save'), 'value' => 'save', 'type' => 'submit', 'class' => 'btn btn-line-parrot');
90
+			array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''),
91
+			array('', 'HIDDEN', array('name' => 'type', 'value' => '0'), '', '', ''),
92
+			array(gettext('Account Number'), 'INPUT', array('name' => 'number', 'value' => $uname, 'size' => '20', 'readonly' => true,  'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'),
93
+			$pin,
94
+			array(gettext('Company'), 'INPUT', array('name' => 'company_name', 'size' => '15', 'class' => 'text field medium'), 'trim|xss_clean', 'tOOL TIP', ''),
95
+			array(gettext('First Name'), 'INPUT', array('name' => 'first_name', 'id' => 'first_name', 'size' => '15',  'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter account number'),
96
+			array(gettext('Last Name'), 'INPUT', array('name' => 'last_name', 'size' => '15',  'class' => "text field medium"), 'trim|alpha_dash|xss_clean', 'tOOL TIP', 'Please Enter Password'),
97
+			array(gettext('Telephone 1'), 'INPUT', array('name' => 'telephone_1', 'size' => '15',  'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
98
+			array(gettext('Telephone 2'), 'INPUT', array('name' => 'telephone_2', 'size' => '15',  'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
99
+			array(gettext('Email'), 'INPUT', array('name' => 'email', 'size' => '50',  'class' => "text field medium"), 'required|valid_email|is_unique[' . $val . ']', 'tOOL TIP', 'Please Enter Password'),
100
+			array(gettext('Address 1'), 'INPUT', array('name' => 'address_1', 'size' => '15',  'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
101
+			array(gettext('Address 2'), 'INPUT', array('name' => 'address_2', 'size' => '15',  'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
102
+			array(gettext('City'), 'INPUT', array('name' => 'city', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
103
+			array(gettext('Province/State'), 'INPUT', array('name' => 'province', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
104
+			array(gettext('Zip/Postal Code'), 'INPUT', array('name' => 'postal_code', 'size' => '15', 'class' => "text field medium"), 'trim|xss_clean', 'tOOL TIP', 'Please Enter Password'),
105
+			array(gettext('Country'), array('name' => 'country_id', 'class' => 'country_id'), 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'country', 'countrycode', 'build_dropdown', '', ''),
106
+			array(gettext('Timezone'), array('name' => 'timezone_id', 'class' => 'timezone_id'), 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'gmtzone', 'timezone', 'build_dropdown', '', '')
107
+		);
108
+		$form['button_save'] = array('name' => 'action', 'content' => gettext('Save'), 'value' => 'save', 'type' => 'submit', 'class' => 'btn btn-line-parrot');
109 109
 
110
-        return $form;
111
-    }
110
+		return $form;
111
+	}
112 112
   
113
-     function get_userprofile_change_password() {
114
-        $form['forms'] = array(base_url() . 'user/user_change_password/', array("id" => "customer_alert_threshold", "name" => "user_change_password"));
115
-        $form[gettext('Change Password')] = array(
116
-            array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''),
117
-            array(gettext('Old Password'), 'INPUT', array('name' => 'password', 'size' => '20', 'class' => "text field medium", 'id' => 'new_password'), 'required|password_check[accounts]', 'tOOL TIP', '', ''),
118
-            array(gettext('New Password'), 'INPUT', array('name' => 'new_password', 'size' => '20', 'class' => "text field medium", 'id' => 'new_password'), 'required|', 'tOOL TIP', '', ''),
119
-            array(gettext('Confirm Password'), 'INPUT', array('name' => 'new_confirm_password', 'size' => '20',  'class' => "text field medium", 'id' => 'password'), "required|matches[new_password]", 'tOOL TIP', '', ''),
120
-        );
121
-        $form['button_save'] = array('name' => 'action', 'content' => gettext('Save'), 'value' => 'save', 'type' => 'submit', 'class' => 'btn btn-line-parrot');
122
-        return $form;
123
-    }
113
+	 function get_userprofile_change_password() {
114
+		$form['forms'] = array(base_url() . 'user/user_change_password/', array("id" => "customer_alert_threshold", "name" => "user_change_password"));
115
+		$form[gettext('Change Password')] = array(
116
+			array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''),
117
+			array(gettext('Old Password'), 'INPUT', array('name' => 'password', 'size' => '20', 'class' => "text field medium", 'id' => 'new_password'), 'required|password_check[accounts]', 'tOOL TIP', '', ''),
118
+			array(gettext('New Password'), 'INPUT', array('name' => 'new_password', 'size' => '20', 'class' => "text field medium", 'id' => 'new_password'), 'required|', 'tOOL TIP', '', ''),
119
+			array(gettext('Confirm Password'), 'INPUT', array('name' => 'new_confirm_password', 'size' => '20',  'class' => "text field medium", 'id' => 'password'), "required|matches[new_password]", 'tOOL TIP', '', ''),
120
+		);
121
+		$form['button_save'] = array('name' => 'action', 'content' => gettext('Save'), 'value' => 'save', 'type' => 'submit', 'class' => 'btn btn-line-parrot');
122
+		return $form;
123
+	}
124 124
 
125
-    function build_user_invoices(){
126
-      $account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
127
-      $currency_id=$account_info['currency_id'];
128
-      $currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id);
129
-      $url=($this->CI->session->userdata('logintype')==0 )?"/user/user_invoice_download/":'/invoices/invoice_main_download/';
130
-      $grid_field_arr  = json_encode(array(
131
-          array(gettext("Number"),"110","id","id,'',type","invoices","build_concat_string","","true","center"),
132
-          array(gettext("Type"),"100","id","id,'',type","invoices","build_concat_string","","true","center"),
133
-          array(gettext("Generated Date"),"110","invoice_date","invoice_date","","get_invoice_date","","true","center"),
125
+	function build_user_invoices(){
126
+	  $account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
127
+	  $currency_id=$account_info['currency_id'];
128
+	  $currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id);
129
+	  $url=($this->CI->session->userdata('logintype')==0 )?"/user/user_invoice_download/":'/invoices/invoice_main_download/';
130
+	  $grid_field_arr  = json_encode(array(
131
+		  array(gettext("Number"),"110","id","id,'',type","invoices","build_concat_string","","true","center"),
132
+		  array(gettext("Type"),"100","id","id,'',type","invoices","build_concat_string","","true","center"),
133
+		  array(gettext("Generated Date"),"110","invoice_date","invoice_date","","get_invoice_date","","true","center"),
134 134
 		  array(gettext("From Date"),"100","from_date","from_date","","get_from_date","","true","center"),
135 135
 		  array(gettext("Due Date"),"100","","","","","","true","center"),
136 136
 		  array(gettext("Last Pay Date"),"100","","","","","","true","center"),
137 137
 		  array(gettext("Amount")."($currency)","100","id","id","id","get_invoice_total","","true","right"),
138 138
 		  array(gettext("Outstanding Amount")."<br>($currency)","150","","","","","","true","right"),
139
-          array(gettext("Action"),"140","","","",array(
140
-		     "DOWNLOAD"=>array("url"=>$url,"mode"=>"single"),
139
+		  array(gettext("Action"),"140","","","",array(
140
+			 "DOWNLOAD"=>array("url"=>$url,"mode"=>"single"),
141 141
 		))
142 142
 	));
143
-      return $grid_field_arr;
144
-    }
145
-    function build_user_invoices_search()
146
-    {
147
-        $form['forms'] = array("",array('id'=>"user_invoice_search"));
148
-        $form['Search'] = array(
149
-	    array(gettext('From Date'), 'INPUT', array('name' => 'from_date[0]','id'=>'invoice_from_date','size' => '20', 'class' => "text field"), '', 'tOOL TIP', '', 'from_date[from_date-date]'),
150
-	    array(gettext('To Date'), 'INPUT', array('name' => 'to_date[1]','id'=>'invoice_to_date','size' => '20', 'class' => "text field"), '', 'tOOL TIP', '', 'to_date[to_date-date]'),
151
-	    array(gettext('Amount'), 'INPUT', array('name' => 'amount[amount]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'amount[amount-string]', '', '', '', 'search_string_type', ''),
152
-	    array(gettext('Generated Date'), 'INPUT', array('name' => 'invoice_date[0]','','size' => '20', 'class' => "text field",'id'=>'invoice_date'), '', 'tOOL TIP', '', 'invoice_date[invoice_date-date]'),	
153
-	    array('', 'HIDDEN', 'ajax_search','1', '', '', ''),    
154
-        array('', 'HIDDEN', 'advance_search','1', '', '', ''));
155
-        $form['button_search'] = array('name' => 'action', 'id'=>"user_invoice_search_btn",'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right');
156
-        $form['button_reset'] = array('name' => 'action','id'=>"id_reset", 'content' => gettext('Clear'), 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10');
157
-        return $form;
158
-    }
159
-    function build_user_charge_history() {
143
+	  return $grid_field_arr;
144
+	}
145
+	function build_user_invoices_search()
146
+	{
147
+		$form['forms'] = array("",array('id'=>"user_invoice_search"));
148
+		$form['Search'] = array(
149
+		array(gettext('From Date'), 'INPUT', array('name' => 'from_date[0]','id'=>'invoice_from_date','size' => '20', 'class' => "text field"), '', 'tOOL TIP', '', 'from_date[from_date-date]'),
150
+		array(gettext('To Date'), 'INPUT', array('name' => 'to_date[1]','id'=>'invoice_to_date','size' => '20', 'class' => "text field"), '', 'tOOL TIP', '', 'to_date[to_date-date]'),
151
+		array(gettext('Amount'), 'INPUT', array('name' => 'amount[amount]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'amount[amount-string]', '', '', '', 'search_string_type', ''),
152
+		array(gettext('Generated Date'), 'INPUT', array('name' => 'invoice_date[0]','','size' => '20', 'class' => "text field",'id'=>'invoice_date'), '', 'tOOL TIP', '', 'invoice_date[invoice_date-date]'),	
153
+		array('', 'HIDDEN', 'ajax_search','1', '', '', ''),    
154
+		array('', 'HIDDEN', 'advance_search','1', '', '', ''));
155
+		$form['button_search'] = array('name' => 'action', 'id'=>"user_invoice_search_btn",'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right');
156
+		$form['button_reset'] = array('name' => 'action','id'=>"id_reset", 'content' => gettext('Clear'), 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10');
157
+		return $form;
158
+	}
159
+	function build_user_charge_history() {
160 160
 	$account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
161 161
 	$currency_id=$account_info['currency_id'];
162 162
 	$currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id);
163
-        $grid_field_arr = json_encode(array(
164
-            array(gettext("Created Date"), "140", "created_date", "", "", ""),
165
-            array(gettext("Invoice Number"), "120", "created_date", "", "", "","","true","center"),
166
-            array(gettext("Charge Type"), "100", "item_type", "", "", ""),
167
-            array(gettext("Before Balance")."<br/>($currency)", "120", "before_balance", "before_balance", "before_balance", "convert_to_currency","","true","right"),
168
-            array(gettext("Debit")."<br/>($currency)", "120", "debit", "debit", "debit", "convert_to_currency","","true","right"),
169
-            array(gettext("Credit")."<br/>($currency)", "120", "credit", "credit", "credit", "convert_to_currency","","true","right"),
170
-            array(gettext("After Balance")."<br/>($currency)", "120", "after_balance", "after_balance", "after_balance", "convert_to_currency","","true","right"),
171
-            array(gettext("Description"), "180", "description", "", "", ""),
172
-                ));
173
-        return $grid_field_arr;
174
-    }
175
-    function build_user_charge_history_search() {
176
-        $form['forms'] = array("", array('id' => "user_charge_history_search"));
177
-        $form['Search'] = array(
178
-            array(gettext('From Date'), 'INPUT', array('name' => 'created_date[]', 'id' => 'charge_from_date', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '', 'start_date[start_date-date]'),
179
-            array(gettext('To Date'), 'INPUT', array('name' => 'created_date[]', 'id' => 'charge_to_date', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '', 'end_date[end_date-date]'),
163
+		$grid_field_arr = json_encode(array(
164
+			array(gettext("Created Date"), "140", "created_date", "", "", ""),
165
+			array(gettext("Invoice Number"), "120", "created_date", "", "", "","","true","center"),
166
+			array(gettext("Charge Type"), "100", "item_type", "", "", ""),
167
+			array(gettext("Before Balance")."<br/>($currency)", "120", "before_balance", "before_balance", "before_balance", "convert_to_currency","","true","right"),
168
+			array(gettext("Debit")."<br/>($currency)", "120", "debit", "debit", "debit", "convert_to_currency","","true","right"),
169
+			array(gettext("Credit")."<br/>($currency)", "120", "credit", "credit", "credit", "convert_to_currency","","true","right"),
170
+			array(gettext("After Balance")."<br/>($currency)", "120", "after_balance", "after_balance", "after_balance", "convert_to_currency","","true","right"),
171
+			array(gettext("Description"), "180", "description", "", "", ""),
172
+				));
173
+		return $grid_field_arr;
174
+	}
175
+	function build_user_charge_history_search() {
176
+		$form['forms'] = array("", array('id' => "user_charge_history_search"));
177
+		$form['Search'] = array(
178
+			array(gettext('From Date'), 'INPUT', array('name' => 'created_date[]', 'id' => 'charge_from_date', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '', 'start_date[start_date-date]'),
179
+			array(gettext('To Date'), 'INPUT', array('name' => 'created_date[]', 'id' => 'charge_to_date', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '', 'end_date[end_date-date]'),
180 180
 			array(gettext('Debit '), 'INPUT', array('name' => 'debit[debit]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'debit[debit-integer]', '', '', '', 'search_int_type', ''),
181 181
 			array(gettext('Credit '), 'INPUT', array('name' => 'credit[credit]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'credit[credit-integer]', '', '', '', 'search_int_type', ''),
182 182
 			array('', 'HIDDEN', 'ajax_search', '1', '', '', ''),    
183
-            array('', 'HIDDEN', 'advance_search', '1', '', '', '')
184
-        );
185
-        $form['button_search'] = array('name' => 'action', 'id' => "charges_search_btn", 'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right');
186
-        $form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => gettext('Clear'), 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10');
187
-        return $form;
188
-    }
183
+			array('', 'HIDDEN', 'advance_search', '1', '', '', '')
184
+		);
185
+		$form['button_search'] = array('name' => 'action', 'id' => "charges_search_btn", 'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right');
186
+		$form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => gettext('Clear'), 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10');
187
+		return $form;
188
+	}
189 189
     
190
-    function build_user_subscription(){
191
-         $account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
190
+	function build_user_subscription(){
191
+		 $account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
192 192
 		 $currency_id=$account_info['currency_id'];
193 193
 		 $currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id);
194
-         $grid_field_arr = json_encode(array(
194
+		 $grid_field_arr = json_encode(array(
195 195
 			array(gettext("Name"), "335", "description", "", "", "","","true","center"),
196
-            array(gettext("Amount")."($currency)", "335", "charge", "charge", "charge", "convert_to_currency","","true","right"),
197
-            array(gettext("Billing Cycle"), "335", "sweep_id", "sweep", "sweeplist", "get_field_name","","true","center"),
198
-                ));
199
-        return $grid_field_arr;
200
-    }
196
+			array(gettext("Amount")."($currency)", "335", "charge", "charge", "charge", "convert_to_currency","","true","right"),
197
+			array(gettext("Billing Cycle"), "335", "sweep_id", "sweep", "sweeplist", "get_field_name","","true","center"),
198
+				));
199
+		return $grid_field_arr;
200
+	}
201 201
     
202
-    function build_user_subscription_search() {
203
-        $accountinfo = $this->CI->session->userdata("accountinfo");
204
-        $form['forms'] = array("", array('id' => "user_subscription_search"));
205
-        $form['Search'] = array(
206
-            array(gettext('Name'), 'INPUT', array('name' => 'description[description]', '', 'size' => '20', 'class' => "text field"), '', 'tOOL TIP', '1', 'description[description-string]', '', '', '', 'search_string_type', ''),
207
-            array(gettext('Amount'), 'INPUT', array('name' => 'charge[charge]', 'value' => '', 'size' => '20', 'class' => "text field"), '', 'Tool tips info', '1', 'charge[charge-integer]', '', '', '', 'search_int_type', ''),
208
-            array(gettext('Bill Cycle'), 'sweep_id', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'sweep', 'sweeplist', 'build_dropdown', '', ''), 
202
+	function build_user_subscription_search() {
203
+		$accountinfo = $this->CI->session->userdata("accountinfo");
204
+		$form['forms'] = array("", array('id' => "user_subscription_search"));
205
+		$form['Search'] = array(
206
+			array(gettext('Name'), 'INPUT', array('name' => 'description[description]', '', 'size' => '20', 'class' => "text field"), '', 'tOOL TIP', '1', 'description[description-string]', '', '', '', 'search_string_type', ''),
207
+			array(gettext('Amount'), 'INPUT', array('name' => 'charge[charge]', 'value' => '', 'size' => '20', 'class' => "text field"), '', 'Tool tips info', '1', 'charge[charge-integer]', '', '', '', 'search_int_type', ''),
208
+			array(gettext('Bill Cycle'), 'sweep_id', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'sweep', 'sweeplist', 'build_dropdown', '', ''), 
209 209
 			array('', 'HIDDEN', 'ajax_search', '1', '', '', ''),
210
-            array('', 'HIDDEN', 'advance_search', '1', '', '', '')
211
-        );
212
-        $form['button_search'] = array('name' => 'action', 'id' => "user_subscriptions_button", 'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right');
213
-        $form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => gettext('Clear'), 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10');
210
+			array('', 'HIDDEN', 'advance_search', '1', '', '', '')
211
+		);
212
+		$form['button_search'] = array('name' => 'action', 'id' => "user_subscriptions_button", 'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right');
213
+		$form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => gettext('Clear'), 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10');
214 214
 
215
-        return $form;
216
-    }
215
+		return $form;
216
+	}
217 217
     
218
-    function build_user_didlist() {
219
-        $account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
218
+	function build_user_didlist() {
219
+		$account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
220 220
 		$currency_id=$account_info['currency_id'];
221 221
 		$currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id);
222
-        $grid_field_arr = json_encode(array(
222
+		$grid_field_arr = json_encode(array(
223 223
 			array(gettext("DID"), "105", "number", "", "", "","","true","center"),
224 224
 			array(gettext("Country"), "90", "country_id", "country", "countrycode", "get_field_name","","true","center"),
225 225
 			array(gettext("Per Minute<br/>Cost")."($currency)", "90", "cost", "cost", "cost", "convert_to_currency","","true","right"),
226 226
 			array(gettext("Initial<br/>Increment"), "100", "init_inc", "", "", "","","true","center"),
227
-            array(gettext("Increment"), "100", "inc", "", "", "","","true","center"),
228
-            array(gettext("Setup<br/>Fee")."($currency)", "100", "setup", "setup", "setup", "convert_to_currency","","true","right"),
229
-            array(gettext("Monthly<br/>Fee")."($currency)", "100", "monthlycost", "monthlycost", "monthlycost", "convert_to_currency","","true","right"),
230
-            array(gettext("Call Type"), "105", "call_type", "call_type", "call_type", "get_call_type","","true","center"),
231
-            array(gettext("Destination"), "153", "extensions", "", "", "","","true","center"),
232
-            array(gettext("Status"), "90", "status", "status", "dids", "get_did_status","","true","center"),
233
-            array(gettext("Modified <br/>Date"), "100", "last_modified_date", "last_modified_date", "last_modified_date", "convert_GMT_to","","true","center"),
234
-            array(gettext("Action"), "80", "", "", "", array("EDIT" => array("url" => "/user/user_did_edit/", "mode" => "popup"),
235
-                    "DELETE" => array("url" => "/user/user_dids_action/delete/", "mode" => "single")))
236
-                ));
237
-        return $grid_field_arr;
238
-    }
227
+			array(gettext("Increment"), "100", "inc", "", "", "","","true","center"),
228
+			array(gettext("Setup<br/>Fee")."($currency)", "100", "setup", "setup", "setup", "convert_to_currency","","true","right"),
229
+			array(gettext("Monthly<br/>Fee")."($currency)", "100", "monthlycost", "monthlycost", "monthlycost", "convert_to_currency","","true","right"),
230
+			array(gettext("Call Type"), "105", "call_type", "call_type", "call_type", "get_call_type","","true","center"),
231
+			array(gettext("Destination"), "153", "extensions", "", "", "","","true","center"),
232
+			array(gettext("Status"), "90", "status", "status", "dids", "get_did_status","","true","center"),
233
+			array(gettext("Modified <br/>Date"), "100", "last_modified_date", "last_modified_date", "last_modified_date", "convert_GMT_to","","true","center"),
234
+			array(gettext("Action"), "80", "", "", "", array("EDIT" => array("url" => "/user/user_did_edit/", "mode" => "popup"),
235
+					"DELETE" => array("url" => "/user/user_dids_action/delete/", "mode" => "single")))
236
+				));
237
+		return $grid_field_arr;
238
+	}
239 239
     
240
-     function build_user_didlist_search() {
241
-             $form['forms'] = array("", array('id' => "user_did_search"));
242
-             $form['Search'] = array(
243
-            array(gettext('DID'), 'INPUT', array('name' => 'number[number]', '', 'size' => '20', 'class' => "text field"), '', 'tOOL TIP', '1', 'number[number-string]', '', '', '', 'search_string_type', ''),
244
-            array(gettext('Country'), 'country_id', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'country', 'countrycode', 'build_dropdown', '', ''),
245
-            array(gettext('Initial Increment'), 'INPUT', array('name' => 'init_inc[init_inc]', '', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '1', 'init_inc[init_inc-integer]', '', '', '', 'search_int_type', ''),
246
-            array(gettext('Call Type'), 'call_type', 'SELECT', '', '', 'tOOL TIP', '', '', '', '', 'set_call_type_search', '',''),
247
-            array(gettext('Destination'), 'INPUT', array('name' => 'extensions[extensions]', '', 'size' => '20', 'class' => "text field"), '', 'tOOL TIP', '1', 'extensions[extensions-string]', '', '', '', 'search_string_type', ''),
240
+	 function build_user_didlist_search() {
241
+			 $form['forms'] = array("", array('id' => "user_did_search"));
242
+			 $form['Search'] = array(
243
+			array(gettext('DID'), 'INPUT', array('name' => 'number[number]', '', 'size' => '20', 'class' => "text field"), '', 'tOOL TIP', '1', 'number[number-string]', '', '', '', 'search_string_type', ''),
244
+			array(gettext('Country'), 'country_id', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'country', 'countrycode', 'build_dropdown', '', ''),
245
+			array(gettext('Initial Increment'), 'INPUT', array('name' => 'init_inc[init_inc]', '', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '1', 'init_inc[init_inc-integer]', '', '', '', 'search_int_type', ''),
246
+			array(gettext('Call Type'), 'call_type', 'SELECT', '', '', 'tOOL TIP', '', '', '', '', 'set_call_type_search', '',''),
247
+			array(gettext('Destination'), 'INPUT', array('name' => 'extensions[extensions]', '', 'size' => '20', 'class' => "text field"), '', 'tOOL TIP', '1', 'extensions[extensions-string]', '', '', '', 'search_string_type', ''),
248 248
 	
249
-            array(gettext('Status'), 'status', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_search_status', '', ''),
250
-            array('', 'HIDDEN', 'ajax_search', '1', '', '', ''),array('', 'HIDDEN', 'advance_search', '1', '', '', '')
251
-          );
249
+			array(gettext('Status'), 'status', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_search_status', '', ''),
250
+			array('', 'HIDDEN', 'ajax_search', '1', '', '', ''),array('', 'HIDDEN', 'advance_search', '1', '', '', '')
251
+		  );
252 252
 
253
-        $form['button_search'] = array('name' => 'action', 'id' => "user_did_search_btn", 'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right');
254
-        $form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => gettext('Clear'), 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10');
253
+		$form['button_search'] = array('name' => 'action', 'id' => "user_did_search_btn", 'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right');
254
+		$form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => gettext('Clear'), 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10');
255 255
 
256
-        return $form;
257
-    }
256
+		return $form;
257
+	}
258 258
     
259
-    function build_user_ipmap() {
260
-        $grid_field_arr = json_encode(array(
261
-            array(gettext("Name"), "240", "name", "", "", "","","true","center"),
262
-            array(gettext("IP"), "240", "ip", "", "", "","","true","center"),
263
-            array(gettext("Prefix"), "220", "prefix", "", "", "","","true","center"),
264
-            array(gettext("Created Date"), "174", "created_date", "created_date", "created_date", "convert_GMT_to","","true","center"),
265
-            array(gettext("Action"), "150", "", "", "", array("DELETE" => array("url" => "user/user_ipmap_action/delete/", "mode" => "single")))
266
-                ));
267
-        return $grid_field_arr;
268
-    }
259
+	function build_user_ipmap() {
260
+		$grid_field_arr = json_encode(array(
261
+			array(gettext("Name"), "240", "name", "", "", "","","true","center"),
262
+			array(gettext("IP"), "240", "ip", "", "", "","","true","center"),
263
+			array(gettext("Prefix"), "220", "prefix", "", "", "","","true","center"),
264
+			array(gettext("Created Date"), "174", "created_date", "created_date", "created_date", "convert_GMT_to","","true","center"),
265
+			array(gettext("Action"), "150", "", "", "", array("DELETE" => array("url" => "user/user_ipmap_action/delete/", "mode" => "single")))
266
+				));
267
+		return $grid_field_arr;
268
+	}
269 269
     
270
-    function build_user_ipmap_search() {
271
-        $form['forms'] = array("", array('id' => "user_ipmap_search"));
272
-        $form['Search'] = array(
273
-             array(gettext('Name'), 'INPUT', array('name' => 'name[name]', '', 'size' => '20', 'class' => "text field"), '', 'tOOL TIP', '1', 'name[name-string]', '', '', '', 'search_string_type', ''),
274
-             array(gettext('IP'), 'INPUT', array('name' => 'ip[ip]', '', 'size' => '20', 'class' => "text field"), '', 'tOOL TIP', '1', 'ip[ip-string]', '', '', '', 'search_string_type', ''),    
275
-             array(gettext('Prefix'), 'INPUT', array('name' => 'prefix[prefix]', '', 'size' => '20', 'class' => "text field"), '', 'tOOL TIP', '1', 'prefix[prefix-string]', '', '', '', 'search_string_type', ''),
270
+	function build_user_ipmap_search() {
271
+		$form['forms'] = array("", array('id' => "user_ipmap_search"));
272
+		$form['Search'] = array(
273
+			 array(gettext('Name'), 'INPUT', array('name' => 'name[name]', '', 'size' => '20', 'class' => "text field"), '', 'tOOL TIP', '1', 'name[name-string]', '', '', '', 'search_string_type', ''),
274
+			 array(gettext('IP'), 'INPUT', array('name' => 'ip[ip]', '', 'size' => '20', 'class' => "text field"), '', 'tOOL TIP', '1', 'ip[ip-string]', '', '', '', 'search_string_type', ''),    
275
+			 array(gettext('Prefix'), 'INPUT', array('name' => 'prefix[prefix]', '', 'size' => '20', 'class' => "text field"), '', 'tOOL TIP', '1', 'prefix[prefix-string]', '', '', '', 'search_string_type', ''),
276 276
 			 array('', 'HIDDEN', 'ajax_search', '1', '', '', ''),
277
-             array('', 'HIDDEN', 'advance_search', '1', '', '', '')
278
-        );
279
-        $form['button_search'] = array('name' => 'action', 'id' => "user_ipmap_search_btn", 'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right');
277
+			 array('', 'HIDDEN', 'advance_search', '1', '', '', '')
278
+		);
279
+		$form['button_search'] = array('name' => 'action', 'id' => "user_ipmap_search_btn", 'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right');
280 280
 		$form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => gettext('Clear'), 'value' => 'cancel', 'type' => 'reset', 'class' => "btn btn-line-sky pull-right margin-x-10");
281
-        return $form;
282
-    }
281
+		return $form;
282
+	}
283 283
     
284
-    function build_user_sipdevices(){
285
-        $grid_field_arr = json_encode(array(
286
-	    array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "", "", "","","false","center"),
287
-            array(gettext("User Name"), "105", "username", "", "", "","","true","center"),
288
-            array(gettext("Password"), "105", "password", "", "", "","","true","center"),
289
-            array(gettext("Caller Name"), "110", "effective_caller_id_name", "", "", "","","true","center"),
290
-            array(gettext("Caller Number"), "110", "effective_caller_id_number", "", "", "","","true","center"),      
291
-            array(gettext("Status"), "125", "status", "", "", "","","true","center"),
292
-            array(gettext("Created Date"), "110", "creation_date", "creation_date", "creation_date", "convert_GMT_to","","true","center"),
293
-            array(gettext("Modified Date"), "130", "last_modified_date", "last_modified_date", "last_modified_date", "convert_GMT_to","","true","center"),
294
-            array(gettext("Voicemail"), "90", "voicemail_enabled", "", "", "","","true","center"),
295
-            array(gettext("Action"), "110", "", "", "", array("EDIT" => array("url" => "/accounts/fssipdevices_action/edit/", "mode" => "single","layout"=>"medium"),
296
-                    "DELETE" => array("url" => "/accounts/fssipdevices_action/delete/", "mode" => "single")))
297
-                ));
298
-        return $grid_field_arr;
299
-    }
284
+	function build_user_sipdevices(){
285
+		$grid_field_arr = json_encode(array(
286
+		array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "", "", "","","false","center"),
287
+			array(gettext("User Name"), "105", "username", "", "", "","","true","center"),
288
+			array(gettext("Password"), "105", "password", "", "", "","","true","center"),
289
+			array(gettext("Caller Name"), "110", "effective_caller_id_name", "", "", "","","true","center"),
290
+			array(gettext("Caller Number"), "110", "effective_caller_id_number", "", "", "","","true","center"),      
291
+			array(gettext("Status"), "125", "status", "", "", "","","true","center"),
292
+			array(gettext("Created Date"), "110", "creation_date", "creation_date", "creation_date", "convert_GMT_to","","true","center"),
293
+			array(gettext("Modified Date"), "130", "last_modified_date", "last_modified_date", "last_modified_date", "convert_GMT_to","","true","center"),
294
+			array(gettext("Voicemail"), "90", "voicemail_enabled", "", "", "","","true","center"),
295
+			array(gettext("Action"), "110", "", "", "", array("EDIT" => array("url" => "/accounts/fssipdevices_action/edit/", "mode" => "single","layout"=>"medium"),
296
+					"DELETE" => array("url" => "/accounts/fssipdevices_action/delete/", "mode" => "single")))
297
+				));
298
+		return $grid_field_arr;
299
+	}
300 300
     
301
-    function build_user_sipdevices_search(){
302
-        $form['forms'] = array("", array('id' => "user_sipdevices_search"));
303
-        $form['Search'] = array(
304
-            array(gettext('Username'), 'INPUT', array('name' => 'username[username]', '', 'size' => '20',  'class' => "text field"), '', 'tOOL TIP', '1', 'username[username-string]', '', '', '', 'search_string_type', ''), 
301
+	function build_user_sipdevices_search(){
302
+		$form['forms'] = array("", array('id' => "user_sipdevices_search"));
303
+		$form['Search'] = array(
304
+			array(gettext('Username'), 'INPUT', array('name' => 'username[username]', '', 'size' => '20',  'class' => "text field"), '', 'tOOL TIP', '1', 'username[username-string]', '', '', '', 'search_string_type', ''), 
305 305
 			array('', 'HIDDEN', 'ajax_search', '1', '', '', ''),
306
-            array('', 'HIDDEN', 'advance_search', '1', '', '', ''),
307
-        );
308
-        $form['button_search'] = array('name' => 'action', 'id' => "user_sipdevices_search_btn", 'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right');
309
-        $form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => gettext('Clear'), 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10');
310
-        return $form;
311
-    }
306
+			array('', 'HIDDEN', 'advance_search', '1', '', '', ''),
307
+		);
308
+		$form['button_search'] = array('name' => 'action', 'id' => "user_sipdevices_search_btn", 'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right');
309
+		$form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => gettext('Clear'), 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10');
310
+		return $form;
311
+	}
312 312
     
313
-    function build_user_sipdevices_form($id=''){
313
+	function build_user_sipdevices_form($id=''){
314 314
 	$val=$id > 0 ? 'sip_devices.username.'.$id : 'sip_devices.username'; 
315 315
 	$uname_user = $this->CI->common->find_uniq_rendno('10', '', '');
316
-        $password = $this->CI->common->generate_password();
317
-        $form['forms'] = array(base_url() . 'user/user_sipdevices_save/', array("id" => "user_sipdevices_form", "name" => "user_sipdevices_form"));
318
-        $form[gettext('Device Information')] = array(
319
-            array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''),
320
-            array(gettext('Username'), 'INPUT', array('name' => 'fs_username', 'size' => '20', 'value'=>$uname_user,'id'=>'username', 'class' => "text field medium"), 'trim|required|is_unique['.$val.']|xss_clean', 'tOOL TIP', 'Please Enter account number','<i style="color: #1BCB61;font-size: 14px;padding-left: 5px;padding-top: 8px;float: left;" title="Reset Password" class="change_number  fa fa-refresh"></i>'),
321
-            array(gettext('Password'), 'INPUT', array('name' => 'fs_password', 'size' => '20', 'value'=>$password ,'id'=>'password','class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter Password','<i style="color: #1BCB61;font-size: 14px;padding-left: 5px;padding-top: 8px;float: left;" title="Reset Password" class="change_pass fa fa-refresh"></i>'),
322
-            array(gettext('Caller Name'), 'INPUT', array('name' => 'effective_caller_id_name', 'size' => '20',  'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'),
323
-            array(gettext('Caller Number'), 'INPUT', array('name' => 'effective_caller_id_number', 'size' => '20',  'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'),
324
-            array(gettext('Status'), 'status', 'SELECT', '', '', 'tOOL TIP', 'Please Select Status', '', '', '', 'set_status'),
325
-        );
316
+		$password = $this->CI->common->generate_password();
317
+		$form['forms'] = array(base_url() . 'user/user_sipdevices_save/', array("id" => "user_sipdevices_form", "name" => "user_sipdevices_form"));
318
+		$form[gettext('Device Information')] = array(
319
+			array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''),
320
+			array(gettext('Username'), 'INPUT', array('name' => 'fs_username', 'size' => '20', 'value'=>$uname_user,'id'=>'username', 'class' => "text field medium"), 'trim|required|is_unique['.$val.']|xss_clean', 'tOOL TIP', 'Please Enter account number','<i style="color: #1BCB61;font-size: 14px;padding-left: 5px;padding-top: 8px;float: left;" title="Reset Password" class="change_number  fa fa-refresh"></i>'),
321
+			array(gettext('Password'), 'INPUT', array('name' => 'fs_password', 'size' => '20', 'value'=>$password ,'id'=>'password','class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter Password','<i style="color: #1BCB61;font-size: 14px;padding-left: 5px;padding-top: 8px;float: left;" title="Reset Password" class="change_pass fa fa-refresh"></i>'),
322
+			array(gettext('Caller Name'), 'INPUT', array('name' => 'effective_caller_id_name', 'size' => '20',  'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'),
323
+			array(gettext('Caller Number'), 'INPUT', array('name' => 'effective_caller_id_number', 'size' => '20',  'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'),
324
+			array(gettext('Status'), 'status', 'SELECT', '', '', 'tOOL TIP', 'Please Select Status', '', '', '', 'set_status'),
325
+		);
326 326
 
327
-        $form[gettext('Voicemail Options')] = array(
328
-            array(gettext('Enable'), 'voicemail_enabled', 'SELECT', '', '', 'tOOL TIP', 'Please Select Status', '', '', '', 'set_sip_config_option'),
329
-	    array(gettext('Password'), 'INPUT', array('name' => 'voicemail_password', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'),
330
-	    array(gettext('Mail To'), 'INPUT', array('name' => 'voicemail_mail_to', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'),
331
-            array(gettext('Attach File'), 'voicemail_attach_file', 'SELECT', '', '', 'tOOL TIP', 'Please Select Status', '', '', '', 'set_sip_config_option'),
332
-            array(gettext('Local After Email'), 'vm_keep_local_after_email', 'SELECT', '', '', 'tOOL TIP', 'Please Select Status', '', '', '', 'set_sip_config_option'),
333
-            array(gettext('Send all Message'), 'vm_send_all_message', 'SELECT', '', '', 'tOOL TIP', 'Please Select Status', '', '', '', 'set_sip_config_option'),
327
+		$form[gettext('Voicemail Options')] = array(
328
+			array(gettext('Enable'), 'voicemail_enabled', 'SELECT', '', '', 'tOOL TIP', 'Please Select Status', '', '', '', 'set_sip_config_option'),
329
+		array(gettext('Password'), 'INPUT', array('name' => 'voicemail_password', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'),
330
+		array(gettext('Mail To'), 'INPUT', array('name' => 'voicemail_mail_to', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'),
331
+			array(gettext('Attach File'), 'voicemail_attach_file', 'SELECT', '', '', 'tOOL TIP', 'Please Select Status', '', '', '', 'set_sip_config_option'),
332
+			array(gettext('Local After Email'), 'vm_keep_local_after_email', 'SELECT', '', '', 'tOOL TIP', 'Please Select Status', '', '', '', 'set_sip_config_option'),
333
+			array(gettext('Send all Message'), 'vm_send_all_message', 'SELECT', '', '', 'tOOL TIP', 'Please Select Status', '', '', '', 'set_sip_config_option'),
334 334
 
335
-        );
336
-        $form['button_cancel'] = array('name' => 'action', 'content' => 'Close', 'value' => 'cancel', 'type' => 'button', 'class' => 'btn btn-line-sky margin-x-10', 'onclick' => 'return redirect_page(\'NULL\')');
337
-        $form['button_save'] = array('name' => 'action', 'content' => 'Save', 'value' => 'save', 'id' => 'submit', 'type' => 'button', 'class' => 'btn btn-line-parrot');
338
-        return $form;
339
-    }
335
+		);
336
+		$form['button_cancel'] = array('name' => 'action', 'content' => 'Close', 'value' => 'cancel', 'type' => 'button', 'class' => 'btn btn-line-sky margin-x-10', 'onclick' => 'return redirect_page(\'NULL\')');
337
+		$form['button_save'] = array('name' => 'action', 'content' => 'Save', 'value' => 'save', 'id' => 'submit', 'type' => 'button', 'class' => 'btn btn-line-parrot');
338
+		return $form;
339
+	}
340 340
     
341
-    function build_user_animap() {
342
-        $grid_field_arr = json_encode(array(array(gettext("Caller ID"), "735", "number", "", "", "","","true","center"),
343
-            array(gettext("Action"), "275", "", "", "", array("DELETE" => array("url" => "user/user_animap_action/delete/", "mode" => "single")))
344
-                ));
345
-        return $grid_field_arr;
346
-    }
341
+	function build_user_animap() {
342
+		$grid_field_arr = json_encode(array(array(gettext("Caller ID"), "735", "number", "", "", "","","true","center"),
343
+			array(gettext("Action"), "275", "", "", "", array("DELETE" => array("url" => "user/user_animap_action/delete/", "mode" => "single")))
344
+				));
345
+		return $grid_field_arr;
346
+	}
347 347
     
348
-    function user_rates_list_buttons() {
349
-        $buttons_json = json_encode(array(
350
-            array(gettext("Export CSV"),"btn btn-xing" ,"fa fa-download fa-lg", "button_action", "/user/user_rates_list_export/", 'single')
351
-        ));
352
-        return $buttons_json;
353
-    }
348
+	function user_rates_list_buttons() {
349
+		$buttons_json = json_encode(array(
350
+			array(gettext("Export CSV"),"btn btn-xing" ,"fa fa-download fa-lg", "button_action", "/user/user_rates_list_export/", 'single')
351
+		));
352
+		return $buttons_json;
353
+	}
354 354
     
355
-    function user_rates_list() {
356
-         $account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
357
-         $currency_id=$account_info['currency_id'];
358
-         $currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id);
359
-         $grid_field_arr = json_encode(array(array(gettext("Code"), "155", "pattern", "pattern", "", "get_only_numeric_val","","true","center"),
360
-	      array(gettext("Destination"), "200", "comment", "", "", "","","true","center"),
361
-	      array(gettext("Connect Cost")."($currency)", "200", "connectcost", "", "", "","","true","right"),
362
-	      array(gettext("Included Seconds"), "200", "includedseconds", "", "", "","","true","center"),
363
-	      array(gettext("Per Minute Cost")."($currency)", "200", "cost", "", "", "","","true","right"),
364
-	      array(gettext("Initial Increment"), "130", "init_inc", "", "", "","","true","center"),
365
-	      array(gettext("Increment"), "180", "inc", "", "", "","","true","center")
355
+	function user_rates_list() {
356
+		 $account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
357
+		 $currency_id=$account_info['currency_id'];
358
+		 $currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id);
359
+		 $grid_field_arr = json_encode(array(array(gettext("Code"), "155", "pattern", "pattern", "", "get_only_numeric_val","","true","center"),
360
+		  array(gettext("Destination"), "200", "comment", "", "", "","","true","center"),
361
+		  array(gettext("Connect Cost")."($currency)", "200", "connectcost", "", "", "","","true","right"),
362
+		  array(gettext("Included Seconds"), "200", "includedseconds", "", "", "","","true","center"),
363
+		  array(gettext("Per Minute Cost")."($currency)", "200", "cost", "", "", "","","true","right"),
364
+		  array(gettext("Initial Increment"), "130", "init_inc", "", "", "","","true","center"),
365
+		  array(gettext("Increment"), "180", "inc", "", "", "","","true","center")
366 366
 	));
367
-        return $grid_field_arr;
368
-    }
367
+		return $grid_field_arr;
368
+	}
369 369
     
370
-    function user_rates_list_search() {
371
-        $form['forms'] = array("", array('id' => "user_rates_list_search"));
372
-        $form['Search'] = array(
370
+	function user_rates_list_search() {
371
+		$form['forms'] = array("", array('id' => "user_rates_list_search"));
372
+		$form['Search'] = array(
373 373
 			array(gettext('Code'), 'INPUT', array('name' => 'pattern[pattern]', '', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '1', 'pattern[pattern-string]', '', '', '', 'search_int_type', ''),
374 374
 			array(gettext('Destination'), 'INPUT', array('name' => 'comment[comment]', '', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '1', 'comment[comment-string]', '', '', '', 'search_string_type', ''),
375 375
 			array(gettext('Connect Cost'), 'INPUT', array('name' => 'connectcost[connectcost]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'connectcost[connectcost-integer]', '', '', '', 'search_int_type', ''),
@@ -377,241 +377,241 @@  discard block
 block discarded – undo
377 377
 			array(gettext('Per Minute Cost'), 'INPUT', array('name' => 'cost[cost]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'cost[cost-integer]', '', '', '', 'search_int_type', ''),
378 378
 			array(gettext('Initial Increment'), 'INPUT', array('name' => 'init_inc[init_inc]', '', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '1', 'init_inc[init_inc-integer]', '', '', '', 'search_int_type', ''),
379 379
 			array(gettext('Increment'), 'INPUT', array('name' => 'inc[inc]', '', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '1', 'inc[inc-integer]', '', '', '', 'search_int_type', ''),
380
-            array('', 'HIDDEN', 'ajax_search', '1', '', '', ''),
381
-            array('', 'HIDDEN', 'advance_search', '1', '', '', '') 
382
-        );
380
+			array('', 'HIDDEN', 'ajax_search', '1', '', '', ''),
381
+			array('', 'HIDDEN', 'advance_search', '1', '', '', '') 
382
+		);
383 383
 
384
-        $form['button_search'] = array('name' => 'action', 'id' => "user_rates_list_search_btn", 'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right');
385
-        $form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => gettext('Clear'), 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10');
384
+		$form['button_search'] = array('name' => 'action', 'id' => "user_rates_list_search_btn", 'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right');
385
+		$form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => gettext('Clear'), 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10');
386 386
 
387
-        return $form;
388
-    }
387
+		return $form;
388
+	}
389 389
     
390
-    function user_alert_threshold(){
391
-        $form['forms'] = array(base_url() . 'user/user_alert_threshold/', array("id" => "customer_alert_threshold", "name" => "customer_alert_threshold"));
392
-        $form[gettext('Low Balance Alert Email')] = array(
393
-            array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''),
394
-            array(gettext('Enable Email Alerts ?'), 'notify_flag', 'SELECT', '', '', 'tOOL TIP', '', '', '', '', 'custom_status'),
395
-            array(gettext('Low Balance Alert Level'), 'INPUT', array('name' => 'notify_credit_limit', 'size' => '20', 'class' => "text field medium"), 'valid_decimal', 'tOOL TIP', ''),
396
-            array(gettext('Email Address'), 'INPUT', array('name' => 'notify_email', 'size' => '50', 'class' => "text field medium"), 'valid_email', 'tOOL TIP', ''),
397
-        );
398
-        $form['button_save'] = array('name' => 'action', 'content' => gettext('Save'), 'value' => 'save', 'type' => 'submit', 'class' => 'btn btn-line-parrot');
399
-        return $form;
400
-    }
401
-    function build_cdrs_report($type) {
390
+	function user_alert_threshold(){
391
+		$form['forms'] = array(base_url() . 'user/user_alert_threshold/', array("id" => "customer_alert_threshold", "name" => "customer_alert_threshold"));
392
+		$form[gettext('Low Balance Alert Email')] = array(
393
+			array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''),
394
+			array(gettext('Enable Email Alerts ?'), 'notify_flag', 'SELECT', '', '', 'tOOL TIP', '', '', '', '', 'custom_status'),
395
+			array(gettext('Low Balance Alert Level'), 'INPUT', array('name' => 'notify_credit_limit', 'size' => '20', 'class' => "text field medium"), 'valid_decimal', 'tOOL TIP', ''),
396
+			array(gettext('Email Address'), 'INPUT', array('name' => 'notify_email', 'size' => '50', 'class' => "text field medium"), 'valid_email', 'tOOL TIP', ''),
397
+		);
398
+		$form['button_save'] = array('name' => 'action', 'content' => gettext('Save'), 'value' => 'save', 'type' => 'submit', 'class' => 'btn btn-line-parrot');
399
+		return $form;
400
+	}
401
+	function build_cdrs_report($type) {
402 402
 		$account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
403
-        $currency_id=$account_info['currency_id'];
404
-        $currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id);	
403
+		$currency_id=$account_info['currency_id'];
404
+		$currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id);	
405 405
         
406
-        if($type == '0' || $type =='1'){
407
-            $cost_array=array(gettext("Debit")."($currency)", "140", "debit", "debit", "debit", "convert_to_currency","","true","right");
408
-        }
409
-        if($type =='3'){
410
-            $cost_array=array(gettext("Debit")."($currency)", "140", "cost", "cost", "cost", "convert_to_currency","","true","right");
411
-        }
412
-        $grid_field_arr = json_encode(array(
406
+		if($type == '0' || $type =='1'){
407
+			$cost_array=array(gettext("Debit")."($currency)", "140", "debit", "debit", "debit", "convert_to_currency","","true","right");
408
+		}
409
+		if($type =='3'){
410
+			$cost_array=array(gettext("Debit")."($currency)", "140", "cost", "cost", "cost", "convert_to_currency","","true","right");
411
+		}
412
+		$grid_field_arr = json_encode(array(
413 413
 			array(gettext("Date"), "170", "callstart", "callstart", "callstart", "convert_GMT_to","","true","center"),
414
-            array(gettext("Caller ID"), "110", "callerid", "", "", "","","true","center"),
415
-            array(gettext("Called Number"), "160", "callednum", "", "", "","","true","center"),
416
-            array(gettext("Destination"), "160", "notes", "", "", "","","true","center"),
417
-            array(gettext("Duration"), "140", "billseconds", "user_cdrs_report_search", "billseconds", "convert_to_show_in","","true","center"),
418
-            $cost_array,
419
-            array(gettext("Disposition"), "160", "disposition", "", "", "","","true","center"),
420
-            array(gettext("Call Type"), "233", "calltype", "", "", "","","true","center"),
421
-                ));
422
-        return $grid_field_arr;
423
-    }
414
+			array(gettext("Caller ID"), "110", "callerid", "", "", "","","true","center"),
415
+			array(gettext("Called Number"), "160", "callednum", "", "", "","","true","center"),
416
+			array(gettext("Destination"), "160", "notes", "", "", "","","true","center"),
417
+			array(gettext("Duration"), "140", "billseconds", "user_cdrs_report_search", "billseconds", "convert_to_show_in","","true","center"),
418
+			$cost_array,
419
+			array(gettext("Disposition"), "160", "disposition", "", "", "","","true","center"),
420
+			array(gettext("Call Type"), "233", "calltype", "", "", "","","true","center"),
421
+				));
422
+		return $grid_field_arr;
423
+	}
424 424
     
425
-    function build_cdrs_report_search($type) {
426
-         if($type == '0' || $type =='1'){
427
-            $cost_array=array(gettext('Debit'), 'INPUT', array('name' => 'debit[debit]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'debit[debit-integer]', '', '', '', 'search_int_type', '');
428
-        }
429
-        if($type =='3'){
430
-            $cost_array=array(gettext('Debit'), 'INPUT', array('name' => 'cost[cost]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'cost[cost-integer]', '', '', '', 'search_int_type', '');
431
-        }
432
-        $form['forms'] = array("", array('id' => "user_cdrs_report_search"));
433
-        $form['Search'] = array(
434
-            array(gettext('From Date'), 'INPUT', array('name' => 'callstart[]', 'id' => 'customer_cdr_from_date', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '', 'start_date[start_date-date]'),
435
-            array(gettext('To Date'), 'INPUT', array('name' => 'callstart[]', 'id' => 'customer_cdr_to_date', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '', 'end_date[end_date-date]'),
436
-            array(gettext('Caller ID'), 'INPUT', array('name' => 'callerid[callerid]', '', 'id' => 'first_name', 'size' => '15', 'class' => "text field "), '', 'tOOL TIP', '1', 'callerid[callerid-string]', '', '', '', 'search_string_type', ''),
437
-            array(gettext('Called Number'), 'INPUT', array('name' => 'callednum[callednum]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'callednum[callednum-string]', '', '', '', 'search_string_type', ''),
438
-            array(gettext('Destination'), 'INPUT', array('name' => 'notes[notes]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'notes[notes-integer]', '', '', '', 'search_int_type', ''),
439
-            array(gettext('Duration'), 'INPUT', array('name' => 'billseconds[billseconds]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'billseconds[billseconds-integer]', '', '', '', 'search_int_type', ''),
440
-            $cost_array,
441
-            array(gettext('Disposition'), 'disposition', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_despostion'),
442
-            array(gettext('Call Type'), 'calltype', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_calltype'),
443
-            array('', 'HIDDEN', 'ajax_search', '1', '', '', ''),
444
-            array('', 'HIDDEN', 'advance_search', '1', '', '', '')       
445
-        );
425
+	function build_cdrs_report_search($type) {
426
+		 if($type == '0' || $type =='1'){
427
+			$cost_array=array(gettext('Debit'), 'INPUT', array('name' => 'debit[debit]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'debit[debit-integer]', '', '', '', 'search_int_type', '');
428
+		}
429
+		if($type =='3'){
430
+			$cost_array=array(gettext('Debit'), 'INPUT', array('name' => 'cost[cost]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'cost[cost-integer]', '', '', '', 'search_int_type', '');
431
+		}
432
+		$form['forms'] = array("", array('id' => "user_cdrs_report_search"));
433
+		$form['Search'] = array(
434
+			array(gettext('From Date'), 'INPUT', array('name' => 'callstart[]', 'id' => 'customer_cdr_from_date', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '', 'start_date[start_date-date]'),
435
+			array(gettext('To Date'), 'INPUT', array('name' => 'callstart[]', 'id' => 'customer_cdr_to_date', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '', 'end_date[end_date-date]'),
436
+			array(gettext('Caller ID'), 'INPUT', array('name' => 'callerid[callerid]', '', 'id' => 'first_name', 'size' => '15', 'class' => "text field "), '', 'tOOL TIP', '1', 'callerid[callerid-string]', '', '', '', 'search_string_type', ''),
437
+			array(gettext('Called Number'), 'INPUT', array('name' => 'callednum[callednum]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'callednum[callednum-string]', '', '', '', 'search_string_type', ''),
438
+			array(gettext('Destination'), 'INPUT', array('name' => 'notes[notes]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'notes[notes-integer]', '', '', '', 'search_int_type', ''),
439
+			array(gettext('Duration'), 'INPUT', array('name' => 'billseconds[billseconds]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'billseconds[billseconds-integer]', '', '', '', 'search_int_type', ''),
440
+			$cost_array,
441
+			array(gettext('Disposition'), 'disposition', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_despostion'),
442
+			array(gettext('Call Type'), 'calltype', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_calltype'),
443
+			array('', 'HIDDEN', 'ajax_search', '1', '', '', ''),
444
+			array('', 'HIDDEN', 'advance_search', '1', '', '', '')       
445
+		);
446 446
 		$form['display_in']=array('name' => 'search_in',"id"=>"search_in","function"=>"search_report_in", "content"=>gettext("Display records in"),'label_class' => "search_label col-md-3 no-padding","dropdown_class"=>"form-control","label_style"=>"font-size:13px;","dropdown_style"=>"background: #ddd; width: 21% !important;");
447
-	    $form['button_search'] = array('name' => 'action', 'id' => "user_cdr_search_btn", 'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right');
448
-        $form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => gettext('Clear'), 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10');
449
-        return $form;
450
-    }
451
-    function build_cdrs_report_buttons() {
452
-        $buttons_json = json_encode(array(array(gettext("Export"),"btn btn-xing" ," fa fa-download fa-lg", "button_action", "/user/user_report_export/", 'single')));
453
-        return $buttons_json;
454
-    }
447
+		$form['button_search'] = array('name' => 'action', 'id' => "user_cdr_search_btn", 'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right');
448
+		$form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => gettext('Clear'), 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10');
449
+		return $form;
450
+	}
451
+	function build_cdrs_report_buttons() {
452
+		$buttons_json = json_encode(array(array(gettext("Export"),"btn btn-xing" ," fa fa-download fa-lg", "button_action", "/user/user_report_export/", 'single')));
453
+		return $buttons_json;
454
+	}
455 455
     
456
-    function build_user_refill_report(){
456
+	function build_user_refill_report(){
457 457
 		$account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
458 458
 		$currency_id=$account_info['currency_id'];
459 459
 		$currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id);
460
-         $grid_field_arr = json_encode(array(
461
-            array(gettext("Date"), "220", "payment_date", "", "", "","","true","center"),
462
-            array(gettext("Amount")."($currency)", "220", "credit", "credit", "credit", "convert_to_currency","","true","right"),
463
-            array(gettext("Refill By"), "270", "payment_by", "payment_by", "payment_by", "get_refill_by","","true","center"),
464
-            array(gettext("Note"), "300", "notes", "", "", "","","true","center")
465
-                ));
466
-        return $grid_field_arr;
467
-    }
460
+		 $grid_field_arr = json_encode(array(
461
+			array(gettext("Date"), "220", "payment_date", "", "", "","","true","center"),
462
+			array(gettext("Amount")."($currency)", "220", "credit", "credit", "credit", "convert_to_currency","","true","right"),
463
+			array(gettext("Refill By"), "270", "payment_by", "payment_by", "payment_by", "get_refill_by","","true","center"),
464
+			array(gettext("Note"), "300", "notes", "", "", "","","true","center")
465
+				));
466
+		return $grid_field_arr;
467
+	}
468 468
     
469
-    function build_user_refill_report_search() {       
470
-        $form['forms'] = array("", array('id' => "user_refill_report_search"));
471
-        $form['Search'] = array(
472
-        array(gettext('From Date'), 'INPUT', array('name' => 'payment_date[]', 'id' => 'customer_cdr_from_date', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '', 'payment_date[payment_date-date]'),
473
-        array(gettext('To Date'), 'INPUT', array('name' => 'payment_date[]', 'id' => 'customer_cdr_to_date', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '', 'payment_date[payment_date-date]'),
474
-        array(gettext('Amount'), 'INPUT', array('name' => 'credit[credit]', 'value' => '', 'size' => '20', 'class' => "text field"), '', 'Tool tips info', '1', 'credit[credit-integer]', '', '', '', 'search_int_type', ''),
475
-        array('', 'HIDDEN', 'ajax_search', '1', '', '', ''),
476
-        array('', 'HIDDEN', 'advance_search', '1', '', '', ''));
469
+	function build_user_refill_report_search() {       
470
+		$form['forms'] = array("", array('id' => "user_refill_report_search"));
471
+		$form['Search'] = array(
472
+		array(gettext('From Date'), 'INPUT', array('name' => 'payment_date[]', 'id' => 'customer_cdr_from_date', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '', 'payment_date[payment_date-date]'),
473
+		array(gettext('To Date'), 'INPUT', array('name' => 'payment_date[]', 'id' => 'customer_cdr_to_date', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '', 'payment_date[payment_date-date]'),
474
+		array(gettext('Amount'), 'INPUT', array('name' => 'credit[credit]', 'value' => '', 'size' => '20', 'class' => "text field"), '', 'Tool tips info', '1', 'credit[credit-integer]', '', '', '', 'search_int_type', ''),
475
+		array('', 'HIDDEN', 'ajax_search', '1', '', '', ''),
476
+		array('', 'HIDDEN', 'advance_search', '1', '', '', ''));
477 477
 
478
-        $form['button_search'] = array('name' => 'action', 'id' => "user_refill_report_search_btn", 'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right');
479
-        $form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => gettext('Clear'), 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10');
480
-        return $form;
481
-    }
478
+		$form['button_search'] = array('name' => 'action', 'id' => "user_refill_report_search_btn", 'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right');
479
+		$form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => gettext('Clear'), 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10');
480
+		return $form;
481
+	}
482 482
 
483
-    function build_user_fund_transfer_form($number, $currency_id, $id) {
484
-        $form['forms'] = array(base_url() . 'user/user_fund_transfer_save/', array('id' => 'user_fund_transfer_form', 'method' => 'POST','class'=>'build_user_fund_transfer_frm' ,'name' => 'user_fund_transfer_form'));
485
-        $form[gettext('Fund Transfer')] = array(
486
-            array('', 'HIDDEN', array('name' => 'id', 'value' => $id), '', '', '', ''),
487
-            array('', 'HIDDEN', array('name' => 'account_currency', 'value' => $currency_id), '', '', ''),
488
-            array(gettext('From Account'), 'INPUT', array('name' => 'fromaccountid', 'size' => '20', 'value' => $number, 'readonly' => true, 'class' => "text field medium"), 'required', 'tOOL TIP', 'Please Enter account number'),
489
-            array(gettext('To Account'), 'INPUT', array('name' => 'toaccountid', 'size' => '20', 'class' => "text field medium"), 'trim|required|numeric', 'tOOL TIP', 'Please Enter to account number'),
490
-            array(gettext('Amount'), 'INPUT', array('name' => 'credit', 'size' => '20',  'class' => "text field medium"), 'trim|required|numeric', 'tOOL TIP', ''),
491
-            array(gettext('Note'), 'TEXTAREA', array('name' => 'notes', 'size' => '20', 'cols' => '63', 'rows' => '5', 'class' => "form-control col-md-5  text field medium",'style'=>'height: 80px;'), '', 'tOOL TIP', '')
492
-        );
493
-        $form['button_save'] = array('name' => 'action', 'content' => 'Transfer', 'value' => gettext('save'), 'id' => "submit", 'type' => 'submit', 'class' => 'btn btn-line-parrot');
494
-        return $form;
495
-    }
483
+	function build_user_fund_transfer_form($number, $currency_id, $id) {
484
+		$form['forms'] = array(base_url() . 'user/user_fund_transfer_save/', array('id' => 'user_fund_transfer_form', 'method' => 'POST','class'=>'build_user_fund_transfer_frm' ,'name' => 'user_fund_transfer_form'));
485
+		$form[gettext('Fund Transfer')] = array(
486
+			array('', 'HIDDEN', array('name' => 'id', 'value' => $id), '', '', '', ''),
487
+			array('', 'HIDDEN', array('name' => 'account_currency', 'value' => $currency_id), '', '', ''),
488
+			array(gettext('From Account'), 'INPUT', array('name' => 'fromaccountid', 'size' => '20', 'value' => $number, 'readonly' => true, 'class' => "text field medium"), 'required', 'tOOL TIP', 'Please Enter account number'),
489
+			array(gettext('To Account'), 'INPUT', array('name' => 'toaccountid', 'size' => '20', 'class' => "text field medium"), 'trim|required|numeric', 'tOOL TIP', 'Please Enter to account number'),
490
+			array(gettext('Amount'), 'INPUT', array('name' => 'credit', 'size' => '20',  'class' => "text field medium"), 'trim|required|numeric', 'tOOL TIP', ''),
491
+			array(gettext('Note'), 'TEXTAREA', array('name' => 'notes', 'size' => '20', 'cols' => '63', 'rows' => '5', 'class' => "form-control col-md-5  text field medium",'style'=>'height: 80px;'), '', 'tOOL TIP', '')
492
+		);
493
+		$form['button_save'] = array('name' => 'action', 'content' => 'Transfer', 'value' => gettext('save'), 'id' => "submit", 'type' => 'submit', 'class' => 'btn btn-line-parrot');
494
+		return $form;
495
+	}
496 496
     
497
-    function build_user_opensips_buttons() {
498
-        $buttons_json = json_encode(array(
499
-	    array("Create", "btn btn-line-warning btn", "fa fa-plus-circle fa-lg", "button_action", "/user/user_opensips_add/", "popup"),
500
-            array("Delete", "btn btn-line-danger", "fa fa-times-circle fa-lg", "button_action", "/user/user_opensips_delete_multiple/"),
501
-        ));
502
-        return $buttons_json;
503
-    }
504
-    function build_user_opensips() {
505
-        $grid_field_arr = json_encode(array(
506
-	    array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "", "", "","","false","center"),
507
-            array("Username", "240", "username", "", "", "","","true","center"),
508
-            array("Password", "240", "password", "", "", "","","true","center"),
509
-            array("Domain", "240", "domain", "", "", "","","true","center"),
510
-            array("Action", "200", "", "", "",
511
-                array("EDIT" => array("url" => 'user/user_opensips_edit/', "mode" => "popup"),
512
-                    "DELETE" => array("url" => 'user/user_opensips_delete/', "mode" => "popup")
513
-            ))));
514
-        return $grid_field_arr;
515
-    }
497
+	function build_user_opensips_buttons() {
498
+		$buttons_json = json_encode(array(
499
+		array("Create", "btn btn-line-warning btn", "fa fa-plus-circle fa-lg", "button_action", "/user/user_opensips_add/", "popup"),
500
+			array("Delete", "btn btn-line-danger", "fa fa-times-circle fa-lg", "button_action", "/user/user_opensips_delete_multiple/"),
501
+		));
502
+		return $buttons_json;
503
+	}
504
+	function build_user_opensips() {
505
+		$grid_field_arr = json_encode(array(
506
+		array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "", "", "","","false","center"),
507
+			array("Username", "240", "username", "", "", "","","true","center"),
508
+			array("Password", "240", "password", "", "", "","","true","center"),
509
+			array("Domain", "240", "domain", "", "", "","","true","center"),
510
+			array("Action", "200", "", "", "",
511
+				array("EDIT" => array("url" => 'user/user_opensips_edit/', "mode" => "popup"),
512
+					"DELETE" => array("url" => 'user/user_opensips_delete/', "mode" => "popup")
513
+			))));
514
+		return $grid_field_arr;
515
+	}
516 516
     
517
-    function build_user_opensips_form($id = false) {
518
-        $val = $id > 0 ? 'subscriber.username.' . $id : 'subscriber.username';
519
-        $uname_user = $this->CI->common->find_uniq_rendno('10', '', '');
520
-        $password = $this->CI->common->generate_password();
521
-        $accountinfo = $this->CI->session->userdata('accountinfo');
522
-        $form['forms'] = array(base_url() . 'user/user_opensips_save/', array("id" => "opensips_form", "name" => "opensips_form"));
523
-        $form['Opensips Device'] = array(
517
+	function build_user_opensips_form($id = false) {
518
+		$val = $id > 0 ? 'subscriber.username.' . $id : 'subscriber.username';
519
+		$uname_user = $this->CI->common->find_uniq_rendno('10', '', '');
520
+		$password = $this->CI->common->generate_password();
521
+		$accountinfo = $this->CI->session->userdata('accountinfo');
522
+		$form['forms'] = array(base_url() . 'user/user_opensips_save/', array("id" => "opensips_form", "name" => "opensips_form"));
523
+		$form['Opensips Device'] = array(
524 524
 	  array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''),
525 525
 	  array('', 'HIDDEN', array('name' => 'accountcode', 'value' =>$accountinfo['number']), '', '', '', ''),
526 526
 	  array('Username', 'INPUT', array('name' => 'username', 'size' => '20',  'id' => 'username', 'value' => $uname_user, 'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter account number', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;" title="Reset Password" class="change_number fa fa-refresh"></i>'),
527 527
 	  array('Password', 'PASSWORD', array('name' => 'password', 'size' => '20', 'id' => 'password1', 'value' => $password, 'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter Password', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;" title="Reset Password" class="change_pass fa fa-refresh"></i>'),
528 528
 	  array('Domain', 'INPUT', array('name' => 'domain', 'size' => '20',  'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'),
529 529
 	  array('Status', 'status', 'SELECT', '', '', 'tOOL TIP', 'Please Select Status', '', '', '', 'set_status'),                
530
-        );
531
-        $form['button_save'] = array('name' => 'action', 'content' => 'Save', 'value' => 'save', 'type' => 'button', 'id' => 'submit', 'class' => 'btn btn-line-parrot');
532
-        $form['button_cancel'] = array('name' => 'action', 'content' => 'Close', 'value' => 'cancel', 'type' => 'button', 'class' => 'btn btn-line-sky margin-x-10', 'onclick' => 'return redirect_page(\'NULL\')');
533
-        return $form;
534
-    }
535
-    function build_user_opensips_search() {
536
-        $form['forms'] = array("", array('id' => "opensips_list_search"));
537
-        $form['Search'] = array(
538
-            array('Username', 'INPUT', array('name' => 'username[username]', '', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '1', 'username[username-string]', '', '', '', 'search_string_type', ''),
539
-            array('', 'HIDDEN', 'ajax_search', '1', '', '', ''),
540
-            array('', 'HIDDEN', 'advance_search', '1', '', '', ''),
541
-        );
530
+		);
531
+		$form['button_save'] = array('name' => 'action', 'content' => 'Save', 'value' => 'save', 'type' => 'button', 'id' => 'submit', 'class' => 'btn btn-line-parrot');
532
+		$form['button_cancel'] = array('name' => 'action', 'content' => 'Close', 'value' => 'cancel', 'type' => 'button', 'class' => 'btn btn-line-sky margin-x-10', 'onclick' => 'return redirect_page(\'NULL\')');
533
+		return $form;
534
+	}
535
+	function build_user_opensips_search() {
536
+		$form['forms'] = array("", array('id' => "opensips_list_search"));
537
+		$form['Search'] = array(
538
+			array('Username', 'INPUT', array('name' => 'username[username]', '', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '1', 'username[username-string]', '', '', '', 'search_string_type', ''),
539
+			array('', 'HIDDEN', 'ajax_search', '1', '', '', ''),
540
+			array('', 'HIDDEN', 'advance_search', '1', '', '', ''),
541
+		);
542 542
 
543
-        $form['button_search'] = array('name' => 'action', 'id' => "opensipsdevice_search_btn", 'content' => 'Search', 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right');
544
-        $form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => 'Clear', 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10');
543
+		$form['button_search'] = array('name' => 'action', 'id' => "opensipsdevice_search_btn", 'content' => 'Search', 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right');
544
+		$form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => 'Clear', 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10');
545 545
 
546
-        return $form;
547
-    }
548
-    function build_user_did_form(){
549
-    $form['forms'] = array(base_url() . 'user/user_dids_action/edit/', array("id" => "user_did_form", "name" => "user_did_form"));
550
-        $form['Edit'] = array(
546
+		return $form;
547
+	}
548
+	function build_user_did_form(){
549
+	$form['forms'] = array(base_url() . 'user/user_dids_action/edit/', array("id" => "user_did_form", "name" => "user_did_form"));
550
+		$form['Edit'] = array(
551 551
 	  array('', 'HIDDEN', array('name' => 'free_didlist'),'', '', '', ''),
552 552
 	  array(gettext('DID'), 'INPUT', array('name' => 'number', 'size' => '20', 'class' => "text field medium","readonly"=>"true"), 'trim|required|is_numeric|xss_clean|integer', 'tOOL TIP', 'Please Enter account number'),
553 553
 	  array(gettext('Call Type'), 'call_type', 'SELECT', '', '', 'tOOL TIP', '', '', '', '', 'set_call_type', ''),
554 554
 	  array(gettext('Destination'), 'INPUT', array('name' => 'extensions', 'size' => '20', 'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter Password'),
555
-        );
556
-        $form['button_save'] = array('name' => 'action', 'content' => 'Save', 'value' => 'save', 'type' => 'button', 'id' => 'submit', 'class' => 'btn btn-line-parrot');
557
-        return $form;
555
+		);
556
+		$form['button_save'] = array('name' => 'action', 'content' => 'Save', 'value' => 'save', 'type' => 'button', 'id' => 'submit', 'class' => 'btn btn-line-parrot');
557
+		return $form;
558 558
     
559
-    }
559
+	}
560 560
     
561
-    function build_provider_report_buttons() {
562
-        $buttons_json = json_encode(array(array("Export","btn btn-xing" ," fa fa-download fa-lg", "button_action", "/user/user_provider_cdrreport_export/", 'single')));
563
-        return $buttons_json;
564
-    }
561
+	function build_provider_report_buttons() {
562
+		$buttons_json = json_encode(array(array("Export","btn btn-xing" ," fa fa-download fa-lg", "button_action", "/user/user_provider_cdrreport_export/", 'single')));
563
+		return $buttons_json;
564
+	}
565 565
     
566 566
     
567
-     function build_provider_report($type) {
567
+	 function build_provider_report($type) {
568 568
 		$account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
569
-        $currency_id=$account_info['currency_id'];
570
-        $currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id);	
569
+		$currency_id=$account_info['currency_id'];
570
+		$currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id);	
571 571
         
572
-        if($type == '0' || $type =='1'){
573
-            $cost_array=array("Debit($currency)", "140", "debit", "debit", "debit", "convert_to_currency","","true","right");
574
-        }
575
-        if($type =='3'){
576
-            $cost_array=array("Cost($currency)", "140", "cost", "cost", "cost", "convert_to_currency","","true","right");
577
-        }
578
-        $grid_field_arr = json_encode(array(
572
+		if($type == '0' || $type =='1'){
573
+			$cost_array=array("Debit($currency)", "140", "debit", "debit", "debit", "convert_to_currency","","true","right");
574
+		}
575
+		if($type =='3'){
576
+			$cost_array=array("Cost($currency)", "140", "cost", "cost", "cost", "convert_to_currency","","true","right");
577
+		}
578
+		$grid_field_arr = json_encode(array(
579 579
 			array("Date", "170", "callstart", "callstart", "callstart", "convert_GMT_to","","true","center"),
580
-            array("Caller ID", "110", "callerid", "", "", "","","true","center"),
581
-            array("Called Number", "160", "callednum", "", "", "","","true","center"),
582
-            array("Destination", "160", "notes", "", "", "","","true","center"),
583
-            array("Duration", "140", "billseconds", "user_provider_cdrs_report_search", "billseconds", "convert_to_show_in","","true","center"),
584
-            $cost_array,
585
-            array("Disposition", "160", "disposition", "", "", "","","true","center"),
586
-            array("Call Type", "233", "calltype", "", "", "","","true","center"),
587
-                ));
588
-        return $grid_field_arr;
589
-    }
580
+			array("Caller ID", "110", "callerid", "", "", "","","true","center"),
581
+			array("Called Number", "160", "callednum", "", "", "","","true","center"),
582
+			array("Destination", "160", "notes", "", "", "","","true","center"),
583
+			array("Duration", "140", "billseconds", "user_provider_cdrs_report_search", "billseconds", "convert_to_show_in","","true","center"),
584
+			$cost_array,
585
+			array("Disposition", "160", "disposition", "", "", "","","true","center"),
586
+			array("Call Type", "233", "calltype", "", "", "","","true","center"),
587
+				));
588
+		return $grid_field_arr;
589
+	}
590 590
     
591 591
     
592
-    function build_provider_report_search($type) {
592
+	function build_provider_report_search($type) {
593 593
 
594
-       $cost_array=array('Cost ', 'INPUT', array('name' => 'cost[cost]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'cost[cost-integer]', '', '', '', 'search_int_type', '');
595
-        $form['forms'] = array("", array('id' => "user_provider_cdrs_report_search"));
596
-        $form['Search'] = array(
597
-           array('From Date', 'INPUT', array('name' => 'callstart[]', 'id' => 'customer_cdr_from_date', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '', 'start_date[start_date-date]'),
598
-            array('To Date', 'INPUT', array('name' => 'callstart[]', 'id' => 'customer_cdr_to_date', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '', 'end_date[end_date-date]'),
599
-            array('Caller ID', 'INPUT', array('name' => 'callerid[callerid]', '', 'id' => 'first_name', 'size' => '15', 'class' => "text field "), '', 'tOOL TIP', '1', 'callerid[callerid-string]', '', '', '', 'search_string_type', ''),
600
-            array('Called Number', 'INPUT', array('name' => 'callednum[callednum]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'callednum[callednum-string]', '', '', '', 'search_string_type', ''),
601
-            array('Destination ', 'INPUT', array('name' => 'notes[notes]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'notes[notes-integer]', '', '', '', 'search_int_type', ''),
602
-            array('Duration', 'INPUT', array('name' => 'billseconds[billseconds]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'billseconds[billseconds-integer]', '', '', '', 'search_int_type', ''),
603
-            $cost_array,
604
-            array('Disposition', 'disposition', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_despostion'),
605
-            array('Call Type', 'calltype', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_calltype'),
594
+	   $cost_array=array('Cost ', 'INPUT', array('name' => 'cost[cost]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'cost[cost-integer]', '', '', '', 'search_int_type', '');
595
+		$form['forms'] = array("", array('id' => "user_provider_cdrs_report_search"));
596
+		$form['Search'] = array(
597
+		   array('From Date', 'INPUT', array('name' => 'callstart[]', 'id' => 'customer_cdr_from_date', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '', 'start_date[start_date-date]'),
598
+			array('To Date', 'INPUT', array('name' => 'callstart[]', 'id' => 'customer_cdr_to_date', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '', 'end_date[end_date-date]'),
599
+			array('Caller ID', 'INPUT', array('name' => 'callerid[callerid]', '', 'id' => 'first_name', 'size' => '15', 'class' => "text field "), '', 'tOOL TIP', '1', 'callerid[callerid-string]', '', '', '', 'search_string_type', ''),
600
+			array('Called Number', 'INPUT', array('name' => 'callednum[callednum]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'callednum[callednum-string]', '', '', '', 'search_string_type', ''),
601
+			array('Destination ', 'INPUT', array('name' => 'notes[notes]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'notes[notes-integer]', '', '', '', 'search_int_type', ''),
602
+			array('Duration', 'INPUT', array('name' => 'billseconds[billseconds]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'billseconds[billseconds-integer]', '', '', '', 'search_int_type', ''),
603
+			$cost_array,
604
+			array('Disposition', 'disposition', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_despostion'),
605
+			array('Call Type', 'calltype', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_calltype'),
606 606
     
607
-            array('', 'HIDDEN', 'ajax_search', '1', '', '', ''),
608
-            array('', 'HIDDEN', 'advance_search', '1', '', '', '')       
609
-        );
607
+			array('', 'HIDDEN', 'ajax_search', '1', '', '', ''),
608
+			array('', 'HIDDEN', 'advance_search', '1', '', '', '')       
609
+		);
610 610
 		$form['display_in']=array('name' => 'search_in',"id"=>"search_in","function"=>"search_report_in", "content"=>"Display records in",'label_class' => "search_label col-md-3 no-padding","dropdown_class"=>"form-control","label_style"=>"font-size:13px;","dropdown_style"=>"background: #ddd; width: 21% !important;");
611
-        $form['button_search'] = array('name' => 'action', 'id' => "user_provider_cdr_search_btn", 'content' => 'Search', 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right');
612
-        $form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => 'Clear', 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10');
613
-        return $form;
614
-    }
611
+		$form['button_search'] = array('name' => 'action', 'id' => "user_provider_cdr_search_btn", 'content' => 'Search', 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right');
612
+		$form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => 'Clear', 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10');
613
+		return $form;
614
+	}
615 615
     
616 616
     
617 617
 }
Please login to merge, or discard this patch.
Spacing   +173 added lines, -173 removed lines patch added patch discarded remove patch
@@ -22,18 +22,18 @@  discard block
 block discarded – undo
22 22
 ###############################################################################
23 23
 
24 24
 if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 
25
-class User_form{
25
+class User_form {
26 26
     function __construct($library_name = '') {
27 27
         $this->CI = & get_instance();
28 28
     }
29 29
 
30 30
 
31
-function build_packages_list_for_user(){
31
+function build_packages_list_for_user() {
32 32
         $grid_field_arr = json_encode(array(
33
-            array(gettext("Name"), "310", "package_name", "", "", "","","true","center"),
34
-            array(gettext("Rate Group"), "250", "pricelist_id", "name", "pricelists", "get_field_name","","true","center"),
35
-            array(gettext("Included Seconds"), "260", "includedseconds", "", "", "","","true","center"),
36
-            array(gettext("Status"), "160", "status", "status", "status", "get_status","","true","center"),
33
+            array(gettext("Name"), "310", "package_name", "", "", "", "", "true", "center"),
34
+            array(gettext("Rate Group"), "250", "pricelist_id", "name", "pricelists", "get_field_name", "", "true", "center"),
35
+            array(gettext("Included Seconds"), "260", "includedseconds", "", "", "", "", "true", "center"),
36
+            array(gettext("Status"), "160", "status", "status", "status", "get_status", "", "true", "center"),
37 37
                 ));
38 38
         return $grid_field_arr;
39 39
 }
@@ -51,22 +51,22 @@  discard block
 block discarded – undo
51 51
         
52 52
     function build_emails_list_for_user() {
53 53
         $grid_field_arr = json_encode(array(
54
-            array(gettext("Date"), "110", "date", "", "", "","","true","center"),
55
-            array(gettext("From"), "170", "from", "", "", "","","true","center"),
56
-            array(gettext("Body"), "550", "body", "", "", "","","true","center"),
57
-            array(gettext("Attachement"), "100", "attachment", "attachment", "attachment", "attachment_icons","","true","center"),
58
-            array(gettext("Status"), "100", "status", "status", "status", "email_status","","true","center"),
54
+            array(gettext("Date"), "110", "date", "", "", "", "", "true", "center"),
55
+            array(gettext("From"), "170", "from", "", "", "", "", "true", "center"),
56
+            array(gettext("Body"), "550", "body", "", "", "", "", "true", "center"),
57
+            array(gettext("Attachement"), "100", "attachment", "attachment", "attachment", "attachment_icons", "", "true", "center"),
58
+            array(gettext("Status"), "100", "status", "status", "status", "email_status", "", "true", "center"),
59 59
                 ));
60 60
         return $grid_field_arr;
61 61
     }
62
-    function build_user_emails_search(){
62
+    function build_user_emails_search() {
63 63
         $form['forms'] = array("", array('id' => "user_emails_search"));
64 64
         $form['Search'] = array(
65 65
 	    array(gettext('From Date'), 'INPUT', array('name' => 'date[]', 'id' => 'customer_cdr_from_date', 'size' => '20',
66 66
  'class' => "text field "), '', 'tOOL TIP', '', 'date[date-date]'),
67 67
 		array(gettext('To Date'), 'INPUT', array('name' => 'date[]', 'id' => 'customer_cdr_to_date', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '', 'date[date-date]'),
68
-		array(gettext('From'), 'INPUT', array('name' => 'from[from]', '','id'=>'from', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '1', 'from[from-string]', '', '', '', 'search_string_type', ''),
69
-		array(gettext('Body'), 'INPUT', array('name' => 'body[body]', '','id'=>'body', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '1', 'body[body-string]', '', '', '', 'search_string_type', ''),  
68
+		array(gettext('From'), 'INPUT', array('name' => 'from[from]', '', 'id'=>'from', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '1', 'from[from-string]', '', '', '', 'search_string_type', ''),
69
+		array(gettext('Body'), 'INPUT', array('name' => 'body[body]', '', 'id'=>'body', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '1', 'body[body-string]', '', '', '', 'search_string_type', ''),  
70 70
 		array('', 'HIDDEN', 'ajax_search', '1', '', '', ''),         
71 71
 		array('', 'HIDDEN', 'advance_search', '1', '', '', '')
72 72
         );
@@ -77,28 +77,28 @@  discard block
 block discarded – undo
77 77
    
78 78
     function get_userprofile_form_fields($dataArr = false) {
79 79
         if ($dataArr['id'] > 0)
80
-            $val = 'accounts.email.' . $dataArr['id'];
80
+            $val = 'accounts.email.'.$dataArr['id'];
81 81
         else
82 82
             $val = 'accounts.email';
83 83
 			$uname = $this->CI->common->find_uniq_rendno(common_model::$global_config['system_config']['cardlength'], 'number', 'accounts');
84 84
 			$password = $this->CI->common->generate_password();
85
-			$logintype=$this->CI->session->userdata('logintype');
86
-			$pin = ($logintype == '0')?array(gettext('Pin'), 'INPUT', array('name' => 'pin', 'size' => '20', 'class' => "text field medium"),  'tOOL TIP', ''):array('', 'HIDDEN', array('name' => 'Pin'), '', '', '', '');
87
-			$form['forms'] = array(base_url() . 'user/user_myprofile/', array("id" => "user_form", "name" => "user_form"));
85
+			$logintype = $this->CI->session->userdata('logintype');
86
+			$pin = ($logintype == '0') ? array(gettext('Pin'), 'INPUT', array('name' => 'pin', 'size' => '20', 'class' => "text field medium"), 'tOOL TIP', '') : array('', 'HIDDEN', array('name' => 'Pin'), '', '', '', '');
87
+			$form['forms'] = array(base_url().'user/user_myprofile/', array("id" => "user_form", "name" => "user_form"));
88 88
 
89 89
 			$form['User Profile'] = array(
90 90
             array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''),
91 91
             array('', 'HIDDEN', array('name' => 'type', 'value' => '0'), '', '', ''),
92
-            array(gettext('Account Number'), 'INPUT', array('name' => 'number', 'value' => $uname, 'size' => '20', 'readonly' => true,  'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'),
92
+            array(gettext('Account Number'), 'INPUT', array('name' => 'number', 'value' => $uname, 'size' => '20', 'readonly' => true, 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'),
93 93
             $pin,
94 94
             array(gettext('Company'), 'INPUT', array('name' => 'company_name', 'size' => '15', 'class' => 'text field medium'), 'trim|xss_clean', 'tOOL TIP', ''),
95
-            array(gettext('First Name'), 'INPUT', array('name' => 'first_name', 'id' => 'first_name', 'size' => '15',  'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter account number'),
96
-            array(gettext('Last Name'), 'INPUT', array('name' => 'last_name', 'size' => '15',  'class' => "text field medium"), 'trim|alpha_dash|xss_clean', 'tOOL TIP', 'Please Enter Password'),
97
-            array(gettext('Telephone 1'), 'INPUT', array('name' => 'telephone_1', 'size' => '15',  'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
98
-            array(gettext('Telephone 2'), 'INPUT', array('name' => 'telephone_2', 'size' => '15',  'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
99
-            array(gettext('Email'), 'INPUT', array('name' => 'email', 'size' => '50',  'class' => "text field medium"), 'required|valid_email|is_unique[' . $val . ']', 'tOOL TIP', 'Please Enter Password'),
100
-            array(gettext('Address 1'), 'INPUT', array('name' => 'address_1', 'size' => '15',  'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
101
-            array(gettext('Address 2'), 'INPUT', array('name' => 'address_2', 'size' => '15',  'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
95
+            array(gettext('First Name'), 'INPUT', array('name' => 'first_name', 'id' => 'first_name', 'size' => '15', 'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter account number'),
96
+            array(gettext('Last Name'), 'INPUT', array('name' => 'last_name', 'size' => '15', 'class' => "text field medium"), 'trim|alpha_dash|xss_clean', 'tOOL TIP', 'Please Enter Password'),
97
+            array(gettext('Telephone 1'), 'INPUT', array('name' => 'telephone_1', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
98
+            array(gettext('Telephone 2'), 'INPUT', array('name' => 'telephone_2', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
99
+            array(gettext('Email'), 'INPUT', array('name' => 'email', 'size' => '50', 'class' => "text field medium"), 'required|valid_email|is_unique['.$val.']', 'tOOL TIP', 'Please Enter Password'),
100
+            array(gettext('Address 1'), 'INPUT', array('name' => 'address_1', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
101
+            array(gettext('Address 2'), 'INPUT', array('name' => 'address_2', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
102 102
             array(gettext('City'), 'INPUT', array('name' => 'city', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
103 103
             array(gettext('Province/State'), 'INPUT', array('name' => 'province', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'),
104 104
             array(gettext('Zip/Postal Code'), 'INPUT', array('name' => 'postal_code', 'size' => '15', 'class' => "text field medium"), 'trim|xss_clean', 'tOOL TIP', 'Please Enter Password'),
@@ -111,63 +111,63 @@  discard block
 block discarded – undo
111 111
     }
112 112
   
113 113
      function get_userprofile_change_password() {
114
-        $form['forms'] = array(base_url() . 'user/user_change_password/', array("id" => "customer_alert_threshold", "name" => "user_change_password"));
114
+        $form['forms'] = array(base_url().'user/user_change_password/', array("id" => "customer_alert_threshold", "name" => "user_change_password"));
115 115
         $form[gettext('Change Password')] = array(
116 116
             array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''),
117 117
             array(gettext('Old Password'), 'INPUT', array('name' => 'password', 'size' => '20', 'class' => "text field medium", 'id' => 'new_password'), 'required|password_check[accounts]', 'tOOL TIP', '', ''),
118 118
             array(gettext('New Password'), 'INPUT', array('name' => 'new_password', 'size' => '20', 'class' => "text field medium", 'id' => 'new_password'), 'required|', 'tOOL TIP', '', ''),
119
-            array(gettext('Confirm Password'), 'INPUT', array('name' => 'new_confirm_password', 'size' => '20',  'class' => "text field medium", 'id' => 'password'), "required|matches[new_password]", 'tOOL TIP', '', ''),
119
+            array(gettext('Confirm Password'), 'INPUT', array('name' => 'new_confirm_password', 'size' => '20', 'class' => "text field medium", 'id' => 'password'), "required|matches[new_password]", 'tOOL TIP', '', ''),
120 120
         );
121 121
         $form['button_save'] = array('name' => 'action', 'content' => gettext('Save'), 'value' => 'save', 'type' => 'submit', 'class' => 'btn btn-line-parrot');
122 122
         return $form;
123 123
     }
124 124
 
125
-    function build_user_invoices(){
125
+    function build_user_invoices() {
126 126
       $account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
127
-      $currency_id=$account_info['currency_id'];
128
-      $currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id);
129
-      $url=($this->CI->session->userdata('logintype')==0 )?"/user/user_invoice_download/":'/invoices/invoice_main_download/';
130
-      $grid_field_arr  = json_encode(array(
131
-          array(gettext("Number"),"110","id","id,'',type","invoices","build_concat_string","","true","center"),
132
-          array(gettext("Type"),"100","id","id,'',type","invoices","build_concat_string","","true","center"),
133
-          array(gettext("Generated Date"),"110","invoice_date","invoice_date","","get_invoice_date","","true","center"),
134
-		  array(gettext("From Date"),"100","from_date","from_date","","get_from_date","","true","center"),
135
-		  array(gettext("Due Date"),"100","","","","","","true","center"),
136
-		  array(gettext("Last Pay Date"),"100","","","","","","true","center"),
137
-		  array(gettext("Amount")."($currency)","100","id","id","id","get_invoice_total","","true","right"),
138
-		  array(gettext("Outstanding Amount")."<br>($currency)","150","","","","","","true","right"),
139
-          array(gettext("Action"),"140","","","",array(
140
-		     "DOWNLOAD"=>array("url"=>$url,"mode"=>"single"),
127
+      $currency_id = $account_info['currency_id'];
128
+      $currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id);
129
+      $url = ($this->CI->session->userdata('logintype') == 0) ? "/user/user_invoice_download/" : '/invoices/invoice_main_download/';
130
+      $grid_field_arr = json_encode(array(
131
+          array(gettext("Number"), "110", "id", "id,'',type", "invoices", "build_concat_string", "", "true", "center"),
132
+          array(gettext("Type"), "100", "id", "id,'',type", "invoices", "build_concat_string", "", "true", "center"),
133
+          array(gettext("Generated Date"), "110", "invoice_date", "invoice_date", "", "get_invoice_date", "", "true", "center"),
134
+		  array(gettext("From Date"), "100", "from_date", "from_date", "", "get_from_date", "", "true", "center"),
135
+		  array(gettext("Due Date"), "100", "", "", "", "", "", "true", "center"),
136
+		  array(gettext("Last Pay Date"), "100", "", "", "", "", "", "true", "center"),
137
+		  array(gettext("Amount")."($currency)", "100", "id", "id", "id", "get_invoice_total", "", "true", "right"),
138
+		  array(gettext("Outstanding Amount")."<br>($currency)", "150", "", "", "", "", "", "true", "right"),
139
+          array(gettext("Action"), "140", "", "", "", array(
140
+		     "DOWNLOAD"=>array("url"=>$url, "mode"=>"single"),
141 141
 		))
142 142
 	));
143 143
       return $grid_field_arr;
144 144
     }
145 145
     function build_user_invoices_search()
146 146
     {
147
-        $form['forms'] = array("",array('id'=>"user_invoice_search"));
147
+        $form['forms'] = array("", array('id'=>"user_invoice_search"));
148 148
         $form['Search'] = array(
149
-	    array(gettext('From Date'), 'INPUT', array('name' => 'from_date[0]','id'=>'invoice_from_date','size' => '20', 'class' => "text field"), '', 'tOOL TIP', '', 'from_date[from_date-date]'),
150
-	    array(gettext('To Date'), 'INPUT', array('name' => 'to_date[1]','id'=>'invoice_to_date','size' => '20', 'class' => "text field"), '', 'tOOL TIP', '', 'to_date[to_date-date]'),
149
+	    array(gettext('From Date'), 'INPUT', array('name' => 'from_date[0]', 'id'=>'invoice_from_date', 'size' => '20', 'class' => "text field"), '', 'tOOL TIP', '', 'from_date[from_date-date]'),
150
+	    array(gettext('To Date'), 'INPUT', array('name' => 'to_date[1]', 'id'=>'invoice_to_date', 'size' => '20', 'class' => "text field"), '', 'tOOL TIP', '', 'to_date[to_date-date]'),
151 151
 	    array(gettext('Amount'), 'INPUT', array('name' => 'amount[amount]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'amount[amount-string]', '', '', '', 'search_string_type', ''),
152
-	    array(gettext('Generated Date'), 'INPUT', array('name' => 'invoice_date[0]','','size' => '20', 'class' => "text field",'id'=>'invoice_date'), '', 'tOOL TIP', '', 'invoice_date[invoice_date-date]'),	
153
-	    array('', 'HIDDEN', 'ajax_search','1', '', '', ''),    
154
-        array('', 'HIDDEN', 'advance_search','1', '', '', ''));
155
-        $form['button_search'] = array('name' => 'action', 'id'=>"user_invoice_search_btn",'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right');
156
-        $form['button_reset'] = array('name' => 'action','id'=>"id_reset", 'content' => gettext('Clear'), 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10');
152
+	    array(gettext('Generated Date'), 'INPUT', array('name' => 'invoice_date[0]', '', 'size' => '20', 'class' => "text field", 'id'=>'invoice_date'), '', 'tOOL TIP', '', 'invoice_date[invoice_date-date]'),	
153
+	    array('', 'HIDDEN', 'ajax_search', '1', '', '', ''),    
154
+        array('', 'HIDDEN', 'advance_search', '1', '', '', ''));
155
+        $form['button_search'] = array('name' => 'action', 'id'=>"user_invoice_search_btn", 'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right');
156
+        $form['button_reset'] = array('name' => 'action', 'id'=>"id_reset", 'content' => gettext('Clear'), 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10');
157 157
         return $form;
158 158
     }
159 159
     function build_user_charge_history() {
160 160
 	$account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
161
-	$currency_id=$account_info['currency_id'];
162
-	$currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id);
161
+	$currency_id = $account_info['currency_id'];
162
+	$currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id);
163 163
         $grid_field_arr = json_encode(array(
164 164
             array(gettext("Created Date"), "140", "created_date", "", "", ""),
165
-            array(gettext("Invoice Number"), "120", "created_date", "", "", "","","true","center"),
165
+            array(gettext("Invoice Number"), "120", "created_date", "", "", "", "", "true", "center"),
166 166
             array(gettext("Charge Type"), "100", "item_type", "", "", ""),
167
-            array(gettext("Before Balance")."<br/>($currency)", "120", "before_balance", "before_balance", "before_balance", "convert_to_currency","","true","right"),
168
-            array(gettext("Debit")."<br/>($currency)", "120", "debit", "debit", "debit", "convert_to_currency","","true","right"),
169
-            array(gettext("Credit")."<br/>($currency)", "120", "credit", "credit", "credit", "convert_to_currency","","true","right"),
170
-            array(gettext("After Balance")."<br/>($currency)", "120", "after_balance", "after_balance", "after_balance", "convert_to_currency","","true","right"),
167
+            array(gettext("Before Balance")."<br/>($currency)", "120", "before_balance", "before_balance", "before_balance", "convert_to_currency", "", "true", "right"),
168
+            array(gettext("Debit")."<br/>($currency)", "120", "debit", "debit", "debit", "convert_to_currency", "", "true", "right"),
169
+            array(gettext("Credit")."<br/>($currency)", "120", "credit", "credit", "credit", "convert_to_currency", "", "true", "right"),
170
+            array(gettext("After Balance")."<br/>($currency)", "120", "after_balance", "after_balance", "after_balance", "convert_to_currency", "", "true", "right"),
171 171
             array(gettext("Description"), "180", "description", "", "", ""),
172 172
                 ));
173 173
         return $grid_field_arr;
@@ -187,14 +187,14 @@  discard block
 block discarded – undo
187 187
         return $form;
188 188
     }
189 189
     
190
-    function build_user_subscription(){
190
+    function build_user_subscription() {
191 191
          $account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
192
-		 $currency_id=$account_info['currency_id'];
193
-		 $currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id);
192
+		 $currency_id = $account_info['currency_id'];
193
+		 $currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id);
194 194
          $grid_field_arr = json_encode(array(
195
-			array(gettext("Name"), "335", "description", "", "", "","","true","center"),
196
-            array(gettext("Amount")."($currency)", "335", "charge", "charge", "charge", "convert_to_currency","","true","right"),
197
-            array(gettext("Billing Cycle"), "335", "sweep_id", "sweep", "sweeplist", "get_field_name","","true","center"),
195
+			array(gettext("Name"), "335", "description", "", "", "", "", "true", "center"),
196
+            array(gettext("Amount")."($currency)", "335", "charge", "charge", "charge", "convert_to_currency", "", "true", "right"),
197
+            array(gettext("Billing Cycle"), "335", "sweep_id", "sweep", "sweeplist", "get_field_name", "", "true", "center"),
198 198
                 ));
199 199
         return $grid_field_arr;
200 200
     }
@@ -217,20 +217,20 @@  discard block
 block discarded – undo
217 217
     
218 218
     function build_user_didlist() {
219 219
         $account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
220
-		$currency_id=$account_info['currency_id'];
221
-		$currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id);
220
+		$currency_id = $account_info['currency_id'];
221
+		$currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id);
222 222
         $grid_field_arr = json_encode(array(
223
-			array(gettext("DID"), "105", "number", "", "", "","","true","center"),
224
-			array(gettext("Country"), "90", "country_id", "country", "countrycode", "get_field_name","","true","center"),
225
-			array(gettext("Per Minute<br/>Cost")."($currency)", "90", "cost", "cost", "cost", "convert_to_currency","","true","right"),
226
-			array(gettext("Initial<br/>Increment"), "100", "init_inc", "", "", "","","true","center"),
227
-            array(gettext("Increment"), "100", "inc", "", "", "","","true","center"),
228
-            array(gettext("Setup<br/>Fee")."($currency)", "100", "setup", "setup", "setup", "convert_to_currency","","true","right"),
229
-            array(gettext("Monthly<br/>Fee")."($currency)", "100", "monthlycost", "monthlycost", "monthlycost", "convert_to_currency","","true","right"),
230
-            array(gettext("Call Type"), "105", "call_type", "call_type", "call_type", "get_call_type","","true","center"),
231
-            array(gettext("Destination"), "153", "extensions", "", "", "","","true","center"),
232
-            array(gettext("Status"), "90", "status", "status", "dids", "get_did_status","","true","center"),
233
-            array(gettext("Modified <br/>Date"), "100", "last_modified_date", "last_modified_date", "last_modified_date", "convert_GMT_to","","true","center"),
223
+			array(gettext("DID"), "105", "number", "", "", "", "", "true", "center"),
224
+			array(gettext("Country"), "90", "country_id", "country", "countrycode", "get_field_name", "", "true", "center"),
225
+			array(gettext("Per Minute<br/>Cost")."($currency)", "90", "cost", "cost", "cost", "convert_to_currency", "", "true", "right"),
226
+			array(gettext("Initial<br/>Increment"), "100", "init_inc", "", "", "", "", "true", "center"),
227
+            array(gettext("Increment"), "100", "inc", "", "", "", "", "true", "center"),
228
+            array(gettext("Setup<br/>Fee")."($currency)", "100", "setup", "setup", "setup", "convert_to_currency", "", "true", "right"),
229
+            array(gettext("Monthly<br/>Fee")."($currency)", "100", "monthlycost", "monthlycost", "monthlycost", "convert_to_currency", "", "true", "right"),
230
+            array(gettext("Call Type"), "105", "call_type", "call_type", "call_type", "get_call_type", "", "true", "center"),
231
+            array(gettext("Destination"), "153", "extensions", "", "", "", "", "true", "center"),
232
+            array(gettext("Status"), "90", "status", "status", "dids", "get_did_status", "", "true", "center"),
233
+            array(gettext("Modified <br/>Date"), "100", "last_modified_date", "last_modified_date", "last_modified_date", "convert_GMT_to", "", "true", "center"),
234 234
             array(gettext("Action"), "80", "", "", "", array("EDIT" => array("url" => "/user/user_did_edit/", "mode" => "popup"),
235 235
                     "DELETE" => array("url" => "/user/user_dids_action/delete/", "mode" => "single")))
236 236
                 ));
@@ -243,11 +243,11 @@  discard block
 block discarded – undo
243 243
             array(gettext('DID'), 'INPUT', array('name' => 'number[number]', '', 'size' => '20', 'class' => "text field"), '', 'tOOL TIP', '1', 'number[number-string]', '', '', '', 'search_string_type', ''),
244 244
             array(gettext('Country'), 'country_id', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'country', 'countrycode', 'build_dropdown', '', ''),
245 245
             array(gettext('Initial Increment'), 'INPUT', array('name' => 'init_inc[init_inc]', '', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '1', 'init_inc[init_inc-integer]', '', '', '', 'search_int_type', ''),
246
-            array(gettext('Call Type'), 'call_type', 'SELECT', '', '', 'tOOL TIP', '', '', '', '', 'set_call_type_search', '',''),
246
+            array(gettext('Call Type'), 'call_type', 'SELECT', '', '', 'tOOL TIP', '', '', '', '', 'set_call_type_search', '', ''),
247 247
             array(gettext('Destination'), 'INPUT', array('name' => 'extensions[extensions]', '', 'size' => '20', 'class' => "text field"), '', 'tOOL TIP', '1', 'extensions[extensions-string]', '', '', '', 'search_string_type', ''),
248 248
 	
249 249
             array(gettext('Status'), 'status', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_search_status', '', ''),
250
-            array('', 'HIDDEN', 'ajax_search', '1', '', '', ''),array('', 'HIDDEN', 'advance_search', '1', '', '', '')
250
+            array('', 'HIDDEN', 'ajax_search', '1', '', '', ''), array('', 'HIDDEN', 'advance_search', '1', '', '', '')
251 251
           );
252 252
 
253 253
         $form['button_search'] = array('name' => 'action', 'id' => "user_did_search_btn", 'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right');
@@ -258,10 +258,10 @@  discard block
 block discarded – undo
258 258
     
259 259
     function build_user_ipmap() {
260 260
         $grid_field_arr = json_encode(array(
261
-            array(gettext("Name"), "240", "name", "", "", "","","true","center"),
262
-            array(gettext("IP"), "240", "ip", "", "", "","","true","center"),
263
-            array(gettext("Prefix"), "220", "prefix", "", "", "","","true","center"),
264
-            array(gettext("Created Date"), "174", "created_date", "created_date", "created_date", "convert_GMT_to","","true","center"),
261
+            array(gettext("Name"), "240", "name", "", "", "", "", "true", "center"),
262
+            array(gettext("IP"), "240", "ip", "", "", "", "", "true", "center"),
263
+            array(gettext("Prefix"), "220", "prefix", "", "", "", "", "true", "center"),
264
+            array(gettext("Created Date"), "174", "created_date", "created_date", "created_date", "convert_GMT_to", "", "true", "center"),
265 265
             array(gettext("Action"), "150", "", "", "", array("DELETE" => array("url" => "user/user_ipmap_action/delete/", "mode" => "single")))
266 266
                 ));
267 267
         return $grid_field_arr;
@@ -281,27 +281,27 @@  discard block
 block discarded – undo
281 281
         return $form;
282 282
     }
283 283
     
284
-    function build_user_sipdevices(){
284
+    function build_user_sipdevices() {
285 285
         $grid_field_arr = json_encode(array(
286
-	    array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "", "", "","","false","center"),
287
-            array(gettext("User Name"), "105", "username", "", "", "","","true","center"),
288
-            array(gettext("Password"), "105", "password", "", "", "","","true","center"),
289
-            array(gettext("Caller Name"), "110", "effective_caller_id_name", "", "", "","","true","center"),
290
-            array(gettext("Caller Number"), "110", "effective_caller_id_number", "", "", "","","true","center"),      
291
-            array(gettext("Status"), "125", "status", "", "", "","","true","center"),
292
-            array(gettext("Created Date"), "110", "creation_date", "creation_date", "creation_date", "convert_GMT_to","","true","center"),
293
-            array(gettext("Modified Date"), "130", "last_modified_date", "last_modified_date", "last_modified_date", "convert_GMT_to","","true","center"),
294
-            array(gettext("Voicemail"), "90", "voicemail_enabled", "", "", "","","true","center"),
295
-            array(gettext("Action"), "110", "", "", "", array("EDIT" => array("url" => "/accounts/fssipdevices_action/edit/", "mode" => "single","layout"=>"medium"),
286
+	    array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "", "", "", "", "false", "center"),
287
+            array(gettext("User Name"), "105", "username", "", "", "", "", "true", "center"),
288
+            array(gettext("Password"), "105", "password", "", "", "", "", "true", "center"),
289
+            array(gettext("Caller Name"), "110", "effective_caller_id_name", "", "", "", "", "true", "center"),
290
+            array(gettext("Caller Number"), "110", "effective_caller_id_number", "", "", "", "", "true", "center"),      
291
+            array(gettext("Status"), "125", "status", "", "", "", "", "true", "center"),
292
+            array(gettext("Created Date"), "110", "creation_date", "creation_date", "creation_date", "convert_GMT_to", "", "true", "center"),
293
+            array(gettext("Modified Date"), "130", "last_modified_date", "last_modified_date", "last_modified_date", "convert_GMT_to", "", "true", "center"),
294
+            array(gettext("Voicemail"), "90", "voicemail_enabled", "", "", "", "", "true", "center"),
295
+            array(gettext("Action"), "110", "", "", "", array("EDIT" => array("url" => "/accounts/fssipdevices_action/edit/", "mode" => "single", "layout"=>"medium"),
296 296
                     "DELETE" => array("url" => "/accounts/fssipdevices_action/delete/", "mode" => "single")))
297 297
                 ));
298 298
         return $grid_field_arr;
299 299
     }
300 300
     
301
-    function build_user_sipdevices_search(){
301
+    function build_user_sipdevices_search() {
302 302
         $form['forms'] = array("", array('id' => "user_sipdevices_search"));
303 303
         $form['Search'] = array(
304
-            array(gettext('Username'), 'INPUT', array('name' => 'username[username]', '', 'size' => '20',  'class' => "text field"), '', 'tOOL TIP', '1', 'username[username-string]', '', '', '', 'search_string_type', ''), 
304
+            array(gettext('Username'), 'INPUT', array('name' => 'username[username]', '', 'size' => '20', 'class' => "text field"), '', 'tOOL TIP', '1', 'username[username-string]', '', '', '', 'search_string_type', ''), 
305 305
 			array('', 'HIDDEN', 'ajax_search', '1', '', '', ''),
306 306
             array('', 'HIDDEN', 'advance_search', '1', '', '', ''),
307 307
         );
@@ -310,17 +310,17 @@  discard block
 block discarded – undo
310 310
         return $form;
311 311
     }
312 312
     
313
-    function build_user_sipdevices_form($id=''){
314
-	$val=$id > 0 ? 'sip_devices.username.'.$id : 'sip_devices.username'; 
313
+    function build_user_sipdevices_form($id = '') {
314
+	$val = $id > 0 ? 'sip_devices.username.'.$id : 'sip_devices.username'; 
315 315
 	$uname_user = $this->CI->common->find_uniq_rendno('10', '', '');
316 316
         $password = $this->CI->common->generate_password();
317
-        $form['forms'] = array(base_url() . 'user/user_sipdevices_save/', array("id" => "user_sipdevices_form", "name" => "user_sipdevices_form"));
317
+        $form['forms'] = array(base_url().'user/user_sipdevices_save/', array("id" => "user_sipdevices_form", "name" => "user_sipdevices_form"));
318 318
         $form[gettext('Device Information')] = array(
319 319
             array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''),
320
-            array(gettext('Username'), 'INPUT', array('name' => 'fs_username', 'size' => '20', 'value'=>$uname_user,'id'=>'username', 'class' => "text field medium"), 'trim|required|is_unique['.$val.']|xss_clean', 'tOOL TIP', 'Please Enter account number','<i style="color: #1BCB61;font-size: 14px;padding-left: 5px;padding-top: 8px;float: left;" title="Reset Password" class="change_number  fa fa-refresh"></i>'),
321
-            array(gettext('Password'), 'INPUT', array('name' => 'fs_password', 'size' => '20', 'value'=>$password ,'id'=>'password','class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter Password','<i style="color: #1BCB61;font-size: 14px;padding-left: 5px;padding-top: 8px;float: left;" title="Reset Password" class="change_pass fa fa-refresh"></i>'),
322
-            array(gettext('Caller Name'), 'INPUT', array('name' => 'effective_caller_id_name', 'size' => '20',  'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'),
323
-            array(gettext('Caller Number'), 'INPUT', array('name' => 'effective_caller_id_number', 'size' => '20',  'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'),
320
+            array(gettext('Username'), 'INPUT', array('name' => 'fs_username', 'size' => '20', 'value'=>$uname_user, 'id'=>'username', 'class' => "text field medium"), 'trim|required|is_unique['.$val.']|xss_clean', 'tOOL TIP', 'Please Enter account number', '<i style="color: #1BCB61;font-size: 14px;padding-left: 5px;padding-top: 8px;float: left;" title="Reset Password" class="change_number  fa fa-refresh"></i>'),
321
+            array(gettext('Password'), 'INPUT', array('name' => 'fs_password', 'size' => '20', 'value'=>$password, 'id'=>'password', 'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter Password', '<i style="color: #1BCB61;font-size: 14px;padding-left: 5px;padding-top: 8px;float: left;" title="Reset Password" class="change_pass fa fa-refresh"></i>'),
322
+            array(gettext('Caller Name'), 'INPUT', array('name' => 'effective_caller_id_name', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'),
323
+            array(gettext('Caller Number'), 'INPUT', array('name' => 'effective_caller_id_number', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'),
324 324
             array(gettext('Status'), 'status', 'SELECT', '', '', 'tOOL TIP', 'Please Select Status', '', '', '', 'set_status'),
325 325
         );
326 326
 
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
     }
340 340
     
341 341
     function build_user_animap() {
342
-        $grid_field_arr = json_encode(array(array(gettext("Caller ID"), "735", "number", "", "", "","","true","center"),
342
+        $grid_field_arr = json_encode(array(array(gettext("Caller ID"), "735", "number", "", "", "", "", "true", "center"),
343 343
             array(gettext("Action"), "275", "", "", "", array("DELETE" => array("url" => "user/user_animap_action/delete/", "mode" => "single")))
344 344
                 ));
345 345
         return $grid_field_arr;
@@ -347,22 +347,22 @@  discard block
 block discarded – undo
347 347
     
348 348
     function user_rates_list_buttons() {
349 349
         $buttons_json = json_encode(array(
350
-            array(gettext("Export CSV"),"btn btn-xing" ,"fa fa-download fa-lg", "button_action", "/user/user_rates_list_export/", 'single')
350
+            array(gettext("Export CSV"), "btn btn-xing", "fa fa-download fa-lg", "button_action", "/user/user_rates_list_export/", 'single')
351 351
         ));
352 352
         return $buttons_json;
353 353
     }
354 354
     
355 355
     function user_rates_list() {
356 356
          $account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
357
-         $currency_id=$account_info['currency_id'];
358
-         $currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id);
359
-         $grid_field_arr = json_encode(array(array(gettext("Code"), "155", "pattern", "pattern", "", "get_only_numeric_val","","true","center"),
360
-	      array(gettext("Destination"), "200", "comment", "", "", "","","true","center"),
361
-	      array(gettext("Connect Cost")."($currency)", "200", "connectcost", "", "", "","","true","right"),
362
-	      array(gettext("Included Seconds"), "200", "includedseconds", "", "", "","","true","center"),
363
-	      array(gettext("Per Minute Cost")."($currency)", "200", "cost", "", "", "","","true","right"),
364
-	      array(gettext("Initial Increment"), "130", "init_inc", "", "", "","","true","center"),
365
-	      array(gettext("Increment"), "180", "inc", "", "", "","","true","center")
357
+         $currency_id = $account_info['currency_id'];
358
+         $currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id);
359
+         $grid_field_arr = json_encode(array(array(gettext("Code"), "155", "pattern", "pattern", "", "get_only_numeric_val", "", "true", "center"),
360
+	      array(gettext("Destination"), "200", "comment", "", "", "", "", "true", "center"),
361
+	      array(gettext("Connect Cost")."($currency)", "200", "connectcost", "", "", "", "", "true", "right"),
362
+	      array(gettext("Included Seconds"), "200", "includedseconds", "", "", "", "", "true", "center"),
363
+	      array(gettext("Per Minute Cost")."($currency)", "200", "cost", "", "", "", "", "true", "right"),
364
+	      array(gettext("Initial Increment"), "130", "init_inc", "", "", "", "", "true", "center"),
365
+	      array(gettext("Increment"), "180", "inc", "", "", "", "", "true", "center")
366 366
 	));
367 367
         return $grid_field_arr;
368 368
     }
@@ -387,8 +387,8 @@  discard block
 block discarded – undo
387 387
         return $form;
388 388
     }
389 389
     
390
-    function user_alert_threshold(){
391
-        $form['forms'] = array(base_url() . 'user/user_alert_threshold/', array("id" => "customer_alert_threshold", "name" => "customer_alert_threshold"));
390
+    function user_alert_threshold() {
391
+        $form['forms'] = array(base_url().'user/user_alert_threshold/', array("id" => "customer_alert_threshold", "name" => "customer_alert_threshold"));
392 392
         $form[gettext('Low Balance Alert Email')] = array(
393 393
             array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''),
394 394
             array(gettext('Enable Email Alerts ?'), 'notify_flag', 'SELECT', '', '', 'tOOL TIP', '', '', '', '', 'custom_status'),
@@ -400,34 +400,34 @@  discard block
 block discarded – undo
400 400
     }
401 401
     function build_cdrs_report($type) {
402 402
 		$account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
403
-        $currency_id=$account_info['currency_id'];
404
-        $currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id);	
403
+        $currency_id = $account_info['currency_id'];
404
+        $currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id);	
405 405
         
406
-        if($type == '0' || $type =='1'){
407
-            $cost_array=array(gettext("Debit")."($currency)", "140", "debit", "debit", "debit", "convert_to_currency","","true","right");
406
+        if ($type == '0' || $type == '1') {
407
+            $cost_array = array(gettext("Debit")."($currency)", "140", "debit", "debit", "debit", "convert_to_currency", "", "true", "right");
408 408
         }
409
-        if($type =='3'){
410
-            $cost_array=array(gettext("Debit")."($currency)", "140", "cost", "cost", "cost", "convert_to_currency","","true","right");
409
+        if ($type == '3') {
410
+            $cost_array = array(gettext("Debit")."($currency)", "140", "cost", "cost", "cost", "convert_to_currency", "", "true", "right");
411 411
         }
412 412
         $grid_field_arr = json_encode(array(
413
-			array(gettext("Date"), "170", "callstart", "callstart", "callstart", "convert_GMT_to","","true","center"),
414
-            array(gettext("Caller ID"), "110", "callerid", "", "", "","","true","center"),
415
-            array(gettext("Called Number"), "160", "callednum", "", "", "","","true","center"),
416
-            array(gettext("Destination"), "160", "notes", "", "", "","","true","center"),
417
-            array(gettext("Duration"), "140", "billseconds", "user_cdrs_report_search", "billseconds", "convert_to_show_in","","true","center"),
413
+			array(gettext("Date"), "170", "callstart", "callstart", "callstart", "convert_GMT_to", "", "true", "center"),
414
+            array(gettext("Caller ID"), "110", "callerid", "", "", "", "", "true", "center"),
415
+            array(gettext("Called Number"), "160", "callednum", "", "", "", "", "true", "center"),
416
+            array(gettext("Destination"), "160", "notes", "", "", "", "", "true", "center"),
417
+            array(gettext("Duration"), "140", "billseconds", "user_cdrs_report_search", "billseconds", "convert_to_show_in", "", "true", "center"),
418 418
             $cost_array,
419
-            array(gettext("Disposition"), "160", "disposition", "", "", "","","true","center"),
420
-            array(gettext("Call Type"), "233", "calltype", "", "", "","","true","center"),
419
+            array(gettext("Disposition"), "160", "disposition", "", "", "", "", "true", "center"),
420
+            array(gettext("Call Type"), "233", "calltype", "", "", "", "", "true", "center"),
421 421
                 ));
422 422
         return $grid_field_arr;
423 423
     }
424 424
     
425 425
     function build_cdrs_report_search($type) {
426
-         if($type == '0' || $type =='1'){
427
-            $cost_array=array(gettext('Debit'), 'INPUT', array('name' => 'debit[debit]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'debit[debit-integer]', '', '', '', 'search_int_type', '');
426
+         if ($type == '0' || $type == '1') {
427
+            $cost_array = array(gettext('Debit'), 'INPUT', array('name' => 'debit[debit]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'debit[debit-integer]', '', '', '', 'search_int_type', '');
428 428
         }
429
-        if($type =='3'){
430
-            $cost_array=array(gettext('Debit'), 'INPUT', array('name' => 'cost[cost]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'cost[cost-integer]', '', '', '', 'search_int_type', '');
429
+        if ($type == '3') {
430
+            $cost_array = array(gettext('Debit'), 'INPUT', array('name' => 'cost[cost]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'cost[cost-integer]', '', '', '', 'search_int_type', '');
431 431
         }
432 432
         $form['forms'] = array("", array('id' => "user_cdrs_report_search"));
433 433
         $form['Search'] = array(
@@ -443,25 +443,25 @@  discard block
 block discarded – undo
443 443
             array('', 'HIDDEN', 'ajax_search', '1', '', '', ''),
444 444
             array('', 'HIDDEN', 'advance_search', '1', '', '', '')       
445 445
         );
446
-		$form['display_in']=array('name' => 'search_in',"id"=>"search_in","function"=>"search_report_in", "content"=>gettext("Display records in"),'label_class' => "search_label col-md-3 no-padding","dropdown_class"=>"form-control","label_style"=>"font-size:13px;","dropdown_style"=>"background: #ddd; width: 21% !important;");
446
+		$form['display_in'] = array('name' => 'search_in', "id"=>"search_in", "function"=>"search_report_in", "content"=>gettext("Display records in"), 'label_class' => "search_label col-md-3 no-padding", "dropdown_class"=>"form-control", "label_style"=>"font-size:13px;", "dropdown_style"=>"background: #ddd; width: 21% !important;");
447 447
 	    $form['button_search'] = array('name' => 'action', 'id' => "user_cdr_search_btn", 'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right');
448 448
         $form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => gettext('Clear'), 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10');
449 449
         return $form;
450 450
     }
451 451
     function build_cdrs_report_buttons() {
452
-        $buttons_json = json_encode(array(array(gettext("Export"),"btn btn-xing" ," fa fa-download fa-lg", "button_action", "/user/user_report_export/", 'single')));
452
+        $buttons_json = json_encode(array(array(gettext("Export"), "btn btn-xing", " fa fa-download fa-lg", "button_action", "/user/user_report_export/", 'single')));
453 453
         return $buttons_json;
454 454
     }
455 455
     
456
-    function build_user_refill_report(){
456
+    function build_user_refill_report() {
457 457
 		$account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
458
-		$currency_id=$account_info['currency_id'];
459
-		$currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id);
458
+		$currency_id = $account_info['currency_id'];
459
+		$currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id);
460 460
          $grid_field_arr = json_encode(array(
461
-            array(gettext("Date"), "220", "payment_date", "", "", "","","true","center"),
462
-            array(gettext("Amount")."($currency)", "220", "credit", "credit", "credit", "convert_to_currency","","true","right"),
463
-            array(gettext("Refill By"), "270", "payment_by", "payment_by", "payment_by", "get_refill_by","","true","center"),
464
-            array(gettext("Note"), "300", "notes", "", "", "","","true","center")
461
+            array(gettext("Date"), "220", "payment_date", "", "", "", "", "true", "center"),
462
+            array(gettext("Amount")."($currency)", "220", "credit", "credit", "credit", "convert_to_currency", "", "true", "right"),
463
+            array(gettext("Refill By"), "270", "payment_by", "payment_by", "payment_by", "get_refill_by", "", "true", "center"),
464
+            array(gettext("Note"), "300", "notes", "", "", "", "", "true", "center")
465 465
                 ));
466 466
         return $grid_field_arr;
467 467
     }
@@ -481,14 +481,14 @@  discard block
 block discarded – undo
481 481
     }
482 482
 
483 483
     function build_user_fund_transfer_form($number, $currency_id, $id) {
484
-        $form['forms'] = array(base_url() . 'user/user_fund_transfer_save/', array('id' => 'user_fund_transfer_form', 'method' => 'POST','class'=>'build_user_fund_transfer_frm' ,'name' => 'user_fund_transfer_form'));
484
+        $form['forms'] = array(base_url().'user/user_fund_transfer_save/', array('id' => 'user_fund_transfer_form', 'method' => 'POST', 'class'=>'build_user_fund_transfer_frm', 'name' => 'user_fund_transfer_form'));
485 485
         $form[gettext('Fund Transfer')] = array(
486 486
             array('', 'HIDDEN', array('name' => 'id', 'value' => $id), '', '', '', ''),
487 487
             array('', 'HIDDEN', array('name' => 'account_currency', 'value' => $currency_id), '', '', ''),
488 488
             array(gettext('From Account'), 'INPUT', array('name' => 'fromaccountid', 'size' => '20', 'value' => $number, 'readonly' => true, 'class' => "text field medium"), 'required', 'tOOL TIP', 'Please Enter account number'),
489 489
             array(gettext('To Account'), 'INPUT', array('name' => 'toaccountid', 'size' => '20', 'class' => "text field medium"), 'trim|required|numeric', 'tOOL TIP', 'Please Enter to account number'),
490
-            array(gettext('Amount'), 'INPUT', array('name' => 'credit', 'size' => '20',  'class' => "text field medium"), 'trim|required|numeric', 'tOOL TIP', ''),
491
-            array(gettext('Note'), 'TEXTAREA', array('name' => 'notes', 'size' => '20', 'cols' => '63', 'rows' => '5', 'class' => "form-control col-md-5  text field medium",'style'=>'height: 80px;'), '', 'tOOL TIP', '')
490
+            array(gettext('Amount'), 'INPUT', array('name' => 'credit', 'size' => '20', 'class' => "text field medium"), 'trim|required|numeric', 'tOOL TIP', ''),
491
+            array(gettext('Note'), 'TEXTAREA', array('name' => 'notes', 'size' => '20', 'cols' => '63', 'rows' => '5', 'class' => "form-control col-md-5  text field medium", 'style'=>'height: 80px;'), '', 'tOOL TIP', '')
492 492
         );
493 493
         $form['button_save'] = array('name' => 'action', 'content' => 'Transfer', 'value' => gettext('save'), 'id' => "submit", 'type' => 'submit', 'class' => 'btn btn-line-parrot');
494 494
         return $form;
@@ -503,10 +503,10 @@  discard block
 block discarded – undo
503 503
     }
504 504
     function build_user_opensips() {
505 505
         $grid_field_arr = json_encode(array(
506
-	    array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "", "", "","","false","center"),
507
-            array("Username", "240", "username", "", "", "","","true","center"),
508
-            array("Password", "240", "password", "", "", "","","true","center"),
509
-            array("Domain", "240", "domain", "", "", "","","true","center"),
506
+	    array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "", "", "", "", "false", "center"),
507
+            array("Username", "240", "username", "", "", "", "", "true", "center"),
508
+            array("Password", "240", "password", "", "", "", "", "true", "center"),
509
+            array("Domain", "240", "domain", "", "", "", "", "true", "center"),
510 510
             array("Action", "200", "", "", "",
511 511
                 array("EDIT" => array("url" => 'user/user_opensips_edit/', "mode" => "popup"),
512 512
                     "DELETE" => array("url" => 'user/user_opensips_delete/', "mode" => "popup")
@@ -515,17 +515,17 @@  discard block
 block discarded – undo
515 515
     }
516 516
     
517 517
     function build_user_opensips_form($id = false) {
518
-        $val = $id > 0 ? 'subscriber.username.' . $id : 'subscriber.username';
518
+        $val = $id > 0 ? 'subscriber.username.'.$id : 'subscriber.username';
519 519
         $uname_user = $this->CI->common->find_uniq_rendno('10', '', '');
520 520
         $password = $this->CI->common->generate_password();
521 521
         $accountinfo = $this->CI->session->userdata('accountinfo');
522
-        $form['forms'] = array(base_url() . 'user/user_opensips_save/', array("id" => "opensips_form", "name" => "opensips_form"));
522
+        $form['forms'] = array(base_url().'user/user_opensips_save/', array("id" => "opensips_form", "name" => "opensips_form"));
523 523
         $form['Opensips Device'] = array(
524 524
 	  array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''),
525 525
 	  array('', 'HIDDEN', array('name' => 'accountcode', 'value' =>$accountinfo['number']), '', '', '', ''),
526
-	  array('Username', 'INPUT', array('name' => 'username', 'size' => '20',  'id' => 'username', 'value' => $uname_user, 'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter account number', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;" title="Reset Password" class="change_number fa fa-refresh"></i>'),
526
+	  array('Username', 'INPUT', array('name' => 'username', 'size' => '20', 'id' => 'username', 'value' => $uname_user, 'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter account number', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;" title="Reset Password" class="change_number fa fa-refresh"></i>'),
527 527
 	  array('Password', 'PASSWORD', array('name' => 'password', 'size' => '20', 'id' => 'password1', 'value' => $password, 'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter Password', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;" title="Reset Password" class="change_pass fa fa-refresh"></i>'),
528
-	  array('Domain', 'INPUT', array('name' => 'domain', 'size' => '20',  'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'),
528
+	  array('Domain', 'INPUT', array('name' => 'domain', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'),
529 529
 	  array('Status', 'status', 'SELECT', '', '', 'tOOL TIP', 'Please Select Status', '', '', '', 'set_status'),                
530 530
         );
531 531
         $form['button_save'] = array('name' => 'action', 'content' => 'Save', 'value' => 'save', 'type' => 'button', 'id' => 'submit', 'class' => 'btn btn-line-parrot');
@@ -545,11 +545,11 @@  discard block
 block discarded – undo
545 545
 
546 546
         return $form;
547 547
     }
548
-    function build_user_did_form(){
549
-    $form['forms'] = array(base_url() . 'user/user_dids_action/edit/', array("id" => "user_did_form", "name" => "user_did_form"));
548
+    function build_user_did_form() {
549
+    $form['forms'] = array(base_url().'user/user_dids_action/edit/', array("id" => "user_did_form", "name" => "user_did_form"));
550 550
         $form['Edit'] = array(
551
-	  array('', 'HIDDEN', array('name' => 'free_didlist'),'', '', '', ''),
552
-	  array(gettext('DID'), 'INPUT', array('name' => 'number', 'size' => '20', 'class' => "text field medium","readonly"=>"true"), 'trim|required|is_numeric|xss_clean|integer', 'tOOL TIP', 'Please Enter account number'),
551
+	  array('', 'HIDDEN', array('name' => 'free_didlist'), '', '', '', ''),
552
+	  array(gettext('DID'), 'INPUT', array('name' => 'number', 'size' => '20', 'class' => "text field medium", "readonly"=>"true"), 'trim|required|is_numeric|xss_clean|integer', 'tOOL TIP', 'Please Enter account number'),
553 553
 	  array(gettext('Call Type'), 'call_type', 'SELECT', '', '', 'tOOL TIP', '', '', '', '', 'set_call_type', ''),
554 554
 	  array(gettext('Destination'), 'INPUT', array('name' => 'extensions', 'size' => '20', 'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter Password'),
555 555
         );
@@ -559,31 +559,31 @@  discard block
 block discarded – undo
559 559
     }
560 560
     
561 561
     function build_provider_report_buttons() {
562
-        $buttons_json = json_encode(array(array("Export","btn btn-xing" ," fa fa-download fa-lg", "button_action", "/user/user_provider_cdrreport_export/", 'single')));
562
+        $buttons_json = json_encode(array(array("Export", "btn btn-xing", " fa fa-download fa-lg", "button_action", "/user/user_provider_cdrreport_export/", 'single')));
563 563
         return $buttons_json;
564 564
     }
565 565
     
566 566
     
567 567
      function build_provider_report($type) {
568 568
 		$account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
569
-        $currency_id=$account_info['currency_id'];
570
-        $currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id);	
569
+        $currency_id = $account_info['currency_id'];
570
+        $currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id);	
571 571
         
572
-        if($type == '0' || $type =='1'){
573
-            $cost_array=array("Debit($currency)", "140", "debit", "debit", "debit", "convert_to_currency","","true","right");
572
+        if ($type == '0' || $type == '1') {
573
+            $cost_array = array("Debit($currency)", "140", "debit", "debit", "debit", "convert_to_currency", "", "true", "right");
574 574
         }
575
-        if($type =='3'){
576
-            $cost_array=array("Cost($currency)", "140", "cost", "cost", "cost", "convert_to_currency","","true","right");
575
+        if ($type == '3') {
576
+            $cost_array = array("Cost($currency)", "140", "cost", "cost", "cost", "convert_to_currency", "", "true", "right");
577 577
         }
578 578
         $grid_field_arr = json_encode(array(
579
-			array("Date", "170", "callstart", "callstart", "callstart", "convert_GMT_to","","true","center"),
580
-            array("Caller ID", "110", "callerid", "", "", "","","true","center"),
581
-            array("Called Number", "160", "callednum", "", "", "","","true","center"),
582
-            array("Destination", "160", "notes", "", "", "","","true","center"),
583
-            array("Duration", "140", "billseconds", "user_provider_cdrs_report_search", "billseconds", "convert_to_show_in","","true","center"),
579
+			array("Date", "170", "callstart", "callstart", "callstart", "convert_GMT_to", "", "true", "center"),
580
+            array("Caller ID", "110", "callerid", "", "", "", "", "true", "center"),
581
+            array("Called Number", "160", "callednum", "", "", "", "", "true", "center"),
582
+            array("Destination", "160", "notes", "", "", "", "", "true", "center"),
583
+            array("Duration", "140", "billseconds", "user_provider_cdrs_report_search", "billseconds", "convert_to_show_in", "", "true", "center"),
584 584
             $cost_array,
585
-            array("Disposition", "160", "disposition", "", "", "","","true","center"),
586
-            array("Call Type", "233", "calltype", "", "", "","","true","center"),
585
+            array("Disposition", "160", "disposition", "", "", "", "", "true", "center"),
586
+            array("Call Type", "233", "calltype", "", "", "", "", "true", "center"),
587 587
                 ));
588 588
         return $grid_field_arr;
589 589
     }
@@ -591,7 +591,7 @@  discard block
 block discarded – undo
591 591
     
592 592
     function build_provider_report_search($type) {
593 593
 
594
-       $cost_array=array('Cost ', 'INPUT', array('name' => 'cost[cost]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'cost[cost-integer]', '', '', '', 'search_int_type', '');
594
+       $cost_array = array('Cost ', 'INPUT', array('name' => 'cost[cost]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'cost[cost-integer]', '', '', '', 'search_int_type', '');
595 595
         $form['forms'] = array("", array('id' => "user_provider_cdrs_report_search"));
596 596
         $form['Search'] = array(
597 597
            array('From Date', 'INPUT', array('name' => 'callstart[]', 'id' => 'customer_cdr_from_date', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '', 'start_date[start_date-date]'),
@@ -607,7 +607,7 @@  discard block
 block discarded – undo
607 607
             array('', 'HIDDEN', 'ajax_search', '1', '', '', ''),
608 608
             array('', 'HIDDEN', 'advance_search', '1', '', '', '')       
609 609
         );
610
-		$form['display_in']=array('name' => 'search_in',"id"=>"search_in","function"=>"search_report_in", "content"=>"Display records in",'label_class' => "search_label col-md-3 no-padding","dropdown_class"=>"form-control","label_style"=>"font-size:13px;","dropdown_style"=>"background: #ddd; width: 21% !important;");
610
+		$form['display_in'] = array('name' => 'search_in', "id"=>"search_in", "function"=>"search_report_in", "content"=>"Display records in", 'label_class' => "search_label col-md-3 no-padding", "dropdown_class"=>"form-control", "label_style"=>"font-size:13px;", "dropdown_style"=>"background: #ddd; width: 21% !important;");
611 611
         $form['button_search'] = array('name' => 'action', 'id' => "user_provider_cdr_search_btn", 'content' => 'Search', 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right');
612 612
         $form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => 'Clear', 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10');
613 613
         return $form;
Please login to merge, or discard this patch.
Braces   +8 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,7 +21,9 @@  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')) exit('No direct script access allowed'); 
24
+if ( ! defined('BASEPATH')) {
25
+	exit('No direct script access allowed');
26
+}
25 27
 class User_form{
26 28
     function __construct($library_name = '') {
27 29
         $this->CI = & get_instance();
@@ -76,10 +78,11 @@  discard block
 block discarded – undo
76 78
     }
77 79
    
78 80
     function get_userprofile_form_fields($dataArr = false) {
79
-        if ($dataArr['id'] > 0)
80
-            $val = 'accounts.email.' . $dataArr['id'];
81
-        else
82
-            $val = 'accounts.email';
81
+        if ($dataArr['id'] > 0) {
82
+                    $val = 'accounts.email.' . $dataArr['id'];
83
+        } else {
84
+                    $val = 'accounts.email';
85
+        }
83 86
 			$uname = $this->CI->common->find_uniq_rendno(common_model::$global_config['system_config']['cardlength'], 'number', 'accounts');
84 87
 			$password = $this->CI->common->generate_password();
85 88
 			$logintype=$this->CI->session->userdata('logintype');
Please login to merge, or discard this patch.
astpp/application/modules/user/views/view_user_alert_threshold.php 3 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -31,22 +31,22 @@
 block discarded – undo
31 31
             <div class="col-md-12 no-padding color-three border_box"> 
32 32
                 <div class="pull-left">
33 33
                      <ul class="breadcrumb">
34
-                                         <?php $accountinfo=$this->session->userdata('accountinfo');
35
-                          if($accountinfo['type']==1){ ?>
36
-                          <li><a href="<?= base_url() . "user/user_myprofile/"; ?>">My Profile</a></li>
37
-                          <?php }else{ ?>
34
+                                         <?php $accountinfo = $this->session->userdata('accountinfo');
35
+                          if ($accountinfo['type'] == 1) { ?>
36
+                          <li><a href="<?= base_url()."user/user_myprofile/"; ?>">My Profile</a></li>
37
+                          <?php } else { ?>
38 38
 			    <li><a href="#">Configuration</a></li>
39 39
                           <?php } ?>
40 40
 			  <li class='active'>
41
-                             <a href="<?= base_url() . "user/user_alert_threshold/"; ?>">Alert Threshold</a>
41
+                             <a href="<?= base_url()."user/user_alert_threshold/"; ?>">Alert Threshold</a>
42 42
                           </li>
43 43
                     </ul>
44 44
                 </div>
45
-                <?php if($accountinfo['type']==1) { ?>
45
+                <?php if ($accountinfo['type'] == 1) { ?>
46 46
                    <div class="pull-right">
47 47
                     <ul class="breadcrumb">
48 48
 		      <li class="active pull-right">
49
-		      <a href="<?= base_url() . "user/user_myprofile/"; ?>"> <i class="fa fa-fast-backward" aria-hidden="true"></i> Back</a></li>
49
+		      <a href="<?= base_url()."user/user_myprofile/"; ?>"> <i class="fa fa-fast-backward" aria-hidden="true"></i> Back</a></li>
50 50
                     </ul>
51 51
                    </div>
52 52
                 <?php }?>      
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
                 <div class="pull-left">
44 44
                     <ul class="breadcrumb">
45 45
                     <?php $accountinfo=$this->session->userdata('accountinfo');
46
-                          if($accountinfo['type']==1){ ?>
46
+						  if($accountinfo['type']==1){ ?>
47 47
                           <li><a href="<?= base_url() . "user/user_myprofile/"; ?>">My Profile</a></li>
48 48
                           <?php }else{ ?>
49 49
 			    <li><a href="#">Billing</a></li>
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
                          <?php $accountinfo=$this->session->userdata('accountinfo');
25 25
                           if($accountinfo['type']==1){ ?>
26 26
                           <li><a href="<?= base_url() . "user/user_myprofile/"; ?>">My Profile</a></li>
27
-                          <?php }else{ ?>
27
+                          <?php } else{ ?>
28 28
 			    <li><a href="#">Configuration</a></li>
29 29
                           <?php }
30 30
                     ?>
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/user/views/view_user_details.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
             <div class="col-md-12 no-padding color-three border_box"> 
35 35
                 <div class="pull-left">
36 36
                     <ul class="breadcrumb">
37
-                        <li class="active"><a href="<?= base_url() . "user/user_myprofile/";?>"> My Profile </a></li>
37
+                        <li class="active"><a href="<?= base_url()."user/user_myprofile/"; ?>"> My Profile </a></li>
38 38
                     </ul>
39 39
                 </div>
40 40
             </div>
Please login to merge, or discard this patch.
astpp/application/modules/user/views/view_user_invoices_config.php 3 patches
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -60,16 +60,16 @@  discard block
 block discarded – undo
60 60
             <div class="col-md-12 no-padding color-three border_box"> 
61 61
                 <div class="pull-left">
62 62
                     <ul class="breadcrumb">
63
-                        <li><a href="<?= base_url() . "user/user_myprofile/"; ?>">My Profile</a></li>
63
+                        <li><a href="<?= base_url()."user/user_myprofile/"; ?>">My Profile</a></li>
64 64
                         <li class='active'>
65
-                            <a href="<?= base_url() . "user/user_invoice_config/"; ?>">Company Profile</a>
65
+                            <a href="<?= base_url()."user/user_invoice_config/"; ?>">Company Profile</a>
66 66
                         </li>
67 67
                     </ul>
68 68
                 </div>
69 69
                 <div class="pull-right">
70 70
                     <ul class="breadcrumb">
71 71
 		      <li class="active pull-right">
72
-		      <a href="<?= base_url() . "user/user_myprofile/"; ?>"> <i class="fa fa-fast-backward" aria-hidden="true"></i> Back</a></li>
72
+		      <a href="<?= base_url()."user/user_myprofile/"; ?>"> <i class="fa fa-fast-backward" aria-hidden="true"></i> Back</a></li>
73 73
                     </ul>
74 74
                 </div>
75 75
             </div>
@@ -96,8 +96,8 @@  discard block
 block discarded – undo
96 96
 				<div class='col-md-4 no-padding'><label>Invoice Due Notification:</label></div>
97 97
 				<div class='col-md-6'>
98 98
 				<select name="invoice_due_notification" value="<?= $account_data['invoice_due_notification'] ?>" class="col-md-12 form-control">
99
-                                    <option value=0 <?=$account_data['invoice_due_notification'] ==0 ? 'selected':''; ?>>Enable</option>
100
-                                    <option value=1 <?=$account_data['invoice_due_notification'] ==1 ? 'selected':''; ?>>Disable</option>
99
+                                    <option value=0 <?=$account_data['invoice_due_notification'] == 0 ? 'selected' : ''; ?>>Enable</option>
100
+                                    <option value=1 <?=$account_data['invoice_due_notification'] == 1 ? 'selected' : ''; ?>>Disable</option>
101 101
 				</select>
102 102
 			</div>	
103 103
 		</div>
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
 				<div class='col-md-4 no-padding '><label>Invoice Notification:</label></div>
112 112
 				<div class='col-md-6'>
113 113
 				<select name="invoice_notification" value="<?= $account_data['invoice_notification'] ?>" class="col-md-12 form-control">
114
-					<option value=0 <?=$account_data['invoice_notification'] ==0 ? 'selected':''; ?> >Enable</option>
115
-					<option value=1 <?=$account_data['invoice_notification'] ==1 ? 'selected':''; ?> >Disable</option>
114
+					<option value=0 <?=$account_data['invoice_notification'] == 0 ? 'selected' : ''; ?> >Enable</option>
115
+					<option value=1 <?=$account_data['invoice_notification'] == 1 ? 'selected' : ''; ?> >Disable</option>
116 116
 				</select>
117 117
 				</div>
118 118
 			</div>
@@ -198,13 +198,13 @@  discard block
 block discarded – undo
198 198
 				</div>
199 199
 		</div>	
200 200
 <?php
201
-	if($account_data['logo']  != ''){
202
-	     $logo=$account_data['file'];
203
-	}else{
204
-	     $logo=$account_data['logo'];
201
+	if ($account_data['logo'] != '') {
202
+	     $logo = $account_data['file'];
203
+	} else {
204
+	     $logo = $account_data['logo'];
205 205
 	}
206
-          if($logo != ''){        
207
-             $file_name= base_url()."upload/$logo";
206
+          if ($logo != '') {        
207
+             $file_name = base_url()."upload/$logo";
208 208
 ?>
209 209
 
210 210
 		<div class='col-md-12 no-padding'>
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -207,12 +207,12 @@
 block discarded – undo
207 207
 		</div>	
208 208
 <?php
209 209
 	if($account_data['logo']  != ''){
210
-	     $logo=$account_data['file'];
210
+		 $logo=$account_data['file'];
211 211
 	}else{
212
-	     $logo=$account_data['logo'];
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.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -208,7 +208,7 @@
 block discarded – undo
208 208
 <?php
209 209
 	if($account_data['logo']  != ''){
210 210
 	     $logo=$account_data['file'];
211
-	}else{
211
+	} else{
212 212
 	     $logo=$account_data['logo'];
213 213
 	}
214 214
           if($logo != ''){        
Please login to merge, or discard this patch.
astpp/application/modules/user/views/view_user_charges_list.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
                 <div class="pull-left">
44 44
                     <ul class="breadcrumb">
45 45
                     <?php $accountinfo=$this->session->userdata('accountinfo');
46
-                          if($accountinfo['type']==1){ ?>
46
+						  if($accountinfo['type']==1){ ?>
47 47
                           <li><a href="<?= base_url() . "user/user_myprofile/"; ?>">My Profile</a></li>
48 48
                           <?php }else{ ?>
49 49
 			    <li><a href="#">Billing</a></li>
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -42,22 +42,22 @@
 block discarded – undo
42 42
             <div class="col-md-12 no-padding color-three border_box"> 
43 43
                 <div class="pull-left">
44 44
                     <ul class="breadcrumb">
45
-                    <?php $accountinfo=$this->session->userdata('accountinfo');
46
-                          if($accountinfo['type']==1){ ?>
47
-                          <li><a href="<?= base_url() . "user/user_myprofile/"; ?>">My Profile</a></li>
48
-                          <?php }else{ ?>
45
+                    <?php $accountinfo = $this->session->userdata('accountinfo');
46
+                          if ($accountinfo['type'] == 1) { ?>
47
+                          <li><a href="<?= base_url()."user/user_myprofile/"; ?>">My Profile</a></li>
48
+                          <?php } else { ?>
49 49
 			    <li><a href="#">Billing</a></li>
50 50
                           <?php } ?>
51 51
 			  <li class='active'>
52
-                            <a href="<?= base_url() . "user/user_charges_history/"; ?>">Charges History </a>
52
+                            <a href="<?= base_url()."user/user_charges_history/"; ?>">Charges History </a>
53 53
                           </li>
54 54
                     </ul>
55 55
                 </div>
56
-                <?php if($accountinfo['type']==1) { ?>
56
+                <?php if ($accountinfo['type'] == 1) { ?>
57 57
                    <div class="pull-right">
58 58
                     <ul class="breadcrumb">
59 59
 		      <li class="active pull-right">
60
-		      <a href="<?= base_url() . "user/user_myprofile/"; ?>"> <i class="fa fa-fast-backward" aria-hidden="true"></i> Back</a></li>
60
+		      <a href="<?= base_url()."user/user_myprofile/"; ?>"> <i class="fa fa-fast-backward" aria-hidden="true"></i> Back</a></li>
61 61
                     </ul>
62 62
                    </div>
63 63
                 <?php }?>
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
                          <?php $accountinfo=$this->session->userdata('accountinfo');
25 25
                           if($accountinfo['type']==1){ ?>
26 26
                           <li><a href="<?= base_url() . "user/user_myprofile/"; ?>">My Profile</a></li>
27
-                          <?php }else{ ?>
27
+                          <?php } else{ ?>
28 28
 			    <li><a href="#">Configuration</a></li>
29 29
                           <?php }
30 30
                     ?>
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/user/views/user_payment.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 
2 2
 <? extend('master.php') ?>
3
-<?php error_reporting(E_ERROR);?>
3
+<?php error_reporting(E_ERROR); ?>
4 4
 <? startblock('extra_head') ?>
5 5
 <style>
6 6
 body{
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 				  <input type="text" name="gross_amount" id="gross_amount" value="0" class="form-control">
83 83
 		  </div> 
84 84
           <div class='col-md-7 no-padding'>	  
85
-				  <label style=" float: left;">Tax Rate: (<?= $paypal_tax;?>%):</label> 	 
85
+				  <label style=" float: left;">Tax Rate: (<?= $paypal_tax; ?>%):</label> 	 
86 86
 		  </div>
87 87
 		  <div class='col-md-5'>	  
88 88
 				  <input type="text" name="tax_amount" id="tax_amount" readonly value="0"  class="form-control">	 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 			  <input type="hidden" readonly name="quantity" value="1"> 
112 112
 			  <input type="hidden" readonly name="rm" value="2">
113 113
 			  <input type="hidden" readonly name="no_shipping" value="1">
114
-			  <input type="hidden" readonly name="PHPSESSID" value="<?=session_id();?>">
114
+			  <input type="hidden" readonly name="PHPSESSID" value="<?=session_id(); ?>">
115 115
 			  <input type="hidden" readonly name="currency_code" value="USD">
116 116
 			  <input type="hidden" readonly name="notify_url" value="<?= base_url()?>login/paypal_response/">
117 117
 			  <input type="hidden" readonly name="return" value="<?= base_url()?>login/paypal_response/">
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 	  
128 128
 		  <div class="col-md-12 margin-b-10 margin-t-10">
129 129
 		      <div style="text-align:center;">
130
-			    <img src="<?php echo base_url();?>/assets/images/paypal_logo11.png" alt="paypal">
130
+			    <img src="<?php echo base_url(); ?>/assets/images/paypal_logo11.png" alt="paypal">
131 131
 		      </div>			
132 132
 		  </div>
133 133
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,10 @@
 block discarded – undo
68 68
 				
69 69
             <div class="col-md-12" style='margin-top:15px;' > 
70 70
 		    <div style="color:red;text-align:center;">
71
-			<?php if (isset($validation_errors)) echo $validation_errors; ?> 
71
+			<?php if (isset($validation_errors)) {
72
+	echo $validation_errors;
73
+}
74
+?> 
72 75
 		    </div>
73 76
       
74 77
 			<div class='col-md-12'>
Please login to merge, or discard this patch.
astpp/application/modules/user/views/view_user_invoices_list.php 3 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -52,24 +52,24 @@
 block discarded – undo
52 52
             <div class="col-md-12 no-padding color-three border_box"> 
53 53
                 <div class="pull-left">
54 54
                     <ul class="breadcrumb">
55
-                    <?php $accountinfo=$this->session->userdata('accountinfo');
56
-                          if($accountinfo['type']==1){ ?>
57
-                          <li><a href="<?= base_url() . "user/user_myprofile/"; ?>">My Profile</a></li>
58
-                          <?php }else{ ?>
55
+                    <?php $accountinfo = $this->session->userdata('accountinfo');
56
+                          if ($accountinfo['type'] == 1) { ?>
57
+                          <li><a href="<?= base_url()."user/user_myprofile/"; ?>">My Profile</a></li>
58
+                          <?php } else { ?>
59 59
 			    <li><a href="#">Billing</a></li>
60 60
                           <?php }
61 61
                     ?>
62 62
                         
63 63
                         <li class='active'>
64
-                            <a href="<?= base_url() . "user/user_invoices_list/"; ?>">Invoices </a>
64
+                            <a href="<?= base_url()."user/user_invoices_list/"; ?>">Invoices </a>
65 65
                         </li>
66 66
                     </ul>
67 67
                 </div>
68
-                <?php if($accountinfo['type']==1) { ?>
68
+                <?php if ($accountinfo['type'] == 1) { ?>
69 69
                    <div class="pull-right">
70 70
                     <ul class="breadcrumb">
71 71
 		      <li class="active pull-right">
72
-		      <a href="<?= base_url() . "user/user_myprofile/"; ?>"> <i class="fa fa-fast-backward" aria-hidden="true"></i> Back</a></li>
72
+		      <a href="<?= base_url()."user/user_myprofile/"; ?>"> <i class="fa fa-fast-backward" aria-hidden="true"></i> Back</a></li>
73 73
                     </ul>
74 74
                    </div>
75 75
                 <?php }?>
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,12 +22,12 @@
 block discarded – undo
22 22
                 <div class="pull-left">
23 23
                     <ul class="breadcrumb">
24 24
                          <?php $accountinfo=$this->session->userdata('accountinfo');
25
-                          if($accountinfo['type']==1){ ?>
25
+						  if($accountinfo['type']==1){ ?>
26 26
                           <li><a href="<?= base_url() . "user/user_myprofile/"; ?>">My Profile</a></li>
27 27
                           <?php }else{ ?>
28 28
 			    <li><a href="#">Configuration</a></li>
29 29
                           <?php }
30
-                    ?>
30
+					?>
31 31
                         
32 32
                         <li class='active'>
33 33
                             <a href="<?= base_url() . "user/user_ipmap/"; ?>">IP Settings</a>
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
                          <?php $accountinfo=$this->session->userdata('accountinfo');
25 25
                           if($accountinfo['type']==1){ ?>
26 26
                           <li><a href="<?= base_url() . "user/user_myprofile/"; ?>">My Profile</a></li>
27
-                          <?php }else{ ?>
27
+                          <?php } else{ ?>
28 28
 			    <li><a href="#">Configuration</a></li>
29 29
                           <?php }
30 30
                     ?>
Please login to merge, or discard this patch.
astpp/application/modules/user/views/view_user_packages_list.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,16 +14,16 @@
 block discarded – undo
14 14
             <div class="col-md-12 no-padding color-three border_box"> 
15 15
                 <div class="pull-left">
16 16
                     <ul class="breadcrumb">
17
-                        <li><a href="<?= base_url() . "user/user_myprofile/"; ?>">My Profile</a></li>
17
+                        <li><a href="<?= base_url()."user/user_myprofile/"; ?>">My Profile</a></li>
18 18
                         <li class='active'>
19
-                            <a href="<?= base_url() . "user/user_packages/"; ?>">Packages</a>
19
+                            <a href="<?= base_url()."user/user_packages/"; ?>">Packages</a>
20 20
                         </li>
21 21
                     </ul>
22 22
                 </div>
23 23
                 <div class="pull-right">
24 24
                     <ul class="breadcrumb">
25 25
 		      <li class="active pull-right">
26
-		      <a href="<?= base_url() . "user/user_myprofile/"; ?>"> <i class="fa fa-fast-backward" aria-hidden="true"></i> Back</a></li>
26
+		      <a href="<?= base_url()."user/user_myprofile/"; ?>"> <i class="fa fa-fast-backward" aria-hidden="true"></i> Back</a></li>
27 27
                     </ul>
28 28
                 </div>
29 29
             </div>     
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/user/views/view_user_speeddial.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
                     <ul class="breadcrumb">
64 64
                         <li><a href="#">Configuration</a></li>
65 65
                        <li class="active">
66
-                            <a href="<?= base_url() . "user/user_speeddial/"; ?>"> Speed Dial </a>
66
+                            <a href="<?= base_url()."user/user_speeddial/"; ?>"> Speed Dial </a>
67 67
                         </li>
68 68
                     </ul>
69 69
                 </div>
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
                                             </label>
120 120
                                             </div>
121 121
                                                <div class="col-md-3">
122
-                                            <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])) {
122
+                                            <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])) {
123 123
         echo $speeddial[$i];
124 124
     } ?>">
125 125
                                                </div>
Please login to merge, or discard this patch.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -91,14 +91,14 @@  discard block
 block discarded – undo
91 91
                                 <div class="col-md-4">Action</div>
92 92
                                  </div>
93 93
                                 <?php
94
-                                $res = $this->db_model->getSelect("*", "speed_dial", array("accountid" => $account_data[0]['id']));
95
-                                if ($res->num_rows() > 0) {
96
-                                    $result = $res->result_array();
97
-                                } else {
98
-                                    $result = 0;
99
-                                }
100
-                                for ($i = 0; $i <= 9; $i++) {
101
-                                    ?>
94
+								$res = $this->db_model->getSelect("*", "speed_dial", array("accountid" => $account_data[0]['id']));
95
+								if ($res->num_rows() > 0) {
96
+									$result = $res->result_array();
97
+								} else {
98
+									$result = 0;
99
+								}
100
+								for ($i = 0; $i <= 9; $i++) {
101
+									?>
102 102
                                     <div class="col-md-12">
103 103
                                         <div id="key<?php echo $i; ?><?php echo $i + 1; ?>" style="display:block;">
104 104
                                             <div class="col-md-1">
@@ -109,8 +109,8 @@  discard block
 block discarded – undo
109 109
                                             <div class="col-md-3">
110 110
                                                 <label class="col-md-2" name="speed_dial" size="16"> 
111 111
                                                     <?php if ($result[$i]['speed_num'] == $i) {
112
-                                                        echo $result[$i]['number'];
113
-                                                    } ?> 
112
+														echo $result[$i]['number'];
113
+													} ?> 
114 114
                                                 </label>
115 115
                                             </div>
116 116
                                             <div class="col-md-4 margin-b-10">
@@ -132,8 +132,8 @@  discard block
 block discarded – undo
132 132
                                             </div>
133 133
                                                <div class="col-md-3">
134 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
-        echo $speeddial[$i];
136
-    } ?>">
135
+		echo $speeddial[$i];
136
+	} ?>">
137 137
                                                </div>
138 138
                                             <div class="col-md-4">
139 139
                                           <div class="col-md-2 no-padding">
Please login to merge, or discard this patch.