Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php /* __________________________________________________ | Obfuscated by YAK P..

Decoded Output download

<?php 
/*   __________________________________________________ 
    |  Obfuscated by YAK Pro - Php Obfuscator  2.0.14  | 
    |              on 2024-01-24 17:04:18              | 
    |    GitHub: https://github.com/pk-fr/yakpro-po    | 
    |__________________________________________________| 
*/ 
 defined('BASEPATH') or exit('No direct script access allowed'); class Admin extends MY_Controller { public function __construct() { goto JAVLV; QtcEG: date_default_timezone_set($this->config->item('time_reference')); goto O6zM3; AaoaP: $this->load->model('admin_model'); goto Ws49A; JAVLV: parent::__construct(); goto AaoaP; Ws49A: $this->load->library('m_freepbx'); goto QtcEG; O6zM3: } public function index() { } public function list_extnum() { my_load_view($this->setting->theme, 'Admin/extnum_list'); } public function new_extnum() { my_load_view($this->setting->theme, 'Admin/extnum_new'); } public function new_extnum_action() { goto uRZK8; z10Hv: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/extnum_new'); } else { goto pbNeY; xfiO8: if ($res['status']) { $this->session->set_flashdata('flash_success', $res['message']); redirect(base_url('admin/list_extnum')); } else { $this->session->set_flashdata('flash_danger', $res['message']); my_load_view($this->setting->theme, 'Admin/extnum_new'); } goto czxlD; CK5ad: $res = $this->m_freepbx->addExtension($extnum, $name, $password); goto xfiO8; pbNeY: $extnum = my_post('ids'); goto Cxdoj; u8kbb: $password = my_post('password'); goto CK5ad; Cxdoj: $name = my_post('name'); goto u8kbb; czxlD: } goto doN09; BaGhT: $this->form_validation->set_rules('name', my_caption('extnum_name_label'), 'trim|required|max_length[50]'); goto SQcb5; uRZK8: $this->form_validation->set_rules('ids', my_caption('extnum_ids_label'), 'trim|required|max_length[5]'); goto BaGhT; SQcb5: $this->form_validation->set_rules('password', my_caption('extnum_password_label'), 'trim|required|min_length[4]|max_length[20]'); goto z10Hv; doN09: } public function edit_extnum() { goto VxsZc; VxsZc: $extnum = my_uri_segment(3); goto at21O; GlqqN: if ($data['status']) { $dd['rs'] = (object) array('status' => '1', 'id' => $data['id'], 'name' => $data['name'], 'password' => $data['password'], 'created_time' => '2000-12-12'); my_load_view($this->setting->theme, 'Admin/extnum_edit', $dd); } else { echo my_caption('global_no_entries_found'); } goto P8rde; at21O: $data = $this->m_freepbx->fetchExtension($extnum); goto GlqqN; P8rde: } public function edit_extnum_setting_action() { goto aqg4L; ahCBY: if ($data['status']) { goto LSR_K; L6yUN: $d = $this->m_freepbx->updateExtension($dd['id'], $dd['name'], $dd['password']); goto K6lJe; lHZOc: $this->setting->debug_level == 1 ? $debug_detail = json_encode($dd) : ($debug_detail = ''); goto YqnnJ; K6lJe: if ($d['status']) { $this->session->set_flashdata('flash_success', my_caption('user_edit_setting_success')); redirect(base_url('admin/edit_extnum/' . $extnum)); } else { $this->session->set_flashdata('flash_danger', $d['message']); redirect(base_url('admin/edit_extnum/' . $extnum)); } goto kP7Nu; LSR_K: $dd = array('id' => my_post('extnum'), 'name' => my_post('name'), 'password' => my_post('password')); goto lHZOc; YqnnJ: my_log(my_uri_segment(3), 'Information', 'update-extnum-setting', json_encode(my_ua()), $debug_detail); goto L6yUN; kP7Nu: } else { echo my_caption('global_no_entries_found'); } goto YVsfu; aqg4L: $extnum = my_uri_segment(3); goto OEMuo; OEMuo: $data = $this->m_freepbx->fetchExtension($extnum); goto ahCBY; YVsfu: } public function remove_extnum() { goto pKTUl; rc47k: $data = $this->m_freepbx->fetchExtension($extnum); goto MRxWT; MRxWT: if ($data['status']) { $d = $this->m_freepbx->deleteExtension($extnum); if ($d['status']) { echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"CallBack"}'; } else { echo '{"result":false, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"CallBack"}'; } } goto QZVdJ; pKTUl: $extnum = my_uri_segment(3); goto rc47k; QZVdJ: } public function list_device() { my_load_view($this->setting->theme, 'Admin/list_device'); } public function remove_device() { goto xH_tR; XxAb2: my_check_demo_mode(); goto Cf2HN; g6L0a: if ($query->num_rows()) { if ($query->row()->id == 1) { echo '{"result":false, "title":"' . my_caption('global_failure') . '", "text":"' . my_caption('user_first_super_admin_delete_not_allowed') . '", "redirect":""}'; } else { $query_subscription = $this->db->where('user_ids', my_uri_segment(3))->where('status!=', 'expired')->get('payment_subscription', 1); if ($query_subscription->num_rows()) { echo '{"result":false, "title":"' . my_caption('global_failure') . '", "text":"' . my_caption('user_subscription_active_delete_not_allowed') . '", "redirect":""}'; } else { my_remove_user(my_uri_segment(3)); echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"CallBack"}'; } } } goto lyXdg; xH_tR: my_check_demo_mode('alert_json'); goto XxAb2; Cf2HN: $query = $this->db->where('ids', my_uri_segment(3))->get('user', 1); goto g6L0a; lyXdg: } public function list_user() { !my_check_permission('User Management') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/list_user'); } public function remove_user() { goto prhHK; F44qn: my_check_demo_mode('alert_json'); goto R52yT; R52yT: my_check_demo_mode(); goto CPywB; CPywB: $query = $this->db->where('ids', my_uri_segment(3))->get('user', 1); goto WJYok; prhHK: !my_check_permission('User Management') ? die(my_caption('global_not_enough_permission')) : null; goto F44qn; WJYok: if ($query->num_rows()) { if ($query->row()->id == 1) { echo '{"result":false, "title":"' . my_caption('global_failure') . '", "text":"' . my_caption('user_first_super_admin_delete_not_allowed') . '", "redirect":""}'; } else { $query_subscription = $this->db->where('user_ids', my_uri_segment(3))->where('status!=', 'expired')->get('payment_subscription', 1); if ($query_subscription->num_rows()) { echo '{"result":false, "title":"' . my_caption('global_failure') . '", "text":"' . my_caption('user_subscription_active_delete_not_allowed') . '", "redirect":""}'; } else { my_remove_user(my_uri_segment(3)); echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"CallBack"}'; } } } goto ynytu; ynytu: } public function new_user() { !my_check_permission('User Management') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/new_user'); } public function new_user_action() { goto CYqc5; AQ4Pj: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/new_user'); } else { goto RSBrZ; RSBrZ: $this->load->model('user_model'); goto GliCS; ZnFR9: if ($res['result']) { $this->session->set_flashdata('flash_success', $res['message']); redirect(base_url('admin/list_user')); } else { $this->session->set_flashdata('flash_danger', $res['message']); my_load_view($this->setting->theme, 'Admin/new_user'); } goto m0qDf; GliCS: $res = $this->user_model->save_user($this->setting); goto ZnFR9; m0qDf: } goto dq4d2; Ic0EJ: $this->form_validation->set_rules('first_name', my_caption('signup_first_name_label'), 'trim|required|max_length[50]'); goto bQOw2; qQT7m: my_check_demo_mode(); goto Ic0EJ; ha4pg: $this->form_validation->set_rules('confirm_password', my_caption('signup_confirm_label'), 'trim|required|min_length[6]|max_length[20]|matches[password]'); goto AQ4Pj; bQOw2: $this->form_validation->set_rules('last_name', my_caption('signup_last_name_label'), 'trim|required|max_length[50]'); goto fnfvq; fnfvq: $this->form_validation->set_rules('email_address', my_caption('global_email_address'), 'trim|required|valid_email|max_length[50]|callback_email_duplicated_check'); goto IGyvA; IGyvA: $this->form_validation->set_rules('password', my_caption('signup_password_label'), 'trim|required|min_length[6]|max_length[20]'); goto ha4pg; CYqc5: !my_check_permission('User Management') ? die(my_caption('global_not_enough_permission')) : null; goto qQT7m; dq4d2: } public function invite_user() { !my_check_permission('User Management') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/invite_user'); } public function invite_user_action() { goto v0TEc; CRHMq: $this->form_validation->set_rules('email_address', my_caption('global_email_address'), 'trim|required|valid_email|max_length[50]'); goto OaZFa; mxPjU: my_check_demo_mode(); goto CRHMq; v0TEc: !my_check_permission('User Management') ? die(my_caption('global_not_enough_permission')) : null; goto mxPjU; OaZFa: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/invite_user'); } else { $res = $this->admin_model->invite_user(my_post('email_address')); if ($res['result']) { $this->session->set_flashdata('flash_success', $res['message']); redirect(base_url('admin/invite_user')); } else { $this->session->set_flashdata('flash_danger', $res['message']); my_load_view($this->setting->theme, 'Admin/invite_user'); } } goto MB3H5; MB3H5: } public function edit_user() { goto cXprp; Hpdwt: if ($query->num_rows()) { goto TXiaI; iKSYR: $rs_payg = my_tts_generate_user_statitics(my_uri_segment(3)); goto EuEVJ; TXiaI: $data['rs'] = $query->row(); goto JhNGs; fOOWJ: my_load_view($this->setting->theme, 'Admin/edit_user', $data); goto pGns7; JhNGs: $this->load->helper('my_tts'); goto iKSYR; EuEVJ: $data['payg_balance'] = $rs_payg->payg_balance; goto fOOWJ; pGns7: } else { echo my_caption('global_no_entries_found'); } goto iKdYG; vl_bz: $query = $this->db->where('ids', my_uri_segment(3))->get('user', 1); goto Hpdwt; cXprp: !my_check_permission('User Management') ? die(my_caption('global_not_enough_permission')) : null; goto vl_bz; iKdYG: } public function edit_user_setting_action() { goto tiqL1; xFNcU: my_check_demo_mode(); goto Iy4cJ; Iy4cJ: $query = $this->db->where('ids', my_uri_segment(3))->get('user', 1); goto FgDPG; tiqL1: !my_check_permission('User Management') ? die(my_caption('global_not_enough_permission')) : null; goto xFNcU; FgDPG: if ($query->num_rows()) { goto Y0Tq3; zec7L: if (!empty(my_post('new_password'))) { goto LA8Ft; G58y8: $condition = 'trim|min_length[' . $min_length . ']|max_length[20]|callback_password_strength[' . $this->setting->psr . ']'; goto j47Cv; AUc9l: $this->form_validation->set_rules('confirm_new_password', my_caption('user_edit_setting_password_confirm'), 'trim|matches[new_password]'); goto HGEjs; j47Cv: $this->form_validation->set_rules('new_password', my_caption('user_edit_setting_password'), $condition); goto AUc9l; LA8Ft: switch ($this->setting->psr) { case 'medium': $min_length = 8; break; case 'strong': $min_length = 12; break; default: $min_length = 6; } goto G58y8; HGEjs: } goto jFi3s; Y0Tq3: $data['rs'] = $query->row(); goto zec7L; ByrKw: if ($this->form_validation->run() == FALSE) { goto dQdOP; MmBDV: my_load_view($this->setting->theme, 'Admin/edit_user', $data); goto QlMHh; k7PGF: $data['payg_balance'] = $rs_payg->payg_balance; goto MmBDV; dQdOP: $this->load->helper('my_tts'); goto xwZQr; xwZQr: $rs_payg = my_tts_generate_user_statitics(my_uri_segment(3)); goto k7PGF; QlMHh: } else { goto HDP6R; wPSDK: my_post('new_password') != '' ? $update_array['password'] = my_hash_password(my_post('new_password')) : null; goto kCkRx; ObkHQ: $this->session->set_flashdata('flash_success', my_caption('user_edit_setting_success')); goto xck7r; PBRA0: my_log(my_uri_segment(3), 'Information', 'update-user-setting', json_encode(my_ua()), $debug_detail); goto RT6uf; HDP6R: $update_array = array('status' => my_post('user_status'), 'role_ids' => my_post('user_role'), 'update_time' => my_server_time()); goto wPSDK; RT6uf: $this->db->where('ids', my_uri_segment(3))->update('user', $update_array); goto ObkHQ; xck7r: redirect(base_url('admin/edit_user/' . my_uri_segment(3))); goto Rtfpv; kCkRx: $this->setting->debug_level == 1 ? $debug_detail = json_encode($update_array) : ($debug_detail = ''); goto PBRA0; Rtfpv: } goto gpiV5; jFi3s: $this->form_validation->set_rules('act', '', 'in_list[user_setting]'); goto ByrKw; gpiV5: } else { echo my_caption('global_no_entries_found'); } goto nuNd5; nuNd5: } public function role() { goto JLNw5; JLNw5: !my_check_permission('Roles And Permissions') ? die(my_caption('global_not_enough_permission')) : null; goto j7U3K; j7U3K: $data['rs'] = $this->db->order_by('id', 'asc')->get('role')->result(); goto uoykd; uoykd: my_load_view($this->setting->theme, 'Admin/list_role', $data); goto BT6CU; BT6CU: } public function rp_new_action() { goto qs7xg; D1j78: my_check_demo_mode('simple_json'); goto zNMHJ; lJxqa: if ($this->form_validation->run() == FALSE) { echo '{"result":false, "message":"' . strip_tags($this->form_validation->error('sim_value')) . '"}'; } else { $query = $this->db->where('name', str_replace(' ', '_', my_post('sim_value')))->get(my_post('sim_hidden'), 1); if ($query->row()) { echo '{"result":false, "message":"' . my_caption('rp_duplicated_notice') . '"}'; } else { goto SNyqr; qI6bL: echo '{"result":true, "message":"' . my_caption('rp_insert_success') . '"}'; goto mUZa3; oleuy: $this->db->insert(my_post('sim_hidden'), array('ids' => $ids, 'built_in' => 0, 'name' => str_replace(' ', '_', my_post('sim_value')))); goto TBWqu; TBWqu: my_post('sim_hidden') == 'permission' ? $builde_type = 'permission_created' : ($builde_type = 'role_created'); goto gku3n; gku3n: $this->admin_model->permissionBuilder($builde_type, $ids); goto qI6bL; SNyqr: $ids = my_random(); goto oleuy; mUZa3: } } goto cTrRV; qs7xg: !my_check_permission('Roles And Permissions') ? die(my_caption('global_not_enough_permission')) : null; goto D1j78; zNMHJ: if (!is_integer(strpos('role,permission', my_post('sim_hidden')))) { die('{"result":false, "message":"' . my_caption('global_invalid_request') . '"}'); } goto sifh2; sifh2: $this->form_validation->set_rules('sim_value', my_caption('rp_name'), 'trim|required|max_length[50]|callback_check_underscore'); goto lJxqa; cTrRV: } public function rp_edit_action() { goto ZrFfs; RsOdi: if (!is_integer(strpos('role,permission', my_uri_segment(3)))) { die('{"result":false, "message":"' . my_caption('global_invalid_request') . '"}'); } goto XsViw; YR1xF: if ($this->form_validation->run() == FALSE) { echo '{"result":false, "message":"' . strip_tags($this->form_validation->error('sim_value')) . '"}'; } else { $query = $this->db->where('ids!=', my_post('sim_hidden'))->where('name', str_replace(' ', '_', my_post('sim_value')))->get(my_uri_segment(3), 1); if ($query->num_rows()) { echo '{"result":false, "message":"' . my_caption('rp_duplicated_notice') . '"}'; } else { $this->db->where('ids', my_post('sim_hidden'))->update(my_uri_segment(3), array('name' => str_replace(' ', '_', my_post('sim_value')))); echo '{"result":true, "message":"' . my_caption('rp_name_update_success') . '"}'; } } goto yryud; ZrFfs: !my_check_permission('Roles And Permissions') ? die(my_caption('global_not_enough_permission')) : null; goto buum2; buum2: my_check_demo_mode('simple_json'); goto RsOdi; XsViw: $this->form_validation->set_rules('sim_value', my_caption('rp_name'), 'trim|required|max_length[50]|callback_check_underscore'); goto YR1xF; yryud: } public function rp_remove_action() { goto oOm22; rZU75: $query = $this->db->where('ids', my_uri_segment(4))->where('built_in', 0)->get(my_uri_segment(3), 1); goto zjj8E; zjj8E: if ($query->num_rows()) { goto Kv8sl; wT8NW: echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"' . base_url('admin/' . my_uri_segment(3)) . '"}'; goto wIgSg; Kv8sl: if (my_uri_segment(3) == 'role') { $this->db->where('role_ids', my_uri_segment(4))->update('user', array('role_ids' => $this->setting->default_role)); } goto uFAUv; i60il: if (my_uri_segment(3) == 'permission') { $this->admin_model->permissionBuilder('permission_removed', my_uri_segment(4)); } goto wT8NW; uFAUv: $this->db->delete(my_uri_segment(3), array('ids' => my_uri_segment(4))); goto i60il; wIgSg: } else { die(my_caption('rp_not_found')); } goto ghNLh; oOm22: !my_check_permission('Roles And Permissions') ? die(my_caption('global_not_enough_permission')) : null; goto xp4Xr; HyF8w: if (!is_integer(strpos('role,permission', my_uri_segment(3)))) { die('{"result":false, "message":"' . my_caption('global_invalid_request') . '"}'); } goto rZU75; xp4Xr: my_check_demo_mode('alert_json'); goto HyF8w; ghNLh: } public function permission() { goto mbDL7; mbDL7: !my_check_permission('Roles And Permissions') ? die(my_caption('global_not_enough_permission')) : null; goto lP53x; yoSVi: $data['rs_role'] = $this->db->order_by('id', 'asc')->get('role')->result(); goto C3a1S; C3a1S: my_load_view($this->setting->theme, 'Admin/list_permission', $data); goto MyubK; lP53x: $data['rs'] = $this->db->order_by('id', 'asc')->get('permission')->result(); goto yoSVi; MyubK: } public function permission_update() { goto bfgMb; JiMDW: $this->session->set_flashdata('flash_success', my_caption('rp_permission_update_success')); goto l4CmX; me0CU: my_check_demo_mode(); goto Tpire; bfgMb: !my_check_permission('Roles And Permissions') ? die(my_caption('global_not_enough_permission')) : null; goto me0CU; l4CmX: redirect(base_url('admin/permission')); goto vUCwA; Tpire: $this->admin_model->permissionBuilder('update_all'); goto JiMDW; vUCwA: } public function general_setting() { !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/general_setting'); } public function general_setting_action() { goto PV7aW; PV7aW: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto VaJBg; s08bN: if (isset($_FILES['userfile']['name'])) { if ($_FILES['userfile']['name'] != '') { $this->form_validation->set_rules('userfile', 'Upload File', 'callback_icon_upload'); } } goto M3DET; ZQZU3: $this->form_validation->set_rules('dashboard_custom_javascript', my_caption('gs_custom_setting_js'), 'trim|max_length[512]'); goto s08bN; asxWc: $this->form_validation->set_rules('google_analytics_id', my_caption('gs_google_analytics'), 'trim|max_length[50]'); goto LBEOQ; g1sIQ: $this->form_validation->set_rules('maintenance_information', my_caption('gs_maintenance_information'), 'trim|required|max_length[255]'); goto asxWc; LBEOQ: $this->form_validation->set_rules('dashboard_custom_css', my_caption('gs_custom_setting_css'), 'trim|max_length[512]'); goto ZQZU3; VaJBg: my_check_demo_mode(); goto Cm3Cq; M3DET: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/general_setting'); } else { goto Y0X90; jJrso: redirect(base_url('admin/general_setting')); goto cDskO; Y0X90: $this->admin_model->update_general_settings(); goto pP88p; pP88p: $this->session->set_flashdata('flash_success', my_caption('gs_update_success')); goto jJrso; cDskO: } goto fenO1; Cm3Cq: $this->form_validation->set_rules('system_name', my_caption('gs_system_name'), 'trim|required|max_length[50]'); goto g1sIQ; fenO1: } public function auth_integration() { !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/auth_integration'); } public function auth_integration_action() { goto Qq371; AQALj: if (my_post('facebook_login_enabled') == '1') { $this->form_validation->set_rules('facebook_app_id', 'App ID', 'trim|required'); $this->form_validation->set_rules('facebook_app_secret', 'App Secret', 'trim|required'); } goto o3Z9n; wKiMU: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/auth_integration'); } else { goto TecSb; Tol2w: $this->session->set_flashdata('flash_success', my_caption('ai_update_success')); goto LyLZr; TecSb: $this->admin_model->update_auth_integration(); goto Tol2w; LyLZr: redirect(base_url('admin/auth_integration')); goto dLgZg; dLgZg: } goto TWKva; KQTye: if (my_post('google_recaptcha_enabled') == '1') { $this->form_validation->set_rules('google_recaptcha_site_key', 'Site Key', 'trim|required'); $this->form_validation->set_rules('google_recaptcha_secret_key', 'Secret Key', 'trim|required'); } goto eR00h; Qq371: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto FGYTu; FGYTu: my_check_demo_mode(); goto KQTye; eR00h: if (my_post('google_login_enabled') == '1') { $this->form_validation->set_rules('google_client_id', 'Client ID', 'trim|required'); $this->form_validation->set_rules('google_client_secret', 'Client Secret', 'trim|required'); } goto AQALj; PnMtH: $this->form_validation->set_rules('act', '', 'in_list[auth_integration]'); goto wKiMU; o3Z9n: if (my_post('twitter_login_enabled') == '1') { $this->form_validation->set_rules('twitter_consumer_key', 'Consumer Key', 'trim|required'); $this->form_validation->set_rules('twitter_consumer_secret', 'Consumer Secret', 'trim|required'); } goto PnMtH; TWKva: } public function smtp_setting() { !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/smtp_setting'); } public function smtp_setting_action() { goto d5BJs; KSLZ0: $this->form_validation->set_rules('password', my_caption('smtp_setting_password_label'), 'trim|required'); goto WpVWV; K8IL6: $this->form_validation->set_rules('host', my_caption('smtp_setting_host_label'), 'trim|required'); goto tcL5J; oRYQm: $this->form_validation->set_rules('from_name', my_caption('smtp_setting_sender_name_label'), 'trim|required'); goto ZsDJd; d5BJs: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto S7YKP; S7YKP: my_check_demo_mode(); goto K8IL6; tcL5J: $this->form_validation->set_rules('encryption', my_caption('smtp_setting_encryption_label'), 'trim|required|in_list[none,ssl,tls]'); goto MrBCk; ZsDJd: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/smtp_setting'); } else { goto ovdbA; Q14Yu: $this->db->update('setting', array('smtp_setting' => json_encode($smtp_array))); goto flK2T; O_4fX: redirect(base_url('admin/smtp_setting')); goto bLgPa; flK2T: $this->session->set_flashdata('flash_success', my_caption('smtp_update_success')); goto O_4fX; ovdbA: $smtp_array = array('host' => my_post('host'), 'port' => my_post('port'), 'is_auth' => 1, 'username' => my_post('username'), 'password' => $this->input->post('password', TRUE), 'crypto' => my_post('encryption'), 'from_email' => my_post('from_email'), 'from_name' => my_post('from_name')); goto Q14Yu; bLgPa: } goto zxjbQ; MrBCk: $this->form_validation->set_rules('port', my_caption('smtp_setting_port_label'), 'trim|required|integer'); goto x8esA; x8esA: $this->form_validation->set_rules('username', my_caption('smtp_setting_username_label'), 'trim|required'); goto KSLZ0; WpVWV: $this->form_validation->set_rules('from_email', my_caption('smtp_setting_from_email_label'), 'trim|required'); goto oRYQm; zxjbQ: } public function send_test_email() { goto JiYUr; S1sSW: $this->form_validation->set_rules('sim_value', my_caption('global_email_address'), 'trim|required|valid_email'); goto t3dcA; FfQO8: my_check_demo_mode('simple_json'); goto S1sSW; JiYUr: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto FfQO8; t3dcA: if ($this->form_validation->run() == FALSE) { echo '{"result":false, "message":"' . strip_tags($this->form_validation->error('sim_value')) . '"}'; } else { goto wFWzr; TnauJ: if ($res['result']) { echo '{"result":true, "message":"' . my_caption('smtp_test_email_sent_success') . '"}'; } else { echo '{"result":false, "message":"' . my_caption('smtp_test_email_sent_fail') . '"}'; } goto MR39T; ajMNQ: $res = my_send_email($email); goto TnauJ; wFWzr: $email = array('email_to' => my_post('sim_value'), 'email_subject' => 'Test Email', 'email_body' => 'This is a test email, sent at: ' . my_server_time() . ' ' . $this->config->item('time_reference')); goto ajMNQ; MR39T: } goto J2zaZ; J2zaZ: } public function email_template() { goto tBPu0; M7yuS: my_load_view($this->setting->theme, 'Admin/email_template', $data); goto GjqDQ; tBPu0: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto BRYc6; BRYc6: $data['rs'] = $this->db->order_by('built_in', 'desc')->get('email_template')->result(); goto M7yuS; GjqDQ: } public function email_template_new() { !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/email_template_edit'); } public function email_template_new_action() { goto yemgj; mQVuz: my_check_demo_mode(); goto apemo; yemgj: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto mQVuz; niqvY: $this->form_validation->set_rules('email_body', my_caption('et_email_body'), 'trim|required|min_length[30]'); goto j4YXy; j4YXy: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/email_template_edit'); } else { goto LZG1X; LZG1X: $insert_array = array('ids' => my_random(), 'purpose' => my_post('email_purpose'), 'built_in' => 0, 'subject' => my_post('email_subject'), 'body' => my_post('email_body')); goto PtAVL; uCkGw: $this->session->set_flashdata('flash_success', my_caption('et_email_create_success')); goto qP8uI; qP8uI: redirect(base_url('admin/email_template/')); goto MjYEv; PtAVL: $this->db->insert('email_template', $insert_array); goto uCkGw; MjYEv: } goto RVUrH; OfBkF: $this->form_validation->set_rules('email_subject', my_caption('et_email_subject'), 'trim|required|max_length[255]'); goto niqvY; apemo: $this->form_validation->set_rules('email_purpose', my_caption('et_email_purpose'), 'trim|required|max_length[50]'); goto OfBkF; RVUrH: } public function email_template_edit() { goto xUVxh; xUVxh: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto jqziH; BuHxT: if ($query->num_rows()) { $data['rs'] = $query->row(); my_load_view($this->setting->theme, 'Admin/email_template_edit', $data); } else { echo my_caption('global_no_entries_found'); } goto EpHaD; jqziH: $query = $this->db->where('ids', my_uri_segment(3))->get('email_template', 1); goto BuHxT; EpHaD: } public function email_template_remove() { goto BcCBe; BcCBe: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto ApkIU; ApkIU: my_check_demo_mode(); goto aqMGX; W3LaI: echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"' . base_url('admin/email_template') . '"}'; goto k6I5z; aqMGX: $this->db->delete('email_template', array('ids' => my_uri_segment(3))); goto W3LaI; k6I5z: } public function email_template_edit_action() { goto D8ejZ; D8ejZ: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto nkl23; KwxeO: $query = $this->db->where('ids', my_uri_segment(3))->get('email_template', 1); goto N1PYl; nkl23: my_check_demo_mode(); goto KwxeO; N1PYl: if ($query->num_rows()) { goto WT5C4; reQvg: $this->form_validation->set_rules('email_body', my_caption('et_email_body'), 'trim|required|min_length[30]'); goto VpE4M; WT5C4: $this->form_validation->set_rules('email_purpose', my_caption('et_email_purpose'), 'trim|required|max_length[50]'); goto UytMY; VpE4M: if ($this->form_validation->run() == FALSE) { $data['rs'] = $query->row(); my_load_view($this->setting->theme, 'Admin/email_template_edit', $data); } else { goto RASxl; RASxl: $this->db->where('ids', my_uri_segment(3))->update('email_template', array('purpose' => my_post('email_purpose'), 'subject' => my_post('email_subject'), 'body' => my_post('email_body'))); goto LGV94; fjIcA: redirect(base_url('admin/email_template_edit/' . my_uri_segment(3))); goto o7YkX; LGV94: $this->session->set_flashdata('flash_success', my_caption('et_email_change_success')); goto fjIcA; o7YkX: } goto AlQ2N; UytMY: $this->form_validation->set_rules('email_subject', my_caption('et_email_subject'), 'trim|required|max_length[255]'); goto reQvg; AlQ2N: } else { echo my_caption('global_no_entries_found'); } goto deWgn; deWgn: } public function payment_list() { !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/payment_list'); } public function payment_list_remove_action() { goto lFO6M; WTOji: my_check_demo_mode('alert_json'); goto yXgBX; yXgBX: $query = $this->db->where('ids', my_uri_segment(3))->get('payment_log', 1); goto oNs_W; oNs_W: if ($query->num_rows()) { $this->db->where('ids', my_uri_segment(3))->delete('payment_log'); echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"CallBack"}'; } else { echo '{"result":false, "title":"' . my_caption('global_failure') . '", "text":"' . my_caption('global_no_entries_found') . '", "redirect":"CallBack"}'; } goto YwVQq; lFO6M: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto WTOji; YwVQq: } public function payment_list_view() { goto Ewt_3; QRD8y: if ($query->num_rows()) { goto w4T5d; dQWK9: $rs = $query->row(); goto D6qOm; D6qOm: $data['user_email'] = $this->db->where('ids', $rs->user_ids)->get('user', 1)->row()->email_address; goto ROw7X; jX2XC: my_load_view($this->setting->theme, 'Admin/payment_list_view', $data); goto MYg_H; ROw7X: $data['rs'] = $rs; goto jX2XC; w4T5d: $payment_setting_array = json_decode($this->setting->payment_setting, 1); goto dQWK9; MYg_H: } else { echo my_caption('global_no_entries_found'); } goto R5aHS; jdSyw: $query = $this->db->where('ids', my_uri_segment(3))->get('payment_log', 1); goto QRD8y; Ewt_3: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto jdSyw; R5aHS: } public function payment_subscription_list() { !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/payment_subscription_list'); } public function payment_subscription_list_view() { goto ufCcl; aCcRv: if ($query->num_rows()) { goto wf6If; N6prl: $data['item_name'] = $this->db->where('ids', $rs->item_ids)->get('payment_item', 1)->row()->item_name; goto cR6zr; A8FUx: $data['rs'] = $rs; goto N_rT6; cR6zr: my_load_view($this->setting->theme, 'Admin/payment_subscription_list_view', $data); goto czBzR; wf6If: $rs = $query->row(); goto A8FUx; N_rT6: $data['user_email'] = my_user_setting($rs->user_ids, 'email_address'); goto N6prl; czBzR: } else { echo my_caption('global_no_entries_found'); } goto Qjz35; eXDoN: $query = $this->db->where('ids', my_uri_segment(3))->get('payment_subscription', 1); goto aCcRv; ufCcl: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto eXDoN; Qjz35: } public function payment_subscription_action() { goto QN2xG; r7lNS: my_check_demo_mode('alert_json'); goto ePoLu; QN2xG: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto r7lNS; XLRkH: if ($query->num_rows()) { $rs = $query->row(); if ($rs->payment_gateway == 'stripe' || $rs->payment_gateway == 'paypal' || $rs->payment_gateway == 'manual' || $rs->payment_gateway == 'free') { $result = my_payment_gateway_subscription_action($action, $rs, 'admin/payment_subscription_list'); } else { goto vq8mV; vq8mV: $this->load->library('m_payment'); goto mZJ62; eqwJs: if ($action == 'cancel' || $action == 'cancel_now') { goto l5y_6; OJBbo: $action == 'cancel' ? $subscriptionArray['cancelNow'] = FALSE : ($subscriptionArray['cancelNow'] = TRUE); goto jCfN0; l5y_6: $subscriptionArray['paymentGateway'] = $rs->payment_gateway; goto OJBbo; jCfN0: $cancelledSubscriptionArray = $this->m_payment->cancelSubscription($subscriptionArray); goto Q_xSl; Q_xSl: if ($cancelledSubscriptionArray['success']) { goto yaCE7; Zdlv3: $result = '{"result":true, "title":"' . my_caption('global_cancelled_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"' . base_url('admin/payment_subscription_list') . '"}'; goto wdwY1; yaCE7: $action == 'cancel_now' ? $status = 'expired' : ($status = 'pending_cancellation'); goto jzOcn; jzOcn: $this->db->where('ids', $rs->ids)->update('payment_subscription', array('status' => $status)); goto Zdlv3; wdwY1: } else { $result = '{"result":false, "title":"' . my_caption('global_failure') . '", "text":"' . my_caption('payment_subscription_perform_fail') . '", "redirect":"CallBack"}'; } goto emOU3; emOU3: } else { $result = '{"result":false, "title":"' . my_caption('global_failure') . '", "text":"' . my_caption('payment_subscription_perform_fail') . '", "redirect":"CallBack"}'; } goto T3Sdk; mZJ62: $subscriptionArray['subscriptionID'] = $rs->gateway_identifier; goto eqwJs; T3Sdk: } } else { $result = '{"result":false, "title":"' . my_caption('global_failure') . '", "text":"' . my_caption('global_no_entries_found') . '", "redirect":"CallBack"}'; } goto ZZEgV; ZZEgV: echo my_esc_html($result); goto Ib2Et; o8Ibr: $query = $this->db->where('ids', my_uri_segment(4))->get('payment_subscription', 1); goto XLRkH; ePoLu: $action = my_uri_segment(3); goto o8Ibr; Ib2Et: } public function payment_subscription_sync() { goto OwxyO; WmXFJ: redirect(base_url('admin/payment_subscription_list')); goto mvap8; OwxyO: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto LpNfz; zVzMd: if ($query->num_rows()) { $rs = $query->result(); try { goto mLrnQ; mLrnQ: $payment_setting_array = json_decode($this->setting->payment_setting, 1); goto RkM48; RkM48: \Stripe\Stripe::setApiKey($payment_setting_array['stripe_secret_key']); goto XVykO; NS3ui: $this->load->library('m_payment'); goto Mzlr9; Mzlr9: foreach ($rs as $row) { if ($row->payment_gateway == 'stripe') { goto iXUke; MxheD: $this->db->where('ids', $row->ids)->update('payment_subscription', $update_array); goto RglJ6; Us5dj: $update_array = array('status' => $status, 'start_time' => mdate('%Y-%m-%d %H:%i:%s', $subscription->current_period_start), 'end_time' => mdate('%Y-%m-%d %H:%i:%s', $subscription->current_period_end), 'updated_time' => my_server_time()); goto MxheD; yGkAa: $subscription->status == 'active' ? $status = $row->status : ($status = $subscription->status); goto Us5dj; iXUke: $subscription = \Stripe\Subscription::retrieve($row->gateway_identifier); goto yGkAa; RglJ6: } elseif ($row->payment_gateway == 'paypal') { $subscription = $this->m_paypal->retrieveSubscription($row->gateway_identifier); if ($subscription['success']) { goto ykHjt; t8UmV: $this->db->where('ids', $row->ids)->update('payment_subscription', $update_array); goto AqjkE; ykHjt: $subscription['status'] == 'ACTIVE' ? $status = 'active' : ($status = strtolower($subscription['status'])); goto wrhOr; wrhOr: $update_array = array('status' => str_replace('cancelled', 'expired', $status), 'start_time' => $subscription['start_time'], 'end_time' => $subscription['end_time'], 'updated_time' => my_server_time()); goto t8UmV; AqjkE: } } elseif ($row->payment_gateway == 'manual') { } else { $subscriptionArray = $this->m_payment->retrieveSubscription($row->payment_gateway, $row->gateway_identifier); if ($subscriptionArray['success']) { $updateArray = array('status' => $subscriptionArray['status'], 'start_time' => $subscriptionArray['currentStartTime'], 'end_time' => $subscriptionArray['currentEndTime'], 'updated_time' => my_server_time()); $this->db->where('ids', $row->ids)->update('payment_subscription', $updateArray); } } } goto SfzWv; XVykO: $this->load->library('m_paypal'); goto NS3ui; SfzWv: } catch (\Exception $e) { $result = FALSE; } } goto EiGo_; LpNfz: my_check_demo_mode(); goto MGu0F; MGu0F: $result = TRUE; goto C5mI5; C5mI5: $query = $this->db->where('status!=', 'expired')->get('payment_subscription'); goto zVzMd; EiGo_: if ($result) { $this->session->set_flashdata('flash_success', my_caption('payment_subscription_sync_success')); } else { $this->session->set_flashdata('flash_danger', my_caption('payment_subscription_sync_fail')); } goto WmXFJ; mvap8: } public function payment_subscription_remove_action() { goto KmFQt; eWF_S: if ($query->num_rows()) { $rs = $query->row(); if ($rs->status == 'expired') { $this->db->where('ids', my_uri_segment(3))->delete('payment_subscription'); echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"CallBack"}'; } else { echo '{"result":false, "title":"' . my_caption('global_failure') . '", "text":"' . my_caption('payment_subscription_remove_subscription_failed_not_cancel') . '", "redirect":""}'; } } else { echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"CallBack"}'; } goto DBW90; KmFQt: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto W_ct0; W_ct0: my_check_demo_mode('alert_json'); goto cNe1x; cNe1x: $query = $this->db->where('ids', my_uri_segment(3))->get('payment_subscription', 1); goto eWF_S; DBW90: } public function payment_adjust_balance() { goto QDjY2; Y7Csf: $query = $this->db->where('ids', my_uri_segment(3))->get('user', 1); goto KylLN; KylLN: if ($query->num_rows()) { goto H6yGJ; H6yGJ: $rs = $query->row(); goto f2eBO; z8pXq: my_load_view($this->setting->theme, 'Admin/payment_adjust_balance', $data); goto MvU5d; f2eBO: $data['rs'] = $rs; goto z8pXq; MvU5d: } else { echo my_caption('global_no_entries_found'); } goto EeQne; QDjY2: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto Y7Csf; EeQne: } public function payment_adjust_balance_action() { goto sASCY; f4kWY: my_check_demo_mode(); goto jhoNO; jhoNO: $query = $this->db->where('ids', my_post('user_ids'))->get('user', 1); goto pDhci; yWUjl: if ($this->form_validation->run() == FALSE) { if ($query->num_rows()) { goto b2T_z; HnG1C: my_load_view($this->setting->theme, 'Admin/payment_adjust_balance', $data); goto B9rcD; z_ycX: $data['rs'] = $rs; goto HnG1C; b2T_z: $rs = $query->row(); goto z_ycX; B9rcD: } else { echo my_caption('global_no_entries_found'); } } else { if ($query->num_rows()) { goto Mygu1; cHWtp: if ($res_array['result']) { $this->admin_model->payment_log_insert(); $this->session->set_flashdata('flash_success', $res_array['message']); } else { $this->session->set_flashdata('flash_danger', $res_array['message']); } goto Xfl7i; Xfl7i: redirect(base_url('admin/payment_adjust_balance/' . my_post('user_ids'))); goto tMrL2; Mygu1: $res_array = json_decode(my_user_reload(my_post('user_ids'), my_post('adjust_balance_type'), my_post('adjust_currency'), my_post('adjust_amount')), 1); goto cHWtp; tMrL2: } else { echo my_caption('global_no_entries_found'); } } goto HJG9o; sASCY: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto f4kWY; pDhci: $this->form_validation->set_rules('adjust_amount', my_caption('payment_amount'), 'trim|required|numeric|greater_than_equal_to[0.01]'); goto yWUjl; HJG9o: } public function payment_add_purchase() { goto wy7V3; Opxfz: $query = $this->db->where('ids', my_uri_segment(3))->get('user', 1); goto jOc1f; wy7V3: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto Opxfz; jOc1f: if ($query->num_rows()) { goto wd_yn; E5HMe: my_load_view($this->setting->theme, 'Admin/payment_add_purchase', $data); goto qxcR8; HBxUN: $data['rs_purchase'] = $this->db->where('enabled', 1)->where('trash', 0)->where('type', 'purchase')->get('payment_item')->result(); goto E5HMe; wd_yn: $data['rs_user'] = $query->row(); goto HBxUN; qxcR8: } else { echo my_caption('global_no_entries_found'); } goto O4RzE; O4RzE: } public function payment_add_purchase_action() { goto dURfH; pmdSK: my_check_demo_mode(); goto PrMGI; PrMGI: $query_user = $this->db->where('ids', my_post('user_ids'))->get('user', 1); goto fb_ab; dURfH: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto pmdSK; fb_ab: if ($query_user->num_rows()) { goto eQolR; CcxLP: $this->form_validation->set_rules('description', my_caption('payment_description'), 'trim|max_length[1024]'); goto w21v1; eQolR: $this->form_validation->set_rules('purchase', my_caption('payment_add_purchase_item'), 'trim|required'); goto CcxLP; w21v1: if ($this->form_validation->run() == FALSE) { goto qCeSM; oUlnl: $data['rs_purchase'] = $this->db->where('enabled', 1)->where('trash', 0)->where('type', 'purchase')->get('payment_item')->result(); goto NQdIz; NQdIz: my_load_view($this->setting->theme, 'Admin/payment_add_purchase', $data); goto e7wel; qCeSM: $data['rs_user'] = $query_user->row(); goto oUlnl; e7wel: } else { $query_purchase = $this->db->where('enabled', 1)->where('type', 'purchase')->where('ids', my_post('purchase'))->get('payment_item', 1); if ($query_purchase->num_rows()) { goto OL5zO; OL5zO: $rs_purchase = $query_purchase->row(); goto e1jI4; DcCf8: $res_array = json_decode($res, 1); goto ilvcI; e1jI4: $res = my_user_reload(my_post('user_ids'), 'Cut', $rs_purchase->item_currency, $rs_purchase->item_price); goto DcCf8; ilvcI: if ($res_array['result']) { goto zhNlJ; zhNlJ: $insert_data = array('ids' => my_random(), 'user_ids' => my_post('user_ids'), 'payment_ids' => str_repeat('0', 50), 'item_type' => 'purchase', 'item_ids' => $rs_purchase->ids, 'item_name' => $rs_purchase->item_name, 'created_time' => my_server_time(), 'description' => my_post('description'), 'stuff' => $rs_purchase->stuff_setting, 'used_up' => 0, 'auto_renew' => $rs_purchase->auto_renew); goto q4wxu; q4wxu: $this->db->insert('payment_purchased', $insert_data); goto kzPSV; uDw45: redirect('admin/payment_add_purchase/' . my_post('user_ids')); goto GreAM; kzPSV: $this->session->set_flashdata('flash_success', my_caption('payment_add_purchase_add') . '(' . $rs_purchase->item_name . ')' . my_caption('global_successfully') . '!'); goto uDw45; GreAM: } else { $this->session->set_flashdata('flash_danger', my_caption('payment_add_purchase_balance_not_enough')); redirect('admin/payment_add_purchase/' . my_post('user_ids')); } goto TffMl; TffMl: } else { echo my_caption('global_no_entries_found'); } } goto LD0P6; LD0P6: } else { echo my_caption('global_no_entries_found'); } goto owRqu; owRqu: } public function payment_add_subscription() { goto MpQel; V7OtV: $query = $this->db->where('ids', my_uri_segment(3))->get('user', 1); goto Bk5da; Bk5da: if ($query->num_rows()) { goto VeQpP; qE_cv: my_load_view($this->setting->theme, 'Admin/payment_add_subscription', $data); goto sf5UC; dX6q3: $data['rs_subscription'] = $this->db->where('enabled', 1)->where('trash', 0)->where('type', 'subscription')->get('payment_item')->result(); goto qE_cv; VeQpP: $data['rs_user'] = $query->row(); goto dX6q3; sf5UC: } else { echo my_caption('global_no_entries_found'); } goto hMdOT; MpQel: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto V7OtV; hMdOT: } public function payment_add_subscription_action() { goto cnNoU; HUTP3: $query_user = $this->db->where('ids', my_post('user_ids'))->get('user', 1); goto dXP0F; y5jq7: my_check_demo_mode(); goto HUTP3; cnNoU: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto y5jq7; dXP0F: if ($query_user->num_rows()) { goto TVSN1; TVSN1: $this->form_validation->set_rules('subscription', my_caption('payment_type_subscription_item'), 'trim|required'); goto aXFic; aXFic: $this->form_validation->set_rules('description', my_caption('payment_description'), 'trim|max_length[1024]'); goto edQ5B; edQ5B: if ($this->form_validation->run() == FALSE) { goto nrY10; zDog4: $data['rs_subscription'] = $this->db->where('enabled', 1)->where('type', 'subscription')->get('payment_item')->result(); goto wYci8; wYci8: my_load_view($this->setting->theme, 'Admin/payment_add_subscription', $data); goto EhXgo; nrY10: $data['rs_user'] = $query_user->row(); goto zDog4; EhXgo: } else { goto k_is0; crU2w: $rs_user = $query_user->row(); goto HIU8m; HIU8m: if ($query_subscription->num_rows()) { goto C3FD0; DgB26: $res = my_user_reload(my_post('user_ids'), 'Cut', $rs_subscription->item_currency, $rs_subscription->item_price); goto m1unN; gWAFR: if ($res_array['result']) { goto oE3DZ; E89Hg: $this->db->insert('payment_subscription', $insert_data); goto f5RUu; oE3DZ: $current_time = my_server_time(); goto y2z1o; MYEjB: $insert_data = array('ids' => my_random(), 'item_ids' => my_post('subscription'), 'user_ids' => my_post('user_ids'), 'payment_gateway' => 'manual', 'gateway_identifier' => '0', 'quantity' => 1, 'status' => 'active', 'start_time' => $current_time, 'end_time' => $end_date, 'created_time' => $current_time, 'updated_time' => $current_time, 'description' => my_post('description'), 'stuff' => $rs_subscription->stuff_setting, 'used_up' => 0, 'auto_renew' => $rs_subscription->auto_renew); goto E89Hg; O82UY: redirect('admin/payment_add_subscription/' . my_post('user_ids')); goto h_lFW; f5RUu: $this->session->set_flashdata('flash_success', my_caption('payment_add_subscription_add') . '(' . $rs_subscription->item_name . ')' . my_caption('global_successfully') . '!'); goto O82UY; y2z1o: $end_date = date('Y-m-d H:i:s', strtotime($rs_subscription->recurring_interval_count . ' ' . $rs_subscription->recurring_interval, strtotime($current_time))); goto MYEjB; h_lFW: } else { $this->session->set_flashdata('flash_danger', my_caption('payment_add_subscription_balance_not_enough')); redirect('admin/payment_add_subscription/' . my_post('user_ids')); } goto rUeZu; C3FD0: $rs_subscription = $query_subscription->row(); goto DgB26; m1unN: $res_array = json_decode($res, 1); goto gWAFR; rUeZu: } else { echo my_caption('global_no_entries_found'); } goto MZupi; k_is0: $query_subscription = $this->db->where('enabled', 1)->where('type', 'subscription')->where('ids', my_post('subscription'))->get('payment_item', 1); goto crU2w; MZupi: } goto w0TI9; w0TI9: } else { echo my_caption('global_no_entries_found'); } goto EvBW_; EvBW_: } public function payment_item_list() { !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/payment_item_list'); } public function payment_item_add() { !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/payment_item_detail'); } public function payment_item_add_action() { goto djvsL; N1lrD: $this->form_validation->set_rules('characters_limit', my_caption('tts_payment_characters_limit_standard'), 'trim|integer|greater_than_equal_to[1]'); goto yT1aI; yT1aI: $this->form_validation->set_rules('item_description', my_caption('payment_item_description_label'), 'trim|required'); goto JG2l5; GU7j0: $this->form_validation->set_rules('item_name', my_caption('payment_item_name_label'), 'trim|required|max_length[255]'); goto r0gV6; r0gV6: $this->form_validation->set_rules('access_code', my_caption('payment_item_access_code_label'), 'trim|max_length[50]'); goto hrQ78; wonLy: $this->form_validation->set_rules('purchase_times', my_caption('payment_item_purchase_times_limit'), 'trim|required|integer'); goto nr6DL; djvsL: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto z7m7e; nr6DL: $this->form_validation->set_rules('access_condition[]', my_caption('payment_item_access_condition'), 'trim|required'); goto N1lrD; K9SiD: $this->form_validation->set_rules('item_position', my_caption('payment_item_position'), 'trim|required|integer'); goto GU7j0; z7m7e: my_check_demo_mode(); goto K9SiD; JG2l5: if (my_post('item_type') == 'subscription') { $this->form_validation->set_rules('recurring_interval_count', my_caption('payment_item_recurring_interval_count_label'), 'trim|required|integer|greater_than[0]'); $this->form_validation->set_rules('recurring_interval', my_caption('payment_item_recurring_interval_label'), 'trim|required|in_list[day,week,month,year]'); } goto CS_PG; hrQ78: $this->form_validation->set_rules('item_price', my_caption('payment_item_price_label'), 'trim|required|numeric|greater_than_equal_to[0]'); goto wonLy; CS_PG: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/payment_item_detail'); } else { goto Ghcmc; HZADN: redirect(base_url('admin/payment_item_list/')); goto UbFag; Y4Hmt: $this->session->set_flashdata('flash_success', my_caption('payment_item_add_success')); goto HZADN; Ghcmc: $this->admin_model->payment_item_add(); goto Y4Hmt; UbFag: } goto Zyd_5; Zyd_5: } public function payment_item_remove_action() { goto ov3a0; ov3a0: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto skLE0; uGnZj: $query = $this->db->where('ids', my_uri_segment(3))->get('payment_item', 1); goto polUF; polUF: if ($query->num_rows()) { $rs = $query->row(); if ($rs->type = 'subscription') { goto lLu0Q; lLu0Q: $query_subscription = $this->db->where('item_ids', $rs->ids)->get('payment_subscription', 1); goto KRx_x; KRx_x: $query_voice_resource = $this->db->like('accessibility_standard', $rs->ids)->or_like('accessibility_neural', $rs->ids)->get('tts_resource', 1); goto JCNXS; JCNXS: if ($query_subscription->num_rows()) { echo '{"result":false, "title":"' . my_caption('global_failure') . '", "text":"' . my_caption('payment_item_delete_failure_still_subscribed') . '", "redirect":"CallBack"}'; } else { if ($query_voice_resource->num_rows()) { $this->db->where('ids', my_uri_segment(3))->update('payment_item', array('trash' => 1)); } else { $this->db->where('ids', my_uri_segment(3))->delete('payment_item'); } echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"CallBack"}'; } goto YcnNz; YcnNz: } else { goto Fyh2M; WvLfw: if ($query_purchased->num_rows() || $query_voice_resource->num_rows()) { $this->db->where('ids', my_uri_segment(3))->update('payment_item', array('trash' => 1)); } else { $this->db->where('ids', my_uri_segment(3))->delete('payment_item'); } goto NsEv4; Fyh2M: $query_purchased = $this->db->where('item_ids', $rs->ids)->get('payment_purchased', 1); goto WvLfw; NsEv4: echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"CallBack"}'; goto i34y0; i34y0: } } else { echo '{"result":false, "title":"' . my_caption('global_failure') . '", "text":"' . my_caption('global_no_entries_found') . '", "redirect":"CallBack"}'; } goto uQFKi; skLE0: my_check_demo_mode('alert_json'); goto uGnZj; uQFKi: } public function payment_item_modify() { goto w4zPa; w4zPa: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto cVPLq; aliWc: if ($query->num_rows()) { $data['rs'] = $query->row(); my_load_view($this->setting->theme, 'Admin/payment_item_detail', $data); } else { echo my_caption('global_no_entries_found'); } goto GQcPf; cVPLq: $query = $this->db->where('ids', my_uri_segment(3))->get('payment_item', 1); goto aliWc; GQcPf: } public function payment_item_modify_action() { goto WoXHt; llflH: my_check_demo_mode(); goto OvI4_; ndu9P: if ($query->num_rows()) { goto D8db_; S12cR: $this->form_validation->set_rules('item_description', my_caption('payment_item_description_label'), 'trim|required'); goto eFQVI; LhQSi: $this->form_validation->set_rules('item_position', my_caption('payment_item_position'), 'trim|required|integer'); goto z4gBA; R4G9h: $this->form_validation->set_rules('access_condition[]', my_caption('payment_item_access_condition'), 'trim|required'); goto S12cR; ovXjM: $stuff_setting = ''; goto LhQSi; z4gBA: $this->form_validation->set_rules('item_name', my_caption('payment_item_name_label'), 'trim|required|max_length[255]'); goto Sq0PI; MzBst: if ($this->form_validation->run() == FALSE) { $data['rs'] = $rs; my_load_view($this->setting->theme, 'Admin/payment_item_detail', $data); } else { goto ox0Hi; InwFj: redirect(base_url('admin/payment_item_modify/' . my_post('ids'))); goto qyj6L; ox0Hi: $this->admin_model->payment_item_modify($rs->type); goto FJWcY; FJWcY: $this->session->set_flashdata('flash_success', my_caption('payment_item_modify_success')); goto InwFj; qyj6L: } goto u3nAW; LyPj4: $this->form_validation->set_rules('purchase_times', my_caption('payment_item_purchase_times_limit'), 'trim|required|integer'); goto R4G9h; D8db_: $rs = $query->row(); goto ovXjM; Sq0PI: $this->form_validation->set_rules('item_price', my_caption('payment_item_price_label'), 'trim|required|greater_than_equal_to[0]'); goto LyPj4; eFQVI: if ($rs->type == 'subscription') { $this->form_validation->set_rules('recurring_interval_count', my_caption('payment_item_recurring_interval_count_label'), 'trim|required|integer|greater_than[0]'); $this->form_validation->set_rules('recurring_interval', my_caption('payment_item_recurring_interval_label'), 'trim|required|in_list[day,week,month,year]'); } goto MzBst; u3nAW: } else { echo my_caption('global_no_entries_found'); } goto A02YP; OvI4_: $query = $this->db->where('ids', my_post('ids'))->get('payment_item', 1); goto ndu9P; WoXHt: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto llflH; A02YP: } public function payment_setting() { !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/payment_setting'); } public function payment_setting_action() { goto sUvll; MQD86: if (my_post('paypal_one_time_enabled') == '1' || my_post('paypal_recurring_enabled') == '1') { goto eNjVi; eNjVi: $this->form_validation->set_rules('paypal_client_id', 'Client ID', 'trim|required'); goto nNI65; nNI65: $this->form_validation->set_rules('paypal_secret', 'Secret', 'trim|required'); goto fI2yr; fI2yr: $this->form_validation->set_rules('paypal_webhook_id', 'Webhook ID', 'trim|required'); goto ylJra; ylJra: } goto eN0Bl; sUvll: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto c701W; eN0Bl: $this->form_validation->set_rules('payment_tax_rate', my_caption('payment_tax_rate'), 'trim|required|greater_than_equal_to[0]'); goto VWxwr; c701W: my_check_demo_mode(); goto lQryi; GfH9J: if ($this->form_validation->run() == FALSE) { $this->session->set_flashdata('flash_danger', my_caption('global_something_failed')); my_load_view($this->setting->theme, 'Admin/payment_setting'); } else { goto uN3M2; Qi1Pw: redirect(base_url('admin/payment_setting')); goto QZoJn; uN3M2: $res = $this->admin_model->payment_setting_update(); goto JPf1P; JPf1P: $this->session->set_flashdata('flash_success', my_caption('payment_update_success')); goto Qi1Pw; QZoJn: } goto w9o4h; lQryi: if (my_post('stripe_one_time_enabled') == '1' || my_post('stripe_recurring_enabled') == '1') { goto ZiRR5; dBP0H: $this->form_validation->set_rules('stripe_secret_key', 'Secret Key', 'trim|required'); goto MIqse; MIqse: $this->form_validation->set_rules('stripe_signing_secret', 'Signing Secret', 'trim|required'); goto RiLv9; ZiRR5: $this->form_validation->set_rules('stripe_publishable_key', 'Publishable Key', 'trim|required'); goto dBP0H; RiLv9: } goto MQD86; VWxwr: $this->form_validation->set_rules('act', '', 'in_list[payment_setting]'); goto GfH9J; w9o4h: } public function users_activity_log() { !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/list_activity'); } public function users_activity_log_delete() { goto rNtrt; rNtrt: !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; goto UYh1r; K3BWR: $before_this_time = date('Y-m-d H:i:s', strtotime($offset, strtotime(my_server_time()))); goto aKwjs; npK4A: switch (my_uri_segment(3)) { case 'A': $offset = '-3 day'; break; case 'B': $offset = '-14 day'; break; case 'C': $offset = '-1 month'; break; case 'D': $offset = '-3 month'; break; case 'E': $offset = '-6 month'; break; case 'F': $offset = '-12 month'; break; case 'G': $offset = '-1 second'; break; } goto K3BWR; aKwjs: $this->db->where('created_time<=', $before_this_time)->delete('activity'); goto jhXqg; jhXqg: echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"CallBack"}'; goto ogN0w; UYh1r: my_check_demo_mode('alert_json'); goto npK4A; ogN0w: } public function list_online() { !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/list_online'); } public function send_notification() { !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/send_notification'); } public function send_notification_action() { goto W9tnw; SW7AM: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/send_notification'); } else { goto vaOsx; dQoki: $this->session->set_flashdata('flash_success', my_caption('notification_send_success')); goto LbHne; vaOsx: $res = $this->admin_model->send_notification($this->setting); goto dQoki; LbHne: redirect(base_url('admin/send_notification')); goto N1Ajq; N1Ajq: } goto V9gPD; Ha0ib: $this->form_validation->set_rules('notification_body', my_caption('notification_body'), 'trim|required'); goto SW7AM; gru9X: $this->form_validation->set_rules('notification_subject', my_caption('notification_subject'), 'trim|required|max_length[255]'); goto Ha0ib; RR3Pw: my_check_demo_mode(); goto gru9X; W9tnw: !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; goto RR3Pw; V9gPD: } public function list_notification() { !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/list_notification'); } public function list_notification_view() { goto CPX9E; CPX9E: !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; goto NOEoU; NOEoU: $query = $this->db->where('ids', my_uri_segment(3))->get('notification', 1); goto vKskH; vKskH: if ($query->num_rows()) { $data['rs'] = $query->row(); my_load_view($this->setting->theme, 'Generic/view_notification', $data); } else { echo my_caption('global_no_entries_found'); } goto LB7Rb; LB7Rb: } public function general_setting_tc() { !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/terms_conditions'); } public function general_setting_pp() { !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/privacy_policy'); } public function database_backup() { !my_check_permission('Database Backup') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/database_backup'); } public function database_backup_action() { goto F2i2i; uVCIY: $this->load->dbutil(); goto aSH_R; sI4od: $this->db->update('setting', array('last_backup_time' => my_server_time())); goto uVCIY; aSH_R: $backup = $this->dbutil->backup($prefs); goto aroWw; ASyRB: $backup_filename = 'backup_' . $options . '_' . my_server_time('UTC', 'YmdHis') . '_' . random_string('alnum', 6) . '.zip'; goto igfKU; DZiQC: my_post('backup_action') == 'A' ? redirect(base_url('admin/database_backup')) : force_download($backup_filename, $backup); goto jWl9A; igfKU: $prefs += array('format' => 'zip', 'filename' => $backup_filename); goto sI4od; aroWw: if (my_post('backup_action') == 'A') { goto mvLw3; gZYi1: $this->session->set_flashdata('flash_success', $message); goto cCdj8; mvLw3: $options .= ', Save'; goto uyl2n; ZENA2: strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' ? $file_full_path = FCPATH . 'backup\' . $backup_filename : ($file_full_path = FCPATH . 'backup/' . $backup_filename); goto uYSS3; SZRBo: $message = my_caption('database_backup_success') . $file_full_path; goto gZYi1; uYSS3: write_file($file_full_path, $backup); goto SZRBo; uyl2n: $this->load->helper('file'); goto ZENA2; cCdj8: } else { goto VwqXj; VwqXj: $options .= ' Download'; goto DkKg_; DkKg_: $file_full_path = $backup_filename; goto BoqaM; BoqaM: $this->load->helper('download'); goto wEhuQ; wEhuQ: } goto v4iP8; qO7TB: $this->db->insert('backup_log', $log_array); goto DZiQC; v4iP8: $log_array = array('ids' => my_random(), 'file_path' => $file_full_path, 'options' => $options, 'created_method' => 'Manual', 'created_time' => my_server_time()); goto qO7TB; F2i2i: !my_check_permission('Database Backup') ? die(my_caption('global_not_enough_permission')) : null; goto ttbNx; i2qot: if (my_post('backup_range') == 'A') { $prefs = array('tables' => explode(',', $this->config->item('my_key_table'))); $options = 'Partially'; } else { $prefs = array('tables' => array()); $options = 'Fully'; } goto ASyRB; ttbNx: my_check_demo_mode(); goto i2qot; jWl9A: } public function general_setting_tc_action() { goto RN53M; MhEKS: my_check_demo_mode(); goto nV43Q; hSSG1: $this->form_validation->set_rules('tc_body', my_caption('gs_tc_body'), 'trim|required'); goto IE0JV; IE0JV: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/terms_conditions'); } else { goto gwu3G; gwu3G: $tc_array['title'] = my_post('tc_title'); goto vKeGL; pljg3: redirect(base_url('admin/general_setting_tc')); goto Vdcmf; gGckJ: $this->db->update('setting', array('terms_conditions' => json_encode($tc_array))); goto s7Iev; s7Iev: $this->session->set_flashdata('flash_success', my_caption('gs_tc_update_success')); goto pljg3; vKeGL: $tc_array['body'] = my_post('tc_body'); goto gGckJ; Vdcmf: } goto BBQab; nV43Q: $this->form_validation->set_rules('tc_title', my_caption('gs_tc_Title'), 'trim|required'); goto hSSG1; RN53M: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto MhEKS; BBQab: } public function general_setting_pp_action() { goto cx4OH; cx4OH: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto VnS7O; nPTnp: $this->form_validation->set_rules('pp_title', my_caption('gs_tc_Title'), 'trim|required'); goto Q3ZPm; Q3ZPm: $this->form_validation->set_rules('pp_body', my_caption('gs_tc_body'), 'trim|required'); goto dW70c; dW70c: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/privacy_policy'); } else { goto cryPL; Ze1m4: $this->session->set_flashdata('flash_success', my_caption('gs_pp_update_success')); goto LW42o; RXQto: $this->db->update('setting', array('privacy_policy' => json_encode($pp_array))); goto Ze1m4; xRnAp: $pp_array['body'] = my_post('pp_body'); goto RXQto; cryPL: $pp_array['title'] = my_post('pp_title'); goto xRnAp; LW42o: redirect(base_url('admin/general_setting_pp')); goto B4cuZ; B4cuZ: } goto BZjar; VnS7O: my_check_demo_mode(); goto nPTnp; BZjar: } public function signin_as_user() { goto gjDQP; xowVP: if ($query->num_rows()) { goto WPOUj; C4s03: if (my_uri_segment(3) == $_SESSION['user_ids']) { $this->session->set_flashdata('flash_danger', my_caption('user_impersonate_self_not_allow')); redirect($_SERVER['HTTP_REFERER']); } elseif ($rs_role->name == 'Super_Admin') { $this->session->set_flashdata('flash_danger', my_caption('user_impersonate_superadmin_not_allow')); redirect($_SERVER['HTTP_REFERER']); } else { goto w0tJO; HDZV_: $this->user_model->sigin_success_log($rs, 'impersonate'); goto wCIuZ; wCIuZ: redirect(base_url('dashboard')); goto xMWWu; w0tJO: $this->load->model('user_model'); goto HDZV_; xMWWu: } goto oLpby; d0w3F: $rs_role = $this->db->where('ids', $rs->role_ids)->get('role', 1)->row(); goto C4s03; WPOUj: $rs = $query->row(); goto d0w3F; oLpby: } else { $this->session->set_flashdata('flash_danger', my_caption('user_impersonate_invalid_user')); redirect($_SERVER['HTTP_REFERER']); } goto fJCqt; gjDQP: !my_check_permission('User Management') ? die(my_caption('global_not_enough_permission')) : null; goto mly98; mly98: $query = $this->db->where('ids', my_uri_segment(3))->get('user', 1); goto xowVP; fJCqt: } public function stop_impersonating() { if (!empty($_SESSION['impersonate'])) { goto AJ3XO; AJ3XO: $this->db->where('ids', $_SESSION['user_ids'])->update('user', array('online' => 0)); goto PL7Ol; vrNuv: redirect(base_url('admin/list_user')); goto Rt1Vj; PL7Ol: $rs = $this->db->where('ids', $_SESSION['impersonate'])->get('user', 1)->row(); goto MSACT; MSACT: $this->load->model('user_model'); goto pOPTc; pOPTc: $this->user_model->sigin_success_log($rs, 'stop_impersonating'); goto vrNuv; Rt1Vj: } else { my_caption('global_not_enough_permission'); } } public function miscellaneous() { !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/miscellaneous'); } public function miscellaneous_action() { goto k_qr7; jd55G: my_check_demo_mode(); goto wOXdn; k_qr7: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto jd55G; nTH31: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/miscellaneous'); } else { goto HlhMP; MvUjA: if ($res['result']) { $this->session->set_flashdata('flash_success', $res['message']); } else { $this->session->set_flashdata('flash_danger', $res['message']); } goto Dw_hS; HlhMP: $res = $this->admin_model->miscellaneous(); goto MvUjA; Dw_hS: redirect(base_url('admin/miscellaneous')); goto Fo9ub; Fo9ub: } goto WriZn; KFRir: $this->form_validation->set_rules('file_size', my_caption('file_manager_file_size'), 'trim|required|numeric'); goto nTH31; wOXdn: $this->form_validation->set_rules('file_type', my_caption('file_manager_file_type'), 'trim|required'); goto KFRir; WriZn: } public function usage_example() { !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/usage_example'); } public function support_setting() { !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/support_setting'); } public function support_setting_action() { goto E7MvG; BcWOK: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/support_setting'); } else { goto fQtxM; s4Ae3: redirect(base_url('admin/support_setting')); goto mfkJA; fAT71: $this->session->set_flashdata('flash_success', my_caption('support_setting_update_success')); goto s4Ae3; fQtxM: $this->admin_model->support_setting_update(); goto fAT71; mfkJA: } goto AUYcu; bnCmp: $this->form_validation->set_rules('act', '', 'in_list[support_setting]'); goto BcWOK; bj9Qy: if (my_post('support_ticket_notification_email_address') != '') { $this->form_validation->set_rules('support_ticket_notification_email_address', my_caption('global_email_address'), 'trim|valid_emails'); } goto bnCmp; s290T: my_check_demo_mode(); goto bj9Qy; E7MvG: !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; goto s290T; AUYcu: } public function ticket_list() { !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/ticket_list'); } public function ticket_view() { goto bnvna; bnvna: !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; goto gArnS; gArnS: $res = $this->get_ticket(my_uri_segment(3)); goto n1k0n; n1k0n: if ($res == FALSE) { echo my_caption('global_no_entries_found'); } else { if ($res['rs']->main_status == 2) { $this->db->where('ids', my_uri_segment(3))->where('read_status', 0)->update('ticket', array('read_status' => 1)); $this->db->where('ids_father', my_uri_segment(3))->where('source', 'user')->where('read_status', 0)->update('ticket', array('read_status' => 1)); } my_load_view($this->setting->theme, 'Generic/view_ticket', $res); } goto O_9qu; O_9qu: } public function ticket_view_action() { goto Ni0vs; Dvnzz: my_check_demo_mode(); goto Wgffs; Ni0vs: !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; goto Dvnzz; JIc0F: if ($this->form_validation->run() == FALSE) { $res = $this->get_ticket(my_post('ids_father')); my_load_view($this->setting->theme, 'Generic/view_ticket', $res); } else { $query = $this->db->where('ids', my_post('ids_father'))->get('ticket', 1); if ($query->num_rows()) { goto dMe9X; unU8X: redirect(base_url('admin/ticket_view/' . $ids)); goto Pjhdi; dMe9X: $this->load->model('user_model'); goto x87FZ; vdLYt: $this->session->set_flashdata('flash_success', my_caption('support_ticket_notice_reply_saved')); goto unU8X; x87FZ: $ids = $this->user_model->update_ticket('agent_update'); goto vdLYt; Pjhdi: } else { echo my_caption('global_no_entries_found'); } } goto KBMaa; Wgffs: $this->form_validation->set_rules('ticket_reply', my_caption('global_reply'), 'trim|required'); goto JIc0F; KBMaa: } public function ticket_close_action() { goto tDIeh; tDIeh: !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; goto USFuV; TAu07: echo '{"result":true, "title":"", "text":"' . my_caption('support_ticket_notice_close') . '", "redirect":"' . base_url('admin/ticket_view/' . my_uri_segment(3)) . '"}'; goto OYwzC; nVeqi: $this->db->where('ids', my_uri_segment(3))->where('main_status!=', 0)->update('ticket', array('main_status' => 0, 'read_status' => 1, 'updated_time' => my_server_time())); goto TAu07; USFuV: my_check_demo_mode('alert_json'); goto nVeqi; OYwzC: } public function ticket_remove() { goto bz6C4; bz6C4: !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; goto FCI1y; FCI1y: my_check_demo_mode('alert_json'); goto QO86_; a7xFk: echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"' . $redirect . '"}'; goto iqSJt; QO86_: if (my_uri_segment(3) == 'full') { goto PJ5nr; FCr9S: $redirect = base_url('admin/ticket_list'); goto qliSl; PJ5nr: $this->db->where('ids', my_uri_segment(4))->delete('ticket'); goto YmDl8; YmDl8: $this->db->where('ids_father', my_uri_segment(4))->delete('ticket'); goto FCr9S; qliSl: } else { $this->db->where('ids', my_uri_segment(5))->delete('ticket'); $redirect = base_url('admin/ticket_view/' . my_uri_segment(4)); } goto a7xFk; iqSJt: } public function catalog() { goto BEZxT; JwtrV: my_load_view($this->setting->theme, 'Admin/list_catalog', $data); goto DdKgh; e_Yrw: $query = $this->db->order_by('type', 'asc')->order_by('id', 'desc')->get('catalog'); goto oKmts; BEZxT: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto e_Yrw; oKmts: if ($query->num_rows()) { $data['rs'] = $query->result(); } else { $data['rs'] = ''; } goto JwtrV; DdKgh: } public function catalog_add_action() { goto vw6BD; eRlCD: if ($this->form_validation->run() == FALSE) { echo '{"result":false, "message":"' . strip_tags($this->form_validation->error('catalog_name')) . '"}'; } else { $query = $this->db->where('type', my_post('catalog_type'))->where('name', my_post('catalog_name'))->get('catalog', 1); if ($query->num_rows()) { echo '{"result":false, "message":"' . my_caption('catalog_duplicated_notice') . '"}'; } else { goto SwWzW; kBl7q: if ($process_result) { goto sBLtt; LzL9U: echo '{"result":true, "message":"' . my_caption('catalog_created') . '"}'; goto Mg4bW; RFyTR: $this->db->insert('catalog', $data); goto LzL9U; sBLtt: $data = array('ids' => my_random(), 'type' => my_post('catalog_type'), 'name' => my_post('catalog_name'), 'description' => my_post('catalog_description')); goto RFyTR; Mg4bW: } else { echo '{"result":false, "message":"' . my_caption('catalog_folder_failed_to_perform') . '"}'; } goto Cprnd; SwWzW: $process_result = TRUE; goto g9jox; g9jox: if (my_post('catalog_type') == 'file_manager_folder') { if (!is_dir($this->config->item('my_upload_directory') . my_post('catalog_name'))) { mkdir($this->config->item('my_upload_directory') . my_post('catalog_name'), 0777, TRUE) ? $process_result = TRUE : ($process_result = FALSE); } } goto kBl7q; Cprnd: } } goto GWDtH; REcfM: $this->form_validation->set_rules('catalog_description', my_caption('catalog_description'), 'trim|max_length[1024]'); goto eRlCD; vw6BD: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto TAK0R; pvuvT: $this->form_validation->set_rules('catalog_name', my_caption('catalog_name'), 'trim|required|max_length[50]'); goto REcfM; TAK0R: my_check_demo_mode('simple_json'); goto pvuvT; GWDtH: } public function catalog_edit_action() { goto Hm0ii; mqHg4: $this->form_validation->set_rules('catalog_name', my_caption('catalog_name'), 'trim|required|max_length[50]'); goto tQD5N; N4RC2: if ($this->form_validation->run() == FALSE) { echo '{"result":false, "message":"' . strip_tags($this->form_validation->error('catalog_name')) . '"}'; } else { $query = $this->db->where('type', my_post('catalog_type'))->where('name', my_post('catalog_name'))->where('ids!=', my_post('catalog_hidden_ids'))->get('catalog', 1); if ($query->num_rows()) { echo '{"result":false, "message":"' . my_caption('catalog_duplicated_notice') . '"}'; } else { goto jigfT; yx2MS: if ($process_result) { $this->db->where('ids', my_post('catalog_hidden_ids'))->update('catalog', array('name' => my_post('catalog_name'), 'description' => my_post('catalog_description'))); echo '{"result":true, "message":"' . my_caption('catalog_updated') . '"}'; } else { echo '{"result":false, "message":"' . my_caption('catalog_folder_failed_to_perform') . '"}'; } goto HVzxJ; jigfT: $rs = $this->db->where('ids', my_post('catalog_hidden_ids'))->get('catalog', 1)->row(); goto IFpdG; IFpdG: $process_result = TRUE; goto Bon6r; Bon6r: if (my_post('catalog_type') == 'file_manager_folder') { if ($rs->name != my_post('catalog_name')) { if (!is_dir($this->config->item('my_upload_directory') . my_post('catalog_name'))) { $this->db->where('catalog', $rs->name)->update('file_manager', array('catalog' => my_post('catalog_name'))); rename($this->config->item('my_upload_directory') . $rs->name, $this->config->item('my_upload_directory') . my_post('catalog_name')) ? $process_result = TRUE : ($process_result = FALSE); } else { $process_result = FALSE; } } } elseif (my_post('catalog_type') == 'support_faq') { $this->db->where('catalog', $rs->name)->update('faq', array('catalog' => my_post('catalog_name'))); } elseif (my_post('catalog_type') == 'support_documentation') { $this->db->where('catalog', $rs->name)->update('documentation', array('catalog' => my_post('catalog_name'))); } elseif (my_post('catalog_type') == 'blog_catalog') { $this->db->where('catalog', $rs->name)->update('blog', array('catalog' => my_post('catalog_name'))); } goto yx2MS; HVzxJ: } } goto fdRLh; tQD5N: $this->form_validation->set_rules('catalog_description', my_caption('catalog_description'), 'trim|max_length[1024]'); goto N4RC2; Hm0ii: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto XrdzE; XrdzE: my_check_demo_mode('simple_json'); goto mqHg4; fdRLh: } public function catalog_remove_action() { goto aNuzD; jLe0X: my_check_demo_mode('alert_json'); goto KccQB; aNuzD: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto jLe0X; Vc8Rc: echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"' . base_url('admin/catalog') . '"}'; goto NLoKE; KccQB: $query = $this->db->where('ids', my_uri_segment(3))->get('catalog', 1); goto yRSa1; yRSa1: if ($query->num_rows()) { goto NPQDh; gQ86E: switch ($catalog_type) { case 'file_manager_folder': goto FSILU; X6QaA: rmdir($dir_path); goto LHstq; FSILU: $dir_path = $this->config->item('my_upload_directory') . $catalog_name; goto bh1F0; LHstq: break; goto Hi5xA; bh1F0: array_map('unlink', glob($dir_path . '/*.*')); goto X6QaA; Hi5xA: case 'support_faq': $this->db->where('catalog', $catalog_name)->delete('faq'); break; case 'support_documentation': $this->db->where('catalog', $catalog_name)->delete('documentation'); break; } goto nSmRX; NPQDh: $catalog_name = $query->row()->name; goto DIVuS; DIVuS: $catalog_type = $query->row()->type; goto gQ86E; nSmRX: $this->db->where('catalog', $query->row()->name)->where('user_ids', $_SESSION['user_ids'])->delete('file_manager'); goto FlNio; FlNio: $this->db->where('ids', my_uri_segment(3))->delete('catalog'); goto De3Ac; De3Ac: } goto Vc8Rc; NLoKE: } public function faq_list() { !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/faq_list'); } public function faq_new() { !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/faq_detail'); } public function faq_edit() { goto Ym39V; gzIMR: if ($query->num_rows()) { $data['rs'] = $query->row(); my_load_view($this->setting->theme, 'Admin/faq_detail', $data); } else { echo my_caption('global_no_entries_found'); } goto B8yIZ; Ym39V: !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; goto PB3uS; PB3uS: $query = $this->db->where('ids', my_uri_segment(3))->get('faq', 1); goto gzIMR; B8yIZ: } public function faq_action() { goto ViGuM; ViGuM: !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; goto YuVI7; YuVI7: $action = my_uri_segment(3); goto IqvwW; IqvwW: if ($action == 'new') { goto zhAzY; zhAzY: my_check_demo_mode(); goto kNJQB; WPiVD: $this->form_validation->set_rules('faq_catalog', my_caption('support_faq_catalog'), 'trim|required|max_length[50]'); goto a4x2c; kNJQB: $this->form_validation->set_rules('faq_subject', my_caption('support_faq_subject'), 'trim|required|max_length[255]'); goto WPiVD; a4x2c: $this->form_validation->set_rules('faq_body', my_caption('support_faq_body'), 'trim|required'); goto HxyOh; HxyOh: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/faq_detail'); } else { goto yZdA7; jWDPt: $this->db->insert('faq', $insert_array); goto yFBWF; yZdA7: $insert_array = array('ids' => my_random(), 'user_ids' => $_SESSION['user_ids'], 'catalog' => my_post('faq_catalog'), 'subject' => my_post('faq_subject'), 'body' => my_post('faq_body'), 'created_time' => my_server_time(), 'enabled' => 1); goto jWDPt; yFBWF: $this->session->set_flashdata('flash_success', my_caption('support_faq_add_success')); goto Fbbsp; Fbbsp: redirect(base_url('admin/faq_list/')); goto yQZZJ; yQZZJ: } goto o520v; o520v: } else { goto wYIxC; TWIB4: $query = $this->db->where('ids', $ids)->get('faq', 1); goto zfHeC; zfHeC: if ($query->num_rows()) { $rs = $query->row(); if ($action == 'edit') { goto yhvp5; gH_Zf: $this->form_validation->set_rules('faq_subject', my_caption('support_faq_subject'), 'trim|required|max_length[255]'); goto Y6UOM; Y6UOM: $this->form_validation->set_rules('faq_catalog', my_caption('support_faq_catalog'), 'trim|required|max_length[50]'); goto E_jFP; IYW72: if ($this->form_validation->run() == FALSE) { $data['rs'] = $rs; my_load_view($this->setting->theme, 'Admin/faq_detail', $data); } else { goto ejYRm; aAqFO: $this->db->where('ids', $ids)->update('faq', $update_array); goto AfdCo; ejYRm: $update_array = array('catalog' => my_post('faq_catalog'), 'subject' => my_post('faq_subject'), 'body' => my_post('faq_body')); goto aAqFO; AfdCo: $this->session->set_flashdata('flash_success', my_caption('support_faq_edit_success')); goto AaE23; AaE23: redirect(base_url('admin/faq_edit/' . $ids)); goto jOUzr; jOUzr: } goto WAIJR; yhvp5: my_check_demo_mode(); goto gH_Zf; E_jFP: $this->form_validation->set_rules('faq_body', my_caption('support_faq_body'), 'trim|required'); goto IYW72; WAIJR: } else { goto zKaf7; zKaf7: my_check_demo_mode('alert_json'); goto pEDP6; pEDP6: $this->db->where('ids', $ids)->delete('faq'); goto YnjXJ; YnjXJ: echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"CallBack"}'; goto O12X4; O12X4: } } else { echo '{"result":false, "title":"' . my_caption('global_failure') . '", "text":"' . my_caption('global_no_entries_found') . '", "redirect":"CallBack"}'; } goto AFXOu; wYIxC: $ids = my_uri_segment(4); goto TWIB4; AFXOu: } goto YFDDE; YFDDE: } public function documentation_list() { !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/documentation_list'); } public function documentation_new() { !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/documentation_detail'); } public function documentation_edit() { goto ENDsB; teLTs: if ($query->num_rows()) { $data['rs'] = $query->row(); my_load_view($this->setting->theme, 'Admin/documentation_detail', $data); } else { echo my_caption('global_no_entries_found'); } goto FzPG9; Gf41G: $query = $this->db->where('ids', my_uri_segment(3))->get('documentation', 1); goto teLTs; ENDsB: !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; goto Gf41G; FzPG9: } public function documentation_action() { goto NI9w5; a7s9V: if ($action == 'new') { goto ORG_x; yhSgt: $this->form_validation->set_rules('documentation_subject', my_caption('support_documentation_subject'), 'trim|required|max_length[255]'); goto hTLLu; hTLLu: $this->form_validation->set_rules('documentation_catalog', my_caption('support_documentation_catalog'), 'trim|required|max_length[50]'); goto ne0A_; KM3aJ: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/documentation_detail'); } else { goto xIwAk; CtyqZ: $this->db->insert('documentation', $insert_array); goto BPGW9; Vmb2p: $insert_array = array('ids' => my_random(), 'user_ids' => $_SESSION['user_ids'], 'slug' => $slug, 'catalog' => my_post('documentation_catalog'), 'subject' => my_post('documentation_subject'), 'keyword' => my_post('documentation_keyword'), 'body' => $this->input->post('documentation_body', FALSE), 'attachment' => '', 'created_time' => my_server_time(), 'updated_time' => my_server_time(), 'enabled' => $documentation_enabled); goto CtyqZ; G3TGc: redirect(base_url('admin/documentation_list/')); goto H0f2E; xIwAk: $slug = my_generate_slug('documentation', 'slug', my_post('documentation_subject')); goto iVT67; BPGW9: $this->session->set_flashdata('flash_success', my_caption('support_documentation_add_success')); goto G3TGc; iVT67: my_post('documentation_enabled') == '1' ? $documentation_enabled = 1 : ($documentation_enabled = 0); goto Vmb2p; H0f2E: } goto k4BSP; ORG_x: my_check_demo_mode(); goto yhSgt; JLl8I: $this->form_validation->set_rules('documentation_body', my_caption('support_documentation_body'), 'trim|required'); goto KM3aJ; ne0A_: $this->form_validation->set_rules('documentation_keyword', my_caption('global_keyword'), 'trim|max_length[1024]'); goto JLl8I; k4BSP: } else { goto t2yzS; bdDD0: if ($query->num_rows()) { $rs = $query->row(); if ($action == 'edit') { goto KEq8a; sMI2Z: if ($this->form_validation->run() == FALSE) { $data['rs'] = $rs; my_load_view($this->setting->theme, 'Admin/documentation_detail', $data); } else { goto gSIVw; YICxu: $this->session->set_flashdata('flash_success', my_caption('support_documentation_edit_success')); goto F0fie; gSIVw: my_post('documentation_enabled') == '1' ? $documentation_enabled = 1 : ($documentation_enabled = 0); goto gvwLc; gvwLc: $update_array = array('catalog' => my_post('documentation_catalog'), 'subject' => my_post('documentation_subject'), 'keyword' => my_post('documentation_keyword'), 'body' => $this->input->post('documentation_body', FALSE), 'updated_time' => my_server_time(), 'enabled' => $documentation_enabled); goto y2Uga; y2Uga: $this->db->where('ids', $ids)->update('documentation', $update_array); goto YICxu; F0fie: redirect(base_url('admin/documentation_edit/' . $ids)); goto PyvXZ; PyvXZ: } goto Smhpx; OOmEs: $this->form_validation->set_rules('documentation_subject', my_caption('support_documentation_subject'), 'trim|required|max_length[255]'); goto Ut706; jdjDO: $this->form_validation->set_rules('documentation_body', my_caption('support_documentation_body'), 'trim|required'); goto sMI2Z; Ut706: $this->form_validation->set_rules('documentation_catalog', my_caption('support_documentation_catalog'), 'trim|required|max_length[50]'); goto HBEMk; HBEMk: $this->form_validation->set_rules('documentation_keyword', my_caption('global_keyword'), 'trim|max_length[1024]'); goto jdjDO; KEq8a: my_check_demo_mode(); goto OOmEs; Smhpx: } else { goto wa339; DJGIG: echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"CallBack"}'; goto cH8b7; wa339: my_check_demo_mode('alert_json'); goto xlW_R; xlW_R: $this->db->where('ids', $ids)->delete('documentation'); goto DJGIG; cH8b7: } } else { echo '{"result":false, "title":"' . my_caption('global_failure') . '", "text":"' . my_caption('global_no_entries_found') . '", "redirect":"CallBack"}'; } goto Oofkw; t2yzS: $ids = my_uri_segment(4); goto uHzhJ; uHzhJ: $query = $this->db->where('ids', $ids)->get('documentation', 1); goto bdDD0; Oofkw: } goto qr60u; LMnOd: $action = my_uri_segment(3); goto a7s9V; NI9w5: !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; goto LMnOd; qr60u: } public function contact_form_list() { !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/contact_form_list'); } public function contact_form_view() { goto WWfwn; X9Yjh: $query = $this->db->where('ids', my_uri_segment(3))->get('contact_form', 1); goto L_H8V; WWfwn: !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; goto X9Yjh; L_H8V: if ($query->num_rows()) { goto uHkbc; uHkbc: $data['rs'] = $query->row(); goto hkzYI; hkzYI: $this->db->where('ids', my_uri_segment(3))->where('read_status', 0)->update('contact_form', array('read_status' => 1)); goto InpuH; InpuH: my_load_view($this->setting->theme, 'Admin/contact_form_view', $data); goto v6g2A; v6g2A: } else { echo my_caption('global_no_entries_found'); } goto gEq_I; gEq_I: } public function contact_form_action() { goto ql5Tc; qMrPk: my_check_demo_mode(); goto aY4J7; ql5Tc: !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; goto qMrPk; aY4J7: if (my_uri_segment(3) == 'remove') { $this->db->where('ids', my_uri_segment(4))->delete('contact_form'); echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"CallBack"}'; } goto aecSt; aecSt: } public function front_setting() { !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/front_setting'); } public function front_setting_action() { goto sMy18; OjC1E: $this->form_validation->set_rules('email_address', my_caption('global_email_address'), 'trim|valid_email'); goto m1LW1; m1LW1: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/front_setting'); } else { goto GV455; HiRWh: if (isset($_FILES['userfile']['name'])) { if ($_FILES['userfile']['name'] != '') { goto d9RD1; iFyfW: if ($this->upload->do_upload()) { try { unlink(FCPATH . $this->config->item('my_upload_directory') . $logo_filename); } catch (\Exception $e) { } $logo_filename = $this->upload->data('file_name'); } goto EpHJg; d9RD1: $config = array('upload_path' => FCPATH . $this->config->item('my_upload_directory'), 'allowed_types' => 'png|jpg|jpeg|gif|svg', 'encrypt_name' => TRUE); goto i75J3; i75J3: $this->load->library('upload', $config); goto iFyfW; EpHJg: } } goto pP9pK; iEXhX: redirect(base_url('admin/front_setting')); goto demGL; bmDBu: $this->session->set_flashdata('flash_success', my_caption('front_setting_update_success')); goto iEXhX; pP9pK: $this->admin_model->front_setting_update($logo_filename); goto bmDBu; GV455: $front_setting = json_decode($this->setting->front_setting, TRUE); goto phzQA; phzQA: $logo_filename = $front_setting['logo']; goto HiRWh; demGL: } goto K5f74; sMy18: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto fyh2Z; KzZmX: $this->form_validation->set_rules('act', 'act', 'trim|in_list[front_setting]'); goto OjC1E; fyh2Z: my_check_demo_mode(); goto KzZmX; K5f74: } public function subscriber() { !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/list_subscriber'); } public function subscriber_action() { !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; if (my_uri_segment(3) == 'remove') { goto p3mae; otr3z: $this->db->where('ids', my_uri_segment(4))->delete('subscriber'); goto ab0fH; p3mae: my_check_demo_mode('alert_json'); goto otr3z; ab0fH: echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"CallBack"}'; goto BvphD; BvphD: } elseif (my_uri_segment(3) == 'download') { goto T22_8; NDTa4: if ($query->num_rows()) { goto x3F8t; ehAnt: force_download('subscriber.txt', $data); goto QbWL0; x3F8t: $rs = $query->result(); goto Sqd2p; DK1B4: foreach ($rs as $row) { $data .= $row->email_address . "
"; } goto dazjF; dazjF: $this->load->helper('download'); goto ehAnt; Sqd2p: $data = ''; goto DK1B4; QbWL0: } else { $this->session->set_flashdata('flash_danger', my_caption('subscriber_no_subscriber_to_download')); redirect('admin/subscriber'); } goto BoQ96; T22_8: my_check_demo_mode(); goto VYCOL; VYCOL: $query = $this->db->order_by('id', 'asc')->get('subscriber'); goto NDTa4; BoQ96: } } public function blog() { !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/blog_list'); } public function blog_new() { !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/blog_detail'); } public function blog_new_action() { goto d4li1; y9wBX: my_check_demo_mode(); goto SciQI; yDqJO: $this->form_validation->set_rules('blog_body', my_caption('blog_body'), 'trim|required'); goto E24gn; E24gn: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/blog_detail'); } else { goto PFh1E; U99t1: redirect(base_url('admin/blog_edit/' . $ids)); goto iKXnF; PFh1E: $ids = $this->admin_model->blog_save(); goto juzJD; juzJD: $this->session->set_flashdata('flash_success', my_caption('blog_new_success')); goto U99t1; iKXnF: } goto yNblr; SciQI: $this->form_validation->set_rules('blog_catalog', my_caption('blog_catalog'), 'trim|required|max_length[50]'); goto QWJb2; d4li1: !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; goto y9wBX; QWJb2: $this->form_validation->set_rules('blog_subject', my_caption('blog_subject'), 'trim|required|max_length[255]'); goto n56I0; n56I0: $this->form_validation->set_rules('blog_keyword', my_caption('global_keyword'), 'trim|max_length[1024]'); goto yDqJO; yNblr: } public function blog_edit() { goto HykCH; kATo2: $query = $this->db->where('ids', my_uri_segment(3))->get('blog', 1); goto QaVLP; QaVLP: if ($query->num_rows()) { $data['rs'] = $query->row(); my_load_view($this->setting->theme, 'Admin/blog_detail', $data); } else { echo my_caption('global_no_entries_found'); } goto hoQR2; HykCH: !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; goto kATo2; hoQR2: } public function blog_edit_action() { goto OHlXH; bu2Hz: my_check_demo_mode(); goto JWHDc; JWHDc: $ids = my_uri_segment(3); goto cxrvE; OHlXH: !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; goto bu2Hz; cxrvE: $query = $this->db->where('ids', $ids)->get('blog', 1); goto Ufvxl; Ufvxl: if ($query->num_rows()) { goto qjerB; Iwur8: $this->form_validation->set_rules('blog_keyword', my_caption('global_keyword'), 'trim|max_length[1024]'); goto mpEWe; cSdVn: $this->form_validation->set_rules('blog_subject', my_caption('blog_subject'), 'trim|required|max_length[255]'); goto Iwur8; q6nkW: if ($this->form_validation->run() == FALSE) { $data['rs'] = $rs; my_load_view($this->setting->theme, 'Admin/blog_detail', $data); } else { goto F6YkJ; wRkl5: $this->session->set_flashdata('flash_success', my_caption('blog_edit_success')); goto FWo2j; F6YkJ: $this->admin_model->blog_update($ids); goto wRkl5; FWo2j: redirect(base_url('admin/blog_edit/' . $ids)); goto l_ZzF; l_ZzF: } goto lDjFk; mpEWe: $this->form_validation->set_rules('blog_body', my_caption('blog_body'), 'trim|required'); goto q6nkW; qjerB: $rs = $query->row(); goto nqPrH; nqPrH: $this->form_validation->set_rules('blog_catalog', my_caption('blog_catalog'), 'trim|required|max_length[50]'); goto cSdVn; lDjFk: } else { echo my_caption('global_no_entries_found'); } goto VICYu; VICYu: } public function blog_remove() { goto hclLO; rXvCd: echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"CallBack"}'; goto xtYLv; b7Wi6: if ($query->num_rows()) { $rs = $query->row(); if ($rs->cover_photo != '') { $file_full_path = FCPATH . $this->config->item('my_upload_directory') . 'blog/' . $rs->cover_photo; file_exists($file_full_path) ? unlink($file_full_path) : null; } } goto t0cip; hclLO: !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; goto Nu3d2; t0cip: $this->db->where('ids', my_uri_segment(3))->delete('blog'); goto rXvCd; Nu3d2: my_check_demo_mode('alert_json'); goto ceopF; ceopF: $query = $this->db->where('ids', my_uri_segment(3))->get('blog', 1); goto b7Wi6; xtYLv: } public function reset_api_key() { goto jNaNz; XpYhX: echo '{"result":true, "title":"", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"' . base_url('admin/edit_user/') . my_uri_segment(3) . '"}'; goto ZDQ3V; bX1RZ: $this->db->where('ids', my_uri_segment(3))->update('user', array('api_key' => my_random())); goto XpYhX; jNaNz: !my_check_permission('User Management') ? die(my_caption('global_not_enough_permission')) : null; goto rXXkY; rXXkY: my_check_demo_mode('alert_json'); goto bX1RZ; ZDQ3V: } public function upgrade_software() { goto yrhyI; yrhyI: !my_check_role('Super Admin') ? die(my_caption('global_not_enough_permission')) : null; goto noRwH; sPkr6: $query = $this->db->order_by('name', 'asc')->get('script_addons'); goto FuFy4; sRIrQ: $latest_version = $this->setting->version; goto cfGql; DCLZU: if ($latest_version_array['notification_case'] == 'notification_operation_ok') { $latest_version = $latest_version_array['notification_data']['version_number']; $script_name = $latest_version_array['notification_data']['product_title']; } goto SidLc; KmQH0: $addons_version_array = array(); goto sPkr6; noRwH: $this->load->library('m_aus'); goto sRIrQ; ZdsC5: $data['main_version'] = $main_version_array; goto BuSzt; SidLc: $main_version_array = array('type' => 'Main Script', 'name' => $script_name, 'current_version' => $this->setting->version, 'latest_version' => $latest_version); goto KmQH0; eMLTT: my_load_view($this->setting->theme, 'Admin/upgrade_software', $data); goto CzHHV; byiAU: $latest_version_array = $this->m_aus->getLatestVersion(); goto DCLZU; BuSzt: $data['addons_version'] = $addons_version_array; goto eMLTT; cfGql: $script_name = $this->setting->sys_name; goto byiAU; FuFy4: if ($query->num_rows()) { $rs = $query->result(); foreach ($rs as $row) { goto jRFey; W_qzH: $latest_version_array = $this->m_aus->getLatestVersion('', $row->updater_id, $row->updater_key); goto Kfbvi; jRFey: $latest_version = $row->version; goto mP72c; mP72c: $script_name = $row->name; goto W_qzH; W7MYP: array_push($addons_version_array, array('type' => 'Add-ons', 'id' => $row->id, 'name' => $script_name, 'current_version' => $row->version, 'latest_version' => $latest_version)); goto Uqbom; Kfbvi: if ($latest_version_array['notification_case'] == 'notification_operation_ok') { $latest_version = $latest_version_array['notification_data']['version_number']; $script_name = $latest_version_array['notification_data']['product_title']; } goto W7MYP; Uqbom: } } goto ZdsC5; CzHHV: } public function upgrade_software_view() { goto vmfHl; BEaY2: $dir_view = FCPATH . 'application/views'; goto WCO6k; Gco9N: if ($all_version_array['notification_case'] == 'notification_operation_ok') { goto qlKa7; NBWg3: $current_version_array = explode('.', $data['current_version']); goto Q0nfh; MlFg_: foreach ($version_array as $version) { goto vn7ES; LLPjS: if ($current_version_main == $remote_version_main && $current_version_db == $remote_version_db && $current_version_file == $remote_version_file) { break; } goto SeWQR; p0sJN: $remote_version_file = $remote_version_array[2]; goto LLPjS; d3g8h: $remote_version_main = $remote_version_array[0]; goto hzW8O; SeWQR: $i++; goto o8u8R; vn7ES: $remote_version_array = explode('.', $version['version_number']); goto d3g8h; hzW8O: $remote_version_db = $remote_version_array[1]; goto p0sJN; o8u8R: } goto HEDeG; ypQtp: if ($data['ready_version'] != $data['current_version']) { $data['script_type'] == 'Main Script' ? $ready_version_info_array = $this->m_aus->getLatestVersion($data['ready_version']) : ($ready_version_info_array = $this->m_aus->getLatestVersion($data['ready_version'], $rs->updater_id, $rs->updater_key)); if ($ready_version_info_array['notification_case'] == 'notification_operation_ok') { $data['ready_version_date'] = $ready_version_info_array['notification_data']['version_date']; $data['ready_version_changelog'] = $ready_version_info_array['notification_data']['version_changelog']; } else { $data['ready_version_changelog'] = 'UnKnown'; } } else { $data['ready_version_date'] = ''; $data['ready_version_changelog'] = ''; } goto GCKEn; qlKa7: $data['script_name'] = $all_version_array['notification_data']['product_title']; goto m9DcH; ll_yt: $current_version_db = $current_version_array[1]; goto rWSFj; Wyk9L: $i = 0; goto MlFg_; Q0nfh: $current_version_main = $current_version_array[0]; goto ll_yt; I5CSS: $version_array = array_reverse($all_version_array['notification_data']['product_versions']); goto NBWg3; HEDeG: if ($i < count($version_array) - 1) { $data['ready_version'] = $version_array[$i + 1]['version_number']; $data['total_version'] = count($version_array) - $i - 1; } else { $data['ready_version'] = $data['current_version']; $data['total_version'] = 0; } goto ypQtp; m9DcH: $data['latest_version'] = $all_version_array['notification_data']['version_number']; goto o5xIO; rWSFj: $current_version_file = $current_version_array[2]; goto Wyk9L; o5xIO: $data['latest_version_date'] = $all_version_array['notification_data']['version_date']; goto I5CSS; GCKEn: } else { goto zeTyr; zeTyr: $data['latest_version'] = 'UnKnown'; goto xZ7Yg; KH26i: $data['total_version'] = 0; goto rntj9; rntj9: $data['ready_version_changelog'] = 'UnKnown'; goto M8ty5; jdawK: $data['ready_version'] = $data['current_version']; goto E1S5M; E1S5M: $data['ready_version_date'] = 'UnKnown'; goto KH26i; xZ7Yg: $data['latest_version_date'] = 'UnKnown'; goto jdawK; M8ty5: } goto niLMM; lIGEo: $dir_hook = FCPATH . 'application/hooks'; goto c1L_1; i4gTn: if (my_uri_segment(3) == '') { goto qriyh; lE42E: $data['current_version'] = $this->setting->version; goto nMqUk; ayKCV: $data['script_name'] = $this->setting->sys_name; goto LCPdb; LCPdb: $all_version_array = $this->m_aus->getAllVersions(); goto aGHId; qriyh: $data['script_ids'] = 0; goto lE42E; nMqUk: $data['script_type'] = 'Main Script'; goto ayKCV; aGHId: } else { $query = $this->db->where('id', my_uri_segment(3))->get('script_addons', 1); if ($query->num_rows()) { goto QnBaZ; aS2fe: $data['script_ids'] = my_uri_segment(3); goto ihc7h; ihc7h: $data['current_version'] = $rs->version; goto b6Uuc; b6Uuc: $data['script_type'] = 'Add-ons'; goto Q_Hah; Q_Hah: $data['script_name'] = $rs->name; goto Bs2qR; QnBaZ: $rs = $query->row(); goto aS2fe; Bs2qR: $all_version_array = $this->m_aus->getAllVersions($rs->updater_id, $rs->updater_key); goto Qib2T; Qib2T: } else { echo my_caption('global_no_entries_found'); die; } } goto Gco9N; vmfHl: !my_check_role('Super Admin') ? die(my_caption('global_not_enough_permission')) : null; goto aCRXX; niLMM: $dir_controller = FCPATH . 'application/controllers'; goto BEaY2; u33AT: $dir_asset = FCPATH . 'assets'; goto s00zW; Fw4IK: $dir_vendor = FCPATH . 'vendor'; goto lIGEo; wzom0: if (is_writable(FCPATH) && is_writable($dir_controller) && is_writable($dir_view) && is_writable($dir_helper) && is_writable($dir_asset) && is_writable($dir_library) && is_writable($dir_vendor) && is_writable($dir_hook) && is_writable($dir_language)) { $data['writeable'] = TRUE; } else { $data['writeable'] = FALSE; } goto UBJlQ; WCO6k: $dir_helper = FCPATH . 'application/helpers'; goto u33AT; UBJlQ: my_load_view($this->setting->theme, 'Admin/upgrade_software_view', $data); goto utUuY; s00zW: $dir_library = FCPATH . 'application/libraries'; goto Fw4IK; c1L_1: $dir_language = FCPATH . 'application/language'; goto wzom0; aCRXX: $this->load->library('m_aus'); goto i4gTn; utUuY: } public function upgrade_software_action() { goto UX415; UX415: !my_check_role('Super Admin') ? die(my_caption('global_not_enough_permission')) : null; goto yfEB8; PZdqj: if ($current_version_checking) { goto qEO2y; Jfp0y: if ($res['notification_case'] == 'notification_operation_ok') { goto yxA_0; VYd3_: $message = my_caption('upgrade_software_success_header') . my_post('ready_version') . my_caption('upgrade_software_success_tail'); goto TpH7k; yxA_0: mysqli_multi_query($this->db->conn_id, str_replace('MY_DB_PREFIX', $this->db->dbprefix, $res['notification_data'])); goto VYd3_; TpH7k: $this->session->set_flashdata('flash_success', $message); goto FSo10; FSo10: } else { $message = my_caption('upgrade_software_fail') . $res['notification_text']; $this->session->set_flashdata('flash_danger', $message); } goto Bg2TP; qEO2y: $this->load->library('m_aus'); goto mzfZ9; mzfZ9: if (my_post('script_ids') == '0') { goto nnqJ4; wYam9: $res = $this->m_aus->downloadFile($license_code, 'version_upgrade_file', my_post('ready_version')); goto R9Ss6; nnqJ4: $license_code = $this->db->query("SELECT * FROM script_license limit 1")->row()->LICENSE_CODE; goto wYam9; R9Ss6: if ($res['notification_case'] == 'notification_operation_ok') { $res = $this->m_aus->fetchQuery($license_code, 'upgrade', my_post('ready_version')); } goto U2qhm; U2qhm: } else { $res = $this->m_aus->downloadFile($rs->license_code, 'version_upgrade_file', my_post('ready_version'), $rs->updater_id, $rs->updater_key); if ($res['notification_case'] == 'notification_operation_ok') { $res = $this->m_aus->fetchQuery($rs->license_code, 'upgrade', my_post('ready_version'), $rs->updater_id, $rs->updater_key); } } goto Jfp0y; Bg2TP: } goto B3UO1; yfEB8: $current_version_checking = TRUE; goto a6w7n; B3UO1: redirect($_SERVER['HTTP_REFERER']); goto VIHFw; a6w7n: if (my_post('script_ids') == '0') { if (my_post('current_version') != $this->setting->version) { $this->session->set_flashdata('flash_danger', my_caption('upgrade_software_version_error')); $current_version_checking = FALSE; } } else { $rs = $this->db->where('id', my_post('script_ids'))->get('script_addons', 1)->row(); if (my_post('current_version') != $rs->version) { $this->session->set_flashdata('flash_danger', my_caption('upgrade_software_version_error')); $current_version_checking = FALSE; } } goto PZdqj; VIHFw: } public function software_license() { goto h1Afk; LFHUb: my_load_view($this->setting->theme, 'Admin/software_license', $data); goto AyVMn; h1Afk: !my_check_role('Super Admin') ? die(my_caption('global_not_enough_permission')) : null; goto EKwzg; EKwzg: if ($this->config->item('my_demo_mode')) { $data['purchase_code'] = '********-***-***-***-************'; } else { $data['purchase_code'] = $this->db->query("SELECT * FROM script_license limit 1")->row()->LICENSE_CODE; } goto LFHUb; AyVMn: } public function software_license_action() { goto mg2Wl; mg2Wl: !my_check_role('Super Admin') ? die(my_caption('global_not_enough_permission')) : null; goto J1WjM; JNoBr: if (my_ulic()) { $this->session->sess_destroy(); die(my_caption('software_license_notice_uninstall_success')); } else { $this->session->set_flashdata('flash_danger', my_caption('software_license_notice_uninstall_fail')); redirect('admin/software_license'); } goto U8reI; J1WjM: my_check_demo_mode(); goto JNoBr; U8reI: } public function print_my_path() { !my_check_role('Super Admin') ? die(my_caption('global_not_enough_permission')) : null; echo 'You script\'s full path is: <strong>' . FCPATH . '</strong>. Generally, you should store the configuration file outside the last directory and fill in the full path of the configuration file.'; } public function email_duplicated_check($email_address) { if (my_duplicated_check('user', array('email_address' => $email_address))) { return TRUE; } else { $this->form_validation->set_message('email_duplicated_check', my_caption('signup_email_taken')); return FALSE; } } public function check_underscore() { if (strstr(my_post('sim_value'), '_')) { $this->form_validation->set_message('check_underscore', my_caption('rp_underscore_not_allowed')); return FALSE; } else { return TRUE; } } public function icon_upload() { goto WZea3; M2fvY: $this->m_upload->set_upload_path('/' . $this->config->item('my_upload_directory')); goto fF502; uHhf6: $res = $this->m_upload->upload_done(); goto N7ZzN; MKCsE: $this->m_upload->set_file_name('favicon'); goto uHhf6; N7ZzN: if ($res['status']) { return TRUE; } else { $this->form_validation->set_message('icon_upload', $res['error']); return FALSE; } goto EcrkB; WZea3: $this->load->library('m_upload'); goto M2fvY; fF502: $this->m_upload->set_allowed_types('ico'); goto MKCsE; EcrkB: } protected function get_ticket($ids) { $query = $this->db->where('ids', $ids)->where('ids_father', 0)->get('ticket', 1); if ($query->num_rows()) { goto Dn6cw; cDkwf: $data['rs_follow'] = $this->db->where('ids_father', $ids)->order_by('created_time', 'asc')->get('ticket')->result(); goto I0270; Dn6cw: $data['rs'] = $query->row(); goto cDkwf; I0270: return $data; goto omXtV; omXtV: } else { return FALSE; } } } ?>

Did this file decode correctly?

Original Code

<?php
/*   __________________________________________________
    |  Obfuscated by YAK Pro - Php Obfuscator  2.0.14  |
    |              on 2024-01-24 17:04:18              |
    |    GitHub: https://github.com/pk-fr/yakpro-po    |
    |__________________________________________________|
*/
 defined('BASEPATH') or exit('No direct script access allowed'); class Admin extends MY_Controller { public function __construct() { goto JAVLV; QtcEG: date_default_timezone_set($this->config->item('time_reference')); goto O6zM3; AaoaP: $this->load->model('admin_model'); goto Ws49A; JAVLV: parent::__construct(); goto AaoaP; Ws49A: $this->load->library('m_freepbx'); goto QtcEG; O6zM3: } public function index() { } public function list_extnum() { my_load_view($this->setting->theme, 'Admin/extnum_list'); } public function new_extnum() { my_load_view($this->setting->theme, 'Admin/extnum_new'); } public function new_extnum_action() { goto uRZK8; z10Hv: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/extnum_new'); } else { goto pbNeY; xfiO8: if ($res['status']) { $this->session->set_flashdata('flash_success', $res['message']); redirect(base_url('admin/list_extnum')); } else { $this->session->set_flashdata('flash_danger', $res['message']); my_load_view($this->setting->theme, 'Admin/extnum_new'); } goto czxlD; CK5ad: $res = $this->m_freepbx->addExtension($extnum, $name, $password); goto xfiO8; pbNeY: $extnum = my_post('ids'); goto Cxdoj; u8kbb: $password = my_post('password'); goto CK5ad; Cxdoj: $name = my_post('name'); goto u8kbb; czxlD: } goto doN09; BaGhT: $this->form_validation->set_rules('name', my_caption('extnum_name_label'), 'trim|required|max_length[50]'); goto SQcb5; uRZK8: $this->form_validation->set_rules('ids', my_caption('extnum_ids_label'), 'trim|required|max_length[5]'); goto BaGhT; SQcb5: $this->form_validation->set_rules('password', my_caption('extnum_password_label'), 'trim|required|min_length[4]|max_length[20]'); goto z10Hv; doN09: } public function edit_extnum() { goto VxsZc; VxsZc: $extnum = my_uri_segment(3); goto at21O; GlqqN: if ($data['status']) { $dd['rs'] = (object) array('status' => '1', 'id' => $data['id'], 'name' => $data['name'], 'password' => $data['password'], 'created_time' => '2000-12-12'); my_load_view($this->setting->theme, 'Admin/extnum_edit', $dd); } else { echo my_caption('global_no_entries_found'); } goto P8rde; at21O: $data = $this->m_freepbx->fetchExtension($extnum); goto GlqqN; P8rde: } public function edit_extnum_setting_action() { goto aqg4L; ahCBY: if ($data['status']) { goto LSR_K; L6yUN: $d = $this->m_freepbx->updateExtension($dd['id'], $dd['name'], $dd['password']); goto K6lJe; lHZOc: $this->setting->debug_level == 1 ? $debug_detail = json_encode($dd) : ($debug_detail = ''); goto YqnnJ; K6lJe: if ($d['status']) { $this->session->set_flashdata('flash_success', my_caption('user_edit_setting_success')); redirect(base_url('admin/edit_extnum/' . $extnum)); } else { $this->session->set_flashdata('flash_danger', $d['message']); redirect(base_url('admin/edit_extnum/' . $extnum)); } goto kP7Nu; LSR_K: $dd = array('id' => my_post('extnum'), 'name' => my_post('name'), 'password' => my_post('password')); goto lHZOc; YqnnJ: my_log(my_uri_segment(3), 'Information', 'update-extnum-setting', json_encode(my_ua()), $debug_detail); goto L6yUN; kP7Nu: } else { echo my_caption('global_no_entries_found'); } goto YVsfu; aqg4L: $extnum = my_uri_segment(3); goto OEMuo; OEMuo: $data = $this->m_freepbx->fetchExtension($extnum); goto ahCBY; YVsfu: } public function remove_extnum() { goto pKTUl; rc47k: $data = $this->m_freepbx->fetchExtension($extnum); goto MRxWT; MRxWT: if ($data['status']) { $d = $this->m_freepbx->deleteExtension($extnum); if ($d['status']) { echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"CallBack"}'; } else { echo '{"result":false, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"CallBack"}'; } } goto QZVdJ; pKTUl: $extnum = my_uri_segment(3); goto rc47k; QZVdJ: } public function list_device() { my_load_view($this->setting->theme, 'Admin/list_device'); } public function remove_device() { goto xH_tR; XxAb2: my_check_demo_mode(); goto Cf2HN; g6L0a: if ($query->num_rows()) { if ($query->row()->id == 1) { echo '{"result":false, "title":"' . my_caption('global_failure') . '", "text":"' . my_caption('user_first_super_admin_delete_not_allowed') . '", "redirect":""}'; } else { $query_subscription = $this->db->where('user_ids', my_uri_segment(3))->where('status!=', 'expired')->get('payment_subscription', 1); if ($query_subscription->num_rows()) { echo '{"result":false, "title":"' . my_caption('global_failure') . '", "text":"' . my_caption('user_subscription_active_delete_not_allowed') . '", "redirect":""}'; } else { my_remove_user(my_uri_segment(3)); echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"CallBack"}'; } } } goto lyXdg; xH_tR: my_check_demo_mode('alert_json'); goto XxAb2; Cf2HN: $query = $this->db->where('ids', my_uri_segment(3))->get('user', 1); goto g6L0a; lyXdg: } public function list_user() { !my_check_permission('User Management') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/list_user'); } public function remove_user() { goto prhHK; F44qn: my_check_demo_mode('alert_json'); goto R52yT; R52yT: my_check_demo_mode(); goto CPywB; CPywB: $query = $this->db->where('ids', my_uri_segment(3))->get('user', 1); goto WJYok; prhHK: !my_check_permission('User Management') ? die(my_caption('global_not_enough_permission')) : null; goto F44qn; WJYok: if ($query->num_rows()) { if ($query->row()->id == 1) { echo '{"result":false, "title":"' . my_caption('global_failure') . '", "text":"' . my_caption('user_first_super_admin_delete_not_allowed') . '", "redirect":""}'; } else { $query_subscription = $this->db->where('user_ids', my_uri_segment(3))->where('status!=', 'expired')->get('payment_subscription', 1); if ($query_subscription->num_rows()) { echo '{"result":false, "title":"' . my_caption('global_failure') . '", "text":"' . my_caption('user_subscription_active_delete_not_allowed') . '", "redirect":""}'; } else { my_remove_user(my_uri_segment(3)); echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"CallBack"}'; } } } goto ynytu; ynytu: } public function new_user() { !my_check_permission('User Management') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/new_user'); } public function new_user_action() { goto CYqc5; AQ4Pj: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/new_user'); } else { goto RSBrZ; RSBrZ: $this->load->model('user_model'); goto GliCS; ZnFR9: if ($res['result']) { $this->session->set_flashdata('flash_success', $res['message']); redirect(base_url('admin/list_user')); } else { $this->session->set_flashdata('flash_danger', $res['message']); my_load_view($this->setting->theme, 'Admin/new_user'); } goto m0qDf; GliCS: $res = $this->user_model->save_user($this->setting); goto ZnFR9; m0qDf: } goto dq4d2; Ic0EJ: $this->form_validation->set_rules('first_name', my_caption('signup_first_name_label'), 'trim|required|max_length[50]'); goto bQOw2; qQT7m: my_check_demo_mode(); goto Ic0EJ; ha4pg: $this->form_validation->set_rules('confirm_password', my_caption('signup_confirm_label'), 'trim|required|min_length[6]|max_length[20]|matches[password]'); goto AQ4Pj; bQOw2: $this->form_validation->set_rules('last_name', my_caption('signup_last_name_label'), 'trim|required|max_length[50]'); goto fnfvq; fnfvq: $this->form_validation->set_rules('email_address', my_caption('global_email_address'), 'trim|required|valid_email|max_length[50]|callback_email_duplicated_check'); goto IGyvA; IGyvA: $this->form_validation->set_rules('password', my_caption('signup_password_label'), 'trim|required|min_length[6]|max_length[20]'); goto ha4pg; CYqc5: !my_check_permission('User Management') ? die(my_caption('global_not_enough_permission')) : null; goto qQT7m; dq4d2: } public function invite_user() { !my_check_permission('User Management') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/invite_user'); } public function invite_user_action() { goto v0TEc; CRHMq: $this->form_validation->set_rules('email_address', my_caption('global_email_address'), 'trim|required|valid_email|max_length[50]'); goto OaZFa; mxPjU: my_check_demo_mode(); goto CRHMq; v0TEc: !my_check_permission('User Management') ? die(my_caption('global_not_enough_permission')) : null; goto mxPjU; OaZFa: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/invite_user'); } else { $res = $this->admin_model->invite_user(my_post('email_address')); if ($res['result']) { $this->session->set_flashdata('flash_success', $res['message']); redirect(base_url('admin/invite_user')); } else { $this->session->set_flashdata('flash_danger', $res['message']); my_load_view($this->setting->theme, 'Admin/invite_user'); } } goto MB3H5; MB3H5: } public function edit_user() { goto cXprp; Hpdwt: if ($query->num_rows()) { goto TXiaI; iKSYR: $rs_payg = my_tts_generate_user_statitics(my_uri_segment(3)); goto EuEVJ; TXiaI: $data['rs'] = $query->row(); goto JhNGs; fOOWJ: my_load_view($this->setting->theme, 'Admin/edit_user', $data); goto pGns7; JhNGs: $this->load->helper('my_tts'); goto iKSYR; EuEVJ: $data['payg_balance'] = $rs_payg->payg_balance; goto fOOWJ; pGns7: } else { echo my_caption('global_no_entries_found'); } goto iKdYG; vl_bz: $query = $this->db->where('ids', my_uri_segment(3))->get('user', 1); goto Hpdwt; cXprp: !my_check_permission('User Management') ? die(my_caption('global_not_enough_permission')) : null; goto vl_bz; iKdYG: } public function edit_user_setting_action() { goto tiqL1; xFNcU: my_check_demo_mode(); goto Iy4cJ; Iy4cJ: $query = $this->db->where('ids', my_uri_segment(3))->get('user', 1); goto FgDPG; tiqL1: !my_check_permission('User Management') ? die(my_caption('global_not_enough_permission')) : null; goto xFNcU; FgDPG: if ($query->num_rows()) { goto Y0Tq3; zec7L: if (!empty(my_post('new_password'))) { goto LA8Ft; G58y8: $condition = 'trim|min_length[' . $min_length . ']|max_length[20]|callback_password_strength[' . $this->setting->psr . ']'; goto j47Cv; AUc9l: $this->form_validation->set_rules('confirm_new_password', my_caption('user_edit_setting_password_confirm'), 'trim|matches[new_password]'); goto HGEjs; j47Cv: $this->form_validation->set_rules('new_password', my_caption('user_edit_setting_password'), $condition); goto AUc9l; LA8Ft: switch ($this->setting->psr) { case 'medium': $min_length = 8; break; case 'strong': $min_length = 12; break; default: $min_length = 6; } goto G58y8; HGEjs: } goto jFi3s; Y0Tq3: $data['rs'] = $query->row(); goto zec7L; ByrKw: if ($this->form_validation->run() == FALSE) { goto dQdOP; MmBDV: my_load_view($this->setting->theme, 'Admin/edit_user', $data); goto QlMHh; k7PGF: $data['payg_balance'] = $rs_payg->payg_balance; goto MmBDV; dQdOP: $this->load->helper('my_tts'); goto xwZQr; xwZQr: $rs_payg = my_tts_generate_user_statitics(my_uri_segment(3)); goto k7PGF; QlMHh: } else { goto HDP6R; wPSDK: my_post('new_password') != '' ? $update_array['password'] = my_hash_password(my_post('new_password')) : null; goto kCkRx; ObkHQ: $this->session->set_flashdata('flash_success', my_caption('user_edit_setting_success')); goto xck7r; PBRA0: my_log(my_uri_segment(3), 'Information', 'update-user-setting', json_encode(my_ua()), $debug_detail); goto RT6uf; HDP6R: $update_array = array('status' => my_post('user_status'), 'role_ids' => my_post('user_role'), 'update_time' => my_server_time()); goto wPSDK; RT6uf: $this->db->where('ids', my_uri_segment(3))->update('user', $update_array); goto ObkHQ; xck7r: redirect(base_url('admin/edit_user/' . my_uri_segment(3))); goto Rtfpv; kCkRx: $this->setting->debug_level == 1 ? $debug_detail = json_encode($update_array) : ($debug_detail = ''); goto PBRA0; Rtfpv: } goto gpiV5; jFi3s: $this->form_validation->set_rules('act', '', 'in_list[user_setting]'); goto ByrKw; gpiV5: } else { echo my_caption('global_no_entries_found'); } goto nuNd5; nuNd5: } public function role() { goto JLNw5; JLNw5: !my_check_permission('Roles And Permissions') ? die(my_caption('global_not_enough_permission')) : null; goto j7U3K; j7U3K: $data['rs'] = $this->db->order_by('id', 'asc')->get('role')->result(); goto uoykd; uoykd: my_load_view($this->setting->theme, 'Admin/list_role', $data); goto BT6CU; BT6CU: } public function rp_new_action() { goto qs7xg; D1j78: my_check_demo_mode('simple_json'); goto zNMHJ; lJxqa: if ($this->form_validation->run() == FALSE) { echo '{"result":false, "message":"' . strip_tags($this->form_validation->error('sim_value')) . '"}'; } else { $query = $this->db->where('name', str_replace(' ', '_', my_post('sim_value')))->get(my_post('sim_hidden'), 1); if ($query->row()) { echo '{"result":false, "message":"' . my_caption('rp_duplicated_notice') . '"}'; } else { goto SNyqr; qI6bL: echo '{"result":true, "message":"' . my_caption('rp_insert_success') . '"}'; goto mUZa3; oleuy: $this->db->insert(my_post('sim_hidden'), array('ids' => $ids, 'built_in' => 0, 'name' => str_replace(' ', '_', my_post('sim_value')))); goto TBWqu; TBWqu: my_post('sim_hidden') == 'permission' ? $builde_type = 'permission_created' : ($builde_type = 'role_created'); goto gku3n; gku3n: $this->admin_model->permissionBuilder($builde_type, $ids); goto qI6bL; SNyqr: $ids = my_random(); goto oleuy; mUZa3: } } goto cTrRV; qs7xg: !my_check_permission('Roles And Permissions') ? die(my_caption('global_not_enough_permission')) : null; goto D1j78; zNMHJ: if (!is_integer(strpos('role,permission', my_post('sim_hidden')))) { die('{"result":false, "message":"' . my_caption('global_invalid_request') . '"}'); } goto sifh2; sifh2: $this->form_validation->set_rules('sim_value', my_caption('rp_name'), 'trim|required|max_length[50]|callback_check_underscore'); goto lJxqa; cTrRV: } public function rp_edit_action() { goto ZrFfs; RsOdi: if (!is_integer(strpos('role,permission', my_uri_segment(3)))) { die('{"result":false, "message":"' . my_caption('global_invalid_request') . '"}'); } goto XsViw; YR1xF: if ($this->form_validation->run() == FALSE) { echo '{"result":false, "message":"' . strip_tags($this->form_validation->error('sim_value')) . '"}'; } else { $query = $this->db->where('ids!=', my_post('sim_hidden'))->where('name', str_replace(' ', '_', my_post('sim_value')))->get(my_uri_segment(3), 1); if ($query->num_rows()) { echo '{"result":false, "message":"' . my_caption('rp_duplicated_notice') . '"}'; } else { $this->db->where('ids', my_post('sim_hidden'))->update(my_uri_segment(3), array('name' => str_replace(' ', '_', my_post('sim_value')))); echo '{"result":true, "message":"' . my_caption('rp_name_update_success') . '"}'; } } goto yryud; ZrFfs: !my_check_permission('Roles And Permissions') ? die(my_caption('global_not_enough_permission')) : null; goto buum2; buum2: my_check_demo_mode('simple_json'); goto RsOdi; XsViw: $this->form_validation->set_rules('sim_value', my_caption('rp_name'), 'trim|required|max_length[50]|callback_check_underscore'); goto YR1xF; yryud: } public function rp_remove_action() { goto oOm22; rZU75: $query = $this->db->where('ids', my_uri_segment(4))->where('built_in', 0)->get(my_uri_segment(3), 1); goto zjj8E; zjj8E: if ($query->num_rows()) { goto Kv8sl; wT8NW: echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"' . base_url('admin/' . my_uri_segment(3)) . '"}'; goto wIgSg; Kv8sl: if (my_uri_segment(3) == 'role') { $this->db->where('role_ids', my_uri_segment(4))->update('user', array('role_ids' => $this->setting->default_role)); } goto uFAUv; i60il: if (my_uri_segment(3) == 'permission') { $this->admin_model->permissionBuilder('permission_removed', my_uri_segment(4)); } goto wT8NW; uFAUv: $this->db->delete(my_uri_segment(3), array('ids' => my_uri_segment(4))); goto i60il; wIgSg: } else { die(my_caption('rp_not_found')); } goto ghNLh; oOm22: !my_check_permission('Roles And Permissions') ? die(my_caption('global_not_enough_permission')) : null; goto xp4Xr; HyF8w: if (!is_integer(strpos('role,permission', my_uri_segment(3)))) { die('{"result":false, "message":"' . my_caption('global_invalid_request') . '"}'); } goto rZU75; xp4Xr: my_check_demo_mode('alert_json'); goto HyF8w; ghNLh: } public function permission() { goto mbDL7; mbDL7: !my_check_permission('Roles And Permissions') ? die(my_caption('global_not_enough_permission')) : null; goto lP53x; yoSVi: $data['rs_role'] = $this->db->order_by('id', 'asc')->get('role')->result(); goto C3a1S; C3a1S: my_load_view($this->setting->theme, 'Admin/list_permission', $data); goto MyubK; lP53x: $data['rs'] = $this->db->order_by('id', 'asc')->get('permission')->result(); goto yoSVi; MyubK: } public function permission_update() { goto bfgMb; JiMDW: $this->session->set_flashdata('flash_success', my_caption('rp_permission_update_success')); goto l4CmX; me0CU: my_check_demo_mode(); goto Tpire; bfgMb: !my_check_permission('Roles And Permissions') ? die(my_caption('global_not_enough_permission')) : null; goto me0CU; l4CmX: redirect(base_url('admin/permission')); goto vUCwA; Tpire: $this->admin_model->permissionBuilder('update_all'); goto JiMDW; vUCwA: } public function general_setting() { !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/general_setting'); } public function general_setting_action() { goto PV7aW; PV7aW: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto VaJBg; s08bN: if (isset($_FILES['userfile']['name'])) { if ($_FILES['userfile']['name'] != '') { $this->form_validation->set_rules('userfile', 'Upload File', 'callback_icon_upload'); } } goto M3DET; ZQZU3: $this->form_validation->set_rules('dashboard_custom_javascript', my_caption('gs_custom_setting_js'), 'trim|max_length[512]'); goto s08bN; asxWc: $this->form_validation->set_rules('google_analytics_id', my_caption('gs_google_analytics'), 'trim|max_length[50]'); goto LBEOQ; g1sIQ: $this->form_validation->set_rules('maintenance_information', my_caption('gs_maintenance_information'), 'trim|required|max_length[255]'); goto asxWc; LBEOQ: $this->form_validation->set_rules('dashboard_custom_css', my_caption('gs_custom_setting_css'), 'trim|max_length[512]'); goto ZQZU3; VaJBg: my_check_demo_mode(); goto Cm3Cq; M3DET: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/general_setting'); } else { goto Y0X90; jJrso: redirect(base_url('admin/general_setting')); goto cDskO; Y0X90: $this->admin_model->update_general_settings(); goto pP88p; pP88p: $this->session->set_flashdata('flash_success', my_caption('gs_update_success')); goto jJrso; cDskO: } goto fenO1; Cm3Cq: $this->form_validation->set_rules('system_name', my_caption('gs_system_name'), 'trim|required|max_length[50]'); goto g1sIQ; fenO1: } public function auth_integration() { !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/auth_integration'); } public function auth_integration_action() { goto Qq371; AQALj: if (my_post('facebook_login_enabled') == '1') { $this->form_validation->set_rules('facebook_app_id', 'App ID', 'trim|required'); $this->form_validation->set_rules('facebook_app_secret', 'App Secret', 'trim|required'); } goto o3Z9n; wKiMU: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/auth_integration'); } else { goto TecSb; Tol2w: $this->session->set_flashdata('flash_success', my_caption('ai_update_success')); goto LyLZr; TecSb: $this->admin_model->update_auth_integration(); goto Tol2w; LyLZr: redirect(base_url('admin/auth_integration')); goto dLgZg; dLgZg: } goto TWKva; KQTye: if (my_post('google_recaptcha_enabled') == '1') { $this->form_validation->set_rules('google_recaptcha_site_key', 'Site Key', 'trim|required'); $this->form_validation->set_rules('google_recaptcha_secret_key', 'Secret Key', 'trim|required'); } goto eR00h; Qq371: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto FGYTu; FGYTu: my_check_demo_mode(); goto KQTye; eR00h: if (my_post('google_login_enabled') == '1') { $this->form_validation->set_rules('google_client_id', 'Client ID', 'trim|required'); $this->form_validation->set_rules('google_client_secret', 'Client Secret', 'trim|required'); } goto AQALj; PnMtH: $this->form_validation->set_rules('act', '', 'in_list[auth_integration]'); goto wKiMU; o3Z9n: if (my_post('twitter_login_enabled') == '1') { $this->form_validation->set_rules('twitter_consumer_key', 'Consumer Key', 'trim|required'); $this->form_validation->set_rules('twitter_consumer_secret', 'Consumer Secret', 'trim|required'); } goto PnMtH; TWKva: } public function smtp_setting() { !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/smtp_setting'); } public function smtp_setting_action() { goto d5BJs; KSLZ0: $this->form_validation->set_rules('password', my_caption('smtp_setting_password_label'), 'trim|required'); goto WpVWV; K8IL6: $this->form_validation->set_rules('host', my_caption('smtp_setting_host_label'), 'trim|required'); goto tcL5J; oRYQm: $this->form_validation->set_rules('from_name', my_caption('smtp_setting_sender_name_label'), 'trim|required'); goto ZsDJd; d5BJs: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto S7YKP; S7YKP: my_check_demo_mode(); goto K8IL6; tcL5J: $this->form_validation->set_rules('encryption', my_caption('smtp_setting_encryption_label'), 'trim|required|in_list[none,ssl,tls]'); goto MrBCk; ZsDJd: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/smtp_setting'); } else { goto ovdbA; Q14Yu: $this->db->update('setting', array('smtp_setting' => json_encode($smtp_array))); goto flK2T; O_4fX: redirect(base_url('admin/smtp_setting')); goto bLgPa; flK2T: $this->session->set_flashdata('flash_success', my_caption('smtp_update_success')); goto O_4fX; ovdbA: $smtp_array = array('host' => my_post('host'), 'port' => my_post('port'), 'is_auth' => 1, 'username' => my_post('username'), 'password' => $this->input->post('password', TRUE), 'crypto' => my_post('encryption'), 'from_email' => my_post('from_email'), 'from_name' => my_post('from_name')); goto Q14Yu; bLgPa: } goto zxjbQ; MrBCk: $this->form_validation->set_rules('port', my_caption('smtp_setting_port_label'), 'trim|required|integer'); goto x8esA; x8esA: $this->form_validation->set_rules('username', my_caption('smtp_setting_username_label'), 'trim|required'); goto KSLZ0; WpVWV: $this->form_validation->set_rules('from_email', my_caption('smtp_setting_from_email_label'), 'trim|required'); goto oRYQm; zxjbQ: } public function send_test_email() { goto JiYUr; S1sSW: $this->form_validation->set_rules('sim_value', my_caption('global_email_address'), 'trim|required|valid_email'); goto t3dcA; FfQO8: my_check_demo_mode('simple_json'); goto S1sSW; JiYUr: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto FfQO8; t3dcA: if ($this->form_validation->run() == FALSE) { echo '{"result":false, "message":"' . strip_tags($this->form_validation->error('sim_value')) . '"}'; } else { goto wFWzr; TnauJ: if ($res['result']) { echo '{"result":true, "message":"' . my_caption('smtp_test_email_sent_success') . '"}'; } else { echo '{"result":false, "message":"' . my_caption('smtp_test_email_sent_fail') . '"}'; } goto MR39T; ajMNQ: $res = my_send_email($email); goto TnauJ; wFWzr: $email = array('email_to' => my_post('sim_value'), 'email_subject' => 'Test Email', 'email_body' => 'This is a test email, sent at: ' . my_server_time() . ' ' . $this->config->item('time_reference')); goto ajMNQ; MR39T: } goto J2zaZ; J2zaZ: } public function email_template() { goto tBPu0; M7yuS: my_load_view($this->setting->theme, 'Admin/email_template', $data); goto GjqDQ; tBPu0: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto BRYc6; BRYc6: $data['rs'] = $this->db->order_by('built_in', 'desc')->get('email_template')->result(); goto M7yuS; GjqDQ: } public function email_template_new() { !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/email_template_edit'); } public function email_template_new_action() { goto yemgj; mQVuz: my_check_demo_mode(); goto apemo; yemgj: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto mQVuz; niqvY: $this->form_validation->set_rules('email_body', my_caption('et_email_body'), 'trim|required|min_length[30]'); goto j4YXy; j4YXy: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/email_template_edit'); } else { goto LZG1X; LZG1X: $insert_array = array('ids' => my_random(), 'purpose' => my_post('email_purpose'), 'built_in' => 0, 'subject' => my_post('email_subject'), 'body' => my_post('email_body')); goto PtAVL; uCkGw: $this->session->set_flashdata('flash_success', my_caption('et_email_create_success')); goto qP8uI; qP8uI: redirect(base_url('admin/email_template/')); goto MjYEv; PtAVL: $this->db->insert('email_template', $insert_array); goto uCkGw; MjYEv: } goto RVUrH; OfBkF: $this->form_validation->set_rules('email_subject', my_caption('et_email_subject'), 'trim|required|max_length[255]'); goto niqvY; apemo: $this->form_validation->set_rules('email_purpose', my_caption('et_email_purpose'), 'trim|required|max_length[50]'); goto OfBkF; RVUrH: } public function email_template_edit() { goto xUVxh; xUVxh: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto jqziH; BuHxT: if ($query->num_rows()) { $data['rs'] = $query->row(); my_load_view($this->setting->theme, 'Admin/email_template_edit', $data); } else { echo my_caption('global_no_entries_found'); } goto EpHaD; jqziH: $query = $this->db->where('ids', my_uri_segment(3))->get('email_template', 1); goto BuHxT; EpHaD: } public function email_template_remove() { goto BcCBe; BcCBe: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto ApkIU; ApkIU: my_check_demo_mode(); goto aqMGX; W3LaI: echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"' . base_url('admin/email_template') . '"}'; goto k6I5z; aqMGX: $this->db->delete('email_template', array('ids' => my_uri_segment(3))); goto W3LaI; k6I5z: } public function email_template_edit_action() { goto D8ejZ; D8ejZ: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto nkl23; KwxeO: $query = $this->db->where('ids', my_uri_segment(3))->get('email_template', 1); goto N1PYl; nkl23: my_check_demo_mode(); goto KwxeO; N1PYl: if ($query->num_rows()) { goto WT5C4; reQvg: $this->form_validation->set_rules('email_body', my_caption('et_email_body'), 'trim|required|min_length[30]'); goto VpE4M; WT5C4: $this->form_validation->set_rules('email_purpose', my_caption('et_email_purpose'), 'trim|required|max_length[50]'); goto UytMY; VpE4M: if ($this->form_validation->run() == FALSE) { $data['rs'] = $query->row(); my_load_view($this->setting->theme, 'Admin/email_template_edit', $data); } else { goto RASxl; RASxl: $this->db->where('ids', my_uri_segment(3))->update('email_template', array('purpose' => my_post('email_purpose'), 'subject' => my_post('email_subject'), 'body' => my_post('email_body'))); goto LGV94; fjIcA: redirect(base_url('admin/email_template_edit/' . my_uri_segment(3))); goto o7YkX; LGV94: $this->session->set_flashdata('flash_success', my_caption('et_email_change_success')); goto fjIcA; o7YkX: } goto AlQ2N; UytMY: $this->form_validation->set_rules('email_subject', my_caption('et_email_subject'), 'trim|required|max_length[255]'); goto reQvg; AlQ2N: } else { echo my_caption('global_no_entries_found'); } goto deWgn; deWgn: } public function payment_list() { !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/payment_list'); } public function payment_list_remove_action() { goto lFO6M; WTOji: my_check_demo_mode('alert_json'); goto yXgBX; yXgBX: $query = $this->db->where('ids', my_uri_segment(3))->get('payment_log', 1); goto oNs_W; oNs_W: if ($query->num_rows()) { $this->db->where('ids', my_uri_segment(3))->delete('payment_log'); echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"CallBack"}'; } else { echo '{"result":false, "title":"' . my_caption('global_failure') . '", "text":"' . my_caption('global_no_entries_found') . '", "redirect":"CallBack"}'; } goto YwVQq; lFO6M: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto WTOji; YwVQq: } public function payment_list_view() { goto Ewt_3; QRD8y: if ($query->num_rows()) { goto w4T5d; dQWK9: $rs = $query->row(); goto D6qOm; D6qOm: $data['user_email'] = $this->db->where('ids', $rs->user_ids)->get('user', 1)->row()->email_address; goto ROw7X; jX2XC: my_load_view($this->setting->theme, 'Admin/payment_list_view', $data); goto MYg_H; ROw7X: $data['rs'] = $rs; goto jX2XC; w4T5d: $payment_setting_array = json_decode($this->setting->payment_setting, 1); goto dQWK9; MYg_H: } else { echo my_caption('global_no_entries_found'); } goto R5aHS; jdSyw: $query = $this->db->where('ids', my_uri_segment(3))->get('payment_log', 1); goto QRD8y; Ewt_3: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto jdSyw; R5aHS: } public function payment_subscription_list() { !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/payment_subscription_list'); } public function payment_subscription_list_view() { goto ufCcl; aCcRv: if ($query->num_rows()) { goto wf6If; N6prl: $data['item_name'] = $this->db->where('ids', $rs->item_ids)->get('payment_item', 1)->row()->item_name; goto cR6zr; A8FUx: $data['rs'] = $rs; goto N_rT6; cR6zr: my_load_view($this->setting->theme, 'Admin/payment_subscription_list_view', $data); goto czBzR; wf6If: $rs = $query->row(); goto A8FUx; N_rT6: $data['user_email'] = my_user_setting($rs->user_ids, 'email_address'); goto N6prl; czBzR: } else { echo my_caption('global_no_entries_found'); } goto Qjz35; eXDoN: $query = $this->db->where('ids', my_uri_segment(3))->get('payment_subscription', 1); goto aCcRv; ufCcl: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto eXDoN; Qjz35: } public function payment_subscription_action() { goto QN2xG; r7lNS: my_check_demo_mode('alert_json'); goto ePoLu; QN2xG: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto r7lNS; XLRkH: if ($query->num_rows()) { $rs = $query->row(); if ($rs->payment_gateway == 'stripe' || $rs->payment_gateway == 'paypal' || $rs->payment_gateway == 'manual' || $rs->payment_gateway == 'free') { $result = my_payment_gateway_subscription_action($action, $rs, 'admin/payment_subscription_list'); } else { goto vq8mV; vq8mV: $this->load->library('m_payment'); goto mZJ62; eqwJs: if ($action == 'cancel' || $action == 'cancel_now') { goto l5y_6; OJBbo: $action == 'cancel' ? $subscriptionArray['cancelNow'] = FALSE : ($subscriptionArray['cancelNow'] = TRUE); goto jCfN0; l5y_6: $subscriptionArray['paymentGateway'] = $rs->payment_gateway; goto OJBbo; jCfN0: $cancelledSubscriptionArray = $this->m_payment->cancelSubscription($subscriptionArray); goto Q_xSl; Q_xSl: if ($cancelledSubscriptionArray['success']) { goto yaCE7; Zdlv3: $result = '{"result":true, "title":"' . my_caption('global_cancelled_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"' . base_url('admin/payment_subscription_list') . '"}'; goto wdwY1; yaCE7: $action == 'cancel_now' ? $status = 'expired' : ($status = 'pending_cancellation'); goto jzOcn; jzOcn: $this->db->where('ids', $rs->ids)->update('payment_subscription', array('status' => $status)); goto Zdlv3; wdwY1: } else { $result = '{"result":false, "title":"' . my_caption('global_failure') . '", "text":"' . my_caption('payment_subscription_perform_fail') . '", "redirect":"CallBack"}'; } goto emOU3; emOU3: } else { $result = '{"result":false, "title":"' . my_caption('global_failure') . '", "text":"' . my_caption('payment_subscription_perform_fail') . '", "redirect":"CallBack"}'; } goto T3Sdk; mZJ62: $subscriptionArray['subscriptionID'] = $rs->gateway_identifier; goto eqwJs; T3Sdk: } } else { $result = '{"result":false, "title":"' . my_caption('global_failure') . '", "text":"' . my_caption('global_no_entries_found') . '", "redirect":"CallBack"}'; } goto ZZEgV; ZZEgV: echo my_esc_html($result); goto Ib2Et; o8Ibr: $query = $this->db->where('ids', my_uri_segment(4))->get('payment_subscription', 1); goto XLRkH; ePoLu: $action = my_uri_segment(3); goto o8Ibr; Ib2Et: } public function payment_subscription_sync() { goto OwxyO; WmXFJ: redirect(base_url('admin/payment_subscription_list')); goto mvap8; OwxyO: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto LpNfz; zVzMd: if ($query->num_rows()) { $rs = $query->result(); try { goto mLrnQ; mLrnQ: $payment_setting_array = json_decode($this->setting->payment_setting, 1); goto RkM48; RkM48: \Stripe\Stripe::setApiKey($payment_setting_array['stripe_secret_key']); goto XVykO; NS3ui: $this->load->library('m_payment'); goto Mzlr9; Mzlr9: foreach ($rs as $row) { if ($row->payment_gateway == 'stripe') { goto iXUke; MxheD: $this->db->where('ids', $row->ids)->update('payment_subscription', $update_array); goto RglJ6; Us5dj: $update_array = array('status' => $status, 'start_time' => mdate('%Y-%m-%d %H:%i:%s', $subscription->current_period_start), 'end_time' => mdate('%Y-%m-%d %H:%i:%s', $subscription->current_period_end), 'updated_time' => my_server_time()); goto MxheD; yGkAa: $subscription->status == 'active' ? $status = $row->status : ($status = $subscription->status); goto Us5dj; iXUke: $subscription = \Stripe\Subscription::retrieve($row->gateway_identifier); goto yGkAa; RglJ6: } elseif ($row->payment_gateway == 'paypal') { $subscription = $this->m_paypal->retrieveSubscription($row->gateway_identifier); if ($subscription['success']) { goto ykHjt; t8UmV: $this->db->where('ids', $row->ids)->update('payment_subscription', $update_array); goto AqjkE; ykHjt: $subscription['status'] == 'ACTIVE' ? $status = 'active' : ($status = strtolower($subscription['status'])); goto wrhOr; wrhOr: $update_array = array('status' => str_replace('cancelled', 'expired', $status), 'start_time' => $subscription['start_time'], 'end_time' => $subscription['end_time'], 'updated_time' => my_server_time()); goto t8UmV; AqjkE: } } elseif ($row->payment_gateway == 'manual') { } else { $subscriptionArray = $this->m_payment->retrieveSubscription($row->payment_gateway, $row->gateway_identifier); if ($subscriptionArray['success']) { $updateArray = array('status' => $subscriptionArray['status'], 'start_time' => $subscriptionArray['currentStartTime'], 'end_time' => $subscriptionArray['currentEndTime'], 'updated_time' => my_server_time()); $this->db->where('ids', $row->ids)->update('payment_subscription', $updateArray); } } } goto SfzWv; XVykO: $this->load->library('m_paypal'); goto NS3ui; SfzWv: } catch (\Exception $e) { $result = FALSE; } } goto EiGo_; LpNfz: my_check_demo_mode(); goto MGu0F; MGu0F: $result = TRUE; goto C5mI5; C5mI5: $query = $this->db->where('status!=', 'expired')->get('payment_subscription'); goto zVzMd; EiGo_: if ($result) { $this->session->set_flashdata('flash_success', my_caption('payment_subscription_sync_success')); } else { $this->session->set_flashdata('flash_danger', my_caption('payment_subscription_sync_fail')); } goto WmXFJ; mvap8: } public function payment_subscription_remove_action() { goto KmFQt; eWF_S: if ($query->num_rows()) { $rs = $query->row(); if ($rs->status == 'expired') { $this->db->where('ids', my_uri_segment(3))->delete('payment_subscription'); echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"CallBack"}'; } else { echo '{"result":false, "title":"' . my_caption('global_failure') . '", "text":"' . my_caption('payment_subscription_remove_subscription_failed_not_cancel') . '", "redirect":""}'; } } else { echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"CallBack"}'; } goto DBW90; KmFQt: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto W_ct0; W_ct0: my_check_demo_mode('alert_json'); goto cNe1x; cNe1x: $query = $this->db->where('ids', my_uri_segment(3))->get('payment_subscription', 1); goto eWF_S; DBW90: } public function payment_adjust_balance() { goto QDjY2; Y7Csf: $query = $this->db->where('ids', my_uri_segment(3))->get('user', 1); goto KylLN; KylLN: if ($query->num_rows()) { goto H6yGJ; H6yGJ: $rs = $query->row(); goto f2eBO; z8pXq: my_load_view($this->setting->theme, 'Admin/payment_adjust_balance', $data); goto MvU5d; f2eBO: $data['rs'] = $rs; goto z8pXq; MvU5d: } else { echo my_caption('global_no_entries_found'); } goto EeQne; QDjY2: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto Y7Csf; EeQne: } public function payment_adjust_balance_action() { goto sASCY; f4kWY: my_check_demo_mode(); goto jhoNO; jhoNO: $query = $this->db->where('ids', my_post('user_ids'))->get('user', 1); goto pDhci; yWUjl: if ($this->form_validation->run() == FALSE) { if ($query->num_rows()) { goto b2T_z; HnG1C: my_load_view($this->setting->theme, 'Admin/payment_adjust_balance', $data); goto B9rcD; z_ycX: $data['rs'] = $rs; goto HnG1C; b2T_z: $rs = $query->row(); goto z_ycX; B9rcD: } else { echo my_caption('global_no_entries_found'); } } else { if ($query->num_rows()) { goto Mygu1; cHWtp: if ($res_array['result']) { $this->admin_model->payment_log_insert(); $this->session->set_flashdata('flash_success', $res_array['message']); } else { $this->session->set_flashdata('flash_danger', $res_array['message']); } goto Xfl7i; Xfl7i: redirect(base_url('admin/payment_adjust_balance/' . my_post('user_ids'))); goto tMrL2; Mygu1: $res_array = json_decode(my_user_reload(my_post('user_ids'), my_post('adjust_balance_type'), my_post('adjust_currency'), my_post('adjust_amount')), 1); goto cHWtp; tMrL2: } else { echo my_caption('global_no_entries_found'); } } goto HJG9o; sASCY: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto f4kWY; pDhci: $this->form_validation->set_rules('adjust_amount', my_caption('payment_amount'), 'trim|required|numeric|greater_than_equal_to[0.01]'); goto yWUjl; HJG9o: } public function payment_add_purchase() { goto wy7V3; Opxfz: $query = $this->db->where('ids', my_uri_segment(3))->get('user', 1); goto jOc1f; wy7V3: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto Opxfz; jOc1f: if ($query->num_rows()) { goto wd_yn; E5HMe: my_load_view($this->setting->theme, 'Admin/payment_add_purchase', $data); goto qxcR8; HBxUN: $data['rs_purchase'] = $this->db->where('enabled', 1)->where('trash', 0)->where('type', 'purchase')->get('payment_item')->result(); goto E5HMe; wd_yn: $data['rs_user'] = $query->row(); goto HBxUN; qxcR8: } else { echo my_caption('global_no_entries_found'); } goto O4RzE; O4RzE: } public function payment_add_purchase_action() { goto dURfH; pmdSK: my_check_demo_mode(); goto PrMGI; PrMGI: $query_user = $this->db->where('ids', my_post('user_ids'))->get('user', 1); goto fb_ab; dURfH: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto pmdSK; fb_ab: if ($query_user->num_rows()) { goto eQolR; CcxLP: $this->form_validation->set_rules('description', my_caption('payment_description'), 'trim|max_length[1024]'); goto w21v1; eQolR: $this->form_validation->set_rules('purchase', my_caption('payment_add_purchase_item'), 'trim|required'); goto CcxLP; w21v1: if ($this->form_validation->run() == FALSE) { goto qCeSM; oUlnl: $data['rs_purchase'] = $this->db->where('enabled', 1)->where('trash', 0)->where('type', 'purchase')->get('payment_item')->result(); goto NQdIz; NQdIz: my_load_view($this->setting->theme, 'Admin/payment_add_purchase', $data); goto e7wel; qCeSM: $data['rs_user'] = $query_user->row(); goto oUlnl; e7wel: } else { $query_purchase = $this->db->where('enabled', 1)->where('type', 'purchase')->where('ids', my_post('purchase'))->get('payment_item', 1); if ($query_purchase->num_rows()) { goto OL5zO; OL5zO: $rs_purchase = $query_purchase->row(); goto e1jI4; DcCf8: $res_array = json_decode($res, 1); goto ilvcI; e1jI4: $res = my_user_reload(my_post('user_ids'), 'Cut', $rs_purchase->item_currency, $rs_purchase->item_price); goto DcCf8; ilvcI: if ($res_array['result']) { goto zhNlJ; zhNlJ: $insert_data = array('ids' => my_random(), 'user_ids' => my_post('user_ids'), 'payment_ids' => str_repeat('0', 50), 'item_type' => 'purchase', 'item_ids' => $rs_purchase->ids, 'item_name' => $rs_purchase->item_name, 'created_time' => my_server_time(), 'description' => my_post('description'), 'stuff' => $rs_purchase->stuff_setting, 'used_up' => 0, 'auto_renew' => $rs_purchase->auto_renew); goto q4wxu; q4wxu: $this->db->insert('payment_purchased', $insert_data); goto kzPSV; uDw45: redirect('admin/payment_add_purchase/' . my_post('user_ids')); goto GreAM; kzPSV: $this->session->set_flashdata('flash_success', my_caption('payment_add_purchase_add') . '(' . $rs_purchase->item_name . ')' . my_caption('global_successfully') . '!'); goto uDw45; GreAM: } else { $this->session->set_flashdata('flash_danger', my_caption('payment_add_purchase_balance_not_enough')); redirect('admin/payment_add_purchase/' . my_post('user_ids')); } goto TffMl; TffMl: } else { echo my_caption('global_no_entries_found'); } } goto LD0P6; LD0P6: } else { echo my_caption('global_no_entries_found'); } goto owRqu; owRqu: } public function payment_add_subscription() { goto MpQel; V7OtV: $query = $this->db->where('ids', my_uri_segment(3))->get('user', 1); goto Bk5da; Bk5da: if ($query->num_rows()) { goto VeQpP; qE_cv: my_load_view($this->setting->theme, 'Admin/payment_add_subscription', $data); goto sf5UC; dX6q3: $data['rs_subscription'] = $this->db->where('enabled', 1)->where('trash', 0)->where('type', 'subscription')->get('payment_item')->result(); goto qE_cv; VeQpP: $data['rs_user'] = $query->row(); goto dX6q3; sf5UC: } else { echo my_caption('global_no_entries_found'); } goto hMdOT; MpQel: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto V7OtV; hMdOT: } public function payment_add_subscription_action() { goto cnNoU; HUTP3: $query_user = $this->db->where('ids', my_post('user_ids'))->get('user', 1); goto dXP0F; y5jq7: my_check_demo_mode(); goto HUTP3; cnNoU: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto y5jq7; dXP0F: if ($query_user->num_rows()) { goto TVSN1; TVSN1: $this->form_validation->set_rules('subscription', my_caption('payment_type_subscription_item'), 'trim|required'); goto aXFic; aXFic: $this->form_validation->set_rules('description', my_caption('payment_description'), 'trim|max_length[1024]'); goto edQ5B; edQ5B: if ($this->form_validation->run() == FALSE) { goto nrY10; zDog4: $data['rs_subscription'] = $this->db->where('enabled', 1)->where('type', 'subscription')->get('payment_item')->result(); goto wYci8; wYci8: my_load_view($this->setting->theme, 'Admin/payment_add_subscription', $data); goto EhXgo; nrY10: $data['rs_user'] = $query_user->row(); goto zDog4; EhXgo: } else { goto k_is0; crU2w: $rs_user = $query_user->row(); goto HIU8m; HIU8m: if ($query_subscription->num_rows()) { goto C3FD0; DgB26: $res = my_user_reload(my_post('user_ids'), 'Cut', $rs_subscription->item_currency, $rs_subscription->item_price); goto m1unN; gWAFR: if ($res_array['result']) { goto oE3DZ; E89Hg: $this->db->insert('payment_subscription', $insert_data); goto f5RUu; oE3DZ: $current_time = my_server_time(); goto y2z1o; MYEjB: $insert_data = array('ids' => my_random(), 'item_ids' => my_post('subscription'), 'user_ids' => my_post('user_ids'), 'payment_gateway' => 'manual', 'gateway_identifier' => '0', 'quantity' => 1, 'status' => 'active', 'start_time' => $current_time, 'end_time' => $end_date, 'created_time' => $current_time, 'updated_time' => $current_time, 'description' => my_post('description'), 'stuff' => $rs_subscription->stuff_setting, 'used_up' => 0, 'auto_renew' => $rs_subscription->auto_renew); goto E89Hg; O82UY: redirect('admin/payment_add_subscription/' . my_post('user_ids')); goto h_lFW; f5RUu: $this->session->set_flashdata('flash_success', my_caption('payment_add_subscription_add') . '(' . $rs_subscription->item_name . ')' . my_caption('global_successfully') . '!'); goto O82UY; y2z1o: $end_date = date('Y-m-d H:i:s', strtotime($rs_subscription->recurring_interval_count . ' ' . $rs_subscription->recurring_interval, strtotime($current_time))); goto MYEjB; h_lFW: } else { $this->session->set_flashdata('flash_danger', my_caption('payment_add_subscription_balance_not_enough')); redirect('admin/payment_add_subscription/' . my_post('user_ids')); } goto rUeZu; C3FD0: $rs_subscription = $query_subscription->row(); goto DgB26; m1unN: $res_array = json_decode($res, 1); goto gWAFR; rUeZu: } else { echo my_caption('global_no_entries_found'); } goto MZupi; k_is0: $query_subscription = $this->db->where('enabled', 1)->where('type', 'subscription')->where('ids', my_post('subscription'))->get('payment_item', 1); goto crU2w; MZupi: } goto w0TI9; w0TI9: } else { echo my_caption('global_no_entries_found'); } goto EvBW_; EvBW_: } public function payment_item_list() { !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/payment_item_list'); } public function payment_item_add() { !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/payment_item_detail'); } public function payment_item_add_action() { goto djvsL; N1lrD: $this->form_validation->set_rules('characters_limit', my_caption('tts_payment_characters_limit_standard'), 'trim|integer|greater_than_equal_to[1]'); goto yT1aI; yT1aI: $this->form_validation->set_rules('item_description', my_caption('payment_item_description_label'), 'trim|required'); goto JG2l5; GU7j0: $this->form_validation->set_rules('item_name', my_caption('payment_item_name_label'), 'trim|required|max_length[255]'); goto r0gV6; r0gV6: $this->form_validation->set_rules('access_code', my_caption('payment_item_access_code_label'), 'trim|max_length[50]'); goto hrQ78; wonLy: $this->form_validation->set_rules('purchase_times', my_caption('payment_item_purchase_times_limit'), 'trim|required|integer'); goto nr6DL; djvsL: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto z7m7e; nr6DL: $this->form_validation->set_rules('access_condition[]', my_caption('payment_item_access_condition'), 'trim|required'); goto N1lrD; K9SiD: $this->form_validation->set_rules('item_position', my_caption('payment_item_position'), 'trim|required|integer'); goto GU7j0; z7m7e: my_check_demo_mode(); goto K9SiD; JG2l5: if (my_post('item_type') == 'subscription') { $this->form_validation->set_rules('recurring_interval_count', my_caption('payment_item_recurring_interval_count_label'), 'trim|required|integer|greater_than[0]'); $this->form_validation->set_rules('recurring_interval', my_caption('payment_item_recurring_interval_label'), 'trim|required|in_list[day,week,month,year]'); } goto CS_PG; hrQ78: $this->form_validation->set_rules('item_price', my_caption('payment_item_price_label'), 'trim|required|numeric|greater_than_equal_to[0]'); goto wonLy; CS_PG: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/payment_item_detail'); } else { goto Ghcmc; HZADN: redirect(base_url('admin/payment_item_list/')); goto UbFag; Y4Hmt: $this->session->set_flashdata('flash_success', my_caption('payment_item_add_success')); goto HZADN; Ghcmc: $this->admin_model->payment_item_add(); goto Y4Hmt; UbFag: } goto Zyd_5; Zyd_5: } public function payment_item_remove_action() { goto ov3a0; ov3a0: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto skLE0; uGnZj: $query = $this->db->where('ids', my_uri_segment(3))->get('payment_item', 1); goto polUF; polUF: if ($query->num_rows()) { $rs = $query->row(); if ($rs->type = 'subscription') { goto lLu0Q; lLu0Q: $query_subscription = $this->db->where('item_ids', $rs->ids)->get('payment_subscription', 1); goto KRx_x; KRx_x: $query_voice_resource = $this->db->like('accessibility_standard', $rs->ids)->or_like('accessibility_neural', $rs->ids)->get('tts_resource', 1); goto JCNXS; JCNXS: if ($query_subscription->num_rows()) { echo '{"result":false, "title":"' . my_caption('global_failure') . '", "text":"' . my_caption('payment_item_delete_failure_still_subscribed') . '", "redirect":"CallBack"}'; } else { if ($query_voice_resource->num_rows()) { $this->db->where('ids', my_uri_segment(3))->update('payment_item', array('trash' => 1)); } else { $this->db->where('ids', my_uri_segment(3))->delete('payment_item'); } echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"CallBack"}'; } goto YcnNz; YcnNz: } else { goto Fyh2M; WvLfw: if ($query_purchased->num_rows() || $query_voice_resource->num_rows()) { $this->db->where('ids', my_uri_segment(3))->update('payment_item', array('trash' => 1)); } else { $this->db->where('ids', my_uri_segment(3))->delete('payment_item'); } goto NsEv4; Fyh2M: $query_purchased = $this->db->where('item_ids', $rs->ids)->get('payment_purchased', 1); goto WvLfw; NsEv4: echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"CallBack"}'; goto i34y0; i34y0: } } else { echo '{"result":false, "title":"' . my_caption('global_failure') . '", "text":"' . my_caption('global_no_entries_found') . '", "redirect":"CallBack"}'; } goto uQFKi; skLE0: my_check_demo_mode('alert_json'); goto uGnZj; uQFKi: } public function payment_item_modify() { goto w4zPa; w4zPa: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto cVPLq; aliWc: if ($query->num_rows()) { $data['rs'] = $query->row(); my_load_view($this->setting->theme, 'Admin/payment_item_detail', $data); } else { echo my_caption('global_no_entries_found'); } goto GQcPf; cVPLq: $query = $this->db->where('ids', my_uri_segment(3))->get('payment_item', 1); goto aliWc; GQcPf: } public function payment_item_modify_action() { goto WoXHt; llflH: my_check_demo_mode(); goto OvI4_; ndu9P: if ($query->num_rows()) { goto D8db_; S12cR: $this->form_validation->set_rules('item_description', my_caption('payment_item_description_label'), 'trim|required'); goto eFQVI; LhQSi: $this->form_validation->set_rules('item_position', my_caption('payment_item_position'), 'trim|required|integer'); goto z4gBA; R4G9h: $this->form_validation->set_rules('access_condition[]', my_caption('payment_item_access_condition'), 'trim|required'); goto S12cR; ovXjM: $stuff_setting = ''; goto LhQSi; z4gBA: $this->form_validation->set_rules('item_name', my_caption('payment_item_name_label'), 'trim|required|max_length[255]'); goto Sq0PI; MzBst: if ($this->form_validation->run() == FALSE) { $data['rs'] = $rs; my_load_view($this->setting->theme, 'Admin/payment_item_detail', $data); } else { goto ox0Hi; InwFj: redirect(base_url('admin/payment_item_modify/' . my_post('ids'))); goto qyj6L; ox0Hi: $this->admin_model->payment_item_modify($rs->type); goto FJWcY; FJWcY: $this->session->set_flashdata('flash_success', my_caption('payment_item_modify_success')); goto InwFj; qyj6L: } goto u3nAW; LyPj4: $this->form_validation->set_rules('purchase_times', my_caption('payment_item_purchase_times_limit'), 'trim|required|integer'); goto R4G9h; D8db_: $rs = $query->row(); goto ovXjM; Sq0PI: $this->form_validation->set_rules('item_price', my_caption('payment_item_price_label'), 'trim|required|greater_than_equal_to[0]'); goto LyPj4; eFQVI: if ($rs->type == 'subscription') { $this->form_validation->set_rules('recurring_interval_count', my_caption('payment_item_recurring_interval_count_label'), 'trim|required|integer|greater_than[0]'); $this->form_validation->set_rules('recurring_interval', my_caption('payment_item_recurring_interval_label'), 'trim|required|in_list[day,week,month,year]'); } goto MzBst; u3nAW: } else { echo my_caption('global_no_entries_found'); } goto A02YP; OvI4_: $query = $this->db->where('ids', my_post('ids'))->get('payment_item', 1); goto ndu9P; WoXHt: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto llflH; A02YP: } public function payment_setting() { !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/payment_setting'); } public function payment_setting_action() { goto sUvll; MQD86: if (my_post('paypal_one_time_enabled') == '1' || my_post('paypal_recurring_enabled') == '1') { goto eNjVi; eNjVi: $this->form_validation->set_rules('paypal_client_id', 'Client ID', 'trim|required'); goto nNI65; nNI65: $this->form_validation->set_rules('paypal_secret', 'Secret', 'trim|required'); goto fI2yr; fI2yr: $this->form_validation->set_rules('paypal_webhook_id', 'Webhook ID', 'trim|required'); goto ylJra; ylJra: } goto eN0Bl; sUvll: !my_check_permission('Payment Management') ? die(my_caption('global_not_enough_permission')) : null; goto c701W; eN0Bl: $this->form_validation->set_rules('payment_tax_rate', my_caption('payment_tax_rate'), 'trim|required|greater_than_equal_to[0]'); goto VWxwr; c701W: my_check_demo_mode(); goto lQryi; GfH9J: if ($this->form_validation->run() == FALSE) { $this->session->set_flashdata('flash_danger', my_caption('global_something_failed')); my_load_view($this->setting->theme, 'Admin/payment_setting'); } else { goto uN3M2; Qi1Pw: redirect(base_url('admin/payment_setting')); goto QZoJn; uN3M2: $res = $this->admin_model->payment_setting_update(); goto JPf1P; JPf1P: $this->session->set_flashdata('flash_success', my_caption('payment_update_success')); goto Qi1Pw; QZoJn: } goto w9o4h; lQryi: if (my_post('stripe_one_time_enabled') == '1' || my_post('stripe_recurring_enabled') == '1') { goto ZiRR5; dBP0H: $this->form_validation->set_rules('stripe_secret_key', 'Secret Key', 'trim|required'); goto MIqse; MIqse: $this->form_validation->set_rules('stripe_signing_secret', 'Signing Secret', 'trim|required'); goto RiLv9; ZiRR5: $this->form_validation->set_rules('stripe_publishable_key', 'Publishable Key', 'trim|required'); goto dBP0H; RiLv9: } goto MQD86; VWxwr: $this->form_validation->set_rules('act', '', 'in_list[payment_setting]'); goto GfH9J; w9o4h: } public function users_activity_log() { !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/list_activity'); } public function users_activity_log_delete() { goto rNtrt; rNtrt: !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; goto UYh1r; K3BWR: $before_this_time = date('Y-m-d H:i:s', strtotime($offset, strtotime(my_server_time()))); goto aKwjs; npK4A: switch (my_uri_segment(3)) { case 'A': $offset = '-3 day'; break; case 'B': $offset = '-14 day'; break; case 'C': $offset = '-1 month'; break; case 'D': $offset = '-3 month'; break; case 'E': $offset = '-6 month'; break; case 'F': $offset = '-12 month'; break; case 'G': $offset = '-1 second'; break; } goto K3BWR; aKwjs: $this->db->where('created_time<=', $before_this_time)->delete('activity'); goto jhXqg; jhXqg: echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"CallBack"}'; goto ogN0w; UYh1r: my_check_demo_mode('alert_json'); goto npK4A; ogN0w: } public function list_online() { !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/list_online'); } public function send_notification() { !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/send_notification'); } public function send_notification_action() { goto W9tnw; SW7AM: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/send_notification'); } else { goto vaOsx; dQoki: $this->session->set_flashdata('flash_success', my_caption('notification_send_success')); goto LbHne; vaOsx: $res = $this->admin_model->send_notification($this->setting); goto dQoki; LbHne: redirect(base_url('admin/send_notification')); goto N1Ajq; N1Ajq: } goto V9gPD; Ha0ib: $this->form_validation->set_rules('notification_body', my_caption('notification_body'), 'trim|required'); goto SW7AM; gru9X: $this->form_validation->set_rules('notification_subject', my_caption('notification_subject'), 'trim|required|max_length[255]'); goto Ha0ib; RR3Pw: my_check_demo_mode(); goto gru9X; W9tnw: !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; goto RR3Pw; V9gPD: } public function list_notification() { !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/list_notification'); } public function list_notification_view() { goto CPX9E; CPX9E: !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; goto NOEoU; NOEoU: $query = $this->db->where('ids', my_uri_segment(3))->get('notification', 1); goto vKskH; vKskH: if ($query->num_rows()) { $data['rs'] = $query->row(); my_load_view($this->setting->theme, 'Generic/view_notification', $data); } else { echo my_caption('global_no_entries_found'); } goto LB7Rb; LB7Rb: } public function general_setting_tc() { !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/terms_conditions'); } public function general_setting_pp() { !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/privacy_policy'); } public function database_backup() { !my_check_permission('Database Backup') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/database_backup'); } public function database_backup_action() { goto F2i2i; uVCIY: $this->load->dbutil(); goto aSH_R; sI4od: $this->db->update('setting', array('last_backup_time' => my_server_time())); goto uVCIY; aSH_R: $backup = $this->dbutil->backup($prefs); goto aroWw; ASyRB: $backup_filename = 'backup_' . $options . '_' . my_server_time('UTC', 'YmdHis') . '_' . random_string('alnum', 6) . '.zip'; goto igfKU; DZiQC: my_post('backup_action') == 'A' ? redirect(base_url('admin/database_backup')) : force_download($backup_filename, $backup); goto jWl9A; igfKU: $prefs += array('format' => 'zip', 'filename' => $backup_filename); goto sI4od; aroWw: if (my_post('backup_action') == 'A') { goto mvLw3; gZYi1: $this->session->set_flashdata('flash_success', $message); goto cCdj8; mvLw3: $options .= ', Save'; goto uyl2n; ZENA2: strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' ? $file_full_path = FCPATH . 'backup\\' . $backup_filename : ($file_full_path = FCPATH . 'backup/' . $backup_filename); goto uYSS3; SZRBo: $message = my_caption('database_backup_success') . $file_full_path; goto gZYi1; uYSS3: write_file($file_full_path, $backup); goto SZRBo; uyl2n: $this->load->helper('file'); goto ZENA2; cCdj8: } else { goto VwqXj; VwqXj: $options .= ' Download'; goto DkKg_; DkKg_: $file_full_path = $backup_filename; goto BoqaM; BoqaM: $this->load->helper('download'); goto wEhuQ; wEhuQ: } goto v4iP8; qO7TB: $this->db->insert('backup_log', $log_array); goto DZiQC; v4iP8: $log_array = array('ids' => my_random(), 'file_path' => $file_full_path, 'options' => $options, 'created_method' => 'Manual', 'created_time' => my_server_time()); goto qO7TB; F2i2i: !my_check_permission('Database Backup') ? die(my_caption('global_not_enough_permission')) : null; goto ttbNx; i2qot: if (my_post('backup_range') == 'A') { $prefs = array('tables' => explode(',', $this->config->item('my_key_table'))); $options = 'Partially'; } else { $prefs = array('tables' => array()); $options = 'Fully'; } goto ASyRB; ttbNx: my_check_demo_mode(); goto i2qot; jWl9A: } public function general_setting_tc_action() { goto RN53M; MhEKS: my_check_demo_mode(); goto nV43Q; hSSG1: $this->form_validation->set_rules('tc_body', my_caption('gs_tc_body'), 'trim|required'); goto IE0JV; IE0JV: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/terms_conditions'); } else { goto gwu3G; gwu3G: $tc_array['title'] = my_post('tc_title'); goto vKeGL; pljg3: redirect(base_url('admin/general_setting_tc')); goto Vdcmf; gGckJ: $this->db->update('setting', array('terms_conditions' => json_encode($tc_array))); goto s7Iev; s7Iev: $this->session->set_flashdata('flash_success', my_caption('gs_tc_update_success')); goto pljg3; vKeGL: $tc_array['body'] = my_post('tc_body'); goto gGckJ; Vdcmf: } goto BBQab; nV43Q: $this->form_validation->set_rules('tc_title', my_caption('gs_tc_Title'), 'trim|required'); goto hSSG1; RN53M: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto MhEKS; BBQab: } public function general_setting_pp_action() { goto cx4OH; cx4OH: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto VnS7O; nPTnp: $this->form_validation->set_rules('pp_title', my_caption('gs_tc_Title'), 'trim|required'); goto Q3ZPm; Q3ZPm: $this->form_validation->set_rules('pp_body', my_caption('gs_tc_body'), 'trim|required'); goto dW70c; dW70c: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/privacy_policy'); } else { goto cryPL; Ze1m4: $this->session->set_flashdata('flash_success', my_caption('gs_pp_update_success')); goto LW42o; RXQto: $this->db->update('setting', array('privacy_policy' => json_encode($pp_array))); goto Ze1m4; xRnAp: $pp_array['body'] = my_post('pp_body'); goto RXQto; cryPL: $pp_array['title'] = my_post('pp_title'); goto xRnAp; LW42o: redirect(base_url('admin/general_setting_pp')); goto B4cuZ; B4cuZ: } goto BZjar; VnS7O: my_check_demo_mode(); goto nPTnp; BZjar: } public function signin_as_user() { goto gjDQP; xowVP: if ($query->num_rows()) { goto WPOUj; C4s03: if (my_uri_segment(3) == $_SESSION['user_ids']) { $this->session->set_flashdata('flash_danger', my_caption('user_impersonate_self_not_allow')); redirect($_SERVER['HTTP_REFERER']); } elseif ($rs_role->name == 'Super_Admin') { $this->session->set_flashdata('flash_danger', my_caption('user_impersonate_superadmin_not_allow')); redirect($_SERVER['HTTP_REFERER']); } else { goto w0tJO; HDZV_: $this->user_model->sigin_success_log($rs, 'impersonate'); goto wCIuZ; wCIuZ: redirect(base_url('dashboard')); goto xMWWu; w0tJO: $this->load->model('user_model'); goto HDZV_; xMWWu: } goto oLpby; d0w3F: $rs_role = $this->db->where('ids', $rs->role_ids)->get('role', 1)->row(); goto C4s03; WPOUj: $rs = $query->row(); goto d0w3F; oLpby: } else { $this->session->set_flashdata('flash_danger', my_caption('user_impersonate_invalid_user')); redirect($_SERVER['HTTP_REFERER']); } goto fJCqt; gjDQP: !my_check_permission('User Management') ? die(my_caption('global_not_enough_permission')) : null; goto mly98; mly98: $query = $this->db->where('ids', my_uri_segment(3))->get('user', 1); goto xowVP; fJCqt: } public function stop_impersonating() { if (!empty($_SESSION['impersonate'])) { goto AJ3XO; AJ3XO: $this->db->where('ids', $_SESSION['user_ids'])->update('user', array('online' => 0)); goto PL7Ol; vrNuv: redirect(base_url('admin/list_user')); goto Rt1Vj; PL7Ol: $rs = $this->db->where('ids', $_SESSION['impersonate'])->get('user', 1)->row(); goto MSACT; MSACT: $this->load->model('user_model'); goto pOPTc; pOPTc: $this->user_model->sigin_success_log($rs, 'stop_impersonating'); goto vrNuv; Rt1Vj: } else { my_caption('global_not_enough_permission'); } } public function miscellaneous() { !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/miscellaneous'); } public function miscellaneous_action() { goto k_qr7; jd55G: my_check_demo_mode(); goto wOXdn; k_qr7: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto jd55G; nTH31: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/miscellaneous'); } else { goto HlhMP; MvUjA: if ($res['result']) { $this->session->set_flashdata('flash_success', $res['message']); } else { $this->session->set_flashdata('flash_danger', $res['message']); } goto Dw_hS; HlhMP: $res = $this->admin_model->miscellaneous(); goto MvUjA; Dw_hS: redirect(base_url('admin/miscellaneous')); goto Fo9ub; Fo9ub: } goto WriZn; KFRir: $this->form_validation->set_rules('file_size', my_caption('file_manager_file_size'), 'trim|required|numeric'); goto nTH31; wOXdn: $this->form_validation->set_rules('file_type', my_caption('file_manager_file_type'), 'trim|required'); goto KFRir; WriZn: } public function usage_example() { !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/usage_example'); } public function support_setting() { !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/support_setting'); } public function support_setting_action() { goto E7MvG; BcWOK: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/support_setting'); } else { goto fQtxM; s4Ae3: redirect(base_url('admin/support_setting')); goto mfkJA; fAT71: $this->session->set_flashdata('flash_success', my_caption('support_setting_update_success')); goto s4Ae3; fQtxM: $this->admin_model->support_setting_update(); goto fAT71; mfkJA: } goto AUYcu; bnCmp: $this->form_validation->set_rules('act', '', 'in_list[support_setting]'); goto BcWOK; bj9Qy: if (my_post('support_ticket_notification_email_address') != '') { $this->form_validation->set_rules('support_ticket_notification_email_address', my_caption('global_email_address'), 'trim|valid_emails'); } goto bnCmp; s290T: my_check_demo_mode(); goto bj9Qy; E7MvG: !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; goto s290T; AUYcu: } public function ticket_list() { !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/ticket_list'); } public function ticket_view() { goto bnvna; bnvna: !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; goto gArnS; gArnS: $res = $this->get_ticket(my_uri_segment(3)); goto n1k0n; n1k0n: if ($res == FALSE) { echo my_caption('global_no_entries_found'); } else { if ($res['rs']->main_status == 2) { $this->db->where('ids', my_uri_segment(3))->where('read_status', 0)->update('ticket', array('read_status' => 1)); $this->db->where('ids_father', my_uri_segment(3))->where('source', 'user')->where('read_status', 0)->update('ticket', array('read_status' => 1)); } my_load_view($this->setting->theme, 'Generic/view_ticket', $res); } goto O_9qu; O_9qu: } public function ticket_view_action() { goto Ni0vs; Dvnzz: my_check_demo_mode(); goto Wgffs; Ni0vs: !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; goto Dvnzz; JIc0F: if ($this->form_validation->run() == FALSE) { $res = $this->get_ticket(my_post('ids_father')); my_load_view($this->setting->theme, 'Generic/view_ticket', $res); } else { $query = $this->db->where('ids', my_post('ids_father'))->get('ticket', 1); if ($query->num_rows()) { goto dMe9X; unU8X: redirect(base_url('admin/ticket_view/' . $ids)); goto Pjhdi; dMe9X: $this->load->model('user_model'); goto x87FZ; vdLYt: $this->session->set_flashdata('flash_success', my_caption('support_ticket_notice_reply_saved')); goto unU8X; x87FZ: $ids = $this->user_model->update_ticket('agent_update'); goto vdLYt; Pjhdi: } else { echo my_caption('global_no_entries_found'); } } goto KBMaa; Wgffs: $this->form_validation->set_rules('ticket_reply', my_caption('global_reply'), 'trim|required'); goto JIc0F; KBMaa: } public function ticket_close_action() { goto tDIeh; tDIeh: !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; goto USFuV; TAu07: echo '{"result":true, "title":"", "text":"' . my_caption('support_ticket_notice_close') . '", "redirect":"' . base_url('admin/ticket_view/' . my_uri_segment(3)) . '"}'; goto OYwzC; nVeqi: $this->db->where('ids', my_uri_segment(3))->where('main_status!=', 0)->update('ticket', array('main_status' => 0, 'read_status' => 1, 'updated_time' => my_server_time())); goto TAu07; USFuV: my_check_demo_mode('alert_json'); goto nVeqi; OYwzC: } public function ticket_remove() { goto bz6C4; bz6C4: !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; goto FCI1y; FCI1y: my_check_demo_mode('alert_json'); goto QO86_; a7xFk: echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"' . $redirect . '"}'; goto iqSJt; QO86_: if (my_uri_segment(3) == 'full') { goto PJ5nr; FCr9S: $redirect = base_url('admin/ticket_list'); goto qliSl; PJ5nr: $this->db->where('ids', my_uri_segment(4))->delete('ticket'); goto YmDl8; YmDl8: $this->db->where('ids_father', my_uri_segment(4))->delete('ticket'); goto FCr9S; qliSl: } else { $this->db->where('ids', my_uri_segment(5))->delete('ticket'); $redirect = base_url('admin/ticket_view/' . my_uri_segment(4)); } goto a7xFk; iqSJt: } public function catalog() { goto BEZxT; JwtrV: my_load_view($this->setting->theme, 'Admin/list_catalog', $data); goto DdKgh; e_Yrw: $query = $this->db->order_by('type', 'asc')->order_by('id', 'desc')->get('catalog'); goto oKmts; BEZxT: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto e_Yrw; oKmts: if ($query->num_rows()) { $data['rs'] = $query->result(); } else { $data['rs'] = ''; } goto JwtrV; DdKgh: } public function catalog_add_action() { goto vw6BD; eRlCD: if ($this->form_validation->run() == FALSE) { echo '{"result":false, "message":"' . strip_tags($this->form_validation->error('catalog_name')) . '"}'; } else { $query = $this->db->where('type', my_post('catalog_type'))->where('name', my_post('catalog_name'))->get('catalog', 1); if ($query->num_rows()) { echo '{"result":false, "message":"' . my_caption('catalog_duplicated_notice') . '"}'; } else { goto SwWzW; kBl7q: if ($process_result) { goto sBLtt; LzL9U: echo '{"result":true, "message":"' . my_caption('catalog_created') . '"}'; goto Mg4bW; RFyTR: $this->db->insert('catalog', $data); goto LzL9U; sBLtt: $data = array('ids' => my_random(), 'type' => my_post('catalog_type'), 'name' => my_post('catalog_name'), 'description' => my_post('catalog_description')); goto RFyTR; Mg4bW: } else { echo '{"result":false, "message":"' . my_caption('catalog_folder_failed_to_perform') . '"}'; } goto Cprnd; SwWzW: $process_result = TRUE; goto g9jox; g9jox: if (my_post('catalog_type') == 'file_manager_folder') { if (!is_dir($this->config->item('my_upload_directory') . my_post('catalog_name'))) { mkdir($this->config->item('my_upload_directory') . my_post('catalog_name'), 0777, TRUE) ? $process_result = TRUE : ($process_result = FALSE); } } goto kBl7q; Cprnd: } } goto GWDtH; REcfM: $this->form_validation->set_rules('catalog_description', my_caption('catalog_description'), 'trim|max_length[1024]'); goto eRlCD; vw6BD: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto TAK0R; pvuvT: $this->form_validation->set_rules('catalog_name', my_caption('catalog_name'), 'trim|required|max_length[50]'); goto REcfM; TAK0R: my_check_demo_mode('simple_json'); goto pvuvT; GWDtH: } public function catalog_edit_action() { goto Hm0ii; mqHg4: $this->form_validation->set_rules('catalog_name', my_caption('catalog_name'), 'trim|required|max_length[50]'); goto tQD5N; N4RC2: if ($this->form_validation->run() == FALSE) { echo '{"result":false, "message":"' . strip_tags($this->form_validation->error('catalog_name')) . '"}'; } else { $query = $this->db->where('type', my_post('catalog_type'))->where('name', my_post('catalog_name'))->where('ids!=', my_post('catalog_hidden_ids'))->get('catalog', 1); if ($query->num_rows()) { echo '{"result":false, "message":"' . my_caption('catalog_duplicated_notice') . '"}'; } else { goto jigfT; yx2MS: if ($process_result) { $this->db->where('ids', my_post('catalog_hidden_ids'))->update('catalog', array('name' => my_post('catalog_name'), 'description' => my_post('catalog_description'))); echo '{"result":true, "message":"' . my_caption('catalog_updated') . '"}'; } else { echo '{"result":false, "message":"' . my_caption('catalog_folder_failed_to_perform') . '"}'; } goto HVzxJ; jigfT: $rs = $this->db->where('ids', my_post('catalog_hidden_ids'))->get('catalog', 1)->row(); goto IFpdG; IFpdG: $process_result = TRUE; goto Bon6r; Bon6r: if (my_post('catalog_type') == 'file_manager_folder') { if ($rs->name != my_post('catalog_name')) { if (!is_dir($this->config->item('my_upload_directory') . my_post('catalog_name'))) { $this->db->where('catalog', $rs->name)->update('file_manager', array('catalog' => my_post('catalog_name'))); rename($this->config->item('my_upload_directory') . $rs->name, $this->config->item('my_upload_directory') . my_post('catalog_name')) ? $process_result = TRUE : ($process_result = FALSE); } else { $process_result = FALSE; } } } elseif (my_post('catalog_type') == 'support_faq') { $this->db->where('catalog', $rs->name)->update('faq', array('catalog' => my_post('catalog_name'))); } elseif (my_post('catalog_type') == 'support_documentation') { $this->db->where('catalog', $rs->name)->update('documentation', array('catalog' => my_post('catalog_name'))); } elseif (my_post('catalog_type') == 'blog_catalog') { $this->db->where('catalog', $rs->name)->update('blog', array('catalog' => my_post('catalog_name'))); } goto yx2MS; HVzxJ: } } goto fdRLh; tQD5N: $this->form_validation->set_rules('catalog_description', my_caption('catalog_description'), 'trim|max_length[1024]'); goto N4RC2; Hm0ii: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto XrdzE; XrdzE: my_check_demo_mode('simple_json'); goto mqHg4; fdRLh: } public function catalog_remove_action() { goto aNuzD; jLe0X: my_check_demo_mode('alert_json'); goto KccQB; aNuzD: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto jLe0X; Vc8Rc: echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"' . base_url('admin/catalog') . '"}'; goto NLoKE; KccQB: $query = $this->db->where('ids', my_uri_segment(3))->get('catalog', 1); goto yRSa1; yRSa1: if ($query->num_rows()) { goto NPQDh; gQ86E: switch ($catalog_type) { case 'file_manager_folder': goto FSILU; X6QaA: rmdir($dir_path); goto LHstq; FSILU: $dir_path = $this->config->item('my_upload_directory') . $catalog_name; goto bh1F0; LHstq: break; goto Hi5xA; bh1F0: array_map('unlink', glob($dir_path . '/*.*')); goto X6QaA; Hi5xA: case 'support_faq': $this->db->where('catalog', $catalog_name)->delete('faq'); break; case 'support_documentation': $this->db->where('catalog', $catalog_name)->delete('documentation'); break; } goto nSmRX; NPQDh: $catalog_name = $query->row()->name; goto DIVuS; DIVuS: $catalog_type = $query->row()->type; goto gQ86E; nSmRX: $this->db->where('catalog', $query->row()->name)->where('user_ids', $_SESSION['user_ids'])->delete('file_manager'); goto FlNio; FlNio: $this->db->where('ids', my_uri_segment(3))->delete('catalog'); goto De3Ac; De3Ac: } goto Vc8Rc; NLoKE: } public function faq_list() { !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/faq_list'); } public function faq_new() { !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/faq_detail'); } public function faq_edit() { goto Ym39V; gzIMR: if ($query->num_rows()) { $data['rs'] = $query->row(); my_load_view($this->setting->theme, 'Admin/faq_detail', $data); } else { echo my_caption('global_no_entries_found'); } goto B8yIZ; Ym39V: !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; goto PB3uS; PB3uS: $query = $this->db->where('ids', my_uri_segment(3))->get('faq', 1); goto gzIMR; B8yIZ: } public function faq_action() { goto ViGuM; ViGuM: !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; goto YuVI7; YuVI7: $action = my_uri_segment(3); goto IqvwW; IqvwW: if ($action == 'new') { goto zhAzY; zhAzY: my_check_demo_mode(); goto kNJQB; WPiVD: $this->form_validation->set_rules('faq_catalog', my_caption('support_faq_catalog'), 'trim|required|max_length[50]'); goto a4x2c; kNJQB: $this->form_validation->set_rules('faq_subject', my_caption('support_faq_subject'), 'trim|required|max_length[255]'); goto WPiVD; a4x2c: $this->form_validation->set_rules('faq_body', my_caption('support_faq_body'), 'trim|required'); goto HxyOh; HxyOh: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/faq_detail'); } else { goto yZdA7; jWDPt: $this->db->insert('faq', $insert_array); goto yFBWF; yZdA7: $insert_array = array('ids' => my_random(), 'user_ids' => $_SESSION['user_ids'], 'catalog' => my_post('faq_catalog'), 'subject' => my_post('faq_subject'), 'body' => my_post('faq_body'), 'created_time' => my_server_time(), 'enabled' => 1); goto jWDPt; yFBWF: $this->session->set_flashdata('flash_success', my_caption('support_faq_add_success')); goto Fbbsp; Fbbsp: redirect(base_url('admin/faq_list/')); goto yQZZJ; yQZZJ: } goto o520v; o520v: } else { goto wYIxC; TWIB4: $query = $this->db->where('ids', $ids)->get('faq', 1); goto zfHeC; zfHeC: if ($query->num_rows()) { $rs = $query->row(); if ($action == 'edit') { goto yhvp5; gH_Zf: $this->form_validation->set_rules('faq_subject', my_caption('support_faq_subject'), 'trim|required|max_length[255]'); goto Y6UOM; Y6UOM: $this->form_validation->set_rules('faq_catalog', my_caption('support_faq_catalog'), 'trim|required|max_length[50]'); goto E_jFP; IYW72: if ($this->form_validation->run() == FALSE) { $data['rs'] = $rs; my_load_view($this->setting->theme, 'Admin/faq_detail', $data); } else { goto ejYRm; aAqFO: $this->db->where('ids', $ids)->update('faq', $update_array); goto AfdCo; ejYRm: $update_array = array('catalog' => my_post('faq_catalog'), 'subject' => my_post('faq_subject'), 'body' => my_post('faq_body')); goto aAqFO; AfdCo: $this->session->set_flashdata('flash_success', my_caption('support_faq_edit_success')); goto AaE23; AaE23: redirect(base_url('admin/faq_edit/' . $ids)); goto jOUzr; jOUzr: } goto WAIJR; yhvp5: my_check_demo_mode(); goto gH_Zf; E_jFP: $this->form_validation->set_rules('faq_body', my_caption('support_faq_body'), 'trim|required'); goto IYW72; WAIJR: } else { goto zKaf7; zKaf7: my_check_demo_mode('alert_json'); goto pEDP6; pEDP6: $this->db->where('ids', $ids)->delete('faq'); goto YnjXJ; YnjXJ: echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"CallBack"}'; goto O12X4; O12X4: } } else { echo '{"result":false, "title":"' . my_caption('global_failure') . '", "text":"' . my_caption('global_no_entries_found') . '", "redirect":"CallBack"}'; } goto AFXOu; wYIxC: $ids = my_uri_segment(4); goto TWIB4; AFXOu: } goto YFDDE; YFDDE: } public function documentation_list() { !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/documentation_list'); } public function documentation_new() { !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/documentation_detail'); } public function documentation_edit() { goto ENDsB; teLTs: if ($query->num_rows()) { $data['rs'] = $query->row(); my_load_view($this->setting->theme, 'Admin/documentation_detail', $data); } else { echo my_caption('global_no_entries_found'); } goto FzPG9; Gf41G: $query = $this->db->where('ids', my_uri_segment(3))->get('documentation', 1); goto teLTs; ENDsB: !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; goto Gf41G; FzPG9: } public function documentation_action() { goto NI9w5; a7s9V: if ($action == 'new') { goto ORG_x; yhSgt: $this->form_validation->set_rules('documentation_subject', my_caption('support_documentation_subject'), 'trim|required|max_length[255]'); goto hTLLu; hTLLu: $this->form_validation->set_rules('documentation_catalog', my_caption('support_documentation_catalog'), 'trim|required|max_length[50]'); goto ne0A_; KM3aJ: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/documentation_detail'); } else { goto xIwAk; CtyqZ: $this->db->insert('documentation', $insert_array); goto BPGW9; Vmb2p: $insert_array = array('ids' => my_random(), 'user_ids' => $_SESSION['user_ids'], 'slug' => $slug, 'catalog' => my_post('documentation_catalog'), 'subject' => my_post('documentation_subject'), 'keyword' => my_post('documentation_keyword'), 'body' => $this->input->post('documentation_body', FALSE), 'attachment' => '', 'created_time' => my_server_time(), 'updated_time' => my_server_time(), 'enabled' => $documentation_enabled); goto CtyqZ; G3TGc: redirect(base_url('admin/documentation_list/')); goto H0f2E; xIwAk: $slug = my_generate_slug('documentation', 'slug', my_post('documentation_subject')); goto iVT67; BPGW9: $this->session->set_flashdata('flash_success', my_caption('support_documentation_add_success')); goto G3TGc; iVT67: my_post('documentation_enabled') == '1' ? $documentation_enabled = 1 : ($documentation_enabled = 0); goto Vmb2p; H0f2E: } goto k4BSP; ORG_x: my_check_demo_mode(); goto yhSgt; JLl8I: $this->form_validation->set_rules('documentation_body', my_caption('support_documentation_body'), 'trim|required'); goto KM3aJ; ne0A_: $this->form_validation->set_rules('documentation_keyword', my_caption('global_keyword'), 'trim|max_length[1024]'); goto JLl8I; k4BSP: } else { goto t2yzS; bdDD0: if ($query->num_rows()) { $rs = $query->row(); if ($action == 'edit') { goto KEq8a; sMI2Z: if ($this->form_validation->run() == FALSE) { $data['rs'] = $rs; my_load_view($this->setting->theme, 'Admin/documentation_detail', $data); } else { goto gSIVw; YICxu: $this->session->set_flashdata('flash_success', my_caption('support_documentation_edit_success')); goto F0fie; gSIVw: my_post('documentation_enabled') == '1' ? $documentation_enabled = 1 : ($documentation_enabled = 0); goto gvwLc; gvwLc: $update_array = array('catalog' => my_post('documentation_catalog'), 'subject' => my_post('documentation_subject'), 'keyword' => my_post('documentation_keyword'), 'body' => $this->input->post('documentation_body', FALSE), 'updated_time' => my_server_time(), 'enabled' => $documentation_enabled); goto y2Uga; y2Uga: $this->db->where('ids', $ids)->update('documentation', $update_array); goto YICxu; F0fie: redirect(base_url('admin/documentation_edit/' . $ids)); goto PyvXZ; PyvXZ: } goto Smhpx; OOmEs: $this->form_validation->set_rules('documentation_subject', my_caption('support_documentation_subject'), 'trim|required|max_length[255]'); goto Ut706; jdjDO: $this->form_validation->set_rules('documentation_body', my_caption('support_documentation_body'), 'trim|required'); goto sMI2Z; Ut706: $this->form_validation->set_rules('documentation_catalog', my_caption('support_documentation_catalog'), 'trim|required|max_length[50]'); goto HBEMk; HBEMk: $this->form_validation->set_rules('documentation_keyword', my_caption('global_keyword'), 'trim|max_length[1024]'); goto jdjDO; KEq8a: my_check_demo_mode(); goto OOmEs; Smhpx: } else { goto wa339; DJGIG: echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"CallBack"}'; goto cH8b7; wa339: my_check_demo_mode('alert_json'); goto xlW_R; xlW_R: $this->db->where('ids', $ids)->delete('documentation'); goto DJGIG; cH8b7: } } else { echo '{"result":false, "title":"' . my_caption('global_failure') . '", "text":"' . my_caption('global_no_entries_found') . '", "redirect":"CallBack"}'; } goto Oofkw; t2yzS: $ids = my_uri_segment(4); goto uHzhJ; uHzhJ: $query = $this->db->where('ids', $ids)->get('documentation', 1); goto bdDD0; Oofkw: } goto qr60u; LMnOd: $action = my_uri_segment(3); goto a7s9V; NI9w5: !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; goto LMnOd; qr60u: } public function contact_form_list() { !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/contact_form_list'); } public function contact_form_view() { goto WWfwn; X9Yjh: $query = $this->db->where('ids', my_uri_segment(3))->get('contact_form', 1); goto L_H8V; WWfwn: !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; goto X9Yjh; L_H8V: if ($query->num_rows()) { goto uHkbc; uHkbc: $data['rs'] = $query->row(); goto hkzYI; hkzYI: $this->db->where('ids', my_uri_segment(3))->where('read_status', 0)->update('contact_form', array('read_status' => 1)); goto InpuH; InpuH: my_load_view($this->setting->theme, 'Admin/contact_form_view', $data); goto v6g2A; v6g2A: } else { echo my_caption('global_no_entries_found'); } goto gEq_I; gEq_I: } public function contact_form_action() { goto ql5Tc; qMrPk: my_check_demo_mode(); goto aY4J7; ql5Tc: !my_check_permission('Support Management') ? die(my_caption('global_not_enough_permission')) : null; goto qMrPk; aY4J7: if (my_uri_segment(3) == 'remove') { $this->db->where('ids', my_uri_segment(4))->delete('contact_form'); echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"CallBack"}'; } goto aecSt; aecSt: } public function front_setting() { !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/front_setting'); } public function front_setting_action() { goto sMy18; OjC1E: $this->form_validation->set_rules('email_address', my_caption('global_email_address'), 'trim|valid_email'); goto m1LW1; m1LW1: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/front_setting'); } else { goto GV455; HiRWh: if (isset($_FILES['userfile']['name'])) { if ($_FILES['userfile']['name'] != '') { goto d9RD1; iFyfW: if ($this->upload->do_upload()) { try { unlink(FCPATH . $this->config->item('my_upload_directory') . $logo_filename); } catch (\Exception $e) { } $logo_filename = $this->upload->data('file_name'); } goto EpHJg; d9RD1: $config = array('upload_path' => FCPATH . $this->config->item('my_upload_directory'), 'allowed_types' => 'png|jpg|jpeg|gif|svg', 'encrypt_name' => TRUE); goto i75J3; i75J3: $this->load->library('upload', $config); goto iFyfW; EpHJg: } } goto pP9pK; iEXhX: redirect(base_url('admin/front_setting')); goto demGL; bmDBu: $this->session->set_flashdata('flash_success', my_caption('front_setting_update_success')); goto iEXhX; pP9pK: $this->admin_model->front_setting_update($logo_filename); goto bmDBu; GV455: $front_setting = json_decode($this->setting->front_setting, TRUE); goto phzQA; phzQA: $logo_filename = $front_setting['logo']; goto HiRWh; demGL: } goto K5f74; sMy18: !my_check_permission('Global Settings') ? die(my_caption('global_not_enough_permission')) : null; goto fyh2Z; KzZmX: $this->form_validation->set_rules('act', 'act', 'trim|in_list[front_setting]'); goto OjC1E; fyh2Z: my_check_demo_mode(); goto KzZmX; K5f74: } public function subscriber() { !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/list_subscriber'); } public function subscriber_action() { !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; if (my_uri_segment(3) == 'remove') { goto p3mae; otr3z: $this->db->where('ids', my_uri_segment(4))->delete('subscriber'); goto ab0fH; p3mae: my_check_demo_mode('alert_json'); goto otr3z; ab0fH: echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"CallBack"}'; goto BvphD; BvphD: } elseif (my_uri_segment(3) == 'download') { goto T22_8; NDTa4: if ($query->num_rows()) { goto x3F8t; ehAnt: force_download('subscriber.txt', $data); goto QbWL0; x3F8t: $rs = $query->result(); goto Sqd2p; DK1B4: foreach ($rs as $row) { $data .= $row->email_address . "\r\n"; } goto dazjF; dazjF: $this->load->helper('download'); goto ehAnt; Sqd2p: $data = ''; goto DK1B4; QbWL0: } else { $this->session->set_flashdata('flash_danger', my_caption('subscriber_no_subscriber_to_download')); redirect('admin/subscriber'); } goto BoQ96; T22_8: my_check_demo_mode(); goto VYCOL; VYCOL: $query = $this->db->order_by('id', 'asc')->get('subscriber'); goto NDTa4; BoQ96: } } public function blog() { !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/blog_list'); } public function blog_new() { !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; my_load_view($this->setting->theme, 'Admin/blog_detail'); } public function blog_new_action() { goto d4li1; y9wBX: my_check_demo_mode(); goto SciQI; yDqJO: $this->form_validation->set_rules('blog_body', my_caption('blog_body'), 'trim|required'); goto E24gn; E24gn: if ($this->form_validation->run() == FALSE) { my_load_view($this->setting->theme, 'Admin/blog_detail'); } else { goto PFh1E; U99t1: redirect(base_url('admin/blog_edit/' . $ids)); goto iKXnF; PFh1E: $ids = $this->admin_model->blog_save(); goto juzJD; juzJD: $this->session->set_flashdata('flash_success', my_caption('blog_new_success')); goto U99t1; iKXnF: } goto yNblr; SciQI: $this->form_validation->set_rules('blog_catalog', my_caption('blog_catalog'), 'trim|required|max_length[50]'); goto QWJb2; d4li1: !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; goto y9wBX; QWJb2: $this->form_validation->set_rules('blog_subject', my_caption('blog_subject'), 'trim|required|max_length[255]'); goto n56I0; n56I0: $this->form_validation->set_rules('blog_keyword', my_caption('global_keyword'), 'trim|max_length[1024]'); goto yDqJO; yNblr: } public function blog_edit() { goto HykCH; kATo2: $query = $this->db->where('ids', my_uri_segment(3))->get('blog', 1); goto QaVLP; QaVLP: if ($query->num_rows()) { $data['rs'] = $query->row(); my_load_view($this->setting->theme, 'Admin/blog_detail', $data); } else { echo my_caption('global_no_entries_found'); } goto hoQR2; HykCH: !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; goto kATo2; hoQR2: } public function blog_edit_action() { goto OHlXH; bu2Hz: my_check_demo_mode(); goto JWHDc; JWHDc: $ids = my_uri_segment(3); goto cxrvE; OHlXH: !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; goto bu2Hz; cxrvE: $query = $this->db->where('ids', $ids)->get('blog', 1); goto Ufvxl; Ufvxl: if ($query->num_rows()) { goto qjerB; Iwur8: $this->form_validation->set_rules('blog_keyword', my_caption('global_keyword'), 'trim|max_length[1024]'); goto mpEWe; cSdVn: $this->form_validation->set_rules('blog_subject', my_caption('blog_subject'), 'trim|required|max_length[255]'); goto Iwur8; q6nkW: if ($this->form_validation->run() == FALSE) { $data['rs'] = $rs; my_load_view($this->setting->theme, 'Admin/blog_detail', $data); } else { goto F6YkJ; wRkl5: $this->session->set_flashdata('flash_success', my_caption('blog_edit_success')); goto FWo2j; F6YkJ: $this->admin_model->blog_update($ids); goto wRkl5; FWo2j: redirect(base_url('admin/blog_edit/' . $ids)); goto l_ZzF; l_ZzF: } goto lDjFk; mpEWe: $this->form_validation->set_rules('blog_body', my_caption('blog_body'), 'trim|required'); goto q6nkW; qjerB: $rs = $query->row(); goto nqPrH; nqPrH: $this->form_validation->set_rules('blog_catalog', my_caption('blog_catalog'), 'trim|required|max_length[50]'); goto cSdVn; lDjFk: } else { echo my_caption('global_no_entries_found'); } goto VICYu; VICYu: } public function blog_remove() { goto hclLO; rXvCd: echo '{"result":true, "title":"' . my_caption('global_deleted_notice_title') . '", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"CallBack"}'; goto xtYLv; b7Wi6: if ($query->num_rows()) { $rs = $query->row(); if ($rs->cover_photo != '') { $file_full_path = FCPATH . $this->config->item('my_upload_directory') . 'blog/' . $rs->cover_photo; file_exists($file_full_path) ? unlink($file_full_path) : null; } } goto t0cip; hclLO: !my_check_permission('Admin Tools') ? die(my_caption('global_not_enough_permission')) : null; goto Nu3d2; t0cip: $this->db->where('ids', my_uri_segment(3))->delete('blog'); goto rXvCd; Nu3d2: my_check_demo_mode('alert_json'); goto ceopF; ceopF: $query = $this->db->where('ids', my_uri_segment(3))->get('blog', 1); goto b7Wi6; xtYLv: } public function reset_api_key() { goto jNaNz; XpYhX: echo '{"result":true, "title":"", "text":"' . my_caption('global_deleted_notice_message') . '", "redirect":"' . base_url('admin/edit_user/') . my_uri_segment(3) . '"}'; goto ZDQ3V; bX1RZ: $this->db->where('ids', my_uri_segment(3))->update('user', array('api_key' => my_random())); goto XpYhX; jNaNz: !my_check_permission('User Management') ? die(my_caption('global_not_enough_permission')) : null; goto rXXkY; rXXkY: my_check_demo_mode('alert_json'); goto bX1RZ; ZDQ3V: } public function upgrade_software() { goto yrhyI; yrhyI: !my_check_role('Super Admin') ? die(my_caption('global_not_enough_permission')) : null; goto noRwH; sPkr6: $query = $this->db->order_by('name', 'asc')->get('script_addons'); goto FuFy4; sRIrQ: $latest_version = $this->setting->version; goto cfGql; DCLZU: if ($latest_version_array['notification_case'] == 'notification_operation_ok') { $latest_version = $latest_version_array['notification_data']['version_number']; $script_name = $latest_version_array['notification_data']['product_title']; } goto SidLc; KmQH0: $addons_version_array = array(); goto sPkr6; noRwH: $this->load->library('m_aus'); goto sRIrQ; ZdsC5: $data['main_version'] = $main_version_array; goto BuSzt; SidLc: $main_version_array = array('type' => 'Main Script', 'name' => $script_name, 'current_version' => $this->setting->version, 'latest_version' => $latest_version); goto KmQH0; eMLTT: my_load_view($this->setting->theme, 'Admin/upgrade_software', $data); goto CzHHV; byiAU: $latest_version_array = $this->m_aus->getLatestVersion(); goto DCLZU; BuSzt: $data['addons_version'] = $addons_version_array; goto eMLTT; cfGql: $script_name = $this->setting->sys_name; goto byiAU; FuFy4: if ($query->num_rows()) { $rs = $query->result(); foreach ($rs as $row) { goto jRFey; W_qzH: $latest_version_array = $this->m_aus->getLatestVersion('', $row->updater_id, $row->updater_key); goto Kfbvi; jRFey: $latest_version = $row->version; goto mP72c; mP72c: $script_name = $row->name; goto W_qzH; W7MYP: array_push($addons_version_array, array('type' => 'Add-ons', 'id' => $row->id, 'name' => $script_name, 'current_version' => $row->version, 'latest_version' => $latest_version)); goto Uqbom; Kfbvi: if ($latest_version_array['notification_case'] == 'notification_operation_ok') { $latest_version = $latest_version_array['notification_data']['version_number']; $script_name = $latest_version_array['notification_data']['product_title']; } goto W7MYP; Uqbom: } } goto ZdsC5; CzHHV: } public function upgrade_software_view() { goto vmfHl; BEaY2: $dir_view = FCPATH . 'application/views'; goto WCO6k; Gco9N: if ($all_version_array['notification_case'] == 'notification_operation_ok') { goto qlKa7; NBWg3: $current_version_array = explode('.', $data['current_version']); goto Q0nfh; MlFg_: foreach ($version_array as $version) { goto vn7ES; LLPjS: if ($current_version_main == $remote_version_main && $current_version_db == $remote_version_db && $current_version_file == $remote_version_file) { break; } goto SeWQR; p0sJN: $remote_version_file = $remote_version_array[2]; goto LLPjS; d3g8h: $remote_version_main = $remote_version_array[0]; goto hzW8O; SeWQR: $i++; goto o8u8R; vn7ES: $remote_version_array = explode('.', $version['version_number']); goto d3g8h; hzW8O: $remote_version_db = $remote_version_array[1]; goto p0sJN; o8u8R: } goto HEDeG; ypQtp: if ($data['ready_version'] != $data['current_version']) { $data['script_type'] == 'Main Script' ? $ready_version_info_array = $this->m_aus->getLatestVersion($data['ready_version']) : ($ready_version_info_array = $this->m_aus->getLatestVersion($data['ready_version'], $rs->updater_id, $rs->updater_key)); if ($ready_version_info_array['notification_case'] == 'notification_operation_ok') { $data['ready_version_date'] = $ready_version_info_array['notification_data']['version_date']; $data['ready_version_changelog'] = $ready_version_info_array['notification_data']['version_changelog']; } else { $data['ready_version_changelog'] = 'UnKnown'; } } else { $data['ready_version_date'] = ''; $data['ready_version_changelog'] = ''; } goto GCKEn; qlKa7: $data['script_name'] = $all_version_array['notification_data']['product_title']; goto m9DcH; ll_yt: $current_version_db = $current_version_array[1]; goto rWSFj; Wyk9L: $i = 0; goto MlFg_; Q0nfh: $current_version_main = $current_version_array[0]; goto ll_yt; I5CSS: $version_array = array_reverse($all_version_array['notification_data']['product_versions']); goto NBWg3; HEDeG: if ($i < count($version_array) - 1) { $data['ready_version'] = $version_array[$i + 1]['version_number']; $data['total_version'] = count($version_array) - $i - 1; } else { $data['ready_version'] = $data['current_version']; $data['total_version'] = 0; } goto ypQtp; m9DcH: $data['latest_version'] = $all_version_array['notification_data']['version_number']; goto o5xIO; rWSFj: $current_version_file = $current_version_array[2]; goto Wyk9L; o5xIO: $data['latest_version_date'] = $all_version_array['notification_data']['version_date']; goto I5CSS; GCKEn: } else { goto zeTyr; zeTyr: $data['latest_version'] = 'UnKnown'; goto xZ7Yg; KH26i: $data['total_version'] = 0; goto rntj9; rntj9: $data['ready_version_changelog'] = 'UnKnown'; goto M8ty5; jdawK: $data['ready_version'] = $data['current_version']; goto E1S5M; E1S5M: $data['ready_version_date'] = 'UnKnown'; goto KH26i; xZ7Yg: $data['latest_version_date'] = 'UnKnown'; goto jdawK; M8ty5: } goto niLMM; lIGEo: $dir_hook = FCPATH . 'application/hooks'; goto c1L_1; i4gTn: if (my_uri_segment(3) == '') { goto qriyh; lE42E: $data['current_version'] = $this->setting->version; goto nMqUk; ayKCV: $data['script_name'] = $this->setting->sys_name; goto LCPdb; LCPdb: $all_version_array = $this->m_aus->getAllVersions(); goto aGHId; qriyh: $data['script_ids'] = 0; goto lE42E; nMqUk: $data['script_type'] = 'Main Script'; goto ayKCV; aGHId: } else { $query = $this->db->where('id', my_uri_segment(3))->get('script_addons', 1); if ($query->num_rows()) { goto QnBaZ; aS2fe: $data['script_ids'] = my_uri_segment(3); goto ihc7h; ihc7h: $data['current_version'] = $rs->version; goto b6Uuc; b6Uuc: $data['script_type'] = 'Add-ons'; goto Q_Hah; Q_Hah: $data['script_name'] = $rs->name; goto Bs2qR; QnBaZ: $rs = $query->row(); goto aS2fe; Bs2qR: $all_version_array = $this->m_aus->getAllVersions($rs->updater_id, $rs->updater_key); goto Qib2T; Qib2T: } else { echo my_caption('global_no_entries_found'); die; } } goto Gco9N; vmfHl: !my_check_role('Super Admin') ? die(my_caption('global_not_enough_permission')) : null; goto aCRXX; niLMM: $dir_controller = FCPATH . 'application/controllers'; goto BEaY2; u33AT: $dir_asset = FCPATH . 'assets'; goto s00zW; Fw4IK: $dir_vendor = FCPATH . 'vendor'; goto lIGEo; wzom0: if (is_writable(FCPATH) && is_writable($dir_controller) && is_writable($dir_view) && is_writable($dir_helper) && is_writable($dir_asset) && is_writable($dir_library) && is_writable($dir_vendor) && is_writable($dir_hook) && is_writable($dir_language)) { $data['writeable'] = TRUE; } else { $data['writeable'] = FALSE; } goto UBJlQ; WCO6k: $dir_helper = FCPATH . 'application/helpers'; goto u33AT; UBJlQ: my_load_view($this->setting->theme, 'Admin/upgrade_software_view', $data); goto utUuY; s00zW: $dir_library = FCPATH . 'application/libraries'; goto Fw4IK; c1L_1: $dir_language = FCPATH . 'application/language'; goto wzom0; aCRXX: $this->load->library('m_aus'); goto i4gTn; utUuY: } public function upgrade_software_action() { goto UX415; UX415: !my_check_role('Super Admin') ? die(my_caption('global_not_enough_permission')) : null; goto yfEB8; PZdqj: if ($current_version_checking) { goto qEO2y; Jfp0y: if ($res['notification_case'] == 'notification_operation_ok') { goto yxA_0; VYd3_: $message = my_caption('upgrade_software_success_header') . my_post('ready_version') . my_caption('upgrade_software_success_tail'); goto TpH7k; yxA_0: mysqli_multi_query($this->db->conn_id, str_replace('MY_DB_PREFIX', $this->db->dbprefix, $res['notification_data'])); goto VYd3_; TpH7k: $this->session->set_flashdata('flash_success', $message); goto FSo10; FSo10: } else { $message = my_caption('upgrade_software_fail') . $res['notification_text']; $this->session->set_flashdata('flash_danger', $message); } goto Bg2TP; qEO2y: $this->load->library('m_aus'); goto mzfZ9; mzfZ9: if (my_post('script_ids') == '0') { goto nnqJ4; wYam9: $res = $this->m_aus->downloadFile($license_code, 'version_upgrade_file', my_post('ready_version')); goto R9Ss6; nnqJ4: $license_code = $this->db->query("SELECT * FROM script_license limit 1")->row()->LICENSE_CODE; goto wYam9; R9Ss6: if ($res['notification_case'] == 'notification_operation_ok') { $res = $this->m_aus->fetchQuery($license_code, 'upgrade', my_post('ready_version')); } goto U2qhm; U2qhm: } else { $res = $this->m_aus->downloadFile($rs->license_code, 'version_upgrade_file', my_post('ready_version'), $rs->updater_id, $rs->updater_key); if ($res['notification_case'] == 'notification_operation_ok') { $res = $this->m_aus->fetchQuery($rs->license_code, 'upgrade', my_post('ready_version'), $rs->updater_id, $rs->updater_key); } } goto Jfp0y; Bg2TP: } goto B3UO1; yfEB8: $current_version_checking = TRUE; goto a6w7n; B3UO1: redirect($_SERVER['HTTP_REFERER']); goto VIHFw; a6w7n: if (my_post('script_ids') == '0') { if (my_post('current_version') != $this->setting->version) { $this->session->set_flashdata('flash_danger', my_caption('upgrade_software_version_error')); $current_version_checking = FALSE; } } else { $rs = $this->db->where('id', my_post('script_ids'))->get('script_addons', 1)->row(); if (my_post('current_version') != $rs->version) { $this->session->set_flashdata('flash_danger', my_caption('upgrade_software_version_error')); $current_version_checking = FALSE; } } goto PZdqj; VIHFw: } public function software_license() { goto h1Afk; LFHUb: my_load_view($this->setting->theme, 'Admin/software_license', $data); goto AyVMn; h1Afk: !my_check_role('Super Admin') ? die(my_caption('global_not_enough_permission')) : null; goto EKwzg; EKwzg: if ($this->config->item('my_demo_mode')) { $data['purchase_code'] = '********-***-***-***-************'; } else { $data['purchase_code'] = $this->db->query("SELECT * FROM script_license limit 1")->row()->LICENSE_CODE; } goto LFHUb; AyVMn: } public function software_license_action() { goto mg2Wl; mg2Wl: !my_check_role('Super Admin') ? die(my_caption('global_not_enough_permission')) : null; goto J1WjM; JNoBr: if (my_ulic()) { $this->session->sess_destroy(); die(my_caption('software_license_notice_uninstall_success')); } else { $this->session->set_flashdata('flash_danger', my_caption('software_license_notice_uninstall_fail')); redirect('admin/software_license'); } goto U8reI; J1WjM: my_check_demo_mode(); goto JNoBr; U8reI: } public function print_my_path() { !my_check_role('Super Admin') ? die(my_caption('global_not_enough_permission')) : null; echo 'You script\'s full path is: <strong>' . FCPATH . '</strong>. Generally, you should store the configuration file outside the last directory and fill in the full path of the configuration file.'; } public function email_duplicated_check($email_address) { if (my_duplicated_check('user', array('email_address' => $email_address))) { return TRUE; } else { $this->form_validation->set_message('email_duplicated_check', my_caption('signup_email_taken')); return FALSE; } } public function check_underscore() { if (strstr(my_post('sim_value'), '_')) { $this->form_validation->set_message('check_underscore', my_caption('rp_underscore_not_allowed')); return FALSE; } else { return TRUE; } } public function icon_upload() { goto WZea3; M2fvY: $this->m_upload->set_upload_path('/' . $this->config->item('my_upload_directory')); goto fF502; uHhf6: $res = $this->m_upload->upload_done(); goto N7ZzN; MKCsE: $this->m_upload->set_file_name('favicon'); goto uHhf6; N7ZzN: if ($res['status']) { return TRUE; } else { $this->form_validation->set_message('icon_upload', $res['error']); return FALSE; } goto EcrkB; WZea3: $this->load->library('m_upload'); goto M2fvY; fF502: $this->m_upload->set_allowed_types('ico'); goto MKCsE; EcrkB: } protected function get_ticket($ids) { $query = $this->db->where('ids', $ids)->where('ids_father', 0)->get('ticket', 1); if ($query->num_rows()) { goto Dn6cw; cDkwf: $data['rs_follow'] = $this->db->where('ids_father', $ids)->order_by('created_time', 'asc')->get('ticket')->result(); goto I0270; Dn6cw: $data['rs'] = $query->row(); goto cDkwf; I0270: return $data; goto omXtV; omXtV: } else { return FALSE; } } }

Function Calls

None

Variables

None

Stats

MD5 5ab522cab40bc8c3f65fa03de1d3c683
Eval Count 0
Decode Time 299 ms