Passed
Branch v3.5 (f0ef26)
by Samir
36:09
created
web_interface/astpp/application/modules/ipmap/views/ipmap_view.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
                         <form method="POST" action="del/0/" enctype="multipart/form-data" id="ListForm">
48 48
                             <table id="ipmap_grid" align="left" style="display:none;"></table>
49 49
                         </form>
50
-<h6><font color="#375c7c"><b><?=gettext("NOTE");?></b> : <?=gettext("Changing status (Active/Inactive) from here will not reload FreeSwitch ACL. That means FreeSwitch will still be able to accept the calls request from disabled IP but as the IP is disabled, their call will be failed with authentication error.");?> </font></h6>
50
+<h6><font color="#375c7c"><b><?=gettext("NOTE"); ?></b> : <?=gettext("Changing status (Active/Inactive) from here will not reload FreeSwitch ACL. That means FreeSwitch will still be able to accept the calls request from disabled IP but as the IP is disabled, their call will be failed with authentication error."); ?> </font></h6>
51 51
                 </div>  
52 52
             </div>
53 53
         </div>
Please login to merge, or discard this patch.
astpp/application/modules/refill_coupon/models/refill_coupon_model.php 2 patches
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -23,87 +23,87 @@
 block discarded – undo
23 23
 // ##############################################################################
