155 lines
7.4 KiB
PHP
155 lines
7.4 KiB
PHP
<?php
|
|
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
class Confg extends Bko_Controller {
|
|
|
|
public function siteitems() {
|
|
$data["title"] = "Withdraws Report";
|
|
$mysql = "SELECT m.added::date AS date,m.terminatingamount*0.01 AS amount,m.fee*0.01 as fee, "
|
|
. "mm.firstname||' '||mm.lastname||'<br>Email:'||mm.email AS Sender,"
|
|
. "r.firstname||' '||r.lastname||'<br><b>Acc:</b>'||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":
|
|
|
|
echo 'akkfkkg';
|
|
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,'<button onclick=\"deleteReason('||id||'.'||lkey||');\">Del</button>' 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 * 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/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;
|
|
|
|
default:
|
|
echo "Your favorite color is neither red, blue, nor green!";
|
|
}
|
|
}
|
|
}
|
|
|
|
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);
|
|
}
|
|
|
|
}
|