Email:'||mm.email AS Sender," . "r.firstname||' '||r.lastname||'
Acc:'||r.account_no||'-'||b.name AS Recitient,mp.confirmation," . "CASE WHEN m.status=1 THEN 'Pending' WHEN m.status=3 THEN 'Cancelled' WHEN m.status=5 THEN 'Completed' ELSE '' END AS Status " . "FROM money_transfer m " . "LEFT JOIN sendmoney_recipient r ON r.id = m.recipientid " . " LEFT JOIN members mm ON mm.id = m.member_id " . "LEFT JOIN bank_entity_codes b ON b.code = r.bank_code " . "LEFT JOIN members_payments mp ON mp.what_sendmoney = m.id " . "WHERE mp.confirmation IS NOT NULL ORDER BY m.id DESC LIMIT 4000"; // $query = $this->db->query($mysql); // $this->table->set_heading('Date', 'Amount', 'Fee', 'Recipient', 'Confirmation', 'Status') //$this->table->set_heading('Date', 'Amount','Fee','Recipient','Confirmation', 'Status'); // $data['mysql'] = $mysql; // $this->renderbkoreportpage($data); $data = array(); $data['page_title'] = "Configurations"; $this->renderAdminPage('configure/view_bko_configure', $data); } public function selpage() { $data = array(); $data['page_id'] = trim($this->input->get('page_id')); if ($data['page_id'] != '') { switch ($data['page_id']) { case "JOBCATEG": $this->load->library('table'); $this->table->set_template($this->template); $mysql = "SELECT * FROM skill_category ORDER BY category ASC"; $query = $this->db->query($mysql); // $this->table->set_heading(array('data' => 'Key', 'style' => 'width:60px'), 'Reason', array('data' => 'Action', 'style' => 'width:100px')); $data['skill_category_table'] = $this->table->generate($query); $this->load->view('bko/configure/extra/jobcaregory_form', $data); break; case "JOBSKILLTYPE": $this->load->library('table'); $this->table->set_template($this->template); $mysql = "SELECT * FROM skill_category ORDER BY category ASC"; // temporary $query = $this->db->query($mysql); $data['skill_category_table'] = $this->table->generate($query); $this->load->view('bko/configure/extra/jobskill_form', $data); break; case "AREASON": case "MREASON": $mysql = "SELECT * FROM reason_type WHERE rkey='" . $data['page_id'] . "'"; $q = $this->db->query($mysql); $row = $q->row(); if (isset($row)) { $data['reason_name'] = $row->rname; $data['reason_key'] = $row->rkey; $this->load->library('table'); $this->table->set_template($this->template); $mysql = "SELECT lkey,name,'' FROM reason_items WHERE rkey='" . $data['page_id'] . "'"; // WHERE agent_id = " . $data['agent_id']; $query = $this->db->query($mysql); $this->table->set_heading(array('data' => 'Key', 'style' => 'width:60px'), 'Reason', array('data' => 'Action', 'style' => 'width:100px')); $data['reason_table'] = $this->table->generate($query); $this->load->view('bko/configure/extra/reason_form', $data); } break; case "LANGUAGE": $this->load->library('table'); $this->table->set_template($this->template); $mysql = "SELECT * FROM languages ORDER BY language ASC"; // WHERE agent_id = " . $data['agent_id']; $query = $this->db->query($mysql); // $this->table->set_heading(array('data' => 'Key', 'style' => 'width:60px'), 'Reason', array('data' => 'Action', 'style' => 'width:100px')); $data['language_table'] = $this->table->generate($query); $this->load->view('bko/configure/extra/language_form', $data); break; case "COUNTRY": $this->load->library('table'); $this->table->set_template($this->template); $mysql = "SELECT id,code,country,phone_code, allow::date, ''|| jobs::date||'' AS Jobs, status FROM country ORDER BY allow, jobs, status,country ASC"; // WHERE agent_id = " . $data['agent_id']; $query = $this->db->query($mysql); // $this->table->set_heading(array('data' => 'Key', 'style' => 'width:60px'), 'Reason', array('data' => 'Action', 'style' => 'width:100px')); $data['country_table'] = $this->table->generate($query); $this->load->view('bko/configure/extra/country_form', $data); break; case "UTRANSPRICE": $data["form_title"] = "User Transport Pricing"; $this->load->library('table'); $this->table->set_template($this->template); $mysql = "SELECT * FROM country ORDER BY country ASC"; // WHERE agent_id = " . $data['agent_id']; $query = $this->db->query($mysql); // $this->table->set_heading(array('data' => 'Key', 'style' => 'width:60px'), 'Reason', array('data' => 'Action', 'style' => 'width:100px')); $data['country_table'] = $this->table->generate($query); $this->load->view('bko/configure/extra/pricing_form', $data); break; case "ULATORPRICE": $data["form_title"] = "User Translator Pricing"; $this->load->library('table'); $this->table->set_template($this->template); $mysql = "SELECT * FROM country ORDER BY country ASC"; // WHERE agent_id = " . $data['agent_id']; $query = $this->db->query($mysql); // $this->table->set_heading(array('data' => 'Key', 'style' => 'width:60px'), 'Reason', array('data' => 'Action', 'style' => 'width:100px')); $data['country_table'] = $this->table->generate($query); $this->load->view('bko/configure/extra/pricing_form', $data); break; case "FAQSET": $mysql2 = " SELECT code,description FROM faq_category"; $query2 = $this->db->query($mysql2); $data['faq_category'] = $query2->result(); $this->load->library('table'); $this->table->set_template($this->template); $mysql = "SELECT id,title,dir,msg,flags,added,status,code FROM faq ORDER BY id desc"; // WHERE agent_id = " . $data['agent_id']; $query = $this->db->query($mysql); $data['faq_result'] = $query->result(); $data['faq_table'] = $this->table->generate($query); $this->load->view('bko/configure/extra/faq_form', $data); break; case "CRONJOBS": $this->load->library('table'); $this->table->set_template($this->template); $mysql = "SELECT * FROM cron_jobs ORDER BY updated desc"; // WHERE agent_id = " . $data['agent_id']; $query = $this->db->query($mysql); $data['cron_jobs_result'] = $query->result(); $data['cron_jobs_table'] = $this->table->generate($query); $this->load->view('bko/configure/extra/cron_jobs', $data); break; default: echo "Your favorite color is neither red, blue, nor green!"; } } } public function updatefaq(){ // url: "/confg/updatefaq?faq_id=" + page_id + "&title=" + title + "&code=" + code + "&msg=" + msg if ($_GET) { $faq_id = $this->input->get('faq_id'); $title = trim($this->input->get('title')); $code = trim($this->input->get('code')); $msg = trim($this->input->get('msg')); if($title !='' & $msg !='' & $faq_id > 0 ){ $sql1 = "UPDATE faq SET title='$title',msg='$msg', code='$code' WHERE id = $faq_id"; $this->db->query($sql1); echo 'Updated'; } else{ echo 'Not Updated'; } } } public function addSkill() { $data = array(); $data['rkey'] = trim($this->input->get('page_id')); $data['skill_name'] = trim($this->input->get('skill_name')); $mysql = "SELECT * FROM skill_category WHERE LOWER(category) = LOWER('" . $data['skill_name'] . "')"; $q = $this->db->query($mysql); $nr = $q->num_rows(); if ($nr > 0) { echo 'Duplicate Detected'; } else { // echo 'Now Insert'; $mysql = "INSERT INTO skill_category (category) VALUES('" . $data['skill_name'] . "')"; $q = $this->db->query($mysql); } echo '0'; } private function renderAdminPage($page_name, $data) { $this->load->view('bko/view_bko_header', $data); $this->load->view('bko/' . $page_name, $data); $this->load->view('bko/view_bko_footer', $data); } }