24 24
 class Refill_coupon_model extends CI_Model {
25 25
 	function refill_coupon_model() {
26
-		parent::__construct ();
26
+		parent::__construct();
27 27
 	}
28 28
 	function get_refill_coupon_list($flag, $start = 0, $limit = 0, $export = false) {
29
-		$this->db_model->build_search ( 'refill_coupon_list_search' );
30
-		$accountinfo = $this->session->userdata ( 'accountinfo' );
29
+		$this->db_model->build_search('refill_coupon_list_search');
30
+		$accountinfo = $this->session->userdata('accountinfo');
31 31
 		$reseller_id = $accountinfo ['type'] == 1 ? $accountinfo ['id'] : 0;
32
-		$where = array (
32
+		$where = array(
33 33
 				'reseller_id' => $reseller_id 
34 34
 		);
35 35
 		if ($flag) {
36 36
 			if ($export)
37
-				$query = $this->db_model->select ( "*", "refill_coupon", $where, "id", "ASC", '', '' );
37
+				$query = $this->db_model->select("*", "refill_coupon", $where, "id", "ASC", '', '');
38 38
 			else
39
-				$query = $this->db_model->select ( "*", "refill_coupon", $where, "id", "ASC", $limit, $start );
39
+				$query = $this->db_model->select("*", "refill_coupon", $where, "id", "ASC", $limit, $start);
40 40
 		} else {
41
-			$query = $this->db_model->countQuery ( "*", "refill_coupon", $where );
41
+			$query = $this->db_model->countQuery("*", "refill_coupon", $where);
42 42
 		}
43 43
 		return $query;
44 44
 	}
45 45
 	function get_customer_refill_coupon_list($flag, $start = 0, $limit = 0, $accountid) {
46
-		$this->db_model->build_search ( 'refill_coupon_list_search' );
47
-		$accountinfo = $this->session->userdata ( 'accountinfo' );
46
+		$this->db_model->build_search('refill_coupon_list_search');
47
+		$accountinfo = $this->session->userdata('accountinfo');
48 48
 		$reseller_id = $accountinfo ['type'] == 1 ? $accountinfo ['id'] : ($accountinfo ['type'] == 0 ? $accountinfo ['reseller_id'] : 0);
49
-		$where = array (
49
+		$where = array(
50 50
 				'reseller_id' => $reseller_id,
51 51
 				"account_id" => $accountid 
52 52
 		);
53 53
 		if ($flag) {
54
-			$query = $this->db_model->select ( "*", "refill_coupon", $where, "id", "ASC", $limit, $start );
54
+			$query = $this->db_model->select("*", "refill_coupon", $where, "id", "ASC", $limit, $start);
55 55
 		} else {
56
-			$query = $this->db_model->countQuery ( "*", "refill_coupon", $where );
56
+			$query = $this->db_model->countQuery("*", "refill_coupon", $where);
57 57
 		}
58 58
 		return $query;
59 59
 	}
60 60
 	function add_refill_coupon($add_array) {
61 61
 		$count = $add_array ['count'];
62
-		unset ( $add_array ['action'] );
63
-		unset ( $add_array ['count'] );
62
+		unset ($add_array ['action']);
63
+		unset ($add_array ['count']);
64 64
 		$prefix = $add_array ['prefix'];
65
-		unset ( $add_array ['prefix'] );
66
-		$accountinfo = $this->session->userdata ( 'accountinfo' );
65
+		unset ($add_array ['prefix']);
66
+		$accountinfo = $this->session->userdata('accountinfo');
67 67
 		$reseller_id = $accountinfo ['type'] == 1 ? $accountinfo ['id'] : 0;
68
-		$insert_arr = array ();
68
+		$insert_arr = array();
69 69
 		$account_length = Common_model::$global_config ['system_config'] ['refill_coupon_length'];
70
-		$length = strlen ( $prefix );
70
+		$length = strlen($prefix);
71 71
 		if ($length != 0) {
72 72
 			$number_length = $account_length - $length;
73 73
 		} else {
74 74
 			$number_length = $account_length;
75 75
 		}
76
-		$add_array ['amount'] = $this->common_model->add_calculate_currency ( $add_array ['amount'], '', '', false, false );
77
-		$number = $this->common->find_uniq_rendno_accno ( $number_length, 'number', 'refill_coupon', $prefix, $count );
78
-		$date = gmdate ( 'Y-m-d H:i:s' );
79
-		for($i = 0; $i < $count; $i ++) {
80
-			$add_array ['number'] = trim ( $number [$i] );
76
+		$add_array ['amount'] = $this->common_model->add_calculate_currency($add_array ['amount'], '', '', false, false);
77
+		$number = $this->common->find_uniq_rendno_accno($number_length, 'number', 'refill_coupon', $prefix, $count);
78
+		$date = gmdate('Y-m-d H:i:s');
79
+		for ($i = 0; $i < $count; $i++) {
80
+			$add_array ['number'] = trim($number [$i]);
81 81
 			$add_array ['currency_id'] = $accountinfo ['currency_id'];
82 82
 			$add_array ['reseller_id'] = $reseller_id;
83 83
 			$add_array ['creation_date'] = $date;
84 84
 			$insert_arr [$i] = $add_array;
85 85
 		}
86
-		$this->db->insert_batch ( "refill_coupon", $insert_arr );
86
+		$this->db->insert_batch("refill_coupon", $insert_arr);
87 87
 		return true;
88 88
 	}
89 89
 	function remove_refill_coupon($id) {
90
-		$this->db->where ( "id", $id );
91
-		$this->db->delete ( "refill_coupon" );
90
+		$this->db->where("id", $id);
91
+		$this->db->delete("refill_coupon");
92 92
 		return true;
93 93
 	}
94 94
 	function get_refill_coupon_details($id) {
95
-		$this->db->where ( "id", $id );
96
-		$result = $this->db->get ( 'refill_coupon' );
95
+		$this->db->where("id", $id);
96
+		$result = $this->db->get('refill_coupon');
97 97
 		return $result;
98 98
 	}
99 99
 	function refill_coupon_count($add_array) {
100 100
 		$account_length = Common_model::$global_config ['system_config'] ['refill_coupon_length'];
101
-		$this->db->where ( "length(number)", $account_length );
102
-		$this->db->like ( 'number', $add_array ['prefix'], 'after' );
103
-		$this->db->select ( "count(id) as count" );
104
-		$this->db->from ( 'refill_coupon' );
105
-		$result = $this->db->get ();
106
-		$result = $result->result_array ();
101
+		$this->db->where("length(number)", $account_length);
102
+		$this->db->like('number', $add_array ['prefix'], 'after');
103
+		$this->db->select("count(id) as count");
104
+		$this->db->from('refill_coupon');
105
+		$result = $this->db->get();
106
+		$result = $result->result_array();
107 107
 		return $result;
108 108
 	}
109 109
 }
Please login to merge, or discard this patch.
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,10 +33,11 @@
 block discarded – undo
33 33
 				'reseller_id' => $reseller_id 
34 34
 		);
35 35
 		if ($flag) {
36
-			if ($export)
37
-				$query = $this->db_model->select ( "*", "refill_coupon", $where, "id", "ASC", '', '' );
38
-			else
39
-				$query = $this->db_model->select ( "*", "refill_coupon", $where, "id", "ASC", $limit, $start );
36
+			if ($export) {
37
+							$query = $this->db_model->select ( "*", "refill_coupon", $where, "id", "ASC", '', '' );
38
+			} else {
39
+							$query = $this->db_model->select ( "*", "refill_coupon", $where, "id", "ASC", $limit, $start );
40
+			}
40 41
 		} else {
41 42
 			$query = $this->db_model->countQuery ( "*", "refill_coupon", $where );
42 43
 		}
Please login to merge, or discard this patch.
astpp/application/modules/refill_coupon/controllers/refill_coupon.php 2 patches
Spacing   +104 added lines, -104 removed lines patch added patch discarded remove patch
@@ -23,176 +23,176 @@
 block discarded – undo
23 23
 // ##############################################################################
24 24
 class Refill_coupon extends MX_Controller {
25 25
 	function Refill_coupon() {
26
-		parent::__construct ();
27
-		$this->load->helper ( 'template_inheritance' );
28
-		$this->load->helper ( 'form' );
29
-		$this->load->model ( 'refill_coupon_model' );
30
-		$this->load->library ( "refill_coupon_form" );
31
-		$this->load->library ( "astpp/form" );
32
-		$this->load->library ( "session" );
33
-		if ($this->session->userdata ( 'user_login' ) == FALSE)
34
-			redirect ( base_url () . 'login/login' );
26
+		parent::__construct();
27
+		$this->load->helper('template_inheritance');
28
+		$this->load->helper('form');
29
+		$this->load->model('refill_coupon_model');
30
+		$this->load->library("refill_coupon_form");
31
+		$this->load->library("astpp/form");
32
+		$this->load->library("session");
33
+		if ($this->session->userdata('user_login') == FALSE)
34
+			redirect(base_url().'login/login');
35 35
 	}
36 36
 	function refill_coupon_list() {
37
-		if ($this->session->userdata ( 'logintype' ) == 0 || $this->session->userdata ( 'logintype' ) == 3) {
38
-			redirect ( base_url () . 'user/user/' );
37
+		if ($this->session->userdata('logintype') == 0 || $this->session->userdata('logintype') == 3) {
38
+			redirect(base_url().'user/user/');
39 39
 		}
40
-		$data ['username'] = $this->session->userdata ( 'user_name' );
41
-		$data ['page_title'] = gettext ( 'Refill Coupon' );
40
+		$data ['username'] = $this->session->userdata('user_name');
41
+		$data ['page_title'] = gettext('Refill Coupon');
42 42
 		$data ['search_flag'] = true;
43
-		$this->session->set_userdata ( 'advance_search', 0 );
44
-		$this->session->set_userdata ( 'refill_coupon_list_search', 0 );
45
-		$data ['grid_fields'] = $this->refill_coupon_form->build_refill_coupon_grid ();
46
-		$data ["grid_buttons"] = $this->refill_coupon_form->build_grid_buttons_refill_coupon ();
47
-		$data ['form_search'] = $this->form->build_serach_form ( $this->refill_coupon_form->get_refill_coupon_search_form () );
48
-		$this->load->view ( 'view_refill_coupon_list', $data );
43
+		$this->session->set_userdata('advance_search', 0);
44
+		$this->session->set_userdata('refill_coupon_list_search', 0);
45
+		$data ['grid_fields'] = $this->refill_coupon_form->build_refill_coupon_grid();
46
+		$data ["grid_buttons"] = $this->refill_coupon_form->build_grid_buttons_refill_coupon();
47
+		$data ['form_search'] = $this->form->build_serach_form($this->refill_coupon_form->get_refill_coupon_search_form());
48
+		$this->load->view('view_refill_coupon_list', $data);
49 49
 	}
50 50
 	function refill_coupon_list_json() {
51
-		$json_data = array ();
52
-		$count_all = $this->refill_coupon_model->get_refill_coupon_list ( false, "", "" );
53
-		$paging_data = $this->form->load_grid_config ( $count_all, $_GET ['rp'], $_GET ['page'] );
51
+		$json_data = array();
52
+		$count_all = $this->refill_coupon_model->get_refill_coupon_list(false, "", "");
53
+		$paging_data = $this->form->load_grid_config($count_all, $_GET ['rp'], $_GET ['page']);
54 54
 		$json_data = $paging_data ["json_paging"];
55
-		$query = $this->refill_coupon_model->get_refill_coupon_list ( true, $paging_data ["paging"] ["start"], $paging_data ["paging"] ["page_no"] );
56
-		$grid_fields = json_decode ( $this->refill_coupon_form->build_refill_coupon_grid () );
57
-		$json_data ['rows'] = $this->form->build_grid ( $query, $grid_fields );
58
-		echo json_encode ( $json_data );
55
+		$query = $this->refill_coupon_model->get_refill_coupon_list(true, $paging_data ["paging"] ["start"], $paging_data ["paging"] ["page_no"]);
56
+		$grid_fields = json_decode($this->refill_coupon_form->build_refill_coupon_grid());
57
+		$json_data ['rows'] = $this->form->build_grid($query, $grid_fields);
58
+		echo json_encode($json_data);
59 59
 	}
60 60
 	function refill_coupon_list_search() {
61
-		$ajax_search = $this->input->post ( 'ajax_search', 0 );
62
-		if ($this->input->post ( 'advance_search', TRUE ) == 1) {
63
-			$this->session->set_userdata ( 'advance_search', $this->input->post ( 'advance_search' ) );
64
-			$action = $this->input->post ();
65
-			unset ( $action ['action'] );
66
-			unset ( $action ['advance_search'] );
67
-			if (isset ( $action ['amount'] ['amount'] ) && $action ['amount'] ['amount'] != '') {
68
-				$action ['amount'] ['amount'] = $this->common_model->add_calculate_currency ( $action ['amount'] ['amount'], "", '', true, false );
61
+		$ajax_search = $this->input->post('ajax_search', 0);
62
+		if ($this->input->post('advance_search', TRUE) == 1) {
63
+			$this->session->set_userdata('advance_search', $this->input->post('advance_search'));
64
+			$action = $this->input->post();
65
+			unset ($action ['action']);
66
+			unset ($action ['advance_search']);
67
+			if (isset ($action ['amount'] ['amount']) && $action ['amount'] ['amount'] != '') {
68
+				$action ['amount'] ['amount'] = $this->common_model->add_calculate_currency($action ['amount'] ['amount'], "", '', true, false);
69 69
 			}
70
-			$this->session->set_userdata ( 'refill_coupon_list_search', $action );
70
+			$this->session->set_userdata('refill_coupon_list_search', $action);
71 71
 		}
72 72
 		if (@$ajax_search != 1) {
73
-			redirect ( base_url () . 'refill_coupon/refill_coupon_list/' );
73
+			redirect(base_url().'refill_coupon/refill_coupon_list/');
74 74
 		}
75 75
 	}
76 76
 	function refill_coupon_clearsearchfilter() {
77
-		$this->session->set_userdata ( 'advance_search', 0 );
78
-		$this->session->set_userdata ( 'refill_coupon_list_search', "" );
77
+		$this->session->set_userdata('advance_search', 0);
78
+		$this->session->set_userdata('refill_coupon_list_search', "");
79 79
 	}
80 80
 	function refill_coupon_list_view($id) {
81
-		$data ['username'] = $this->session->userdata ( 'user_name' );
82
-		$data ['page_title'] = gettext ( 'View Refill Coupon' );
83
-		if ($cc = $this->refill_coupon_model->get_refill_coupon_details ( $id )) {
84
-			$refill_coupon_details = $cc->result_array ();
81
+		$data ['username'] = $this->session->userdata('user_name');
82
+		$data ['page_title'] = gettext('View Refill Coupon');
83
+		if ($cc = $this->refill_coupon_model->get_refill_coupon_details($id)) {
84
+			$refill_coupon_details = $cc->result_array();
85 85
 			$data ['refill_coupon_details'] = $refill_coupon_details [0];
86
-			$data ['refill_coupon_details'] ['callingcard'] = $this->common->get_field_name ( 'cardnumber', 'callingcards', $refill_coupon_details [0] ['callingcard_id'] );
87
-			$data ['refill_coupon_details'] ['currency'] = $this->common->build_concat_string ( 'currencyname,currency', 'currency', $refill_coupon_details [0] ['currency_id'] );
86
+			$data ['refill_coupon_details'] ['callingcard'] = $this->common->get_field_name('cardnumber', 'callingcards', $refill_coupon_details [0] ['callingcard_id']);
87
+			$data ['refill_coupon_details'] ['currency'] = $this->common->build_concat_string('currencyname,currency', 'currency', $refill_coupon_details [0] ['currency_id']);
88 88
 		} else {
89 89
 			echo "This card is not available.";
90 90
 			return;
91 91
 		}
92
-		$this->load->view ( 'view_refill_coupon_details', $data );
92
+		$this->load->view('view_refill_coupon_details', $data);
93 93
 	}
94 94
 	function refill_coupon_add() {
95
-		if ($this->session->userdata ( 'logintype' ) == 0 || $this->session->userdata ( 'logintype' ) == 3) {
96
-			redirect ( base_url () . 'user/user/' );
95
+		if ($this->session->userdata('logintype') == 0 || $this->session->userdata('logintype') == 3) {
96
+			redirect(base_url().'user/user/');
97 97
 		}
98
-		$data ['username'] = $this->session->userdata ( 'user_name' );
98
+		$data ['username'] = $this->session->userdata('user_name');
99 99
 		$data ['flag'] = 'create';
100
-		$data ['page_title'] = gettext ( 'Create Refill Coupon' );
101
-		$data ['form'] = $this->form->build_form ( $this->refill_coupon_form->get_refill_coupon_form_fields (), '' );
102
-		$this->load->view ( 'view_refill_coupon_add', $data );
100
+		$data ['page_title'] = gettext('Create Refill Coupon');
101
+		$data ['form'] = $this->form->build_form($this->refill_coupon_form->get_refill_coupon_form_fields(), '');
102
+		$this->load->view('view_refill_coupon_add', $data);
103 103
 	}
104 104
 	function refill_coupon_save() {
105 105
 		$account_length = Common_model::$global_config ['system_config'] ['refill_coupon_length'];
106
-		$add_array = $this->input->post ();
106
+		$add_array = $this->input->post();
107 107
 		$add_array ['status'] = 0;
108
-		$data ['form'] = $this->form->build_form ( $this->refill_coupon_form->get_refill_coupon_form_fields (), $add_array );
109
-		$result = $this->refill_coupon_model->refill_coupon_count ( $add_array );
108
+		$data ['form'] = $this->form->build_form($this->refill_coupon_form->get_refill_coupon_form_fields(), $add_array);
109
+		$result = $this->refill_coupon_model->refill_coupon_count($add_array);
110 110
 		$count = $result [0] ['count'];
111 111
 		$remaining_length = 0;
112
-		$remaining_length = $account_length - strlen ( $add_array ['prefix'] );
113
-		$currentlength = pow ( 5, $remaining_length );
112
+		$remaining_length = $account_length - strlen($add_array ['prefix']);
113
+		$currentlength = pow(5, $remaining_length);
114 114
 		$currentlength = $currentlength - $count;
115
-		$data ['page_title'] = gettext ( 'Add Refill Coupon' );
116
-		if ($this->form_validation->run () == FALSE) {
117
-			$data ['validation_errors'] = validation_errors ();
115
+		$data ['page_title'] = gettext('Add Refill Coupon');
116
+		if ($this->form_validation->run() == FALSE) {
117
+			$data ['validation_errors'] = validation_errors();
118 118
 			echo $data ['validation_errors'];
119 119
 			exit ();
120 120
 		} else {
121
-			if ($account_length <= strlen ( $add_array ['prefix'] )) {
122
-				echo json_encode ( array (
123
-						"count_error" => "You can not create " . $add_array ['count'] . " Refill coupon with " . $add_array ['prefix'] . " prefix." 
124
-				) );
121
+			if ($account_length <= strlen($add_array ['prefix'])) {
122
+				echo json_encode(array(
123
+						"count_error" => "You can not create ".$add_array ['count']." Refill coupon with ".$add_array ['prefix']." prefix." 
124
+				));
125 125
 				exit ();
126 126
 			}
127 127
 			if ($currentlength <= 0) {
128
-				echo json_encode ( array (
129
-						"count_error" => "You can not create " . $add_array ['count'] . " Refill coupon with " . $add_array ['prefix'] . " prefix" 
130
-				) );
128
+				echo json_encode(array(
129
+						"count_error" => "You can not create ".$add_array ['count']." Refill coupon with ".$add_array ['prefix']." prefix" 
130
+				));
131 131
 				exit ();
132 132
 			}
133 133
 			if ($currentlength > 0 && $add_array ['count'] > $currentlength) {
134
-				echo json_encode ( array (
135
-						"count_error" => "You can create maximum " . $currentlength . " Refill coupon with " . $add_array ['prefix'] . " prefix" 
136
-				) );
134
+				echo json_encode(array(
135
+						"count_error" => "You can create maximum ".$currentlength." Refill coupon with ".$add_array ['prefix']." prefix" 
136
+				));
137 137
 				exit ();
138 138
 			} else {
139
-				$this->refill_coupon_model->add_refill_coupon ( $add_array );
140
-				echo json_encode ( array (
139
+				$this->refill_coupon_model->add_refill_coupon($add_array);
140
+				echo json_encode(array(
141 141
 						"SUCCESS" => "Refill coupon created successfully!" 
142
-				) );
142
+				));
143 143
 				exit ();
144 144
 			}
145 145
 		}
146 146
 	}
147 147
 	function refill_coupon_list_delete($id) {
148
-		$this->refill_coupon_model->remove_refill_coupon ( $id );
149
-		$this->session->set_flashdata ( 'astpp_notification', 'Refill coupon removed successfully!' );
150
-		redirect ( base_url () . 'refill_coupon/refill_coupon_list/' );
148
+		$this->refill_coupon_model->remove_refill_coupon($id);
149
+		$this->session->set_flashdata('astpp_notification', 'Refill coupon removed successfully!');
150
+		redirect(base_url().'refill_coupon/refill_coupon_list/');
151 151
 	}
152 152
 	function refill_coupon_export() {
153
-		$account_info = $accountinfo = $this->session->userdata ( 'accountinfo' );
153
+		$account_info = $accountinfo = $this->session->userdata('accountinfo');
154 154
 		$currency_id = $account_info ['currency_id'];
155
-		$currency = $this->common->get_field_name ( 'currency', 'currency', $currency_id );
156
-		$query = $this->refill_coupon_model->get_refill_coupon_list ( true, '', '', true );
157
-		$cc_array = array ();
158
-		ob_clean ();
159
-		$cc_array [] = array (
160
-				gettext ( 'Coupon Number' ),
161
-				gettext ( 'Description' ),
162
-				gettext ( 'Account' ),
163
-				gettext ( 'Amount(' . $currency . ')' ),
164
-				gettext ( 'Created Date' ),
165
-				gettext ( "Used?" ),
166
-				gettext ( 'Used Date' ) 
155
+		$currency = $this->common->get_field_name('currency', 'currency', $currency_id);
156
+		$query = $this->refill_coupon_model->get_refill_coupon_list(true, '', '', true);
157
+		$cc_array = array();
158
+		ob_clean();
159
+		$cc_array [] = array(
160
+				gettext('Coupon Number'),
161
+				gettext('Description'),
162
+				gettext('Account'),
163
+				gettext('Amount('.$currency.')'),
164
+				gettext('Created Date'),
165
+				gettext("Used?"),
166
+				gettext('Used Date') 
167 167
 		);
168
-		if ($query->num_rows () > 0) {
169
-			foreach ( $query->result_array () as $row ) {
170
-				$row ['currency'] = $this->common->build_concat_string ( 'currencyname,currency', 'currency', $row ['currency_id'] );
171
-				$row ['acc_name'] = $row ['account_id'] > 0 ? $this->common->get_field_name ( 'number', 'accounts', $row ['account_id'] ) : "";
172
-				$row ['status'] = $this->common->get_refill_coupon_status ( '', '', $row ['status'] );
173
-				$cc_array [] = array (
168
+		if ($query->num_rows() > 0) {
169
+			foreach ($query->result_array() as $row) {
170
+				$row ['currency'] = $this->common->build_concat_string('currencyname,currency', 'currency', $row ['currency_id']);
171
+				$row ['acc_name'] = $row ['account_id'] > 0 ? $this->common->get_field_name('number', 'accounts', $row ['account_id']) : "";
172
+				$row ['status'] = $this->common->get_refill_coupon_status('', '', $row ['status']);
173
+				$cc_array [] = array(
174 174
 						$row ['number'],
175 175
 						$row ['description'],
176 176
 						$row ['acc_name'],
177
-						$this->common->convert_to_currency ( '', '', $row ['amount'] ),
177
+						$this->common->convert_to_currency('', '', $row ['amount']),
178 178
 						$row ['creation_date'],
179 179
 						$row ['status'],
180 180
 						$row ['firstused'] 
181 181
 				);
182 182
 			}
183 183
 		}
184
-		$this->load->helper ( 'csv' );
185
-		array_to_csv ( $cc_array, 'refill_coupon_' . date ( "Y-m-d" ) . '.csv' );
184
+		$this->load->helper('csv');
185
+		array_to_csv($cc_array, 'refill_coupon_'.date("Y-m-d").'.csv');
186 186
 	}
187 187
 	function refill_coupon_customer_json($accountid) {
188
-		$json_data = array ();
189
-		$count_all = $this->refill_coupon_model->get_customer_refill_coupon_list ( false, "", "", $accountid );
190
-		$paging_data = $this->form->load_grid_config ( $count_all, $_GET ['rp'], $_GET ['page'] );
188
+		$json_data = array();
189
+		$count_all = $this->refill_coupon_model->get_customer_refill_coupon_list(false, "", "", $accountid);
190
+		$paging_data = $this->form->load_grid_config($count_all, $_GET ['rp'], $_GET ['page']);
191 191
 		$json_data = $paging_data ["json_paging"];
192
-		$query = $this->refill_coupon_model->get_customer_refill_coupon_list ( true, $paging_data ["paging"] ["start"], $paging_data ["paging"] ["page_no"], $accountid );
193
-		$grid_fields = json_decode ( $this->refill_coupon_form->build_user_refill_coupon_grid () );
194
-		$json_data ['rows'] = $this->form->build_grid ( $query, $grid_fields );
195
-		echo json_encode ( $json_data );
192
+		$query = $this->refill_coupon_model->get_customer_refill_coupon_list(true, $paging_data ["paging"] ["start"], $paging_data ["paging"] ["page_no"], $accountid);
193
+		$grid_fields = json_decode($this->refill_coupon_form->build_user_refill_coupon_grid());
194
+		$json_data ['rows'] = $this->form->build_grid($query, $grid_fields);
195
+		echo json_encode($json_data);
196 196
 	}
197 197
 }
198 198
 ?>
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,9 @@
 block discarded – undo
30 30
 		$this->load->library ( "refill_coupon_form" );
31 31
 		$this->load->library ( "astpp/form" );
32 32
 		$this->load->library ( "session" );
33
-		if ($this->session->userdata ( 'user_login' ) == FALSE)
34
-			redirect ( base_url () . 'login/login' );
33
+		if ($this->session->userdata ( 'user_login' ) == FALSE) {
34
+					redirect ( base_url () . 'login/login' );
35
+		}
35 36
 	}
36 37
 	function refill_coupon_list() {
37 38
 		if ($this->session->userdata ( 'logintype' ) == 0 || $this->session->userdata ( 'logintype' ) == 3) {
Please login to merge, or discard this patch.
astpp/application/modules/refill_coupon/libraries/refill_coupon_form.php 2 patches
Spacing   +112 added lines, -112 removed lines patch added patch discarded remove patch
@@ -20,25 +20,25 @@  discard block
 block discarded – undo
20 20
 // You should have received a copy of the GNU Affero General Public License
21 21
 // along with this program. If not, see <http://www.gnu.org/licenses/>.
22 22
 // ##############################################################################
23
-if (! defined ( 'BASEPATH' ))
24
-	exit ( 'No direct script access allowed' );
23
+if ( ! defined('BASEPATH'))
24
+	exit ('No direct script access allowed');
25 25
 class Refill_coupon_form {
26 26
 	function __construct($library_name = '') {
27
-		$this->CI = & get_instance ();
27
+		$this->CI = & get_instance();
28 28
 	}
29 29
 	function get_refill_coupon_form_fields() {
30
-		$form ['forms'] = array (
31
-				base_url () . 'refill_coupon/refill_coupon_save/',
32
-				array (
30
+		$form ['forms'] = array(
31
+				base_url().'refill_coupon/refill_coupon_save/',
32
+				array(
33 33
 						"id" => "refill_coupon_form",
34 34
 						"name" => "refill_coupon_form" 
35 35
 				) 
36 36
 		);
37
-		$form [gettext ( 'Coupon Information' )] = array (
38
-				array (
39
-						gettext ( 'Description' ),
37
+		$form [gettext('Coupon Information')] = array(
38
+				array(
39
+						gettext('Description'),
40 40
 						'INPUT',
41
-						array (
41
+						array(
42 42
 								'name' => 'description',
43 43
 								'size' => '20',
44 44
 								'class' => "text field medium" 
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
47 47
 						'tOOL TIP',
48 48
 						'Please Enter account number' 
49 49
 				),
50
-				array (
51
-						gettext ( 'Start prefix' ),
50
+				array(
51
+						gettext('Start prefix'),
52 52
 						'INPUT',
53
-						array (
53
+						array(
54 54
 								'name' => 'prefix',
55 55
 								'size' => '20',
56 56
 								'class' => "text field medium" 
@@ -59,10 +59,10 @@  discard block
 block discarded – undo
59 59
 						'tOOL TIP',
60 60
 						'' 
61 61
 				),
62
-				array (
63
-						gettext ( 'Quantity' ),
62
+				array(
63
+						gettext('Quantity'),
64 64
 						'INPUT',
65
-						array (
65
+						array(
66 66
 								'name' => 'count',
67 67
 								'size' => '20',
68 68
 								'maxlength' => '5',
@@ -72,10 +72,10 @@  discard block
 block discarded – undo
72 72
 						'tOOL TIP',
73 73
 						'Please Enter account number' 
74 74
 				),
75
-				array (
76
-						gettext ( 'Amount' ),
75
+				array(
76
+						gettext('Amount'),
77 77
 						'INPUT',
78
-						array (
78
+						array(
79 79
 								'name' => 'amount',
80 80
 								'size' => '20',
81 81
 								'class' => "text field medium" 
@@ -85,17 +85,17 @@  discard block
 block discarded – undo
85 85
 						'Please Enter account number' 
86 86
 				) 
87 87
 		);
88
-		$form ['button_cancel'] = array (
88
+		$form ['button_cancel'] = array(
89 89
 				'name' => 'action',
90
-				'content' => gettext ( 'Close' ),
90
+				'content' => gettext('Close'),
91 91
 				'value' => 'cancel',
92 92
 				'type' => 'button',
93 93
 				'class' => 'btn btn-line-sky margin-x-10',
94 94
 				'onclick' => 'return redirect_page(\'NULL\')' 
95 95
 		);
96
-		$form ['button_save'] = array (
96
+		$form ['button_save'] = array(
97 97
 				'name' => 'action',
98
-				'content' => gettext ( 'Save' ),
98
+				'content' => gettext('Save'),
99 99
 				'value' => 'save',
100 100
 				'id' => 'submit',
101 101
 				'type' => 'button',
@@ -105,50 +105,50 @@  discard block
 block discarded – undo
105 105
 		return $form;
106 106
 	}
107 107
 	function build_grid_buttons_refill_coupon() {
108
-		$buttons_json = json_encode ( array (
109
-				array (
110
-						gettext ( "Create" ),
108
+		$buttons_json = json_encode(array(
109
+				array(
110
+						gettext("Create"),
111 111
 						"btn btn-line-warning btn",
112 112
 						"fa fa-plus-circle fa-lg",
113 113
 						"button_action",
114 114
 						"/refill_coupon/refill_coupon_add/",
115 115
 						"popup" 
116 116
 				),
117
-				array (
118
-						gettext ( "Export" ),
117
+				array(
118
+						gettext("Export"),
119 119
 						"btn btn-xing",
120 120
 						" fa fa-download fa-lg",
121 121
 						"button_action",
122 122
 						"/refill_coupon/refill_coupon_export/",
123 123
 						'single' 
124 124
 				) 
125
-		) );
125
+		));
126 126
 		return $buttons_json;
127 127
 	}
128 128
 	function build_user_grid_buttons_refill_coupon() {
129
-		$buttons_json = json_encode ( array (
130
-				array (
129
+		$buttons_json = json_encode(array(
130
+				array(
131 131
 						"Refresh",
132 132
 						"reload",
133 133
 						"/refill_coupon/refill_coupon_clearsearchfilter/" 
134 134
 				) 
135
-		) );
135
+		));
136 136
 		return $buttons_json;
137 137
 	}
138 138
 	function get_refill_coupon_search_form() {
139
-		$accountinfo = $this->CI->session->userdata ( 'accountinfo' );
139
+		$accountinfo = $this->CI->session->userdata('accountinfo');
140 140
 		$reseller_id = $accountinfo ['type'] == 1 ? $accountinfo ['id'] : 0;
141
-		$form ['forms'] = array (
141
+		$form ['forms'] = array(
142 142
 				"",
143
-				array (
143
+				array(
144 144
 						'id' => "refill_coupon_list_search" 
145 145
 				) 
146 146
 		);
147
-		$form [gettext ( 'Search' )] = array (
148
-				array (
149
-						gettext ( 'Coupon Number' ),
147
+		$form [gettext('Search')] = array(
148
+				array(
149
+						gettext('Coupon Number'),
150 150
 						'INPUT',
151
-						array (
151
+						array(
152 152
 								'name' => 'number[number]',
153 153
 								'',
154 154
 								'id' => 'number',
@@ -165,10 +165,10 @@  discard block
 block discarded – undo
165 165
 						'search_string_type',
166 166
 						'' 
167 167
 				),
168
-				array (
169
-						gettext ( 'Description' ),
168
+				array(
169
+						gettext('Description'),
170 170
 						'INPUT',
171
-						array (
171
+						array(
172 172
 								'name' => 'description[description]',
173 173
 								'',
174 174
 								'id' => 'description',
@@ -185,8 +185,8 @@  discard block
 block discarded – undo
185 185
 						'search_string_type',
186 186
 						'' 
187 187
 				),
188
-				array (
189
-						gettext ( 'Account' ),
188
+				array(
189
+						gettext('Account'),
190 190
 						'account_id',
191 191
 						'SELECT',
192 192
 						'',
@@ -198,15 +198,15 @@  discard block
 block discarded – undo
198 198
 						'accounts',
199 199
 						'build_dropdown_deleted',
200 200
 						'where_arr',
201
-						array (
201
+						array(
202 202
 								"reseller_id" => $reseller_id,
203 203
 								"type" => "GLOBAL" 
204 204
 						) 
205 205
 				),
206
-				array (
207
-						gettext ( 'Amount' ),
206
+				array(
207
+						gettext('Amount'),
208 208
 						'INPUT',
209
-						array (
209
+						array(
210 210
 								'name' => 'amount[amount]',
211 211
 								'',
212 212
 								'id' => 'amount',
@@ -223,8 +223,8 @@  discard block
 block discarded – undo
223 223
 						'search_int_type',
224 224
 						'' 
225 225
 				),
226
-				array (
227
-						gettext ( 'Used?' ),
226
+				array(
227
+						gettext('Used?'),
228 228
 						'status',
229 229
 						'SELECT',
230 230
 						'',
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 						'' 
240 240
 				),
241 241
 				
242
-				array (
242
+				array(
243 243
 						'',
244 244
 						'HIDDEN',
245 245
 						'ajax_search',
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 						'',
249 249
 						'' 
250 250
 				),
251
-				array (
251
+				array(
252 252
 						'',
253 253
 						'HIDDEN',
254 254
 						'advance_search',
@@ -258,18 +258,18 @@  discard block
 block discarded – undo
258 258
 						'' 
259 259
 				) 
260 260
 		);
261
-		$form ['button_search'] = array (
261
+		$form ['button_search'] = array(
262 262
 				'name' => 'action',
263 263
 				'id' => "refill_coupon_search_btn",
264
-				'content' => gettext ( 'Search' ),
264
+				'content' => gettext('Search'),
265 265
 				'value' => 'save',
266 266
 				'type' => 'button',
267 267
 				'class' => 'btn btn-line-parrot pull-right' 
268 268
 		);
269
-		$form ['button_reset'] = array (
269
+		$form ['button_reset'] = array(
270 270
 				'name' => 'action',
271 271
 				'id' => "id_reset",
272
-				'content' => gettext ( 'Clear' ),
272
+				'content' => gettext('Clear'),
273 273
 				'value' => 'cancel',
274 274
 				'type' => 'reset',
275 275
 				'class' => 'btn btn-line-sky pull-right margin-x-10' 
@@ -278,17 +278,17 @@  discard block
 block discarded – undo
278 278
 		return $form;
279 279
 	}
280 280
 	function get_user_refill_coupon_search_form() {
281
-		$form ['forms'] = array (
281
+		$form ['forms'] = array(
282 282
 				"",
283
-				array (
283
+				array(
284 284
 						'id' => "user_refill_coupon_list_search" 
285 285
 				) 
286 286
 		);
287
-		$form [gettext ( 'Search Refill Coupon' )] = array (
288
-				array (
289
-						gettext ( 'Coupon Number' ),
287
+		$form [gettext('Search Refill Coupon')] = array(
288
+				array(
289
+						gettext('Coupon Number'),
290 290
 						'INPUT',
291
-						array (
291
+						array(
292 292
 								'name' => 'number[number]',
293 293
 								'',
294 294
 								'id' => 'number',
@@ -305,10 +305,10 @@  discard block
 block discarded – undo
305 305
 						'search_string_type',
306 306
 						'' 
307 307
 				),
308
-				array (
309
-						gettext ( 'Description' ),
308
+				array(
309
+						gettext('Description'),
310 310
 						'INPUT',
311
-						array (
311
+						array(
312 312
 								'name' => 'description[description]',
313 313
 								'',
314 314
 								'id' => 'description',
@@ -325,10 +325,10 @@  discard block
 block discarded – undo
325 325
 						'search_string_type',
326 326
 						'' 
327 327
 				),
328
-				array (
329
-						gettext ( 'Amount' ),
328
+				array(
329
+						gettext('Amount'),
330 330
 						'INPUT',
331
-						array (
331
+						array(
332 332
 								'name' => 'amount[amount]',
333 333
 								'',
334 334
 								'id' => 'amount',
@@ -345,8 +345,8 @@  discard block
 block discarded – undo
345 345
 						'search_int_type',
346 346
 						'' 
347 347
 				),
348
-				array (
349
-						gettext ( 'Status' ),
348
+				array(
349
+						gettext('Status'),
350 350
 						'status',
351 351
 						'SELECT',
352 352
 						'',
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
 						'',
361 361
 						'' 
362 362
 				),
363
-				array (
363
+				array(
364 364
 						'',
365 365
 						'HIDDEN',
366 366
 						'ajax_search',
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
 						'',
370 370
 						'' 
371 371
 				),
372
-				array (
372
+				array(
373 373
 						'',
374 374
 						'HIDDEN',
375 375
 						'advance_search',
@@ -379,18 +379,18 @@  discard block
 block discarded – undo
379 379
 						'' 
380 380
 				) 
381 381
 		);
382
-		$form ['button_search'] = array (
382
+		$form ['button_search'] = array(
383 383
 				'name' => 'action',
384 384
 				'id' => "user_refill_coupon_search_btn",
385
-				'content' => gettext ( 'Search' ),
385
+				'content' => gettext('Search'),
386 386
 				'value' => 'save',
387 387
 				'type' => 'button',
388 388
 				'class' => 'ui-state-default float-right ui-corner-all ui-button' 
389 389
 		);
390
-		$form ['button_reset'] = array (
390
+		$form ['button_reset'] = array(
391 391
 				'name' => 'action',
392 392
 				'id' => "id_reset",
393
-				'content' => gettext ( 'Clear Search Filter' ),
393
+				'content' => gettext('Clear Search Filter'),
394 394
 				'value' => 'cancel',
395 395
 				'type' => 'reset',
396 396
 				'class' => 'ui-state-default float-right ui-corner-all ui-button' 
@@ -398,13 +398,13 @@  discard block
 block discarded – undo
398 398
 		return $form;
399 399
 	}
400 400
 	function build_refill_coupon_grid() {
401
-		$account_info = $accountinfo = $this->CI->session->userdata ( 'accountinfo' );
401
+		$account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
402 402
 		$currency_id = $account_info ['currency_id'];
403
-		$currency = $this->CI->common->get_field_name ( 'currency', 'currency', $currency_id );
403
+		$currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id);
404 404
 		
405
-		$grid_field_arr = json_encode ( array (
406
-				array (
407
-						gettext ( "Coupon Number" ),
405
+		$grid_field_arr = json_encode(array(
406
+				array(
407
+						gettext("Coupon Number"),
408 408
 						"150",
409 409
 						"number",
410 410
 						"",
@@ -414,8 +414,8 @@  discard block
 block discarded – undo
414 414
 						"true",
415 415
 						"center" 
416 416
 				),
417
-				array (
418
-						gettext ( "Description" ),
417
+				array(
418
+						gettext("Description"),
419 419
 						"165",
420 420
 						"description",
421 421
 						"",
@@ -425,8 +425,8 @@  discard block
 block discarded – undo
425 425
 						"true",
426 426
 						"center" 
427 427
 				),
428
-				array (
429
-						gettext ( "Account" ),
428
+				array(
429
+						gettext("Account"),
430 430
 						"165",
431 431
 						"account_id",
432 432
 						"first_name,last_name,number",
@@ -436,8 +436,8 @@  discard block
 block discarded – undo
436 436
 						"true",
437 437
 						"center" 
438 438
 				),
439
-				array (
440
-						gettext ( "Amount($currency)" ),
439
+				array(
440
+						gettext("Amount($currency)"),
441 441
 						"150",
442 442
 						"amount",
443 443
 						"amount",
@@ -447,8 +447,8 @@  discard block
 block discarded – undo
447 447
 						"true",
448 448
 						"right" 
449 449
 				),
450
-				array (
451
-						gettext ( "Created Date" ),
450
+				array(
451
+						gettext("Created Date"),
452 452
 						"200",
453 453
 						"creation_date",
454 454
 						"",
@@ -458,8 +458,8 @@  discard block
 block discarded – undo
458 458
 						"true",
459 459
 						"center" 
460 460
 				),
461
-				array (
462
-						gettext ( "Used?" ),
461
+				array(
462
+						gettext("Used?"),
463 463
 						"135",
464 464
 						"status",
465 465
 						'status',
@@ -469,8 +469,8 @@  discard block
 block discarded – undo
469 469
 						"true",
470 470
 						"center" 
471 471
 				),
472
-				array (
473
-						gettext ( "Used Date" ),
472
+				array(
473
+						gettext("Used Date"),
474 474
 						"180",
475 475
 						"firstused",
476 476
 						"firstused",
@@ -480,29 +480,29 @@  discard block
 block discarded – undo
480 480
 						"true",
481 481
 						"center" 
482 482
 				),
483
-				array (
484
-						gettext ( "Action" ),
483
+				array(
484
+						gettext("Action"),
485 485
 						"120",
486 486
 						"",
487 487
 						"",
488 488
 						"",
489
-						array (
490
-								"DELETE" => array (
489
+						array(
490
+								"DELETE" => array(
491 491
 										"url" => "refill_coupon/refill_coupon_list_delete/",
492 492
 										"mode" => "single" 
493 493
 								) 
494 494
 						) 
495 495
 				) 
496
-		) );
496
+		));
497 497
 		return $grid_field_arr;
498 498
 	}
499 499
 	function build_user_refill_coupon_grid() {
500
-		$account_info = $accountinfo = $this->CI->session->userdata ( 'accountinfo' );
500
+		$account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
501 501
 		$currency_id = $account_info ['currency_id'];
502
-		$currency = $this->CI->common->get_field_name ( 'currency', 'currency', $currency_id );
503
-		$grid_field_arr = json_encode ( array (
504
-				array (
505
-						gettext ( "Coupon Number" ),
502
+		$currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id);
503
+		$grid_field_arr = json_encode(array(
504
+				array(
505
+						gettext("Coupon Number"),
506 506
 						"230",
507 507
 						"number",
508 508
 						"",
@@ -512,8 +512,8 @@  discard block
 block discarded – undo
512 512
 						"true",
513 513
 						"center" 
514 514
 				),
515
-				array (
516
-						gettext ( "Description" ),
515
+				array(
516
+						gettext("Description"),
517 517
 						"210",
518 518
 						"description",
519 519
 						"",
@@ -523,8 +523,8 @@  discard block
 block discarded – undo
523 523
 						"true",
524 524
 						"center" 
525 525
 				),
526
-				array (
527
-						gettext ( "Amount($currency)" ),
526
+				array(
527
+						gettext("Amount($currency)"),
528 528
 						"190",
529 529
 						"amount",
530 530
 						"amount",
@@ -534,8 +534,8 @@  discard block
 block discarded – undo
534 534
 						"true",
535 535
 						"right" 
536 536
 				),
537
-				array (
538
-						gettext ( "Created Date" ),
537
+				array(
538
+						gettext("Created Date"),
539 539
 						"250",
540 540
 						"creation_date",
541 541
 						"",
@@ -545,8 +545,8 @@  discard block
 block discarded – undo
545 545
 						"true",
546 546
 						"center" 
547 547
 				),
548
-				array (
549
-						gettext ( "Used Date" ),
548
+				array(
549
+						gettext("Used Date"),
550 550
 						"250",
551 551
 						"firstused",
552 552
 						"firstused",
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
 						"true",
557 557
 						"center" 
558 558
 				) 
559
-		) );
559
+		));
560 560
 		return $grid_field_arr;
561 561
 	}
562 562
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,8 +20,9 @@
 block discarded – undo
20 20
 // You should have received a copy of the GNU Affero General Public License
21 21
 // along with this program. If not, see <http://www.gnu.org/licenses/>.
22 22
 // ##############################################################################
23
-if (! defined ( 'BASEPATH' ))
23
+if (! defined ( 'BASEPATH' )) {
24 24
 	exit ( 'No direct script access allowed' );
25
+}
25 26
 class Refill_coupon_form {
26 27
 	function __construct($library_name = '') {
27 28
 		$this->CI = & get_instance ();
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/user/models/user_model.php 2 patches
Spacing   +190 added lines, -190 removed lines patch added patch discarded remove patch
@@ -23,86 +23,86 @@  discard block
 block discarded – undo
23 23
 // ##############################################################################
24 24
 class user_model extends CI_Model {
25 25
 	function user_model() {
26
-		parent::__construct ();
26
+		parent::__construct();
27 27
 		if (Common_model::$global_config ['system_config'] ['opensips'] == 0) {
28 28
 			$db_config = Common_model::$global_config ['system_config'];
29
-			$opensipdsn = "mysql://" . $db_config ['opensips_dbuser'] . ":" . $db_config ['opensips_dbpass'] . "@" . $db_config ['opensips_dbhost'] . "/" . $db_config ['opensips_dbname'] . "?char_set=utf8&dbcollat=utf8_general_ci&cache_on=true&cachedir=";
30
-			$this->opensips_db = $this->load->database ( $opensipdsn, true );
29
+			$opensipdsn = "mysql://".$db_config ['opensips_dbuser'].":".$db_config ['opensips_dbpass']."@".$db_config ['opensips_dbhost']."/".$db_config ['opensips_dbname']."?char_set=utf8&dbcollat=utf8_general_ci&cache_on=true&cachedir=";
30
+			$this->opensips_db = $this->load->database($opensipdsn, true);
31 31
 		}
32 32
 	}
33 33
 	function validate_password($pass, $id) {
34
-		$this->db->select ( 'password' );
35
-		$this->db->where ( 'number', $id );
36
-		$query = $this->db->get ( 'accounts' );
37
-		$count = $query->num_rows ();
34
+		$this->db->select('password');
35
+		$this->db->where('number', $id);
36
+		$query = $this->db->get('accounts');
37
+		$count = $query->num_rows();
38 38
 		return $count;
39 39
 	}
40 40
 	function update_password($newpass, $id) {
41
-		$this->db->update ( 'password', $newpass );
42
-		$this->db->where ( 'number', $id );
43
-		$result = $this->db->get ( 'accounts' );
44
-		return $result->result ();
41
+		$this->db->update('password', $newpass);
42
+		$this->db->where('number', $id);
43
+		$result = $this->db->get('accounts');
44
+		return $result->result();
45 45
 	}
46 46
 	function change_password($id) {
47
-		$this->db->select ( 'password' );
48
-		$this->db->where ( 'id', $id );
49
-		$query = $this->db->get ( 'accounts' );
50
-		$result = $query->result ();
47
+		$this->db->select('password');
48
+		$this->db->where('id', $id);
49
+		$query = $this->db->get('accounts');
50
+		$result = $query->result();
51 51
 		return $result;
52 52
 	}
53 53
 	function change_db_password($update, $id) {
54
-		$this->db->where ( 'id', $id );
55
-		$this->db->update ( 'accounts', array (
54
+		$this->db->where('id', $id);
55
+		$this->db->update('accounts', array(
56 56
 				'password' => $update 
57
-		) );
57
+		));
58 58
 	}
59 59
 	function edit_account($accountinfo, $edit_id) {
60
-		unset ( $accountinfo ['action'] );
61
-		$this->db->where ( 'id', $edit_id );
62
-		$result = $this->db->update ( 'accounts', $accountinfo );
60
+		unset ($accountinfo ['action']);
61
+		$this->db->where('id', $edit_id);
62
+		$result = $this->db->update('accounts', $accountinfo);
63 63
 		return true;
64 64
 	}
65 65
 	function get_user_packages_list($flag, $start = 0, $limit = 0) {
66
-		$this->db_model->build_search ( 'package_list_search' );
67
-		$account_data = $this->session->userdata ( "accountinfo" );
68
-		$where = array (
66
+		$this->db_model->build_search('package_list_search');
67
+		$account_data = $this->session->userdata("accountinfo");
68
+		$where = array(
69 69
 				"pricelist_id" => $account_data ['pricelist_id'] 
70 70
 		);
71 71
 		if ($flag) {
72
-			$query = $this->db_model->getSelect ( "*", "packages", $where, "id", "ASC", $limit, $start );
72
+			$query = $this->db_model->getSelect("*", "packages", $where, "id", "ASC", $limit, $start);
73 73
 		} else {
74
-			$query = $this->db_model->countQuery ( "*", "packages", $where );
74
+			$query = $this->db_model->countQuery("*", "packages", $where);
75 75
 		}
76 76
 		return $query;
77 77
 	}
78 78
 	function get_user_invoices_list($flag, $start = 0, $limit = 0) {
79
-		$this->db_model->build_search ( 'user_invoice_list_search' );
80
-		$accountinfo = $this->session->userdata ( 'accountinfo' );
79
+		$this->db_model->build_search('user_invoice_list_search');
80
+		$accountinfo = $this->session->userdata('accountinfo');
81 81
 		$reseller_id = $accountinfo ['id'];
82
-		$this->db->where ( 'accountid', $reseller_id );
82
+		$this->db->where('accountid', $reseller_id);
83 83
 		if ($flag) {
84
-			$this->db->select ( '*' );
84
+			$this->db->select('*');
85 85
 		} else {
86
-			$this->db->select ( 'count(id) as count' );
86
+			$this->db->select('count(id) as count');
87 87
 		}
88 88
 		if ($flag) {
89
-			if (isset ( $_GET ['sortname'] ) && $_GET ['sortname'] != 'undefined') {
90
-				$this->db->order_by ( $_GET ['sortname'], ($_GET ['sortorder'] == 'undefined') ? 'desc' : $_GET ['sortorder'] );
89
+			if (isset ($_GET ['sortname']) && $_GET ['sortname'] != 'undefined') {
90
+				$this->db->order_by($_GET ['sortname'], ($_GET ['sortorder'] == 'undefined') ? 'desc' : $_GET ['sortorder']);
91 91
 			} else {
92
-				$this->db->order_by ( 'invoice_date', 'desc' );
92
+				$this->db->order_by('invoice_date', 'desc');
93 93
 			}
94 94
 		}
95
-		$result = $this->db->get ( 'invoices' );
96
-		if ($result->num_rows () > 0) {
95
+		$result = $this->db->get('invoices');
96
+		if ($result->num_rows() > 0) {
97 97
 			if ($flag) {
98 98
 				return $result;
99 99
 			} else {
100
-				$result = $result->result_array ();
100
+				$result = $result->result_array();
101 101
 				return $result [0] ['count'];
102 102
 			}
103 103
 		} else {
104 104
 			if ($flag) {
105
-				$query = ( object ) array (
105
+				$query = (object)array(
106 106
 						'num_rows' => 0 
107 107
 				);
108 108
 			} else {
@@ -112,88 +112,88 @@  discard block
 block discarded – undo
112 112
 		}
113 113
 	}
114 114
 	function get_user_charge_history($flag, $start = 0, $limit = 0) {
115
-		$this->db_model->build_search ( 'user_charge_history_search' );
116
-		$accountinfo = $this->session->userdata ( 'accountinfo' );
115
+		$this->db_model->build_search('user_charge_history_search');
116
+		$accountinfo = $this->session->userdata('accountinfo');
117 117
 		$where ['accountid'] = $accountinfo ['id'];
118
-		if ($this->session->userdata ( 'advance_search' ) != 1) {
119
-			$where ['created_date >='] = gmdate ( "Y-m-1 00:00:00" );
120
-			$where ['created_date <='] = gmdate ( "Y-m-d 23:59:59" );
118
+		if ($this->session->userdata('advance_search') != 1) {
119
+			$where ['created_date >='] = gmdate("Y-m-1 00:00:00");
120
+			$where ['created_date <='] = gmdate("Y-m-d 23:59:59");
121 121
 		}
122 122
 		$where ['item_type <>'] = 'STANDARD';
123 123
 		if ($flag) {
124
-			$query = $this->db_model->select ( "*", "invoice_details", $where, "id", "DESC", $limit, $start );
124
+			$query = $this->db_model->select("*", "invoice_details", $where, "id", "DESC", $limit, $start);
125 125
 		} else {
126
-			$query = $this->db_model->countQuery ( "*", "invoice_details", $where );
126
+			$query = $this->db_model->countQuery("*", "invoice_details", $where);
127 127
 		}
128 128
 		return $query;
129 129
 	}
130 130
 	function get_user_refill_list($flag, $start = '', $limit = '') {
131
-		$this->db_model->build_search ( 'user_refill_report_search' );
131
+		$this->db_model->build_search('user_refill_report_search');
132 132
 		$accountinfo = $this->session->userdata ['accountinfo'];
133
-		$where = array (
133
+		$where = array(
134 134
 				"accountid" => $accountinfo ["id"] 
135 135
 		);
136 136
 		if ($flag) {
137
-			$query = $this->db_model->select ( "*", "payments", $where, "payment_date", "DESC", $limit, $start );
137
+			$query = $this->db_model->select("*", "payments", $where, "payment_date", "DESC", $limit, $start);
138 138
 		} else {
139
-			$query = $this->db_model->countQuery ( "*", "payments", $where );
139
+			$query = $this->db_model->countQuery("*", "payments", $where);
140 140
 		}
141 141
 		return $query;
142 142
 	}
143 143
 	function get_user_emails_list($flag, $start = 0, $limit = 0) {
144
-		$account_data = $this->session->userdata ( "accountinfo" );
145
-		$this->db_model->build_search ( 'user_emails_search' );
144
+		$account_data = $this->session->userdata("accountinfo");
145
+		$this->db_model->build_search('user_emails_search');
146 146
 		
147
-		$where = array (
147
+		$where = array(
148 148
 				'accountid' => $account_data ['id'] 
149 149
 		);
150 150
 		if ($flag) {
151
-			$query = $this->db_model->select ( "*", "mail_details", $where, "id", "DESC", $limit, $start );
151
+			$query = $this->db_model->select("*", "mail_details", $where, "id", "DESC", $limit, $start);
152 152
 		} else {
153
-			$query = $this->db_model->countQuery ( "*", "mail_details", $where );
153
+			$query = $this->db_model->countQuery("*", "mail_details", $where);
154 154
 		}
155 155
 		return $query;
156 156
 	}
157 157
 	function add_invoice_config($add_array) {
158
-		$result = $this->db->insert ( 'invoice_conf', $add_array );
158
+		$result = $this->db->insert('invoice_conf', $add_array);
159 159
 		return true;
160 160
 	}
161 161
 	function edit_invoice_config($add_array, $edit_id) {
162
-		$this->db->where ( 'id', $edit_id );
163
-		$result = $this->db->update ( 'invoice_conf', $add_array );
162
+		$this->db->where('id', $edit_id);
163
+		$result = $this->db->update('invoice_conf', $add_array);
164 164
 		return true;
165 165
 	}
166 166
 	function edit_alert_threshold($add_array, $edit_id) {
167
-		$this->db->where ( 'id', $edit_id );
168
-		$result = $this->db->update ( 'accounts', $add_array );
167
+		$this->db->where('id', $edit_id);
168
+		$result = $this->db->update('accounts', $add_array);
169 169
 		return true;
170 170
 	}
171 171
 	function user_ipmap_list($flag, $limit = '', $start = '') {
172
-		$accountinfo = $this->session->userdata ( 'accountinfo' );
172
+		$accountinfo = $this->session->userdata('accountinfo');
173 173
 		$where ['accountid'] = $accountinfo ['id'];
174
-		$this->db_model->build_search ( 'user_ipmap_search' );
174
+		$this->db_model->build_search('user_ipmap_search');
175 175
 		if ($flag) {
176
-			$query = $this->db_model->select ( "*", "ip_map", $where, "id", "ASC", $limit, $start );
176
+			$query = $this->db_model->select("*", "ip_map", $where, "id", "ASC", $limit, $start);
177 177
 		} else {
178
-			$query = $this->db_model->countQuery ( "*", "ip_map", $where );
178
+			$query = $this->db_model->countQuery("*", "ip_map", $where);
179 179
 		}
180 180
 		return $query;
181 181
 	}
182 182
 	function user_sipdevices_list($flag, $accountid = "", $start = "", $limit = "") {
183
-		$where = array (
183
+		$where = array(
184 184
 				"accountid" => $accountid 
185 185
 		);
186
-		$this->db_model->build_search ( 'user_sipdevices_search' );
187
-		$query = array ();
186
+		$this->db_model->build_search('user_sipdevices_search');
187
+		$query = array();
188 188
 		if ($flag) {
189
-			$deviceinfo = $this->db_model->select ( "*", "sip_devices", $where, "id", "ASC", $limit, $start );
189
+			$deviceinfo = $this->db_model->select("*", "sip_devices", $where, "id", "ASC", $limit, $start);
190 190
 			if ($deviceinfo->num_rows > 0) {
191
-				$add_array = $deviceinfo->result_array ();
192
-				foreach ( $add_array as $key => $value ) {
193
-					$vars = json_decode ( $value ['dir_vars'] );
194
-					$vars_new = json_decode ( $value ['dir_params'], true );
195
-					$passowrds = json_decode ( $value ['dir_params'] );
196
-					$query [] = array (
191
+				$add_array = $deviceinfo->result_array();
192
+				foreach ($add_array as $key => $value) {
193
+					$vars = json_decode($value ['dir_vars']);
194
+					$vars_new = json_decode($value ['dir_params'], true);
195
+					$passowrds = json_decode($value ['dir_params']);
196
+					$query [] = array(
197 197
 							'id' => $value ['id'],
198 198
 							'username' => $value ['username'],
199 199
 							'accountid' => $value ['accountid'],
@@ -206,24 +206,24 @@  discard block
 block discarded – undo
206 206
 							'vm_keep_local_after_email' => $vars_new ['vm-keep-local-after-email'],
207 207
 							'effective_caller_id_number' => $vars->effective_caller_id_number,
208 208
 							'password' => $passowrds->password,
209
-							'creation_date' => gmdate ( 'Y-m-d H:i:s' ),
210
-							'last_modified_date' => gmdate ( 'Y-m-d H:i:s' ) 
209
+							'creation_date' => gmdate('Y-m-d H:i:s'),
210
+							'last_modified_date' => gmdate('Y-m-d H:i:s') 
211 211
 					);
212 212
 				}
213 213
 			}
214 214
 		} else {
215
-			$query = $this->db_model->countQuery ( "*", "sip_devices", $where );
215
+			$query = $this->db_model->countQuery("*", "sip_devices", $where);
216 216
 		}
217 217
 		return $query;
218 218
 	}
219 219
 	function user_sipdevice_info($edit_id) {
220
-		$sipdevice_info = $this->db_model->getSelect ( "*", "sip_devices", array (
220
+		$sipdevice_info = $this->db_model->getSelect("*", "sip_devices", array(
221 221
 				'id' => $edit_id 
222
-		) );
223
-		$sipdevice_arr = ( array ) $sipdevice_info->first_row ();
224
-		$vars = ( array ) json_decode ( $sipdevice_arr ['dir_vars'] );
225
-		$params = ( array ) json_decode ( $sipdevice_arr ['dir_params'], true );
226
-		$query = array (
222
+		));
223
+		$sipdevice_arr = (array)$sipdevice_info->first_row();
224
+		$vars = (array)json_decode($sipdevice_arr ['dir_vars']);
225
+		$params = (array)json_decode($sipdevice_arr ['dir_params'], true);
226
+		$query = array(
227 227
 				'id' => $sipdevice_arr ['id'],
228 228
 				'fs_username' => $sipdevice_arr ['username'],
229 229
 				'accountcode' => $sipdevice_arr ['accountid'],
@@ -241,8 +241,8 @@  discard block
 block discarded – undo
241 241
 		return $query;
242 242
 	}
243 243
 	function user_sipdevice_add($add_array) {
244
-		$account_data = $this->session->userdata ( "accountinfo" );
245
-		$parms_array = array (
244
+		$account_data = $this->session->userdata("accountinfo");
245
+		$parms_array = array(
246 246
 				'password' => $add_array ['fs_password'],
247 247
 				'vm-enabled' => $add_array ['voicemail_enabled'],
248 248
 				'vm-password' => $add_array ['voicemail_password'],
@@ -251,30 +251,30 @@  discard block
 block discarded – undo
251 251
 				'vm-keep-local-after-email' => $add_array ['vm_keep_local_after_email'],
252 252
 				'vm-email-all-messages' => $add_array ['vm_send_all_message'] 
253 253
 		);
254
-		$add_array ['status'] = isset ( $add_array ['status'] ) ? $add_array ['status'] : "0";
255
-		$parms_array_vars = array (
254
+		$add_array ['status'] = isset ($add_array ['status']) ? $add_array ['status'] : "0";
255
+		$parms_array_vars = array(
256 256
 				'effective_caller_id_name' => $add_array ['effective_caller_id_name'],
257 257
 				'effective_caller_id_number' => $add_array ['effective_caller_id_number'],
258 258
 				'user_context' => 'default' 
259 259
 		);
260 260
 		
261
-		$new_array = array (
262
-				'creation_date' => gmdate ( 'Y-m-d H:i:s' ),
261
+		$new_array = array(
262
+				'creation_date' => gmdate('Y-m-d H:i:s'),
263 263
 				'username' => $add_array ['fs_username'],
264 264
 				'accountid' => $account_data ['id'],
265 265
 				'status' => $add_array ['status'],
266
-				'dir_params' => json_encode ( $parms_array ),
267
-				'dir_vars' => json_encode ( $parms_array_vars ),
268
-				'sip_profile_id' => $this->common->get_field_name ( 'id', 'sip_profiles', array (
266
+				'dir_params' => json_encode($parms_array),
267
+				'dir_vars' => json_encode($parms_array_vars),
268
+				'sip_profile_id' => $this->common->get_field_name('id', 'sip_profiles', array(
269 269
 						'name' => 'default' 
270
-				) ) 
270
+				)) 
271 271
 		);
272
-		$this->db->insert ( 'sip_devices', $new_array );
273
-		$this->common->mail_to_users ( 'add_sip_device', $account_data );
272
+		$this->db->insert('sip_devices', $new_array);
273
+		$this->common->mail_to_users('add_sip_device', $account_data);
274 274
 		return true;
275 275
 	}
276 276
 	function user_sipdevice_edit($add_array) {
277
-		$parms_array = array (
277
+		$parms_array = array(
278 278
 				'password' => $add_array ['fs_password'],
279 279
 				'vm-enabled' => $add_array ['voicemail_enabled'],
280 280
 				'vm-password' => $add_array ['voicemail_password'],
@@ -283,33 +283,33 @@  discard block
 block discarded – undo
283 283
 				'vm-keep-local-after-email' => $add_array ['vm_keep_local_after_email'],
284 284
 				'vm-email-all-messages' => $add_array ['vm_send_all_message'] 
285 285
 		);
286
-		$parms_array_vars = array (
286
+		$parms_array_vars = array(
287 287
 				'effective_caller_id_name' => $add_array ['effective_caller_id_name'],
288 288
 				'effective_caller_id_number' => $add_array ['effective_caller_id_number'] 
289 289
 		);
290
-		$log_type = $this->session->userdata ( "logintype" );
290
+		$log_type = $this->session->userdata("logintype");
291 291
 		if ($log_type == 0 || $log_type == 3 || $log_type == 1) {
292
-			$add_array ['sip_profile_id'] = $this->common->get_field_name ( 'id', 'sip_profiles', array (
292
+			$add_array ['sip_profile_id'] = $this->common->get_field_name('id', 'sip_profiles', array(
293 293
 					'name' => 'default' 
294
-			) );
294
+			));
295 295
 		}
296
-		$add_array ['status'] = isset ( $add_array ['status'] ) ? $add_array ['status'] : "0";
297
-		$new_array = array (
298
-				'last_modified_date' => gmdate ( 'Y-m-d H:i:s' ),
296
+		$add_array ['status'] = isset ($add_array ['status']) ? $add_array ['status'] : "0";
297
+		$new_array = array(
298
+				'last_modified_date' => gmdate('Y-m-d H:i:s'),
299 299
 				'username' => $add_array ['fs_username'],
300 300
 				'status' => $add_array ['status'],
301
-				'dir_params' => json_encode ( $parms_array ),
302
-				'dir_vars' => json_encode ( $parms_array_vars ),
301
+				'dir_params' => json_encode($parms_array),
302
+				'dir_vars' => json_encode($parms_array_vars),
303 303
 				'sip_profile_id' => $add_array ['sip_profile_id'] 
304 304
 		);
305
-		$this->db->update ( 'sip_devices', $new_array, array (
305
+		$this->db->update('sip_devices', $new_array, array(
306 306
 				'id' => $add_array ['id'] 
307
-		) );
307
+		));
308 308
 		return true;
309 309
 	}
310 310
 	function getuser_cdrs_list($flag, $start, $limit, $export = true) {
311
-		$this->db_model->build_search ( 'user_cdrs_report_search' );
312
-		$account_data = $this->session->userdata ( "accountinfo" );
311
+		$this->db_model->build_search('user_cdrs_report_search');
312
+		$account_data = $this->session->userdata("accountinfo");
313 313
 		$field_name = 'debit';
314 314
 		if ($account_data ['type'] == 0 || $account_data ['type'] == 1) {
315 315
 			$where ['accountid'] = $account_data ['id'];
@@ -319,39 +319,39 @@  discard block
 block discarded – undo
319 319
 			$field_name = 'cost';
320 320
 		}
321 321
 		$table_name = $account_data ['type'] != 1 ? 'cdrs' : 'reseller_cdrs';
322
-		if ($this->session->userdata ( 'advance_search' ) != 1) {
323
-			$where ['callstart >= '] = date ( "Y-m-d" ) . " 00:00:00";
324
-			$where ['callstart <='] = date ( "Y-m-d" ) . " 23:59:59";
322
+		if ($this->session->userdata('advance_search') != 1) {
323
+			$where ['callstart >= '] = date("Y-m-d")." 00:00:00";
324
+			$where ['callstart <='] = date("Y-m-d")." 23:59:59";
325 325
 		}
326
-		$this->db->where ( $where );
327
-		$this->db->order_by ( "callstart desc" );
326
+		$this->db->where($where);
327
+		$this->db->order_by("callstart desc");
328 328
 		if ($flag) {
329
-			if (! $export)
330
-				$this->db->limit ( $limit, $start );
331
-			$this->db->select ( 'callstart,callerid,callednum,pattern,notes,billseconds,disposition,debit,cost,accountid,pricelist_id,calltype,is_recording,trunk_id,uniqueid' );
329
+			if ( ! $export)
330
+				$this->db->limit($limit, $start);
331
+			$this->db->select('callstart,callerid,callednum,pattern,notes,billseconds,disposition,debit,cost,accountid,pricelist_id,calltype,is_recording,trunk_id,uniqueid');
332 332
 		} else {
333
-			$this->db->select ( 'count(*) as count,sum(billseconds) as billseconds,sum(debit) as total_debit,sum(cost) as total_cost,group_concat(distinct(pricelist_id)) as pricelist_ids,group_concat(distinct(trunk_id)) as trunk_ids' );
333
+			$this->db->select('count(*) as count,sum(billseconds) as billseconds,sum(debit) as total_debit,sum(cost) as total_cost,group_concat(distinct(pricelist_id)) as pricelist_ids,group_concat(distinct(trunk_id)) as trunk_ids');
334 334
 		}
335
-		$result = $this->db->get ( $table_name );
335
+		$result = $this->db->get($table_name);
336 336
 		return $result;
337 337
 	}
338
-	function user_fund_transfer($data,$accountinfo){
338
+	function user_fund_transfer($data, $accountinfo) {
339 339
 //	$accountinfo = $this->session->userdata['accountinfo'];
340
-		$data["payment_by"] = $accountinfo['reseller_id'] > 0 ? $accountinfo['reseller_id'] : -1 ;
340
+		$data["payment_by"] = $accountinfo['reseller_id'] > 0 ? $accountinfo['reseller_id'] : -1;
341 341
 		$data['accountid'] = $data['id'];
342 342
 		$data['payment_mode'] = $data['payment_type'];
343
-		unset($data['action'],$data['id'],$data['account_currency'],$data['payment_type']);
343
+		unset($data['action'], $data['id'], $data['account_currency'], $data['payment_type']);
344 344
 		if (isset($data)) {
345
-			$data['credit']=$data['credit'] =='' ?  0 : $data['credit'];
345
+			$data['credit'] = $data['credit'] == '' ? 0 : $data['credit'];
346 346
 			$date = gmdate('Y-m-d H:i:s');
347
-			$accountid=$data['accountid'];
348
-			while($accountid > 0 ){
349
-				$customer_id=$accountid;
350
-				$accountid=$this->common_model->get_parent_info($accountid);
351
-				$parent_id=$accountid > 0 ? $accountid : -1;
347
+			$accountid = $data['accountid'];
348
+			while ($accountid > 0) {
349
+				$customer_id = $accountid;
350
+				$accountid = $this->common_model->get_parent_info($accountid);
351
+				$parent_id = $accountid > 0 ? $accountid : -1;
352 352
 
353 353
 
354
-				if($data['payment_mode'] == 0){
354
+				if ($data['payment_mode'] == 0) {
355 355
 					$insert_arr = array("accountid" => $customer_id,
356 356
 					"credit" => $data['credit'],
357 357
 					'payment_mode'=>$data['payment_mode'],
@@ -366,59 +366,59 @@  discard block
 block discarded – undo
366 366
 		}
367 367
 	}
368 368
 	function user_dashboard_recent_recharge_info() {
369
-		$accountinfo = $this->session->userdata ( 'accountinfo' );
370
-		$userlevel_logintype = $this->session->userdata ( 'userlevel_logintype' );
369
+		$accountinfo = $this->session->userdata('accountinfo');
370
+		$userlevel_logintype = $this->session->userdata('userlevel_logintype');
371 371
 		
372
-		$where_arr = array (
373
-				'payment_by' => - 1 
372
+		$where_arr = array(
373
+				'payment_by' => -1 
374 374
 		);
375 375
 		if ($userlevel_logintype == 1) {
376
-			$where_arr = array (
376
+			$where_arr = array(
377 377
 					'payment_by' => $accountinfo ['id'] 
378 378
 			);
379 379
 		}
380 380
 		if ($userlevel_logintype == 0 || $userlevel_logintype == 3) {
381
-			$where_arr = array (
381
+			$where_arr = array(
382 382
 					'accountid' => $accountinfo ['id'] 
383 383
 			);
384 384
 		}
385
-		$this->db->where ( $where_arr );
386
-		$this->db->select ( 'id,accountid,credit,payment_date,notes' );
387
-		$this->db->from ( 'payments' );
388
-		$this->db->limit ( 10 );
389
-		$this->db->order_by ( 'payment_date', 'desc' );
390
-		return $this->db->get ();
385
+		$this->db->where($where_arr);
386
+		$this->db->select('id,accountid,credit,payment_date,notes');
387
+		$this->db->from('payments');
388
+		$this->db->limit(10);
389
+		$this->db->order_by('payment_date', 'desc');
390
+		return $this->db->get();
391 391
 	}
392 392
 	function get_user_rates_list($flag, $start = 0, $limit = 0) {
393
-		$this->db_model->build_search ( 'user_rates_list_search' );
394
-		$account_data = $this->session->userdata ( "accountinfo" );
395
-		$where = array (
393
+		$this->db_model->build_search('user_rates_list_search');
394
+		$account_data = $this->session->userdata("accountinfo");
395
+		$where = array(
396 396
 				"pricelist_id" => $account_data ["pricelist_id"],
397 397
 				"status" => '0' 
398 398
 		);
399 399
 		if ($flag) {
400
-			$query = $this->db_model->select ( "*", "routes", $where, "id", "ASC", $limit, $start );
400
+			$query = $this->db_model->select("*", "routes", $where, "id", "ASC", $limit, $start);
401 401
 		} else {
402
-			$query = $this->db_model->countQuery ( "*", "routes", $where );
402
+			$query = $this->db_model->countQuery("*", "routes", $where);
403 403
 		}
404 404
 		return $query;
405 405
 	}
406 406
 	function get_user_opensips($flag, $account_number = "", $start = "0", $limit = "0") {
407
-		$this->db_model->build_search_opensips ( $this->opensips_db, 'user_opensips_search' );
408
-		$this->opensips_db->where ( 'accountcode', $account_number );
407
+		$this->db_model->build_search_opensips($this->opensips_db, 'user_opensips_search');
408
+		$this->opensips_db->where('accountcode', $account_number);
409 409
 		if ($flag) {
410
-			$this->opensips_db->limit ( $limit, $start );
410
+			$this->opensips_db->limit($limit, $start);
411 411
 		}
412
-		$result = $this->opensips_db->get ( "subscriber" );
413
-		if ($result->num_rows () > 0) {
412
+		$result = $this->opensips_db->get("subscriber");
413
+		if ($result->num_rows() > 0) {
414 414
 			if ($flag) {
415 415
 				return $result;
416 416
 			} else {
417
-				return $result->num_rows ();
417
+				return $result->num_rows();
418 418
 			}
419 419
 		} else {
420 420
 			if ($flag) {
421
-				$result = ( object ) array (
421
+				$result = (object)array(
422 422
 						'num_rows' => 0 
423 423
 				);
424 424
 			} else {
@@ -428,91 +428,91 @@  discard block
 block discarded – undo
428 428
 		}
429 429
 	}
430 430
 	function user_opensips_add($data) {
431
-		unset ( $data ["action"] );
432
-		$data ['creation_date'] = gmdate ( "Y-m-d H:i:s" );
433
-		$accountinfo = $this->session->userdata ( 'accountinfo' );
431
+		unset ($data ["action"]);
432
+		$data ['creation_date'] = gmdate("Y-m-d H:i:s");
433
+		$accountinfo = $this->session->userdata('accountinfo');
434 434
 		$data ['reseller_id'] = $accountinfo ['type'] == 1 ? $accountinfo ['id'] : 0;
435
-		$this->opensips_db->insert ( "subscriber", $data );
435
+		$this->opensips_db->insert("subscriber", $data);
436 436
 	}
437 437
 	function user_opensips_edit($data, $id) {
438
-		unset ( $data ["action"] );
439
-		$data = array (
438
+		unset ($data ["action"]);
439
+		$data = array(
440 440
 				"username" => $data ['username'],
441 441
 				"password" => $data ['password'],
442 442
 				"accountcode" => $data ['accountcode'],
443 443
 				"domain" => $data ['domain'] 
444 444
 		);
445
-		$this->opensips_db->where ( "id", $id );
446
-		$data ['last_modified_date'] = gmdate ( "Y-m-d H:i:s" );
447
-		$this->opensips_db->update ( "subscriber", $data );
445
+		$this->opensips_db->where("id", $id);
446
+		$data ['last_modified_date'] = gmdate("Y-m-d H:i:s");
447
+		$this->opensips_db->update("subscriber", $data);
448 448
 	}
449 449
 	function user_opensips_delete($id) {
450
-		$this->opensips_db->where ( "id", $id );
451
-		$this->opensips_db->delete ( "subscriber" );
450
+		$this->opensips_db->where("id", $id);
451
+		$this->opensips_db->delete("subscriber");
452 452
 		return true;
453 453
 	}
454 454
 	function get_user_invoice_list($flag, $start = 0, $limit = 0) {
455
-		$this->db_model->build_search ( 'user_invoice_list_search' );
456
-		$accountinfo = $this->session->userdata ( 'accountinfo' );
457
-		$where = array (
455
+		$this->db_model->build_search('user_invoice_list_search');
456
+		$accountinfo = $this->session->userdata('accountinfo');
457
+		$where = array(
458 458
 				"accountid" => $accountinfo ['id'],
459 459
 				'confirm' => 1 
460 460
 		);
461
-		$this->db->where ( $where );
461
+		$this->db->where($where);
462 462
 		$or_where = "(type='I' OR type='R')";
463
-		$this->db->where ( $or_where );
463
+		$this->db->where($or_where);
464 464
 		if ($flag) {
465
-			$query = $this->db_model->select ( "*", "invoices", "", "invoice_date", "desc", $limit, $start );
465
+			$query = $this->db_model->select("*", "invoices", "", "invoice_date", "desc", $limit, $start);
466 466
 		} else {
467
-			$query = $this->db_model->countQuery ( "*", "invoices", "" );
467
+			$query = $this->db_model->countQuery("*", "invoices", "");
468 468
 		}
469 469
 		
470 470
 		return $query;
471 471
 	}
472 472
 	function get_user_cdrs_info($flag, $accountid, $start = 0, $limit = 0) {
473 473
 		if ($flag) {
474
-			$query = $this->db_model->select ( "*", "reseller_cdrs", "", "invoice_date", "desc", $limit, $start );
474
+			$query = $this->db_model->select("*", "reseller_cdrs", "", "invoice_date", "desc", $limit, $start);
475 475
 		} else {
476
-			$query = $this->db_model->countQuery ( "*", "invoices", "" );
476
+			$query = $this->db_model->countQuery("*", "invoices", "");
477 477
 		}
478 478
 	}
479 479
 	function get_invoiceconf($accountid) {
480
-		$return_array = array ();
481
-		$logintype = $this->session->userdata ( 'logintype' );
480
+		$return_array = array();
481
+		$logintype = $this->session->userdata('logintype');
482 482
 		if ($logintype == 1 || $logintype == 5) {
483 483
 			
484
-			$where = array (
484
+			$where = array(
485 485
 					"accountid" => $this->session->userdata ["accountinfo"] ['id'] 
486 486
 			);
487 487
 		} else {
488
-			$where = array (
488
+			$where = array(
489 489
 					'id' => $accountid 
490 490
 			);
491 491
 		}
492
-		$query = $this->db_model->getSelect ( "*", "invoice_conf", $where );
493
-		foreach ( $query->result_array () as $key => $value ) {
492
+		$query = $this->db_model->getSelect("*", "invoice_conf", $where);
493
+		foreach ($query->result_array() as $key => $value) {
494 494
 			$return_array = $value;
495 495
 		}
496 496
 		return $return_array;
497 497
 	}
498 498
 	function getprovider_cdrs_list($flag, $start, $limit, $export = true) {
499
-		$this->db_model->build_search ( 'user_provider_cdrs_report_search' );
500
-		$account_data = $this->session->userdata ( "accountinfo" );
499
+		$this->db_model->build_search('user_provider_cdrs_report_search');
500
+		$account_data = $this->session->userdata("accountinfo");
501 501
 		$where ['provider_id'] = $account_data ['id'];
502
-		if ($this->session->userdata ( 'advance_search' ) != 1) {
503
-			$where ['callstart >= '] = date ( "Y-m-d" ) . " 00:00:00";
504
-			$where ['callstart <='] = date ( "Y-m-d" ) . " 23:59:59";
502
+		if ($this->session->userdata('advance_search') != 1) {
503
+			$where ['callstart >= '] = date("Y-m-d")." 00:00:00";
504
+			$where ['callstart <='] = date("Y-m-d")." 23:59:59";
505 505
 		}
506
-		$this->db->where ( $where );
507
-		$this->db->order_by ( "callstart", "desc" );
506
+		$this->db->where($where);
507
+		$this->db->order_by("callstart", "desc");
508 508
 		if ($flag) {
509
-			if (! $export)
510
-				$this->db->limit ( $limit, $start );
511
-			$this->db->select ( 'callstart,callerid,callednum,pattern,notes,billseconds,disposition,cost,accountid,pricelist_id,calltype,is_recording,trunk_id,uniqueid' );
509
+			if ( ! $export)
510
+				$this->db->limit($limit, $start);
511
+			$this->db->select('callstart,callerid,callednum,pattern,notes,billseconds,disposition,cost,accountid,pricelist_id,calltype,is_recording,trunk_id,uniqueid');
512 512
 		} else {
513
-			$this->db->select ( 'count(*) as count,sum(billseconds) as billseconds,sum(cost) as total_cost,group_concat(distinct(trunk_id)) as trunk_ids' );
513
+			$this->db->select('count(*) as count,sum(billseconds) as billseconds,sum(cost) as total_cost,group_concat(distinct(trunk_id)) as trunk_ids');
514 514
 		}
515
-		$result = $this->db->get ( 'cdrs' );
515
+		$result = $this->db->get('cdrs');
516 516
 		return $result;
517 517
 	}
518 518
 }
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -326,8 +326,9 @@  discard block
 block discarded – undo
326 326
 		$this->db->where ( $where );
327 327
 		$this->db->order_by ( "callstart desc" );
328 328
 		if ($flag) {
329
-			if (! $export)
330
-				$this->db->limit ( $limit, $start );
329
+			if (! $export) {
330
+							$this->db->limit ( $limit, $start );
331
+			}
331 332
 			$this->db->select ( 'callstart,callerid,callednum,pattern,notes,billseconds,disposition,debit,cost,accountid,pricelist_id,calltype,is_recording,trunk_id,uniqueid' );
332 333
 		} else {
333 334
 			$this->db->select ( 'count(*) as count,sum(billseconds) as billseconds,sum(debit) as total_debit,sum(cost) as total_cost,group_concat(distinct(pricelist_id)) as pricelist_ids,group_concat(distinct(trunk_id)) as trunk_ids' );
@@ -506,8 +507,9 @@  discard block
 block discarded – undo
506 507
 		$this->db->where ( $where );
507 508
 		$this->db->order_by ( "callstart", "desc" );
508 509
 		if ($flag) {
509
-			if (! $export)
510
-				$this->db->limit ( $limit, $start );
510
+			if (! $export) {
511
+							$this->db->limit ( $limit, $start );
512
+			}
511 513
 			$this->db->select ( 'callstart,callerid,callednum,pattern,notes,billseconds,disposition,cost,accountid,pricelist_id,calltype,is_recording,trunk_id,uniqueid' );
512 514
 		} else {
513 515
 			$this->db->select ( 'count(*) as count,sum(billseconds) as billseconds,sum(cost) as total_cost,group_concat(distinct(trunk_id)) as trunk_ids' );
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/user/controllers/payment.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -22,17 +22,17 @@  discard block
 block discarded – undo
22 22
 // ##############################################################################
23 23
 class Payment extends MX_Controller {
24 24
 	function Payment() {
25
-		parent::__construct ();
26
-		$this->load->helper ( 'template_inheritance' );
27
-		$this->load->library ( 'session' );
28
-		$this->load->library ( 'encrypt' );
29
-		$this->load->helper ( 'form' );
25
+		parent::__construct();
26
+		$this->load->helper('template_inheritance');
27
+		$this->load->library('session');
28
+		$this->load->library('encrypt');
29
+		$this->load->helper('form');
30 30
 	}
31 31
 	function index() {
32
-		$account_data = $this->session->userdata ( "accountinfo" );
32
+		$account_data = $this->session->userdata("accountinfo");
33 33
 		$data ["accountid"] = $account_data ["id"];
34 34
 		$data ["accountid"] = $account_data ["id"];
35
-		$data ["page_title"] = gettext ( "Recharge" );
35
+		$data ["page_title"] = gettext("Recharge");
36 36
 		
37 37
 		$system_config = common_model::$global_config ['system_config'];
38 38
 		if ($system_config ["paypal_mode"] == 0) {
@@ -44,13 +44,13 @@  discard block
 block discarded – undo
44 44
 		}
45 45
 		$data ["paypal_tax"] = $system_config ["paypal_tax"];
46 46
 		
47
-		$data ["from_currency"] = $this->common->get_field_name ( 'currency', 'currency', $account_data ["currency_id"] );
47
+		$data ["from_currency"] = $this->common->get_field_name('currency', 'currency', $account_data ["currency_id"]);
48 48
 		$data ["to_currency"] = Common_model::$global_config ['system_config'] ['base_currency'];
49
-		$this->load->view ( "user_payment", $data );
49
+		$this->load->view("user_payment", $data);
50 50
 	}
51 51
 	function convert_amount($amount) {
52
-		$amount = $this->common_model->add_calculate_currency ( $amount, "", "", true, false );
53
-		echo number_format ( ( float ) $amount, 2 );
52
+		$amount = $this->common_model->add_calculate_currency($amount, "", "", true, false);
53
+		echo number_format((float)$amount, 2);
54 54
 	}
55 55
 }
56 56
 ?> 
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/user/libraries/user_form.php 2 patches
Spacing   +706 added lines, -706 removed lines patch added patch discarded remove patch
@@ -20,17 +20,17 @@  discard block
 block discarded – undo
20 20
 // You should have received a copy of the GNU Affero General Public License
21 21
 // along with this program. If not, see <http://www.gnu.org/licenses/>.
22 22
 // ##############################################################################
23
-if (! defined ( 'BASEPATH' )) {
24
-	exit ( 'No direct script access allowed' );
23
+if ( ! defined('BASEPATH')) {
24
+	exit ('No direct script access allowed');
25 25
 }
26 26
 class User_form {
27 27
 	function __construct($library_name = '') {
28
-		$this->CI = & get_instance ();
28
+		$this->CI = & get_instance();
29 29
 	}
30 30
 	function build_packages_list_for_user() {
31
-		$grid_field_arr = json_encode ( array (
32
-				array (
33
-						gettext ( "Name" ),
31
+		$grid_field_arr = json_encode(array(
32
+				array(
33
+						gettext("Name"),
34 34
 						"310",
35 35
 						"package_name",
36 36
 						"",
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
40 40
 						"true",
41 41
 						"center" 
42 42
 				),
43
-				array (
44
-						gettext ( "Rate Group" ),
43
+				array(
44
+						gettext("Rate Group"),
45 45
 						"250",
46 46
 						"pricelist_id",
47 47
 						"name",
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
 						"true",
52 52
 						"center" 
53 53
 				),
54
-				array (
55
-						gettext ( "Included Seconds" ),
54
+				array(
55
+						gettext("Included Seconds"),
56 56
 						"260",
57 57
 						"includedseconds",
58 58
 						"",
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
 						"true",
63 63
 						"center" 
64 64
 				),
65
-				array (
66
-						gettext ( "Status" ),
65
+				array(
66
+						gettext("Status"),
67 67
 						"160",
68 68
 						"status",
69 69
 						"status",
@@ -73,51 +73,51 @@  discard block
 block discarded – undo
73 73
 						"true",
74 74
 						"center" 
75 75
 				) 
76
-		) );
76
+		));
77 77
 		return $grid_field_arr;
78 78
 	}
79 79
 	function build_refill_list_for_user() {
80
-		$grid_field_arr = json_encode ( array (
80
+		$grid_field_arr = json_encode(array(
81 81
 				
82
-				array (
83
-						gettext ( "Date" ),
82
+				array(
83
+						gettext("Date"),
84 84
 						"225",
85 85
 						"payment_date",
86 86
 						"",
87 87
 						"",
88 88
 						"" 
89 89
 				),
90
-				array (
91
-						gettext ( "Amount" ),
90
+				array(
91
+						gettext("Amount"),
92 92
 						"250",
93 93
 						"credit",
94 94
 						"credit",
95 95
 						"credit",
96 96
 						"convert_to_currency" 
97 97
 				),
98
-				array (
99
-						gettext ( "Refill By" ),
98
+				array(
99
+						gettext("Refill By"),
100 100
 						"230",
101 101
 						"payment_by",
102 102
 						"payment_by",
103 103
 						"payment_by",
104 104
 						"get_refill_by" 
105 105
 				),
106
-				array (
107
-						gettext ( "Note" ),
106
+				array(
107
+						gettext("Note"),
108 108
 						"290",
109 109
 						"notes",
110 110
 						"",
111 111
 						"",
112 112
 						"" 
113 113
 				) 
114
-		) );
114
+		));
115 115
 		return $grid_field_arr;
116 116
 	}
117 117
 	function build_emails_list_for_user() {
118
-		$grid_field_arr = json_encode ( array (
119
-				array (
120
-						gettext ( "Date" ),
118
+		$grid_field_arr = json_encode(array(
119
+				array(
120
+						gettext("Date"),
121 121
 						"110",
122 122
 						"date",
123 123
 						"",
@@ -127,8 +127,8 @@  discard block
 block discarded – undo
127 127
 						"true",
128 128
 						"center" 
129 129
 				),
130
-				array (
131
-						gettext ( "From" ),
130
+				array(
131
+						gettext("From"),
132 132
 						"170",
133 133
 						"from",
134 134
 						"",
@@ -138,8 +138,8 @@  discard block
 block discarded – undo
138 138
 						"true",
139 139
 						"center" 
140 140
 				),
141
-				array (
142
-						gettext ( "Body" ),
141
+				array(
142
+						gettext("Body"),
143 143
 						"550",
144 144
 						"body",
145 145
 						"",
@@ -149,8 +149,8 @@  discard block
 block discarded – undo
149 149
 						"true",
150 150
 						"center" 
151 151
 				),
152
-				array (
153
-						gettext ( "Attachement" ),
152
+				array(
153
+						gettext("Attachement"),
154 154
 						"100",
155 155
 						"attachment",
156 156
 						"attachment",
@@ -160,8 +160,8 @@  discard block
 block discarded – undo
160 160
 						"true",
161 161
 						"center" 
162 162
 				),
163
-				array (
164
-						gettext ( "Status" ),
163
+				array(
164
+						gettext("Status"),
165 165
 						"100",
166 166
 						"status",
167 167
 						"status",
@@ -171,21 +171,21 @@  discard block
 block discarded – undo
171 171
 						"true",
172 172
 						"center" 
173 173
 				) 
174
-		) );
174
+		));
175 175
 		return $grid_field_arr;
176 176
 	}
177 177
 	function build_user_emails_search() {
178
-		$form ['forms'] = array (
178
+		$form ['forms'] = array(
179 179
 				"",
180
-				array (
180
+				array(
181 181
 						'id' => "user_emails_search" 
182 182
 				) 
183 183
 		);
184
-		$form ['Search'] = array (
185
-				array (
186
-						gettext ( 'From Date' ),
184
+		$form ['Search'] = array(
185
+				array(
186
+						gettext('From Date'),
187 187
 						'INPUT',
188
-						array (
188
+						array(
189 189
 								'name' => 'date[]',
190 190
 								'id' => 'customer_cdr_from_date',
191 191
 								'size' => '20',
@@ -196,10 +196,10 @@  discard block
 block discarded – undo
196 196
 						'',
197 197
 						'date[date-date]' 
198 198
 				),
199
-				array (
200
-						gettext ( 'To Date' ),
199
+				array(
200
+						gettext('To Date'),
201 201
 						'INPUT',
202
-						array (
202
+						array(
203 203
 								'name' => 'date[]',
204 204
 								'id' => 'customer_cdr_to_date',
205 205
 								'size' => '20',
@@ -210,10 +210,10 @@  discard block
 block discarded – undo
210 210
 						'',
211 211
 						'date[date-date]' 
212 212
 				),
213
-				array (
214
-						gettext ( 'From' ),
213
+				array(
214
+						gettext('From'),
215 215
 						'INPUT',
216
-						array (
216
+						array(
217 217
 								'name' => 'from[from]',
218 218
 								'',
219 219
 								'id' => 'from',
@@ -230,10 +230,10 @@  discard block
 block discarded – undo
230 230
 						'search_string_type',
231 231
 						'' 
232 232
 				),
233
-				array (
234
-						gettext ( 'Body' ),
233
+				array(
234
+						gettext('Body'),
235 235
 						'INPUT',
236
-						array (
236
+						array(
237 237
 								'name' => 'body[body]',
238 238
 								'',
239 239
 								'id' => 'body',
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 						'search_string_type',
251 251
 						'' 
252 252
 				),
253
-				array (
253
+				array(
254 254
 						'',
255 255
 						'HIDDEN',
256 256
 						'ajax_search',
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 						'',
260 260
 						'' 
261 261
 				),
262
-				array (
262
+				array(
263 263
 						'',
264 264
 						'HIDDEN',
265 265
 						'advance_search',
@@ -269,18 +269,18 @@  discard block
 block discarded – undo
269 269
 						'' 
270 270
 				) 
271 271
 		);
272
-		$form ['button_search'] = array (
272
+		$form ['button_search'] = array(
273 273
 				'name' => 'action',
274 274
 				'id' => "user_email_search_btn",
275
-				'content' => gettext ( 'Search' ),
275
+				'content' => gettext('Search'),
276 276
 				'value' => 'save',
277 277
 				'type' => 'button',
278 278
 				'class' => 'btn btn-line-parrot pull-right' 
279 279
 		);
280
-		$form ['button_reset'] = array (
280
+		$form ['button_reset'] = array(
281 281
 				'name' => 'action',
282 282
 				'id' => "id_reset",
283
-				'content' => gettext ( 'Clear' ),
283
+				'content' => gettext('Clear'),
284 284
 				'value' => 'cancel',
285 285
 				'type' => 'reset',
286 286
 				'class' => 'btn btn-line-sky pull-right margin-x-10' 
@@ -289,26 +289,26 @@  discard block
 block discarded – undo
289 289
 	}
290 290
 	function get_userprofile_form_fields($dataArr = false) {
291 291
 		if ($dataArr ['id'] > 0)
292
-			$val = 'accounts.email.' . $dataArr ['id'];
292
+			$val = 'accounts.email.'.$dataArr ['id'];
293 293
 		else
294 294
 			$val = 'accounts.email';
295
-		$uname = $this->CI->common->find_uniq_rendno ( common_model::$global_config ['system_config'] ['cardlength'], 'number', 'accounts' );
296
-		$password = $this->CI->common->generate_password ();
297
-		$logintype = $this->CI->session->userdata ( 'logintype' );
298
-		$pin = ($logintype == '0') ? array (
299
-				gettext ( 'Pin' ),
295
+		$uname = $this->CI->common->find_uniq_rendno(common_model::$global_config ['system_config'] ['cardlength'], 'number', 'accounts');
296
+		$password = $this->CI->common->generate_password();
297
+		$logintype = $this->CI->session->userdata('logintype');
298
+		$pin = ($logintype == '0') ? array(
299
+				gettext('Pin'),
300 300
 				'INPUT',
301
-				array (
301
+				array(
302 302
 						'name' => 'pin',
303 303
 						'size' => '20',
304 304
 						'class' => "text field medium" 
305 305
 				),
306 306
 				'tOOL TIP',
307 307
 				'' 
308
-		) : array (
308
+		) : array(
309 309
 				'',
310 310
 				'HIDDEN',
311
-				array (
311
+				array(
312 312
 						'name' => 'Pin' 
313 313
 				),
314 314
 				'',
@@ -316,19 +316,19 @@  discard block
 block discarded – undo
316 316
 				'',
317 317
 				'' 
318 318
 		);
319
-		$form ['forms'] = array (
320
-				base_url () . 'user/user_myprofile/',
321
-				array (
319
+		$form ['forms'] = array(
320
+				base_url().'user/user_myprofile/',
321
+				array(
322 322
 						"id" => "user_form",
323 323
 						"name" => "user_form" 
324 324
 				) 
325 325
 		);
326 326
 		
327
-		$form ['User Profile'] = array (
328
-				array (
327
+		$form ['User Profile'] = array(
328
+				array(
329 329
 						'',
330 330
 						'HIDDEN',
331
-						array (
331
+						array(
332 332
 								'name' => 'id' 
333 333
 						),
334 334
 						'',
@@ -336,10 +336,10 @@  discard block
 block discarded – undo
336 336
 						'',
337 337
 						'' 
338 338
 				),
339
-				array (
339
+				array(
340 340
 						'',
341 341
 						'HIDDEN',
342
-						array (
342
+						array(
343 343
 								'name' => 'type',
344 344
 								'value' => '0' 
345 345
 						),
@@ -347,10 +347,10 @@  discard block
 block discarded – undo
347 347
 						'',
348 348
 						'' 
349 349
 				),
350
-				array (
351
-						gettext ( 'Account Number' ),
350
+				array(
351
+						gettext('Account Number'),
352 352
 						'INPUT',
353
-						array (
353
+						array(
354 354
 								'name' => 'number',
355 355
 								'value' => $uname,
356 356
 								'size' => '20',
@@ -362,10 +362,10 @@  discard block
 block discarded – undo
362 362
 						'Please Enter account number' 
363 363
 				),
364 364
 				$pin,
365
-				array (
366
-						gettext ( 'Company' ),
365
+				array(
366
+						gettext('Company'),
367 367
 						'INPUT',
368
-						array (
368
+						array(
369 369
 								'name' => 'company_name',
370 370
 								'size' => '15',
371 371
 								'class' => 'text field medium' 
@@ -374,10 +374,10 @@  discard block
 block discarded – undo
374 374
 						'tOOL TIP',
375 375
 						'' 
376 376
 				),
377
-				array (
378
-						gettext ( 'First Name' ),
377
+				array(
378
+						gettext('First Name'),
379 379
 						'INPUT',
380
-						array (
380
+						array(
381 381
 								'name' => 'first_name',
382 382
 								'id' => 'first_name',
383 383
 								'size' => '15',
@@ -387,10 +387,10 @@  discard block
 block discarded – undo
387 387
 						'tOOL TIP',
388 388
 						'Please Enter account number' 
389 389
 				),
390
-				array (
391
-						gettext ( 'Last Name' ),
390
+				array(
391
+						gettext('Last Name'),
392 392
 						'INPUT',
393
-						array (
393
+						array(
394 394
 								'name' => 'last_name',
395 395
 								'size' => '15',
396 396
 								'class' => "text field medium" 
@@ -399,10 +399,10 @@  discard block
 block discarded – undo
399 399
 						'tOOL TIP',
400 400
 						'Please Enter Password' 
401 401
 				),
402
-				array (
403
-						gettext ( 'Telephone 1' ),
402
+				array(
403
+						gettext('Telephone 1'),
404 404
 						'INPUT',
405
-						array (
405
+						array(
406 406
 								'name' => 'telephone_1',
407 407
 								'size' => '15',
408 408
 								'class' => "text field medium" 
@@ -411,10 +411,10 @@  discard block
 block discarded – undo
411 411
 						'tOOL TIP',
412 412
 						'Please Enter Password' 
413 413
 				),
414
-				array (
415
-						gettext ( 'Telephone 2' ),
414
+				array(
415
+						gettext('Telephone 2'),
416 416
 						'INPUT',
417
-						array (
417
+						array(
418 418
 								'name' => 'telephone_2',
419 419
 								'size' => '15',
420 420
 								'class' => "text field medium" 
@@ -423,22 +423,22 @@  discard block
 block discarded – undo
423 423
 						'tOOL TIP',
424 424
 						'Please Enter Password' 
425 425
 				),
426
-				array (
427
-						gettext ( 'Email' ),
426
+				array(
427
+						gettext('Email'),
428 428
 						'INPUT',
429
-						array (
429
+						array(
430 430
 								'name' => 'email',
431 431
 								'size' => '50',
432 432
 								'class' => "text field medium" 
433 433
 						),
434
-						'required|valid_email|is_unique[' . $val . ']',
434
+						'required|valid_email|is_unique['.$val.']',
435 435
 						'tOOL TIP',
436 436
 						'Please Enter Password' 
437 437
 				),
438
-				array (
439
-						gettext ( 'Address 1' ),
438
+				array(
439
+						gettext('Address 1'),
440 440
 						'INPUT',
441
-						array (
441
+						array(
442 442
 								'name' => 'address_1',
443 443
 								'size' => '15',
444 444
 								'class' => "text field medium" 
@@ -447,10 +447,10 @@  discard block
 block discarded – undo
447 447
 						'tOOL TIP',
448 448
 						'Please Enter Password' 
449 449
 				),
450
-				array (
451
-						gettext ( 'Address 2' ),
450
+				array(
451
+						gettext('Address 2'),
452 452
 						'INPUT',
453
-						array (
453
+						array(
454 454
 								'name' => 'address_2',
455 455
 								'size' => '15',
456 456
 								'class' => "text field medium" 
@@ -459,10 +459,10 @@  discard block
 block discarded – undo
459 459
 						'tOOL TIP',
460 460
 						'Please Enter Password' 
461 461
 				),
462
-				array (
463
-						gettext ( 'City' ),
462
+				array(
463
+						gettext('City'),
464 464
 						'INPUT',
465
-						array (
465
+						array(
466 466
 								'name' => 'city',
467 467
 								'size' => '20',
468 468
 								'class' => "text field medium" 
@@ -471,10 +471,10 @@  discard block
 block discarded – undo
471 471
 						'tOOL TIP',
472 472
 						'Please Enter Password' 
473 473
 				),
474
-				array (
475
-						gettext ( 'Province/State' ),
474
+				array(
475
+						gettext('Province/State'),
476 476
 						'INPUT',
477
-						array (
477
+						array(
478 478
 								'name' => 'province',
479 479
 								'size' => '15',
480 480
 								'class' => "text field medium" 
@@ -483,10 +483,10 @@  discard block
 block discarded – undo
483 483
 						'tOOL TIP',
484 484
 						'Please Enter Password' 
485 485
 				),
486
-				array (
487
-						gettext ( 'Zip/Postal Code' ),
486
+				array(
487
+						gettext('Zip/Postal Code'),
488 488
 						'INPUT',
489
-						array (
489
+						array(
490 490
 								'name' => 'postal_code',
491 491
 								'size' => '15',
492 492
 								'class' => "text field medium" 
@@ -495,9 +495,9 @@  discard block
 block discarded – undo
495 495
 						'tOOL TIP',
496 496
 						'Please Enter Password' 
497 497
 				),
498
-				array (
499
-						gettext ( 'Country' ),
500
-						array (
498
+				array(
499
+						gettext('Country'),
500
+						array(
501 501
 								'name' => 'country_id',
502 502
 								'class' => 'country_id' 
503 503
 						),
@@ -513,9 +513,9 @@  discard block
 block discarded – undo
513 513
 						'',
514 514
 						'' 
515 515
 				),
516
-				array (
517
-						gettext ( 'Timezone' ),
518
-						array (
516
+				array(
517
+						gettext('Timezone'),
518
+						array(
519 519
 								'name' => 'timezone_id',
520 520
 								'class' => 'timezone_id' 
521 521
 						),
@@ -532,9 +532,9 @@  discard block
 block discarded – undo
532 532
 						'' 
533 533
 				) 
534 534
 		);
535
-		$form ['button_save'] = array (
535
+		$form ['button_save'] = array(
536 536
 				'name' => 'action',
537
-				'content' => gettext ( 'Save' ),
537
+				'content' => gettext('Save'),
538 538
 				'value' => 'save',
539 539
 				'type' => 'submit',
540 540
 				'class' => 'btn btn-line-parrot' 
@@ -543,18 +543,18 @@  discard block
 block discarded – undo
543 543
 		return $form;
544 544
 	}
545 545
 	function get_userprofile_change_password() {
546
-		$form ['forms'] = array (
547
-				base_url () . 'user/user_change_password/',
548
-				array (
546
+		$form ['forms'] = array(
547
+				base_url().'user/user_change_password/',
548
+				array(
549 549
 						"id" => "customer_alert_threshold",
550 550
 						"name" => "user_change_password" 
551 551
 				) 
552 552
 		);
553
-		$form [gettext ( 'Change Password' )] = array (
554
-				array (
553
+		$form [gettext('Change Password')] = array(
554
+				array(
555 555
 						'',
556 556
 						'HIDDEN',
557
-						array (
557
+						array(
558 558
 								'name' => 'id' 
559 559
 						),
560 560
 						'',
@@ -562,10 +562,10 @@  discard block
 block discarded – undo
562 562
 						'',
563 563
 						'' 
564 564
 				),
565
-				array (
566
-						gettext ( 'Old Password' ),
565
+				array(
566
+						gettext('Old Password'),
567 567
 						'PASSWORD',
568
-						array (
568
+						array(
569 569
 								'name' => 'password',
570 570
 								'size' => '20',
571 571
 								'class' => "text field medium",
@@ -578,10 +578,10 @@  discard block
 block discarded – undo
578 578
 						'',
579 579
 						'' 
580 580
 				),
581
-				array (
582
-						gettext ( 'New Password' ),
581
+				array(
582
+						gettext('New Password'),
583 583
 						'PASSWORD',
584
-						array (
584
+						array(
585 585
 								'name' => 'new_password',
586 586
 								'size' => '20',
587 587
 								'class' => "text field medium",
@@ -594,10 +594,10 @@  discard block
 block discarded – undo
594 594
 						'',
595 595
 						'' 
596 596
 				),
597
-				array (
598
-						gettext ( 'Confirm Password' ),
597
+				array(
598
+						gettext('Confirm Password'),
599 599
 						'PASSWORD',
600
-						array (
600
+						array(
601 601
 								'name' => 'new_confirm_password',
602 602
 								'size' => '20',
603 603
 								'class' => "text field medium",
@@ -611,9 +611,9 @@  discard block
 block discarded – undo
611 611
 						'' 
612 612
 				) 
613 613
 		);
614
-		$form ['button_save'] = array (
614
+		$form ['button_save'] = array(
615 615
 				'name' => 'action',
616
-				'content' => gettext ( 'Save' ),
616
+				'content' => gettext('Save'),
617 617
 				'value' => 'save',
618 618
 				'type' => 'submit',
619 619
 				'class' => 'btn btn-line-parrot' 
@@ -621,13 +621,13 @@  discard block
 block discarded – undo
621 621
 		return $form;
622 622
 	}
623 623
 	function build_user_invoices() {
624
-		$account_info = $accountinfo = $this->CI->session->userdata ( 'accountinfo' );
624
+		$account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
625 625
 		$currency_id = $account_info ['currency_id'];
626
-		$currency = $this->CI->common->get_field_name ( 'currency', 'currency', $currency_id );
627
-		$url = ($this->CI->session->userdata ( 'logintype' ) == 0) ? "/user/user_invoice_download/" : '/invoices/invoice_main_download/';
628
-		$grid_field_arr = json_encode ( array (
629
-				array (
630
-						gettext ( "Number" ),
626
+		$currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id);
627
+		$url = ($this->CI->session->userdata('logintype') == 0) ? "/user/user_invoice_download/" : '/invoices/invoice_main_download/';
628
+		$grid_field_arr = json_encode(array(
629
+				array(
630
+						gettext("Number"),
631 631
 						"110",
632 632
 						"id",
633 633
 						"id,'',type",
@@ -637,8 +637,8 @@  discard block
 block discarded – undo
637 637
 						"true",
638 638
 						"center" 
639 639
 				),
640
-				array (
641
-						gettext ( "Type" ),
640
+				array(
641
+						gettext("Type"),
642 642
 						"100",
643 643
 						"id",
644 644
 						"id,'',type",
@@ -648,8 +648,8 @@  discard block
 block discarded – undo
648 648
 						"true",
649 649
 						"center" 
650 650
 				),
651
-				array (
652
-						gettext ( "Generated Date" ),
651
+				array(
652
+						gettext("Generated Date"),
653 653
 						"110",
654 654
 						"invoice_date",
655 655
 						"invoice_date",
@@ -659,8 +659,8 @@  discard block
 block discarded – undo
659 659
 						"true",
660 660
 						"center" 
661 661
 				),
662
-				array (
663
-						gettext ( "From Date" ),
662
+				array(
663
+						gettext("From Date"),
664 664
 						"100",
665 665
 						"from_date",
666 666
 						"from_date",
@@ -670,8 +670,8 @@  discard block
 block discarded – undo
670 670
 						"true",
671 671
 						"center" 
672 672
 				),
673
-				array (
674
-						gettext ( "Due Date" ),
673
+				array(
674
+						gettext("Due Date"),
675 675
 						"100",
676 676
 						"",
677 677
 						"",
@@ -681,8 +681,8 @@  discard block
 block discarded – undo
681 681
 						"true",
682 682
 						"center" 
683 683
 				),
684
-				array (
685
-						gettext ( "Last Pay Date" ),
684
+				array(
685
+						gettext("Last Pay Date"),
686 686
 						"100",
687 687
 						"",
688 688
 						"",
@@ -692,8 +692,8 @@  discard block
 block discarded – undo
692 692
 						"true",
693 693
 						"center" 
694 694
 				),
695
-				array (
696
-						gettext ( "Amount" ) . "($currency)",
695
+				array(
696
+						gettext("Amount")."($currency)",
697 697
 						"100",
698 698
 						"id",
699 699
 						"id",
@@ -703,8 +703,8 @@  discard block
 block discarded – undo
703 703
 						"true",
704 704
 						"right" 
705 705
 				),
706
-				array (
707
-						gettext ( "Outstanding Amount" ) . "<br>($currency)",
706
+				array(
707
+						gettext("Outstanding Amount")."<br>($currency)",
708 708
 						"150",
709 709
 						"",
710 710
 						"",
@@ -714,34 +714,34 @@  discard block
 block discarded – undo
714 714
 						"true",
715 715
 						"right" 
716 716
 				),
717
-				array (
718
-						gettext ( "Action" ),
717
+				array(
718
+						gettext("Action"),
719 719
 						"140",
720 720
 						"",
721 721
 						"",
722 722
 						"",
723
-						array (
724
-								"DOWNLOAD" => array (
723
+						array(
724
+								"DOWNLOAD" => array(
725 725
 										"url" => $url,
726 726
 										"mode" => "single" 
727 727
 								) 
728 728
 						) 
729 729
 				) 
730
-		) );
730
+		));
731 731
 		return $grid_field_arr;
732 732
 	}
733 733
 	function build_user_invoices_search() {
734
-		$form ['forms'] = array (
734
+		$form ['forms'] = array(
735 735
 				"",
736
-				array (
736
+				array(
737 737
 						'id' => "user_invoice_search" 
738 738
 				) 
739 739
 		);
740
-		$form ['Search'] = array (
741
-				array (
742
-						gettext ( 'From Date' ),
740
+		$form ['Search'] = array(
741
+				array(
742
+						gettext('From Date'),
743 743
 						'INPUT',
744
-						array (
744
+						array(
745 745
 								'name' => 'from_date[0]',
746 746
 								'id' => 'invoice_from_date',
747 747
 								'size' => '20',
@@ -752,10 +752,10 @@  discard block
 block discarded – undo
752 752
 						'',
753 753
 						'from_date[from_date-date]' 
754 754
 				),
755
-				array (
756
-						gettext ( 'To Date' ),
755
+				array(
756
+						gettext('To Date'),
757 757
 						'INPUT',
758
-						array (
758
+						array(
759 759
 								'name' => 'to_date[1]',
760 760
 								'id' => 'invoice_to_date',
761 761
 								'size' => '20',
@@ -766,10 +766,10 @@  discard block
 block discarded – undo
766 766
 						'',
767 767
 						'to_date[to_date-date]' 
768 768
 				),
769
-				array (
770
-						gettext ( 'Amount' ),
769
+				array(
770
+						gettext('Amount'),
771 771
 						'INPUT',
772
-						array (
772
+						array(
773 773
 								'name' => 'amount[amount]',
774 774
 								'value' => '',
775 775
 								'size' => '20',
@@ -785,10 +785,10 @@  discard block
 block discarded – undo
785 785
 						'search_string_type',
786 786
 						'' 
787 787
 				),
788
-				array (
789
-						gettext ( 'Generated Date' ),
788
+				array(
789
+						gettext('Generated Date'),
790 790
 						'INPUT',
791
-						array (
791
+						array(
792 792
 								'name' => 'invoice_date[0]',
793 793
 								'',
794 794
 								'size' => '20',
@@ -800,7 +800,7 @@  discard block
 block discarded – undo
800 800
 						'',
801 801
 						'invoice_date[invoice_date-date]' 
802 802
 				),
803
-				array (
803
+				array(
804 804
 						'',
805 805
 						'HIDDEN',
806 806
 						'ajax_search',
@@ -809,7 +809,7 @@  discard block
 block discarded – undo
809 809
 						'',
810 810
 						'' 
811 811
 				),
812
-				array (
812
+				array(
813 813
 						'',
814 814
 						'HIDDEN',
815 815
 						'advance_search',
@@ -819,18 +819,18 @@  discard block
 block discarded – undo
819 819
 						'' 
820 820
 				) 
821 821
 		);
822
-		$form ['button_search'] = array (
822
+		$form ['button_search'] = array(
823 823
 				'name' => 'action',
824 824
 				'id' => "user_invoice_search_btn",
825
-				'content' => gettext ( 'Search' ),
825
+				'content' => gettext('Search'),
826 826
 				'value' => 'save',
827 827
 				'type' => 'button',
828 828
 				'class' => 'btn btn-line-parrot pull-right' 
829 829
 		);
830
-		$form ['button_reset'] = array (
830
+		$form ['button_reset'] = array(
831 831
 				'name' => 'action',
832 832
 				'id' => "id_reset",
833
-				'content' => gettext ( 'Clear' ),
833
+				'content' => gettext('Clear'),
834 834
 				'value' => 'cancel',
835 835
 				'type' => 'reset',
836 836
 				'class' => 'btn btn-line-sky pull-right margin-x-10' 
@@ -838,20 +838,20 @@  discard block
 block discarded – undo
838 838
 		return $form;
839 839
 	}
840 840
 	function build_user_charge_history() {
841
-		$account_info = $accountinfo = $this->CI->session->userdata ( 'accountinfo' );
841
+		$account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
842 842
 		$currency_id = $account_info ['currency_id'];
843
-		$currency = $this->CI->common->get_field_name ( 'currency', 'currency', $currency_id );
844
-		$grid_field_arr = json_encode ( array (
845
-				array (
846
-						gettext ( "Created Date" ),
843
+		$currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id);
844
+		$grid_field_arr = json_encode(array(
845
+				array(
846
+						gettext("Created Date"),
847 847
 						"140",
848 848
 						"created_date",
849 849
 						"",
850 850
 						"",
851 851
 						"" 
852 852
 				),
853
-				array (
854
-						gettext ( "Invoice Number" ),
853
+				array(
854
+						gettext("Invoice Number"),
855 855
 						"120",
856 856
 						"created_date",
857 857
 						"",
@@ -861,16 +861,16 @@  discard block
 block discarded – undo
861 861
 						"true",
862 862
 						"center" 
863 863
 				),
864
-				array (
865
-						gettext ( "Charge Type" ),
864
+				array(
865
+						gettext("Charge Type"),
866 866
 						"100",
867 867
 						"item_type",
868 868
 						"",
869 869
 						"",
870 870
 						"" 
871 871
 				),
872
-				array (
873
-						gettext ( "Before Balance" ) . "<br/>($currency)",
872
+				array(
873
+						gettext("Before Balance")."<br/>($currency)",
874 874
 						"120",
875 875
 						"before_balance",
876 876
 						"before_balance",
@@ -880,8 +880,8 @@  discard block
 block discarded – undo
880 880
 						"true",
881 881
 						"right" 
882 882
 				),
883
-				array (
884
-						gettext ( "Debit" ) . "<br/>($currency)",
883
+				array(
884
+						gettext("Debit")."<br/>($currency)",
885 885
 						"120",
886 886
 						"debit",
887 887
 						"debit",
@@ -891,8 +891,8 @@  discard block
 block discarded – undo
891 891
 						"true",
892 892
 						"right" 
893 893
 				),
894
-				array (
895
-						gettext ( "Credit" ) . "<br/>($currency)",
894
+				array(
895
+						gettext("Credit")."<br/>($currency)",
896 896
 						"120",
897 897
 						"credit",
898 898
 						"credit",
@@ -902,8 +902,8 @@  discard block
 block discarded – undo
902 902
 						"true",
903 903
 						"right" 
904 904
 				),
905
-				array (
906
-						gettext ( "After Balance" ) . "<br/>($currency)",
905
+				array(
906
+						gettext("After Balance")."<br/>($currency)",
907 907
 						"120",
908 908
 						"after_balance",
909 909
 						"after_balance",
@@ -913,29 +913,29 @@  discard block
 block discarded – undo
913 913
 						"true",
914 914
 						"right" 
915 915
 				),
916
-				array (
917
-						gettext ( "Description" ),
916
+				array(
917
+						gettext("Description"),
918 918
 						"180",
919 919
 						"description",
920 920
 						"",
921 921
 						"",
922 922
 						"" 
923 923
 				) 
924
-		) );
924
+		));
925 925
 		return $grid_field_arr;
926 926
 	}
927 927
 	function build_user_charge_history_search() {
928
-		$form ['forms'] = array (
928
+		$form ['forms'] = array(
929 929
 				"",
930
-				array (
930
+				array(
931 931
 						'id' => "user_charge_history_search" 
932 932
 				) 
933 933
 		);
934
-		$form ['Search'] = array (
935
-				array (
936
-						gettext ( 'From Date' ),
934
+		$form ['Search'] = array(
935
+				array(
936
+						gettext('From Date'),
937 937
 						'INPUT',
938
-						array (
938
+						array(
939 939
 								'name' => 'created_date[]',
940 940
 								'id' => 'charge_from_date',
941 941
 								'size' => '20',
@@ -946,10 +946,10 @@  discard block
 block discarded – undo
946 946
 						'',
947 947
 						'start_date[start_date-date]' 
948 948
 				),
949
-				array (
950
-						gettext ( 'To Date' ),
949
+				array(
950
+						gettext('To Date'),
951 951
 						'INPUT',
952
-						array (
952
+						array(
953 953
 								'name' => 'created_date[]',
954 954
 								'id' => 'charge_to_date',
955 955
 								'size' => '20',
@@ -960,10 +960,10 @@  discard block
 block discarded – undo
960 960
 						'',
961 961
 						'end_date[end_date-date]' 
962 962
 				),
963
-				array (
964
-						gettext ( 'Debit ' ),
963
+				array(
964
+						gettext('Debit '),
965 965
 						'INPUT',
966
-						array (
966
+						array(
967 967
 								'name' => 'debit[debit]',
968 968
 								'value' => '',
969 969
 								'size' => '20',
@@ -979,10 +979,10 @@  discard block
 block discarded – undo
979 979
 						'search_int_type',
980 980
 						'' 
981 981
 				),
982
-				array (
983
-						gettext ( 'Credit ' ),
982
+				array(
983
+						gettext('Credit '),
984 984
 						'INPUT',
985
-						array (
985
+						array(
986 986
 								'name' => 'credit[credit]',
987 987
 								'value' => '',
988 988
 								'size' => '20',
@@ -998,7 +998,7 @@  discard block
 block discarded – undo
998 998
 						'search_int_type',
999 999
 						'' 
1000 1000
 				),
1001
-				array (
1001
+				array(
1002 1002
 						'',
1003 1003
 						'HIDDEN',
1004 1004
 						'ajax_search',
@@ -1007,7 +1007,7 @@  discard block
 block discarded – undo
1007 1007
 						'',
1008 1008
 						'' 
1009 1009
 				),
1010
-				array (
1010
+				array(
1011 1011
 						'',
1012 1012
 						'HIDDEN',
1013 1013
 						'advance_search',
@@ -1017,18 +1017,18 @@  discard block
 block discarded – undo
1017 1017
 						'' 
1018 1018
 				) 
1019 1019
 		);
1020
-		$form ['button_search'] = array (
1020
+		$form ['button_search'] = array(
1021 1021
 				'name' => 'action',
1022 1022
 				'id' => "charges_search_btn",
1023
-				'content' => gettext ( 'Search' ),
1023
+				'content' => gettext('Search'),
1024 1024
 				'value' => 'save',
1025 1025
 				'type' => 'button',
1026 1026
 				'class' => 'btn btn-line-parrot pull-right' 
1027 1027
 		);
1028
-		$form ['button_reset'] = array (
1028
+		$form ['button_reset'] = array(
1029 1029
 				'name' => 'action',
1030 1030
 				'id' => "id_reset",
1031
-				'content' => gettext ( 'Clear' ),
1031
+				'content' => gettext('Clear'),
1032 1032
 				'value' => 'cancel',
1033 1033
 				'type' => 'reset',
1034 1034
 				'class' => 'btn btn-line-sky pull-right margin-x-10' 
@@ -1036,12 +1036,12 @@  discard block
 block discarded – undo
1036 1036
 		return $form;
1037 1037
 	}
1038 1038
 	function build_user_subscription() {
1039
-		$account_info = $accountinfo = $this->CI->session->userdata ( 'accountinfo' );
1039
+		$account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
1040 1040
 		$currency_id = $account_info ['currency_id'];
1041
-		$currency = $this->CI->common->get_field_name ( 'currency', 'currency', $currency_id );
1042
-		$grid_field_arr = json_encode ( array (
1043
-				array (
1044
-						gettext ( "Name" ),
1041
+		$currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id);
1042
+		$grid_field_arr = json_encode(array(
1043
+				array(
1044
+						gettext("Name"),
1045 1045
 						"335",
1046 1046
 						"description",
1047 1047
 						"",
@@ -1051,8 +1051,8 @@  discard block
 block discarded – undo
1051 1051
 						"true",
1052 1052
 						"center" 
1053 1053
 				),
1054
-				array (
1055
-						gettext ( "Amount" ) . "($currency)",
1054
+				array(
1055
+						gettext("Amount")."($currency)",
1056 1056
 						"335",
1057 1057
 						"charge",
1058 1058
 						"charge",
@@ -1062,8 +1062,8 @@  discard block
 block discarded – undo
1062 1062
 						"true",
1063 1063
 						"right" 
1064 1064
 				),
1065
-				array (
1066
-						gettext ( "Billing Cycle" ),
1065
+				array(
1066
+						gettext("Billing Cycle"),
1067 1067
 						"335",
1068 1068
 						"sweep_id",
1069 1069
 						"sweep",
@@ -1073,22 +1073,22 @@  discard block
 block discarded – undo
1073 1073
 						"true",
1074 1074
 						"center" 
1075 1075
 				) 
1076
-		) );
1076
+		));
1077 1077
 		return $grid_field_arr;
1078 1078
 	}
1079 1079
 	function build_user_subscription_search() {
1080
-		$accountinfo = $this->CI->session->userdata ( "accountinfo" );
1081
-		$form ['forms'] = array (
1080
+		$accountinfo = $this->CI->session->userdata("accountinfo");
1081
+		$form ['forms'] = array(
1082 1082
 				"",
1083
-				array (
1083
+				array(
1084 1084
 						'id' => "user_subscription_search" 
1085 1085
 				) 
1086 1086
 		);
1087
-		$form ['Search'] = array (
1088
-				array (
1089
-						gettext ( 'Name' ),
1087
+		$form ['Search'] = array(
1088
+				array(
1089
+						gettext('Name'),
1090 1090
 						'INPUT',
1091
-						array (
1091
+						array(
1092 1092
 								'name' => 'description[description]',
1093 1093
 								'',
1094 1094
 								'size' => '20',
@@ -1104,10 +1104,10 @@  discard block
 block discarded – undo
1104 1104
 						'search_string_type',
1105 1105
 						'' 
1106 1106
 				),
1107
-				array (
1108
-						gettext ( 'Amount' ),
1107
+				array(
1108
+						gettext('Amount'),
1109 1109
 						'INPUT',
1110
-						array (
1110
+						array(
1111 1111
 								'name' => 'charge[charge]',
1112 1112
 								'value' => '',
1113 1113
 								'size' => '20',
@@ -1123,8 +1123,8 @@  discard block
 block discarded – undo
1123 1123
 						'search_int_type',
1124 1124
 						'' 
1125 1125
 				),
1126
-				array (
1127
-						gettext ( 'Bill Cycle' ),
1126
+				array(
1127
+						gettext('Bill Cycle'),
1128 1128
 						'sweep_id',
1129 1129
 						'SELECT',
1130 1130
 						'',
@@ -1138,7 +1138,7 @@  discard block
 block discarded – undo
1138 1138
 						'',
1139 1139
 						'' 
1140 1140
 				),
1141
-				array (
1141
+				array(
1142 1142
 						'',
1143 1143
 						'HIDDEN',
1144 1144
 						'ajax_search',
@@ -1147,7 +1147,7 @@  discard block
 block discarded – undo
1147 1147
 						'',
1148 1148
 						'' 
1149 1149
 				),
1150
-				array (
1150
+				array(
1151 1151
 						'',
1152 1152
 						'HIDDEN',
1153 1153
 						'advance_search',
@@ -1157,18 +1157,18 @@  discard block
 block discarded – undo
1157 1157
 						'' 
1158 1158
 				) 
1159 1159
 		);
1160
-		$form ['button_search'] = array (
1160
+		$form ['button_search'] = array(
1161 1161
 				'name' => 'action',
1162 1162
 				'id' => "user_subscriptions_button",
1163
-				'content' => gettext ( 'Search' ),
1163
+				'content' => gettext('Search'),
1164 1164
 				'value' => 'save',
1165 1165
 				'type' => 'button',
1166 1166
 				'class' => 'btn btn-line-parrot pull-right' 
1167 1167
 		);
1168
-		$form ['button_reset'] = array (
1168
+		$form ['button_reset'] = array(
1169 1169
 				'name' => 'action',
1170 1170
 				'id' => "id_reset",
1171
-				'content' => gettext ( 'Clear' ),
1171
+				'content' => gettext('Clear'),
1172 1172
 				'value' => 'cancel',
1173 1173
 				'type' => 'reset',
1174 1174
 				'class' => 'btn btn-line-sky pull-right margin-x-10' 
@@ -1177,12 +1177,12 @@  discard block
 block discarded – undo
1177 1177
 		return $form;
1178 1178
 	}
1179 1179
 	function build_user_didlist() {
1180
-		$account_info = $accountinfo = $this->CI->session->userdata ( 'accountinfo' );
1180
+		$account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
1181 1181
 		$currency_id = $account_info ['currency_id'];
1182
-		$currency = $this->CI->common->get_field_name ( 'currency', 'currency', $currency_id );
1183
-		$grid_field_arr = json_encode ( array (
1184
-				array (
1185
-						gettext ( "DID" ),
1182
+		$currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id);
1183
+		$grid_field_arr = json_encode(array(
1184
+				array(
1185
+						gettext("DID"),
1186 1186
 						"105",
1187 1187
 						"number",
1188 1188
 						"",
@@ -1192,8 +1192,8 @@  discard block
 block discarded – undo
1192 1192
 						"true",
1193 1193
 						"center" 
1194 1194
 				),
1195
-				array (
1196
-						gettext ( "Country" ),
1195
+				array(
1196
+						gettext("Country"),
1197 1197
 						"90",
1198 1198
 						"country_id",
1199 1199
 						"country",
@@ -1203,8 +1203,8 @@  discard block
 block discarded – undo
1203 1203
 						"true",
1204 1204
 						"center" 
1205 1205
 				),
1206
-				array (
1207
-						gettext ( "Per Minute<br/>Cost" ) . "($currency)",
1206
+				array(
1207
+						gettext("Per Minute<br/>Cost")."($currency)",
1208 1208
 						"90",
1209 1209
 						"cost",
1210 1210
 						"cost",
@@ -1214,8 +1214,8 @@  discard block
 block discarded – undo
1214 1214
 						"true",
1215 1215
 						"right" 
1216 1216
 				),
1217
-				array (
1218
-						gettext ( "Initial<br/>Increment" ),
1217
+				array(
1218
+						gettext("Initial<br/>Increment"),
1219 1219
 						"100",
1220 1220
 						"init_inc",
1221 1221
 						"",
@@ -1225,8 +1225,8 @@  discard block
 block discarded – undo
1225 1225
 						"true",
1226 1226
 						"center" 
1227 1227
 				),
1228
-				array (
1229
-						gettext ( "Increment" ),
1228
+				array(
1229
+						gettext("Increment"),
1230 1230
 						"100",
1231 1231
 						"inc",
1232 1232
 						"",
@@ -1236,8 +1236,8 @@  discard block
 block discarded – undo
1236 1236
 						"true",
1237 1237
 						"center" 
1238 1238
 				),
1239
-				array (
1240
-						gettext ( "Setup<br/>Fee" ) . "($currency)",
1239
+				array(
1240
+						gettext("Setup<br/>Fee")."($currency)",
1241 1241
 						"100",
1242 1242
 						"setup",
1243 1243
 						"setup",
@@ -1247,8 +1247,8 @@  discard block
 block discarded – undo
1247 1247
 						"true",
1248 1248
 						"right" 
1249 1249
 				),
1250
-				array (
1251
-						gettext ( "Monthly<br/>Fee" ) . "($currency)",
1250
+				array(
1251
+						gettext("Monthly<br/>Fee")."($currency)",
1252 1252
 						"100",
1253 1253
 						"monthlycost",
1254 1254
 						"monthlycost",
@@ -1258,8 +1258,8 @@  discard block
 block discarded – undo
1258 1258
 						"true",
1259 1259
 						"right" 
1260 1260
 				),
1261
-				array (
1262
-						gettext ( "Call Type" ),
1261
+				array(
1262
+						gettext("Call Type"),
1263 1263
 						"105",
1264 1264
 						"call_type",
1265 1265
 						"call_type",
@@ -1269,8 +1269,8 @@  discard block
 block discarded – undo
1269 1269
 						"true",
1270 1270
 						"center" 
1271 1271
 				),
1272
-				array (
1273
-						gettext ( "Destination" ),
1272
+				array(
1273
+						gettext("Destination"),
1274 1274
 						"153",
1275 1275
 						"extensions",
1276 1276
 						"",
@@ -1280,8 +1280,8 @@  discard block
 block discarded – undo
1280 1280
 						"true",
1281 1281
 						"center" 
1282 1282
 				),
1283
-				array (
1284
-						gettext ( "Status" ),
1283
+				array(
1284
+						gettext("Status"),
1285 1285
 						"90",
1286 1286
 						"status",
1287 1287
 						"status",
@@ -1291,8 +1291,8 @@  discard block
 block discarded – undo
1291 1291
 						"true",
1292 1292
 						"center" 
1293 1293
 				),
1294
-				array (
1295
-						gettext ( "Modified <br/>Date" ),
1294
+				array(
1295
+						gettext("Modified <br/>Date"),
1296 1296
 						"100",
1297 1297
 						"last_modified_date",
1298 1298
 						"last_modified_date",
@@ -1302,38 +1302,38 @@  discard block
 block discarded – undo
1302 1302
 						"true",
1303 1303
 						"center" 
1304 1304
 				),
1305
-				array (
1306
-						gettext ( "Action" ),
1305
+				array(
1306
+						gettext("Action"),
1307 1307
 						"80",
1308 1308
 						"",
1309 1309
 						"",
1310 1310
 						"",
1311
-						array (
1312
-								"EDIT" => array (
1311
+						array(
1312
+								"EDIT" => array(
1313 1313
 										"url" => "/user/user_did_edit/",
1314 1314
 										"mode" => "popup" 
1315 1315
 								),
1316
-								"DELETE" => array (
1316
+								"DELETE" => array(
1317 1317
 										"url" => "/user/user_dids_action/delete/",
1318 1318
 										"mode" => "single" 
1319 1319
 								) 
1320 1320
 						) 
1321 1321
 				) 
1322
-		) );
1322
+		));
1323 1323
 		return $grid_field_arr;
1324 1324
 	}
1325 1325
 	function build_user_didlist_search() {
1326
-		$form ['forms'] = array (
1326
+		$form ['forms'] = array(
1327 1327
 				"",
1328
-				array (
1328
+				array(
1329 1329
 						'id' => "user_did_search" 
1330 1330
 				) 
1331 1331
 		);
1332
-		$form ['Search'] = array (
1333
-				array (
1334
-						gettext ( 'DID' ),
1332
+		$form ['Search'] = array(
1333
+				array(
1334
+						gettext('DID'),
1335 1335
 						'INPUT',
1336
-						array (
1336
+						array(
1337 1337
 								'name' => 'number[number]',
1338 1338
 								'',
1339 1339
 								'size' => '20',
@@ -1349,8 +1349,8 @@  discard block
 block discarded – undo
1349 1349
 						'search_string_type',
1350 1350
 						'' 
1351 1351
 				),
1352
-				array (
1353
-						gettext ( 'Country' ),
1352
+				array(
1353
+						gettext('Country'),
1354 1354
 						'country_id',
1355 1355
 						'SELECT',
1356 1356
 						'',
@@ -1364,10 +1364,10 @@  discard block
 block discarded – undo
1364 1364
 						'',
1365 1365
 						'' 
1366 1366
 				),
1367
-				array (
1368
-						gettext ( 'Initial Increment' ),
1367
+				array(
1368
+						gettext('Initial Increment'),
1369 1369
 						'INPUT',
1370
-						array (
1370
+						array(
1371 1371
 								'name' => 'init_inc[init_inc]',
1372 1372
 								'',
1373 1373
 								'size' => '20',
@@ -1383,8 +1383,8 @@  discard block
 block discarded – undo
1383 1383
 						'search_int_type',
1384 1384
 						'' 
1385 1385
 				),
1386
-				array (
1387
-						gettext ( 'Call Type' ),
1386
+				array(
1387
+						gettext('Call Type'),
1388 1388
 						'call_type',
1389 1389
 						'SELECT',
1390 1390
 						'',
@@ -1398,10 +1398,10 @@  discard block
 block discarded – undo
1398 1398
 						'',
1399 1399
 						'' 
1400 1400
 				),
1401
-				array (
1402
-						gettext ( 'Destination' ),
1401
+				array(
1402
+						gettext('Destination'),
1403 1403
 						'INPUT',
1404
-						array (
1404
+						array(
1405 1405
 								'name' => 'extensions[extensions]',
1406 1406
 								'',
1407 1407
 								'size' => '20',
@@ -1418,8 +1418,8 @@  discard block
 block discarded – undo
1418 1418
 						'' 
1419 1419
 				),
1420 1420
 				
1421
-				array (
1422
-						gettext ( 'Status' ),
1421
+				array(
1422
+						gettext('Status'),
1423 1423
 						'status',
1424 1424
 						'SELECT',
1425 1425
 						'',
@@ -1433,7 +1433,7 @@  discard block
 block discarded – undo
1433 1433
 						'',
1434 1434
 						'' 
1435 1435
 				),
1436
-				array (
1436
+				array(
1437 1437
 						'',
1438 1438
 						'HIDDEN',
1439 1439
 						'ajax_search',
@@ -1442,7 +1442,7 @@  discard block
 block discarded – undo
1442 1442
 						'',
1443 1443
 						'' 
1444 1444
 				),
1445
-				array (
1445
+				array(
1446 1446
 						'',
1447 1447
 						'HIDDEN',
1448 1448
 						'advance_search',
@@ -1453,18 +1453,18 @@  discard block
 block discarded – undo
1453 1453
 				) 
1454 1454
 		);
1455 1455
 		
1456
-		$form ['button_search'] = array (
1456
+		$form ['button_search'] = array(
1457 1457
 				'name' => 'action',
1458 1458
 				'id' => "user_did_search_btn",
1459
-				'content' => gettext ( 'Search' ),
1459
+				'content' => gettext('Search'),
1460 1460
 				'value' => 'save',
1461 1461
 				'type' => 'button',
1462 1462
 				'class' => 'btn btn-line-parrot pull-right' 
1463 1463
 		);
1464
-		$form ['button_reset'] = array (
1464
+		$form ['button_reset'] = array(
1465 1465
 				'name' => 'action',
1466 1466
 				'id' => "id_reset",
1467
-				'content' => gettext ( 'Clear' ),
1467
+				'content' => gettext('Clear'),
1468 1468
 				'value' => 'cancel',
1469 1469
 				'type' => 'reset',
1470 1470
 				'class' => 'btn btn-line-sky pull-right margin-x-10' 
@@ -1473,9 +1473,9 @@  discard block
 block discarded – undo
1473 1473
 		return $form;
1474 1474
 	}
1475 1475
 	function build_user_ipmap() {
1476
-		$grid_field_arr = json_encode ( array (
1477
-				array (
1478
-						gettext ( "Name" ),
1476
+		$grid_field_arr = json_encode(array(
1477
+				array(
1478
+						gettext("Name"),
1479 1479
 						"240",
1480 1480
 						"name",
1481 1481
 						"",
@@ -1485,8 +1485,8 @@  discard block
 block discarded – undo
1485 1485
 						"true",
1486 1486
 						"center" 
1487 1487
 				),
1488
-				array (
1489
-						gettext ( "IP" ),
1488
+				array(
1489
+						gettext("IP"),
1490 1490
 						"240",
1491 1491
 						"ip",
1492 1492
 						"",
@@ -1496,8 +1496,8 @@  discard block
 block discarded – undo
1496 1496
 						"true",
1497 1497
 						"center" 
1498 1498
 				),
1499
-				array (
1500
-						gettext ( "Prefix" ),
1499
+				array(
1500
+						gettext("Prefix"),
1501 1501
 						"220",
1502 1502
 						"prefix",
1503 1503
 						"",
@@ -1507,8 +1507,8 @@  discard block
 block discarded – undo
1507 1507
 						"true",
1508 1508
 						"center" 
1509 1509
 				),
1510
-				array (
1511
-						gettext ( "Created Date" ),
1510
+				array(
1511
+						gettext("Created Date"),
1512 1512
 						"174",
1513 1513
 						"created_date",
1514 1514
 						"created_date",
@@ -1518,34 +1518,34 @@  discard block
 block discarded – undo
1518 1518
 						"true",
1519 1519
 						"center" 
1520 1520
 				),
1521
-				array (
1522
-						gettext ( "Action" ),
1521
+				array(
1522
+						gettext("Action"),
1523 1523
 						"150",
1524 1524
 						"",
1525 1525
 						"",
1526 1526
 						"",
1527
-						array (
1528
-								"DELETE" => array (
1527
+						array(
1528
+								"DELETE" => array(
1529 1529
 										"url" => "user/user_ipmap_action/delete/",
1530 1530
 										"mode" => "single" 
1531 1531
 								) 
1532 1532
 						) 
1533 1533
 				) 
1534
-		) );
1534
+		));
1535 1535
 		return $grid_field_arr;
1536 1536
 	}
1537 1537
 	function build_user_ipmap_search() {
1538
-		$form ['forms'] = array (
1538
+		$form ['forms'] = array(
1539 1539
 				"",
1540
-				array (
1540
+				array(
1541 1541
 						'id' => "user_ipmap_search" 
1542 1542
 				) 
1543 1543
 		);
1544
-		$form ['Search'] = array (
1545
-				array (
1546
-						gettext ( 'Name' ),
1544
+		$form ['Search'] = array(
1545
+				array(
1546
+						gettext('Name'),
1547 1547
 						'INPUT',
1548
-						array (
1548
+						array(
1549 1549
 								'name' => 'name[name]',
1550 1550
 								'',
1551 1551
 								'size' => '20',
@@ -1561,10 +1561,10 @@  discard block
 block discarded – undo
1561 1561
 						'search_string_type',
1562 1562
 						'' 
1563 1563
 				),
1564
-				array (
1565
-						gettext ( 'IP' ),
1564
+				array(
1565
+						gettext('IP'),
1566 1566
 						'INPUT',
1567
-						array (
1567
+						array(
1568 1568
 								'name' => 'ip[ip]',
1569 1569
 								'',
1570 1570
 								'size' => '20',
@@ -1580,10 +1580,10 @@  discard block
 block discarded – undo
1580 1580
 						'search_string_type',
1581 1581
 						'' 
1582 1582
 				),
1583
-				array (
1584
-						gettext ( 'Prefix' ),
1583
+				array(
1584
+						gettext('Prefix'),
1585 1585
 						'INPUT',
1586
-						array (
1586
+						array(
1587 1587
 								'name' => 'prefix[prefix]',
1588 1588
 								'',
1589 1589
 								'size' => '20',
@@ -1599,7 +1599,7 @@  discard block
 block discarded – undo
1599 1599
 						'search_string_type',
1600 1600
 						'' 
1601 1601
 				),
1602
-				array (
1602
+				array(
1603 1603
 						'',
1604 1604
 						'HIDDEN',
1605 1605
 						'ajax_search',
@@ -1608,7 +1608,7 @@  discard block
 block discarded – undo
1608 1608
 						'',
1609 1609
 						'' 
1610 1610
 				),
1611
-				array (
1611
+				array(
1612 1612
 						'',
1613 1613
 						'HIDDEN',
1614 1614
 						'advance_search',
@@ -1618,18 +1618,18 @@  discard block
 block discarded – undo
1618 1618
 						'' 
1619 1619
 				) 
1620 1620
 		);
1621
-		$form ['button_search'] = array (
1621
+		$form ['button_search'] = array(
1622 1622
 				'name' => 'action',
1623 1623
 				'id' => "user_ipmap_search_btn",
1624
-				'content' => gettext ( 'Search' ),
1624
+				'content' => gettext('Search'),
1625 1625
 				'value' => 'save',
1626 1626
 				'type' => 'button',
1627 1627
 				'class' => 'btn btn-line-parrot pull-right' 
1628 1628
 		);
1629
-		$form ['button_reset'] = array (
1629
+		$form ['button_reset'] = array(
1630 1630
 				'name' => 'action',
1631 1631
 				'id' => "id_reset",
1632
-				'content' => gettext ( 'Clear' ),
1632
+				'content' => gettext('Clear'),
1633 1633
 				'value' => 'cancel',
1634 1634
 				'type' => 'reset',
1635 1635
 				'class' => "btn btn-line-sky pull-right margin-x-10" 
@@ -1637,8 +1637,8 @@  discard block
 block discarded – undo
1637 1637
 		return $form;
1638 1638
 	}
1639 1639
 	function build_user_sipdevices() {
1640
-		$grid_field_arr = json_encode ( array (
1641
-				array (
1640
+		$grid_field_arr = json_encode(array(
1641
+				array(
1642 1642
 						"<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>",
1643 1643
 						"30",
1644 1644
 						"",
@@ -1649,8 +1649,8 @@  discard block
 block discarded – undo
1649 1649
 						"false",
1650 1650
 						"center" 
1651 1651
 				),
1652
-				array (
1653
-						gettext ( "User Name" ),
1652
+				array(
1653
+						gettext("User Name"),
1654 1654
 						"105",
1655 1655
 						"username",
1656 1656
 						"",
@@ -1660,8 +1660,8 @@  discard block
 block discarded – undo
1660 1660
 						"true",
1661 1661
 						"center" 
1662 1662
 				),
1663
-				array (
1664
-						gettext ( "Password" ),
1663
+				array(
1664
+						gettext("Password"),
1665 1665
 						"105",
1666 1666
 						"password",
1667 1667
 						"",
@@ -1671,8 +1671,8 @@  discard block
 block discarded – undo
1671 1671
 						"true",
1672 1672
 						"center" 
1673 1673
 				),
1674
-				array (
1675
-						gettext ( "Caller Name" ),
1674
+				array(
1675
+						gettext("Caller Name"),
1676 1676
 						"110",
1677 1677
 						"effective_caller_id_name",
1678 1678
 						"",
@@ -1682,8 +1682,8 @@  discard block
 block discarded – undo
1682 1682
 						"true",
1683 1683
 						"center" 
1684 1684
 				),
1685
-				array (
1686
-						gettext ( "Caller Number" ),
1685
+				array(
1686
+						gettext("Caller Number"),
1687 1687
 						"110",
1688 1688
 						"effective_caller_id_number",
1689 1689
 						"",
@@ -1693,8 +1693,8 @@  discard block
 block discarded – undo
1693 1693
 						"true",
1694 1694
 						"center" 
1695 1695
 				),
1696
-				array (
1697
-						gettext ( "Status" ),
1696
+				array(
1697
+						gettext("Status"),
1698 1698
 						"125",
1699 1699
 						"status",
1700 1700
 						"",
@@ -1704,8 +1704,8 @@  discard block
 block discarded – undo
1704 1704
 						"true",
1705 1705
 						"center" 
1706 1706
 				),
1707
-				array (
1708
-						gettext ( "Created Date" ),
1707
+				array(
1708
+						gettext("Created Date"),
1709 1709
 						"110",
1710 1710
 						"creation_date",
1711 1711
 						"creation_date",
@@ -1715,8 +1715,8 @@  discard block
 block discarded – undo
1715 1715
 						"true",
1716 1716
 						"center" 
1717 1717
 				),
1718
-				array (
1719
-						gettext ( "Modified Date" ),
1718
+				array(
1719
+						gettext("Modified Date"),
1720 1720
 						"130",
1721 1721
 						"last_modified_date",
1722 1722
 						"last_modified_date",
@@ -1726,8 +1726,8 @@  discard block
 block discarded – undo
1726 1726
 						"true",
1727 1727
 						"center" 
1728 1728
 				),
1729
-				array (
1730
-						gettext ( "Voicemail" ),
1729
+				array(
1730
+						gettext("Voicemail"),
1731 1731
 						"90",
1732 1732
 						"voicemail_enabled",
1733 1733
 						"",
@@ -1737,39 +1737,39 @@  discard block
 block discarded – undo
1737 1737
 						"true",
1738 1738
 						"center" 
1739 1739
 				),
1740
-				array (
1741
-						gettext ( "Action" ),
1740
+				array(
1741
+						gettext("Action"),
1742 1742
 						"110",
1743 1743
 						"",
1744 1744
 						"",
1745 1745
 						"",
1746
-						array (
1747
-								"EDIT" => array (
1746
+						array(
1747
+								"EDIT" => array(
1748 1748
 										"url" => "/accounts/fssipdevices_action/edit/",
1749 1749
 										"mode" => "single",
1750 1750
 										"layout" => "medium" 
1751 1751
 								),
1752
-								"DELETE" => array (
1752
+								"DELETE" => array(
1753 1753
 										"url" => "/accounts/fssipdevices_action/delete/",
1754 1754
 										"mode" => "single" 
1755 1755
 								) 
1756 1756
 						) 
1757 1757
 				) 
1758
-		) );
1758
+		));
1759 1759
 		return $grid_field_arr;
1760 1760
 	}
1761 1761
 	function build_user_sipdevices_search() {
1762
-		$form ['forms'] = array (
1762
+		$form ['forms'] = array(
1763 1763
 				"",
1764
-				array (
1764
+				array(
1765 1765
 						'id' => "user_sipdevices_search" 
1766 1766
 				) 
1767 1767
 		);
1768
-		$form ['Search'] = array (
1769
-				array (
1770
-						gettext ( 'Username' ),
1768
+		$form ['Search'] = array(
1769
+				array(
1770
+						gettext('Username'),
1771 1771
 						'INPUT',
1772
-						array (
1772
+						array(
1773 1773
 								'name' => 'username[username]',
1774 1774
 								'',
1775 1775
 								'size' => '20',
@@ -1785,7 +1785,7 @@  discard block
 block discarded – undo
1785 1785
 						'search_string_type',
1786 1786
 						'' 
1787 1787
 				),
1788
-				array (
1788
+				array(
1789 1789
 						'',
1790 1790
 						'HIDDEN',
1791 1791
 						'ajax_search',
@@ -1794,7 +1794,7 @@  discard block
 block discarded – undo
1794 1794
 						'',
1795 1795
 						'' 
1796 1796
 				),
1797
-				array (
1797
+				array(
1798 1798
 						'',
1799 1799
 						'HIDDEN',
1800 1800
 						'advance_search',
@@ -1804,18 +1804,18 @@  discard block
 block discarded – undo
1804 1804
 						'' 
1805 1805
 				) 
1806 1806
 		);
1807
-		$form ['button_search'] = array (
1807
+		$form ['button_search'] = array(
1808 1808
 				'name' => 'action',
1809 1809
 				'id' => "user_sipdevices_search_btn",
1810
-				'content' => gettext ( 'Search' ),
1810
+				'content' => gettext('Search'),
1811 1811
 				'value' => 'save',
1812 1812
 				'type' => 'button',
1813 1813
 				'class' => 'btn btn-line-parrot pull-right' 
1814 1814
 		);
1815
-		$form ['button_reset'] = array (
1815
+		$form ['button_reset'] = array(
1816 1816
 				'name' => 'action',
1817 1817
 				'id' => "id_reset",
1818
-				'content' => gettext ( 'Clear' ),
1818
+				'content' => gettext('Clear'),
1819 1819
 				'value' => 'cancel',
1820 1820
 				'type' => 'reset',
1821 1821
 				'class' => 'btn btn-line-sky pull-right margin-x-10' 
@@ -1823,21 +1823,21 @@  discard block
 block discarded – undo
1823 1823
 		return $form;
1824 1824
 	}
1825 1825
 	function build_user_sipdevices_form($id = '') {
1826
-		$val = $id > 0 ? 'sip_devices.username.' . $id : 'sip_devices.username';
1827
-		$uname_user = $this->CI->common->find_uniq_rendno ( '10', '', '' );
1828
-		$password = $this->CI->common->generate_password ();
1829
-		$form ['forms'] = array (
1830
-				base_url () . 'user/user_sipdevices_save/',
1831
-				array (
1826
+		$val = $id > 0 ? 'sip_devices.username.'.$id : 'sip_devices.username';
1827
+		$uname_user = $this->CI->common->find_uniq_rendno('10', '', '');
1828
+		$password = $this->CI->common->generate_password();
1829
+		$form ['forms'] = array(
1830
+				base_url().'user/user_sipdevices_save/',
1831
+				array(
1832 1832
 						"id" => "user_sipdevices_form",
1833 1833
 						"name" => "user_sipdevices_form" 
1834 1834
 				) 
1835 1835
 		);
1836
-		$form [gettext ( 'Device Information' )] = array (
1837
-				array (
1836
+		$form [gettext('Device Information')] = array(
1837
+				array(
1838 1838
 						'',
1839 1839
 						'HIDDEN',
1840
-						array (
1840
+						array(
1841 1841
 								'name' => 'id' 
1842 1842
 						),
1843 1843
 						'',
@@ -1845,25 +1845,25 @@  discard block
 block discarded – undo
1845 1845
 						'',
1846 1846
 						'' 
1847 1847
 				),
1848
-				array (
1849
-						gettext ( 'Username' ),
1848
+				array(
1849
+						gettext('Username'),
1850 1850
 						'INPUT',
1851
-						array (
1851
+						array(
1852 1852
 								'name' => 'fs_username',
1853 1853
 								'size' => '20',
1854 1854
 								'value' => $uname_user,
1855 1855
 								'id' => 'username',
1856 1856
 								'class' => "text field medium" 
1857 1857
 						),
1858
-						'trim|required|is_unique[' . $val . ']|xss_clean',
1858
+						'trim|required|is_unique['.$val.']|xss_clean',
1859 1859
 						'tOOL TIP',
1860 1860
 						'Please Enter account number',
1861 1861
 						'<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>' 
1862 1862
 				),
1863
-				array (
1864
-						gettext ( 'Password' ),
1863
+				array(
1864
+						gettext('Password'),
1865 1865
 						'INPUT',
1866
-						array (
1866
+						array(
1867 1867
 								'name' => 'fs_password',
1868 1868
 								'size' => '20',
1869 1869
 								'value' => $password,
@@ -1875,10 +1875,10 @@  discard block
 block discarded – undo
1875 1875
 						'Please Enter Password',
1876 1876
 						'<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>' 
1877 1877
 				),
1878
-				array (
1879
-						gettext ( 'Caller Name' ),
1878
+				array(
1879
+						gettext('Caller Name'),
1880 1880
 						'INPUT',
1881
-						array (
1881
+						array(
1882 1882
 								'name' => 'effective_caller_id_name',
1883 1883
 								'size' => '20',
1884 1884
 								'class' => "text field medium" 
@@ -1887,10 +1887,10 @@  discard block
 block discarded – undo
1887 1887
 						'tOOL TIP',
1888 1888
 						'Please Enter account number' 
1889 1889
 				),
1890
-				array (
1891
-						gettext ( 'Caller Number' ),
1890
+				array(
1891
+						gettext('Caller Number'),
1892 1892
 						'INPUT',
1893
-						array (
1893
+						array(
1894 1894
 								'name' => 'effective_caller_id_number',
1895 1895
 								'size' => '20',
1896 1896
 								'class' => "text field medium" 
@@ -1899,8 +1899,8 @@  discard block
 block discarded – undo
1899 1899
 						'tOOL TIP',
1900 1900
 						'Please Enter account number' 
1901 1901
 				),
1902
-				array (
1903
-						gettext ( 'Status' ),
1902
+				array(
1903
+						gettext('Status'),
1904 1904
 						'status',
1905 1905
 						'SELECT',
1906 1906
 						'',
@@ -1914,9 +1914,9 @@  discard block
 block discarded – undo
1914 1914
 				) 
1915 1915
 		);
1916 1916
 		
1917
-		$form [gettext ( 'Voicemail Options' )] = array (
1918
-				array (
1919
-						gettext ( 'Enable' ),
1917
+		$form [gettext('Voicemail Options')] = array(
1918
+				array(
1919
+						gettext('Enable'),
1920 1920
 						'voicemail_enabled',
1921 1921
 						'SELECT',
1922 1922
 						'',
@@ -1928,10 +1928,10 @@  discard block
 block discarded – undo
1928 1928
 						'',
1929 1929
 						'set_sip_config_option' 
1930 1930
 				),
1931
-				array (
1932
-						gettext ( 'Password' ),
1931
+				array(
1932
+						gettext('Password'),
1933 1933
 						'INPUT',
1934
-						array (
1934
+						array(
1935 1935
 								'name' => 'voicemail_password',
1936 1936
 								'size' => '20',
1937 1937
 								'class' => "text field medium" 
@@ -1940,10 +1940,10 @@  discard block
 block discarded – undo
1940 1940
 						'tOOL TIP',
1941 1941
 						'Please Enter account number' 
1942 1942
 				),
1943
-				array (
1944
-						gettext ( 'Mail To' ),
1943
+				array(
1944
+						gettext('Mail To'),
1945 1945
 						'INPUT',
1946
-						array (
1946
+						array(
1947 1947
 								'name' => 'voicemail_mail_to',
1948 1948
 								'size' => '20',
1949 1949
 								'class' => "text field medium" 
@@ -1952,8 +1952,8 @@  discard block
 block discarded – undo
1952 1952
 						'tOOL TIP',
1953 1953
 						'Please Enter account number' 
1954 1954
 				),
1955
-				array (
1956
-						gettext ( 'Attach File' ),
1955
+				array(
1956
+						gettext('Attach File'),
1957 1957
 						'voicemail_attach_file',
1958 1958
 						'SELECT',
1959 1959
 						'',
@@ -1965,8 +1965,8 @@  discard block
 block discarded – undo
1965 1965
 						'',
1966 1966
 						'set_sip_config_option' 
1967 1967
 				),
1968
-				array (
1969
-						gettext ( 'Local After Email' ),
1968
+				array(
1969
+						gettext('Local After Email'),
1970 1970
 						'vm_keep_local_after_email',
1971 1971
 						'SELECT',
1972 1972
 						'',
@@ -1978,8 +1978,8 @@  discard block
 block discarded – undo
1978 1978
 						'',
1979 1979
 						'set_sip_config_option' 
1980 1980
 				),
1981
-				array (
1982
-						gettext ( 'Send all Message' ),
1981
+				array(
1982
+						gettext('Send all Message'),
1983 1983
 						'vm_send_all_message',
1984 1984
 						'SELECT',
1985 1985
 						'',
@@ -1993,7 +1993,7 @@  discard block
 block discarded – undo
1993 1993
 				) 
1994 1994
 		)
1995 1995
 		;
1996
-		$form ['button_cancel'] = array (
1996
+		$form ['button_cancel'] = array(
1997 1997
 				'name' => 'action',
1998 1998
 				'content' => 'Close',
1999 1999
 				'value' => 'cancel',
@@ -2001,7 +2001,7 @@  discard block
 block discarded – undo
2001 2001
 				'class' => 'btn btn-line-sky margin-x-10',
2002 2002
 				'onclick' => 'return redirect_page(\'NULL\')' 
2003 2003
 		);
2004
-		$form ['button_save'] = array (
2004
+		$form ['button_save'] = array(
2005 2005
 				'name' => 'action',
2006 2006
 				'content' => 'Save',
2007 2007
 				'value' => 'save',
@@ -2012,9 +2012,9 @@  discard block
 block discarded – undo
2012 2012
 		return $form;
2013 2013
 	}
2014 2014
 	function build_user_animap() {
2015
-		$grid_field_arr = json_encode ( array (
2016
-				array (
2017
-						gettext ( "Caller ID" ),
2015
+		$grid_field_arr = json_encode(array(
2016
+				array(
2017
+						gettext("Caller ID"),
2018 2018
 						"735",
2019 2019
 						"number",
2020 2020
 						"",
@@ -2024,42 +2024,42 @@  discard block
 block discarded – undo
2024 2024
 						"true",
2025 2025
 						"center" 
2026 2026
 				),
2027
-				array (
2028
-						gettext ( "Action" ),
2027
+				array(
2028
+						gettext("Action"),
2029 2029
 						"275",
2030 2030
 						"",
2031 2031
 						"",
2032 2032
 						"",
2033
-						array (
2034
-								"DELETE" => array (
2033
+						array(
2034
+								"DELETE" => array(
2035 2035
 										"url" => "user/user_animap_action/delete/",
2036 2036
 										"mode" => "single" 
2037 2037
 								) 
2038 2038
 						) 
2039 2039
 				) 
2040
-		) );
2040
+		));
2041 2041
 		return $grid_field_arr;
2042 2042
 	}
2043 2043
 	function user_rates_list_buttons() {
2044
-		$buttons_json = json_encode ( array (
2045
-				array (
2046
-						gettext ( "Export CSV" ),
2044
+		$buttons_json = json_encode(array(
2045
+				array(
2046
+						gettext("Export CSV"),
2047 2047
 						"btn btn-xing",
2048 2048
 						"fa fa-download fa-lg",
2049 2049
 						"button_action",
2050 2050
 						"/user/user_rates_list_export/",
2051 2051
 						'single' 
2052 2052
 				) 
2053
-		) );
2053
+		));
2054 2054
 		return $buttons_json;
2055 2055
 	}
2056 2056
 	function user_rates_list() {
2057
-		$account_info = $accountinfo = $this->CI->session->userdata ( 'accountinfo' );
2057
+		$account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
2058 2058
 		$currency_id = $account_info ['currency_id'];
2059
-		$currency = $this->CI->common->get_field_name ( 'currency', 'currency', $currency_id );
2060
-		$grid_field_arr = json_encode ( array (
2061
-				array (
2062
-						gettext ( "Code" ),
2059
+		$currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id);
2060
+		$grid_field_arr = json_encode(array(
2061
+				array(
2062
+						gettext("Code"),
2063 2063
 						"155",
2064 2064
 						"pattern",
2065 2065
 						"pattern",
@@ -2069,8 +2069,8 @@  discard block
 block discarded – undo
2069 2069
 						"true",
2070 2070
 						"center" 
2071 2071
 				),
2072
-				array (
2073
-						gettext ( "Destination" ),
2072
+				array(
2073
+						gettext("Destination"),
2074 2074
 						"200",
2075 2075
 						"comment",
2076 2076
 						"",
@@ -2080,8 +2080,8 @@  discard block
 block discarded – undo
2080 2080
 						"true",
2081 2081
 						"center" 
2082 2082
 				),
2083
-				array (
2084
-						gettext ( "Connect Cost" ) . "($currency)",
2083
+				array(
2084
+						gettext("Connect Cost")."($currency)",
2085 2085
 						"200",
2086 2086
 						"connectcost",
2087 2087
 						"",
@@ -2091,8 +2091,8 @@  discard block
 block discarded – undo
2091 2091
 						"true",
2092 2092
 						"right" 
2093 2093
 				),
2094
-				array (
2095
-						gettext ( "Included Seconds" ),
2094
+				array(
2095
+						gettext("Included Seconds"),
2096 2096
 						"200",
2097 2097
 						"includedseconds",
2098 2098
 						"",
@@ -2102,8 +2102,8 @@  discard block
 block discarded – undo
2102 2102
 						"true",
2103 2103
 						"center" 
2104 2104
 				),
2105
-				array (
2106
-						gettext ( "Per Minute Cost" ) . "($currency)",
2105
+				array(
2106
+						gettext("Per Minute Cost")."($currency)",
2107 2107
 						"200",
2108 2108
 						"cost",
2109 2109
 						"",
@@ -2113,8 +2113,8 @@  discard block
 block discarded – undo
2113 2113
 						"true",
2114 2114
 						"right" 
2115 2115
 				),
2116
-				array (
2117
-						gettext ( "Initial Increment" ),
2116
+				array(
2117
+						gettext("Initial Increment"),
2118 2118
 						"130",
2119 2119
 						"init_inc",
2120 2120
 						"",
@@ -2124,8 +2124,8 @@  discard block
 block discarded – undo
2124 2124
 						"true",
2125 2125
 						"center" 
2126 2126
 				),
2127
-				array (
2128
-						gettext ( "Increment" ),
2127
+				array(
2128
+						gettext("Increment"),
2129 2129
 						"180",
2130 2130
 						"inc",
2131 2131
 						"",
@@ -2135,21 +2135,21 @@  discard block
 block discarded – undo
2135 2135
 						"true",
2136 2136
 						"center" 
2137 2137
 				) 
2138
-		) );
2138
+		));
2139 2139
 		return $grid_field_arr;
2140 2140
 	}
2141 2141
 	function user_rates_list_search() {
2142
-		$form ['forms'] = array (
2142
+		$form ['forms'] = array(
2143 2143
 				"",
2144
-				array (
2144
+				array(
2145 2145
 						'id' => "user_rates_list_search" 
2146 2146
 				) 
2147 2147
 		);
2148
-		$form ['Search'] = array (
2149
-				array (
2150
-						gettext ( 'Code' ),
2148
+		$form ['Search'] = array(
2149
+				array(
2150
+						gettext('Code'),
2151 2151
 						'INPUT',
2152
-						array (
2152
+						array(
2153 2153
 								'name' => 'pattern[pattern]',
2154 2154
 								'',
2155 2155
 								'size' => '20',
@@ -2165,10 +2165,10 @@  discard block
 block discarded – undo
2165 2165
 						'search_int_type',
2166 2166
 						'' 
2167 2167
 				),
2168
-				array (
2169
-						gettext ( 'Destination' ),
2168
+				array(
2169
+						gettext('Destination'),
2170 2170
 						'INPUT',
2171
-						array (
2171
+						array(
2172 2172
 								'name' => 'comment[comment]',
2173 2173
 								'',
2174 2174
 								'size' => '20',
@@ -2184,10 +2184,10 @@  discard block
 block discarded – undo
2184 2184
 						'search_string_type',
2185 2185
 						'' 
2186 2186
 				),
2187
-				array (
2188
-						gettext ( 'Connect Cost' ),
2187
+				array(
2188
+						gettext('Connect Cost'),
2189 2189
 						'INPUT',
2190
-						array (
2190
+						array(
2191 2191
 								'name' => 'connectcost[connectcost]',
2192 2192
 								'value' => '',
2193 2193
 								'size' => '20',
@@ -2203,10 +2203,10 @@  discard block
 block discarded – undo
2203 2203
 						'search_int_type',
2204 2204
 						'' 
2205 2205
 				),
2206
-				array (
2207
-						gettext ( 'Included Seconds' ),
2206
+				array(
2207
+						gettext('Included Seconds'),
2208 2208
 						'INPUT',
2209
-						array (
2209
+						array(
2210 2210
 								'name' => 'includedseconds[includedseconds]',
2211 2211
 								'value' => '',
2212 2212
 								'size' => '20',
@@ -2222,10 +2222,10 @@  discard block
 block discarded – undo
2222 2222
 						'search_int_type',
2223 2223
 						'' 
2224 2224
 				),
2225
-				array (
2226
-						gettext ( 'Per Minute Cost' ),
2225
+				array(
2226
+						gettext('Per Minute Cost'),
2227 2227
 						'INPUT',
2228
-						array (
2228
+						array(
2229 2229
 								'name' => 'cost[cost]',
2230 2230
 								'value' => '',
2231 2231
 								'size' => '20',
@@ -2241,10 +2241,10 @@  discard block
 block discarded – undo
2241 2241
 						'search_int_type',
2242 2242
 						'' 
2243 2243
 				),
2244
-				array (
2245
-						gettext ( 'Initial Increment' ),
2244
+				array(
2245
+						gettext('Initial Increment'),
2246 2246
 						'INPUT',
2247
-						array (
2247
+						array(
2248 2248
 								'name' => 'init_inc[init_inc]',
2249 2249
 								'',
2250 2250
 								'size' => '20',
@@ -2260,10 +2260,10 @@  discard block
 block discarded – undo
2260 2260
 						'search_int_type',
2261 2261
 						'' 
2262 2262
 				),
2263
-				array (
2264
-						gettext ( 'Increment' ),
2263
+				array(
2264
+						gettext('Increment'),
2265 2265
 						'INPUT',
2266
-						array (
2266
+						array(
2267 2267
 								'name' => 'inc[inc]',
2268 2268
 								'',
2269 2269
 								'size' => '20',
@@ -2279,7 +2279,7 @@  discard block
 block discarded – undo
2279 2279
 						'search_int_type',
2280 2280
 						'' 
2281 2281
 				),
2282
-				array (
2282
+				array(
2283 2283
 						'',
2284 2284
 						'HIDDEN',
2285 2285
 						'ajax_search',
@@ -2288,7 +2288,7 @@  discard block
 block discarded – undo
2288 2288
 						'',
2289 2289
 						'' 
2290 2290
 				),
2291
-				array (
2291
+				array(
2292 2292
 						'',
2293 2293
 						'HIDDEN',
2294 2294
 						'advance_search',
@@ -2299,18 +2299,18 @@  discard block
 block discarded – undo
2299 2299
 				) 
2300 2300
 		);
2301 2301
 		
2302
-		$form ['button_search'] = array (
2302
+		$form ['button_search'] = array(
2303 2303
 				'name' => 'action',
2304 2304
 				'id' => "user_rates_list_search_btn",
2305
-				'content' => gettext ( 'Search' ),
2305
+				'content' => gettext('Search'),
2306 2306
 				'value' => 'save',
2307 2307
 				'type' => 'button',
2308 2308
 				'class' => 'btn btn-line-parrot pull-right' 
2309 2309
 		);
2310
-		$form ['button_reset'] = array (
2310
+		$form ['button_reset'] = array(
2311 2311
 				'name' => 'action',
2312 2312
 				'id' => "id_reset",
2313
-				'content' => gettext ( 'Clear' ),
2313
+				'content' => gettext('Clear'),
2314 2314
 				'value' => 'cancel',
2315 2315
 				'type' => 'reset',
2316 2316
 				'class' => 'btn btn-line-sky pull-right margin-x-10' 
@@ -2319,18 +2319,18 @@  discard block
 block discarded – undo
2319 2319
 		return $form;
2320 2320
 	}
2321 2321
 	function user_alert_threshold() {
2322
-		$form ['forms'] = array (
2323
-				base_url () . 'user/user_alert_threshold/',
2324
-				array (
2322
+		$form ['forms'] = array(
2323
+				base_url().'user/user_alert_threshold/',
2324
+				array(
2325 2325
 						"id" => "customer_alert_threshold",
2326 2326
 						"name" => "customer_alert_threshold" 
2327 2327
 				) 
2328 2328
 		);
2329
-		$form [gettext ( 'Low Balance Alert Email' )] = array (
2330
-				array (
2329
+		$form [gettext('Low Balance Alert Email')] = array(
2330
+				array(
2331 2331
 						'',
2332 2332
 						'HIDDEN',
2333
-						array (
2333
+						array(
2334 2334
 								'name' => 'id' 
2335 2335
 						),
2336 2336
 						'',
@@ -2338,8 +2338,8 @@  discard block
 block discarded – undo
2338 2338
 						'',
2339 2339
 						'' 
2340 2340
 				),
2341
-				array (
2342
-						gettext ( 'Enable Email Alerts ?' ),
2341
+				array(
2342
+						gettext('Enable Email Alerts ?'),
2343 2343
 						'notify_flag',
2344 2344
 						'SELECT',
2345 2345
 						'',
@@ -2351,10 +2351,10 @@  discard block
 block discarded – undo
2351 2351
 						'',
2352 2352
 						'custom_status' 
2353 2353
 				),
2354
-				array (
2355
-						gettext ( 'Low Balance Alert Level' ),
2354
+				array(
2355
+						gettext('Low Balance Alert Level'),
2356 2356
 						'INPUT',
2357
-						array (
2357
+						array(
2358 2358
 								'name' => 'notify_credit_limit',
2359 2359
 								'size' => '20',
2360 2360
 								'class' => "text field medium" 
@@ -2363,10 +2363,10 @@  discard block
 block discarded – undo
2363 2363
 						'tOOL TIP',
2364 2364
 						'' 
2365 2365
 				),
2366
-				array (
2367
-						gettext ( 'Email Address' ),
2366
+				array(
2367
+						gettext('Email Address'),
2368 2368
 						'INPUT',
2369
-						array (
2369
+						array(
2370 2370
 								'name' => 'notify_email',
2371 2371
 								'size' => '50',
2372 2372
 								'class' => "text field medium" 
@@ -2376,9 +2376,9 @@  discard block
 block discarded – undo
2376 2376
 						'' 
2377 2377
 				) 
2378 2378
 		);
2379
-		$form ['button_save'] = array (
2379
+		$form ['button_save'] = array(
2380 2380
 				'name' => 'action',
2381
-				'content' => gettext ( 'Save' ),
2381
+				'content' => gettext('Save'),
2382 2382
 				'value' => 'save',
2383 2383
 				'type' => 'submit',
2384 2384
 				'class' => 'btn btn-line-parrot' 
@@ -2386,13 +2386,13 @@  discard block
 block discarded – undo
2386 2386
 		return $form;
2387 2387
 	}
2388 2388
 	function build_cdrs_report($type) {
2389
-		$account_info = $accountinfo = $this->CI->session->userdata ( 'accountinfo' );
2389
+		$account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
2390 2390
 		$currency_id = $account_info ['currency_id'];
2391
-		$currency = $this->CI->common->get_field_name ( 'currency', 'currency', $currency_id );
2391
+		$currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id);
2392 2392
 		
2393 2393
 		if ($type == '0' || $type == '1') {
2394
-			$cost_array = array (
2395
-					gettext ( "Debit" ) . "($currency)",
2394
+			$cost_array = array(
2395
+					gettext("Debit")."($currency)",
2396 2396
 					"140",
2397 2397
 					"debit",
2398 2398
 					"debit",
@@ -2404,8 +2404,8 @@  discard block
 block discarded – undo
2404 2404
 			);
2405 2405
 		}
2406 2406
 		if ($type == '3') {
2407
-			$cost_array = array (
2408
-					gettext ( "Debit" ) . "($currency)",
2407
+			$cost_array = array(
2408
+					gettext("Debit")."($currency)",
2409 2409
 					"140",
2410 2410
 					"cost",
2411 2411
 					"cost",
@@ -2416,9 +2416,9 @@  discard block
 block discarded – undo
2416 2416
 					"right" 
2417 2417
 			);
2418 2418
 		}
2419
-		$grid_field_arr = json_encode ( array (
2420
-				array (
2421
-						gettext ( "Date" ),
2419
+		$grid_field_arr = json_encode(array(
2420
+				array(
2421
+						gettext("Date"),
2422 2422
 						"170",
2423 2423
 						"callstart",
2424 2424
 						"callstart",
@@ -2428,8 +2428,8 @@  discard block
 block discarded – undo
2428 2428
 						"true",
2429 2429
 						"center" 
2430 2430
 				),
2431
-				array (
2432
-						gettext ( "Caller ID" ),
2431
+				array(
2432
+						gettext("Caller ID"),
2433 2433
 						"110",
2434 2434
 						"callerid",
2435 2435
 						"",
@@ -2439,8 +2439,8 @@  discard block
 block discarded – undo
2439 2439
 						"true",
2440 2440
 						"center" 
2441 2441
 				),
2442
-				array (
2443
-						gettext ( "Called Number" ),
2442
+				array(
2443
+						gettext("Called Number"),
2444 2444
 						"160",
2445 2445
 						"callednum",
2446 2446
 						"",
@@ -2450,8 +2450,8 @@  discard block
 block discarded – undo
2450 2450
 						"true",
2451 2451
 						"center" 
2452 2452
 				),
2453
-				array (
2454
-						gettext ( "Destination" ),
2453
+				array(
2454
+						gettext("Destination"),
2455 2455
 						"160",
2456 2456
 						"notes",
2457 2457
 						"",
@@ -2461,8 +2461,8 @@  discard block
 block discarded – undo
2461 2461
 						"true",
2462 2462
 						"center" 
2463 2463
 				),
2464
-				array (
2465
-						gettext ( "Duration" ),
2464
+				array(
2465
+						gettext("Duration"),
2466 2466
 						"140",
2467 2467
 						"billseconds",
2468 2468
 						"user_cdrs_report_search",
@@ -2473,8 +2473,8 @@  discard block
 block discarded – undo
2473 2473
 						"center" 
2474 2474
 				),
2475 2475
 				$cost_array,
2476
-				array (
2477
-						gettext ( "Disposition" ),
2476
+				array(
2477
+						gettext("Disposition"),
2478 2478
 						"160",
2479 2479
 						"disposition",
2480 2480
 						"",
@@ -2484,8 +2484,8 @@  discard block
 block discarded – undo
2484 2484
 						"true",
2485 2485
 						"center" 
2486 2486
 				),
2487
-				array (
2488
-						gettext ( "Call Type" ),
2487
+				array(
2488
+						gettext("Call Type"),
2489 2489
 						"233",
2490 2490
 						"calltype",
2491 2491
 						"",
@@ -2495,15 +2495,15 @@  discard block
 block discarded – undo
2495 2495
 						"true",
2496 2496
 						"center" 
2497 2497
 				) 
2498
-		) );
2498
+		));
2499 2499
 		return $grid_field_arr;
2500 2500
 	}
2501 2501
 	function build_cdrs_report_search($type) {
2502 2502
 		if ($type == '0' || $type == '1') {
2503
-			$cost_array = array (
2504
-					gettext ( 'Debit' ),
2503
+			$cost_array = array(
2504
+					gettext('Debit'),
2505 2505
 					'INPUT',
2506
-					array (
2506
+					array(
2507 2507
 							'name' => 'debit[debit]',
2508 2508
 							'value' => '',
2509 2509
 							'size' => '20',
@@ -2521,10 +2521,10 @@  discard block
 block discarded – undo
2521 2521
 			);
2522 2522
 		}
2523 2523
 		if ($type == '3') {
2524
-			$cost_array = array (
2525
-					gettext ( 'Debit' ),
2524
+			$cost_array = array(
2525
+					gettext('Debit'),
2526 2526
 					'INPUT',
2527
-					array (
2527
+					array(
2528 2528
 							'name' => 'cost[cost]',
2529 2529
 							'value' => '',
2530 2530
 							'size' => '20',
@@ -2541,17 +2541,17 @@  discard block
 block discarded – undo
2541 2541
 					'' 
2542 2542
 			);
2543 2543
 		}
2544
-		$form ['forms'] = array (
2544
+		$form ['forms'] = array(
2545 2545
 				"",
2546
-				array (
2546
+				array(
2547 2547
 						'id' => "user_cdrs_report_search" 
2548 2548
 				) 
2549 2549
 		);
2550
-		$form ['Search'] = array (
2551
-				array (
2552
-						gettext ( 'From Date' ),
2550
+		$form ['Search'] = array(
2551
+				array(
2552
+						gettext('From Date'),
2553 2553
 						'INPUT',
2554
-						array (
2554
+						array(
2555 2555
 								'name' => 'callstart[]',
2556 2556
 								'id' => 'customer_cdr_from_date',
2557 2557
 								'size' => '20',
@@ -2562,10 +2562,10 @@  discard block
 block discarded – undo
2562 2562
 						'',
2563 2563
 						'start_date[start_date-date]' 
2564 2564
 				),
2565
-				array (
2566
-						gettext ( 'To Date' ),
2565
+				array(
2566
+						gettext('To Date'),
2567 2567
 						'INPUT',
2568
-						array (
2568
+						array(
2569 2569
 								'name' => 'callstart[]',
2570 2570
 								'id' => 'customer_cdr_to_date',
2571 2571
 								'size' => '20',
@@ -2576,10 +2576,10 @@  discard block
 block discarded – undo
2576 2576
 						'',
2577 2577
 						'end_date[end_date-date]' 
2578 2578
 				),
2579
-				array (
2580
-						gettext ( 'Caller ID' ),
2579
+				array(
2580
+						gettext('Caller ID'),
2581 2581
 						'INPUT',
2582
-						array (
2582
+						array(
2583 2583
 								'name' => 'callerid[callerid]',
2584 2584
 								'',
2585 2585
 								'id' => 'first_name',
@@ -2596,10 +2596,10 @@  discard block
 block discarded – undo
2596 2596
 						'search_string_type',
2597 2597
 						'' 
2598 2598
 				),
2599
-				array (
2600
-						gettext ( 'Called Number' ),
2599
+				array(
2600
+						gettext('Called Number'),
2601 2601
 						'INPUT',
2602
-						array (
2602
+						array(
2603 2603
 								'name' => 'callednum[callednum]',
2604 2604
 								'value' => '',
2605 2605
 								'size' => '20',
@@ -2615,10 +2615,10 @@  discard block
 block discarded – undo
2615 2615
 						'search_string_type',
2616 2616
 						'' 
2617 2617
 				),
2618
-				array (
2619
-						gettext ( 'Destination' ),
2618
+				array(
2619
+						gettext('Destination'),
2620 2620
 						'INPUT',
2621
-						array (
2621
+						array(
2622 2622
 								'name' => 'notes[notes]',
2623 2623
 								'value' => '',
2624 2624
 								'size' => '20',
@@ -2634,10 +2634,10 @@  discard block
 block discarded – undo
2634 2634
 						'search_int_type',
2635 2635
 						'' 
2636 2636
 				),
2637
-				array (
2638
-						gettext ( 'Duration' ),
2637
+				array(
2638
+						gettext('Duration'),
2639 2639
 						'INPUT',
2640
-						array (
2640
+						array(
2641 2641
 								'name' => 'billseconds[billseconds]',
2642 2642
 								'value' => '',
2643 2643
 								'size' => '20',
@@ -2654,8 +2654,8 @@  discard block
 block discarded – undo
2654 2654
 						'' 
2655 2655
 				),
2656 2656
 				$cost_array,
2657
-				array (
2658
-						gettext ( 'Disposition' ),
2657
+				array(
2658
+						gettext('Disposition'),
2659 2659
 						'disposition',
2660 2660
 						'SELECT',
2661 2661
 						'',
@@ -2667,8 +2667,8 @@  discard block
 block discarded – undo
2667 2667
 						'',
2668 2668
 						'set_despostion' 
2669 2669
 				),
2670
-				array (
2671
-						gettext ( 'Call Type' ),
2670
+				array(
2671
+						gettext('Call Type'),
2672 2672
 						'calltype',
2673 2673
 						'SELECT',
2674 2674
 						'',
@@ -2680,7 +2680,7 @@  discard block
 block discarded – undo
2680 2680
 						'',
2681 2681
 						'set_calltype' 
2682 2682
 				),
2683
-				array (
2683
+				array(
2684 2684
 						'',
2685 2685
 						'HIDDEN',
2686 2686
 						'ajax_search',
@@ -2689,7 +2689,7 @@  discard block
 block discarded – undo
2689 2689
 						'',
2690 2690
 						'' 
2691 2691
 				),
2692
-				array (
2692
+				array(
2693 2693
 						'',
2694 2694
 						'HIDDEN',
2695 2695
 						'advance_search',
@@ -2699,28 +2699,28 @@  discard block
 block discarded – undo
2699 2699
 						'' 
2700 2700
 				) 
2701 2701
 		);
2702
-		$form ['display_in'] = array (
2702
+		$form ['display_in'] = array(
2703 2703
 				'name' => 'search_in',
2704 2704
 				"id" => "search_in",
2705 2705
 				"function" => "search_report_in",
2706
-				"content" => gettext ( "Display records in" ),
2706
+				"content" => gettext("Display records in"),
2707 2707
 				'label_class' => "search_label col-md-3 no-padding",
2708 2708
 				"dropdown_class" => "form-control",
2709 2709
 				"label_style" => "font-size:13px;",
2710 2710
 				"dropdown_style" => "background: #ddd; width: 21% !important;" 
2711 2711
 		);
2712
-		$form ['button_search'] = array (
2712
+		$form ['button_search'] = array(
2713 2713
 				'name' => 'action',
2714 2714
 				'id' => "user_cdr_search_btn",
2715
-				'content' => gettext ( 'Search' ),
2715
+				'content' => gettext('Search'),
2716 2716
 				'value' => 'save',
2717 2717
 				'type' => 'button',
2718 2718
 				'class' => 'btn btn-line-parrot pull-right' 
2719 2719
 		);
2720
-		$form ['button_reset'] = array (
2720
+		$form ['button_reset'] = array(
2721 2721
 				'name' => 'action',
2722 2722
 				'id' => "id_reset",
2723
-				'content' => gettext ( 'Clear' ),
2723
+				'content' => gettext('Clear'),
2724 2724
 				'value' => 'cancel',
2725 2725
 				'type' => 'reset',
2726 2726
 				'class' => 'btn btn-line-sky pull-right margin-x-10' 
@@ -2728,25 +2728,25 @@  discard block
 block discarded – undo
2728 2728
 		return $form;
2729 2729
 	}
2730 2730
 	function build_cdrs_report_buttons() {
2731
-		$buttons_json = json_encode ( array (
2732
-				array (
2733
-						gettext ( "Export" ),
2731
+		$buttons_json = json_encode(array(
2732
+				array(
2733
+						gettext("Export"),
2734 2734
 						"btn btn-xing",
2735 2735
 						" fa fa-download fa-lg",
2736 2736
 						"button_action",
2737 2737
 						"/user/user_report_export/",
2738 2738
 						'single' 
2739 2739
 				) 
2740
-		) );
2740
+		));
2741 2741
 		return $buttons_json;
2742 2742
 	}
2743 2743
 	function build_user_refill_report() {
2744
-		$account_info = $accountinfo = $this->CI->session->userdata ( 'accountinfo' );
2744
+		$account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
2745 2745
 		$currency_id = $account_info ['currency_id'];
2746
-		$currency = $this->CI->common->get_field_name ( 'currency', 'currency', $currency_id );
2747
-		$grid_field_arr = json_encode ( array (
2748
-				array (
2749
-						gettext ( "Date" ),
2746
+		$currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id);
2747
+		$grid_field_arr = json_encode(array(
2748
+				array(
2749
+						gettext("Date"),
2750 2750
 						"220",
2751 2751
 						"payment_date",
2752 2752
 						"",
@@ -2756,8 +2756,8 @@  discard block
 block discarded – undo
2756 2756
 						"true",
2757 2757
 						"center" 
2758 2758
 				),
2759
-				array (
2760
-						gettext ( "Amount" ) . "($currency)",
2759
+				array(
2760
+						gettext("Amount")."($currency)",
2761 2761
 						"220",
2762 2762
 						"credit",
2763 2763
 						"credit",
@@ -2767,8 +2767,8 @@  discard block
 block discarded – undo
2767 2767
 						"true",
2768 2768
 						"right" 
2769 2769
 				),
2770
-				array (
2771
-						gettext ( "Refill By" ),
2770
+				array(
2771
+						gettext("Refill By"),
2772 2772
 						"270",
2773 2773
 						"payment_by",
2774 2774
 						"payment_by",
@@ -2778,8 +2778,8 @@  discard block
 block discarded – undo
2778 2778
 						"true",
2779 2779
 						"center" 
2780 2780
 				),
2781
-				array (
2782
-						gettext ( "Note" ),
2781
+				array(
2782
+						gettext("Note"),
2783 2783
 						"300",
2784 2784
 						"notes",
2785 2785
 						"",
@@ -2789,21 +2789,21 @@  discard block
 block discarded – undo
2789 2789
 						"true",
2790 2790
 						"center" 
2791 2791
 				) 
2792
-		) );
2792
+		));
2793 2793
 		return $grid_field_arr;
2794 2794
 	}
2795 2795
 	function build_user_refill_report_search() {
2796
-		$form ['forms'] = array (
2796
+		$form ['forms'] = array(
2797 2797
 				"",
2798
-				array (
2798
+				array(
2799 2799
 						'id' => "user_refill_report_search" 
2800 2800
 				) 
2801 2801
 		);
2802
-		$form ['Search'] = array (
2803
-				array (
2804
-						gettext ( 'From Date' ),
2802
+		$form ['Search'] = array(
2803
+				array(
2804
+						gettext('From Date'),
2805 2805
 						'INPUT',
2806
-						array (
2806
+						array(
2807 2807
 								'name' => 'payment_date[]',
2808 2808
 								'id' => 'customer_cdr_from_date',
2809 2809
 								'size' => '20',
@@ -2814,10 +2814,10 @@  discard block
 block discarded – undo
2814 2814
 						'',
2815 2815
 						'payment_date[payment_date-date]' 
2816 2816
 				),
2817
-				array (
2818
-						gettext ( 'To Date' ),
2817
+				array(
2818
+						gettext('To Date'),
2819 2819
 						'INPUT',
2820
-						array (
2820
+						array(
2821 2821
 								'name' => 'payment_date[]',
2822 2822
 								'id' => 'customer_cdr_to_date',
2823 2823
 								'size' => '20',
@@ -2828,10 +2828,10 @@  discard block
 block discarded – undo
2828 2828
 						'',
2829 2829
 						'payment_date[payment_date-date]' 
2830 2830
 				),
2831
-				array (
2832
-						gettext ( 'Amount' ),
2831
+				array(
2832
+						gettext('Amount'),
2833 2833
 						'INPUT',
2834
-						array (
2834
+						array(
2835 2835
 								'name' => 'credit[credit]',
2836 2836
 								'value' => '',
2837 2837
 								'size' => '20',
@@ -2847,7 +2847,7 @@  discard block
 block discarded – undo
2847 2847
 						'search_int_type',
2848 2848
 						'' 
2849 2849
 				),
2850
-				array (
2850
+				array(
2851 2851
 						'',
2852 2852
 						'HIDDEN',
2853 2853
 						'ajax_search',
@@ -2856,7 +2856,7 @@  discard block
 block discarded – undo
2856 2856
 						'',
2857 2857
 						'' 
2858 2858
 				),
2859
-				array (
2859
+				array(
2860 2860
 						'',
2861 2861
 						'HIDDEN',
2862 2862
 						'advance_search',
@@ -2867,18 +2867,18 @@  discard block
 block discarded – undo
2867 2867
 				) 
2868 2868
 		);
2869 2869
 		
2870
-		$form ['button_search'] = array (
2870
+		$form ['button_search'] = array(
2871 2871
 				'name' => 'action',
2872 2872
 				'id' => "user_refill_report_search_btn",
2873
-				'content' => gettext ( 'Search' ),
2873
+				'content' => gettext('Search'),
2874 2874
 				'value' => 'save',
2875 2875
 				'type' => 'button',
2876 2876
 				'class' => 'btn btn-line-parrot pull-right' 
2877 2877
 		);
2878
-		$form ['button_reset'] = array (
2878
+		$form ['button_reset'] = array(
2879 2879
 				'name' => 'action',
2880 2880
 				'id' => "id_reset",
2881
-				'content' => gettext ( 'Clear' ),
2881
+				'content' => gettext('Clear'),
2882 2882
 				'value' => 'cancel',
2883 2883
 				'type' => 'reset',
2884 2884
 				'class' => 'btn btn-line-sky pull-right margin-x-10' 
@@ -2886,20 +2886,20 @@  discard block
 block discarded – undo
2886 2886
 		return $form;
2887 2887
 	}
2888 2888
 	function build_user_fund_transfer_form($number, $currency_id, $id) {
2889
-		$form ['forms'] = array (
2890
-				base_url () . 'user/user_fund_transfer_save/',
2891
-				array (
2889
+		$form ['forms'] = array(
2890
+				base_url().'user/user_fund_transfer_save/',
2891
+				array(
2892 2892
 						'id' => 'user_fund_transfer_form',
2893 2893
 						'method' => 'POST',
2894 2894
 						'class' => 'build_user_fund_transfer_frm',
2895 2895
 						'name' => 'user_fund_transfer_form' 
2896 2896
 				) 
2897 2897
 		);
2898
-		$form [gettext ( 'Fund Transfer' )] = array (
2899
-				array (
2898
+		$form [gettext('Fund Transfer')] = array(
2899
+				array(
2900 2900
 						'',
2901 2901
 						'HIDDEN',
2902
-						array (
2902
+						array(
2903 2903
 								'name' => 'id',
2904 2904
 								'value' => $id 
2905 2905
 						),
@@ -2908,10 +2908,10 @@  discard block
 block discarded – undo
2908 2908
 						'',
2909 2909
 						'' 
2910 2910
 				),
2911
-				array (
2911
+				array(
2912 2912
 						'',
2913 2913
 						'HIDDEN',
2914
-						array (
2914
+						array(
2915 2915
 								'name' => 'account_currency',
2916 2916
 								'value' => $currency_id 
2917 2917
 						),
@@ -2919,10 +2919,10 @@  discard block
 block discarded – undo
2919 2919
 						'',
2920 2920
 						'' 
2921 2921
 				),
2922
-				array (
2923
-						gettext ( 'From Account' ),
2922
+				array(
2923
+						gettext('From Account'),
2924 2924
 						'INPUT',
2925
-						array (
2925
+						array(
2926 2926
 								'name' => 'fromaccountid',
2927 2927
 								'size' => '20',
2928 2928
 								'value' => $number,
@@ -2933,10 +2933,10 @@  discard block
 block discarded – undo
2933 2933
 						'tOOL TIP',
2934 2934
 						'Please Enter account number' 
2935 2935
 				),
2936
-				array (
2937
-						gettext ( 'To Account' ),
2936
+				array(
2937
+						gettext('To Account'),
2938 2938
 						'INPUT',
2939
-						array (
2939
+						array(
2940 2940
 								'name' => 'toaccountid',
2941 2941
 								'size' => '20',
2942 2942
 								'class' => "text field medium" 
@@ -2945,10 +2945,10 @@  discard block
 block discarded – undo
2945 2945
 						'tOOL TIP',
2946 2946
 						'Please Enter to account number' 
2947 2947
 				),
2948
-				array (
2949
-						gettext ( 'Amount' ),
2948
+				array(
2949
+						gettext('Amount'),
2950 2950
 						'INPUT',
2951
-						array (
2951
+						array(
2952 2952
 								'name' => 'credit',
2953 2953
 								'size' => '20',
2954 2954
 								'class' => "text field medium" 
@@ -2957,10 +2957,10 @@  discard block
 block discarded – undo
2957 2957
 						'tOOL TIP',
2958 2958
 						'' 
2959 2959
 				),
2960
-				array (
2961
-						gettext ( 'Note' ),
2960
+				array(
2961
+						gettext('Note'),
2962 2962
 						'TEXTAREA',
2963
-						array (
2963
+						array(
2964 2964
 								'name' => 'notes',
2965 2965
 								'size' => '20',
2966 2966
 								'cols' => '63',
@@ -2973,10 +2973,10 @@  discard block
 block discarded – undo
2973 2973
 						'' 
2974 2974
 				) 
2975 2975
 		);
2976
-		$form ['button_save'] = array (
2976
+		$form ['button_save'] = array(
2977 2977
 				'name' => 'action',
2978 2978
 				'content' => 'Transfer',
2979
-				'value' => gettext ( 'save' ),
2979
+				'value' => gettext('save'),
2980 2980
 				'id' => "submit",
2981 2981
 				'type' => 'submit',
2982 2982
 				'class' => 'btn btn-line-parrot' 
@@ -2984,8 +2984,8 @@  discard block
 block discarded – undo
2984 2984
 		return $form;
2985 2985
 	}
2986 2986
 	function build_user_opensips_buttons() {
2987
-		$buttons_json = json_encode ( array (
2988
-				array (
2987
+		$buttons_json = json_encode(array(
2988
+				array(
2989 2989
 						"Create",
2990 2990
 						"btn btn-line-warning btn",
2991 2991
 						"fa fa-plus-circle fa-lg",
@@ -2993,19 +2993,19 @@  discard block
 block discarded – undo
2993 2993
 						"/user/user_opensips_add/",
2994 2994
 						"popup" 
2995 2995
 				),
2996
-				array (
2996
+				array(
2997 2997
 						"Delete",
2998 2998
 						"btn btn-line-danger",
2999 2999
 						"fa fa-times-circle fa-lg",
3000 3000
 						"button_action",
3001 3001
 						"/user/user_opensips_delete_multiple/" 
3002 3002
 				) 
3003
-		) );
3003
+		));
3004 3004
 		return $buttons_json;
3005 3005
 	}
3006 3006
 	function build_user_opensips() {
3007
-		$grid_field_arr = json_encode ( array (
3008
-				array (
3007
+		$grid_field_arr = json_encode(array(
3008
+				array(
3009 3009
 						"<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>",
3010 3010
 						"30",
3011 3011
 						"",
@@ -3016,7 +3016,7 @@  discard block
 block discarded – undo
3016 3016
 						"false",
3017 3017
 						"center" 
3018 3018
 				),
3019
-				array (
3019
+				array(
3020 3020
 						"Username",
3021 3021
 						"240",
3022 3022
 						"username",
@@ -3027,7 +3027,7 @@  discard block
 block discarded – undo
3027 3027
 						"true",
3028 3028
 						"center" 
3029 3029
 				),
3030
-				array (
3030
+				array(
3031 3031
 						"Password",
3032 3032
 						"240",
3033 3033
 						"password",
@@ -3038,7 +3038,7 @@  discard block
 block discarded – undo
3038 3038
 						"true",
3039 3039
 						"center" 
3040 3040
 				),
3041
-				array (
3041
+				array(
3042 3042
 						"Domain",
3043 3043
 						"240",
3044 3044
 						"domain",
@@ -3049,43 +3049,43 @@  discard block
 block discarded – undo
3049 3049
 						"true",
3050 3050
 						"center" 
3051 3051
 				),
3052
-				array (
3052
+				array(
3053 3053
 						"Action",
3054 3054
 						"200",
3055 3055
 						"",
3056 3056
 						"",
3057 3057
 						"",
3058
-						array (
3059
-								"EDIT" => array (
3058
+						array(
3059
+								"EDIT" => array(
3060 3060
 										"url" => 'user/user_opensips_edit/',
3061 3061
 										"mode" => "popup" 
3062 3062
 								),
3063
-								"DELETE" => array (
3063
+								"DELETE" => array(
3064 3064
 										"url" => 'user/user_opensips_delete/',
3065 3065
 										"mode" => "popup" 
3066 3066
 								) 
3067 3067
 						) 
3068 3068
 				) 
3069
-		) );
3069
+		));
3070 3070
 		return $grid_field_arr;
3071 3071
 	}
3072 3072
 	function build_user_opensips_form($id = false) {
3073
-		$val = $id > 0 ? 'subscriber.username.' . $id : 'subscriber.username';
3074
-		$uname_user = $this->CI->common->find_uniq_rendno ( '10', '', '' );
3075
-		$password = $this->CI->common->generate_password ();
3076
-		$accountinfo = $this->CI->session->userdata ( 'accountinfo' );
3077
-		$form ['forms'] = array (
3078
-				base_url () . 'user/user_opensips_save/',
3079
-				array (
3073
+		$val = $id > 0 ? 'subscriber.username.'.$id : 'subscriber.username';
3074
+		$uname_user = $this->CI->common->find_uniq_rendno('10', '', '');
3075
+		$password = $this->CI->common->generate_password();
3076
+		$accountinfo = $this->CI->session->userdata('accountinfo');
3077
+		$form ['forms'] = array(
3078
+				base_url().'user/user_opensips_save/',
3079
+				array(
3080 3080
 						"id" => "opensips_form",
3081 3081
 						"name" => "opensips_form" 
3082 3082
 				) 
3083 3083
 		);
3084
-		$form ['Opensips Device'] = array (
3085
-				array (
3084
+		$form ['Opensips Device'] = array(
3085
+				array(
3086 3086
 						'',
3087 3087
 						'HIDDEN',
3088
-						array (
3088
+						array(
3089 3089
 								'name' => 'id' 
3090 3090
 						),
3091 3091
 						'',
@@ -3093,10 +3093,10 @@  discard block
 block discarded – undo
3093 3093
 						'',
3094 3094
 						'' 
3095 3095
 				),
3096
-				array (
3096
+				array(
3097 3097
 						'',
3098 3098
 						'HIDDEN',
3099
-						array (
3099
+						array(
3100 3100
 								'name' => 'accountcode',
3101 3101
 								'value' => $accountinfo ['number'] 
3102 3102
 						),
@@ -3105,10 +3105,10 @@  discard block
 block discarded – undo
3105 3105
 						'',
3106 3106
 						'' 
3107 3107
 				),
3108
-				array (
3108
+				array(
3109 3109
 						'Username',
3110 3110
 						'INPUT',
3111
-						array (
3111
+						array(
3112 3112
 								'name' => 'username',
3113 3113
 								'size' => '20',
3114 3114
 								'id' => 'username',
@@ -3120,10 +3120,10 @@  discard block
 block discarded – undo
3120 3120
 						'Please Enter account number',
3121 3121
 						'<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;" title="Reset Password" class="change_number fa fa-refresh"></i>' 
3122 3122
 				),
3123
-				array (
3123
+				array(
3124 3124
 						'Password',
3125 3125
 						'PASSWORD',
3126
-						array (
3126
+						array(
3127 3127
 								'name' => 'password',
3128 3128
 								'size' => '20',
3129 3129
 								'id' => 'password1',
@@ -3135,10 +3135,10 @@  discard block
 block discarded – undo
3135 3135
 						'Please Enter Password',
3136 3136
 						'<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;" title="Reset Password" class="change_pass fa fa-refresh"></i>' 
3137 3137
 				),
3138
-				array (
3138
+				array(
3139 3139
 						'Domain',
3140 3140
 						'INPUT',
3141
-						array (
3141
+						array(
3142 3142
 								'name' => 'domain',
3143 3143
 								'size' => '20',
3144 3144
 								'class' => "text field medium" 
@@ -3147,7 +3147,7 @@  discard block
 block discarded – undo
3147 3147
 						'tOOL TIP',
3148 3148
 						'Please Enter account number' 
3149 3149
 				),
3150
-				array (
3150
+				array(
3151 3151
 						'Status',
3152 3152
 						'status',
3153 3153
 						'SELECT',
@@ -3161,7 +3161,7 @@  discard block
 block discarded – undo
3161 3161
 						'set_status' 
3162 3162
 				) 
3163 3163
 		);
3164
-		$form ['button_save'] = array (
3164
+		$form ['button_save'] = array(
3165 3165
 				'name' => 'action',
3166 3166
 				'content' => 'Save',
3167 3167
 				'value' => 'save',
@@ -3169,7 +3169,7 @@  discard block
 block discarded – undo
3169 3169
 				'id' => 'submit',
3170 3170
 				'class' => 'btn btn-line-parrot' 
3171 3171
 		);
3172
-		$form ['button_cancel'] = array (
3172
+		$form ['button_cancel'] = array(
3173 3173
 				'name' => 'action',
3174 3174
 				'content' => 'Close',
3175 3175
 				'value' => 'cancel',
@@ -3180,17 +3180,17 @@  discard block
 block discarded – undo
3180 3180
 		return $form;
3181 3181
 	}
3182 3182
 	function build_user_opensips_search() {
3183
-		$form ['forms'] = array (
3183
+		$form ['forms'] = array(
3184 3184
 				"",
3185
-				array (
3185
+				array(
3186 3186
 						'id' => "opensips_list_search" 
3187 3187
 				) 
3188 3188
 		);
3189
-		$form ['Search'] = array (
3190
-				array (
3189
+		$form ['Search'] = array(
3190
+				array(
3191 3191
 						'Username',
3192 3192
 						'INPUT',
3193
-						array (
3193
+						array(
3194 3194
 								'name' => 'username[username]',
3195 3195
 								'',
3196 3196
 								'size' => '20',
@@ -3206,7 +3206,7 @@  discard block
 block discarded – undo
3206 3206
 						'search_string_type',
3207 3207
 						'' 
3208 3208
 				),
3209
-				array (
3209
+				array(
3210 3210
 						'',
3211 3211
 						'HIDDEN',
3212 3212
 						'ajax_search',
@@ -3215,7 +3215,7 @@  discard block
 block discarded – undo
3215 3215
 						'',
3216 3216
 						'' 
3217 3217
 				),
3218
-				array (
3218
+				array(
3219 3219
 						'',
3220 3220
 						'HIDDEN',
3221 3221
 						'advance_search',
@@ -3226,7 +3226,7 @@  discard block
 block discarded – undo
3226 3226
 				) 
3227 3227
 		);
3228 3228
 		
3229
-		$form ['button_search'] = array (
3229
+		$form ['button_search'] = array(
3230 3230
 				'name' => 'action',
3231 3231
 				'id' => "opensipsdevice_search_btn",
3232 3232
 				'content' => 'Search',
@@ -3234,7 +3234,7 @@  discard block
 block discarded – undo
3234 3234
 				'type' => 'button',
3235 3235
 				'class' => 'btn btn-line-parrot pull-right' 
3236 3236
 		);
3237
-		$form ['button_reset'] = array (
3237
+		$form ['button_reset'] = array(
3238 3238
 				'name' => 'action',
3239 3239
 				'id' => "id_reset",
3240 3240
 				'content' => 'Clear',
@@ -3246,18 +3246,18 @@  discard block
 block discarded – undo
3246 3246
 		return $form;
3247 3247
 	}
3248 3248
 	function build_user_did_form() {
3249
-		$form ['forms'] = array (
3250
-				base_url () . 'user/user_dids_action/edit/',
3251
-				array (
3249
+		$form ['forms'] = array(
3250
+				base_url().'user/user_dids_action/edit/',
3251
+				array(
3252 3252
 						"id" => "user_did_form",
3253 3253
 						"name" => "user_did_form" 
3254 3254
 				) 
3255 3255
 		);
3256
-		$form ['Edit'] = array (
3257
-				array (
3256
+		$form ['Edit'] = array(
3257
+				array(
3258 3258
 						'',
3259 3259
 						'HIDDEN',
3260
-						array (
3260
+						array(
3261 3261
 								'name' => 'free_didlist' 
3262 3262
 						),
3263 3263
 						'',
@@ -3265,10 +3265,10 @@  discard block
 block discarded – undo
3265 3265
 						'',
3266 3266
 						'' 
3267 3267
 				),
3268
-				array (
3269
-						gettext ( 'DID' ),
3268
+				array(
3269
+						gettext('DID'),
3270 3270
 						'INPUT',
3271
-						array (
3271
+						array(
3272 3272
 								'name' => 'number',
3273 3273
 								'size' => '20',
3274 3274
 								'class' => "text field medium",
@@ -3278,8 +3278,8 @@  discard block
 block discarded – undo
3278 3278
 						'tOOL TIP',
3279 3279
 						'Please Enter account number' 
3280 3280
 				),
3281
-				array (
3282
-						gettext ( 'Call Type' ),
3281
+				array(
3282
+						gettext('Call Type'),
3283 3283
 						'call_type',
3284 3284
 						'SELECT',
3285 3285
 						'',
@@ -3292,10 +3292,10 @@  discard block
 block discarded – undo
3292 3292
 						'set_call_type',
3293 3293
 						'' 
3294 3294
 				),
3295
-				array (
3296
-						gettext ( 'Destination' ),
3295
+				array(
3296
+						gettext('Destination'),
3297 3297
 						'INPUT',
3298
-						array (
3298
+						array(
3299 3299
 								'name' => 'extensions',
3300 3300
 								'size' => '20',
3301 3301
 								'class' => "text field medium" 
@@ -3305,7 +3305,7 @@  discard block
 block discarded – undo
3305 3305
 						'Please Enter Password' 
3306 3306
 				) 
3307 3307
 		);
3308
-		$form ['button_save'] = array (
3308
+		$form ['button_save'] = array(
3309 3309
 				'name' => 'action',
3310 3310
 				'content' => 'Save',
3311 3311
 				'value' => 'save',
@@ -3316,8 +3316,8 @@  discard block
 block discarded – undo
3316 3316
 		return $form;
3317 3317
 	}
3318 3318
 	function build_provider_report_buttons() {
3319
-		$buttons_json = json_encode ( array (
3320
-				array (
3319
+		$buttons_json = json_encode(array(
3320
+				array(
3321 3321
 						"Export",
3322 3322
 						"btn btn-xing",
3323 3323
 						" fa fa-download fa-lg",
@@ -3325,16 +3325,16 @@  discard block
 block discarded – undo
3325 3325
 						"/user/user_provider_cdrreport_export/",
3326 3326
 						'single' 
3327 3327
 				) 
3328
-		) );
3328
+		));
3329 3329
 		return $buttons_json;
3330 3330
 	}
3331 3331
 	function build_provider_report($type) {
3332
-		$account_info = $accountinfo = $this->CI->session->userdata ( 'accountinfo' );
3332
+		$account_info = $accountinfo = $this->CI->session->userdata('accountinfo');
3333 3333
 		$currency_id = $account_info ['currency_id'];
3334
-		$currency = $this->CI->common->get_field_name ( 'currency', 'currency', $currency_id );
3334
+		$currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id);
3335 3335
 		
3336 3336
 		if ($type == '0' || $type == '1') {
3337
-			$cost_array = array (
3337
+			$cost_array = array(
3338 3338
 					"Debit($currency)",
3339 3339
 					"140",
3340 3340
 					"debit",
@@ -3347,7 +3347,7 @@  discard block
 block discarded – undo
3347 3347
 			);
3348 3348
 		}
3349 3349
 		if ($type == '3') {
3350
-			$cost_array = array (
3350
+			$cost_array = array(
3351 3351
 					"Cost($currency)",
3352 3352
 					"140",
3353 3353
 					"cost",
@@ -3359,8 +3359,8 @@  discard block
 block discarded – undo
3359 3359
 					"right" 
3360 3360
 			);
3361 3361
 		}
3362
-		$grid_field_arr = json_encode ( array (
3363
-				array (
3362
+		$grid_field_arr = json_encode(array(
3363
+				array(
3364 3364
 						"Date",
3365 3365
 						"170",
3366 3366
 						"callstart",
@@ -3371,7 +3371,7 @@  discard block
 block discarded – undo
3371 3371
 						"true",
3372 3372
 						"center" 
3373 3373
 				),
3374
-				array (
3374
+				array(
3375 3375
 						"Caller ID",
3376 3376
 						"110",
3377 3377
 						"callerid",
@@ -3382,7 +3382,7 @@  discard block
 block discarded – undo
3382 3382
 						"true",
3383 3383
 						"center" 
3384 3384
 				),
3385
-				array (
3385
+				array(
3386 3386
 						"Called Number",
3387 3387
 						"160",
3388 3388
 						"callednum",
@@ -3393,7 +3393,7 @@  discard block
 block discarded – undo
3393 3393
 						"true",
3394 3394
 						"center" 
3395 3395
 				),
3396
-				array (
3396
+				array(
3397 3397
 						"Destination",
3398 3398
 						"160",
3399 3399
 						"notes",
@@ -3404,7 +3404,7 @@  discard block
 block discarded – undo
3404 3404
 						"true",
3405 3405
 						"center" 
3406 3406
 				),
3407
-				array (
3407
+				array(
3408 3408
 						"Duration",
3409 3409
 						"140",
3410 3410
 						"billseconds",
@@ -3416,7 +3416,7 @@  discard block
 block discarded – undo
3416 3416
 						"center" 
3417 3417
 				),
3418 3418
 				$cost_array,
3419
-				array (
3419
+				array(
3420 3420
 						"Disposition",
3421 3421
 						"160",
3422 3422
 						"disposition",
@@ -3427,7 +3427,7 @@  discard block
 block discarded – undo
3427 3427
 						"true",
3428 3428
 						"center" 
3429 3429
 				),
3430
-				array (
3430
+				array(
3431 3431
 						"Call Type",
3432 3432
 						"233",
3433 3433
 						"calltype",
@@ -3438,14 +3438,14 @@  discard block
 block discarded – undo
3438 3438
 						"true",
3439 3439
 						"center" 
3440 3440
 				) 
3441
-		) );
3441
+		));
3442 3442
 		return $grid_field_arr;
3443 3443
 	}
3444 3444
 	function build_provider_report_search($type) {
3445
-		$cost_array = array (
3445
+		$cost_array = array(
3446 3446
 				'Cost ',
3447 3447
 				'INPUT',
3448
-				array (
3448
+				array(
3449 3449
 						'name' => 'cost[cost]',
3450 3450
 						'value' => '',
3451 3451
 						'size' => '20',
@@ -3461,17 +3461,17 @@  discard block
 block discarded – undo
3461 3461
 				'search_int_type',
3462 3462
 				'' 
3463 3463
 		);
3464
-		$form ['forms'] = array (
3464
+		$form ['forms'] = array(
3465 3465
 				"",
3466
-				array (
3466
+				array(
3467 3467
 						'id' => "user_provider_cdrs_report_search" 
3468 3468
 				) 
3469 3469
 		);
3470
-		$form ['Search'] = array (
3471
-				array (
3470
+		$form ['Search'] = array(
3471
+				array(
3472 3472
 						'From Date',
3473 3473
 						'INPUT',
3474
-						array (
3474
+						array(
3475 3475
 								'name' => 'callstart[]',
3476 3476
 								'id' => 'customer_cdr_from_date',
3477 3477
 								'size' => '20',
@@ -3482,10 +3482,10 @@  discard block
 block discarded – undo
3482 3482
 						'',
3483 3483
 						'start_date[start_date-date]' 
3484 3484
 				),
3485
-				array (
3485
+				array(
3486 3486
 						'To Date',
3487 3487
 						'INPUT',
3488
-						array (
3488
+						array(
3489 3489
 								'name' => 'callstart[]',
3490 3490
 								'id' => 'customer_cdr_to_date',
3491 3491
 								'size' => '20',
@@ -3496,10 +3496,10 @@  discard block
 block discarded – undo
3496 3496
 						'',
3497 3497
 						'end_date[end_date-date]' 
3498 3498
 				),
3499
-				array (
3499
+				array(
3500 3500
 						'Caller ID',
3501 3501
 						'INPUT',
3502
-						array (
3502
+						array(
3503 3503
 								'name' => 'callerid[callerid]',
3504 3504
 								'',
3505 3505
 								'id' => 'first_name',
@@ -3516,10 +3516,10 @@  discard block
 block discarded – undo
3516 3516
 						'search_string_type',
3517 3517
 						'' 
3518 3518
 				),
3519
-				array (
3519
+				array(
3520 3520
 						'Called Number',
3521 3521
 						'INPUT',
3522
-						array (
3522
+						array(
3523 3523
 								'name' => 'callednum[callednum]',
3524 3524
 								'value' => '',
3525 3525
 								'size' => '20',
@@ -3535,10 +3535,10 @@  discard block
 block discarded – undo
3535 3535
 						'search_string_type',
3536 3536
 						'' 
3537 3537
 				),
3538
-				array (
3538
+				array(
3539 3539
 						'Destination ',
3540 3540
 						'INPUT',
3541
-						array (
3541
+						array(
3542 3542
 								'name' => 'notes[notes]',
3543 3543
 								'value' => '',
3544 3544
 								'size' => '20',
@@ -3554,10 +3554,10 @@  discard block
 block discarded – undo
3554 3554
 						'search_int_type',
3555 3555
 						'' 
3556 3556
 				),
3557
-				array (
3557
+				array(
3558 3558
 						'Duration',
3559 3559
 						'INPUT',
3560
-						array (
3560
+						array(
3561 3561
 								'name' => 'billseconds[billseconds]',
3562 3562
 								'value' => '',
3563 3563
 								'size' => '20',
@@ -3574,7 +3574,7 @@  discard block
 block discarded – undo
3574 3574
 						'' 
3575 3575
 				),
3576 3576
 				$cost_array,
3577
-				array (
3577
+				array(
3578 3578
 						'Disposition',
3579 3579
 						'disposition',
3580 3580
 						'SELECT',
@@ -3587,7 +3587,7 @@  discard block
 block discarded – undo
3587 3587
 						'',
3588 3588
 						'set_despostion' 
3589 3589
 				),
3590
-				array (
3590
+				array(
3591 3591
 						'Call Type',
3592 3592
 						'calltype',
3593 3593
 						'SELECT',
@@ -3601,7 +3601,7 @@  discard block
 block discarded – undo
3601 3601
 						'set_calltype' 
3602 3602
 				),
3603 3603
 				
3604
-				array (
3604
+				array(
3605 3605
 						'',
3606 3606
 						'HIDDEN',
3607 3607
 						'ajax_search',
@@ -3610,7 +3610,7 @@  discard block
 block discarded – undo
3610 3610
 						'',
3611 3611
 						'' 
3612 3612
 				),
3613
-				array (
3613
+				array(
3614 3614
 						'',
3615 3615
 						'HIDDEN',
3616 3616
 						'advance_search',
@@ -3620,7 +3620,7 @@  discard block
 block discarded – undo
3620 3620
 						'' 
3621 3621
 				) 
3622 3622
 		);
3623
-		$form ['display_in'] = array (
3623
+		$form ['display_in'] = array(
3624 3624
 				'name' => 'search_in',
3625 3625
 				"id" => "search_in",
3626 3626
 				"function" => "search_report_in",
@@ -3630,7 +3630,7 @@  discard block
 block discarded – undo
3630 3630
 				"label_style" => "font-size:13px;",
3631 3631
 				"dropdown_style" => "background: #ddd; width: 21% !important;" 
3632 3632
 		);
3633
-		$form ['button_search'] = array (
3633
+		$form ['button_search'] = array(
3634 3634
 				'name' => 'action',
3635 3635
 				'id' => "user_provider_cdr_search_btn",
3636 3636
 				'content' => 'Search',
@@ -3638,7 +3638,7 @@  discard block
 block discarded – undo
3638 3638
 				'type' => 'button',
3639 3639
 				'class' => 'btn btn-line-parrot pull-right' 
3640 3640
 		);
3641
-		$form ['button_reset'] = array (
3641
+		$form ['button_reset'] = array(
3642 3642
 				'name' => 'action',
3643 3643
 				'id' => "id_reset",
3644 3644
 				'content' => 'Clear',
Please login to merge, or discard this patch.
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -288,10 +288,11 @@
 block discarded – undo
288 288
 		return $form;
289 289
 	}
290 290
 	function get_userprofile_form_fields($dataArr = false) {
291
-		if ($dataArr ['id'] > 0)
292
-			$val = 'accounts.email.' . $dataArr ['id'];
293
-		else
294
-			$val = 'accounts.email';
291
+		if ($dataArr ['id'] > 0) {
292
+					$val = 'accounts.email.' . $dataArr ['id'];
293
+		} else {
294
+					$val = 'accounts.email';
295
+		}
295 296
 		$uname = $this->CI->common->find_uniq_rendno ( common_model::$global_config ['system_config'] ['cardlength'], 'number', 'accounts' );
296 297
 		$password = $this->CI->common->generate_password ();
297 298
 		$logintype = $this->CI->session->userdata ( 'logintype' );
Please login to merge, or discard this patch.
web_interface/astpp/application/modules/user/views/view_user_ipmap_list.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -21,24 +21,24 @@
 block discarded – undo
21 21
             <div class="col-md-12 no-padding color-three border_box"> 
22 22
                 <div class="pull-left">
23 23
                     <ul class="breadcrumb">
24
-                         <?php $accountinfo=$this->session->userdata('accountinfo');
25
-						  if($accountinfo['type']==1){ ?>
26
-                          <li><a href="<?= base_url() . "user/user_myprofile/"; ?>">My Profile</a></li>
27
-                          <?php } else{ ?>
24
+                         <?php $accountinfo = $this->session->userdata('accountinfo');
25
+						  if ($accountinfo['type'] == 1) { ?>
26
+                          <li><a href="<?= base_url()."user/user_myprofile/"; ?>">My Profile</a></li>
27
+                          <?php } else { ?>
28 28
 			    <li><a href="#"><?php echo gettext('Configuration')?></a></li>
29 29
                           <?php }
30 30
 					?>
31 31
                         
32 32
                         <li class='active'>
33
-                            <a href="<?= base_url() . "user/user_ipmap/"; ?>"><?php echo gettext('IP Settings')?></a>
33
+                            <a href="<?= base_url()."user/user_ipmap/"; ?>"><?php echo gettext('IP Settings')?></a>
34 34
                         </li>
35 35
                     </ul>
36 36
                 </div>
37
-                <?php if($accountinfo['type']==1) { ?>
37
+                <?php if ($accountinfo['type'] == 1) { ?>
38 38
                    <div class="pull-right">
39 39
                     <ul class="breadcrumb">
40 40
 		      <li class="active pull-right">
41
-		      <a href="<?= base_url() . "user/user_myprofile/"; ?>"> <i class="fa fa-fast-backward" aria-hidden="true"></i> Back</a></li>
41
+		      <a href="<?= base_url()."user/user_myprofile/"; ?>"> <i class="fa fa-fast-backward" aria-hidden="true"></i> Back</a></li>
42 42
                     </ul>
43 43
                    </div>
44 44
                 <?php }?>
Please login to merge, or discard this patch.
astpp/application/modules/user/views/view_user_subscriptions_list.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -23,24 +23,24 @@
 block discarded – undo
23 23
             <div class="col-md-12 no-padding color-three border_box"> 
24 24
                 <div class="pull-left">
25 25
                     <ul class="breadcrumb">
26
-                   <?php $accountinfo=$this->session->userdata('accountinfo');
27
-						  if($accountinfo['type']==1){ ?>
28
-                          <li><a href="<?= base_url() . "user/user_myprofile/"; ?>">My Profile</a></li>
29
-                          <?php } else{ ?>
26
+                   <?php $accountinfo = $this->session->userdata('accountinfo');
27
+						  if ($accountinfo['type'] == 1) { ?>
28
+                          <li><a href="<?= base_url()."user/user_myprofile/"; ?>">My Profile</a></li>
29
+                          <?php } else { ?>
30 30
 			    <li><a href="#"> <?php echo gettext('Billing')?></a></li>
31 31
                           <?php }
32 32
 					?>
33 33
                         
34 34
                         <li class='active'>
35
-                             <a href="<?= base_url() . "user/user_subscriptions/"; ?>"><?php echo gettext('Subscriptions')?> </a>
35
+                             <a href="<?= base_url()."user/user_subscriptions/"; ?>"><?php echo gettext('Subscriptions')?> </a>
36 36
                         </li>
37 37
                     </ul>
38 38
                 </div>
39
-                <?php if($accountinfo['type']==1) { ?>
39
+                <?php if ($accountinfo['type'] == 1) { ?>
40 40
                    <div class="pull-right">
41 41
                     <ul class="breadcrumb">
42 42
 		      <li class="active pull-right">
43
-		      <a href="<?= base_url() . "user/user_myprofile/"; ?>"> <i class="fa fa-fast-backward" aria-hidden="true"></i> Back</a></li>
43
+		      <a href="<?= base_url()."user/user_myprofile/"; ?>"> <i class="fa fa-fast-backward" aria-hidden="true"></i> Back</a></li>
44 44
                     </ul>
45 45
                    </div>
46 46
                 <?php }?>
Please login to merge, or discard this patch.