@@ -12,7 +12,7 @@ |
||
| 12 | 12 | <div class="w-section inverse no-padding"> |
| 13 | 13 | <?php echo $form; ?> |
| 14 | 14 | <?php |
| 15 | - if(isset($validation_errors) && $validation_errors != ''){ ?> |
|
| 15 | + if (isset($validation_errors) && $validation_errors != '') { ?> |
|
| 16 | 16 | <script> |
| 17 | 17 | var ERR_STR = '<?php echo $validation_errors; ?>'; |
| 18 | 18 | print_error(ERR_STR); |
@@ -26,9 +26,9 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | function user_model() { |
| 28 | 28 | parent::__construct(); |
| 29 | - if(Common_model::$global_config['system_config']['opensips']==0){ |
|
| 29 | + if (Common_model::$global_config['system_config']['opensips'] == 0) { |
|
| 30 | 30 | $db_config = Common_model::$global_config['system_config']; |
| 31 | - $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="; |
|
| 31 | + $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="; |
|
| 32 | 32 | $this->opensips_db = $this->load->database($opensipdsn, true); |
| 33 | 33 | } |
| 34 | 34 | } |
@@ -91,9 +91,9 @@ discard block |
||
| 91 | 91 | $this->db->select('count(id) as count'); |
| 92 | 92 | } |
| 93 | 93 | if ($flag) { |
| 94 | - if (isset($_GET['sortname']) && $_GET['sortname'] != 'undefined'){ |
|
| 95 | - $this->db->order_by($_GET['sortname'], ($_GET['sortorder']=='undefined')?'desc':$_GET['sortorder']); |
|
| 96 | - }else{ |
|
| 94 | + if (isset($_GET['sortname']) && $_GET['sortname'] != 'undefined') { |
|
| 95 | + $this->db->order_by($_GET['sortname'], ($_GET['sortorder'] == 'undefined') ? 'desc' : $_GET['sortorder']); |
|
| 96 | + } else { |
|
| 97 | 97 | $this->db->order_by('invoice_date', 'desc'); |
| 98 | 98 | } |
| 99 | 99 | } |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | } |
| 108 | 108 | } else { |
| 109 | 109 | if ($flag) { |
| 110 | - $query = (object) array('num_rows' => 0); |
|
| 110 | + $query = (object)array('num_rows' => 0); |
|
| 111 | 111 | } else { |
| 112 | 112 | $query = 0; |
| 113 | 113 | } |
@@ -117,13 +117,13 @@ discard block |
||
| 117 | 117 | |
| 118 | 118 | function get_user_charge_history($flag, $start = 0, $limit = 0) { |
| 119 | 119 | $this->db_model->build_search('user_charge_history_search'); |
| 120 | - $accountinfo=$this->session->userdata('accountinfo'); |
|
| 121 | - $where['accountid']=$accountinfo['id']; |
|
| 122 | - if($this->session->userdata('advance_search') != 1){ |
|
| 123 | - $where['created_date >=']=gmdate("Y-m-1 00:00:00"); |
|
| 124 | - $where['created_date <=']=gmdate("Y-m-d 23:59:59"); |
|
| 120 | + $accountinfo = $this->session->userdata('accountinfo'); |
|
| 121 | + $where['accountid'] = $accountinfo['id']; |
|
| 122 | + if ($this->session->userdata('advance_search') != 1) { |
|
| 123 | + $where['created_date >='] = gmdate("Y-m-1 00:00:00"); |
|
| 124 | + $where['created_date <='] = gmdate("Y-m-d 23:59:59"); |
|
| 125 | 125 | } |
| 126 | - $where['item_type <>']='STANDARD'; |
|
| 126 | + $where['item_type <>'] = 'STANDARD'; |
|
| 127 | 127 | if ($flag) { |
| 128 | 128 | $query = $this->db_model->select("*", "invoice_details", $where, "id", "DESC", $limit, $start); |
| 129 | 129 | } else { |
@@ -174,9 +174,9 @@ discard block |
||
| 174 | 174 | return true; |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | - function user_ipmap_list($flag,$limit='',$start=''){ |
|
| 178 | - $accountinfo=$this->session->userdata('accountinfo'); |
|
| 179 | - $where['accountid']=$accountinfo['id']; |
|
| 177 | + function user_ipmap_list($flag, $limit = '', $start = '') { |
|
| 178 | + $accountinfo = $this->session->userdata('accountinfo'); |
|
| 179 | + $where['accountid'] = $accountinfo['id']; |
|
| 180 | 180 | $this->db_model->build_search('user_ipmap_search'); |
| 181 | 181 | if ($flag) { |
| 182 | 182 | $query = $this->db_model->select("*", "ip_map", $where, "id", "ASC", $limit, $start); |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | } |
| 186 | 186 | return $query; |
| 187 | 187 | } |
| 188 | - function user_sipdevices_list($flag, $accountid = "",$start = "", $limit = "") { |
|
| 188 | + function user_sipdevices_list($flag, $accountid = "", $start = "", $limit = "") { |
|
| 189 | 189 | $where = array("accountid" => $accountid); |
| 190 | 190 | $this->db_model->build_search('user_sipdevices_search'); |
| 191 | 191 | $query = array(); |
@@ -220,11 +220,11 @@ discard block |
||
| 220 | 220 | return $query; |
| 221 | 221 | } |
| 222 | 222 | |
| 223 | - function user_sipdevice_info($edit_id){ |
|
| 223 | + function user_sipdevice_info($edit_id) { |
|
| 224 | 224 | $sipdevice_info = $this->db_model->getSelect("*", "sip_devices", array('id' => $edit_id)); |
| 225 | 225 | $sipdevice_arr = (array)$sipdevice_info->first_row(); |
| 226 | 226 | $vars = (array)json_decode($sipdevice_arr['dir_vars']); |
| 227 | - $params = (array)json_decode($sipdevice_arr['dir_params'],true); |
|
| 227 | + $params = (array)json_decode($sipdevice_arr['dir_params'], true); |
|
| 228 | 228 | $query = array('id' => $sipdevice_arr['id'], |
| 229 | 229 | 'fs_username' => $sipdevice_arr['username'], |
| 230 | 230 | 'accountcode' => $sipdevice_arr['accountid'], |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | 'fs_password' => $params['password']); |
| 241 | 241 | return $query; |
| 242 | 242 | } |
| 243 | - function user_sipdevice_add($add_array){ |
|
| 243 | + function user_sipdevice_add($add_array) { |
|
| 244 | 244 | $account_data = $this->session->userdata("accountinfo"); |
| 245 | 245 | $parms_array = array('password' => $add_array['fs_password'], |
| 246 | 246 | 'vm-enabled' => $add_array['voicemail_enabled'], |
@@ -260,12 +260,12 @@ discard block |
||
| 260 | 260 | 'status' => $add_array['status'], |
| 261 | 261 | 'dir_params' => json_encode($parms_array), |
| 262 | 262 | 'dir_vars' => json_encode($parms_array_vars), |
| 263 | - 'sip_profile_id' => $this->common->get_field_name('id','sip_profiles',array('name'=>'default'))); |
|
| 263 | + 'sip_profile_id' => $this->common->get_field_name('id', 'sip_profiles', array('name'=>'default'))); |
|
| 264 | 264 | $this->db->insert('sip_devices', $new_array); |
| 265 | 265 | $this->common->mail_to_users('add_sip_device', $account_data); |
| 266 | 266 | return true; |
| 267 | 267 | } |
| 268 | - function user_sipdevice_edit($add_array){ |
|
| 268 | + function user_sipdevice_edit($add_array) { |
|
| 269 | 269 | $parms_array = array('password' => $add_array['fs_password'], |
| 270 | 270 | 'vm-enabled' => $add_array['voicemail_enabled'], |
| 271 | 271 | 'vm-password' => $add_array['voicemail_password'], |
@@ -277,62 +277,62 @@ discard block |
||
| 277 | 277 | $parms_array_vars = array('effective_caller_id_name' => $add_array['effective_caller_id_name'], |
| 278 | 278 | 'effective_caller_id_number' => $add_array['effective_caller_id_number'],); |
| 279 | 279 | $log_type = $this->session->userdata("logintype"); |
| 280 | - if($log_type == 0 || $log_type == 3 || $log_type == 1){ |
|
| 281 | - $add_array['sip_profile_id']=$this->common->get_field_name('id','sip_profiles',array('name'=>'default')); |
|
| 280 | + if ($log_type == 0 || $log_type == 3 || $log_type == 1) { |
|
| 281 | + $add_array['sip_profile_id'] = $this->common->get_field_name('id', 'sip_profiles', array('name'=>'default')); |
|
| 282 | 282 | } |
| 283 | - $add_array['status'] = isset($add_array['status'])?$add_array['status']:"0"; |
|
| 284 | - $new_array = array('last_modified_date'=>gmdate('Y-m-d H:i:s'),'username' => $add_array['fs_username'],'status' => $add_array['status'], |
|
| 283 | + $add_array['status'] = isset($add_array['status']) ? $add_array['status'] : "0"; |
|
| 284 | + $new_array = array('last_modified_date'=>gmdate('Y-m-d H:i:s'), 'username' => $add_array['fs_username'], 'status' => $add_array['status'], |
|
| 285 | 285 | 'dir_params' => json_encode($parms_array), |
| 286 | 286 | 'dir_vars' => json_encode($parms_array_vars), 'sip_profile_id' => $add_array['sip_profile_id']); |
| 287 | - $this->db->update('sip_devices', $new_array,array('id'=>$add_array['id'])); |
|
| 287 | + $this->db->update('sip_devices', $new_array, array('id'=>$add_array['id'])); |
|
| 288 | 288 | return true; |
| 289 | 289 | } |
| 290 | - function getuser_cdrs_list($flag, $start, $limit,$export=true) { |
|
| 290 | + function getuser_cdrs_list($flag, $start, $limit, $export = true) { |
|
| 291 | 291 | $this->db_model->build_search('user_cdrs_report_search'); |
| 292 | 292 | $account_data = $this->session->userdata("accountinfo"); |
| 293 | - $field_name='debit'; |
|
| 294 | - if($account_data['type']==0 || $account_data['type']==1){ |
|
| 295 | - $where['accountid']=$account_data['id']; |
|
| 293 | + $field_name = 'debit'; |
|
| 294 | + if ($account_data['type'] == 0 || $account_data['type'] == 1) { |
|
| 295 | + $where['accountid'] = $account_data['id']; |
|
| 296 | 296 | |
| 297 | 297 | } |
| 298 | - if($account_data['type']==3){ |
|
| 299 | - $where['provider_id']=$account_data['id']; |
|
| 300 | - $field_name='cost'; |
|
| 298 | + if ($account_data['type'] == 3) { |
|
| 299 | + $where['provider_id'] = $account_data['id']; |
|
| 300 | + $field_name = 'cost'; |
|
| 301 | 301 | } |
| 302 | - $table_name=$account_data['type'] !=1 ? 'cdrs': 'reseller_cdrs'; |
|
| 303 | - if($this->session->userdata('advance_search') != 1){ |
|
| 304 | - $where['callstart >= ']=date("Y-m-d")." 00:00:00"; |
|
| 305 | - $where['callstart <=']=date("Y-m-d")." 23:59:59"; |
|
| 302 | + $table_name = $account_data['type'] != 1 ? 'cdrs' : 'reseller_cdrs'; |
|
| 303 | + if ($this->session->userdata('advance_search') != 1) { |
|
| 304 | + $where['callstart >= '] = date("Y-m-d")." 00:00:00"; |
|
| 305 | + $where['callstart <='] = date("Y-m-d")." 23:59:59"; |
|
| 306 | 306 | } |
| 307 | 307 | $this->db->where($where); |
| 308 | 308 | $this->db->order_by("callstart desc"); |
| 309 | 309 | if ($flag) { |
| 310 | - if (!$export) |
|
| 310 | + if ( ! $export) |
|
| 311 | 311 | $this->db->limit($limit, $start); |
| 312 | 312 | $this->db->select('callstart,callerid,callednum,pattern,notes,billseconds,disposition,debit,cost,accountid,pricelist_id,calltype,is_recording,trunk_id,uniqueid'); |
| 313 | - }else { |
|
| 313 | + } else { |
|
| 314 | 314 | $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'); |
| 315 | 315 | } |
| 316 | 316 | $result = $this->db->get($table_name); |
| 317 | 317 | return $result; |
| 318 | 318 | } |
| 319 | 319 | |
| 320 | - function user_fund_transfer($data){ |
|
| 320 | + function user_fund_transfer($data) { |
|
| 321 | 321 | $accountinfo = $this->session->userdata['accountinfo']; |
| 322 | - $data["payment_by"] = $accountinfo['reseller_id'] > 0 ? $accountinfo['reseller_id'] : -1 ; |
|
| 322 | + $data["payment_by"] = $accountinfo['reseller_id'] > 0 ? $accountinfo['reseller_id'] : -1; |
|
| 323 | 323 | $data['accountid'] = $data['id']; |
| 324 | 324 | $data['payment_mode'] = $data['payment_type']; |
| 325 | - unset($data['action'],$data['id'],$data['account_currency'],$data['payment_type']); |
|
| 325 | + unset($data['action'], $data['id'], $data['account_currency'], $data['payment_type']); |
|
| 326 | 326 | if (isset($data)) { |
| 327 | - $data['credit']=$data['credit'] =='' ? 0 : $data['credit']; |
|
| 327 | + $data['credit'] = $data['credit'] == '' ? 0 : $data['credit']; |
|
| 328 | 328 | $date = gmdate('Y-m-d H:i:s'); |
| 329 | - $accountid=$data['accountid']; |
|
| 330 | - while($accountid > 0 ){ |
|
| 331 | - $customer_id=$accountid; |
|
| 332 | - $accountid=$this->common_model->get_parent_info($accountid); |
|
| 333 | - $parent_id=$accountid > 0 ? $accountid : -1; |
|
| 334 | - $balance = $this->db_model->update_balance($data['credit'], $customer_id,$data['payment_mode']); |
|
| 335 | - if($data['payment_mode'] == 0){ |
|
| 329 | + $accountid = $data['accountid']; |
|
| 330 | + while ($accountid > 0) { |
|
| 331 | + $customer_id = $accountid; |
|
| 332 | + $accountid = $this->common_model->get_parent_info($accountid); |
|
| 333 | + $parent_id = $accountid > 0 ? $accountid : -1; |
|
| 334 | + $balance = $this->db_model->update_balance($data['credit'], $customer_id, $data['payment_mode']); |
|
| 335 | + if ($data['payment_mode'] == 0) { |
|
| 336 | 336 | $insert_arr = array("accountid" => $customer_id, |
| 337 | 337 | "credit" => $data['credit'], |
| 338 | 338 | 'payment_mode'=>$data['payment_mode'], |
@@ -348,28 +348,28 @@ discard block |
||
| 348 | 348 | } |
| 349 | 349 | function user_dashboard_recent_recharge_info() |
| 350 | 350 | { |
| 351 | - $accountinfo=$this->session->userdata('accountinfo'); |
|
| 352 | - $userlevel_logintype=$this->session->userdata('userlevel_logintype'); |
|
| 351 | + $accountinfo = $this->session->userdata('accountinfo'); |
|
| 352 | + $userlevel_logintype = $this->session->userdata('userlevel_logintype'); |
|
| 353 | 353 | |
| 354 | - $where_arr=array('payment_by'=>-1); |
|
| 355 | - if($userlevel_logintype == 1){ |
|
| 356 | - $where_arr=array('payment_by'=>$accountinfo['id']); |
|
| 354 | + $where_arr = array('payment_by'=>-1); |
|
| 355 | + if ($userlevel_logintype == 1) { |
|
| 356 | + $where_arr = array('payment_by'=>$accountinfo['id']); |
|
| 357 | 357 | } |
| 358 | - if($userlevel_logintype == 0 || $userlevel_logintype == 3){ |
|
| 359 | - $where_arr=array('accountid'=>$accountinfo['id']); |
|
| 358 | + if ($userlevel_logintype == 0 || $userlevel_logintype == 3) { |
|
| 359 | + $where_arr = array('accountid'=>$accountinfo['id']); |
|
| 360 | 360 | } |
| 361 | 361 | $this->db->where($where_arr); |
| 362 | 362 | $this->db->select('id,accountid,credit,payment_date,notes'); |
| 363 | 363 | $this->db->from('payments'); |
| 364 | 364 | $this->db->limit(10); |
| 365 | - $this->db->order_by('payment_date','desc'); |
|
| 365 | + $this->db->order_by('payment_date', 'desc'); |
|
| 366 | 366 | return $this->db->get(); |
| 367 | 367 | } |
| 368 | 368 | |
| 369 | 369 | function get_user_rates_list($flag, $start = 0, $limit = 0) { |
| 370 | 370 | $this->db_model->build_search('user_rates_list_search'); |
| 371 | 371 | $account_data = $this->session->userdata("accountinfo"); |
| 372 | - $where = array("pricelist_id" => $account_data["pricelist_id"],"status" => '0'); |
|
| 372 | + $where = array("pricelist_id" => $account_data["pricelist_id"], "status" => '0'); |
|
| 373 | 373 | if ($flag) { |
| 374 | 374 | $query = $this->db_model->select("*", "routes", $where, "id", "ASC", $limit, $start); |
| 375 | 375 | } else { |
@@ -378,42 +378,42 @@ discard block |
||
| 378 | 378 | return $query; |
| 379 | 379 | } |
| 380 | 380 | function get_user_opensips($flag, $account_number = "", $start = "0", $limit = "0") { |
| 381 | - $this->db_model->build_search_opensips($this->opensips_db,'user_opensips_search'); |
|
| 382 | - $this->opensips_db->where('accountcode',$account_number); |
|
| 381 | + $this->db_model->build_search_opensips($this->opensips_db, 'user_opensips_search'); |
|
| 382 | + $this->opensips_db->where('accountcode', $account_number); |
|
| 383 | 383 | if ($flag) { |
| 384 | - $this->opensips_db->limit($limit,$start); |
|
| 384 | + $this->opensips_db->limit($limit, $start); |
|
| 385 | 385 | } |
| 386 | 386 | $result = $this->opensips_db->get("subscriber"); |
| 387 | - if($result->num_rows() > 0){ |
|
| 388 | - if($flag){ |
|
| 387 | + if ($result->num_rows() > 0) { |
|
| 388 | + if ($flag) { |
|
| 389 | 389 | return $result; |
| 390 | 390 | } |
| 391 | - else{ |
|
| 391 | + else { |
|
| 392 | 392 | return $result->num_rows(); |
| 393 | 393 | } |
| 394 | - }else{ |
|
| 395 | - if($flag){ |
|
| 396 | - $result=(object)array('num_rows'=>0); |
|
| 394 | + } else { |
|
| 395 | + if ($flag) { |
|
| 396 | + $result = (object)array('num_rows'=>0); |
|
| 397 | 397 | } |
| 398 | - else{ |
|
| 399 | - $result=0; |
|
| 398 | + else { |
|
| 399 | + $result = 0; |
|
| 400 | 400 | } |
| 401 | 401 | return $result; |
| 402 | 402 | } |
| 403 | 403 | } |
| 404 | 404 | function user_opensips_add($data) { |
| 405 | 405 | unset($data["action"]); |
| 406 | - $data['creation_date']=gmdate("Y-m-d H:i:s"); |
|
| 407 | - $accountinfo=$this->session->userdata('accountinfo'); |
|
| 408 | - $data['reseller_id']=$accountinfo['type']==1 ? $accountinfo['id'] : 0; |
|
| 406 | + $data['creation_date'] = gmdate("Y-m-d H:i:s"); |
|
| 407 | + $accountinfo = $this->session->userdata('accountinfo'); |
|
| 408 | + $data['reseller_id'] = $accountinfo['type'] == 1 ? $accountinfo['id'] : 0; |
|
| 409 | 409 | $this->opensips_db->insert("subscriber", $data); |
| 410 | 410 | } |
| 411 | 411 | |
| 412 | 412 | function user_opensips_edit($data, $id) { |
| 413 | 413 | unset($data["action"]); |
| 414 | - $data=array("username"=>$data['username'],"password"=>$data['password'],"accountcode"=>$data['accountcode'],"domain"=>$data['domain']); |
|
| 414 | + $data = array("username"=>$data['username'], "password"=>$data['password'], "accountcode"=>$data['accountcode'], "domain"=>$data['domain']); |
|
| 415 | 415 | $this->opensips_db->where("id", $id); |
| 416 | - $data['last_modified_date']=gmdate("Y-m-d H:i:s"); |
|
| 416 | + $data['last_modified_date'] = gmdate("Y-m-d H:i:s"); |
|
| 417 | 417 | $this->opensips_db->update("subscriber", $data); |
| 418 | 418 | } |
| 419 | 419 | function user_opensips_delete($id) { |
@@ -421,12 +421,12 @@ discard block |
||
| 421 | 421 | $this->opensips_db->delete("subscriber"); |
| 422 | 422 | return true; |
| 423 | 423 | } |
| 424 | - function get_user_invoice_list($flag, $start = 0, $limit = 0){ |
|
| 424 | + function get_user_invoice_list($flag, $start = 0, $limit = 0) { |
|
| 425 | 425 | $this->db_model->build_search('user_invoice_list_search'); |
| 426 | - $accountinfo=$this->session->userdata('accountinfo'); |
|
| 427 | - $where = array("accountid" => $accountinfo['id'],'confirm'=>1); |
|
| 426 | + $accountinfo = $this->session->userdata('accountinfo'); |
|
| 427 | + $where = array("accountid" => $accountinfo['id'], 'confirm'=>1); |
|
| 428 | 428 | $this->db->where($where); |
| 429 | - $or_where= "(type='I' OR type='R')"; |
|
| 429 | + $or_where = "(type='I' OR type='R')"; |
|
| 430 | 430 | $this->db->where($or_where); |
| 431 | 431 | if ($flag) { |
| 432 | 432 | $query = $this->db_model->select("*", "invoices", "", "invoice_date", "desc", $limit, $start); |
@@ -437,7 +437,7 @@ discard block |
||
| 437 | 437 | |
| 438 | 438 | return $query; |
| 439 | 439 | } |
| 440 | - function get_user_cdrs_info($flag,$accountid,$start = 0, $limit = 0){ |
|
| 440 | + function get_user_cdrs_info($flag, $accountid, $start = 0, $limit = 0) { |
|
| 441 | 441 | if ($flag) { |
| 442 | 442 | $query = $this->db_model->select("*", "reseller_cdrs", "", "invoice_date", "desc", $limit, $start); |
| 443 | 443 | |
@@ -447,38 +447,38 @@ discard block |
||
| 447 | 447 | |
| 448 | 448 | } |
| 449 | 449 | function get_invoiceconf($accountid) { |
| 450 | - $return_array=array(); |
|
| 450 | + $return_array = array(); |
|
| 451 | 451 | $logintype = $this->session->userdata('logintype'); |
| 452 | 452 | if ($logintype == 1 || $logintype == 5) { |
| 453 | 453 | |
| 454 | 454 | $where = array("accountid" => $this->session->userdata["accountinfo"]['id']); |
| 455 | - }else{ |
|
| 456 | - $where=array('id'=> $accountid); |
|
| 455 | + } else { |
|
| 456 | + $where = array('id'=> $accountid); |
|
| 457 | 457 | } |
| 458 | - $query = $this->db_model->getSelect("*","invoice_conf",$where); |
|
| 459 | - foreach($query->result_array() as $key => $value) |
|
| 458 | + $query = $this->db_model->getSelect("*", "invoice_conf", $where); |
|
| 459 | + foreach ($query->result_array() as $key => $value) |
|
| 460 | 460 | { |
| 461 | - $return_array=$value; |
|
| 461 | + $return_array = $value; |
|
| 462 | 462 | } |
| 463 | 463 | return $return_array; |
| 464 | 464 | } |
| 465 | 465 | |
| 466 | 466 | |
| 467 | - function getprovider_cdrs_list($flag, $start, $limit,$export=true) { |
|
| 467 | + function getprovider_cdrs_list($flag, $start, $limit, $export = true) { |
|
| 468 | 468 | $this->db_model->build_search('user_provider_cdrs_report_search'); |
| 469 | 469 | $account_data = $this->session->userdata("accountinfo"); |
| 470 | - $where['provider_id']=$account_data['id']; |
|
| 471 | - if($this->session->userdata('advance_search') != 1){ |
|
| 472 | - $where['callstart >= ']=date("Y-m-d")." 00:00:00"; |
|
| 473 | - $where['callstart <=']=date("Y-m-d")." 23:59:59"; |
|
| 470 | + $where['provider_id'] = $account_data['id']; |
|
| 471 | + if ($this->session->userdata('advance_search') != 1) { |
|
| 472 | + $where['callstart >= '] = date("Y-m-d")." 00:00:00"; |
|
| 473 | + $where['callstart <='] = date("Y-m-d")." 23:59:59"; |
|
| 474 | 474 | } |
| 475 | 475 | $this->db->where($where); |
| 476 | - $this->db->order_by("callstart","desc"); |
|
| 476 | + $this->db->order_by("callstart", "desc"); |
|
| 477 | 477 | if ($flag) { |
| 478 | - if (!$export) |
|
| 478 | + if ( ! $export) |
|
| 479 | 479 | $this->db->limit($limit, $start); |
| 480 | 480 | $this->db->select('callstart,callerid,callednum,pattern,notes,billseconds,disposition,cost,accountid,pricelist_id,calltype,is_recording,trunk_id,uniqueid'); |
| 481 | - }else { |
|
| 481 | + } else { |
|
| 482 | 482 | $this->db->select('count(*) as count,sum(billseconds) as billseconds,sum(cost) as total_cost,group_concat(distinct(trunk_id)) as trunk_ids'); |
| 483 | 483 | } |
| 484 | 484 | $result = $this->db->get('cdrs'); |
@@ -31,17 +31,17 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | - function index(){ |
|
| 34 | + function index() { |
|
| 35 | 35 | $account_data = $this->session->userdata("accountinfo"); |
| 36 | 36 | $data["accountid"] = $account_data["id"]; |
| 37 | 37 | $data["accountid"] = $account_data["id"]; |
| 38 | 38 | $data["page_title"] = "Recharge"; |
| 39 | 39 | |
| 40 | 40 | $system_config = common_model::$global_config['system_config']; |
| 41 | - if($system_config["paypal_mode"]==0){ |
|
| 41 | + if ($system_config["paypal_mode"] == 0) { |
|
| 42 | 42 | $data["paypal_url"] = $system_config["paypal_url"]; |
| 43 | 43 | $data["paypal_email_id"] = $system_config["paypal_id"]; |
| 44 | - }else{ |
|
| 44 | + } else { |
|
| 45 | 45 | $data["paypal_url"] = $system_config["paypal_sandbox_url"]; |
| 46 | 46 | $data["paypal_email_id"] = $system_config["paypal_sandbox_id"]; |
| 47 | 47 | } |
@@ -49,12 +49,12 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | $data["from_currency"] = $this->common->get_field_name('currency', 'currency', $account_data["currency_id"]); |
| 51 | 51 | $data["to_currency"] = Common_model::$global_config['system_config']['base_currency']; |
| 52 | - $this->load->view("user_payment",$data); |
|
| 52 | + $this->load->view("user_payment", $data); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | - function convert_amount($amount){ |
|
| 56 | - $amount = $this->common_model->add_calculate_currency($amount,"","",true,false); |
|
| 57 | - echo number_format((float)$amount,2); |
|
| 55 | + function convert_amount($amount) { |
|
| 56 | + $amount = $this->common_model->add_calculate_currency($amount, "", "", true, false); |
|
| 57 | + echo number_format((float)$amount, 2); |
|
| 58 | 58 | } |
| 59 | 59 | } |
| 60 | 60 | ?> |
@@ -24,18 +24,18 @@ discard block |
||
| 24 | 24 | if ( ! defined('BASEPATH')) { |
| 25 | 25 | exit('No direct script access allowed'); |
| 26 | 26 | } |
| 27 | -class User_form{ |
|
| 27 | +class User_form { |
|
| 28 | 28 | function __construct($library_name = '') { |
| 29 | 29 | $this->CI = & get_instance(); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | |
| 33 | -function build_packages_list_for_user(){ |
|
| 33 | +function build_packages_list_for_user() { |
|
| 34 | 34 | $grid_field_arr = json_encode(array( |
| 35 | - array(gettext("Name"), "310", "package_name", "", "", "","","true","center"), |
|
| 36 | - array(gettext("Rate Group"), "250", "pricelist_id", "name", "pricelists", "get_field_name","","true","center"), |
|
| 37 | - array(gettext("Included Seconds"), "260", "includedseconds", "", "", "","","true","center"), |
|
| 38 | - array(gettext("Status"), "160", "status", "status", "status", "get_status","","true","center"), |
|
| 35 | + array(gettext("Name"), "310", "package_name", "", "", "", "", "true", "center"), |
|
| 36 | + array(gettext("Rate Group"), "250", "pricelist_id", "name", "pricelists", "get_field_name", "", "true", "center"), |
|
| 37 | + array(gettext("Included Seconds"), "260", "includedseconds", "", "", "", "", "true", "center"), |
|
| 38 | + array(gettext("Status"), "160", "status", "status", "status", "get_status", "", "true", "center"), |
|
| 39 | 39 | )); |
| 40 | 40 | return $grid_field_arr; |
| 41 | 41 | } |
@@ -53,22 +53,22 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | function build_emails_list_for_user() { |
| 55 | 55 | $grid_field_arr = json_encode(array( |
| 56 | - array(gettext("Date"), "110", "date", "", "", "","","true","center"), |
|
| 57 | - array(gettext("From"), "170", "from", "", "", "","","true","center"), |
|
| 58 | - array(gettext("Body"), "550", "body", "", "", "","","true","center"), |
|
| 59 | - array(gettext("Attachement"), "100", "attachment", "attachment", "attachment", "attachment_icons","","true","center"), |
|
| 60 | - array(gettext("Status"), "100", "status", "status", "status", "email_status","","true","center"), |
|
| 56 | + array(gettext("Date"), "110", "date", "", "", "", "", "true", "center"), |
|
| 57 | + array(gettext("From"), "170", "from", "", "", "", "", "true", "center"), |
|
| 58 | + array(gettext("Body"), "550", "body", "", "", "", "", "true", "center"), |
|
| 59 | + array(gettext("Attachement"), "100", "attachment", "attachment", "attachment", "attachment_icons", "", "true", "center"), |
|
| 60 | + array(gettext("Status"), "100", "status", "status", "status", "email_status", "", "true", "center"), |
|
| 61 | 61 | )); |
| 62 | 62 | return $grid_field_arr; |
| 63 | 63 | } |
| 64 | - function build_user_emails_search(){ |
|
| 64 | + function build_user_emails_search() { |
|
| 65 | 65 | $form['forms'] = array("", array('id' => "user_emails_search")); |
| 66 | 66 | $form['Search'] = array( |
| 67 | 67 | array(gettext('From Date'), 'INPUT', array('name' => 'date[]', 'id' => 'customer_cdr_from_date', 'size' => '20', |
| 68 | 68 | 'class' => "text field "), '', 'tOOL TIP', '', 'date[date-date]'), |
| 69 | 69 | array(gettext('To Date'), 'INPUT', array('name' => 'date[]', 'id' => 'customer_cdr_to_date', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '', 'date[date-date]'), |
| 70 | - array(gettext('From'), 'INPUT', array('name' => 'from[from]', '','id'=>'from', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '1', 'from[from-string]', '', '', '', 'search_string_type', ''), |
|
| 71 | - array(gettext('Body'), 'INPUT', array('name' => 'body[body]', '','id'=>'body', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '1', 'body[body-string]', '', '', '', 'search_string_type', ''), |
|
| 70 | + array(gettext('From'), 'INPUT', array('name' => 'from[from]', '', 'id'=>'from', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '1', 'from[from-string]', '', '', '', 'search_string_type', ''), |
|
| 71 | + array(gettext('Body'), 'INPUT', array('name' => 'body[body]', '', 'id'=>'body', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '1', 'body[body-string]', '', '', '', 'search_string_type', ''), |
|
| 72 | 72 | array('', 'HIDDEN', 'ajax_search', '1', '', '', ''), |
| 73 | 73 | array('', 'HIDDEN', 'advance_search', '1', '', '', '') |
| 74 | 74 | ); |
@@ -79,28 +79,28 @@ discard block |
||
| 79 | 79 | |
| 80 | 80 | function get_userprofile_form_fields($dataArr = false) { |
| 81 | 81 | if ($dataArr['id'] > 0) |
| 82 | - $val = 'accounts.email.' . $dataArr['id']; |
|
| 82 | + $val = 'accounts.email.'.$dataArr['id']; |
|
| 83 | 83 | else |
| 84 | 84 | $val = 'accounts.email'; |
| 85 | 85 | $uname = $this->CI->common->find_uniq_rendno(common_model::$global_config['system_config']['cardlength'], 'number', 'accounts'); |
| 86 | 86 | $password = $this->CI->common->generate_password(); |
| 87 | - $logintype=$this->CI->session->userdata('logintype'); |
|
| 88 | - $pin = ($logintype == '0')?array(gettext('Pin'), 'INPUT', array('name' => 'pin', 'size' => '20', 'class' => "text field medium"), 'tOOL TIP', ''):array('', 'HIDDEN', array('name' => 'Pin'), '', '', '', ''); |
|
| 89 | - $form['forms'] = array(base_url() . 'user/user_myprofile/', array("id" => "user_form", "name" => "user_form")); |
|
| 87 | + $logintype = $this->CI->session->userdata('logintype'); |
|
| 88 | + $pin = ($logintype == '0') ? array(gettext('Pin'), 'INPUT', array('name' => 'pin', 'size' => '20', 'class' => "text field medium"), 'tOOL TIP', '') : array('', 'HIDDEN', array('name' => 'Pin'), '', '', '', ''); |
|
| 89 | + $form['forms'] = array(base_url().'user/user_myprofile/', array("id" => "user_form", "name" => "user_form")); |
|
| 90 | 90 | |
| 91 | 91 | $form['User Profile'] = array( |
| 92 | 92 | array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''), |
| 93 | 93 | array('', 'HIDDEN', array('name' => 'type', 'value' => '0'), '', '', ''), |
| 94 | - array(gettext('Account Number'), 'INPUT', array('name' => 'number', 'value' => $uname, 'size' => '20', 'readonly' => true, 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'), |
|
| 94 | + array(gettext('Account Number'), 'INPUT', array('name' => 'number', 'value' => $uname, 'size' => '20', 'readonly' => true, 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'), |
|
| 95 | 95 | $pin, |
| 96 | 96 | array(gettext('Company'), 'INPUT', array('name' => 'company_name', 'size' => '15', 'class' => 'text field medium'), 'trim|xss_clean', 'tOOL TIP', ''), |
| 97 | - array(gettext('First Name'), 'INPUT', array('name' => 'first_name', 'id' => 'first_name', 'size' => '15', 'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter account number'), |
|
| 98 | - array(gettext('Last Name'), 'INPUT', array('name' => 'last_name', 'size' => '15', 'class' => "text field medium"), 'trim|alpha_dash|xss_clean', 'tOOL TIP', 'Please Enter Password'), |
|
| 99 | - array(gettext('Telephone 1'), 'INPUT', array('name' => 'telephone_1', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'), |
|
| 100 | - array(gettext('Telephone 2'), 'INPUT', array('name' => 'telephone_2', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'), |
|
| 101 | - array(gettext('Email'), 'INPUT', array('name' => 'email', 'size' => '50', 'class' => "text field medium"), 'required|valid_email|is_unique[' . $val . ']', 'tOOL TIP', 'Please Enter Password'), |
|
| 102 | - array(gettext('Address 1'), 'INPUT', array('name' => 'address_1', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'), |
|
| 103 | - array(gettext('Address 2'), 'INPUT', array('name' => 'address_2', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'), |
|
| 97 | + array(gettext('First Name'), 'INPUT', array('name' => 'first_name', 'id' => 'first_name', 'size' => '15', 'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter account number'), |
|
| 98 | + array(gettext('Last Name'), 'INPUT', array('name' => 'last_name', 'size' => '15', 'class' => "text field medium"), 'trim|alpha_dash|xss_clean', 'tOOL TIP', 'Please Enter Password'), |
|
| 99 | + array(gettext('Telephone 1'), 'INPUT', array('name' => 'telephone_1', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'), |
|
| 100 | + array(gettext('Telephone 2'), 'INPUT', array('name' => 'telephone_2', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'), |
|
| 101 | + array(gettext('Email'), 'INPUT', array('name' => 'email', 'size' => '50', 'class' => "text field medium"), 'required|valid_email|is_unique['.$val.']', 'tOOL TIP', 'Please Enter Password'), |
|
| 102 | + array(gettext('Address 1'), 'INPUT', array('name' => 'address_1', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'), |
|
| 103 | + array(gettext('Address 2'), 'INPUT', array('name' => 'address_2', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'), |
|
| 104 | 104 | array(gettext('City'), 'INPUT', array('name' => 'city', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'), |
| 105 | 105 | array(gettext('Province/State'), 'INPUT', array('name' => 'province', 'size' => '15', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter Password'), |
| 106 | 106 | array(gettext('Zip/Postal Code'), 'INPUT', array('name' => 'postal_code', 'size' => '15', 'class' => "text field medium"), 'trim|xss_clean', 'tOOL TIP', 'Please Enter Password'), |
@@ -113,63 +113,63 @@ discard block |
||
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | function get_userprofile_change_password() { |
| 116 | - $form['forms'] = array(base_url() . 'user/user_change_password/', array("id" => "customer_alert_threshold", "name" => "user_change_password")); |
|
| 116 | + $form['forms'] = array(base_url().'user/user_change_password/', array("id" => "customer_alert_threshold", "name" => "user_change_password")); |
|
| 117 | 117 | $form[gettext('Change Password')] = array( |
| 118 | 118 | array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''), |
| 119 | 119 | array(gettext('Old Password'), 'INPUT', array('name' => 'password', 'size' => '20', 'class' => "text field medium", 'id' => 'new_password'), 'required|password_check[accounts]', 'tOOL TIP', '', ''), |
| 120 | 120 | array(gettext('New Password'), 'INPUT', array('name' => 'new_password', 'size' => '20', 'class' => "text field medium", 'id' => 'new_password'), 'required|', 'tOOL TIP', '', ''), |
| 121 | - array(gettext('Confirm Password'), 'INPUT', array('name' => 'new_confirm_password', 'size' => '20', 'class' => "text field medium", 'id' => 'password'), "required|matches[new_password]", 'tOOL TIP', '', ''), |
|
| 121 | + array(gettext('Confirm Password'), 'INPUT', array('name' => 'new_confirm_password', 'size' => '20', 'class' => "text field medium", 'id' => 'password'), "required|matches[new_password]", 'tOOL TIP', '', ''), |
|
| 122 | 122 | ); |
| 123 | 123 | $form['button_save'] = array('name' => 'action', 'content' => gettext('Save'), 'value' => 'save', 'type' => 'submit', 'class' => 'btn btn-line-parrot'); |
| 124 | 124 | return $form; |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | - function build_user_invoices(){ |
|
| 127 | + function build_user_invoices() { |
|
| 128 | 128 | $account_info = $accountinfo = $this->CI->session->userdata('accountinfo'); |
| 129 | - $currency_id=$account_info['currency_id']; |
|
| 130 | - $currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id); |
|
| 131 | - $url=($this->CI->session->userdata('logintype')==0 )?"/user/user_invoice_download/":'/invoices/invoice_main_download/'; |
|
| 132 | - $grid_field_arr = json_encode(array( |
|
| 133 | - array(gettext("Number"),"110","id","id,'',type","invoices","build_concat_string","","true","center"), |
|
| 134 | - array(gettext("Type"),"100","id","id,'',type","invoices","build_concat_string","","true","center"), |
|
| 135 | - array(gettext("Generated Date"),"110","invoice_date","invoice_date","","get_invoice_date","","true","center"), |
|
| 136 | - array(gettext("From Date"),"100","from_date","from_date","","get_from_date","","true","center"), |
|
| 137 | - array(gettext("Due Date"),"100","","","","","","true","center"), |
|
| 138 | - array(gettext("Last Pay Date"),"100","","","","","","true","center"), |
|
| 139 | - array(gettext("Amount")."($currency)","100","id","id","id","get_invoice_total","","true","right"), |
|
| 140 | - array(gettext("Outstanding Amount")."<br>($currency)","150","","","","","","true","right"), |
|
| 141 | - array(gettext("Action"),"140","","","",array( |
|
| 142 | - "DOWNLOAD"=>array("url"=>$url,"mode"=>"single"), |
|
| 129 | + $currency_id = $account_info['currency_id']; |
|
| 130 | + $currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id); |
|
| 131 | + $url = ($this->CI->session->userdata('logintype') == 0) ? "/user/user_invoice_download/" : '/invoices/invoice_main_download/'; |
|
| 132 | + $grid_field_arr = json_encode(array( |
|
| 133 | + array(gettext("Number"), "110", "id", "id,'',type", "invoices", "build_concat_string", "", "true", "center"), |
|
| 134 | + array(gettext("Type"), "100", "id", "id,'',type", "invoices", "build_concat_string", "", "true", "center"), |
|
| 135 | + array(gettext("Generated Date"), "110", "invoice_date", "invoice_date", "", "get_invoice_date", "", "true", "center"), |
|
| 136 | + array(gettext("From Date"), "100", "from_date", "from_date", "", "get_from_date", "", "true", "center"), |
|
| 137 | + array(gettext("Due Date"), "100", "", "", "", "", "", "true", "center"), |
|
| 138 | + array(gettext("Last Pay Date"), "100", "", "", "", "", "", "true", "center"), |
|
| 139 | + array(gettext("Amount")."($currency)", "100", "id", "id", "id", "get_invoice_total", "", "true", "right"), |
|
| 140 | + array(gettext("Outstanding Amount")."<br>($currency)", "150", "", "", "", "", "", "true", "right"), |
|
| 141 | + array(gettext("Action"), "140", "", "", "", array( |
|
| 142 | + "DOWNLOAD"=>array("url"=>$url, "mode"=>"single"), |
|
| 143 | 143 | )) |
| 144 | 144 | )); |
| 145 | 145 | return $grid_field_arr; |
| 146 | 146 | } |
| 147 | 147 | function build_user_invoices_search() |
| 148 | 148 | { |
| 149 | - $form['forms'] = array("",array('id'=>"user_invoice_search")); |
|
| 149 | + $form['forms'] = array("", array('id'=>"user_invoice_search")); |
|
| 150 | 150 | $form['Search'] = array( |
| 151 | - array(gettext('From Date'), 'INPUT', array('name' => 'from_date[0]','id'=>'invoice_from_date','size' => '20', 'class' => "text field"), '', 'tOOL TIP', '', 'from_date[from_date-date]'), |
|
| 152 | - array(gettext('To Date'), 'INPUT', array('name' => 'to_date[1]','id'=>'invoice_to_date','size' => '20', 'class' => "text field"), '', 'tOOL TIP', '', 'to_date[to_date-date]'), |
|
| 151 | + array(gettext('From Date'), 'INPUT', array('name' => 'from_date[0]', 'id'=>'invoice_from_date', 'size' => '20', 'class' => "text field"), '', 'tOOL TIP', '', 'from_date[from_date-date]'), |
|
| 152 | + array(gettext('To Date'), 'INPUT', array('name' => 'to_date[1]', 'id'=>'invoice_to_date', 'size' => '20', 'class' => "text field"), '', 'tOOL TIP', '', 'to_date[to_date-date]'), |
|
| 153 | 153 | array(gettext('Amount'), 'INPUT', array('name' => 'amount[amount]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'amount[amount-string]', '', '', '', 'search_string_type', ''), |
| 154 | - array(gettext('Generated Date'), 'INPUT', array('name' => 'invoice_date[0]','','size' => '20', 'class' => "text field",'id'=>'invoice_date'), '', 'tOOL TIP', '', 'invoice_date[invoice_date-date]'), |
|
| 155 | - array('', 'HIDDEN', 'ajax_search','1', '', '', ''), |
|
| 156 | - array('', 'HIDDEN', 'advance_search','1', '', '', '')); |
|
| 157 | - $form['button_search'] = array('name' => 'action', 'id'=>"user_invoice_search_btn",'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right'); |
|
| 158 | - $form['button_reset'] = array('name' => 'action','id'=>"id_reset", 'content' => gettext('Clear'), 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10'); |
|
| 154 | + array(gettext('Generated Date'), 'INPUT', array('name' => 'invoice_date[0]', '', 'size' => '20', 'class' => "text field", 'id'=>'invoice_date'), '', 'tOOL TIP', '', 'invoice_date[invoice_date-date]'), |
|
| 155 | + array('', 'HIDDEN', 'ajax_search', '1', '', '', ''), |
|
| 156 | + array('', 'HIDDEN', 'advance_search', '1', '', '', '')); |
|
| 157 | + $form['button_search'] = array('name' => 'action', 'id'=>"user_invoice_search_btn", 'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right'); |
|
| 158 | + $form['button_reset'] = array('name' => 'action', 'id'=>"id_reset", 'content' => gettext('Clear'), 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10'); |
|
| 159 | 159 | return $form; |
| 160 | 160 | } |
| 161 | 161 | function build_user_charge_history() { |
| 162 | 162 | $account_info = $accountinfo = $this->CI->session->userdata('accountinfo'); |
| 163 | - $currency_id=$account_info['currency_id']; |
|
| 164 | - $currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id); |
|
| 163 | + $currency_id = $account_info['currency_id']; |
|
| 164 | + $currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id); |
|
| 165 | 165 | $grid_field_arr = json_encode(array( |
| 166 | 166 | array(gettext("Created Date"), "140", "created_date", "", "", ""), |
| 167 | - array(gettext("Invoice Number"), "120", "created_date", "", "", "","","true","center"), |
|
| 167 | + array(gettext("Invoice Number"), "120", "created_date", "", "", "", "", "true", "center"), |
|
| 168 | 168 | array(gettext("Charge Type"), "100", "item_type", "", "", ""), |
| 169 | - array(gettext("Before Balance")."<br/>($currency)", "120", "before_balance", "before_balance", "before_balance", "convert_to_currency","","true","right"), |
|
| 170 | - array(gettext("Debit")."<br/>($currency)", "120", "debit", "debit", "debit", "convert_to_currency","","true","right"), |
|
| 171 | - array(gettext("Credit")."<br/>($currency)", "120", "credit", "credit", "credit", "convert_to_currency","","true","right"), |
|
| 172 | - array(gettext("After Balance")."<br/>($currency)", "120", "after_balance", "after_balance", "after_balance", "convert_to_currency","","true","right"), |
|
| 169 | + array(gettext("Before Balance")."<br/>($currency)", "120", "before_balance", "before_balance", "before_balance", "convert_to_currency", "", "true", "right"), |
|
| 170 | + array(gettext("Debit")."<br/>($currency)", "120", "debit", "debit", "debit", "convert_to_currency", "", "true", "right"), |
|
| 171 | + array(gettext("Credit")."<br/>($currency)", "120", "credit", "credit", "credit", "convert_to_currency", "", "true", "right"), |
|
| 172 | + array(gettext("After Balance")."<br/>($currency)", "120", "after_balance", "after_balance", "after_balance", "convert_to_currency", "", "true", "right"), |
|
| 173 | 173 | array(gettext("Description"), "180", "description", "", "", ""), |
| 174 | 174 | )); |
| 175 | 175 | return $grid_field_arr; |
@@ -189,14 +189,14 @@ discard block |
||
| 189 | 189 | return $form; |
| 190 | 190 | } |
| 191 | 191 | |
| 192 | - function build_user_subscription(){ |
|
| 192 | + function build_user_subscription() { |
|
| 193 | 193 | $account_info = $accountinfo = $this->CI->session->userdata('accountinfo'); |
| 194 | - $currency_id=$account_info['currency_id']; |
|
| 195 | - $currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id); |
|
| 194 | + $currency_id = $account_info['currency_id']; |
|
| 195 | + $currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id); |
|
| 196 | 196 | $grid_field_arr = json_encode(array( |
| 197 | - array(gettext("Name"), "335", "description", "", "", "","","true","center"), |
|
| 198 | - array(gettext("Amount")."($currency)", "335", "charge", "charge", "charge", "convert_to_currency","","true","right"), |
|
| 199 | - array(gettext("Billing Cycle"), "335", "sweep_id", "sweep", "sweeplist", "get_field_name","","true","center"), |
|
| 197 | + array(gettext("Name"), "335", "description", "", "", "", "", "true", "center"), |
|
| 198 | + array(gettext("Amount")."($currency)", "335", "charge", "charge", "charge", "convert_to_currency", "", "true", "right"), |
|
| 199 | + array(gettext("Billing Cycle"), "335", "sweep_id", "sweep", "sweeplist", "get_field_name", "", "true", "center"), |
|
| 200 | 200 | )); |
| 201 | 201 | return $grid_field_arr; |
| 202 | 202 | } |
@@ -219,20 +219,20 @@ discard block |
||
| 219 | 219 | |
| 220 | 220 | function build_user_didlist() { |
| 221 | 221 | $account_info = $accountinfo = $this->CI->session->userdata('accountinfo'); |
| 222 | - $currency_id=$account_info['currency_id']; |
|
| 223 | - $currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id); |
|
| 222 | + $currency_id = $account_info['currency_id']; |
|
| 223 | + $currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id); |
|
| 224 | 224 | $grid_field_arr = json_encode(array( |
| 225 | - array(gettext("DID"), "105", "number", "", "", "","","true","center"), |
|
| 226 | - array(gettext("Country"), "90", "country_id", "country", "countrycode", "get_field_name","","true","center"), |
|
| 227 | - array(gettext("Per Minute<br/>Cost")."($currency)", "90", "cost", "cost", "cost", "convert_to_currency","","true","right"), |
|
| 228 | - array(gettext("Initial<br/>Increment"), "100", "init_inc", "", "", "","","true","center"), |
|
| 229 | - array(gettext("Increment"), "100", "inc", "", "", "","","true","center"), |
|
| 230 | - array(gettext("Setup<br/>Fee")."($currency)", "100", "setup", "setup", "setup", "convert_to_currency","","true","right"), |
|
| 231 | - array(gettext("Monthly<br/>Fee")."($currency)", "100", "monthlycost", "monthlycost", "monthlycost", "convert_to_currency","","true","right"), |
|
| 232 | - array(gettext("Call Type"), "105", "call_type", "call_type", "call_type", "get_call_type","","true","center"), |
|
| 233 | - array(gettext("Destination"), "153", "extensions", "", "", "","","true","center"), |
|
| 234 | - array(gettext("Status"), "90", "status", "status", "dids", "get_did_status","","true","center"), |
|
| 235 | - array(gettext("Modified <br/>Date"), "100", "last_modified_date", "last_modified_date", "last_modified_date", "convert_GMT_to","","true","center"), |
|
| 225 | + array(gettext("DID"), "105", "number", "", "", "", "", "true", "center"), |
|
| 226 | + array(gettext("Country"), "90", "country_id", "country", "countrycode", "get_field_name", "", "true", "center"), |
|
| 227 | + array(gettext("Per Minute<br/>Cost")."($currency)", "90", "cost", "cost", "cost", "convert_to_currency", "", "true", "right"), |
|
| 228 | + array(gettext("Initial<br/>Increment"), "100", "init_inc", "", "", "", "", "true", "center"), |
|
| 229 | + array(gettext("Increment"), "100", "inc", "", "", "", "", "true", "center"), |
|
| 230 | + array(gettext("Setup<br/>Fee")."($currency)", "100", "setup", "setup", "setup", "convert_to_currency", "", "true", "right"), |
|
| 231 | + array(gettext("Monthly<br/>Fee")."($currency)", "100", "monthlycost", "monthlycost", "monthlycost", "convert_to_currency", "", "true", "right"), |
|
| 232 | + array(gettext("Call Type"), "105", "call_type", "call_type", "call_type", "get_call_type", "", "true", "center"), |
|
| 233 | + array(gettext("Destination"), "153", "extensions", "", "", "", "", "true", "center"), |
|
| 234 | + array(gettext("Status"), "90", "status", "status", "dids", "get_did_status", "", "true", "center"), |
|
| 235 | + array(gettext("Modified <br/>Date"), "100", "last_modified_date", "last_modified_date", "last_modified_date", "convert_GMT_to", "", "true", "center"), |
|
| 236 | 236 | array(gettext("Action"), "80", "", "", "", array("EDIT" => array("url" => "/user/user_did_edit/", "mode" => "popup"), |
| 237 | 237 | "DELETE" => array("url" => "/user/user_dids_action/delete/", "mode" => "single"))) |
| 238 | 238 | )); |
@@ -245,11 +245,11 @@ discard block |
||
| 245 | 245 | array(gettext('DID'), 'INPUT', array('name' => 'number[number]', '', 'size' => '20', 'class' => "text field"), '', 'tOOL TIP', '1', 'number[number-string]', '', '', '', 'search_string_type', ''), |
| 246 | 246 | array(gettext('Country'), 'country_id', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', 'id', 'country', 'countrycode', 'build_dropdown', '', ''), |
| 247 | 247 | array(gettext('Initial Increment'), 'INPUT', array('name' => 'init_inc[init_inc]', '', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '1', 'init_inc[init_inc-integer]', '', '', '', 'search_int_type', ''), |
| 248 | - array(gettext('Call Type'), 'call_type', 'SELECT', '', '', 'tOOL TIP', '', '', '', '', 'set_call_type_search', '',''), |
|
| 248 | + array(gettext('Call Type'), 'call_type', 'SELECT', '', '', 'tOOL TIP', '', '', '', '', 'set_call_type_search', '', ''), |
|
| 249 | 249 | array(gettext('Destination'), 'INPUT', array('name' => 'extensions[extensions]', '', 'size' => '20', 'class' => "text field"), '', 'tOOL TIP', '1', 'extensions[extensions-string]', '', '', '', 'search_string_type', ''), |
| 250 | 250 | |
| 251 | 251 | array(gettext('Status'), 'status', 'SELECT', '', '', 'tOOL TIP', 'Please Enter account number', '', '', '', 'set_search_status', '', ''), |
| 252 | - array('', 'HIDDEN', 'ajax_search', '1', '', '', ''),array('', 'HIDDEN', 'advance_search', '1', '', '', '') |
|
| 252 | + array('', 'HIDDEN', 'ajax_search', '1', '', '', ''), array('', 'HIDDEN', 'advance_search', '1', '', '', '') |
|
| 253 | 253 | ); |
| 254 | 254 | |
| 255 | 255 | $form['button_search'] = array('name' => 'action', 'id' => "user_did_search_btn", 'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right'); |
@@ -260,10 +260,10 @@ discard block |
||
| 260 | 260 | |
| 261 | 261 | function build_user_ipmap() { |
| 262 | 262 | $grid_field_arr = json_encode(array( |
| 263 | - array(gettext("Name"), "240", "name", "", "", "","","true","center"), |
|
| 264 | - array(gettext("IP"), "240", "ip", "", "", "","","true","center"), |
|
| 265 | - array(gettext("Prefix"), "220", "prefix", "", "", "","","true","center"), |
|
| 266 | - array(gettext("Created Date"), "174", "created_date", "created_date", "created_date", "convert_GMT_to","","true","center"), |
|
| 263 | + array(gettext("Name"), "240", "name", "", "", "", "", "true", "center"), |
|
| 264 | + array(gettext("IP"), "240", "ip", "", "", "", "", "true", "center"), |
|
| 265 | + array(gettext("Prefix"), "220", "prefix", "", "", "", "", "true", "center"), |
|
| 266 | + array(gettext("Created Date"), "174", "created_date", "created_date", "created_date", "convert_GMT_to", "", "true", "center"), |
|
| 267 | 267 | array(gettext("Action"), "150", "", "", "", array("DELETE" => array("url" => "user/user_ipmap_action/delete/", "mode" => "single"))) |
| 268 | 268 | )); |
| 269 | 269 | return $grid_field_arr; |
@@ -283,27 +283,27 @@ discard block |
||
| 283 | 283 | return $form; |
| 284 | 284 | } |
| 285 | 285 | |
| 286 | - function build_user_sipdevices(){ |
|
| 286 | + function build_user_sipdevices() { |
|
| 287 | 287 | $grid_field_arr = json_encode(array( |
| 288 | - array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "", "", "","","false","center"), |
|
| 289 | - array(gettext("User Name"), "105", "username", "", "", "","","true","center"), |
|
| 290 | - array(gettext("Password"), "105", "password", "", "", "","","true","center"), |
|
| 291 | - array(gettext("Caller Name"), "110", "effective_caller_id_name", "", "", "","","true","center"), |
|
| 292 | - array(gettext("Caller Number"), "110", "effective_caller_id_number", "", "", "","","true","center"), |
|
| 293 | - array(gettext("Status"), "125", "status", "", "", "","","true","center"), |
|
| 294 | - array(gettext("Created Date"), "110", "creation_date", "creation_date", "creation_date", "convert_GMT_to","","true","center"), |
|
| 295 | - array(gettext("Modified Date"), "130", "last_modified_date", "last_modified_date", "last_modified_date", "convert_GMT_to","","true","center"), |
|
| 296 | - array(gettext("Voicemail"), "90", "voicemail_enabled", "", "", "","","true","center"), |
|
| 297 | - array(gettext("Action"), "110", "", "", "", array("EDIT" => array("url" => "/accounts/fssipdevices_action/edit/", "mode" => "single","layout"=>"medium"), |
|
| 288 | + array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "", "", "", "", "false", "center"), |
|
| 289 | + array(gettext("User Name"), "105", "username", "", "", "", "", "true", "center"), |
|
| 290 | + array(gettext("Password"), "105", "password", "", "", "", "", "true", "center"), |
|
| 291 | + array(gettext("Caller Name"), "110", "effective_caller_id_name", "", "", "", "", "true", "center"), |
|
| 292 | + array(gettext("Caller Number"), "110", "effective_caller_id_number", "", "", "", "", "true", "center"), |
|
| 293 | + array(gettext("Status"), "125", "status", "", "", "", "", "true", "center"), |
|
| 294 | + array(gettext("Created Date"), "110", "creation_date", "creation_date", "creation_date", "convert_GMT_to", "", "true", "center"), |
|
| 295 | + array(gettext("Modified Date"), "130", "last_modified_date", "last_modified_date", "last_modified_date", "convert_GMT_to", "", "true", "center"), |
|
| 296 | + array(gettext("Voicemail"), "90", "voicemail_enabled", "", "", "", "", "true", "center"), |
|
| 297 | + array(gettext("Action"), "110", "", "", "", array("EDIT" => array("url" => "/accounts/fssipdevices_action/edit/", "mode" => "single", "layout"=>"medium"), |
|
| 298 | 298 | "DELETE" => array("url" => "/accounts/fssipdevices_action/delete/", "mode" => "single"))) |
| 299 | 299 | )); |
| 300 | 300 | return $grid_field_arr; |
| 301 | 301 | } |
| 302 | 302 | |
| 303 | - function build_user_sipdevices_search(){ |
|
| 303 | + function build_user_sipdevices_search() { |
|
| 304 | 304 | $form['forms'] = array("", array('id' => "user_sipdevices_search")); |
| 305 | 305 | $form['Search'] = array( |
| 306 | - array(gettext('Username'), 'INPUT', array('name' => 'username[username]', '', 'size' => '20', 'class' => "text field"), '', 'tOOL TIP', '1', 'username[username-string]', '', '', '', 'search_string_type', ''), |
|
| 306 | + array(gettext('Username'), 'INPUT', array('name' => 'username[username]', '', 'size' => '20', 'class' => "text field"), '', 'tOOL TIP', '1', 'username[username-string]', '', '', '', 'search_string_type', ''), |
|
| 307 | 307 | array('', 'HIDDEN', 'ajax_search', '1', '', '', ''), |
| 308 | 308 | array('', 'HIDDEN', 'advance_search', '1', '', '', ''), |
| 309 | 309 | ); |
@@ -312,17 +312,17 @@ discard block |
||
| 312 | 312 | return $form; |
| 313 | 313 | } |
| 314 | 314 | |
| 315 | - function build_user_sipdevices_form($id=''){ |
|
| 316 | - $val=$id > 0 ? 'sip_devices.username.'.$id : 'sip_devices.username'; |
|
| 315 | + function build_user_sipdevices_form($id = '') { |
|
| 316 | + $val = $id > 0 ? 'sip_devices.username.'.$id : 'sip_devices.username'; |
|
| 317 | 317 | $uname_user = $this->CI->common->find_uniq_rendno('10', '', ''); |
| 318 | 318 | $password = $this->CI->common->generate_password(); |
| 319 | - $form['forms'] = array(base_url() . 'user/user_sipdevices_save/', array("id" => "user_sipdevices_form", "name" => "user_sipdevices_form")); |
|
| 319 | + $form['forms'] = array(base_url().'user/user_sipdevices_save/', array("id" => "user_sipdevices_form", "name" => "user_sipdevices_form")); |
|
| 320 | 320 | $form[gettext('Device Information')] = array( |
| 321 | 321 | array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''), |
| 322 | - array(gettext('Username'), 'INPUT', array('name' => 'fs_username', 'size' => '20', 'value'=>$uname_user,'id'=>'username', 'class' => "text field medium"), 'trim|required|is_unique['.$val.']|xss_clean', 'tOOL TIP', 'Please Enter account number','<i style="color: #1BCB61;font-size: 14px;padding-left: 5px;padding-top: 8px;float: left;" title="Reset Password" class="change_number fa fa-refresh"></i>'), |
|
| 323 | - array(gettext('Password'), 'INPUT', array('name' => 'fs_password', 'size' => '20', 'value'=>$password ,'id'=>'password','class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter Password','<i style="color: #1BCB61;font-size: 14px;padding-left: 5px;padding-top: 8px;float: left;" title="Reset Password" class="change_pass fa fa-refresh"></i>'), |
|
| 324 | - array(gettext('Caller Name'), 'INPUT', array('name' => 'effective_caller_id_name', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'), |
|
| 325 | - array(gettext('Caller Number'), 'INPUT', array('name' => 'effective_caller_id_number', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'), |
|
| 322 | + array(gettext('Username'), 'INPUT', array('name' => 'fs_username', 'size' => '20', 'value'=>$uname_user, 'id'=>'username', 'class' => "text field medium"), 'trim|required|is_unique['.$val.']|xss_clean', 'tOOL TIP', 'Please Enter account number', '<i style="color: #1BCB61;font-size: 14px;padding-left: 5px;padding-top: 8px;float: left;" title="Reset Password" class="change_number fa fa-refresh"></i>'), |
|
| 323 | + array(gettext('Password'), 'INPUT', array('name' => 'fs_password', 'size' => '20', 'value'=>$password, 'id'=>'password', 'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter Password', '<i style="color: #1BCB61;font-size: 14px;padding-left: 5px;padding-top: 8px;float: left;" title="Reset Password" class="change_pass fa fa-refresh"></i>'), |
|
| 324 | + array(gettext('Caller Name'), 'INPUT', array('name' => 'effective_caller_id_name', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'), |
|
| 325 | + array(gettext('Caller Number'), 'INPUT', array('name' => 'effective_caller_id_number', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'), |
|
| 326 | 326 | array(gettext('Status'), 'status', 'SELECT', '', '', 'tOOL TIP', 'Please Select Status', '', '', '', 'set_status'), |
| 327 | 327 | ); |
| 328 | 328 | |
@@ -341,7 +341,7 @@ discard block |
||
| 341 | 341 | } |
| 342 | 342 | |
| 343 | 343 | function build_user_animap() { |
| 344 | - $grid_field_arr = json_encode(array(array(gettext("Caller ID"), "735", "number", "", "", "","","true","center"), |
|
| 344 | + $grid_field_arr = json_encode(array(array(gettext("Caller ID"), "735", "number", "", "", "", "", "true", "center"), |
|
| 345 | 345 | array(gettext("Action"), "275", "", "", "", array("DELETE" => array("url" => "user/user_animap_action/delete/", "mode" => "single"))) |
| 346 | 346 | )); |
| 347 | 347 | return $grid_field_arr; |
@@ -349,22 +349,22 @@ discard block |
||
| 349 | 349 | |
| 350 | 350 | function user_rates_list_buttons() { |
| 351 | 351 | $buttons_json = json_encode(array( |
| 352 | - array(gettext("Export CSV"),"btn btn-xing" ,"fa fa-download fa-lg", "button_action", "/user/user_rates_list_export/", 'single') |
|
| 352 | + array(gettext("Export CSV"), "btn btn-xing", "fa fa-download fa-lg", "button_action", "/user/user_rates_list_export/", 'single') |
|
| 353 | 353 | )); |
| 354 | 354 | return $buttons_json; |
| 355 | 355 | } |
| 356 | 356 | |
| 357 | 357 | function user_rates_list() { |
| 358 | 358 | $account_info = $accountinfo = $this->CI->session->userdata('accountinfo'); |
| 359 | - $currency_id=$account_info['currency_id']; |
|
| 360 | - $currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id); |
|
| 361 | - $grid_field_arr = json_encode(array(array(gettext("Code"), "155", "pattern", "pattern", "", "get_only_numeric_val","","true","center"), |
|
| 362 | - array(gettext("Destination"), "200", "comment", "", "", "","","true","center"), |
|
| 363 | - array(gettext("Connect Cost")."($currency)", "200", "connectcost", "", "", "","","true","right"), |
|
| 364 | - array(gettext("Included Seconds"), "200", "includedseconds", "", "", "","","true","center"), |
|
| 365 | - array(gettext("Per Minute Cost")."($currency)", "200", "cost", "", "", "","","true","right"), |
|
| 366 | - array(gettext("Initial Increment"), "130", "init_inc", "", "", "","","true","center"), |
|
| 367 | - array(gettext("Increment"), "180", "inc", "", "", "","","true","center") |
|
| 359 | + $currency_id = $account_info['currency_id']; |
|
| 360 | + $currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id); |
|
| 361 | + $grid_field_arr = json_encode(array(array(gettext("Code"), "155", "pattern", "pattern", "", "get_only_numeric_val", "", "true", "center"), |
|
| 362 | + array(gettext("Destination"), "200", "comment", "", "", "", "", "true", "center"), |
|
| 363 | + array(gettext("Connect Cost")."($currency)", "200", "connectcost", "", "", "", "", "true", "right"), |
|
| 364 | + array(gettext("Included Seconds"), "200", "includedseconds", "", "", "", "", "true", "center"), |
|
| 365 | + array(gettext("Per Minute Cost")."($currency)", "200", "cost", "", "", "", "", "true", "right"), |
|
| 366 | + array(gettext("Initial Increment"), "130", "init_inc", "", "", "", "", "true", "center"), |
|
| 367 | + array(gettext("Increment"), "180", "inc", "", "", "", "", "true", "center") |
|
| 368 | 368 | )); |
| 369 | 369 | return $grid_field_arr; |
| 370 | 370 | } |
@@ -389,8 +389,8 @@ discard block |
||
| 389 | 389 | return $form; |
| 390 | 390 | } |
| 391 | 391 | |
| 392 | - function user_alert_threshold(){ |
|
| 393 | - $form['forms'] = array(base_url() . 'user/user_alert_threshold/', array("id" => "customer_alert_threshold", "name" => "customer_alert_threshold")); |
|
| 392 | + function user_alert_threshold() { |
|
| 393 | + $form['forms'] = array(base_url().'user/user_alert_threshold/', array("id" => "customer_alert_threshold", "name" => "customer_alert_threshold")); |
|
| 394 | 394 | $form[gettext('Low Balance Alert Email')] = array( |
| 395 | 395 | array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''), |
| 396 | 396 | array(gettext('Enable Email Alerts ?'), 'notify_flag', 'SELECT', '', '', 'tOOL TIP', '', '', '', '', 'custom_status'), |
@@ -402,34 +402,34 @@ discard block |
||
| 402 | 402 | } |
| 403 | 403 | function build_cdrs_report($type) { |
| 404 | 404 | $account_info = $accountinfo = $this->CI->session->userdata('accountinfo'); |
| 405 | - $currency_id=$account_info['currency_id']; |
|
| 406 | - $currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id); |
|
| 405 | + $currency_id = $account_info['currency_id']; |
|
| 406 | + $currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id); |
|
| 407 | 407 | |
| 408 | - if($type == '0' || $type =='1'){ |
|
| 409 | - $cost_array=array(gettext("Debit")."($currency)", "140", "debit", "debit", "debit", "convert_to_currency","","true","right"); |
|
| 408 | + if ($type == '0' || $type == '1') { |
|
| 409 | + $cost_array = array(gettext("Debit")."($currency)", "140", "debit", "debit", "debit", "convert_to_currency", "", "true", "right"); |
|
| 410 | 410 | } |
| 411 | - if($type =='3'){ |
|
| 412 | - $cost_array=array(gettext("Debit")."($currency)", "140", "cost", "cost", "cost", "convert_to_currency","","true","right"); |
|
| 411 | + if ($type == '3') { |
|
| 412 | + $cost_array = array(gettext("Debit")."($currency)", "140", "cost", "cost", "cost", "convert_to_currency", "", "true", "right"); |
|
| 413 | 413 | } |
| 414 | 414 | $grid_field_arr = json_encode(array( |
| 415 | - array(gettext("Date"), "170", "callstart", "callstart", "callstart", "convert_GMT_to","","true","center"), |
|
| 416 | - array(gettext("Caller ID"), "110", "callerid", "", "", "","","true","center"), |
|
| 417 | - array(gettext("Called Number"), "160", "callednum", "", "", "","","true","center"), |
|
| 418 | - array(gettext("Destination"), "160", "notes", "", "", "","","true","center"), |
|
| 419 | - array(gettext("Duration"), "140", "billseconds", "user_cdrs_report_search", "billseconds", "convert_to_show_in","","true","center"), |
|
| 415 | + array(gettext("Date"), "170", "callstart", "callstart", "callstart", "convert_GMT_to", "", "true", "center"), |
|
| 416 | + array(gettext("Caller ID"), "110", "callerid", "", "", "", "", "true", "center"), |
|
| 417 | + array(gettext("Called Number"), "160", "callednum", "", "", "", "", "true", "center"), |
|
| 418 | + array(gettext("Destination"), "160", "notes", "", "", "", "", "true", "center"), |
|
| 419 | + array(gettext("Duration"), "140", "billseconds", "user_cdrs_report_search", "billseconds", "convert_to_show_in", "", "true", "center"), |
|
| 420 | 420 | $cost_array, |
| 421 | - array(gettext("Disposition"), "160", "disposition", "", "", "","","true","center"), |
|
| 422 | - array(gettext("Call Type"), "233", "calltype", "", "", "","","true","center"), |
|
| 421 | + array(gettext("Disposition"), "160", "disposition", "", "", "", "", "true", "center"), |
|
| 422 | + array(gettext("Call Type"), "233", "calltype", "", "", "", "", "true", "center"), |
|
| 423 | 423 | )); |
| 424 | 424 | return $grid_field_arr; |
| 425 | 425 | } |
| 426 | 426 | |
| 427 | 427 | function build_cdrs_report_search($type) { |
| 428 | - if($type == '0' || $type =='1'){ |
|
| 429 | - $cost_array=array(gettext('Debit'), 'INPUT', array('name' => 'debit[debit]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'debit[debit-integer]', '', '', '', 'search_int_type', ''); |
|
| 428 | + if ($type == '0' || $type == '1') { |
|
| 429 | + $cost_array = array(gettext('Debit'), 'INPUT', array('name' => 'debit[debit]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'debit[debit-integer]', '', '', '', 'search_int_type', ''); |
|
| 430 | 430 | } |
| 431 | - if($type =='3'){ |
|
| 432 | - $cost_array=array(gettext('Debit'), 'INPUT', array('name' => 'cost[cost]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'cost[cost-integer]', '', '', '', 'search_int_type', ''); |
|
| 431 | + if ($type == '3') { |
|
| 432 | + $cost_array = array(gettext('Debit'), 'INPUT', array('name' => 'cost[cost]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'cost[cost-integer]', '', '', '', 'search_int_type', ''); |
|
| 433 | 433 | } |
| 434 | 434 | $form['forms'] = array("", array('id' => "user_cdrs_report_search")); |
| 435 | 435 | $form['Search'] = array( |
@@ -445,25 +445,25 @@ discard block |
||
| 445 | 445 | array('', 'HIDDEN', 'ajax_search', '1', '', '', ''), |
| 446 | 446 | array('', 'HIDDEN', 'advance_search', '1', '', '', '') |
| 447 | 447 | ); |
| 448 | - $form['display_in']=array('name' => 'search_in',"id"=>"search_in","function"=>"search_report_in", "content"=>gettext("Display records in"),'label_class' => "search_label col-md-3 no-padding","dropdown_class"=>"form-control","label_style"=>"font-size:13px;","dropdown_style"=>"background: #ddd; width: 21% !important;"); |
|
| 448 | + $form['display_in'] = array('name' => 'search_in', "id"=>"search_in", "function"=>"search_report_in", "content"=>gettext("Display records in"), 'label_class' => "search_label col-md-3 no-padding", "dropdown_class"=>"form-control", "label_style"=>"font-size:13px;", "dropdown_style"=>"background: #ddd; width: 21% !important;"); |
|
| 449 | 449 | $form['button_search'] = array('name' => 'action', 'id' => "user_cdr_search_btn", 'content' => gettext('Search'), 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right'); |
| 450 | 450 | $form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => gettext('Clear'), 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10'); |
| 451 | 451 | return $form; |
| 452 | 452 | } |
| 453 | 453 | function build_cdrs_report_buttons() { |
| 454 | - $buttons_json = json_encode(array(array(gettext("Export"),"btn btn-xing" ," fa fa-download fa-lg", "button_action", "/user/user_report_export/", 'single'))); |
|
| 454 | + $buttons_json = json_encode(array(array(gettext("Export"), "btn btn-xing", " fa fa-download fa-lg", "button_action", "/user/user_report_export/", 'single'))); |
|
| 455 | 455 | return $buttons_json; |
| 456 | 456 | } |
| 457 | 457 | |
| 458 | - function build_user_refill_report(){ |
|
| 458 | + function build_user_refill_report() { |
|
| 459 | 459 | $account_info = $accountinfo = $this->CI->session->userdata('accountinfo'); |
| 460 | - $currency_id=$account_info['currency_id']; |
|
| 461 | - $currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id); |
|
| 460 | + $currency_id = $account_info['currency_id']; |
|
| 461 | + $currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id); |
|
| 462 | 462 | $grid_field_arr = json_encode(array( |
| 463 | - array(gettext("Date"), "220", "payment_date", "", "", "","","true","center"), |
|
| 464 | - array(gettext("Amount")."($currency)", "220", "credit", "credit", "credit", "convert_to_currency","","true","right"), |
|
| 465 | - array(gettext("Refill By"), "270", "payment_by", "payment_by", "payment_by", "get_refill_by","","true","center"), |
|
| 466 | - array(gettext("Note"), "300", "notes", "", "", "","","true","center") |
|
| 463 | + array(gettext("Date"), "220", "payment_date", "", "", "", "", "true", "center"), |
|
| 464 | + array(gettext("Amount")."($currency)", "220", "credit", "credit", "credit", "convert_to_currency", "", "true", "right"), |
|
| 465 | + array(gettext("Refill By"), "270", "payment_by", "payment_by", "payment_by", "get_refill_by", "", "true", "center"), |
|
| 466 | + array(gettext("Note"), "300", "notes", "", "", "", "", "true", "center") |
|
| 467 | 467 | )); |
| 468 | 468 | return $grid_field_arr; |
| 469 | 469 | } |
@@ -483,14 +483,14 @@ discard block |
||
| 483 | 483 | } |
| 484 | 484 | |
| 485 | 485 | function build_user_fund_transfer_form($number, $currency_id, $id) { |
| 486 | - $form['forms'] = array(base_url() . 'user/user_fund_transfer_save/', array('id' => 'user_fund_transfer_form', 'method' => 'POST','class'=>'build_user_fund_transfer_frm' ,'name' => 'user_fund_transfer_form')); |
|
| 486 | + $form['forms'] = array(base_url().'user/user_fund_transfer_save/', array('id' => 'user_fund_transfer_form', 'method' => 'POST', 'class'=>'build_user_fund_transfer_frm', 'name' => 'user_fund_transfer_form')); |
|
| 487 | 487 | $form[gettext('Fund Transfer')] = array( |
| 488 | 488 | array('', 'HIDDEN', array('name' => 'id', 'value' => $id), '', '', '', ''), |
| 489 | 489 | array('', 'HIDDEN', array('name' => 'account_currency', 'value' => $currency_id), '', '', ''), |
| 490 | 490 | array(gettext('From Account'), 'INPUT', array('name' => 'fromaccountid', 'size' => '20', 'value' => $number, 'readonly' => true, 'class' => "text field medium"), 'required', 'tOOL TIP', 'Please Enter account number'), |
| 491 | 491 | array(gettext('To Account'), 'INPUT', array('name' => 'toaccountid', 'size' => '20', 'class' => "text field medium"), 'trim|required|numeric', 'tOOL TIP', 'Please Enter to account number'), |
| 492 | - array(gettext('Amount'), 'INPUT', array('name' => 'credit', 'size' => '20', 'class' => "text field medium"), 'trim|required|numeric', 'tOOL TIP', ''), |
|
| 493 | - array(gettext('Note'), 'TEXTAREA', array('name' => 'notes', 'size' => '20', 'cols' => '63', 'rows' => '5', 'class' => "form-control col-md-5 text field medium",'style'=>'height: 80px;'), '', 'tOOL TIP', '') |
|
| 492 | + array(gettext('Amount'), 'INPUT', array('name' => 'credit', 'size' => '20', 'class' => "text field medium"), 'trim|required|numeric', 'tOOL TIP', ''), |
|
| 493 | + array(gettext('Note'), 'TEXTAREA', array('name' => 'notes', 'size' => '20', 'cols' => '63', 'rows' => '5', 'class' => "form-control col-md-5 text field medium", 'style'=>'height: 80px;'), '', 'tOOL TIP', '') |
|
| 494 | 494 | ); |
| 495 | 495 | $form['button_save'] = array('name' => 'action', 'content' => 'Transfer', 'value' => gettext('save'), 'id' => "submit", 'type' => 'submit', 'class' => 'btn btn-line-parrot'); |
| 496 | 496 | return $form; |
@@ -505,10 +505,10 @@ discard block |
||
| 505 | 505 | } |
| 506 | 506 | function build_user_opensips() { |
| 507 | 507 | $grid_field_arr = json_encode(array( |
| 508 | - array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "", "", "","","false","center"), |
|
| 509 | - array("Username", "240", "username", "", "", "","","true","center"), |
|
| 510 | - array("Password", "240", "password", "", "", "","","true","center"), |
|
| 511 | - array("Domain", "240", "domain", "", "", "","","true","center"), |
|
| 508 | + array("<input type='checkbox' name='chkAll' class='ace checkall'/><label class='lbl'></label>", "30", "", "", "", "", "", "false", "center"), |
|
| 509 | + array("Username", "240", "username", "", "", "", "", "true", "center"), |
|
| 510 | + array("Password", "240", "password", "", "", "", "", "true", "center"), |
|
| 511 | + array("Domain", "240", "domain", "", "", "", "", "true", "center"), |
|
| 512 | 512 | array("Action", "200", "", "", "", |
| 513 | 513 | array("EDIT" => array("url" => 'user/user_opensips_edit/', "mode" => "popup"), |
| 514 | 514 | "DELETE" => array("url" => 'user/user_opensips_delete/', "mode" => "popup") |
@@ -517,17 +517,17 @@ discard block |
||
| 517 | 517 | } |
| 518 | 518 | |
| 519 | 519 | function build_user_opensips_form($id = false) { |
| 520 | - $val = $id > 0 ? 'subscriber.username.' . $id : 'subscriber.username'; |
|
| 520 | + $val = $id > 0 ? 'subscriber.username.'.$id : 'subscriber.username'; |
|
| 521 | 521 | $uname_user = $this->CI->common->find_uniq_rendno('10', '', ''); |
| 522 | 522 | $password = $this->CI->common->generate_password(); |
| 523 | 523 | $accountinfo = $this->CI->session->userdata('accountinfo'); |
| 524 | - $form['forms'] = array(base_url() . 'user/user_opensips_save/', array("id" => "opensips_form", "name" => "opensips_form")); |
|
| 524 | + $form['forms'] = array(base_url().'user/user_opensips_save/', array("id" => "opensips_form", "name" => "opensips_form")); |
|
| 525 | 525 | $form['Opensips Device'] = array( |
| 526 | 526 | array('', 'HIDDEN', array('name' => 'id'), '', '', '', ''), |
| 527 | 527 | array('', 'HIDDEN', array('name' => 'accountcode', 'value' =>$accountinfo['number']), '', '', '', ''), |
| 528 | - array('Username', 'INPUT', array('name' => 'username', 'size' => '20', 'id' => 'username', 'value' => $uname_user, 'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter account number', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;" title="Reset Password" class="change_number fa fa-refresh"></i>'), |
|
| 528 | + array('Username', 'INPUT', array('name' => 'username', 'size' => '20', 'id' => 'username', 'value' => $uname_user, 'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter account number', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;" title="Reset Password" class="change_number fa fa-refresh"></i>'), |
|
| 529 | 529 | array('Password', 'PASSWORD', array('name' => 'password', 'size' => '20', 'id' => 'password1', 'value' => $password, 'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter Password', '<i style="cursor:pointer; font-size: 17px; padding-left:10px; padding-top:6px;" title="Reset Password" class="change_pass fa fa-refresh"></i>'), |
| 530 | - array('Domain', 'INPUT', array('name' => 'domain', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'), |
|
| 530 | + array('Domain', 'INPUT', array('name' => 'domain', 'size' => '20', 'class' => "text field medium"), '', 'tOOL TIP', 'Please Enter account number'), |
|
| 531 | 531 | array('Status', 'status', 'SELECT', '', '', 'tOOL TIP', 'Please Select Status', '', '', '', 'set_status'), |
| 532 | 532 | ); |
| 533 | 533 | $form['button_save'] = array('name' => 'action', 'content' => 'Save', 'value' => 'save', 'type' => 'button', 'id' => 'submit', 'class' => 'btn btn-line-parrot'); |
@@ -547,11 +547,11 @@ discard block |
||
| 547 | 547 | |
| 548 | 548 | return $form; |
| 549 | 549 | } |
| 550 | - function build_user_did_form(){ |
|
| 551 | - $form['forms'] = array(base_url() . 'user/user_dids_action/edit/', array("id" => "user_did_form", "name" => "user_did_form")); |
|
| 550 | + function build_user_did_form() { |
|
| 551 | + $form['forms'] = array(base_url().'user/user_dids_action/edit/', array("id" => "user_did_form", "name" => "user_did_form")); |
|
| 552 | 552 | $form['Edit'] = array( |
| 553 | - array('', 'HIDDEN', array('name' => 'free_didlist'),'', '', '', ''), |
|
| 554 | - array(gettext('DID'), 'INPUT', array('name' => 'number', 'size' => '20', 'class' => "text field medium","readonly"=>"true"), 'trim|required|is_numeric|xss_clean|integer', 'tOOL TIP', 'Please Enter account number'), |
|
| 553 | + array('', 'HIDDEN', array('name' => 'free_didlist'), '', '', '', ''), |
|
| 554 | + array(gettext('DID'), 'INPUT', array('name' => 'number', 'size' => '20', 'class' => "text field medium", "readonly"=>"true"), 'trim|required|is_numeric|xss_clean|integer', 'tOOL TIP', 'Please Enter account number'), |
|
| 555 | 555 | array(gettext('Call Type'), 'call_type', 'SELECT', '', '', 'tOOL TIP', '', '', '', '', 'set_call_type', ''), |
| 556 | 556 | array(gettext('Destination'), 'INPUT', array('name' => 'extensions', 'size' => '20', 'class' => "text field medium"), 'trim|required|xss_clean', 'tOOL TIP', 'Please Enter Password'), |
| 557 | 557 | ); |
@@ -561,31 +561,31 @@ discard block |
||
| 561 | 561 | } |
| 562 | 562 | |
| 563 | 563 | function build_provider_report_buttons() { |
| 564 | - $buttons_json = json_encode(array(array("Export","btn btn-xing" ," fa fa-download fa-lg", "button_action", "/user/user_provider_cdrreport_export/", 'single'))); |
|
| 564 | + $buttons_json = json_encode(array(array("Export", "btn btn-xing", " fa fa-download fa-lg", "button_action", "/user/user_provider_cdrreport_export/", 'single'))); |
|
| 565 | 565 | return $buttons_json; |
| 566 | 566 | } |
| 567 | 567 | |
| 568 | 568 | |
| 569 | 569 | function build_provider_report($type) { |
| 570 | 570 | $account_info = $accountinfo = $this->CI->session->userdata('accountinfo'); |
| 571 | - $currency_id=$account_info['currency_id']; |
|
| 572 | - $currency=$this->CI->common->get_field_name('currency', 'currency', $currency_id); |
|
| 571 | + $currency_id = $account_info['currency_id']; |
|
| 572 | + $currency = $this->CI->common->get_field_name('currency', 'currency', $currency_id); |
|
| 573 | 573 | |
| 574 | - if($type == '0' || $type =='1'){ |
|
| 575 | - $cost_array=array("Debit($currency)", "140", "debit", "debit", "debit", "convert_to_currency","","true","right"); |
|
| 574 | + if ($type == '0' || $type == '1') { |
|
| 575 | + $cost_array = array("Debit($currency)", "140", "debit", "debit", "debit", "convert_to_currency", "", "true", "right"); |
|
| 576 | 576 | } |
| 577 | - if($type =='3'){ |
|
| 578 | - $cost_array=array("Cost($currency)", "140", "cost", "cost", "cost", "convert_to_currency","","true","right"); |
|
| 577 | + if ($type == '3') { |
|
| 578 | + $cost_array = array("Cost($currency)", "140", "cost", "cost", "cost", "convert_to_currency", "", "true", "right"); |
|
| 579 | 579 | } |
| 580 | 580 | $grid_field_arr = json_encode(array( |
| 581 | - array("Date", "170", "callstart", "callstart", "callstart", "convert_GMT_to","","true","center"), |
|
| 582 | - array("Caller ID", "110", "callerid", "", "", "","","true","center"), |
|
| 583 | - array("Called Number", "160", "callednum", "", "", "","","true","center"), |
|
| 584 | - array("Destination", "160", "notes", "", "", "","","true","center"), |
|
| 585 | - array("Duration", "140", "billseconds", "user_provider_cdrs_report_search", "billseconds", "convert_to_show_in","","true","center"), |
|
| 581 | + array("Date", "170", "callstart", "callstart", "callstart", "convert_GMT_to", "", "true", "center"), |
|
| 582 | + array("Caller ID", "110", "callerid", "", "", "", "", "true", "center"), |
|
| 583 | + array("Called Number", "160", "callednum", "", "", "", "", "true", "center"), |
|
| 584 | + array("Destination", "160", "notes", "", "", "", "", "true", "center"), |
|
| 585 | + array("Duration", "140", "billseconds", "user_provider_cdrs_report_search", "billseconds", "convert_to_show_in", "", "true", "center"), |
|
| 586 | 586 | $cost_array, |
| 587 | - array("Disposition", "160", "disposition", "", "", "","","true","center"), |
|
| 588 | - array("Call Type", "233", "calltype", "", "", "","","true","center"), |
|
| 587 | + array("Disposition", "160", "disposition", "", "", "", "", "true", "center"), |
|
| 588 | + array("Call Type", "233", "calltype", "", "", "", "", "true", "center"), |
|
| 589 | 589 | )); |
| 590 | 590 | return $grid_field_arr; |
| 591 | 591 | } |
@@ -593,7 +593,7 @@ discard block |
||
| 593 | 593 | |
| 594 | 594 | function build_provider_report_search($type) { |
| 595 | 595 | |
| 596 | - $cost_array=array('Cost ', 'INPUT', array('name' => 'cost[cost]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'cost[cost-integer]', '', '', '', 'search_int_type', ''); |
|
| 596 | + $cost_array = array('Cost ', 'INPUT', array('name' => 'cost[cost]', 'value' => '', 'size' => '20', 'class' => "text field "), '', 'Tool tips info', '1', 'cost[cost-integer]', '', '', '', 'search_int_type', ''); |
|
| 597 | 597 | $form['forms'] = array("", array('id' => "user_provider_cdrs_report_search")); |
| 598 | 598 | $form['Search'] = array( |
| 599 | 599 | array('From Date', 'INPUT', array('name' => 'callstart[]', 'id' => 'customer_cdr_from_date', 'size' => '20', 'class' => "text field "), '', 'tOOL TIP', '', 'start_date[start_date-date]'), |
@@ -609,7 +609,7 @@ discard block |
||
| 609 | 609 | array('', 'HIDDEN', 'ajax_search', '1', '', '', ''), |
| 610 | 610 | array('', 'HIDDEN', 'advance_search', '1', '', '', '') |
| 611 | 611 | ); |
| 612 | - $form['display_in']=array('name' => 'search_in',"id"=>"search_in","function"=>"search_report_in", "content"=>"Display records in",'label_class' => "search_label col-md-3 no-padding","dropdown_class"=>"form-control","label_style"=>"font-size:13px;","dropdown_style"=>"background: #ddd; width: 21% !important;"); |
|
| 612 | + $form['display_in'] = array('name' => 'search_in', "id"=>"search_in", "function"=>"search_report_in", "content"=>"Display records in", 'label_class' => "search_label col-md-3 no-padding", "dropdown_class"=>"form-control", "label_style"=>"font-size:13px;", "dropdown_style"=>"background: #ddd; width: 21% !important;"); |
|
| 613 | 613 | $form['button_search'] = array('name' => 'action', 'id' => "user_provider_cdr_search_btn", 'content' => 'Search', 'value' => 'save', 'type' => 'button', 'class' => 'btn btn-line-parrot pull-right'); |
| 614 | 614 | $form['button_reset'] = array('name' => 'action', 'id' => "id_reset", 'content' => 'Clear', 'value' => 'cancel', 'type' => 'reset', 'class' => 'btn btn-line-sky pull-right margin-x-10'); |
| 615 | 615 | return $form; |
@@ -31,22 +31,22 @@ |
||
| 31 | 31 | <div class="col-md-12 no-padding color-three border_box"> |
| 32 | 32 | <div class="pull-left"> |
| 33 | 33 | <ul class="breadcrumb"> |
| 34 | - <?php $accountinfo=$this->session->userdata('accountinfo'); |
|
| 35 | - if($accountinfo['type']==1){ ?> |
|
| 36 | - <li><a href="<?= base_url() . "user/user_myprofile/"; ?>">My Profile</a></li> |
|
| 37 | - <?php } else{ ?> |
|
| 34 | + <?php $accountinfo = $this->session->userdata('accountinfo'); |
|
| 35 | + if ($accountinfo['type'] == 1) { ?> |
|
| 36 | + <li><a href="<?= base_url()."user/user_myprofile/"; ?>">My Profile</a></li> |
|
| 37 | + <?php } else { ?> |
|
| 38 | 38 | <li><a href="#">Configuration</a></li> |
| 39 | 39 | <?php } ?> |
| 40 | 40 | <li class='active'> |
| 41 | - <a href="<?= base_url() . "user/user_alert_threshold/"; ?>">Alert Threshold</a> |
|
| 41 | + <a href="<?= base_url()."user/user_alert_threshold/"; ?>">Alert Threshold</a> |
|
| 42 | 42 | </li> |
| 43 | 43 | </ul> |
| 44 | 44 | </div> |
| 45 | - <?php if($accountinfo['type']==1) { ?> |
|
| 45 | + <?php if ($accountinfo['type'] == 1) { ?> |
|
| 46 | 46 | <div class="pull-right"> |
| 47 | 47 | <ul class="breadcrumb"> |
| 48 | 48 | <li class="active pull-right"> |
| 49 | - <a href="<?= base_url() . "user/user_myprofile/"; ?>"> <i class="fa fa-fast-backward" aria-hidden="true"></i> Back</a></li> |
|
| 49 | + <a href="<?= base_url()."user/user_myprofile/"; ?>"> <i class="fa fa-fast-backward" aria-hidden="true"></i> Back</a></li> |
|
| 50 | 50 | </ul> |
| 51 | 51 | </div> |
| 52 | 52 | <?php }?> |
@@ -27,24 +27,24 @@ |
||
| 27 | 27 | <div class="col-md-12 no-padding color-three border_box"> |
| 28 | 28 | <div class="pull-left"> |
| 29 | 29 | <ul class="breadcrumb"> |
| 30 | - <?php $accountinfo=$this->session->userdata('accountinfo'); |
|
| 31 | - if($accountinfo['type']==1){ ?> |
|
| 32 | - <li><a href="<?= base_url() . "user/user_myprofile/"; ?>">My Profile</a></li> |
|
| 33 | - <?php } else{ ?> |
|
| 30 | + <?php $accountinfo = $this->session->userdata('accountinfo'); |
|
| 31 | + if ($accountinfo['type'] == 1) { ?> |
|
| 32 | + <li><a href="<?= base_url()."user/user_myprofile/"; ?>">My Profile</a></li> |
|
| 33 | + <?php } else { ?> |
|
| 34 | 34 | <li><a href="#">Configuration</a></li> |
| 35 | 35 | <?php } |
| 36 | 36 | ?> |
| 37 | 37 | |
| 38 | 38 | <li class='active'> |
| 39 | - <a href="<?= base_url() . "user/user_sipdevices/"; ?>">SIP Devices</a> |
|
| 39 | + <a href="<?= base_url()."user/user_sipdevices/"; ?>">SIP Devices</a> |
|
| 40 | 40 | </li> |
| 41 | 41 | </ul> |
| 42 | 42 | </div> |
| 43 | - <?php if($accountinfo['type']==1) { ?> |
|
| 43 | + <?php if ($accountinfo['type'] == 1) { ?> |
|
| 44 | 44 | <div class="pull-right"> |
| 45 | 45 | <ul class="breadcrumb"> |
| 46 | 46 | <li class="active pull-right"> |
| 47 | - <a href="<?= base_url() . "user/user_myprofile/"; ?>"> <i class="fa fa-fast-backward" aria-hidden="true"></i> Back</a></li> |
|
| 47 | + <a href="<?= base_url()."user/user_myprofile/"; ?>"> <i class="fa fa-fast-backward" aria-hidden="true"></i> Back</a></li> |
|
| 48 | 48 | </ul> |
| 49 | 49 | </div> |
| 50 | 50 | <?php }?> |
@@ -3,14 +3,14 @@ |
||
| 3 | 3 | <?php echo $page_title; ?> |
| 4 | 4 | <? endblock() ?> |
| 5 | 5 | <?php |
| 6 | - $accountinfo=$this->session->userdata('accountinfo'); |
|
| 7 | - $currency=$this->common->get_field_name('currency','currency',array("id"=>$accountinfo['currency_id'])); |
|
| 6 | + $accountinfo = $this->session->userdata('accountinfo'); |
|
| 7 | + $currency = $this->common->get_field_name('currency', 'currency', array("id"=>$accountinfo['currency_id'])); |
|
| 8 | 8 | |
| 9 | 9 | ?> |
| 10 | 10 | <? startblock('extra_head') ?> |
| 11 | - <script type="text/javascript" src="<?php echo base_url();?>assets/js/chart/highcharts.js"></script> |
|
| 12 | - <script type="text/javascript" src="<?php echo base_url();?>assets/js/chart/exporting.js"></script> |
|
| 13 | - <script type="text/javascript" src="<?php echo base_url();?>assets/js/chart/highcharts-3d.js"></script> |
|
| 11 | + <script type="text/javascript" src="<?php echo base_url(); ?>assets/js/chart/highcharts.js"></script> |
|
| 12 | + <script type="text/javascript" src="<?php echo base_url(); ?>assets/js/chart/exporting.js"></script> |
|
| 13 | + <script type="text/javascript" src="<?php echo base_url(); ?>assets/js/chart/highcharts-3d.js"></script> |
|
| 14 | 14 | <style> |
| 15 | 15 | .second{ |
| 16 | 16 | color: black; |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | <div class="w-section inverse no-padding"> |
| 14 | 14 | <?php echo $form; ?> |
| 15 | 15 | <?php |
| 16 | - if(isset($validation_errors) && $validation_errors != ''){ ?>
|
|
| 16 | + if (isset($validation_errors) && $validation_errors != '') { ?>
|
|
| 17 | 17 | <script> |
| 18 | 18 | var ERR_STR = '<?php echo $validation_errors; ?>'; |
| 19 | 19 | print_error(ERR_STR); |
@@ -23,24 +23,24 @@ |
||
| 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="#">Billing</a></li> |
| 31 | 31 | <?php } |
| 32 | 32 | ?> |
| 33 | 33 | |
| 34 | 34 | <li class='active'> |
| 35 | - <a href="<?= base_url() . "user/user_subscriptions/"; ?>">Subscriptions </a> |
|
| 35 | + <a href="<?= base_url()."user/user_subscriptions/"; ?>">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 }?> |