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 class Administrator_Model extends CI_Model { public function __construct() { $this..
Decoded Output download
<?php
class Administrator_Model extends CI_Model { public function __construct() { $this->load->database(); } public function adminLogin($email, $encrypt_password) { $this->db->where("email", $email); $this->db->where("password", $encrypt_password); $result = $this->db->get("users"); if ($result->num_rows() == 1) { return $result->row(0); } else { return false; } } public function app_setting() { $query = $this->db->get("app_setting"); $app_data = $query->row(); return $app_data; } public function stastics($type = '') { if ($type == '') { $stats = 0; } if ($type == "add_point") { $stats = $this->db->select("SUM(request_points) as points")->where(array("type" => "Add", "request_status" => "approved"))->get("tblRequest")->row()->points; } if ($type == "withdrawl_point") { $stats = $this->db->select("SUM(request_points) as points")->where(array("type" => "Withdrawal", "request_status" => "approved"))->get("tblRequest")->row()->points * -1; } if ($stats == '') { $stats = 0; } return $stats; } public function games() { return $this->db->order_by("game_id", "DESC")->get("tblgame")->result(); } public function gamedata($from = '', $to = '') { if ($from == '') { $from = date("d/m/Y"); } else { $fr = explode("-", $from); $from = $fr[2] . "/" . $fr[1] . "/" . $fr[0]; } if ($to == '') { $to = date("d/m/Y"); } else { $t = explode("-", $to); $to = $t[2] . "/" . $t[1] . "/" . $t[0]; } $this->db->order_by("id", DESC); $this->db->where("date >=", $from); $this->db->where("date <=", $to); return $this->db->get("tblgamedata")->result(); } public function gamebyid($id) { $this->db->where("id", $id); return $this->db->get("games")->row(); } public function userbyid($id) { $this->db->where("id", $id); return $this->db->get("user_profile")->row(); } public function matkabyid($id) { $this->db->where("id", $id); return $this->db->get("matka")->row(); } public function update_appsetting() { $app = array("message" => $this->input->post("message"), "home_text" => $this->input->post("hometext"), "withdraw_text" => $this->input->post("withdrawtext"), "withdraw_no" => $this->input->post("withdrawnumber"), "upi" => $this->input->post("upi"), "upi_name" => $this->input->post("upi_name"), "min_amount" => $this->input->post("min_amount"), "w_amount" => $this->input->post("w_amount"), "telegram_id" => $this->input->post("telegram_id"), "whatsapp_no" => $this->input->post("whatsapp_no"), "disclaimer_text" => $this->input->post("disclaimer_text"), "addf_telegram_id" => $this->input->post("addf_telegram_id"), "addf_whatsapp_no" => $this->input->post("addf_whatsapp_no"), "addf_title" => $this->input->post("addf_title"), "wining_transfer_fee" => $this->input->post("wallet_fee"), "transfer_fee" => $this->input->post("main_wallet_fee"), "upi_desc" => $this->input->post("upi_desc")); $data = $_FILES["notice_board"]["name"]; if ($data != '') { $config["image_library"] = "gd2"; $config["source_image"] = $_FILES["notice_board"]["tmp_name"]; $config["create_thumb"] = FALSE; $config["maintain_ratio"] = FALSE; $config["width"] = "auto"; $config["height"] = "auto"; $config["quality"] = "60%"; $config["new_image"] = __DIR__ . "/../../assets/" . $data; $this->load->library("image_lib", $config); $this->image_lib->resize(); $app["notice_board_img"] = base_url() . "assets/" . $data; } $data_club = $_FILES["club_chart"]["name"]; if ($data_club != '') { $config["image_library"] = "gd2"; $config["source_image"] = $_FILES["club_chart"]["tmp_name"]; $config["create_thumb"] = FALSE; $config["maintain_ratio"] = FALSE; $config["width"] = "auto"; $config["height"] = "auto"; $config["quality"] = "60%"; $config["new_image"] = __DIR__ . "/../../assets/" . $data_club; $this->load->library("image_lib", $config); $this->image_lib->resize(); $app["club_chart_img"] = base_url() . "assets/" . $data_club; } if ($this->input->post("notice_status") == "1") { $app["notice_board_img"] = ''; } if ($this->input->post("club_img_status") == "1") { $app["club_chart_img"] = ''; } $this->db->where("id", 1); $this->db->update("app_setting", $app); $this->db->update("timeslots", array("start_time" => $this->input->post("start_time"), "end_time" => $this->input->post("end_time"))); return true; } public function get_posts($slug = FALSE) { if ($slug === FALSE) { $query = $this->db->order_by("id", "DESC"); $query = $this->db->get("posts"); return $query->result_array(); } $query = $this->db->get_where("posts", array("slug" => $slug)); return $query->row_array(); } public function deletegamedata($id) { $this->db->where("id", $id); return $this->db->delete("tblgamedata"); } public function del_request($id) { $this->db->where("request_id", $id); return $this->db->delete("tblRequest"); } public function create_post() { $slug = url_title($this->input->post("title"), "dash", TRUE); $data = array("title" => $this->input->post("title"), "slug" => $slug, "body" => $this->input->post("body"), "category_id" => $this->input->post("category_id")); return $this->db->insert("posts", $data); } public function delete($id, $table) { $this->db->where("id", $id); $this->db->delete($table); return true; } public function get_categories() { $this->db->order_by("id", "DESC"); $query = $this->db->get("categories"); return $query->result_array(); } public function add_user($post_image, $password) { $data = array("name" => $this->input->post("name"), "email" => $this->input->post("email"), "password" => $password, "username" => $this->input->post("username"), "zipcode" => $this->input->post("zipcode"), "contact" => $this->input->post("contact"), "address" => $this->input->post("address"), "gender" => $this->input->post("gender"), "role_id" => "2", "status" => $this->input->post("status"), "dob" => $this->input->post("dob"), "image" => $post_image, "password" => $password, "register_date" => date("Y-m-d H:i:s")); return $this->db->insert("users", $data); } public function get_users($username = FALSE, $limit = FALSE, $offset = FALSE) { if ($limit) { $this->db->limit($limit, $offset); } if ($username === FALSE) { $this->db->order_by("users.id", "DESC"); $query = $this->db->get("users"); return $query->result_array(); } $query = $this->db->get_where("users", array("username" => $username)); return $query->row_array(); } public function enable($id, $table) { $data = array("status" => 0); $this->db->where("id", $id); return $this->db->update($table, $data); } public function disable($id, $table) { $data = array("status" => 1); $this->db->where("id", $id); return $this->db->update($table, $data); } public function get_user($id = FALSE) { if ($id === FALSE) { $query = $this->db->get("users"); return $query->result_array(); } $query = $this->db->get_where("users", array("id" => $id)); return $query->row_array(); } public function get_user_id($mobile = '') { return $this->db->select("id")->where("mobileno", $mobile)->get("user_profile")->row()->id; } public function get_user_profile($user_id = '') { if ($user_id != '') { $this->db->where("user_profile.id", $user_id); } $query = $this->db->join("tblwallet", "user_profile.id=tblwallet.user_id")->order_by("tblwallet.user_id", "DESC")->get("user_profile"); return $query->result_array(); } public function get_user_profile_ajax($user_id = '') { $postData = $_POST; $draw = $postData["draw"]; $start = $postData["start"]; $rowperpage = $postData["length"]; $searchValue = $postData["search"]["value"]; $totalRecords = $this->db->join("tblwallet", "user_profile.id=tblwallet.user_id")->order_by("tblwallet.user_id", "DESC")->get("user_profile")->num_rows(); if (isset($searchValue)) { $this->db->group_start(); $this->db->like("user_profile.name", $searchValue); $this->db->or_like("user_profile.username", $searchValue); $this->db->or_like("user_profile.mobileno", $searchValue); $this->db->group_end(); } if ($rowperpage != -1) { $this->db->limit($rowperpage, $start); } $query = $this->db->join("tblwallet", "user_profile.id=tblwallet.user_id")->order_by("tblwallet.user_id", "DESC")->get("user_profile"); $records = $query->result_array(); $response = array(); $collectArr = array(); foreach ($records as $key => $value) { foreach ($value as $key2 => $value2) { $collectArr[$key][$key2] = $value2; $modal = "<button id="btn" . $value["id"] . "" class="btn" onclick="showPass(" . $value["id"] . ")">Show Password</button>\xa <p style="display:none" id="pass" . $value["id"] . "">" . $value["password"] . "</p><br>\xa <button type="button" class="btn btn-info" data-toggle="modal" data-target="#changePassModal" . $value["id"] . "">Change Password</button>
<!-- Modal -->
<div class="modal fade" id="changePassModal" . $value["id"] . "" role="dialog">\xa <form action="" . base_url("admin/changepass/" . $value["id"]) . "" method="post">\xa <div class="modal-dialog">\xa <!-- Modal content-->
<div class="modal-content">\xa <div class="modal-header">
<h4 class="modal-title">Change User Password</h4>\xa <button type="button" class="close" data-dismiss="modal">×</button>
</div>\xa <div class="modal-body">
<label>New Password</label>
<input type="text" value="" . $value["password"] . "" name="password" class="form-control" style="width: 90%;" />
</div>
<div class="modal-footer">\xa <input type="submit" value="Change" name="pass_change" onclick="return confirm("Are you sure to change password?")" class="btn" />
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>\xa </div>\xa </div>
</div>\xa </form>
</div> "; $delte_model = "
<a href="deleteuser/" . $value["id"] . "" onclick="return confirm("are you sure you want to delete this")"><button class="btn btn-danger"><i class="fa fa-trash"></i></button></a>"; if ($value["is_blocked"] == 0) { $delte_model .= "<a href="blockuser/" . $value["id"] . "/1" onclick="confirm(`are you sure you want to block user`)"><button class="btn btn-danger">Block</button></a>"; } else { $delte_model .= "<a href="blockuser/" . $value["id"] . "/0" onclick="confirm(`are you sure you want to unblock user`)"><button class="btn btn-success">Unblock</button></a>"; } $collectArr[$key]["password"] = $modal; $collectArr[$key]["action"] = $delte_model; } } $response = array("draw" => intval($draw), "recordsFiltered" => $searchValue == '' ? $totalRecords : count((array) $records), "recordsTotal" => count((array) $totalRecords), "data" => $collectArr); return $response; } public function deleteuser($id) { $this->db->where("id", $id); return $this->db->delete("user_profile"); } public function changepass($id, $new_password = '') { if ($new_password != '') { $this->db->where("id", $id)->update("user_profile", array("password" => $new_password)); } return true; } public function getGameName($id) { $q = "SELECT name FROM tblgame WHERE game_id='{$id}'"; $query = $this->db->query($q)->row_array(); return $query["name"]; } public function get_games($mid) { $q = "SELECT * FROM tblgamedata LEFT JOIN tblgame ON tblgamedata.game_id=tblgame.game_id WHERE tblgamedata.matka_id='{$mid}' GROUP BY tblgame.game_id"; $query = $this->db->query($q); return $query->result_array(); } public function get_point_lists($mid, $from = '', $to = '') { $limit = 0; $d = date("d/m/Y"); if ($from == '') { $from = date("d/m/Y"); } else { $fr = explode("-", $from); $from = $fr[2] . "/" . $fr[1] . "/" . $fr[0]; } if ($to == '') { $to = date("d/m/Y"); } else { $t = explode("-", $to); $to = $t[2] . "/" . $t[1] . "/" . $t[0]; } $q = "SELECT game_id,date,bet_type,digits,tblgamedata.points,user_profile.mobileno FROM tblgamedata LEFT JOIN user_profile ON user_profile.id=tblgamedata.user_id WHERE tblgamedata.matka_id='{$mid}' and tblgamedata.id>" . $limit . " and date BETWEEN '{$from}' AND '{$to}' ORDER BY date DESC"; $query = $this->db->query($q); $tbl = $query->result_array(); $t = array(); foreach ($tbl as $tb) { $gid = $tb["game_id"]; $bet_type = $tb["bet_type"]; $digits = $tb["digits"]; $mobileno = $tb["mobileno"]; if ($gid == 12 || $gid == 13) { $bet = "--"; $digit = $bet_type . "-" . $digits; } else { $bet = $bet_type; $digit = $digits; } if (!isset($t[$tb["date"]][$gid][$bet][$digit])) { $t[$tb["date"]][$gid][$bet][$digit][$mobileno] = 0; } $t[$tb["date"]][$gid][$bet][$digit][$mobileno] += $tb["points"]; } $d = array(); $i = 0; if (isset($t)) { foreach ($t as $k => $tx) { foreach ($tx as $k1 => $txt) { foreach ($txt as $k2 => $txts) { foreach ($txts as $k3 => $txtx) { foreach ($txtx as $k4 => $mob) { $d[$i][] = $this->getGameName($k1); $d[$i][] = $k2; $d[$i][] = $k; $d[$i][] = $k3; $d[$i][] = $k4; $d[$i][] = $mob; $i++; } } } } } } return $d; } public function get_user_games($id, $mid) { $q = "SELECT DISTINCT user_profile.id, user_profile.username FROM tblgamedata LEFT JOIN user_profile ON tblgamedata.user_id=user_profile.id WHERE tblgamedata.game_id='{$id}' and tblgamedata.matka_id='{$mid}'"; $query = $this->db->query($q); return $query->result_array(); } public function get_history($user_id, $matka_id, $game_id, $from = '', $to = '') { if ($from == '') { $from = date("d/m/Y"); } if ($to == '') { $to = date("d/m/Y"); } $sel = "SELECT DISTINCT tblgame.name,user_profile.username, tblgamedata.points, tblgamedata.digits, date, tblgamedata.time,bet_type,tblgamedata.user_id, tblgamedata.matka_id,tblgamedata.game_id, tblgamedata.id from tblgame, user_profile,tblgamedata where tblgame.game_id='{$game_id}' and tblgamedata.game_id='{$game_id}' and user_id=user_profile.id and user_id='{$user_id}' and matka_id='{$matka_id}' and date BETWEEN '{$from}' AND '{$to}' order by tblgamedata.id"; $query = $this->db->query($sel); $aa = $query->result_array(); return $aa ? $aa : false; } public function get_bid_history($user_id) { $dt = date("d/m/Y"); $sel = "SELECT tblgamedata.*, matka.name as matka_name,tblgame.name as game_name FROM `tblgamedata` JOIN matka ON tblgamedata.matka_id=matka.id JOIN tblgame ON tblgamedata.game_id=tblgame.game_id where user_id='{$user_id}' && date='{$dt}' ORDER BY tblgamedata.id DESC"; $query = $this->db->query($sel); $aa = $query->result_array(); return $aa ? $aa : false; } public function add_wallet($no = '') { if ($no == '') { return NULL; } $query = $this->db->query("SELECT * FROM user_profile where mobileno='{$no}'"); return $query->result_array(); } public function add_wallet2($id, $wa, $wallet = '') { if ($wallet != '') { if ($wallet == "wallet_points") { $query = $this->db->query("Update tblwallet set wallet_points=wallet_points+'{$wa}' where user_id='{$id}'"); } else { $query = $this->db->query("Update tblwallet set main_wallet_points=main_wallet_points+'{$wa}' where user_id='{$id}'"); if ($query) { $first_deposit = $this->db->select("is_first_time_deposit")->where("user_id", $id)->get("tblwallet")->row(); if ($first_deposit->is_first_time_deposit == 1) { $ref_code = $this->db->select("reffered_code")->where("id", $id)->get("user_profile")->row()->reffered_code; $check_ref_code = $this->db->where("user_reference_code", $ref_code)->where("login_status", 0)->get("user_profile"); if ($ref_code != '' && $check_ref_code->num_rows() > 0) { $reffered_code = $ref_code; $referee_data = $check_ref_code->row(); $refree_id = $referee_data->id; $points = 10 / 100 * $wa; $query = $this->db->query("Update tblwallet set main_wallet_points=main_wallet_points+'{$points}'\xa where user_id='{$refree_id}'"); $array_refer = array("refered_user" => $id, "refered_by_user" => $refree_id, "amount_credited_refered_by_user" => $points); $this->db->insert("refer_history", $array_refer); } } return true; } } } else { $query = $this->db->query("Update tblwallet set wallet_points=wallet_points+'{$wa}' where user_id='{$id}'"); } if ($query) { return true; } } public function add_wallet3($id, $wa, $wallet = '') { if ($wallet != '') { if ($wallet == "wallet_points") { $query = $this->db->query("Insert into tblwallet(wallet_points,user_id) values('{$wa}','{$id}')"); } else { $query = $this->db->query("Insert into tblwallet(main_wallet_points,user_id) values('{$wa}','{$id}')"); } } else { $query = $this->db->query("Insert into tblwallet(wallet_points,user_id) values('{$wa}','{$id}')"); } if ($query) { return true; } } public function check_wallet($id) { $query = $this->db->query("select * from tblwallet where user_id= '{$id}'"); return $query->result_array(); } public function check_wallet_amt($id) { $query = $this->db->query("select wallet_points as amt from tblwallet where user_id= '{$id}'"); return $query->row_array()["amt"]; } public function ch_amt($amt, $id) { $wallet = $this->check_wallet_amt($id); $am = $wallet - $amt; return (int) $am; } public function notify($notification) { if ($notification == '') { return false; } $query = $this->db->insert("tblNotification", array("notification" => $notification)); if ($query) { return true; } return false; } public function add_point_req_by_admin($points, $user_id, $wallet) { $type = $points > 0 ? "Add" : "Withdrawal"; $remark = $this->input->post("remark"); $insert_query = array("request_points" => $points, "user_id" => $user_id, "type" => $type, "request_status" => "approved", "remark" => $remark, "amt_added_by_adm_in_wallet" => $wallet); $query = $this->db->insert("tblRequest", $insert_query); return $query; } public function add_point_req() { $query = $this->db->where(array("type" => "Add"))->order_by("time", "DESC")->get("tblRequest"); return $query->result_array(); } public function add_point_req2($id = NULL, $type = "approved") { if ($type == "approved") { $query = $this->db->get_where("tblRequest", array("request_id" => $id, "type" => "Add", "request_status" => "pending")); } $query2 = $this->db->update("tblRequest", array("request_status" => $type), array("request_id" => $id, "request_status" => "pending")); return $query ? $query->result_array() : array(); } public function add_point_req3($id, $points) { $pints = $this->check_wallet($id); if ($pints) { $query = $this->add_wallet2($id, $points); } else { $query = $this->add_wallet3($id, $points); } if ($query) { return true; } } public function add_pending_point_req($id, $points) { $pints = $this->check_wallet($id); if ($pints) { $query = $this->db->query("Update tblwallet set main_wallet_points=main_wallet_points+'{$points}' where user_id='{$id}'"); $first_deposit = $this->db->select("is_first_time_deposit")->where("user_id", $id)->get("tblwallet")->row(); if ($first_deposit->is_first_time_deposit == 1) { $ref_code = $this->db->select("reffered_code")->where("id", $id)->get("user_profile")->row()->reffered_code; $check_ref_code = $this->db->where("user_reference_code", $ref_code)->where("login_status", 0)->get("user_profile"); if ($ref_code != '' && $check_ref_code->num_rows() > 0) { $reffered_code = $ref_code; $referee_data = $check_ref_code->row(); $refree_id = $referee_data->id; $points = 10 / 100 * $points; $query = $this->db->query("Update tblwallet set main_wallet_points=main_wallet_points+'{$points}'
where user_id='{$refree_id}'"); $array_refer = array("refered_user" => $id, "refered_by_user" => $refree_id, "amount_credited_refered_by_user" => $points); $this->db->insert("refer_history", $array_refer); $this->db->where("user_id", $id)->update("tblwallet", array("is_first_time_deposit" => 0)); } } } if ($query) { return true; } } public function failed_payment_req() { $query = $this->db->get("raise_tickets"); return $query->result_array(); } public function withdraw_point_req() { $query = $this->db->where(array("type" => "Withdrawal"))->get("tblRequest"); return $query->result_array(); } public function withdraw_point_req2($id) { $query = $this->db->get_where("tblRequest", array("request_status" => "pending", "request_id" => $id)); $aa = $query->row_array(); $amt = 0; if (isset($aa)) { $amt = -$aa["request_points"]; } if ($this->ch_amt($amt, $aa["user_id"]) >= 0) { $query2 = $this->db->update("tblRequest", array("request_status" => "approved"), array("request_id" => $id)); } return $aa; } public function withdraw_point_req3($id, $points) { if ($this->ch_amt($points, $id) >= 0) { $query = $this->db->query("\x9UPDATE tblwallet set wallet_points=wallet_points-'{$points}' where user_id='{$id}' "); } if ($query) { return true; } } public function withdraw_point_cancel($id) { $query = $this->db->update("tblRequest", array("request_status" => "cancelled"), array("request_id" => $id)); return true; } public function starline() { $query = $this->db->query("\x9SELECT * FROM `tblStarline`"); return $query->result_array(); } public function starline_update($id) { $query = $this->db->query(" SELECT * FROM `tblStarline` where id='{$id}' "); return $query->result_array(); } public function starline_update2($id) { $snum = trim($this->input->post("snum")); $stime = trim($this->input->post("stime")); $snums = explode("-", $snum); $data = array("s_game_number" => $snum, "s_game_time" => $stime); $query = $this->db->update("tblStarline", $data, array("id" => $id)); $this->update_chart($id, "Jannat Starline", $snums[0], $snums[1]); if ($query) { return true; } } public function update_user_data($post_image) { $data = array("name" => $this->input->post("name"), "zipcode" => $this->input->post("zipcode"), "contact" => $this->input->post("contact"), "address" => $this->input->post("address"), "gender" => $this->input->post("gender"), "status" => $this->input->post("status"), "dob" => $this->input->post("dob"), "image" => $post_image, "register_date" => date("Y-m-d H:i:s")); $this->db->where("id", $this->input->post("id")); $d = $this->db->update("users", $data); } public function get_siteconfiguration($id = FALSE) { if ($id === FALSE) { $query = $this->db->get("site_config"); return $query->result_array(); } $query = $this->db->get_where("site_config", array("id" => $id)); return $query->row_array(); } public function update_siteconfiguration($id = FALSE) { if ($id === FALSE) { $query = $this->db->get("site_config"); return $query->result_array(); } $query = $this->db->get_where("site_config", array("id" => $id)); return $query->row_array(); } public function update_siteconfiguration_data($post_image) { $data = array("site_title" => $this->input->post("site_title"), "site_name" => $this->input->post("site_name"), "logo_img" => $post_image); $this->db->where("id", $this->input->post("id")); return $this->db->update("site_config", $data); } public function get_mobile_data() { $query = $this->db->get("site_config"); return $query->row_array(); } public function update_mobile_data() { $data = array("mobile" => $this->input->post("mobile")); return $this->db->update("site_config", $data); } public function create_slider($post_image) { $data = array("title" => $this->input->post("title"), "image" => $post_image, "description" => $this->input->post("description"), "status" => $this->input->post("status")); return $this->db->insert("sliders_img", $data); } public function get_sliders($id = false) { if ($id === FALSE) { $query = $this->db->get("sliders_img"); return $query->result_array(); } $query = $this->db->get_where("sliders_img", array("id" => $id)); return $query->row_array(); } public function get_slider_data($id = FALSE) { if ($id === FALSE) { $query = $this->db->get("sliders_img"); return $query->result_array(); } $query = $this->db->get_where("sliders_img", array("id" => $id)); return $query->row_array(); } public function update_slider_data($post_image) { $data = array("title" => $this->input->post("title"), "image" => $post_image, "description" => $this->input->post("description"), "status" => $this->input->post("status")); $this->db->where("id", $this->input->post("id")); return $this->db->update("sliders_img", $data); } public function getChart() { return $this->db->get("charts")->result_array(); } public function getChartDetails($name) { return $this->db->where("name", $name)->get("charts")->result_array(); } public function update_chart_data() { $snum = $this->input->post("snum"); $enum = $this->input->post("enum"); $data = array("name" => $this->input->post("name"), "date" => $this->input->post("date"), "starting_num" => !empty($snum) ? $snum : NULL, "result_num" => $this->input->post("num"), "end_num" => !empty($enum) ? $enum : NULL); $this->db->where("name", $this->input->post("name") and "date", $this->input->post("date")); return $this->db->update("charts", $data); } public function add_chart_data() { $snum = $this->input->post("snum"); $enum = $this->input->post("enum"); $data = array("name" => $this->input->post("chart"), "date" => $this->input->post("date"), "starting_num" => !empty($snum) ? $snum : NULL, "result_num" => $this->input->post("num"), "end_num" => !empty($enum) ? $enum : NULL); return $this->db->insert("charts", $data); } public function getUserDetails() { return $this->db->get("users")->result_array(); } public function getMatkaDetails() { return $this->db->get("matka")->result_array(); } public function get_total_users() { return $this->db->get("user_profile")->result_array(); } public function create_matka($team_image) { $snum = $this->input->post("snum"); $enum = $this->input->post("enum"); $name = $this->input->post("name"); $query = $this->db->get_where("matka", array("name" => $name)); $count = $query->num_rows(); if ($count === 0) { $data = array("name" => $this->input->post("name"), "start_time" => $this->input->post("stime"), "end_time" => $this->input->post("etime"), "starting_num" => !empty($snum) ? $snum : NULL, "number" => $this->input->post("num"), "end_num" => !empty($enum) ? $enum : NULL, "bid_start_time" => $this->input->post("fstime"), "bid_end_time" => $this->input->post("fetime")); $data1 = array("name" => $this->input->post("name"), "date" => date("Y-m-d"), "starting_num" => $this->input->post("snum"), "result_num" => $this->input->post("num"), "end_num" => $this->input->post("enum")); $this->session->set_flashdata("success", "Your matka has been created."); $this->db->insert("matka", $data); $this->db->insert("charts", $data1); $ref = "list"; } else { $ref = "add"; $this->session->set_flashdata("fail", "Name already Exist ."); } return $ref; } public function listmatka($teamId = FALSE, $limit = FALSE, $offset = FALSE) { if ($limit) { $this->db->limit($limit, $offset); } if ($teamId === FALSE) { $this->db->order_by("matka.id", "DESC"); $query = $this->db->get("matka"); return $query->result_array(); } $query = $this->db->get_where("matka", array("id" => $teamId)); return $query->row_array(); } public function memberlistteams($id) { $this->db->order_by("matka.id", "DESC"); return $query->result_array(); } public function update_team_data() { $c = 0; $snum = $this->input->post("snum"); $enum = $this->input->post("enum"); $num = $this->input->post("num"); $id = $this->input->post("id"); $name = $this->input->post("name"); $date = $this->input->post("udate"); $data = array("name" => $name, "start_time" => $this->input->post("stime"), "end_time" => $this->input->post("etime"), "sat_start_time" => $this->input->post("sstime"), "sat_end_time" => $this->input->post("setime"), "starting_num" => !empty($snum) ? $snum : NULL, "number" => $this->input->post("num"), "end_num" => !empty($enum) ? $enum : NULL, "bid_start_time" => $this->input->post("fstime"), "bid_end_time" => $this->input->post("fetime")); $this->db->where("id", $id); $this->db->update("matka", $data); return $this->update_chart($id, $name, $snum, $num, $enum, $date); } public function update_chart($id, $name, $snum = null, $num = null, $enum = null, $date = null) { $dt = $date == null ? date("Y-m-d") : $date; $data1 = array("name" => $name, "cid" => $id, "date" => $dt, "starting_num" => !empty($snum) ? $snum : NULL, "result_num" => $num, "end_num" => !empty($enum) ? $enum : NULL); $where = array("cid" => $id, "date" => $dt); $data2 = $this->db->select("COUNT(id) as counter")->where($where)->get("charts")->row(); if ($data2->counter > 0) { $this->db->where($where); $this->db->update("charts", $data1); } else { $this->db->insert("charts", $data1); } return true; } public function get_admin_data() { $id = $this->session->userdata("user_id"); if ($id === FALSE) { $query = $this->db->get("users"); return $query->result_array(); } $query = $this->db->get_where("users", array("id" => $id)); return $query->row_array(); } public function change_password($new_password) { $data = array("password" => md5($new_password)); $this->db->where("id", $this->session->userdata("user_id")); return $this->db->update("users", $data); } public function match_old_password($password) { $id = $this->session->userdata("user_id"); if ($id === FALSE) { $query = $this->db->get("users"); return $query->result_array(); } $query = $this->db->get_where("users", array("password" => $password)); return $query->row_array(); } public function email_exists() { $email = $this->input->post("email"); $query = $this->db->query("SELECT email, password FROM users WHERE email='{$email}'"); if ($row = $query->row()) { return TRUE; } else { return FALSE; } } public function temp_reset_password($temp_pass) { $data = array("email" => $this->input->post("email"), "reset_pass" => $temp_pass); $email = $data["email"]; if ($data) { $this->db->where("email", $email); $this->db->update("users", $data); return TRUE; } else { return FALSE; } } public function is_temp_pass_valid($temp_pass) { $this->db->where("reset_pass", $temp_pass); $query = $this->db->get("users"); if ($query->num_rows() == 1) { return TRUE; } else { return FALSE; } } public function chats() { return $this->db->select("user_id")->where("status!=", "2")->group_by("user_id")->get("chat")->result(); } public function chat_detail($id) { return $this->db->where("user_id", $id)->where("status!=", "2")->where("from", "user")->get("chat")->result(); } public function adm_chat_detail($id) { return $this->db->where("user_id", $id)->where("status!=", "2")->where("from", "admin")->get("chat")->result(); } public function blockuser($id, $status) { $data = array("is_blocked" => $status); $this->db->where("id", $id); return $this->db->update("user_profile", $data); } public function deletepackage($id) { $data = array("status" => 2); $this->db->where("id", $id); return $this->db->update("package", $data); } public function get_gamedata($postData, $from_date, $to_date) { $draw = $postData["draw"]; $start = $postData["start"]; $rowperpage = $postData["length"]; $searchValue = $postData["search"]["value"]; $from = date("d/m/Y", strtotime($from_date)); $to = date("d/m/Y", strtotime($to_date)); $this->db->select("user_profile.name,tblgamedata.*,matka.name")->join("user_profile", "user_profile.id=tblgamedata.user_id", "left")->join("matka", "matka.id=tblgamedata.matka_id", "left")->where("tblgamedata.date >=", $from)->where("tblgamedata.date <=", $to); $totalRecords = $this->db->get("tblgamedata")->num_rows(); if (isset($searchValue)) { $this->db->group_start(); $this->db->like("user_profile.name", $searchValue); $this->db->or_like("matka.name", $searchValue); $this->db->group_end(); } if ($rowperpage != -1) { $this->db->limit($rowperpage, $start); } $query = $this->db->select("user_profile.name as username,tblgamedata.*,matka.name as matkaname")->join("user_profile", "user_profile.id=tblgamedata.user_id", "left")->join("matka", "matka.id=tblgamedata.matka_id", "left"); $this->db->order_by("tblgamedata.id", "DESC")->where("tblgamedata.date >=", $from)->where("tblgamedata.date <=", $to); $records = $query->get("tblgamedata")->result(); $response = array(); $data = array(); $i = 1; foreach ($records as $record) { if ($record->status == "loss") { $class = "danger"; $name = "Loss"; } elseif ($record->status == "pending") { $class = "warning"; $name = "Pending"; } else { $class = "success"; $name = "Win"; } $data[] = array("#" => $i, "username" => $record->username, "matka" => $record->matkaname, "point" => $record->points, "bet_type" => $record->bet_type, "time" => date("d/m/Y h:i:s A", strtotime($record->time)), "digits" => $record->digits, "status" => $record->status, "action" => "<a href="" . base_url() . "admin/deletegamedata/" . $record->id . "" onclick="confirm(`are you sure you want to delete this`)"><button class="btn btn-danger"><i class="fa fa-trash"></i></a>"); $i++; } $response = array("draw" => intval($draw), "recordsFiltered" => $searchValue == '' ? $totalRecords : count($records), "recordsTotal" => count($records), "data" => $data); return $response; } public function get_add_point_req($postData = '') { $draw = $postData["draw"]; $start = $postData["start"]; $rowperpage = $postData["length"]; $searchValue = $postData["search"]["value"]; $this->db->join("user_profile", "user_profile.id=tblRequest.user_id", "left"); $totalRecords = $this->db->where("tblRequest.type", "Add")->get("tblRequest")->num_rows(); if (isset($searchValue)) { $this->db->group_start(); $this->db->like("user_profile.name", $searchValue); $this->db->or_like("user_profile.username", $searchValue); $this->db->or_like("user_profile.mobileno", $searchValue); $this->db->group_end(); } if ($rowperpage != -1) { $this->db->limit($rowperpage, $start); } $query = $this->db->select("user_profile.name,user_profile.mobileno,tblRequest.request_id,qr_screenshot,tblRequest.request_points,tblRequest.time,tblRequest.request_status")->join("user_profile", "user_profile.id=tblRequest.user_id", "right"); $records = $this->db->where("tblRequest.type", "Add")->order_by("tblRequest.request_id", "DESC")->get("tblRequest")->result(); $response = array(); $data = array(); foreach ($records as $record) { $approve_btn = "<a onclick="return confirm(`Are you sure to Approve?`)" href="" . base_url() . "admin/add_point_req2/" . $record->request_id . ""><span class="badge badge-success">Apporve</span>"; $reject_btn = "<a onclick="return confirm(`Are you sure to Reject?`)" href="" . base_url() . "admin/add_point_req2/" . $record->request_id . "/cancelled" . ""><span class="badge badge-danger">Reject</span>"; $data[] = array("id" => $record->request_id, "userid" => $record->name . "(" . $record->mobileno . ")", "req_points" => $record->request_points, "screenshot" => $record->qr_screenshot != '' ? "<a href="" . base_url("/img/Qrimage/" . $record->qr_screenshot) . "" target="_blank"> Preview</a>" : '', "time" => $record->time, "status" => ucwords($record->request_status), "action" => $record->request_status == "pending" ? $approve_btn . $reject_btn : ($record->request_status == "approved" ? "Approved" : "Rejected")); } $response = array("draw" => intval($draw), "recordsFiltered" => $searchValue == '' ? $totalRecords : count($records), "recordsTotal" => count($records), "data" => $data); return $response; } public function refer_history() { $query = $this->db->order_by("created_at", "DESC")->get("refer_history"); return $query->result_array(); } public function transfer_money_history() { $query = $this->db->order_by("create_at", "DESC")->get("tbltransfer_request"); return $query->result_array(); } public function winning_transfer_history() { $query = $this->db->order_by("created_at", "DESC")->get("main_to_win_transfer"); return $query->result_array(); } } ?>
Did this file decode correctly?
Original Code
<?php
class Administrator_Model extends CI_Model { public function __construct() { $this->load->database(); } public function adminLogin($email, $encrypt_password) { $this->db->where("\x65\155\141\151\x6c", $email); $this->db->where("\x70\x61\163\163\x77\157\162\x64", $encrypt_password); $result = $this->db->get("\165\x73\x65\162\163"); if ($result->num_rows() == 1) { return $result->row(0); } else { return false; } } public function app_setting() { $query = $this->db->get("\141\x70\160\x5f\x73\145\164\164\151\156\x67"); $app_data = $query->row(); return $app_data; } public function stastics($type = '') { if ($type == '') { $stats = 0; } if ($type == "\x61\144\144\x5f\160\x6f\151\x6e\x74") { $stats = $this->db->select("\x53\125\x4d\x28\x72\145\x71\165\x65\x73\164\137\x70\157\151\x6e\164\163\x29\40\141\163\x20\x70\x6f\151\156\x74\x73")->where(array("\x74\171\160\145" => "\101\x64\144", "\x72\145\x71\165\x65\163\164\137\x73\x74\x61\x74\x75\x73" => "\x61\160\x70\x72\x6f\166\x65\144"))->get("\x74\142\154\x52\145\161\x75\x65\163\164")->row()->points; } if ($type == "\167\151\x74\x68\x64\162\x61\167\154\x5f\x70\157\151\x6e\x74") { $stats = $this->db->select("\123\125\x4d\50\162\x65\x71\x75\x65\x73\164\x5f\160\157\151\x6e\164\x73\51\x20\x61\x73\40\160\x6f\x69\x6e\x74\163")->where(array("\x74\171\160\145" => "\127\151\x74\x68\x64\x72\141\x77\141\x6c", "\162\145\x71\x75\x65\x73\164\x5f\163\x74\141\164\165\x73" => "\x61\160\x70\x72\157\166\x65\144"))->get("\164\142\154\122\x65\161\x75\145\163\x74")->row()->points * -1; } if ($stats == '') { $stats = 0; } return $stats; } public function games() { return $this->db->order_by("\x67\141\155\145\137\x69\144", "\104\105\123\103")->get("\164\142\x6c\147\141\x6d\x65")->result(); } public function gamedata($from = '', $to = '') { if ($from == '') { $from = date("\144\x2f\155\x2f\131"); } else { $fr = explode("\x2d", $from); $from = $fr[2] . "\x2f" . $fr[1] . "\57" . $fr[0]; } if ($to == '') { $to = date("\144\x2f\155\57\x59"); } else { $t = explode("\x2d", $to); $to = $t[2] . "\x2f" . $t[1] . "\57" . $t[0]; } $this->db->order_by("\151\x64", DESC); $this->db->where("\144\x61\x74\x65\x20\x3e\75", $from); $this->db->where("\x64\x61\x74\x65\40\74\75", $to); return $this->db->get("\x74\142\154\x67\x61\155\145\x64\x61\x74\141")->result(); } public function gamebyid($id) { $this->db->where("\x69\144", $id); return $this->db->get("\147\141\x6d\145\x73")->row(); } public function userbyid($id) { $this->db->where("\151\x64", $id); return $this->db->get("\x75\x73\145\x72\137\160\x72\157\x66\x69\x6c\x65")->row(); } public function matkabyid($id) { $this->db->where("\151\x64", $id); return $this->db->get("\155\x61\x74\153\x61")->row(); } public function update_appsetting() { $app = array("\x6d\x65\163\163\141\x67\x65" => $this->input->post("\x6d\x65\163\163\x61\147\145"), "\x68\157\155\145\x5f\x74\x65\x78\x74" => $this->input->post("\x68\x6f\155\145\164\145\x78\x74"), "\x77\151\x74\150\144\162\x61\x77\x5f\x74\145\x78\x74" => $this->input->post("\x77\x69\164\150\x64\162\x61\167\x74\145\170\x74"), "\x77\x69\164\x68\x64\x72\x61\167\x5f\x6e\x6f" => $this->input->post("\167\x69\164\x68\x64\162\x61\167\156\x75\155\x62\145\162"), "\165\160\151" => $this->input->post("\x75\x70\151"), "\x75\160\151\137\x6e\141\x6d\145" => $this->input->post("\165\160\151\x5f\x6e\x61\155\145"), "\x6d\x69\156\137\141\155\157\x75\156\164" => $this->input->post("\155\x69\x6e\x5f\141\x6d\157\165\x6e\164"), "\x77\137\141\x6d\157\x75\x6e\164" => $this->input->post("\167\137\141\x6d\157\165\x6e\x74"), "\164\145\x6c\145\147\x72\x61\x6d\x5f\151\144" => $this->input->post("\x74\x65\154\145\147\162\x61\155\137\151\x64"), "\167\150\x61\164\163\x61\160\x70\x5f\156\x6f" => $this->input->post("\167\x68\x61\x74\x73\141\x70\160\x5f\x6e\x6f"), "\x64\151\x73\143\154\141\151\x6d\145\162\x5f\x74\x65\170\x74" => $this->input->post("\x64\151\x73\x63\x6c\x61\151\155\x65\x72\137\x74\x65\x78\164"), "\141\x64\x64\146\137\x74\145\154\145\147\162\141\155\137\151\144" => $this->input->post("\141\x64\144\x66\137\164\145\154\145\x67\x72\141\x6d\137\151\144"), "\141\x64\x64\x66\x5f\167\x68\x61\164\163\141\160\160\x5f\156\157" => $this->input->post("\x61\x64\x64\x66\x5f\x77\150\x61\x74\x73\141\160\160\x5f\156\157"), "\x61\x64\144\x66\137\164\151\164\x6c\x65" => $this->input->post("\x61\x64\x64\x66\137\x74\x69\164\x6c\x65"), "\167\151\156\151\156\147\137\164\162\x61\156\x73\x66\x65\162\137\146\x65\145" => $this->input->post("\x77\141\x6c\x6c\x65\164\137\x66\145\x65"), "\x74\162\141\x6e\163\x66\x65\162\137\x66\145\x65" => $this->input->post("\155\141\x69\156\137\167\141\x6c\x6c\145\x74\137\146\x65\145"), "\x75\x70\x69\x5f\144\145\163\143" => $this->input->post("\165\160\x69\137\x64\145\163\143")); $data = $_FILES["\156\157\164\x69\143\145\137\142\157\x61\x72\x64"]["\x6e\141\x6d\145"]; if ($data != '') { $config["\x69\x6d\141\x67\x65\137\x6c\x69\x62\x72\141\x72\171"] = "\x67\144\x32"; $config["\x73\x6f\x75\x72\143\x65\137\151\x6d\141\147\145"] = $_FILES["\x6e\x6f\164\x69\143\145\137\x62\157\141\x72\144"]["\x74\155\160\x5f\156\141\x6d\145"]; $config["\143\x72\145\141\x74\x65\x5f\x74\x68\x75\155\x62"] = FALSE; $config["\x6d\x61\151\x6e\x74\141\151\x6e\x5f\162\141\164\x69\x6f"] = FALSE; $config["\x77\x69\144\x74\x68"] = "\141\165\x74\x6f"; $config["\x68\145\151\x67\x68\x74"] = "\141\x75\x74\x6f"; $config["\161\165\x61\154\x69\x74\171"] = "\x36\60\45"; $config["\156\145\x77\137\x69\155\x61\x67\145"] = __DIR__ . "\x2f\56\x2e\57\x2e\56\x2f\x61\163\163\145\164\163\57" . $data; $this->load->library("\x69\155\141\147\x65\x5f\x6c\x69\x62", $config); $this->image_lib->resize(); $app["\x6e\157\x74\151\143\x65\137\142\157\141\162\x64\x5f\151\x6d\147"] = base_url() . "\x61\x73\x73\145\x74\163\x2f" . $data; } $data_club = $_FILES["\143\154\x75\x62\137\x63\x68\141\x72\x74"]["\156\x61\x6d\x65"]; if ($data_club != '') { $config["\151\x6d\141\147\x65\137\154\x69\142\162\x61\x72\x79"] = "\x67\x64\62"; $config["\x73\x6f\165\162\143\145\x5f\x69\155\141\x67\145"] = $_FILES["\x63\x6c\165\x62\137\143\x68\x61\162\x74"]["\164\x6d\x70\x5f\x6e\141\x6d\x65"]; $config["\x63\x72\145\141\164\x65\x5f\x74\150\165\x6d\x62"] = FALSE; $config["\155\x61\151\x6e\164\x61\x69\156\x5f\x72\141\164\x69\157"] = FALSE; $config["\x77\151\x64\x74\x68"] = "\141\165\x74\x6f"; $config["\x68\x65\151\147\150\164"] = "\x61\165\164\x6f"; $config["\161\x75\141\x6c\x69\164\171"] = "\x36\x30\45"; $config["\156\145\x77\137\151\x6d\141\x67\x65"] = __DIR__ . "\x2f\56\x2e\x2f\56\56\57\x61\163\x73\145\x74\x73\57" . $data_club; $this->load->library("\x69\x6d\x61\147\145\137\x6c\x69\142", $config); $this->image_lib->resize(); $app["\x63\154\165\142\137\x63\150\x61\162\164\x5f\x69\155\147"] = base_url() . "\141\163\163\x65\164\x73\57" . $data_club; } if ($this->input->post("\156\x6f\164\151\143\145\137\x73\x74\x61\164\165\163") == "\x31") { $app["\x6e\x6f\x74\x69\143\x65\x5f\142\157\x61\x72\144\137\151\x6d\147"] = ''; } if ($this->input->post("\143\154\165\x62\137\151\x6d\x67\137\x73\164\141\x74\x75\x73") == "\61") { $app["\143\x6c\165\142\137\x63\x68\141\x72\164\137\x69\155\x67"] = ''; } $this->db->where("\x69\x64", 1); $this->db->update("\x61\x70\160\137\x73\145\x74\164\x69\x6e\x67", $app); $this->db->update("\x74\x69\155\x65\163\x6c\x6f\x74\x73", array("\163\164\x61\162\x74\x5f\164\151\155\x65" => $this->input->post("\163\164\x61\x72\x74\137\x74\x69\x6d\145"), "\145\x6e\144\x5f\x74\x69\x6d\x65" => $this->input->post("\x65\156\x64\x5f\164\151\155\145"))); return true; } public function get_posts($slug = FALSE) { if ($slug === FALSE) { $query = $this->db->order_by("\x69\144", "\x44\105\123\x43"); $query = $this->db->get("\160\157\163\x74\163"); return $query->result_array(); } $query = $this->db->get_where("\160\157\163\164\163", array("\163\154\165\x67" => $slug)); return $query->row_array(); } public function deletegamedata($id) { $this->db->where("\x69\x64", $id); return $this->db->delete("\x74\142\x6c\147\141\155\145\x64\x61\x74\141"); } public function del_request($id) { $this->db->where("\162\x65\161\165\x65\163\x74\137\151\144", $id); return $this->db->delete("\x74\142\154\x52\145\161\x75\x65\163\x74"); } public function create_post() { $slug = url_title($this->input->post("\164\151\x74\x6c\x65"), "\144\x61\163\x68", TRUE); $data = array("\164\x69\164\154\x65" => $this->input->post("\x74\x69\x74\154\x65"), "\x73\x6c\x75\x67" => $slug, "\142\157\144\171" => $this->input->post("\x62\157\144\171"), "\143\141\164\x65\147\157\x72\x79\137\x69\x64" => $this->input->post("\143\141\164\145\147\x6f\162\171\x5f\151\x64")); return $this->db->insert("\160\157\x73\164\163", $data); } public function delete($id, $table) { $this->db->where("\151\x64", $id); $this->db->delete($table); return true; } public function get_categories() { $this->db->order_by("\x69\144", "\x44\105\123\x43"); $query = $this->db->get("\x63\141\164\x65\x67\157\x72\x69\x65\163"); return $query->result_array(); } public function add_user($post_image, $password) { $data = array("\156\x61\x6d\145" => $this->input->post("\156\141\155\x65"), "\x65\155\x61\x69\x6c" => $this->input->post("\x65\155\x61\x69\154"), "\x70\141\x73\163\167\x6f\x72\144" => $password, "\x75\163\145\x72\156\141\x6d\145" => $this->input->post("\x75\163\x65\162\156\141\x6d\145"), "\172\151\x70\x63\157\144\x65" => $this->input->post("\x7a\151\x70\143\157\144\145"), "\x63\157\x6e\x74\141\143\x74" => $this->input->post("\x63\x6f\x6e\164\x61\143\x74"), "\141\x64\x64\x72\x65\x73\163" => $this->input->post("\x61\144\x64\162\x65\x73\163"), "\x67\x65\156\144\145\162" => $this->input->post("\x67\145\156\144\145\162"), "\162\157\x6c\145\x5f\x69\144" => "\x32", "\163\164\x61\x74\165\163" => $this->input->post("\x73\164\141\x74\165\163"), "\x64\157\142" => $this->input->post("\x64\x6f\142"), "\x69\x6d\x61\x67\145" => $post_image, "\x70\x61\163\163\167\157\x72\x64" => $password, "\x72\x65\147\151\x73\164\x65\x72\137\144\x61\164\x65" => date("\131\x2d\x6d\x2d\x64\40\x48\72\x69\72\163")); return $this->db->insert("\165\x73\x65\x72\163", $data); } public function get_users($username = FALSE, $limit = FALSE, $offset = FALSE) { if ($limit) { $this->db->limit($limit, $offset); } if ($username === FALSE) { $this->db->order_by("\x75\x73\x65\162\x73\56\151\144", "\104\x45\x53\x43"); $query = $this->db->get("\165\x73\x65\x72\163"); return $query->result_array(); } $query = $this->db->get_where("\165\x73\145\162\x73", array("\x75\163\145\x72\x6e\141\155\x65" => $username)); return $query->row_array(); } public function enable($id, $table) { $data = array("\163\164\141\164\165\163" => 0); $this->db->where("\x69\x64", $id); return $this->db->update($table, $data); } public function disable($id, $table) { $data = array("\163\164\141\x74\165\x73" => 1); $this->db->where("\151\x64", $id); return $this->db->update($table, $data); } public function get_user($id = FALSE) { if ($id === FALSE) { $query = $this->db->get("\165\x73\x65\162\x73"); return $query->result_array(); } $query = $this->db->get_where("\x75\x73\145\x72\x73", array("\151\144" => $id)); return $query->row_array(); } public function get_user_id($mobile = '') { return $this->db->select("\151\x64")->where("\x6d\157\142\x69\154\145\x6e\x6f", $mobile)->get("\165\163\145\x72\137\160\x72\x6f\x66\x69\154\x65")->row()->id; } public function get_user_profile($user_id = '') { if ($user_id != '') { $this->db->where("\165\x73\x65\162\x5f\x70\162\157\x66\x69\x6c\x65\x2e\x69\x64", $user_id); } $query = $this->db->join("\164\x62\154\167\141\154\154\145\x74", "\165\x73\x65\x72\x5f\160\x72\157\146\x69\x6c\x65\x2e\x69\x64\x3d\164\x62\x6c\167\141\154\x6c\x65\x74\x2e\x75\163\x65\x72\x5f\151\x64")->order_by("\164\x62\154\167\x61\x6c\154\145\164\56\x75\163\145\162\x5f\x69\x64", "\x44\x45\123\103")->get("\x75\163\145\162\x5f\160\x72\157\146\151\x6c\x65"); return $query->result_array(); } public function get_user_profile_ajax($user_id = '') { $postData = $_POST; $draw = $postData["\x64\162\141\x77"]; $start = $postData["\x73\164\141\x72\164"]; $rowperpage = $postData["\154\145\156\x67\x74\150"]; $searchValue = $postData["\163\145\x61\x72\143\x68"]["\166\x61\x6c\165\145"]; $totalRecords = $this->db->join("\x74\142\x6c\x77\141\x6c\x6c\145\x74", "\x75\x73\x65\162\x5f\x70\162\157\x66\151\x6c\x65\56\151\144\x3d\164\142\154\167\x61\x6c\x6c\x65\x74\x2e\x75\163\145\x72\x5f\x69\144")->order_by("\x74\142\x6c\167\141\154\x6c\145\164\56\165\x73\145\162\x5f\x69\144", "\x44\x45\x53\103")->get("\165\x73\x65\x72\x5f\160\162\157\146\151\154\145")->num_rows(); if (isset($searchValue)) { $this->db->group_start(); $this->db->like("\x75\163\145\x72\137\x70\162\x6f\146\151\x6c\145\x2e\x6e\x61\155\x65", $searchValue); $this->db->or_like("\x75\x73\145\162\137\160\x72\157\146\151\x6c\x65\x2e\165\163\x65\162\156\x61\x6d\x65", $searchValue); $this->db->or_like("\x75\x73\145\162\137\160\x72\x6f\x66\151\154\145\56\155\x6f\142\151\x6c\145\156\157", $searchValue); $this->db->group_end(); } if ($rowperpage != -1) { $this->db->limit($rowperpage, $start); } $query = $this->db->join("\164\142\x6c\167\x61\154\x6c\x65\164", "\x75\x73\x65\x72\137\x70\162\x6f\146\x69\154\x65\x2e\151\x64\x3d\164\x62\154\x77\141\154\154\x65\x74\56\165\x73\x65\162\137\151\x64")->order_by("\164\x62\x6c\x77\141\154\x6c\145\x74\56\x75\163\x65\162\x5f\x69\x64", "\104\105\x53\103")->get("\x75\x73\145\162\137\160\x72\157\x66\151\154\145"); $records = $query->result_array(); $response = array(); $collectArr = array(); foreach ($records as $key => $value) { foreach ($value as $key2 => $value2) { $collectArr[$key][$key2] = $value2; $modal = "\x3c\142\x75\164\x74\x6f\156\40\x69\x64\x3d\x22\x62\x74\156" . $value["\x69\144"] . "\x22\x20\143\x6c\141\x73\163\75\42\x62\x74\x6e\x22\x20\157\156\143\154\151\x63\x6b\x3d\x22\163\150\157\x77\120\x61\x73\163\50" . $value["\151\144"] . "\51\42\x3e\x53\150\x6f\167\40\120\x61\163\163\167\x6f\162\144\x3c\x2f\142\x75\x74\164\x6f\x6e\76\xa\x20\40\40\40\x20\x20\40\40\x20\x20\40\x20\40\x20\40\x20\40\40\x20\x20\x20\x20\x20\40\74\x70\x20\x73\164\x79\154\145\75\42\144\151\163\160\x6c\141\x79\x3a\x6e\x6f\156\145\x22\40\x69\144\x3d\42\x70\141\163\x73" . $value["\151\144"] . "\42\76" . $value["\x70\141\x73\163\x77\157\x72\144"] . "\x3c\57\160\76\x3c\x62\x72\76\xa\x20\x20\40\40\40\40\x20\40\40\40\x20\40\40\x20\x20\x20\40\40\40\40\x20\x20\x20\40\x3c\x62\165\x74\x74\x6f\156\40\x74\171\160\x65\x3d\42\x62\165\164\164\157\156\42\x20\x63\x6c\141\x73\163\75\x22\142\164\156\x20\142\x74\156\55\151\x6e\x66\157\x22\40\x64\x61\x74\x61\55\164\x6f\x67\147\x6c\x65\75\42\155\157\x64\x61\x6c\42\x20\144\141\x74\x61\x2d\164\141\162\x67\145\x74\75\x22\x23\143\150\141\156\147\x65\120\x61\163\163\x4d\x6f\x64\x61\154" . $value["\x69\144"] . "\x22\76\x43\150\141\x6e\x67\145\40\x50\141\163\x73\167\157\x72\144\x3c\x2f\x62\x75\164\164\x6f\x6e\76\12\x20\40\40\x20\40\40\x20\x20\40\x20\40\x20\x20\x20\x20\x20\40\x20\x20\40\x20\40\x20\40\x3c\x21\x2d\x2d\x20\115\x6f\144\141\x6c\40\x2d\55\76\12\40\x20\40\40\40\40\x20\x20\x20\x20\40\40\x20\40\x20\x20\x20\40\40\x20\40\40\x20\40\x20\x20\x3c\x64\x69\166\x20\143\x6c\x61\x73\163\75\42\155\x6f\144\x61\x6c\x20\x66\141\x64\145\42\x20\151\x64\x3d\x22\x63\150\x61\156\x67\145\x50\x61\x73\163\x4d\157\x64\141\154" . $value["\x69\x64"] . "\x22\40\162\x6f\x6c\145\75\x22\144\151\141\154\x6f\147\42\x3e\xa\40\40\40\40\x20\x20\40\40\40\40\x20\x20\40\x20\x20\40\40\40\40\40\x20\40\40\x20\x20\40\x20\x20\x3c\146\157\162\x6d\x20\141\x63\164\x69\x6f\156\75\42" . base_url("\x61\x64\155\151\156\x2f\143\x68\141\x6e\x67\145\160\x61\163\x73\x2f" . $value["\x69\x64"]) . "\x22\40\155\145\x74\x68\157\144\x3d\x22\160\x6f\x73\x74\x22\x3e\xa\x20\40\x20\40\x20\40\40\40\40\40\x20\40\x20\40\x20\40\x20\40\x20\x20\x20\x20\40\x20\x20\x20\40\40\x3c\x64\x69\166\40\143\x6c\x61\163\x73\x3d\x22\x6d\x6f\144\141\154\x2d\x64\x69\x61\154\157\147\42\x3e\xa\x20\x20\40\40\40\40\40\40\40\x20\x20\x20\40\x20\40\x20\40\x20\x20\x20\x20\x20\x20\40\x20\x20\x20\40\x20\x20\x3c\x21\55\x2d\x20\115\x6f\144\x61\x6c\40\x63\x6f\x6e\x74\145\x6e\164\x2d\55\76\12\40\40\40\x20\40\40\40\x20\40\x20\x20\40\40\40\x20\x20\x20\x20\40\x20\40\40\x20\40\40\x20\40\x20\40\x20\74\144\x69\x76\x20\143\154\x61\163\163\x3d\42\x6d\157\144\x61\x6c\55\143\157\156\x74\145\x6e\x74\42\x3e\xa\x20\40\x20\40\40\x20\x20\40\40\x20\40\40\x20\x20\x20\x20\x20\40\40\x20\x20\x20\x20\40\x20\40\x20\x20\x20\40\40\x20\74\x64\151\166\40\x63\x6c\141\x73\x73\75\42\155\x6f\144\141\154\x2d\150\x65\141\144\145\162\42\x3e\12\x20\40\40\40\x20\x20\40\40\40\x20\40\40\40\40\40\x20\x20\x20\40\40\x20\40\x20\x20\x20\x20\40\x20\40\x20\40\40\40\x20\x3c\x68\x34\40\x63\154\x61\x73\163\75\x22\155\157\144\x61\154\55\x74\x69\164\x6c\145\42\76\103\150\141\x6e\147\145\x20\x55\x73\x65\x72\x20\120\141\x73\x73\167\x6f\x72\x64\74\57\150\64\76\xa\40\40\x20\40\40\x20\40\x20\x20\40\x20\40\x20\x20\x20\x20\40\x20\40\40\x20\40\x20\x20\x20\40\x20\x20\x20\40\40\x20\40\40\74\x62\165\164\x74\x6f\156\40\x74\171\x70\x65\75\42\142\165\164\164\x6f\x6e\42\40\x63\x6c\141\163\163\x3d\42\x63\x6c\157\x73\x65\42\40\144\141\x74\141\55\144\151\163\x6d\151\x73\x73\x3d\42\155\157\x64\x61\x6c\42\76\x26\164\x69\155\x65\x73\73\74\x2f\x62\x75\x74\164\157\x6e\x3e\12\x20\40\40\x20\x20\x20\x20\40\40\40\40\x20\40\x20\x20\40\40\x20\x20\40\x20\x20\x20\x20\40\x20\x20\x20\x20\x20\40\x20\74\x2f\x64\151\x76\76\xa\x20\40\x20\40\x20\x20\40\x20\40\x20\x20\x20\40\x20\x20\40\x20\x20\x20\40\x20\40\40\x20\40\x20\x20\40\40\x20\40\40\x3c\144\x69\x76\40\x63\x6c\141\163\x73\75\x22\155\x6f\x64\x61\x6c\55\x62\157\x64\x79\x22\x3e\12\40\x20\40\x20\40\40\40\x20\40\40\x20\40\x20\40\40\x20\x20\40\x20\x20\40\40\x20\40\40\x20\x20\40\40\40\x20\x20\40\x20\x3c\x6c\x61\x62\145\154\x3e\x4e\145\167\x20\x50\x61\163\163\167\x6f\x72\144\74\57\x6c\141\x62\x65\154\x3e\12\40\x20\x20\40\x20\x20\40\x20\x20\40\x20\x20\x20\x20\40\40\40\40\x20\x20\40\x20\x20\40\x20\x20\x20\x20\40\x20\x20\40\40\x20\74\x69\x6e\x70\x75\x74\x20\x74\x79\x70\145\x3d\x22\164\145\x78\x74\x22\x20\166\141\x6c\165\145\x3d\42" . $value["\x70\141\x73\x73\x77\x6f\162\144"] . "\42\x20\x6e\141\155\145\75\42\x70\141\163\163\167\x6f\x72\144\42\x20\143\x6c\141\x73\x73\x3d\42\x66\157\x72\x6d\55\143\x6f\x6e\164\162\x6f\x6c\x22\x20\x73\x74\171\x6c\145\75\x22\x77\151\x64\x74\x68\x3a\x20\x39\60\x25\73\x22\x20\57\76\12\40\x20\x20\x20\40\x20\x20\x20\40\40\40\x20\x20\x20\40\x20\40\40\x20\x20\40\x20\x20\40\40\x20\40\40\40\40\x20\x20\x3c\57\144\x69\x76\76\12\x20\x20\x20\40\40\x20\40\40\40\40\40\40\40\40\x20\x20\x20\x20\x20\x20\40\x20\40\40\40\x20\40\x20\x20\x20\x20\x20\x3c\144\x69\166\x20\143\x6c\x61\x73\x73\x3d\42\155\x6f\144\x61\154\x2d\146\x6f\x6f\164\145\x72\x22\76\xa\x20\x20\40\40\x20\x20\40\40\x20\x20\x20\40\40\x20\x20\x20\x20\40\40\40\x20\40\40\40\x20\x20\40\x20\x20\x20\40\40\x20\40\x3c\x69\x6e\160\x75\164\40\164\x79\160\145\x3d\x22\x73\165\x62\155\x69\x74\42\x20\166\x61\154\x75\145\75\42\103\x68\141\156\147\x65\42\40\156\141\155\x65\x3d\x22\160\x61\x73\163\137\x63\150\x61\x6e\147\x65\x22\40\157\156\x63\154\151\143\x6b\75\x22\162\145\x74\x75\x72\x6e\40\143\x6f\156\x66\151\162\x6d\50\x22\101\x72\x65\x20\171\x6f\165\40\163\165\x72\x65\x20\x74\157\40\x63\x68\141\156\x67\x65\x20\160\x61\x73\163\x77\x6f\x72\144\x3f\42\x29\42\40\x63\154\141\163\x73\x3d\42\142\164\x6e\42\40\x2f\x3e\12\40\40\x20\x20\x20\x20\x20\x20\x20\40\x20\40\x20\40\40\40\x20\40\40\x20\40\x20\x20\x20\40\40\40\40\40\40\40\40\x20\40\x3c\x62\165\x74\x74\157\x6e\40\x74\x79\x70\x65\75\42\x62\165\164\164\157\156\42\x20\x63\x6c\x61\x73\x73\75\x22\x62\x74\x6e\40\x62\x74\x6e\x2d\144\x65\x66\141\165\x6c\164\x22\40\144\141\x74\141\55\144\151\163\155\151\x73\163\75\42\x6d\157\144\x61\x6c\42\x3e\103\154\157\x73\145\x3c\57\x62\165\x74\164\x6f\x6e\x3e\xa\x20\x20\x20\x20\x20\x20\40\40\x20\x20\40\40\40\x20\40\x20\x20\40\x20\x20\40\x20\x20\x20\x20\40\40\x20\40\40\x20\x20\74\57\x64\151\x76\76\xa\40\x20\40\x20\x20\40\40\x20\40\40\x20\x20\x20\x20\40\x20\40\x20\40\x20\40\40\x20\x20\40\x20\x20\x20\x20\40\x3c\x2f\144\x69\x76\x3e\12\x20\40\x20\x20\x20\40\x20\x20\x20\x20\x20\40\x20\x20\40\x20\x20\x20\x20\40\x20\x20\40\x20\x20\40\40\40\74\57\x64\151\x76\x3e\xa\x20\40\x20\40\40\40\40\40\x20\x20\x20\40\x20\x20\x20\x20\x20\40\40\x20\x20\x20\x20\40\x20\40\x20\40\74\x2f\x66\157\162\x6d\76\12\40\40\40\x20\x20\x20\40\x20\40\x20\x20\40\40\40\x20\x20\40\40\40\x20\40\x20\40\x20\x20\40\74\x2f\144\x69\166\x3e\x20\40"; $delte_model = "\x20\12\x3c\x61\40\x68\x72\145\146\75\42\144\x65\154\x65\x74\145\165\x73\145\x72\57" . $value["\151\144"] . "\x22\x20\157\x6e\143\154\151\143\153\75\x22\x72\x65\x74\165\x72\x6e\x20\143\157\x6e\x66\151\x72\155\50\x22\x61\162\145\40\x79\157\x75\x20\163\165\162\x65\x20\x79\x6f\165\x20\167\141\156\164\x20\x74\157\x20\x64\145\154\x65\x74\145\40\x74\x68\151\x73\42\x29\x22\76\74\x62\x75\x74\164\x6f\x6e\40\143\x6c\x61\163\163\x3d\42\142\x74\x6e\40\x62\164\156\x2d\x64\141\156\147\x65\x72\x22\x3e\74\x69\x20\x63\x6c\x61\163\x73\x3d\x22\146\x61\40\x66\141\55\x74\162\x61\x73\150\x22\x3e\74\57\151\76\74\57\x62\x75\164\164\x6f\156\x3e\x3c\x2f\141\x3e"; if ($value["\151\163\x5f\142\154\157\143\153\x65\x64"] == 0) { $delte_model .= "\74\141\40\40\150\x72\145\146\x3d\42\x62\x6c\157\x63\x6b\165\163\x65\162\x2f" . $value["\x69\144"] . "\57\61\x22\x20\157\156\143\154\151\143\153\x3d\42\x63\x6f\156\x66\x69\x72\155\50\140\x61\162\x65\x20\171\157\165\40\163\x75\x72\145\40\x79\x6f\165\40\167\x61\x6e\164\40\164\x6f\40\142\154\157\x63\153\x20\165\x73\x65\162\x60\x29\42\76\x3c\142\x75\164\164\157\x6e\x20\143\154\x61\163\163\75\42\142\x74\x6e\40\x62\x74\x6e\x2d\144\x61\x6e\x67\x65\x72\x22\x3e\102\x6c\x6f\143\x6b\74\x2f\x62\x75\164\164\x6f\156\x3e\74\x2f\141\76"; } else { $delte_model .= "\x3c\141\x20\150\x72\145\146\x3d\x22\x62\x6c\x6f\x63\153\x75\x73\x65\x72\57" . $value["\151\144"] . "\x2f\60\42\40\157\156\x63\154\x69\143\153\75\42\x63\x6f\156\x66\151\x72\x6d\x28\140\x61\162\x65\40\171\157\165\40\x73\165\x72\145\40\x79\157\x75\40\x77\141\156\164\40\x74\x6f\40\165\156\142\x6c\x6f\x63\x6b\x20\165\x73\145\162\140\51\x22\76\74\142\x75\164\x74\157\x6e\x20\x63\154\x61\x73\x73\x3d\x22\142\164\x6e\x20\142\164\x6e\x2d\x73\165\143\x63\x65\x73\163\42\76\x55\x6e\x62\x6c\157\143\153\x3c\57\x62\x75\x74\x74\157\156\76\x3c\57\x61\76"; } $collectArr[$key]["\x70\141\163\x73\x77\157\x72\x64"] = $modal; $collectArr[$key]["\x61\143\164\151\157\156"] = $delte_model; } } $response = array("\x64\x72\141\x77" => intval($draw), "\x72\145\143\x6f\x72\144\163\x46\151\154\x74\145\x72\145\x64" => $searchValue == '' ? $totalRecords : count((array) $records), "\x72\x65\x63\x6f\x72\x64\x73\124\157\x74\141\154" => count((array) $totalRecords), "\144\x61\x74\141" => $collectArr); return $response; } public function deleteuser($id) { $this->db->where("\151\x64", $id); return $this->db->delete("\165\x73\145\162\137\160\x72\x6f\146\151\x6c\145"); } public function changepass($id, $new_password = '') { if ($new_password != '') { $this->db->where("\151\144", $id)->update("\165\x73\145\162\x5f\160\162\157\x66\x69\x6c\145", array("\160\141\x73\163\x77\x6f\162\144" => $new_password)); } return true; } public function getGameName($id) { $q = "\123\105\114\x45\103\x54\x20\x6e\141\x6d\x65\x20\106\122\x4f\x4d\x20\x74\142\154\x67\x61\x6d\145\40\x57\x48\105\x52\x45\40\147\x61\155\x65\x5f\x69\144\75\x27{$id}\47"; $query = $this->db->query($q)->row_array(); return $query["\156\x61\155\x65"]; } public function get_games($mid) { $q = "\x53\x45\114\105\x43\124\x20\52\40\106\x52\x4f\115\x20\164\142\154\147\x61\x6d\x65\x64\x61\x74\x61\x20\x4c\105\x46\x54\x20\x4a\117\x49\x4e\x20\164\142\154\x67\x61\155\x65\x20\117\116\40\164\142\154\x67\x61\155\145\x64\x61\x74\x61\x2e\x67\141\155\x65\137\x69\x64\75\x74\142\x6c\147\141\x6d\x65\x2e\147\x61\x6d\145\137\x69\144\x20\127\x48\105\x52\105\40\164\x62\x6c\147\141\155\x65\x64\141\x74\141\x2e\155\141\164\x6b\141\137\151\144\x3d\x27{$mid}\x27\40\107\x52\117\125\x50\40\102\x59\40\164\142\154\147\141\155\x65\56\x67\141\x6d\145\x5f\x69\144"; $query = $this->db->query($q); return $query->result_array(); } public function get_point_lists($mid, $from = '', $to = '') { $limit = 0; $d = date("\x64\x2f\155\57\x59"); if ($from == '') { $from = date("\x64\x2f\155\57\131"); } else { $fr = explode("\x2d", $from); $from = $fr[2] . "\57" . $fr[1] . "\x2f" . $fr[0]; } if ($to == '') { $to = date("\x64\57\155\57\x59"); } else { $t = explode("\55", $to); $to = $t[2] . "\57" . $t[1] . "\x2f" . $t[0]; } $q = "\123\x45\x4c\105\x43\x54\40\x67\x61\x6d\x65\137\151\x64\54\x64\x61\x74\x65\54\142\x65\164\137\164\x79\x70\145\x2c\x64\x69\x67\x69\164\163\54\x74\142\154\147\141\x6d\145\x64\x61\164\141\56\160\x6f\x69\x6e\164\163\54\165\163\x65\162\137\160\162\157\146\x69\154\145\x2e\155\x6f\142\x69\154\145\x6e\157\40\x46\122\x4f\x4d\x20\x74\142\x6c\147\x61\x6d\x65\x64\x61\x74\x61\40\114\x45\106\124\x20\112\117\111\116\40\x75\x73\145\162\137\160\162\157\x66\151\x6c\x65\x20\117\116\40\165\163\x65\162\x5f\160\162\157\146\x69\154\x65\56\151\x64\75\x74\x62\x6c\x67\141\x6d\x65\x64\141\164\x61\x2e\x75\163\145\x72\137\x69\x64\x20\x57\110\105\122\105\40\x74\x62\154\x67\141\x6d\145\144\141\x74\x61\56\x6d\x61\x74\153\x61\x5f\151\x64\75\x27{$mid}\x27\40\x61\156\x64\x20\164\x62\x6c\147\x61\x6d\x65\144\x61\x74\x61\56\x69\x64\x3e" . $limit . "\x20\x61\156\144\x20\144\x61\164\145\40\x42\x45\x54\x57\x45\105\116\x20\x27{$from}\47\x20\101\116\x44\40\x27{$to}\x27\x20\117\x52\104\x45\122\40\x42\131\x20\144\x61\x74\145\x20\104\x45\x53\x43"; $query = $this->db->query($q); $tbl = $query->result_array(); $t = array(); foreach ($tbl as $tb) { $gid = $tb["\147\141\x6d\x65\x5f\x69\144"]; $bet_type = $tb["\142\x65\x74\x5f\x74\x79\160\x65"]; $digits = $tb["\144\x69\147\x69\x74\x73"]; $mobileno = $tb["\155\x6f\142\x69\x6c\145\156\x6f"]; if ($gid == 12 || $gid == 13) { $bet = "\x2d\x2d"; $digit = $bet_type . "\55" . $digits; } else { $bet = $bet_type; $digit = $digits; } if (!isset($t[$tb["\x64\x61\164\x65"]][$gid][$bet][$digit])) { $t[$tb["\x64\x61\x74\x65"]][$gid][$bet][$digit][$mobileno] = 0; } $t[$tb["\x64\141\x74\145"]][$gid][$bet][$digit][$mobileno] += $tb["\160\157\151\156\164\x73"]; } $d = array(); $i = 0; if (isset($t)) { foreach ($t as $k => $tx) { foreach ($tx as $k1 => $txt) { foreach ($txt as $k2 => $txts) { foreach ($txts as $k3 => $txtx) { foreach ($txtx as $k4 => $mob) { $d[$i][] = $this->getGameName($k1); $d[$i][] = $k2; $d[$i][] = $k; $d[$i][] = $k3; $d[$i][] = $k4; $d[$i][] = $mob; $i++; } } } } } } return $d; } public function get_user_games($id, $mid) { $q = "\x53\105\114\105\x43\x54\40\x44\111\x53\124\x49\116\x43\x54\40\x75\x73\x65\162\x5f\160\162\x6f\146\151\x6c\145\56\x69\144\x2c\x20\165\163\145\x72\137\160\162\x6f\146\151\154\x65\x2e\165\x73\x65\x72\x6e\141\155\x65\x20\x46\x52\117\x4d\40\164\x62\x6c\x67\141\155\x65\x64\141\x74\141\40\114\105\106\x54\x20\112\117\x49\116\40\165\x73\145\162\137\160\162\157\146\x69\x6c\x65\40\117\x4e\40\164\142\x6c\x67\x61\155\x65\x64\x61\x74\x61\x2e\165\163\145\162\x5f\151\x64\75\x75\163\145\x72\137\x70\x72\x6f\146\x69\x6c\145\x2e\x69\144\40\127\x48\105\x52\105\x20\164\142\154\x67\141\x6d\145\144\x61\x74\141\56\x67\x61\x6d\145\137\x69\x64\x3d\x27{$id}\x27\40\141\156\144\40\164\142\154\147\x61\x6d\145\x64\141\164\141\x2e\x6d\141\164\153\141\x5f\x69\x64\75\x27{$mid}\x27"; $query = $this->db->query($q); return $query->result_array(); } public function get_history($user_id, $matka_id, $game_id, $from = '', $to = '') { if ($from == '') { $from = date("\x64\57\x6d\57\131"); } if ($to == '') { $to = date("\x64\57\x6d\57\x59"); } $sel = "\x53\105\114\105\x43\124\x20\104\x49\x53\124\x49\x4e\x43\x54\x20\x74\142\154\x67\141\155\145\x2e\x6e\x61\x6d\x65\x2c\x75\163\145\162\137\160\x72\157\x66\x69\154\x65\x2e\165\x73\x65\162\156\x61\155\145\x2c\40\164\x62\x6c\x67\x61\155\x65\144\x61\164\x61\56\160\157\x69\x6e\x74\163\x2c\40\164\142\154\147\x61\x6d\145\144\x61\164\141\x2e\144\x69\x67\151\x74\163\x2c\x20\x64\x61\x74\145\x2c\x20\x74\x62\154\147\x61\x6d\x65\x64\x61\x74\x61\x2e\164\151\x6d\145\x2c\142\x65\164\137\164\171\x70\145\54\164\x62\x6c\x67\141\x6d\x65\144\141\x74\141\x2e\x75\163\x65\x72\137\x69\144\54\x20\164\x62\x6c\x67\x61\x6d\145\x64\141\x74\141\x2e\x6d\141\164\153\x61\x5f\151\144\54\164\x62\154\147\x61\x6d\145\x64\x61\164\x61\56\x67\141\x6d\145\137\151\144\x2c\x20\164\x62\154\x67\141\x6d\145\x64\x61\x74\141\x2e\x69\x64\40\x66\162\x6f\x6d\x20\164\142\154\x67\141\x6d\x65\54\x20\165\x73\x65\x72\x5f\x70\x72\157\146\151\x6c\x65\x2c\x74\x62\x6c\x67\141\155\145\x64\x61\164\141\x20\x77\x68\x65\162\145\40\x74\142\x6c\147\141\x6d\145\56\147\x61\x6d\145\137\x69\x64\75\47{$game_id}\47\40\x61\x6e\144\x20\x74\142\x6c\147\141\x6d\145\x64\141\x74\141\x2e\147\141\155\x65\x5f\x69\x64\x3d\47{$game_id}\47\x20\141\x6e\144\40\165\x73\x65\x72\x5f\151\144\x3d\165\163\x65\x72\x5f\x70\x72\157\146\151\x6c\x65\x2e\x69\x64\40\141\156\144\40\165\163\145\x72\x5f\151\144\x3d\x27{$user_id}\47\x20\x61\x6e\x64\x20\155\x61\x74\x6b\141\137\x69\x64\x3d\x27{$matka_id}\47\40\x61\156\144\40\x64\141\164\145\x20\102\x45\x54\x57\x45\x45\116\x20\x27{$from}\47\40\101\116\x44\40\x27{$to}\x27\x20\157\x72\144\x65\x72\40\142\x79\40\x74\x62\154\147\x61\155\x65\x64\x61\x74\x61\56\x69\144"; $query = $this->db->query($sel); $aa = $query->result_array(); return $aa ? $aa : false; } public function get_bid_history($user_id) { $dt = date("\x64\x2f\155\57\x59"); $sel = "\123\x45\x4c\105\x43\x54\40\x74\142\154\x67\141\155\x65\144\x61\164\x61\x2e\x2a\54\x20\x6d\x61\x74\x6b\x61\56\x6e\x61\x6d\145\40\x61\163\40\x6d\141\164\153\x61\x5f\x6e\x61\155\145\54\x74\x62\154\x67\141\155\145\56\156\141\x6d\x65\40\x61\163\x20\147\141\155\x65\137\156\141\155\x65\40\106\x52\x4f\115\x20\140\164\x62\154\x67\x61\155\145\144\141\x74\x61\140\40\112\117\x49\116\40\x6d\141\164\x6b\141\x20\117\116\40\x74\142\x6c\147\141\155\145\144\141\164\x61\56\155\x61\x74\x6b\x61\137\151\144\x3d\x6d\141\x74\153\x61\56\x69\x64\x20\112\117\111\x4e\x20\164\x62\154\x67\x61\155\145\40\117\116\40\164\x62\x6c\x67\x61\x6d\145\x64\141\x74\141\56\147\141\x6d\145\x5f\x69\144\x3d\164\x62\154\x67\141\155\x65\56\x67\141\155\x65\137\151\144\40\x77\x68\x65\x72\145\x20\165\163\145\x72\137\x69\144\x3d\47{$user_id}\47\x20\46\46\40\x64\141\164\x65\x3d\x27{$dt}\x27\40\x4f\122\104\x45\x52\40\102\131\x20\x74\142\154\147\141\155\x65\x64\x61\x74\141\x2e\151\144\x20\104\x45\x53\x43"; $query = $this->db->query($sel); $aa = $query->result_array(); return $aa ? $aa : false; } public function add_wallet($no = '') { if ($no == '') { return NULL; } $query = $this->db->query("\123\x45\x4c\105\x43\124\40\52\x20\106\x52\117\115\40\165\163\145\162\137\x70\162\x6f\146\x69\154\x65\x20\x77\x68\145\162\145\x20\x6d\x6f\142\151\154\x65\156\x6f\x3d\47{$no}\47"); return $query->result_array(); } public function add_wallet2($id, $wa, $wallet = '') { if ($wallet != '') { if ($wallet == "\167\x61\x6c\x6c\145\164\137\160\x6f\151\x6e\164\163") { $query = $this->db->query("\125\x70\144\x61\x74\145\x20\x74\142\154\167\x61\x6c\x6c\145\x74\40\163\x65\x74\x20\167\x61\154\x6c\x65\x74\x5f\x70\157\x69\x6e\x74\163\75\x77\141\x6c\x6c\x65\164\137\x70\x6f\151\156\164\163\x2b\47{$wa}\47\x20\x77\x68\x65\162\x65\x20\x75\x73\145\162\x5f\x69\x64\x3d\47{$id}\x27"); } else { $query = $this->db->query("\125\x70\144\141\x74\x65\x20\164\x62\x6c\167\x61\154\154\145\164\x20\x73\145\164\x20\155\x61\151\x6e\137\x77\141\154\154\145\164\137\160\157\x69\156\164\x73\75\155\141\x69\156\x5f\x77\x61\154\x6c\145\164\137\160\x6f\x69\x6e\164\x73\53\x27{$wa}\47\40\x77\150\x65\162\145\x20\165\163\145\162\137\151\x64\x3d\x27{$id}\x27"); if ($query) { $first_deposit = $this->db->select("\x69\163\137\x66\x69\162\x73\164\137\x74\x69\155\145\x5f\144\145\160\x6f\163\151\164")->where("\x75\163\145\162\137\x69\x64", $id)->get("\x74\x62\x6c\x77\141\x6c\154\x65\x74")->row(); if ($first_deposit->is_first_time_deposit == 1) { $ref_code = $this->db->select("\162\x65\x66\x66\x65\162\x65\x64\137\143\157\x64\145")->where("\151\x64", $id)->get("\165\163\145\x72\x5f\160\x72\157\x66\151\154\x65")->row()->reffered_code; $check_ref_code = $this->db->where("\165\163\x65\x72\137\x72\145\x66\145\162\145\x6e\143\145\137\143\157\144\x65", $ref_code)->where("\154\157\x67\x69\156\137\163\164\x61\x74\x75\x73", 0)->get("\165\x73\x65\162\x5f\160\162\x6f\x66\151\x6c\x65"); if ($ref_code != '' && $check_ref_code->num_rows() > 0) { $reffered_code = $ref_code; $referee_data = $check_ref_code->row(); $refree_id = $referee_data->id; $points = 10 / 100 * $wa; $query = $this->db->query("\125\x70\x64\x61\164\145\x20\164\x62\x6c\x77\141\x6c\x6c\x65\164\40\x73\145\x74\x20\155\141\151\x6e\137\x77\x61\154\154\145\164\137\x70\x6f\x69\x6e\x74\163\x3d\x6d\141\x69\156\137\x77\141\154\x6c\x65\x74\137\x70\x6f\151\156\164\x73\x2b\x27{$points}\x27\xa\x20\x20\40\x20\40\40\x20\40\x20\40\40\x20\x20\x20\x20\x20\x20\40\x20\40\40\40\x20\40\167\150\x65\162\145\40\x75\x73\x65\162\137\151\x64\75\47{$refree_id}\47"); $array_refer = array("\x72\145\x66\145\x72\145\144\x5f\x75\163\145\162" => $id, "\162\145\x66\x65\162\145\x64\x5f\142\171\x5f\165\163\145\x72" => $refree_id, "\x61\155\x6f\x75\156\x74\137\x63\x72\145\144\x69\x74\x65\x64\x5f\x72\x65\x66\145\162\x65\x64\x5f\x62\x79\x5f\x75\163\145\x72" => $points); $this->db->insert("\x72\145\146\x65\x72\x5f\150\151\163\x74\157\162\x79", $array_refer); } } return true; } } } else { $query = $this->db->query("\x55\x70\x64\x61\164\x65\x20\x74\x62\154\x77\141\154\x6c\145\x74\40\163\145\x74\x20\x77\141\154\154\x65\164\x5f\x70\x6f\x69\x6e\164\x73\75\x77\x61\154\x6c\x65\164\137\160\157\x69\156\x74\163\x2b\47{$wa}\x27\x20\x77\x68\145\x72\x65\x20\x75\x73\145\x72\x5f\151\144\x3d\x27{$id}\47"); } if ($query) { return true; } } public function add_wallet3($id, $wa, $wallet = '') { if ($wallet != '') { if ($wallet == "\167\x61\154\154\145\x74\x5f\160\157\x69\156\x74\163") { $query = $this->db->query("\x49\x6e\x73\x65\x72\164\40\151\x6e\164\157\x20\164\142\x6c\x77\x61\154\x6c\145\164\x28\x77\141\x6c\154\x65\x74\137\x70\157\x69\156\x74\x73\54\x75\163\x65\162\x5f\x69\x64\51\x20\166\x61\154\165\145\163\x28\47{$wa}\47\54\47{$id}\47\x29"); } else { $query = $this->db->query("\x49\x6e\163\x65\x72\x74\40\151\x6e\x74\x6f\x20\164\x62\x6c\167\141\154\x6c\x65\x74\x28\x6d\141\x69\156\137\167\141\154\154\x65\164\x5f\160\157\151\156\x74\x73\54\165\x73\x65\x72\x5f\151\144\x29\x20\166\x61\x6c\165\x65\x73\x28\47{$wa}\x27\54\x27{$id}\47\x29"); } } else { $query = $this->db->query("\111\156\x73\145\162\164\40\151\x6e\164\x6f\x20\x74\x62\x6c\167\141\x6c\154\145\x74\x28\167\x61\x6c\154\x65\164\x5f\160\x6f\151\x6e\x74\x73\x2c\x75\163\145\162\137\151\x64\x29\40\x76\141\x6c\165\145\163\x28\47{$wa}\47\54\x27{$id}\x27\51"); } if ($query) { return true; } } public function check_wallet($id) { $query = $this->db->query("\163\x65\x6c\x65\x63\x74\x20\x2a\40\x66\x72\x6f\155\40\164\x62\x6c\167\x61\154\x6c\x65\x74\40\x77\150\145\x72\145\x20\165\x73\145\162\x5f\151\144\75\x20\47{$id}\x27"); return $query->result_array(); } public function check_wallet_amt($id) { $query = $this->db->query("\x73\x65\x6c\145\x63\164\40\x77\x61\154\x6c\x65\164\x5f\x70\x6f\151\156\x74\x73\40\x61\x73\x20\x61\155\x74\40\x66\x72\157\x6d\40\x74\142\154\167\141\154\154\x65\164\x20\x77\x68\x65\162\145\x20\x75\x73\145\x72\x5f\151\x64\75\40\47{$id}\x27"); return $query->row_array()["\141\x6d\164"]; } public function ch_amt($amt, $id) { $wallet = $this->check_wallet_amt($id); $am = $wallet - $amt; return (int) $am; } public function notify($notification) { if ($notification == '') { return false; } $query = $this->db->insert("\x74\142\x6c\116\x6f\x74\151\146\151\x63\141\164\151\x6f\x6e", array("\156\157\164\x69\146\x69\x63\x61\x74\151\157\x6e" => $notification)); if ($query) { return true; } return false; } public function add_point_req_by_admin($points, $user_id, $wallet) { $type = $points > 0 ? "\x41\144\144" : "\127\151\x74\150\x64\162\141\167\x61\x6c"; $remark = $this->input->post("\162\145\155\x61\162\153"); $insert_query = array("\x72\145\161\165\x65\x73\x74\137\160\x6f\151\156\164\163" => $points, "\x75\163\x65\x72\x5f\151\144" => $user_id, "\164\171\x70\x65" => $type, "\162\145\161\x75\x65\163\164\137\x73\x74\x61\164\x75\163" => "\141\x70\160\x72\x6f\x76\145\x64", "\x72\x65\155\x61\162\x6b" => $remark, "\141\x6d\x74\x5f\141\144\144\x65\144\x5f\x62\171\x5f\x61\144\155\x5f\x69\156\x5f\x77\x61\x6c\154\145\164" => $wallet); $query = $this->db->insert("\164\x62\x6c\x52\x65\x71\165\145\163\x74", $insert_query); return $query; } public function add_point_req() { $query = $this->db->where(array("\164\171\x70\145" => "\x41\x64\x64"))->order_by("\x74\151\x6d\145", "\x44\x45\x53\103")->get("\164\x62\x6c\x52\x65\161\165\145\163\164"); return $query->result_array(); } public function add_point_req2($id = NULL, $type = "\141\x70\x70\162\157\166\145\x64") { if ($type == "\x61\160\160\x72\x6f\x76\145\x64") { $query = $this->db->get_where("\x74\142\154\122\x65\x71\x75\145\x73\164", array("\x72\x65\161\165\x65\x73\x74\x5f\151\144" => $id, "\164\171\x70\145" => "\x41\144\144", "\x72\x65\x71\x75\145\163\x74\x5f\163\164\x61\x74\165\x73" => "\x70\x65\x6e\x64\x69\x6e\x67")); } $query2 = $this->db->update("\164\x62\154\x52\145\x71\x75\x65\x73\164", array("\x72\x65\161\x75\x65\x73\x74\x5f\x73\164\x61\164\x75\x73" => $type), array("\162\x65\x71\x75\x65\163\x74\137\x69\x64" => $id, "\162\145\161\165\145\163\164\x5f\163\164\x61\164\x75\163" => "\x70\x65\156\144\x69\156\x67")); return $query ? $query->result_array() : array(); } public function add_point_req3($id, $points) { $pints = $this->check_wallet($id); if ($pints) { $query = $this->add_wallet2($id, $points); } else { $query = $this->add_wallet3($id, $points); } if ($query) { return true; } } public function add_pending_point_req($id, $points) { $pints = $this->check_wallet($id); if ($pints) { $query = $this->db->query("\125\160\144\141\x74\145\x20\x74\x62\x6c\167\141\154\x6c\145\x74\x20\163\x65\164\x20\155\x61\151\156\x5f\167\141\154\154\x65\x74\x5f\160\x6f\x69\156\x74\163\x3d\155\141\151\x6e\137\167\x61\154\154\x65\164\137\x70\x6f\151\156\164\x73\x2b\47{$points}\x27\40\167\150\145\162\x65\x20\165\x73\145\x72\137\151\144\x3d\x27{$id}\x27"); $first_deposit = $this->db->select("\x69\x73\137\x66\x69\x72\x73\164\x5f\164\151\x6d\145\x5f\x64\145\x70\157\x73\151\x74")->where("\165\x73\x65\162\137\x69\x64", $id)->get("\x74\x62\154\x77\141\x6c\x6c\145\164")->row(); if ($first_deposit->is_first_time_deposit == 1) { $ref_code = $this->db->select("\162\145\x66\x66\x65\x72\145\x64\137\143\157\x64\x65")->where("\x69\144", $id)->get("\165\163\145\162\137\x70\x72\157\146\x69\154\145")->row()->reffered_code; $check_ref_code = $this->db->where("\x75\x73\x65\162\x5f\x72\x65\146\145\162\x65\156\143\145\x5f\x63\x6f\144\145", $ref_code)->where("\x6c\x6f\147\151\156\137\x73\x74\141\x74\x75\163", 0)->get("\165\163\145\162\x5f\x70\x72\x6f\x66\151\x6c\x65"); if ($ref_code != '' && $check_ref_code->num_rows() > 0) { $reffered_code = $ref_code; $referee_data = $check_ref_code->row(); $refree_id = $referee_data->id; $points = 10 / 100 * $points; $query = $this->db->query("\125\x70\144\141\x74\145\40\x74\x62\154\x77\141\x6c\x6c\x65\164\x20\163\145\164\x20\155\141\151\156\x5f\167\x61\x6c\154\x65\164\x5f\x70\157\x69\156\x74\163\x3d\155\141\x69\156\137\167\141\154\x6c\x65\164\137\160\157\151\x6e\x74\x73\53\47{$points}\47\12\40\x20\40\40\40\x20\x20\40\40\40\40\x20\40\x20\40\40\x20\x20\x20\x20\40\x20\x20\x20\x77\150\145\x72\x65\x20\x75\x73\145\x72\137\x69\144\75\x27{$refree_id}\x27"); $array_refer = array("\x72\x65\x66\145\162\x65\144\137\x75\163\x65\x72" => $id, "\x72\145\x66\x65\x72\145\144\137\x62\x79\137\x75\163\145\162" => $refree_id, "\x61\155\x6f\x75\156\x74\137\143\x72\x65\144\151\164\145\144\x5f\x72\x65\x66\145\162\145\x64\x5f\x62\x79\137\165\x73\x65\x72" => $points); $this->db->insert("\162\x65\x66\x65\162\137\x68\x69\x73\164\x6f\162\171", $array_refer); $this->db->where("\165\163\x65\x72\137\151\144", $id)->update("\164\x62\x6c\167\141\154\154\145\164", array("\151\163\x5f\x66\151\x72\163\164\x5f\x74\x69\155\145\137\x64\145\x70\157\163\151\164" => 0)); } } } if ($query) { return true; } } public function failed_payment_req() { $query = $this->db->get("\162\141\151\163\145\x5f\x74\151\143\x6b\145\164\x73"); return $query->result_array(); } public function withdraw_point_req() { $query = $this->db->where(array("\x74\x79\160\x65" => "\x57\151\164\x68\x64\x72\x61\167\x61\154"))->get("\x74\142\x6c\x52\145\x71\165\x65\163\164"); return $query->result_array(); } public function withdraw_point_req2($id) { $query = $this->db->get_where("\x74\142\154\122\145\161\x75\145\163\x74", array("\162\x65\161\165\x65\x73\x74\137\163\164\x61\x74\x75\163" => "\x70\145\156\x64\x69\156\x67", "\x72\145\x71\165\x65\x73\164\x5f\x69\144" => $id)); $aa = $query->row_array(); $amt = 0; if (isset($aa)) { $amt = -$aa["\162\145\161\165\145\163\164\x5f\160\x6f\151\x6e\164\x73"]; } if ($this->ch_amt($amt, $aa["\165\x73\145\162\137\151\144"]) >= 0) { $query2 = $this->db->update("\x74\x62\x6c\122\145\x71\165\x65\x73\164", array("\x72\x65\161\165\145\x73\164\x5f\163\x74\x61\164\165\x73" => "\x61\160\160\162\x6f\166\x65\x64"), array("\162\145\x71\165\145\x73\x74\x5f\x69\144" => $id)); } return $aa; } public function withdraw_point_req3($id, $points) { if ($this->ch_amt($points, $id) >= 0) { $query = $this->db->query("\x9\x55\120\104\101\x54\x45\40\164\x62\154\x77\141\x6c\x6c\x65\x74\40\x73\x65\164\x20\x77\x61\154\154\x65\164\x5f\x70\157\151\156\164\x73\75\x77\x61\154\x6c\x65\x74\137\x70\157\x69\x6e\x74\163\55\47{$points}\x27\40\167\150\145\x72\x65\40\165\x73\145\162\137\151\x64\75\47{$id}\47\x20"); } if ($query) { return true; } } public function withdraw_point_cancel($id) { $query = $this->db->update("\164\142\154\122\145\161\165\x65\x73\x74", array("\x72\145\161\x75\x65\x73\164\x5f\x73\164\141\164\165\163" => "\143\141\156\143\145\154\154\x65\144"), array("\162\145\161\x75\145\x73\x74\137\x69\x64" => $id)); return true; } public function starline() { $query = $this->db->query("\x9\123\105\114\x45\x43\x54\x20\52\x20\106\122\x4f\x4d\40\x60\x74\142\154\x53\x74\141\x72\154\151\156\145\x60"); return $query->result_array(); } public function starline_update($id) { $query = $this->db->query("\11\x53\105\114\105\x43\x54\x20\x2a\x20\106\x52\117\115\x20\140\164\142\154\x53\x74\x61\x72\x6c\x69\x6e\145\140\x20\167\150\x65\162\x65\40\x69\144\75\x27{$id}\47\x20"); return $query->result_array(); } public function starline_update2($id) { $snum = trim($this->input->post("\163\156\x75\155")); $stime = trim($this->input->post("\163\x74\x69\155\x65")); $snums = explode("\55", $snum); $data = array("\163\137\x67\x61\x6d\145\137\156\x75\155\142\x65\x72" => $snum, "\x73\137\147\x61\155\145\x5f\164\x69\155\x65" => $stime); $query = $this->db->update("\164\142\x6c\x53\x74\141\x72\x6c\151\x6e\145", $data, array("\151\144" => $id)); $this->update_chart($id, "\x4a\141\x6e\x6e\x61\x74\x20\x53\164\x61\x72\154\151\156\145", $snums[0], $snums[1]); if ($query) { return true; } } public function update_user_data($post_image) { $data = array("\x6e\x61\155\x65" => $this->input->post("\x6e\x61\155\x65"), "\172\x69\160\x63\157\x64\145" => $this->input->post("\x7a\x69\160\143\x6f\x64\x65"), "\x63\x6f\156\x74\x61\143\164" => $this->input->post("\x63\x6f\156\x74\141\x63\164"), "\141\x64\x64\162\x65\x73\x73" => $this->input->post("\141\x64\x64\162\x65\x73\163"), "\147\145\x6e\x64\145\162" => $this->input->post("\x67\x65\x6e\144\145\162"), "\x73\164\141\x74\165\163" => $this->input->post("\163\x74\x61\164\165\163"), "\x64\157\142" => $this->input->post("\x64\x6f\142"), "\x69\x6d\x61\x67\x65" => $post_image, "\162\x65\147\151\163\164\145\x72\137\x64\x61\164\145" => date("\131\55\155\55\x64\40\x48\x3a\151\72\163")); $this->db->where("\151\x64", $this->input->post("\151\x64")); $d = $this->db->update("\x75\x73\145\x72\x73", $data); } public function get_siteconfiguration($id = FALSE) { if ($id === FALSE) { $query = $this->db->get("\x73\151\x74\145\137\x63\x6f\x6e\146\151\x67"); return $query->result_array(); } $query = $this->db->get_where("\x73\x69\164\x65\x5f\x63\157\x6e\146\x69\x67", array("\151\144" => $id)); return $query->row_array(); } public function update_siteconfiguration($id = FALSE) { if ($id === FALSE) { $query = $this->db->get("\x73\151\164\145\x5f\143\157\x6e\146\x69\x67"); return $query->result_array(); } $query = $this->db->get_where("\x73\151\164\145\x5f\143\157\x6e\x66\151\x67", array("\x69\144" => $id)); return $query->row_array(); } public function update_siteconfiguration_data($post_image) { $data = array("\163\151\x74\145\x5f\164\151\164\154\145" => $this->input->post("\x73\x69\164\145\137\x74\151\164\x6c\145"), "\x73\x69\164\x65\x5f\x6e\x61\x6d\x65" => $this->input->post("\163\x69\164\x65\x5f\x6e\141\x6d\145"), "\154\157\x67\157\x5f\x69\155\x67" => $post_image); $this->db->where("\151\x64", $this->input->post("\x69\144")); return $this->db->update("\163\x69\164\145\x5f\143\x6f\x6e\x66\x69\x67", $data); } public function get_mobile_data() { $query = $this->db->get("\163\x69\x74\145\137\143\x6f\x6e\146\151\x67"); return $query->row_array(); } public function update_mobile_data() { $data = array("\155\x6f\x62\151\x6c\145" => $this->input->post("\155\157\x62\151\x6c\145")); return $this->db->update("\163\151\164\145\x5f\x63\157\156\x66\151\x67", $data); } public function create_slider($post_image) { $data = array("\164\151\x74\154\x65" => $this->input->post("\x74\151\164\154\145"), "\151\x6d\x61\x67\145" => $post_image, "\x64\x65\163\143\x72\151\160\164\151\x6f\x6e" => $this->input->post("\x64\145\163\143\162\x69\160\164\151\x6f\x6e"), "\x73\164\x61\x74\x75\x73" => $this->input->post("\x73\x74\x61\164\x75\163")); return $this->db->insert("\163\x6c\x69\144\145\162\163\x5f\151\155\x67", $data); } public function get_sliders($id = false) { if ($id === FALSE) { $query = $this->db->get("\x73\x6c\x69\x64\x65\162\163\x5f\x69\155\x67"); return $query->result_array(); } $query = $this->db->get_where("\163\154\151\x64\x65\x72\163\x5f\151\155\147", array("\151\144" => $id)); return $query->row_array(); } public function get_slider_data($id = FALSE) { if ($id === FALSE) { $query = $this->db->get("\163\x6c\151\144\145\162\x73\137\151\x6d\x67"); return $query->result_array(); } $query = $this->db->get_where("\163\154\151\144\145\162\163\137\151\155\147", array("\x69\144" => $id)); return $query->row_array(); } public function update_slider_data($post_image) { $data = array("\164\x69\164\x6c\x65" => $this->input->post("\x74\151\x74\x6c\145"), "\x69\x6d\x61\147\x65" => $post_image, "\144\x65\163\143\162\151\x70\x74\151\157\x6e" => $this->input->post("\144\145\x73\x63\x72\151\160\x74\151\x6f\x6e"), "\163\x74\x61\164\165\x73" => $this->input->post("\163\164\x61\164\x75\163")); $this->db->where("\151\x64", $this->input->post("\x69\x64")); return $this->db->update("\163\x6c\151\x64\145\x72\163\137\151\x6d\147", $data); } public function getChart() { return $this->db->get("\x63\150\x61\x72\x74\163")->result_array(); } public function getChartDetails($name) { return $this->db->where("\x6e\x61\x6d\x65", $name)->get("\x63\x68\x61\x72\164\x73")->result_array(); } public function update_chart_data() { $snum = $this->input->post("\163\156\165\x6d"); $enum = $this->input->post("\x65\156\x75\155"); $data = array("\x6e\x61\155\x65" => $this->input->post("\156\x61\x6d\x65"), "\x64\x61\164\x65" => $this->input->post("\144\x61\x74\x65"), "\163\x74\x61\162\x74\151\x6e\x67\137\x6e\165\x6d" => !empty($snum) ? $snum : NULL, "\162\x65\163\x75\x6c\164\137\156\x75\x6d" => $this->input->post("\156\x75\x6d"), "\145\156\144\137\156\165\x6d" => !empty($enum) ? $enum : NULL); $this->db->where("\x6e\141\x6d\x65", $this->input->post("\x6e\x61\x6d\x65") and "\x64\x61\164\x65", $this->input->post("\144\141\164\145")); return $this->db->update("\143\x68\x61\x72\x74\163", $data); } public function add_chart_data() { $snum = $this->input->post("\163\156\x75\x6d"); $enum = $this->input->post("\145\156\x75\155"); $data = array("\x6e\x61\155\145" => $this->input->post("\x63\150\141\162\164"), "\x64\x61\164\x65" => $this->input->post("\x64\x61\164\145"), "\163\164\x61\x72\164\151\156\147\137\x6e\x75\x6d" => !empty($snum) ? $snum : NULL, "\x72\145\163\165\x6c\x74\x5f\156\x75\x6d" => $this->input->post("\156\165\x6d"), "\145\156\144\x5f\x6e\x75\155" => !empty($enum) ? $enum : NULL); return $this->db->insert("\x63\x68\x61\x72\x74\163", $data); } public function getUserDetails() { return $this->db->get("\x75\x73\145\x72\163")->result_array(); } public function getMatkaDetails() { return $this->db->get("\155\x61\164\x6b\141")->result_array(); } public function get_total_users() { return $this->db->get("\165\163\x65\x72\137\x70\x72\157\146\x69\154\145")->result_array(); } public function create_matka($team_image) { $snum = $this->input->post("\163\x6e\x75\155"); $enum = $this->input->post("\x65\x6e\165\155"); $name = $this->input->post("\x6e\x61\155\145"); $query = $this->db->get_where("\x6d\141\164\x6b\x61", array("\156\141\x6d\145" => $name)); $count = $query->num_rows(); if ($count === 0) { $data = array("\x6e\141\155\145" => $this->input->post("\x6e\x61\x6d\145"), "\163\x74\141\162\x74\137\164\151\x6d\x65" => $this->input->post("\x73\x74\x69\155\145"), "\145\156\x64\x5f\x74\151\x6d\x65" => $this->input->post("\x65\x74\151\155\x65"), "\163\164\x61\162\x74\151\x6e\147\137\156\x75\155" => !empty($snum) ? $snum : NULL, "\x6e\x75\x6d\142\x65\x72" => $this->input->post("\x6e\165\x6d"), "\x65\x6e\144\137\x6e\165\x6d" => !empty($enum) ? $enum : NULL, "\142\x69\144\137\x73\164\141\x72\164\137\164\x69\155\x65" => $this->input->post("\x66\x73\164\x69\x6d\145"), "\142\151\x64\x5f\x65\x6e\x64\x5f\164\x69\155\x65" => $this->input->post("\x66\x65\164\151\x6d\x65")); $data1 = array("\156\141\155\145" => $this->input->post("\156\141\155\x65"), "\x64\x61\164\x65" => date("\131\55\x6d\55\144"), "\x73\x74\141\x72\x74\151\x6e\147\137\156\x75\x6d" => $this->input->post("\x73\x6e\x75\x6d"), "\162\x65\x73\x75\154\164\137\156\x75\x6d" => $this->input->post("\x6e\165\x6d"), "\145\156\x64\x5f\x6e\165\x6d" => $this->input->post("\x65\156\165\155")); $this->session->set_flashdata("\x73\165\143\143\x65\163\x73", "\x59\157\x75\162\40\155\x61\x74\153\141\x20\x68\x61\x73\x20\x62\x65\x65\156\40\x63\x72\145\x61\x74\x65\144\56"); $this->db->insert("\x6d\x61\x74\153\141", $data); $this->db->insert("\x63\x68\141\162\x74\163", $data1); $ref = "\154\x69\x73\x74"; } else { $ref = "\141\144\x64"; $this->session->set_flashdata("\x66\141\151\x6c", "\x4e\x61\x6d\x65\40\x61\154\x72\x65\141\x64\171\x20\105\170\151\163\x74\40\x2e"); } return $ref; } public function listmatka($teamId = FALSE, $limit = FALSE, $offset = FALSE) { if ($limit) { $this->db->limit($limit, $offset); } if ($teamId === FALSE) { $this->db->order_by("\155\141\x74\x6b\x61\x2e\x69\x64", "\104\x45\123\103"); $query = $this->db->get("\155\141\164\153\x61"); return $query->result_array(); } $query = $this->db->get_where("\x6d\x61\x74\153\x61", array("\151\144" => $teamId)); return $query->row_array(); } public function memberlistteams($id) { $this->db->order_by("\155\141\x74\153\x61\56\151\x64", "\104\x45\123\103"); return $query->result_array(); } public function update_team_data() { $c = 0; $snum = $this->input->post("\x73\x6e\165\155"); $enum = $this->input->post("\145\x6e\165\155"); $num = $this->input->post("\156\165\155"); $id = $this->input->post("\151\x64"); $name = $this->input->post("\156\x61\x6d\x65"); $date = $this->input->post("\165\x64\141\x74\x65"); $data = array("\x6e\x61\155\145" => $name, "\x73\164\x61\x72\x74\137\x74\x69\x6d\x65" => $this->input->post("\163\164\x69\155\x65"), "\145\156\144\x5f\x74\151\x6d\145" => $this->input->post("\x65\x74\151\x6d\145"), "\163\x61\164\x5f\x73\164\141\162\x74\x5f\164\x69\x6d\145" => $this->input->post("\163\163\x74\x69\x6d\145"), "\163\141\x74\137\145\156\x64\x5f\164\151\155\145" => $this->input->post("\x73\145\164\151\155\x65"), "\x73\164\x61\x72\x74\x69\156\147\137\156\165\x6d" => !empty($snum) ? $snum : NULL, "\156\x75\155\142\145\162" => $this->input->post("\x6e\x75\155"), "\x65\x6e\x64\x5f\x6e\x75\x6d" => !empty($enum) ? $enum : NULL, "\x62\151\144\x5f\163\164\x61\162\x74\137\164\x69\155\x65" => $this->input->post("\x66\x73\164\151\155\145"), "\142\151\144\x5f\145\x6e\144\137\x74\x69\155\x65" => $this->input->post("\x66\x65\x74\151\155\145")); $this->db->where("\151\144", $id); $this->db->update("\155\141\164\x6b\141", $data); return $this->update_chart($id, $name, $snum, $num, $enum, $date); } public function update_chart($id, $name, $snum = null, $num = null, $enum = null, $date = null) { $dt = $date == null ? date("\x59\x2d\155\55\x64") : $date; $data1 = array("\156\x61\x6d\x65" => $name, "\x63\x69\x64" => $id, "\144\141\164\145" => $dt, "\163\x74\x61\x72\164\x69\156\x67\x5f\x6e\x75\155" => !empty($snum) ? $snum : NULL, "\162\x65\x73\165\x6c\x74\137\156\x75\155" => $num, "\x65\x6e\144\137\156\x75\155" => !empty($enum) ? $enum : NULL); $where = array("\143\151\144" => $id, "\144\141\x74\x65" => $dt); $data2 = $this->db->select("\103\117\125\116\124\x28\151\x64\51\40\141\x73\40\143\x6f\x75\156\164\x65\x72")->where($where)->get("\143\x68\141\x72\164\163")->row(); if ($data2->counter > 0) { $this->db->where($where); $this->db->update("\x63\x68\141\x72\164\163", $data1); } else { $this->db->insert("\x63\150\141\x72\x74\x73", $data1); } return true; } public function get_admin_data() { $id = $this->session->userdata("\165\163\145\162\137\x69\x64"); if ($id === FALSE) { $query = $this->db->get("\x75\x73\x65\162\x73"); return $query->result_array(); } $query = $this->db->get_where("\165\163\x65\x72\163", array("\x69\x64" => $id)); return $query->row_array(); } public function change_password($new_password) { $data = array("\160\141\163\163\167\x6f\x72\144" => md5($new_password)); $this->db->where("\x69\x64", $this->session->userdata("\x75\x73\x65\162\x5f\151\144")); return $this->db->update("\x75\x73\x65\x72\163", $data); } public function match_old_password($password) { $id = $this->session->userdata("\x75\163\145\162\x5f\151\x64"); if ($id === FALSE) { $query = $this->db->get("\x75\163\145\162\x73"); return $query->result_array(); } $query = $this->db->get_where("\x75\163\145\162\x73", array("\x70\141\163\163\167\157\162\144" => $password)); return $query->row_array(); } public function email_exists() { $email = $this->input->post("\145\x6d\x61\x69\154"); $query = $this->db->query("\123\105\x4c\x45\103\x54\x20\145\155\x61\151\154\54\40\x70\x61\163\x73\167\157\x72\144\40\x46\x52\x4f\115\40\165\163\145\162\163\40\x57\110\x45\x52\x45\x20\145\155\x61\x69\x6c\x3d\47{$email}\x27"); if ($row = $query->row()) { return TRUE; } else { return FALSE; } } public function temp_reset_password($temp_pass) { $data = array("\145\155\141\x69\154" => $this->input->post("\145\x6d\141\x69\x6c"), "\x72\x65\163\x65\164\x5f\x70\141\x73\x73" => $temp_pass); $email = $data["\x65\155\141\x69\154"]; if ($data) { $this->db->where("\x65\x6d\141\x69\x6c", $email); $this->db->update("\165\163\x65\162\x73", $data); return TRUE; } else { return FALSE; } } public function is_temp_pass_valid($temp_pass) { $this->db->where("\x72\145\x73\145\164\x5f\160\x61\x73\x73", $temp_pass); $query = $this->db->get("\x75\163\x65\162\163"); if ($query->num_rows() == 1) { return TRUE; } else { return FALSE; } } public function chats() { return $this->db->select("\x75\x73\145\162\x5f\x69\144")->where("\163\x74\x61\164\165\x73\41\75", "\x32")->group_by("\165\163\145\x72\137\151\x64")->get("\143\x68\x61\x74")->result(); } public function chat_detail($id) { return $this->db->where("\165\x73\x65\162\137\151\144", $id)->where("\163\x74\x61\x74\x75\163\x21\x3d", "\x32")->where("\146\x72\x6f\x6d", "\165\163\x65\162")->get("\143\150\141\x74")->result(); } public function adm_chat_detail($id) { return $this->db->where("\165\x73\145\x72\137\151\x64", $id)->where("\163\x74\x61\x74\x75\x73\x21\75", "\x32")->where("\x66\162\157\155", "\141\144\155\151\156")->get("\143\150\141\x74")->result(); } public function blockuser($id, $status) { $data = array("\151\163\x5f\x62\x6c\157\x63\153\x65\x64" => $status); $this->db->where("\x69\x64", $id); return $this->db->update("\165\163\x65\x72\137\160\x72\x6f\146\151\154\145", $data); } public function deletepackage($id) { $data = array("\x73\164\x61\x74\x75\163" => 2); $this->db->where("\x69\x64", $id); return $this->db->update("\x70\141\x63\153\x61\x67\x65", $data); } public function get_gamedata($postData, $from_date, $to_date) { $draw = $postData["\x64\162\141\x77"]; $start = $postData["\163\164\141\162\164"]; $rowperpage = $postData["\x6c\145\x6e\147\164\150"]; $searchValue = $postData["\163\145\141\x72\x63\150"]["\x76\x61\154\x75\x65"]; $from = date("\144\57\x6d\57\131", strtotime($from_date)); $to = date("\144\x2f\x6d\57\131", strtotime($to_date)); $this->db->select("\x75\x73\x65\162\137\160\x72\157\x66\151\x6c\145\x2e\x6e\141\155\145\54\164\142\154\x67\141\155\145\144\x61\x74\141\56\52\54\x6d\x61\x74\x6b\141\x2e\156\141\155\145")->join("\x75\163\x65\x72\x5f\160\x72\x6f\146\x69\154\145", "\165\163\x65\x72\137\x70\x72\157\146\151\154\145\56\x69\x64\x3d\x74\142\x6c\147\141\155\145\x64\141\164\x61\56\165\163\x65\162\137\x69\x64", "\x6c\x65\x66\164")->join("\155\141\164\x6b\x61", "\155\141\x74\x6b\x61\x2e\x69\x64\75\x74\x62\x6c\x67\x61\155\145\x64\141\164\x61\56\x6d\141\164\x6b\x61\137\x69\x64", "\154\x65\146\164")->where("\x74\142\154\147\141\x6d\145\144\141\x74\x61\x2e\x64\x61\164\x65\40\x3e\x3d", $from)->where("\x74\142\154\147\x61\155\145\x64\x61\x74\141\x2e\144\x61\164\x65\40\74\75", $to); $totalRecords = $this->db->get("\x74\142\x6c\x67\x61\x6d\145\144\x61\x74\141")->num_rows(); if (isset($searchValue)) { $this->db->group_start(); $this->db->like("\165\x73\145\162\x5f\160\162\157\x66\x69\154\x65\56\x6e\x61\155\145", $searchValue); $this->db->or_like("\x6d\141\164\x6b\141\56\156\x61\155\x65", $searchValue); $this->db->group_end(); } if ($rowperpage != -1) { $this->db->limit($rowperpage, $start); } $query = $this->db->select("\165\x73\x65\x72\x5f\x70\162\157\146\x69\x6c\145\56\156\x61\155\x65\x20\141\163\40\x75\x73\x65\162\156\x61\x6d\x65\x2c\164\x62\x6c\x67\141\155\145\x64\x61\164\141\56\x2a\54\x6d\x61\164\153\141\x2e\156\x61\x6d\x65\x20\x61\x73\x20\155\141\x74\x6b\x61\x6e\141\x6d\x65")->join("\x75\163\145\x72\137\x70\162\157\x66\151\x6c\145", "\x75\x73\145\162\137\x70\162\x6f\146\151\x6c\x65\56\x69\x64\75\164\x62\x6c\x67\x61\155\145\144\141\x74\141\56\165\x73\145\162\137\151\144", "\x6c\145\146\x74")->join("\x6d\x61\x74\153\x61", "\x6d\x61\x74\x6b\x61\x2e\151\144\75\x74\142\154\147\141\155\x65\144\141\164\x61\x2e\155\141\164\x6b\141\x5f\x69\x64", "\154\145\146\164"); $this->db->order_by("\x74\x62\154\147\141\155\145\x64\x61\164\141\x2e\x69\144", "\104\105\123\x43")->where("\164\142\x6c\147\x61\155\145\144\x61\164\141\x2e\144\x61\164\145\40\76\75", $from)->where("\x74\x62\x6c\x67\x61\155\145\x64\141\x74\x61\56\x64\x61\164\145\40\74\x3d", $to); $records = $query->get("\164\142\154\147\141\x6d\x65\x64\x61\164\141")->result(); $response = array(); $data = array(); $i = 1; foreach ($records as $record) { if ($record->status == "\154\157\x73\x73") { $class = "\144\x61\x6e\147\145\162"; $name = "\x4c\x6f\163\163"; } elseif ($record->status == "\160\x65\156\x64\151\156\x67") { $class = "\x77\141\x72\156\x69\x6e\147"; $name = "\x50\x65\156\144\151\x6e\x67"; } else { $class = "\163\165\x63\x63\x65\163\x73"; $name = "\127\x69\156"; } $data[] = array("\43" => $i, "\x75\163\145\162\156\141\155\x65" => $record->username, "\155\x61\164\x6b\141" => $record->matkaname, "\160\157\x69\156\x74" => $record->points, "\x62\145\x74\x5f\x74\x79\160\145" => $record->bet_type, "\x74\151\155\x65" => date("\x64\x2f\155\57\131\40\150\x3a\151\x3a\163\x20\x41", strtotime($record->time)), "\x64\151\x67\151\x74\163" => $record->digits, "\x73\x74\x61\164\165\163" => $record->status, "\141\143\164\x69\157\156" => "\x3c\x61\x20\150\162\145\x66\75\42" . base_url() . "\141\144\155\x69\x6e\57\144\145\154\x65\x74\x65\147\x61\x6d\145\x64\141\164\141\57" . $record->id . "\x22\40\x6f\156\143\154\x69\143\153\75\42\x63\157\x6e\x66\x69\162\155\50\x60\x61\162\x65\40\171\157\x75\40\x73\x75\162\x65\40\171\x6f\165\40\167\141\156\164\40\164\x6f\x20\144\x65\x6c\145\x74\x65\40\x74\x68\151\163\140\51\x22\x3e\74\142\x75\164\164\157\x6e\40\x63\154\x61\163\x73\75\42\x62\164\x6e\x20\x62\x74\x6e\x2d\144\141\156\147\x65\x72\x22\76\74\151\40\143\154\141\x73\163\x3d\42\x66\x61\x20\x66\141\x2d\x74\162\141\163\150\x22\x3e\x3c\57\151\76\x3c\57\x61\x3e"); $i++; } $response = array("\144\x72\141\x77" => intval($draw), "\x72\145\143\157\162\x64\x73\106\151\154\x74\x65\x72\145\144" => $searchValue == '' ? $totalRecords : count($records), "\162\145\x63\157\x72\x64\x73\124\x6f\164\141\154" => count($records), "\x64\141\x74\141" => $data); return $response; } public function get_add_point_req($postData = '') { $draw = $postData["\144\x72\x61\x77"]; $start = $postData["\x73\x74\141\x72\x74"]; $rowperpage = $postData["\154\145\x6e\x67\x74\150"]; $searchValue = $postData["\x73\145\x61\162\143\x68"]["\x76\141\154\165\145"]; $this->db->join("\x75\163\145\x72\137\160\x72\157\x66\151\x6c\145", "\165\163\145\162\x5f\x70\x72\157\x66\151\x6c\145\56\x69\x64\x3d\x74\x62\154\x52\x65\161\165\145\163\164\56\x75\x73\145\162\x5f\151\x64", "\154\145\x66\x74"); $totalRecords = $this->db->where("\164\142\154\122\145\x71\x75\x65\163\164\x2e\164\x79\160\145", "\101\144\144")->get("\164\142\154\122\145\x71\x75\x65\x73\x74")->num_rows(); if (isset($searchValue)) { $this->db->group_start(); $this->db->like("\165\163\145\162\137\x70\x72\157\146\x69\x6c\145\56\x6e\141\x6d\x65", $searchValue); $this->db->or_like("\x75\163\145\162\137\160\162\x6f\146\x69\x6c\x65\56\x75\163\x65\162\156\141\x6d\145", $searchValue); $this->db->or_like("\x75\163\145\x72\x5f\160\x72\x6f\146\x69\x6c\145\x2e\155\157\142\x69\154\145\156\x6f", $searchValue); $this->db->group_end(); } if ($rowperpage != -1) { $this->db->limit($rowperpage, $start); } $query = $this->db->select("\165\163\145\x72\x5f\x70\162\157\x66\151\154\145\x2e\x6e\x61\155\145\54\x75\163\x65\162\137\160\x72\x6f\146\x69\154\145\56\155\157\142\151\x6c\x65\x6e\157\x2c\164\142\154\x52\145\161\x75\145\163\x74\x2e\162\x65\x71\165\x65\x73\164\x5f\151\x64\54\161\162\x5f\x73\143\162\145\145\156\x73\150\157\x74\54\164\x62\154\122\x65\x71\x75\145\x73\164\x2e\x72\x65\161\165\x65\163\164\137\x70\157\151\156\164\163\x2c\x74\x62\x6c\122\x65\161\x75\145\x73\x74\x2e\x74\x69\x6d\x65\x2c\x74\x62\x6c\x52\x65\x71\165\x65\163\164\x2e\x72\x65\x71\165\145\163\x74\x5f\x73\164\141\164\165\x73")->join("\x75\163\x65\162\x5f\x70\162\157\146\x69\x6c\145", "\165\163\145\x72\137\x70\x72\x6f\x66\x69\154\145\56\151\x64\x3d\x74\142\x6c\x52\145\161\x75\x65\x73\x74\56\165\x73\145\162\137\x69\x64", "\x72\x69\147\x68\x74"); $records = $this->db->where("\164\x62\154\122\x65\161\165\145\163\164\x2e\164\171\160\145", "\101\144\x64")->order_by("\x74\142\154\x52\145\x71\165\145\x73\x74\x2e\162\145\x71\x75\145\163\x74\137\x69\144", "\104\105\x53\103")->get("\164\142\x6c\122\x65\161\x75\145\x73\164")->result(); $response = array(); $data = array(); foreach ($records as $record) { $approve_btn = "\x3c\141\40\157\x6e\x63\154\x69\143\153\x3d\42\162\145\x74\x75\162\156\x20\143\x6f\x6e\146\x69\162\x6d\50\140\101\x72\x65\40\x79\157\165\40\163\x75\162\x65\x20\164\x6f\x20\101\160\x70\x72\157\x76\x65\x3f\x60\x29\x22\x20\x68\x72\x65\146\75\x22" . base_url() . "\141\x64\x6d\151\x6e\x2f\141\144\144\137\x70\x6f\151\x6e\x74\137\162\145\x71\x32\57" . $record->request_id . "\42\76\x3c\x73\x70\141\156\40\143\154\x61\163\x73\x3d\42\x62\x61\144\x67\x65\x20\x62\141\144\x67\x65\55\163\x75\x63\x63\145\x73\163\42\x3e\x41\160\x70\x6f\162\x76\x65\74\57\163\x70\x61\x6e\x3e"; $reject_btn = "\x3c\141\x20\x6f\x6e\143\x6c\x69\x63\x6b\75\x22\x72\145\x74\x75\x72\156\40\x63\157\156\146\151\162\x6d\x28\140\x41\x72\145\40\171\157\x75\x20\163\x75\x72\x65\x20\x74\x6f\40\122\145\152\145\143\x74\x3f\x60\x29\x22\x20\x68\x72\145\146\x3d\42" . base_url() . "\x61\144\155\151\156\x2f\141\x64\144\x5f\160\157\x69\156\x74\x5f\162\x65\x71\x32\57" . $record->request_id . "\x2f\x63\141\x6e\x63\145\x6c\154\145\x64" . "\x22\76\x3c\x73\160\141\156\x20\x63\x6c\141\x73\x73\75\x22\x62\141\x64\x67\145\x20\142\x61\144\147\145\x2d\144\141\x6e\147\x65\162\x22\76\122\x65\152\x65\143\x74\74\57\163\160\x61\x6e\x3e"; $data[] = array("\x69\x64" => $record->request_id, "\x75\163\145\162\x69\144" => $record->name . "\50" . $record->mobileno . "\51", "\x72\145\161\x5f\x70\x6f\x69\x6e\164\x73" => $record->request_points, "\x73\143\x72\145\x65\156\x73\150\x6f\164" => $record->qr_screenshot != '' ? "\x3c\141\x20\x68\162\x65\146\x3d\x22" . base_url("\x2f\151\x6d\x67\57\121\x72\151\155\x61\x67\145\57" . $record->qr_screenshot) . "\42\x20\x74\141\x72\x67\145\x74\75\42\137\x62\x6c\141\156\153\42\76\40\x50\x72\x65\x76\x69\145\x77\x3c\x2f\141\x3e" : '', "\164\151\x6d\x65" => $record->time, "\163\164\x61\164\x75\163" => ucwords($record->request_status), "\x61\143\164\x69\x6f\156" => $record->request_status == "\x70\145\156\144\x69\156\147" ? $approve_btn . $reject_btn : ($record->request_status == "\x61\160\160\x72\x6f\x76\x65\144" ? "\x41\160\x70\x72\x6f\166\x65\144" : "\x52\145\152\145\x63\164\x65\144")); } $response = array("\144\162\x61\x77" => intval($draw), "\162\145\143\157\162\x64\x73\x46\x69\154\164\x65\162\x65\144" => $searchValue == '' ? $totalRecords : count($records), "\162\x65\143\157\x72\x64\163\x54\x6f\164\141\x6c" => count($records), "\x64\141\x74\141" => $data); return $response; } public function refer_history() { $query = $this->db->order_by("\x63\162\x65\141\x74\x65\144\x5f\x61\164", "\104\105\123\103")->get("\x72\x65\146\x65\x72\x5f\x68\151\x73\x74\157\162\171"); return $query->result_array(); } public function transfer_money_history() { $query = $this->db->order_by("\x63\162\145\x61\x74\145\x5f\x61\x74", "\104\x45\123\103")->get("\164\x62\x6c\164\x72\x61\156\x73\146\x65\162\x5f\162\x65\x71\165\x65\x73\164"); return $query->result_array(); } public function winning_transfer_history() { $query = $this->db->order_by("\x63\x72\145\141\x74\145\144\x5f\141\x74", "\x44\x45\x53\x43")->get("\x6d\141\x69\156\x5f\x74\157\137\167\x69\x6e\x5f\164\162\x61\x6e\163\146\x65\x72"); return $query->result_array(); } }
Function Calls
None |
Stats
MD5 | 187a0e47fcb13465cab1d46ab205fafb |
Eval Count | 0 |
Decode Time | 113 ms |