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 Admin extends CI_Controller { public function __construct() { parent::__cons..
Decoded Output download
<?php
class Admin extends CI_Controller { public function __construct() { parent::__construct(); $fun = $this->router->fetch_method(); if (!$this->session->userdata("login") && $fun != "app_bid_history" && $fun != "app_startline_bid_history") { redirect(site_url("admin/login")); } } public function index($page = "index") { if (!$this->session->userdata("login")) { redirect(site_url("admin/login")); } if (!file_exists(APPPATH . "views/admin1/" . $page . ".php")) { show_404(); } $data["users"] = $this->Administrator_Model->get_total_users(); $data["matkas"] = $this->Administrator_Model->getMatkaDetails(); $data["add_points_stat"] = $this->Administrator_Model->stastics("add_point"); $data["withdrawl_points_stat"] = $this->Administrator_Model->stastics("withdrawl_point"); $this->load->view("admin1/index", $data); } public function home($page = "home") { if (!file_exists(APPPATH . "views/administrator/" . $page . ".php")) { show_404(); } $data["title"] = ucfirst($page); $this->load->view("administrator/header-script"); $this->load->view("administrator/header"); $this->load->view("administrator/header-bottom"); $this->load->view("administrator/" . $page, $data); $this->load->view("administrator/footer"); } public function dashboard($page = "dashboard") { if (!file_exists(APPPATH . "views/administrator/" . $page . ".php")) { show_404(); } $data["title"] = ucfirst($page); $data["users"] = $this->Administrator_Model->getUserDetails(); $data["matkas"] = $this->Administrator_Model->getMatkaDetails(); $this->load->view("administrator/header-script"); $this->load->view("administrator/header"); $this->load->view("administrator/header-bottom"); $this->load->view("administrator/" . $page, $data); $this->load->view("administrator/footer"); } public function games() { $data["games"] = $this->Administrator_Model->games(); $this->load->view("admin1/games", $data); } public function gamedata_old() { $from = $this->input->get("from"); $to = $this->input->get("to"); $data["gamedata"] = $this->Administrator_Model->gamedata($from, $to); $this->load->view("admin1/gamedata", $data); } public function gamedata() { $this->load->view("admin1/gamedata_new", $data); } public function get_gamedata() { $postData = $this->input->post(); $from_date = $this->input->post("from") ?? date("d-m-Y"); $to_date = $this->input->post("to") ?? date("d-m-Y"); $data = $this->Administrator_Model->get_gamedata($postData, $from_date, $to_date); echo json_encode($data); } public function deletegamedata($id) { $this->Administrator_Model->deletegamedata($id); $this->session->set_flashdata("danger", "Login Credential in invalid!"); $this->session->set_flashdata("delete", "<div class="alert alert-success">Game data deleted successfully</div>"); redirect("admin1/gamedata"); } public function adminLogin() { $data["title"] = "Admin Login"; $this->form_validation->set_rules("username", "Username", "required"); $this->form_validation->set_rules("password", "Password", "required"); if ($this->form_validation->run() === FALSE) { $this->load->view("administrator/header-script"); $this->load->view("administrator/index", $data); $this->load->view("administrator/footer"); } else { $email = $this->input->post("username"); $encrypt_password = md5($this->input->post("password")); $user_id = $this->Administrator_Model->adminLogin($email, $encrypt_password); $sitelogo = $this->Administrator_Model->update_siteconfiguration(1); if ($user_id) { $user_data = array("user_id" => $user_id->id, "username" => $user_id->username, "email" => $user_id->email, "login" => true, "role" => $user_id->role_id, "image" => $user_id->image, "site_logo" => $sitelogo["logo_img"]); $this->session->set_userdata($user_data); $this->session->set_flashdata("success", "Welcome to administrator Dashboard."); redirect("administrator/dashboard"); } else { $this->session->set_flashdata("danger", "Login Credential in invalid!"); redirect("administrator/index"); } } } public function stastics($type = '') { echo $this->Administrator_Model->stastics($type); } public function app_setting() { if ($this->input->post("message") != '') { $this->Administrator_Model->update_appsetting(); } $data["setting"] = $this->Administrator_Model->app_setting(); $data["timeslot"] = $this->db->get("timeslots")->row() ?? ''; $this->load->view("admin1/app_setting", $data); } public function logout() { $this->session->unset_userdata("login"); $this->session->unset_userdata("user_id"); $this->session->unset_userdata("username"); $this->session->unset_userdata("role_id"); $this->session->unset_userdata("email"); $this->session->unset_userdata("image"); $this->session->unset_userdata("site_logo"); $this->session->set_flashdata("success", "You are logged out."); redirect(base_url() . "admin"); } public function forget_password($page = "forget-password") { if (!file_exists(APPPATH . "views/administrator/" . $page . ".php")) { show_404(); } $data["title"] = ucfirst($page); $this->load->view("administrator/header-script"); $this->load->view("administrator/" . $page, $data); $this->load->view("administrator/footer"); } public function add_user($page = "add-user") { if (!file_exists(APPPATH . "views/administrator/" . $page . ".php")) { show_404(); } if (!$this->session->userdata("login")) { redirect("admin/index"); } $data["title"] = "Create User"; $this->form_validation->set_rules("name", "Name", "required"); $this->form_validation->set_rules("username", "Username", "required|callback_check_username_exists"); $this->form_validation->set_rules("email", "Email", "required|callback_check_email_exists"); if ($this->form_validation->run() === FALSE) { $this->load->view("administrator/header-script"); $this->load->view("administrator/header"); $this->load->view("administrator/header-bottom"); $this->load->view("administrator/" . $page, $data); $this->load->view("administrator/footer"); } else { $config["upload_path"] = "./assets/images/users"; $config["allowed_types"] = "gif|jpg|png|jpeg"; $config["max_size"] = "2048"; $config["max_width"] = "2000"; $config["max_height"] = "2000"; $this->load->library("upload", $config); if (!$this->upload->do_upload()) { $errors = array("error" => $this->upload->display_errors()); $post_image = "noimage.jpg"; } else { $data = array("upload_data" => $this->upload->data()); $post_image = $_FILES["userfile"]["name"]; } $password = md5("password"); $this->Administrator_Model->add_user($post_image, $password); $this->session->set_flashdata("success", "User has been created Successfull."); redirect("administrator/users"); } } public function check_username_exists($username) { $this->form_validation->set_message("check_username_exists", "That username is already taken, Please choose a different one."); if ($this->User_Model->check_username_exists($username)) { return true; } else { return false; } } public function check_email_exists($email) { $this->form_validation->set_message("check_email_exists", "This email is already registered."); if ($this->User_Model->check_email_exists($email)) { return true; } else { return false; } } public function users($offset = 0) { $config["base_url"] = base_url() . "admin/view_users"; $config["total_rows"] = $this->db->count_all("users"); $config["per_page"] = 3; $config["uri_segment"] = 3; $config["attributes"] = array("class" => "paginate-link"); $this->pagination->initialize($config); $data["title"] = "Latest Users"; $data["users"] = $this->Administrator_Model->get_users(FALSE, $config["per_page"], $offset); $this->load->view("admin1/view_users", $data); } public function delete($id) { $table = base64_decode($this->input->get("table")); $this->Administrator_Model->delete($id, $table); $this->session->set_flashdata("success", "Data has been deleted Successfully."); header("Location: " . $_SERVER["HTTP_REFERER"]); } public function enable($id) { $table = base64_decode($this->input->get("table")); $this->Administrator_Model->enable($id, $table); $this->session->set_flashdata("success", "Disabled Successfully."); header("Location: " . $_SERVER["HTTP_REFERER"]); } public function desable($id) { $table = base64_decode($this->input->get("table")); $this->Administrator_Model->disable($id, $table); $this->session->set_flashdata("success", "Enabled Successfully."); header("Location: " . $_SERVER["HTTP_REFERER"]); } public function disable($id) { $table = base64_decode($this->input->get("table")); $this->Administrator_Model->disable($id, $table); $this->session->set_flashdata("success", "Enabled Successfully."); header("Location: " . $_SERVER["HTTP_REFERER"]); } public function update_user($id = NULL) { $data["user"] = $this->Administrator_Model->get_user($id); if (empty($data["user"])) { show_404(); } $data["title"] = "Update User"; $this->load->view("administrator/header-script"); $this->load->view("administrator/header"); $this->load->view("administrator/header-bottom"); $this->load->view("administrator/update-user", $data); $this->load->view("administrator/footer"); } public function update_user_data($page = "update-user") { if (!file_exists(APPPATH . "views/administrator/" . $page . ".php")) { show_404(); } if (!$this->session->userdata("login")) { redirect("administrator/index"); } $data["title"] = "Update User"; $this->form_validation->set_rules("name", "Name", "required"); if ($this->form_validation->run() === FALSE) { $this->load->view("administrator/header-script"); $this->load->view("administrator/header"); $this->load->view("administrator/header-bottom"); $this->load->view("administrator/" . $page, $data); $this->load->view("administrator/footer"); } else { $config["upload_path"] = "./assets/images/users"; $config["allowed_types"] = "gif|jpg|png|jpeg"; $config["max_size"] = "2048"; $config["max_width"] = "2000"; $config["max_height"] = "2000"; $this->load->library("upload", $config); if (!$this->upload->do_upload()) { $id = $this->input->post("id"); $data["img"] = $this->Administrator_Model->get_user($id); $errors = array("error" => $this->upload->display_errors()); $post_image = $data["img"]["image"]; } else { $data = array("upload_data" => $this->upload->data()); $post_image = $_FILES["userfile"]["name"]; } $this->Administrator_Model->update_user_data($post_image); $this->session->set_flashdata("success", "User has been Updated Successfull."); redirect("administrator/users"); } } public function check_sku_exists($sku) { $this->form_validation->set_message("check_sku_exists", "That SKU is already taken, Please choose a different one."); if ($this->Administrator_Model->check_sku_exists($sku)) { return true; } else { return false; } } public function create_slider($page = "add-slider") { if (!file_exists(APPPATH . "views/administrator/" . $page . ".php")) { show_404(); } if (!$this->session->userdata("login")) { redirect("administrator/index"); } $data["title"] = "Create Sliders Image"; $this->form_validation->set_rules("title", "Title", "required"); if (empty($_FILES["userfile"]["name"])) { $this->form_validation->set_rules("userfile", "Document", "required"); } if ($this->form_validation->run() === FALSE) { $this->load->view("administrator/header-script"); $this->load->view("administrator/header"); $this->load->view("administrator/header-bottom"); $this->load->view("administrator/" . $page, $data); $this->load->view("administrator/footer"); } else { $config["upload_path"] = "./assets/images/sliders"; $config["allowed_types"] = "gif|jpg|png|jpeg"; $config["max_size"] = "2048"; $config["max_width"] = "2000"; $config["max_height"] = "2000"; $this->load->library("upload", $config); if (!$this->upload->do_upload()) { $errors = array("error" => $this->upload->display_errors()); $post_image = "noimage.jpg"; } else { $data = array("upload_data" => $this->upload->data()); $post_image = $_FILES["userfile"]["name"]; } $this->Administrator_Model->create_slider($post_image); $this->session->set_flashdata("success", "Slider Image has been created Successfull."); redirect("administrator/sliders"); } } public function get_sliders() { $data["sliders"] = $this->Administrator_Model->get_sliders(); $data["title"] = "Sliders"; $this->load->view("administrator/header-script"); $this->load->view("administrator/header"); $this->load->view("administrator/header-bottom"); $this->load->view("administrator/sliders", $data); $this->load->view("administrator/footer"); } public function update_mobile() { $data["mob"] = $this->Administrator_Model->get_mobile_data(); $data["title"] = "Update Mobile"; $this->load->view("admin1/update-mobile", $data); } public function update_mobile_data($page = "update-mobile") { if (!file_exists(APPPATH . "views/admin1/" . $page . ".php")) { show_404(); } if (!$this->session->userdata("login")) { redirect("admin/index"); } $data["title"] = "Update Mobile"; $this->form_validation->set_rules("mobile", "Mobile No.", "required"); if ($this->form_validation->run() === FALSE) { $this->load->view("administrator/header-script"); $this->load->view("administrator/header"); $this->load->view("administrator/header-bottom"); $this->load->view("administrator/" . $page, $data); $this->load->view("administrator/footer"); } else { $this->Administrator_Model->update_mobile_data(); $this->session->set_flashdata("success", "Mobile No. has been Updated Successfull."); redirect("admin/update_mobile"); } } public function update_slider($id = NULL) { $data["sliders"] = $this->Administrator_Model->get_slider_data($id); $data["title"] = "Update Slider"; $this->load->view("administrator/header-script"); $this->load->view("administrator/header"); $this->load->view("administrator/header-bottom"); $this->load->view("administrator/update-slider", $data); $this->load->view("administrator/footer"); } public function update_slider_data($page = "update-slider") { if (!file_exists(APPPATH . "views/administrator/" . $page . ".php")) { show_404(); } if (!$this->session->userdata("login")) { redirect("administrator/index"); } $data["title"] = "Update Slider"; $this->form_validation->set_rules("title", "Title", "required"); if ($this->form_validation->run() === FALSE) { $this->load->view("administrator/header-script"); $this->load->view("administrator/header"); $this->load->view("administrator/header-bottom"); $this->load->view("administrator/" . $page, $data); $this->load->view("administrator/footer"); } else { $config["upload_path"] = "./assets/images/sliders"; $config["allowed_types"] = "gif|jpg|png|jpeg"; $config["max_size"] = "2048"; $config["max_width"] = "2000"; $config["max_height"] = "2000"; $this->load->library("upload", $config); if (!$this->upload->do_upload()) { $id = $this->input->post("id"); $data["img"] = $this->Administrator_Model->get_slider_data($id); $errors = array("error" => $this->upload->display_errors()); $post_image = $data["img"]["image"]; } else { $data = array("upload_data" => $this->upload->data()); $post_image = $_FILES["userfile"]["name"]; } $this->Administrator_Model->update_slider_data($post_image); $this->session->set_flashdata("success", "Slider Images has been Updated Successfull."); redirect("administrator/sliders"); } } public function view_chart() { $data = array(); $data["title"] = "Charts"; $data["charts"] = $this->Administrator_Model->getMatkaDetails(); $this->load->view("admin1/list_charts", $data); } public function add_chart() { $data["title"] = "Charts"; $data["charts"] = $this->Administrator_Model->getMatkaDetails(); $this->load->view("admin1/add_chart", $data); } public function edit_profile() { $this->load->view("admin1/edit-profile"); } public function chart_add() { if (!$this->session->userdata("login")) { redirect("admin/index"); } $matkaname = $this->input->post("chart"); $data = array(); $data["title"] = "Charts"; $name = $this->db->where("name", $matkaname)->get("matka")->row_array()["name"]; $data["transactions"] = $this->Administrator_Model->getChartDetails($name); $data["charts"] = $this->Administrator_Model->getChart(); $this->Administrator_Model->add_chart_data(); $this->session->set_flashdata("success", "Chart has been Added Successfully."); redirect("admin/add_chart"); } public function cpassword() { $this->load->view("admin/change-password"); } public function edit_chart($page = "charts_edit") { $data = array(); $data["yield"] = "administrator/charts_edit"; $data["title"] = "Charts"; $data["charts"] = $this->Administrator_Model->getMatkaDetails(); $this->load->view("administrator/header-script"); $this->load->view("administrator/header"); $this->load->view("administrator/header-bottom"); $this->load->view("administrator/" . $page, $data); $this->load->view("administrator/footer"); } public function chart_update() { if (!$this->session->userdata("login")) { redirect("admin/index"); } $matkaname = $this->input->post("chart"); $data = array(); $data["title"] = "Charts"; $name = $this->db->where("name", $matkaname)->get("matka")->row_array()["name"]; $data["transactions"] = $this->Administrator_Model->getChartDetails($name); $data["charts"] = $this->Administrator_Model->getChart(); $this->Administrator_Model->update_chart_data(); $this->session->set_flashdata("success", "Chart has been Updated Successfully."); redirect("admin/add_chart"); } public function chartshow($page = "chartshow") { $matkaname = $this->input->post("chart"); $name = $this->db->where("name", $matkaname)->get("matka")->row_array()["name"]; $data["transactions"] = $this->Administrator_Model->getChartDetails($name); if ($data["transactions"] == NULL) { echo "<p class="text-center text-warning">Sorry! No Information Found</p>"; } else { $this->load->view("admin1/chartshow", $data); } } public function chartupdate($page = "chartupdate") { $matkaname = $this->input->post("chart"); $name = $this->db->where("name", $matkaname)->get("matka")->row_array()["name"]; $data["transactions"] = $this->Administrator_Model->getChartDetails($name); $this->load->view("administrator/header-script"); $this->load->view("administrator/header"); $this->load->view("administrator/header-bottom"); $this->load->view("administrator/" . $page, $data); $this->load->view("administrator/footer"); } public function add_matka($page = "add-matka") { if (!$this->session->userdata("login")) { redirect("admin/index"); } $data["title"] = ''; $data["users"] = $this->Administrator_Model->getUserDetails(); $this->form_validation->set_rules("name", "Team Name", "required"); if ($this->form_validation->run() === FALSE) { $this->load->view("administrator/header-script"); $this->load->view("administrator/header"); $this->load->view("administrator/header-bottom"); $this->load->view("administrator/" . $page, $data); $this->load->view("administrator/footer"); } else { $config["upload_path"] = "./assets/images/teams"; $config["allowed_types"] = "gif|jpg|png|jpeg"; $config["max_size"] = "2048"; $config["max_width"] = "2000"; $config["max_height"] = "2000"; $this->load->library("upload", $config); if (!$this->upload->do_upload()) { $errors = array("error" => $this->upload->display_errors()); $team_image = "noimage.png"; } else { $data = array("upload_data" => $this->upload->data()); $team_image = $_FILES["userfile"]["name"]; } $ref = $this->Administrator_Model->create_matka($team_image); redirect("admin/matka/" . $ref); } } public function list_matka($offset = 0) { $config["base_url"] = base_url() . "administrator/matka/"; $config["total_rows"] = $this->db->count_all("matka"); $config["per_page"] = FALSE; $config["attributes"] = array("class" => "paginate-link"); $this->pagination->initialize($config); $data["title"] = "List of Live Updates"; $data["teams"] = $this->Administrator_Model->listmatka(FALSE, $config["per_page"], $offset); $this->load->view("admin1/matka", $data); } public function update_matka($teamId) { if (!$this->session->userdata("login")) { redirect("admin/index"); } $data["title"] = "Update Live Updates"; $data["users"] = $this->Administrator_Model->getUserDetails(); $data["team"] = $this->Administrator_Model->listmatka($teamId); $this->form_validation->set_rules("name", "Matka Name", "required"); if ($this->form_validation->run() === FALSE) { $this->load->view("admin1/update_matka", $data); } else { $this->Administrator_Model->update_team_data(); $id = $this->input->post("id"); $snum = $this->input->post("snum"); $enum = $this->input->post("enum"); $num = $this->input->post("num"); $udate = $this->input->post("udate"); $set_winner = false; $send_notifications = true; if ($send_notifications) { $message = $snum . "-" . $num; if ($enum != null) { $message .= "-" . $enum; } if ($snum != '' || $enum != '' || $num != '' || $snum != null || $enum != null) { send_notice($this->input->post("name"), $message); } } if ($set_winner) { $data = array("matka_id" => $id, "snum" => $snum, "num" => $num, "enum" => $enum); $closed = $enum ? "1" : 0; $this->Game_model->getWinner($data, $udate, $closed); } $this->session->set_flashdata("success", "Matka has been Updated Successfully."); redirect("admin/matka/list"); } } public function update_matka_point($id) { if (!$this->session->userdata("login")) { redirect("admin/index"); } $data["title"] = "Set Winner"; $data["users"] = $this->Administrator_Model->getUserDetails(); $data["team"] = $this->Administrator_Model->listmatka($id); $this->form_validation->set_rules("udate", "Set Date", "required"); if ($this->form_validation->run() === FALSE) { $this->load->view("admin1/set-winner", $data); } else { $matka = $data["team"]; $udate = $this->input->post("udate"); $setWinner = strtotime(date("Y-m-d")) - strtotime(date("Y-m-d", strtotime($matka["updated_at"]))); if ($setWinner != 0) { $this->session->set_flashdata("warning", "Matka not Updated. First update to set Winner."); redirect("administrator/matka/list"); } $data = array("matka_id" => $id, "snum" => $matka["starting_num"], "num" => $matka["number"], "enum" => $matka["end_num"]); $closed = strlen(""" . $matka["number"] . """) > 1 ? "1" : 0; $this->Game_model->getWinner($data, $udate, $closed); echo "<center><a class="btn btn-primary" href="" . site_url("admin/matka/list") . "">Go Back</a></center>"; $this->session->set_flashdata("success", "Matka Point distributed to all users."); } } public function starline() { $data["title"] = "starline "; $data["users"] = $this->Administrator_Model->starline(); $this->load->view("admin1/starline", $data); } public function starline_update($id) { $data["users"] = $this->Administrator_Model->starline_update($id); $this->load->view("admin1/starline_update", $data); } public function starline_update2($id) { if (!$this->session->userdata("login")) { redirect("admin/index"); } $data["title"] = "Update Starline"; $snum = trim($this->input->post("snum")); $w = $this->Administrator_Model->starline_update2($id); $snums = explode("-", $snum)[0]; $num = explode("-", $snum)[1]; $data = array("matka_id" => $id, "snum" => $snums, "num" => $num, "enum" => 0); $this->Game_model->getWinner($data); redirect("admin/starline"); } public function member_list_team($offset = 0) { $config["base_url"] = base_url() . "admin/matka/"; $config["total_rows"] = $this->db->count_all("matka"); $config["attributes"] = array("class" => "paginate-link"); $this->pagination->initialize($config); $id = $this->session->userdata("user_id"); $data["title"] = "List of Live Updates"; $data["teams"] = $this->Administrator_Model->memberlistteams($id); $this->load->view("admin1/matka", $data); } public function get_admin_data() { $data["changePassword"] = $this->Administrator_Model->get_admin_data(); $data["title"] = "Change Password"; $this->load->view("admin1/change-password", $data); } public function view_users_old() { $data["changePassword"] = $this->Administrator_Model->get_admin_data(); $data["title"] = "view "; $data["users"] = $this->Administrator_Model->get_user_profile(); $this->load->view("admin1/view_users", $data); } public function view_users() { $data["changePassword"] = $this->Administrator_Model->get_admin_data(); $data["title"] = "view "; if (isset($_POST["submitw"])) { $user_id = ''; if ($this->input->post("mobile")) { $user_id = $this->Administrator_Model->get_user_id($this->input->post("mobile")); $data["users"] = $this->Administrator_Model->get_user_profile($user_id); } $this->load->view("admin1/view_users_new", $data); } else { $this->load->view("admin1/view_users_selection", $data); } } public function view_users_ajax() { $data["changePassword"] = $this->Administrator_Model->get_admin_data(); $data["title"] = "view "; $user_id = ''; $table_value = $this->Administrator_Model->get_user_profile_ajax($user_id); $data["data"] = $table_value["data"]; $data["recordsFiltered"] = $table_value["recordsFiltered"]; $data["recordsTotal"] = $table_value["recordsTotal"]; $data["recordsTotal"] = $table_value["recordsTotal"]; echo json_encode($data); } public function view_users_old2() { $data["changePassword"] = $this->Administrator_Model->get_admin_data(); $data["title"] = "view "; if (isset($_POST["submitw"])) { $user_id = ''; if ($this->input->post("mobile")) { $user_id = $this->Administrator_Model->get_user_id($this->input->post("mobile")); } $data["users"] = $this->Administrator_Model->get_user_profile($user_id); $this->load->view("admin1/view_users", $data); } else { $this->load->view("admin1/view_users_selection", $data); } } public function deleteuser($id) { $this->Administrator_Model->deleteuser($id); $this->session->set_flashdata("delete", "<div class="alert alert-success">user data deleted successfully</div>"); redirect("admin/view_users"); } public function changepass($id) { $pass = $this->input->post("password"); if ($pass != '') { $this->Administrator_Model->changepass($id, $pass); } $this->session->set_flashdata("delete", "<div class="alert alert-success">User password changed successfully</div>"); redirect("admin/view_users"); } public function view_games($id = NULL) { $data["title"] = "view "; $data["matka_id"] = $id; $data["users"] = $this->Administrator_Model->get_games($id); $this->load->view("admin1/view_games", $data); } public function view_point_lists($id = NULL) { $data["title"] = "view "; $data["matka_id"] = $id; $from = $this->input->get("from"); $to = $this->input->get("to"); $data["users"] = $this->Administrator_Model->get_point_lists($id, $from, $to); $this->load->view("admin1/view_point_lists", $data); } public function view_user_games() { $matka_id = $this->input->get("matka_id"); $game_id = $this->input->get("game_id"); $data["title"] = "view "; $data["game_id"] = $game_id; $data["matka_id"] = $matka_id; $data["users"] = $this->Administrator_Model->get_user_games($game_id, $matka_id); $this->load->view("admin1/view_user_games", $data); } public function view_history() { $matka_id = $this->input->get("matka_id"); $game_id = $this->input->get("game_id"); $user_id = $this->input->get("user_id"); $from = $this->input->get("from"); $to = $this->input->get("to"); $data["title"] = "view "; $data["game_id"] = $game_id; $data["matka_id"] = $matka_id; $data["users"] = $this->Administrator_Model->get_history($user_id, $matka_id, $game_id, $from, $to); $this->load->view("admin1/view_game_history", $data); } public function app_bid_history() { $user_id = $this->input->get("user_id"); $data["title"] = "view "; $data["users"] = $this->Administrator_Model->get_bid_history($user_id); $this->load->view("admin1/app_bid_history", $data); } public function app_startline_bid_history() { $user_id = $this->input->get("user_id"); $data["title"] = "view "; $data["users"] = $this->Administrator_Model->get_bid_history($user_id); $this->load->view("admin1/app_bid_history", $data); } public function add_wallet() { $no = $this->input->post("no"); $wa = $this->input->post("wa"); $wallet = $this->input->post("wallet"); $data["users"] = $this->Administrator_Model->add_wallet($no); if (isset($data["users"])) { foreach ($data["users"] as $u) { $data["check"] = $this->Administrator_Model->check_wallet($u["id"]); $this->Administrator_Model->add_point_req_by_admin($wa, $u["id"], $wallet); if ($data["check"] == NULL) { $data["wal"] = $this->Administrator_Model->add_wallet3($u["id"], $wa, $wallet); if ($data["wal"] == TRUE) { $this->session->set_flashdata("point_st", "Points Added successfully."); } } else { $data["wal"] = $this->Administrator_Model->add_wallet2($u["id"], $wa, $wallet); if ($data["wal"] == TRUE) { $this->session->set_flashdata("point_st", "Points Added successfully."); } } } } $this->load->view("admin1/add_wallet"); } public function add_wallet2() { $no = $this->input->post("no"); $wa = $this->input->post("wa"); $data["users"] = $this->Administrator_Model->add_wallet($no); foreach ($data["users"] as $u) { $data["check"] = $this->Administrator_Model->check_wallet($u["id"]); $this->Administrator_Model->add_point_req_by_admin($wa, $u["id"]); if ($data["check"] == NULL) { $data["wal"] = $this->Administrator_Model->add_wallet3($u["id"], $wa); if ($data["wal"] == TRUE) { $this->session->set_flashdata("point_st", "Points Added successfully."); } } else { $data["wal"] = $this->Administrator_Model->add_wallet2($u["id"], $wa); if ($data["wal"] == TRUE) { $this->session->set_flashdata("point_st", "Points Added successfully."); } } } redirect("admin/add_wallet"); } public function notify() { $message = $this->input->post("noti"); $d = $this->Administrator_Model->notify($message); if ($d) { send_notice("Notifications", $message); $this->session->set_flashdata("notice_st", "Notifications send successfully."); } $this->load->view("admin1/add_notification"); } public function add_point_req_old() { sleep(5); $data["title"] = "view "; $data["users"] = $this->Administrator_Model->add_point_req(); $this->load->view("admin1/add_point_req", $data); } public function add_point_req() { $data["title"] = "view "; $this->load->view("admin1/add_point_req2", $data); } public function get_add_point_req() { ini_set("memory_limit", "-1"); $postData = $this->input->post(); $data = $this->Administrator_Model->get_add_point_req($postData); echo json_encode($data); } public function add_point_req2($req_id = NULL, $type = "approved") { $req = $this->Administrator_Model->add_point_req2($req_id, $type); $data["title"] = "view "; foreach ($req as $r) { $user_id = $r["user_id"]; $points = $r["request_points"]; $t = $this->Administrator_Model->add_pending_point_req($user_id, $points); } if ($t || $type != "approved") { redirect("admin/add_point_req"); } } public function failed_payment_req() { $data["requests"] = $this->Administrator_Model->failed_payment_req(); $this->load->view("admin1/failed_payment_req", $data); } public function approve_req($id) { $rdet = $this->db->select("amount,user_id")->where("id", $id)->get("raise_tickets")->row(); $amt = $rdet->amount; $uid = $rdet->user_id; $query = $this->db->query("\x9UPDATE tblwallet set main_wallet_points=main_wallet_points+'{$amt}' where user_id='{$uid}' "); $query1 = $this->db->query(" UPDATE raise_tickets set status=1 where id='{$id}' "); $type = "Add"; $insert_query = array("request_points" => $amt, "user_id" => $uid, "type" => $type, "request_status" => "approved"); $query2 = $this->db->insert("tblRequest", $insert_query); if ($query && $query1) { $this->session->set_flashdata("success", "Request Approved Successfully."); } else { $this->session->set_flashdata("fail", "Request for approval failed."); } redirect("admin/failed_payment_req"); } public function reject_req($id) { $query = $this->db->query(" UPDATE raise_tickets set status=2 where id='{$id}' "); if ($query) { $this->session->set_flashdata("success", "Request Rejected Successfully."); } else { $this->session->set_flashdata("fail", "Request for rejection failed."); } redirect("admin/failed_payment_req"); } public function withdraw_point_req() { $data["requests"] = $this->Administrator_Model->withdraw_point_req(); $this->load->view("admin1/withdraw_point_req", $data); } public function withdraw_point_req2($id = NULL) { if ($id == NULL) { return false; } $req = $this->Administrator_Model->withdraw_point_req2($id); $data["title"] = "view "; $t = FALSE; if (isset($req)) { $user_id = $req["user_id"]; $points = -$req["request_points"]; $t = $this->Administrator_Model->withdraw_point_req3($user_id, $points); } if ($t) { $this->session->set_flashdata("point_st", "Withdraw request completed."); } redirect("admin/withdraw_point_req"); } public function withdraw_point_cancel($id = NULL) { if ($id == NULL) { return false; } $req = $this->Administrator_Model->withdraw_point_cancel($id); $data["title"] = "view "; if ($req) { $this->session->set_flashdata("point_st", "Withdraw request cancelled."); } redirect("admin/withdraw_point_req"); } public function change_password($page = "change-password") { if (!file_exists(APPPATH . "views/admin1/" . $page . ".php")) { show_404(); } if (!$this->session->userdata("login")) { redirect("admin/index"); } $data["title"] = "Change password"; $this->form_validation->set_rules("old_password", "Old Password", "required|callback_match_old_password"); $this->form_validation->set_rules("new_password", "New Password Field", "required"); $this->form_validation->set_rules("confirm_new_password", "Confirm New Password", "matches[new_password]"); if ($this->form_validation->run() === FALSE) { $this->load->view("admin1/" . $page, $data); } else { $this->Administrator_Model->change_password($this->input->post("new_password")); $this->session->set_flashdata("success", "Password Has Been Changed Successfull."); redirect("admin/change-password"); } } public function match_old_password($old_password) { $this->form_validation->set_message("match_old_password", "Current Password Does not matched, Please Try Again."); $password = md5($old_password); $que = $this->Administrator_Model->match_old_password($password); if ($que) { return true; } else { return false; } } public function update_admin_profile() { $data["user"] = $this->Administrator_Model->get_admin_data(); $data["title"] = "Update Profile"; $this->load->view("admin1/update-profile", $data); } public function update_admin_profile_data($page = "update-profile") { if (!file_exists(APPPATH . "views/admin1/" . $page . ".php")) { show_404(); } if (!$this->session->userdata("login")) { redirect("admin/index"); } $data["title"] = "Update Profile"; $this->form_validation->set_rules("name", "Name", "required"); if ($this->form_validation->run() === FALSE) { $this->load->view("admin1/" . $page, $data); } else { $config["upload_path"] = "./assets/images/users"; $config["allowed_types"] = "gif|jpg|png|jpeg"; $config["max_size"] = "2048"; $config["max_width"] = "2000"; $config["max_height"] = "2000"; $this->load->library("upload", $config); if (!$this->upload->do_upload()) { $id = $this->input->post("id"); $data["img"] = $this->Administrator_Model->get_user($id); $errors = array("error" => $this->upload->display_errors()); $post_image = $data["img"]["image"]; } else { $data = array("upload_data" => $this->upload->data()); $post_image = $_FILES["userfile"]["name"]; } $this->Administrator_Model->update_user_data($post_image); $this->session->set_flashdata("success", "User has been Updated Successfull."); redirect("admin/update-profile"); } } public function forget_password_mail() { $this->load->library("form_validation"); $this->form_validation->set_rules("email", "Email", "required|trim|xss_clean|callback_validate_credentials"); $this->load->model("Administrator_Model"); if ($this->Administrator_Model->email_exists()) { $temp_pass = md5(uniqid()); $this->load->library("email", array("mailtype" => "html")); $this->email->from("[email protected]", "Site"); $this->email->to($this->input->post("email")); $this->email->subject("Reset your Password"); $message = "<p>This email has been sent as a request to reset our password</p>"; $message .= "<p><a href='" . base_url() . "administrator/reset-password/{$temp_pass}'>Click here </a>if you want to reset your password,\xa if not, then ignore</p>"; $this->email->message($message); if ($this->email->send()) { $this->load->model("Administrator_Model"); if ($this->Administrator_Model->temp_reset_password($temp_pass)) { echo "check your email for instructions, thank you"; } } else { echo "email was not sent, please contact your administrator"; } } else { echo "your email is not in our database"; } } public function reset_password($temp_pass) { $this->load->model("Administrator_Model"); if ($this->Administrator_Model->is_temp_pass_valid($temp_pass)) { $this->load->view("reset-password"); } else { echo "the key is not valid"; } } public function update_password() { $this->load->library("form_validation"); $this->form_validation->set_rules("password", "Password", "required|trim"); $this->form_validation->set_rules("cpassword", "Confirm Password", "required|trim|matches[password]"); if ($this->form_validation->run()) { echo "passwords match"; } else { echo "passwords do not match"; } } public function login() { $this->load->view("admin1/login"); } public function forgot_password() { $this->load->view("admin1/forgot_password"); } public function profile() { $this->load->view("admin1/profile"); } public function chats() { $data["chats"] = $this->Administrator_Model->chats(); $this->load->view("admin1/chats", $data); } public function view_chats($id = NULL) { if ($id == NULL) { return false; } $data["chats"] = $this->Administrator_Model->chat_detail($id); $data["uid"] = $id; $this->load->view("admin1/view_chats", $data); } public function reply_chat() { if (isset($_POST["reply_chat"])) { $id = $this->input->post("user"); $data["adm_chats"] = $this->Administrator_Model->adm_chat_detail($id); $data["uid"] = $id; $this->load->view("admin1/reply_chat", $data); } } public function admin_reply() { if (isset($_POST["admin_reply"])) { $type = $this->input->post("type"); $user_id = $this->input->post("user_id"); $from = "admin"; if ($type == "image") { if (isset($_FILES["image"]) && $_FILES["image"]["size"] > 0) { $config["upload_path"] = "./img/chats/"; $config["allowed_types"] = "gif|jpg|png|jpeg"; $config["encrypt_name"] = TRUE; $this->load->library("upload", $config); if (!$this->upload->do_upload("image")) { $data["responce"] = false; $data["error"] = "Error! : " . $this->upload->display_errors(); } else { $img_data = $this->upload->data(); $img_name = $img_data["file_name"]; $this->load->model("Common_model"); $q = $this->db->insert("chat", array("user_id" => $user_id, "message" => $img_data["file_name"], "from" => $from, "type" => $type)); } } } else { if ($type == "text") { $message = $this->input->post("message"); $q = $this->db->insert("chat", array("user_id" => $user_id, "message" => $message, "from" => $from, "type" => $type)); } } $this->session->set_flashdata("point_st", "Message Sent Successfully."); redirect("admin/view_chats/" . $user_id); } } public function delete_chats($id) { $arr = array("status" => "2"); $this->db->where("user_id", $id); $this->db->update("chat", $arr); redirect("admin/chats"); } public function blockuser($id, $status) { $this->Administrator_Model->blockuser($id, $status); if ($status == 1) { $this->session->set_flashdata("block", "<div class="alert alert-success">User blocked successfully.</div>"); } else { $this->session->set_flashdata("block", "<div class="alert alert-success">User unblocked successfully.</div>"); } redirect(site_url("admin/view_users")); } public function packages() { $data["packages"] = $this->db->where("status!=", "2")->get("package")->result(); $this->load->view("admin1/packages", $data); } public function deletepackage($id) { $this->Administrator_Model->deletepackage($id); $this->session->set_flashdata("delete", "<div class="alert alert-success">Package deleted successfully</div>"); redirect(site_url("admin/packages")); } public function add_package() { if (isset($_POST["submit_pack"])) { $arr = array("name" => $this->input->post("name"), "amount" => $this->input->post("amount"), "cashback" => $this->input->post("cashback")); $q = $this->db->insert("package", $arr); if ($q) { $this->session->set_flashdata("succ_pack", "<div class="alert alert-success">Package added successfully</div>"); redirect(site_url("admin/packages")); } else { $this->session->set_flashdata("fail_pack", "<div class="alert alert-danger">Something Went Wrong.</div>"); redirect(site_url("admin/add_package")); } } $data["title"] = "Add Package "; $this->load->view("admin1/add_package", $data); } public function refer_history() { $data["history"] = $this->Administrator_Model->refer_history(); $this->load->view("admin1/refer_history", $data); } public function transfer_money_history() { $data["history"] = $this->Administrator_Model->transfer_money_history(); $this->load->view("admin1/transfer_money_history", $data); } public function winning_transfer_history() { $data["history"] = $this->Administrator_Model->winning_transfer_history(); $this->load->view("admin1/winning_transfer_history", $data); } public function register() { if ($this->input->post("submit")) { $this->load->library("form_validation"); $this->form_validation->set_rules("mobile_no", "Mobile Number", "required|regex_match[/^[5-9][0-9]{9}$/]"); $this->form_validation->set_rules("username", "username", "required|trim"); $this->form_validation->set_rules("name", "name", "required|trim"); $this->form_validation->set_rules("mpin", "mpin", "required|trim"); $this->form_validation->set_rules("password", "Password", "required|trim"); if ($this->form_validation->run() == FALSE) { $error_msg = validation_errors(); $this->session->set_flashdata("error", $error_msg); return redirect($_SERVER["HTTP_REFERER"]); } else { $post = $this->input->post(); $check_mobile = $this->db->where("mobileno", $post["mobile_no"])->get("user_profile")->num_rows(); $check_refer = $this->db->where("user_reference_code", $post["refer_code"])->get("user_profile")->num_rows(); if ($check_mobile > 0) { $this->session->set_flashdata("error", "<div class="alert alert-danger">Mobile number already register</div>"); return redirect($_SERVER["HTTP_REFERER"]); } elseif ($check_refer == 0) { $this->session->set_flashdata("error", "<div class="alert alert-danger">Refer code not found</div>"); return redirect($_SERVER["HTTP_REFERER"]); } else { $this->load->model("user_model"); $inset = array("name" => $post["name"], "username" => $post["username"], "mobileno" => $post["mobile_no"], "password" => $post["password"], "mid" => $post["mpin"], "reffered_code" => $post["refer_code"] != '' ? $post["refer_code"] : ''); $inset["user_reference_code"] = $this->user_model->isExistingUserRef(); $this->db->insert("user_profile", $inset); $user_id = $this->db->insert_id(); $this->db->insert("tblwallet", array("user_id" => (int) $user_id, "wallet_points" => 0, "main_wallet_points" => 0)); $this->session->set_flashdata("success", "<div class="alert alert-danger">User inserted</div>"); return redirect($_SERVER["HTTP_REFERER"]); } } } $this->load->view("admin1/register", $data); } }?>
Did this file decode correctly?
Original Code
<?php
class Admin extends CI_Controller { public function __construct() { parent::__construct(); $fun = $this->router->fetch_method(); if (!$this->session->userdata("\x6c\157\x67\151\x6e") && $fun != "\x61\x70\160\x5f\142\x69\x64\x5f\x68\x69\x73\x74\x6f\x72\171" && $fun != "\x61\160\160\x5f\x73\164\x61\162\164\154\151\x6e\145\137\142\x69\144\137\150\x69\163\164\157\162\171") { redirect(site_url("\141\144\155\151\156\x2f\154\157\147\151\x6e")); } } public function index($page = "\151\x6e\x64\145\170") { if (!$this->session->userdata("\154\157\x67\x69\x6e")) { redirect(site_url("\141\x64\x6d\151\156\x2f\154\157\x67\151\x6e")); } if (!file_exists(APPPATH . "\x76\x69\x65\x77\x73\57\x61\144\155\x69\156\61\x2f" . $page . "\56\x70\x68\160")) { show_404(); } $data["\165\x73\x65\x72\163"] = $this->Administrator_Model->get_total_users(); $data["\x6d\141\x74\x6b\x61\x73"] = $this->Administrator_Model->getMatkaDetails(); $data["\141\144\x64\x5f\160\x6f\151\x6e\164\x73\137\x73\x74\x61\164"] = $this->Administrator_Model->stastics("\x61\144\144\x5f\x70\157\x69\156\x74"); $data["\167\151\164\x68\x64\x72\x61\x77\154\x5f\x70\157\x69\x6e\x74\x73\137\x73\164\141\x74"] = $this->Administrator_Model->stastics("\167\151\164\150\144\x72\141\167\x6c\137\160\157\x69\156\x74"); $this->load->view("\x61\144\x6d\x69\156\61\x2f\151\156\x64\x65\x78", $data); } public function home($page = "\150\x6f\155\x65") { if (!file_exists(APPPATH . "\166\x69\145\167\x73\57\x61\x64\155\x69\x6e\x69\163\x74\x72\x61\164\157\x72\57" . $page . "\x2e\x70\150\160")) { show_404(); } $data["\164\x69\x74\x6c\x65"] = ucfirst($page); $this->load->view("\141\x64\155\x69\x6e\x69\163\164\x72\141\164\x6f\x72\x2f\x68\145\141\144\x65\162\x2d\163\x63\162\x69\x70\x74"); $this->load->view("\x61\x64\x6d\x69\x6e\x69\163\x74\162\141\164\157\x72\x2f\x68\x65\x61\x64\x65\x72"); $this->load->view("\x61\x64\155\x69\156\151\163\x74\162\141\164\157\x72\x2f\150\145\141\x64\x65\x72\55\142\x6f\x74\x74\x6f\155"); $this->load->view("\141\x64\155\151\x6e\x69\163\x74\162\x61\x74\157\162\x2f" . $page, $data); $this->load->view("\141\144\155\x69\x6e\151\163\x74\162\x61\x74\157\x72\x2f\x66\157\x6f\x74\x65\162"); } public function dashboard($page = "\144\141\163\x68\142\157\x61\162\144") { if (!file_exists(APPPATH . "\166\x69\145\167\163\57\x61\x64\x6d\x69\156\x69\x73\x74\x72\141\164\x6f\162\57" . $page . "\56\x70\150\160")) { show_404(); } $data["\164\x69\x74\154\x65"] = ucfirst($page); $data["\165\x73\x65\x72\163"] = $this->Administrator_Model->getUserDetails(); $data["\155\x61\164\x6b\x61\x73"] = $this->Administrator_Model->getMatkaDetails(); $this->load->view("\x61\x64\155\x69\156\x69\163\164\162\x61\x74\x6f\162\x2f\x68\x65\x61\144\145\162\x2d\x73\x63\x72\x69\x70\164"); $this->load->view("\x61\x64\155\151\x6e\x69\x73\x74\x72\141\x74\x6f\x72\x2f\x68\145\x61\x64\x65\162"); $this->load->view("\x61\x64\155\x69\x6e\x69\x73\164\162\x61\x74\x6f\x72\x2f\x68\145\x61\144\145\x72\55\142\157\164\x74\x6f\155"); $this->load->view("\x61\x64\155\151\x6e\x69\x73\164\x72\x61\x74\157\162\x2f" . $page, $data); $this->load->view("\141\x64\155\151\x6e\151\x73\x74\x72\x61\164\157\162\x2f\146\157\157\164\145\162"); } public function games() { $data["\147\x61\x6d\x65\163"] = $this->Administrator_Model->games(); $this->load->view("\x61\x64\x6d\x69\156\61\57\x67\141\x6d\145\163", $data); } public function gamedata_old() { $from = $this->input->get("\x66\162\x6f\x6d"); $to = $this->input->get("\164\x6f"); $data["\x67\141\155\145\x64\141\x74\141"] = $this->Administrator_Model->gamedata($from, $to); $this->load->view("\x61\x64\155\x69\156\61\x2f\147\141\155\145\x64\x61\164\x61", $data); } public function gamedata() { $this->load->view("\x61\144\155\151\156\x31\x2f\147\141\155\x65\144\x61\x74\x61\x5f\x6e\x65\167", $data); } public function get_gamedata() { $postData = $this->input->post(); $from_date = $this->input->post("\x66\x72\x6f\x6d") ?? date("\144\55\x6d\55\131"); $to_date = $this->input->post("\x74\157") ?? date("\144\x2d\155\55\x59"); $data = $this->Administrator_Model->get_gamedata($postData, $from_date, $to_date); echo json_encode($data); } public function deletegamedata($id) { $this->Administrator_Model->deletegamedata($id); $this->session->set_flashdata("\144\x61\x6e\147\145\162", "\114\157\147\x69\x6e\40\x43\162\145\144\145\x6e\164\x69\141\x6c\x20\x69\x6e\40\x69\x6e\x76\x61\154\x69\x64\41"); $this->session->set_flashdata("\144\x65\154\x65\x74\145", "\74\144\x69\x76\x20\143\x6c\141\163\163\x3d\x22\x61\x6c\x65\x72\164\x20\141\154\x65\162\164\x2d\x73\x75\143\x63\145\x73\163\x22\x3e\x47\x61\155\145\40\x64\141\x74\x61\40\144\145\154\x65\164\x65\x64\40\163\x75\143\143\x65\163\163\x66\x75\x6c\154\171\74\x2f\144\151\166\x3e"); redirect("\x61\x64\155\151\x6e\x31\57\x67\x61\x6d\145\144\x61\164\x61"); } public function adminLogin() { $data["\x74\151\x74\x6c\145"] = "\101\x64\155\x69\x6e\40\114\157\x67\x69\156"; $this->form_validation->set_rules("\165\x73\x65\162\x6e\x61\x6d\145", "\125\163\145\162\x6e\x61\x6d\x65", "\162\x65\161\x75\151\x72\x65\x64"); $this->form_validation->set_rules("\x70\x61\x73\x73\167\157\x72\144", "\120\x61\x73\x73\167\x6f\162\x64", "\162\x65\161\165\151\162\x65\144"); if ($this->form_validation->run() === FALSE) { $this->load->view("\x61\144\155\151\x6e\x69\x73\164\162\141\164\157\162\57\x68\x65\141\144\x65\x72\55\x73\143\162\151\x70\164"); $this->load->view("\x61\144\155\x69\x6e\x69\163\164\x72\141\164\157\x72\x2f\x69\x6e\x64\145\170", $data); $this->load->view("\x61\x64\x6d\x69\x6e\151\x73\x74\x72\141\164\157\162\x2f\146\157\157\164\145\x72"); } else { $email = $this->input->post("\x75\163\145\x72\156\x61\155\145"); $encrypt_password = md5($this->input->post("\160\141\163\163\x77\x6f\x72\x64")); $user_id = $this->Administrator_Model->adminLogin($email, $encrypt_password); $sitelogo = $this->Administrator_Model->update_siteconfiguration(1); if ($user_id) { $user_data = array("\165\163\145\x72\137\151\x64" => $user_id->id, "\x75\x73\x65\x72\156\141\x6d\x65" => $user_id->username, "\145\x6d\x61\151\154" => $user_id->email, "\x6c\157\x67\151\x6e" => true, "\x72\x6f\x6c\x65" => $user_id->role_id, "\151\155\x61\x67\x65" => $user_id->image, "\x73\x69\164\145\137\x6c\157\x67\x6f" => $sitelogo["\x6c\157\x67\157\137\151\x6d\x67"]); $this->session->set_userdata($user_data); $this->session->set_flashdata("\163\165\143\x63\x65\163\x73", "\x57\145\154\x63\157\x6d\x65\40\x74\x6f\40\141\144\155\x69\x6e\151\163\164\x72\141\x74\x6f\162\x20\104\141\163\x68\142\x6f\141\162\x64\56"); redirect("\141\144\155\x69\x6e\151\163\x74\x72\x61\x74\x6f\x72\x2f\x64\141\x73\150\x62\x6f\x61\x72\144"); } else { $this->session->set_flashdata("\144\x61\156\147\x65\162", "\114\157\x67\x69\x6e\x20\103\162\x65\x64\x65\x6e\164\151\141\154\40\151\x6e\x20\151\x6e\x76\x61\154\x69\144\x21"); redirect("\x61\x64\x6d\151\x6e\151\163\164\162\141\x74\157\162\x2f\x69\x6e\x64\x65\x78"); } } } public function stastics($type = '') { echo $this->Administrator_Model->stastics($type); } public function app_setting() { if ($this->input->post("\x6d\x65\x73\163\x61\147\x65") != '') { $this->Administrator_Model->update_appsetting(); } $data["\163\x65\x74\164\151\x6e\147"] = $this->Administrator_Model->app_setting(); $data["\x74\151\155\x65\163\154\157\x74"] = $this->db->get("\x74\151\155\145\163\154\157\164\x73")->row() ?? ''; $this->load->view("\141\x64\155\x69\156\61\x2f\x61\x70\160\x5f\x73\x65\164\x74\151\156\x67", $data); } public function logout() { $this->session->unset_userdata("\x6c\x6f\x67\x69\156"); $this->session->unset_userdata("\165\x73\145\x72\137\151\144"); $this->session->unset_userdata("\x75\x73\145\x72\x6e\141\155\x65"); $this->session->unset_userdata("\162\x6f\x6c\145\x5f\151\x64"); $this->session->unset_userdata("\145\155\x61\151\x6c"); $this->session->unset_userdata("\151\155\x61\x67\x65"); $this->session->unset_userdata("\163\151\164\145\x5f\154\157\x67\157"); $this->session->set_flashdata("\163\x75\143\x63\x65\163\x73", "\x59\157\x75\x20\x61\162\145\40\154\157\147\x67\145\144\40\157\x75\x74\56"); redirect(base_url() . "\141\144\155\151\156"); } public function forget_password($page = "\x66\x6f\x72\x67\x65\x74\x2d\160\141\163\x73\167\157\162\144") { if (!file_exists(APPPATH . "\x76\151\x65\167\x73\x2f\141\144\x6d\x69\x6e\151\x73\x74\162\x61\x74\x6f\162\57" . $page . "\x2e\x70\150\x70")) { show_404(); } $data["\x74\x69\164\x6c\x65"] = ucfirst($page); $this->load->view("\x61\x64\155\x69\x6e\151\163\164\162\x61\164\x6f\162\57\150\145\x61\x64\145\162\55\163\143\x72\x69\160\164"); $this->load->view("\141\x64\x6d\151\156\x69\163\164\x72\x61\164\x6f\x72\57" . $page, $data); $this->load->view("\x61\144\155\151\156\x69\x73\164\162\x61\x74\157\x72\x2f\x66\157\157\164\145\x72"); } public function add_user($page = "\x61\x64\x64\x2d\165\163\x65\x72") { if (!file_exists(APPPATH . "\x76\151\145\167\163\x2f\x61\x64\155\151\156\x69\163\164\x72\x61\x74\x6f\162\57" . $page . "\56\160\150\x70")) { show_404(); } if (!$this->session->userdata("\x6c\x6f\147\151\x6e")) { redirect("\141\x64\x6d\x69\x6e\57\x69\156\x64\145\x78"); } $data["\x74\x69\164\x6c\145"] = "\x43\162\x65\x61\x74\145\x20\x55\163\x65\162"; $this->form_validation->set_rules("\x6e\141\x6d\x65", "\116\141\155\x65", "\x72\x65\161\165\151\x72\x65\144"); $this->form_validation->set_rules("\x75\x73\x65\x72\x6e\141\155\145", "\125\x73\x65\x72\x6e\141\155\x65", "\162\x65\161\165\151\x72\145\x64\x7c\143\x61\154\x6c\142\141\143\x6b\137\143\x68\x65\143\153\137\165\163\x65\162\x6e\x61\155\145\137\145\170\x69\163\164\x73"); $this->form_validation->set_rules("\145\x6d\141\x69\x6c", "\105\155\x61\151\x6c", "\x72\x65\161\x75\151\162\x65\144\174\x63\x61\154\x6c\142\141\x63\153\x5f\143\150\145\x63\153\137\x65\x6d\141\151\154\137\x65\170\151\x73\x74\163"); if ($this->form_validation->run() === FALSE) { $this->load->view("\x61\144\155\151\x6e\151\x73\164\x72\x61\164\x6f\162\x2f\150\145\x61\144\145\x72\x2d\163\x63\162\x69\x70\164"); $this->load->view("\x61\144\x6d\x69\x6e\x69\x73\164\162\141\164\157\x72\x2f\150\145\x61\144\x65\162"); $this->load->view("\141\144\x6d\x69\x6e\151\x73\x74\x72\x61\164\157\162\57\150\145\141\144\145\162\55\142\x6f\164\x74\157\x6d"); $this->load->view("\141\144\x6d\151\156\151\x73\x74\162\141\x74\157\x72\57" . $page, $data); $this->load->view("\141\x64\x6d\x69\156\x69\163\164\162\141\x74\x6f\162\57\146\x6f\x6f\164\x65\x72"); } else { $config["\x75\160\x6c\x6f\x61\x64\x5f\160\x61\164\x68"] = "\x2e\57\x61\x73\x73\145\164\x73\x2f\x69\x6d\x61\x67\145\x73\57\165\x73\x65\x72\163"; $config["\141\154\x6c\x6f\x77\145\144\x5f\164\x79\160\145\163"] = "\147\151\146\174\152\160\x67\174\x70\x6e\x67\174\152\160\145\x67"; $config["\155\141\x78\137\163\151\x7a\x65"] = "\62\x30\x34\x38"; $config["\x6d\141\x78\137\x77\x69\144\164\150"] = "\x32\60\60\x30"; $config["\x6d\x61\x78\137\x68\x65\151\x67\x68\164"] = "\x32\60\x30\x30"; $this->load->library("\x75\160\154\157\x61\x64", $config); if (!$this->upload->do_upload()) { $errors = array("\145\x72\162\157\x72" => $this->upload->display_errors()); $post_image = "\x6e\157\x69\155\141\x67\145\56\x6a\160\147"; } else { $data = array("\165\x70\x6c\x6f\x61\x64\137\x64\x61\x74\141" => $this->upload->data()); $post_image = $_FILES["\x75\x73\145\162\x66\x69\154\x65"]["\156\x61\x6d\x65"]; } $password = md5("\x70\141\163\163\x77\x6f\x72\144"); $this->Administrator_Model->add_user($post_image, $password); $this->session->set_flashdata("\x73\165\143\x63\x65\x73\163", "\x55\163\145\162\x20\x68\141\x73\40\142\x65\x65\x6e\x20\x63\x72\x65\x61\164\145\144\40\123\x75\x63\x63\145\163\x73\x66\165\154\154\56"); redirect("\141\144\x6d\151\x6e\x69\163\x74\162\x61\x74\157\162\x2f\x75\x73\145\x72\163"); } } public function check_username_exists($username) { $this->form_validation->set_message("\143\x68\x65\x63\x6b\137\165\163\x65\x72\156\x61\x6d\145\137\145\170\x69\x73\164\163", "\124\150\x61\x74\x20\x75\x73\x65\162\x6e\141\x6d\x65\x20\x69\163\40\x61\154\162\145\x61\144\171\40\x74\x61\x6b\145\x6e\x2c\40\120\154\x65\x61\x73\145\x20\x63\x68\157\157\163\x65\40\141\x20\144\151\146\x66\145\x72\145\x6e\164\x20\157\156\x65\x2e"); if ($this->User_Model->check_username_exists($username)) { return true; } else { return false; } } public function check_email_exists($email) { $this->form_validation->set_message("\x63\x68\145\x63\153\137\145\x6d\141\x69\154\x5f\145\x78\151\x73\x74\163", "\124\x68\151\163\40\x65\155\x61\151\x6c\x20\x69\x73\x20\x61\x6c\162\145\x61\144\x79\40\162\145\147\x69\163\164\145\x72\145\144\x2e"); if ($this->User_Model->check_email_exists($email)) { return true; } else { return false; } } public function users($offset = 0) { $config["\142\x61\163\x65\x5f\165\162\154"] = base_url() . "\141\x64\x6d\x69\x6e\57\166\x69\145\167\137\165\x73\145\x72\x73"; $config["\x74\x6f\164\x61\154\137\x72\157\x77\163"] = $this->db->count_all("\x75\163\x65\x72\x73"); $config["\160\145\162\x5f\x70\x61\x67\x65"] = 3; $config["\x75\162\x69\137\x73\x65\147\x6d\x65\156\164"] = 3; $config["\x61\x74\x74\162\151\142\165\x74\145\x73"] = array("\143\154\141\163\x73" => "\x70\141\x67\x69\x6e\141\x74\145\x2d\x6c\x69\x6e\153"); $this->pagination->initialize($config); $data["\164\151\164\x6c\x65"] = "\x4c\x61\164\x65\x73\164\x20\125\x73\x65\x72\163"; $data["\165\x73\145\162\x73"] = $this->Administrator_Model->get_users(FALSE, $config["\x70\145\x72\x5f\x70\141\x67\145"], $offset); $this->load->view("\x61\x64\x6d\x69\x6e\x31\x2f\166\x69\x65\x77\x5f\x75\163\x65\162\x73", $data); } public function delete($id) { $table = base64_decode($this->input->get("\164\141\x62\154\x65")); $this->Administrator_Model->delete($id, $table); $this->session->set_flashdata("\163\x75\143\x63\x65\x73\x73", "\x44\141\164\141\40\150\141\163\x20\142\145\x65\x6e\40\x64\145\154\145\164\x65\x64\x20\x53\165\143\x63\x65\x73\x73\x66\x75\x6c\154\x79\x2e"); header("\x4c\x6f\x63\x61\164\x69\157\156\x3a\x20" . $_SERVER["\110\x54\124\120\x5f\x52\x45\106\x45\x52\x45\x52"]); } public function enable($id) { $table = base64_decode($this->input->get("\164\x61\142\154\x65")); $this->Administrator_Model->enable($id, $table); $this->session->set_flashdata("\163\165\143\143\x65\x73\163", "\104\151\x73\x61\x62\x6c\x65\144\40\123\x75\143\143\145\163\163\x66\165\x6c\154\171\x2e"); header("\x4c\157\x63\x61\x74\x69\157\x6e\x3a\x20" . $_SERVER["\110\124\124\x50\137\x52\105\106\x45\122\x45\122"]); } public function desable($id) { $table = base64_decode($this->input->get("\x74\141\142\154\145")); $this->Administrator_Model->disable($id, $table); $this->session->set_flashdata("\x73\x75\143\143\145\x73\163", "\105\x6e\x61\142\x6c\145\144\x20\x53\165\x63\143\x65\163\x73\x66\165\154\154\171\x2e"); header("\x4c\157\143\x61\x74\x69\157\156\x3a\x20" . $_SERVER["\110\x54\124\120\137\x52\x45\x46\x45\122\x45\x52"]); } public function disable($id) { $table = base64_decode($this->input->get("\164\141\142\x6c\x65")); $this->Administrator_Model->disable($id, $table); $this->session->set_flashdata("\x73\165\143\143\x65\x73\x73", "\105\156\x61\x62\154\x65\x64\x20\123\165\143\x63\145\163\163\146\x75\154\154\171\x2e"); header("\x4c\157\x63\x61\x74\x69\157\156\72\x20" . $_SERVER["\x48\124\x54\120\137\122\105\106\105\122\x45\122"]); } public function update_user($id = NULL) { $data["\x75\x73\x65\162"] = $this->Administrator_Model->get_user($id); if (empty($data["\x75\x73\145\x72"])) { show_404(); } $data["\x74\151\164\154\x65"] = "\125\160\x64\141\164\x65\x20\x55\x73\x65\162"; $this->load->view("\x61\144\x6d\151\156\x69\163\x74\x72\x61\164\x6f\x72\57\150\145\141\144\x65\x72\x2d\x73\x63\x72\151\160\x74"); $this->load->view("\x61\x64\x6d\x69\x6e\151\x73\x74\162\141\x74\157\x72\57\150\145\141\144\145\x72"); $this->load->view("\x61\144\x6d\x69\x6e\x69\x73\164\x72\141\164\157\x72\x2f\150\x65\141\144\x65\x72\x2d\142\157\x74\164\x6f\155"); $this->load->view("\141\x64\x6d\151\x6e\151\163\x74\x72\141\164\157\x72\x2f\x75\x70\x64\x61\x74\145\55\x75\x73\145\x72", $data); $this->load->view("\141\x64\x6d\151\x6e\x69\x73\x74\162\141\164\157\162\x2f\x66\157\x6f\164\x65\162"); } public function update_user_data($page = "\165\160\x64\x61\164\145\x2d\165\163\x65\x72") { if (!file_exists(APPPATH . "\x76\x69\x65\x77\x73\x2f\141\144\155\151\156\151\x73\x74\x72\141\x74\157\x72\57" . $page . "\56\x70\150\x70")) { show_404(); } if (!$this->session->userdata("\x6c\x6f\x67\151\x6e")) { redirect("\141\144\x6d\151\156\151\163\x74\162\x61\x74\157\x72\x2f\151\156\x64\145\170"); } $data["\x74\x69\x74\154\145"] = "\x55\160\x64\x61\164\145\40\125\163\145\x72"; $this->form_validation->set_rules("\156\141\155\x65", "\x4e\141\155\x65", "\x72\145\161\x75\x69\x72\145\x64"); if ($this->form_validation->run() === FALSE) { $this->load->view("\x61\x64\155\151\156\x69\x73\164\x72\141\x74\157\162\x2f\150\x65\141\x64\x65\162\55\x73\x63\162\151\x70\164"); $this->load->view("\141\144\x6d\151\x6e\x69\x73\164\x72\141\164\x6f\x72\57\x68\x65\141\x64\145\162"); $this->load->view("\141\x64\155\151\x6e\151\163\x74\162\141\x74\x6f\x72\x2f\150\x65\x61\144\x65\x72\55\142\x6f\x74\164\157\155"); $this->load->view("\141\144\x6d\151\x6e\x69\163\x74\x72\x61\x74\x6f\x72\57" . $page, $data); $this->load->view("\x61\144\155\x69\156\x69\x73\164\x72\141\x74\x6f\162\57\x66\x6f\157\x74\145\x72"); } else { $config["\x75\160\x6c\x6f\141\144\x5f\x70\x61\x74\150"] = "\56\x2f\x61\x73\x73\x65\164\163\57\151\x6d\x61\147\x65\x73\x2f\x75\163\145\x72\x73"; $config["\141\x6c\x6c\157\x77\145\x64\137\164\x79\160\x65\163"] = "\147\x69\146\x7c\x6a\160\x67\x7c\x70\x6e\x67\x7c\x6a\x70\145\147"; $config["\x6d\141\x78\137\x73\151\x7a\145"] = "\62\60\64\70"; $config["\x6d\x61\x78\137\167\x69\144\x74\150"] = "\x32\x30\x30\60"; $config["\155\141\x78\x5f\150\145\151\x67\150\x74"] = "\62\60\60\60"; $this->load->library("\165\x70\x6c\157\141\x64", $config); if (!$this->upload->do_upload()) { $id = $this->input->post("\151\x64"); $data["\151\155\x67"] = $this->Administrator_Model->get_user($id); $errors = array("\145\x72\x72\157\x72" => $this->upload->display_errors()); $post_image = $data["\151\155\x67"]["\151\x6d\x61\147\x65"]; } else { $data = array("\165\x70\154\x6f\x61\144\137\144\x61\164\x61" => $this->upload->data()); $post_image = $_FILES["\165\163\145\x72\x66\151\154\x65"]["\156\141\x6d\145"]; } $this->Administrator_Model->update_user_data($post_image); $this->session->set_flashdata("\163\165\x63\143\145\163\x73", "\125\163\145\162\x20\x68\141\163\40\142\x65\x65\x6e\x20\x55\160\144\x61\164\x65\144\x20\x53\165\x63\143\x65\x73\x73\x66\x75\154\154\x2e"); redirect("\x61\x64\x6d\151\x6e\151\x73\x74\162\x61\164\x6f\162\x2f\x75\163\x65\x72\x73"); } } public function check_sku_exists($sku) { $this->form_validation->set_message("\143\150\x65\x63\x6b\x5f\x73\153\x75\137\x65\x78\x69\163\x74\x73", "\124\x68\x61\x74\x20\123\x4b\125\x20\x69\x73\40\x61\x6c\162\x65\x61\x64\171\x20\x74\141\x6b\x65\x6e\54\40\120\154\145\141\163\145\x20\143\x68\157\157\x73\x65\40\141\x20\144\x69\146\x66\145\x72\x65\156\164\x20\x6f\156\x65\x2e"); if ($this->Administrator_Model->check_sku_exists($sku)) { return true; } else { return false; } } public function create_slider($page = "\141\144\x64\55\x73\x6c\151\144\x65\162") { if (!file_exists(APPPATH . "\x76\151\145\167\163\57\x61\x64\155\x69\x6e\151\x73\164\162\x61\x74\157\x72\57" . $page . "\56\x70\x68\160")) { show_404(); } if (!$this->session->userdata("\x6c\157\x67\x69\x6e")) { redirect("\141\144\x6d\151\x6e\x69\x73\164\162\141\x74\157\162\x2f\x69\156\144\x65\x78"); } $data["\x74\151\x74\154\x65"] = "\x43\x72\145\x61\x74\145\x20\123\x6c\x69\144\145\162\x73\x20\111\155\x61\x67\x65"; $this->form_validation->set_rules("\164\151\164\x6c\145", "\x54\151\x74\154\145", "\162\145\x71\165\151\162\x65\144"); if (empty($_FILES["\x75\x73\145\162\x66\x69\x6c\145"]["\156\x61\155\x65"])) { $this->form_validation->set_rules("\x75\163\x65\162\x66\x69\x6c\145", "\104\157\x63\165\155\x65\156\164", "\x72\x65\x71\x75\151\162\145\144"); } if ($this->form_validation->run() === FALSE) { $this->load->view("\141\x64\x6d\x69\156\151\x73\164\x72\x61\164\x6f\x72\x2f\x68\145\141\x64\x65\162\x2d\x73\x63\162\x69\x70\164"); $this->load->view("\x61\x64\155\x69\x6e\x69\x73\164\162\x61\164\x6f\x72\x2f\x68\x65\x61\144\x65\x72"); $this->load->view("\141\144\x6d\x69\x6e\151\163\164\162\x61\164\x6f\x72\x2f\150\145\141\x64\145\162\x2d\x62\157\164\164\x6f\155"); $this->load->view("\x61\x64\155\x69\156\x69\163\x74\x72\141\164\x6f\162\57" . $page, $data); $this->load->view("\x61\x64\155\x69\156\x69\x73\164\x72\x61\x74\157\x72\57\146\x6f\157\x74\145\x72"); } else { $config["\165\160\x6c\x6f\141\x64\x5f\160\x61\164\150"] = "\56\57\x61\163\163\145\x74\163\x2f\151\155\141\147\145\163\57\x73\x6c\x69\144\x65\x72\x73"; $config["\141\x6c\154\157\x77\x65\144\137\164\x79\160\145\x73"] = "\147\x69\146\174\x6a\160\x67\174\160\156\147\x7c\152\160\145\x67"; $config["\155\141\x78\x5f\163\x69\172\x65"] = "\62\x30\x34\70"; $config["\155\141\x78\x5f\x77\x69\x64\164\x68"] = "\62\x30\60\60"; $config["\155\141\x78\x5f\150\145\x69\x67\x68\x74"] = "\x32\60\60\x30"; $this->load->library("\x75\x70\154\x6f\x61\x64", $config); if (!$this->upload->do_upload()) { $errors = array("\145\x72\162\x6f\x72" => $this->upload->display_errors()); $post_image = "\156\157\x69\155\141\x67\145\56\x6a\160\x67"; } else { $data = array("\165\160\x6c\157\141\144\x5f\x64\141\164\x61" => $this->upload->data()); $post_image = $_FILES["\x75\163\145\x72\x66\x69\x6c\x65"]["\x6e\x61\155\x65"]; } $this->Administrator_Model->create_slider($post_image); $this->session->set_flashdata("\163\165\x63\143\x65\x73\x73", "\x53\154\x69\144\x65\162\x20\x49\x6d\141\x67\x65\x20\150\141\x73\40\142\x65\145\x6e\x20\143\162\x65\x61\x74\145\x64\x20\123\165\x63\x63\x65\x73\x73\x66\165\154\154\56"); redirect("\141\x64\155\151\x6e\x69\x73\164\x72\141\164\157\162\x2f\x73\154\x69\144\x65\162\x73"); } } public function get_sliders() { $data["\x73\x6c\x69\x64\x65\162\x73"] = $this->Administrator_Model->get_sliders(); $data["\164\x69\x74\x6c\145"] = "\123\154\151\144\145\162\x73"; $this->load->view("\141\144\155\151\x6e\x69\x73\x74\162\141\x74\x6f\162\x2f\150\x65\x61\144\145\x72\55\x73\x63\x72\151\x70\164"); $this->load->view("\x61\x64\155\x69\x6e\x69\x73\164\x72\141\x74\157\162\57\x68\145\141\x64\145\162"); $this->load->view("\x61\144\x6d\151\156\151\x73\x74\x72\141\x74\157\x72\x2f\150\145\141\144\145\x72\55\x62\157\164\x74\157\x6d"); $this->load->view("\141\x64\x6d\151\x6e\x69\163\164\x72\x61\x74\157\x72\x2f\163\154\151\x64\145\x72\163", $data); $this->load->view("\x61\144\x6d\x69\156\x69\163\x74\162\141\164\x6f\162\x2f\146\x6f\157\x74\x65\x72"); } public function update_mobile() { $data["\x6d\x6f\x62"] = $this->Administrator_Model->get_mobile_data(); $data["\x74\151\164\x6c\145"] = "\125\x70\144\141\164\145\40\x4d\x6f\142\151\154\x65"; $this->load->view("\141\144\x6d\x69\x6e\x31\57\165\160\x64\x61\164\x65\55\x6d\x6f\x62\x69\x6c\x65", $data); } public function update_mobile_data($page = "\165\160\x64\x61\164\x65\55\155\x6f\x62\151\154\x65") { if (!file_exists(APPPATH . "\166\x69\145\x77\163\57\x61\x64\155\151\x6e\x31\x2f" . $page . "\56\160\150\x70")) { show_404(); } if (!$this->session->userdata("\154\x6f\x67\x69\156")) { redirect("\x61\x64\155\151\156\57\x69\156\144\145\170"); } $data["\x74\x69\x74\x6c\x65"] = "\125\160\x64\141\164\x65\x20\115\157\x62\151\154\145"; $this->form_validation->set_rules("\155\157\142\151\154\145", "\115\x6f\x62\x69\x6c\x65\40\116\x6f\56", "\x72\x65\x71\x75\x69\x72\x65\144"); if ($this->form_validation->run() === FALSE) { $this->load->view("\141\144\155\151\156\x69\163\164\162\x61\x74\157\162\57\x68\145\141\144\145\x72\x2d\163\x63\x72\x69\x70\164"); $this->load->view("\141\x64\x6d\151\156\151\163\x74\162\141\x74\x6f\x72\x2f\150\x65\141\x64\145\x72"); $this->load->view("\141\144\155\x69\156\151\x73\x74\x72\141\164\x6f\162\57\150\x65\x61\144\x65\x72\55\x62\x6f\164\x74\157\155"); $this->load->view("\141\x64\x6d\151\156\x69\x73\164\162\x61\x74\x6f\162\57" . $page, $data); $this->load->view("\141\144\155\151\x6e\x69\163\x74\162\x61\164\x6f\162\x2f\146\157\157\x74\x65\162"); } else { $this->Administrator_Model->update_mobile_data(); $this->session->set_flashdata("\x73\x75\x63\x63\x65\x73\163", "\115\x6f\142\x69\154\x65\x20\x4e\x6f\56\x20\150\x61\x73\40\x62\145\x65\x6e\40\x55\160\x64\x61\x74\145\x64\x20\123\x75\x63\x63\x65\x73\x73\x66\165\x6c\154\56"); redirect("\141\144\x6d\151\x6e\x2f\165\x70\144\x61\164\145\137\155\157\x62\x69\154\145"); } } public function update_slider($id = NULL) { $data["\x73\154\x69\x64\x65\x72\x73"] = $this->Administrator_Model->get_slider_data($id); $data["\164\x69\x74\154\145"] = "\x55\x70\144\x61\x74\x65\40\x53\154\x69\x64\x65\162"; $this->load->view("\141\144\155\151\156\151\163\x74\x72\x61\164\157\162\57\150\x65\x61\x64\x65\162\55\163\143\162\x69\x70\164"); $this->load->view("\141\x64\x6d\151\x6e\151\x73\164\162\x61\164\157\162\x2f\x68\x65\141\x64\x65\x72"); $this->load->view("\141\144\155\151\x6e\x69\x73\x74\162\x61\164\x6f\x72\57\150\145\x61\144\145\162\x2d\x62\x6f\x74\164\157\155"); $this->load->view("\x61\x64\x6d\151\156\151\x73\x74\x72\141\x74\x6f\162\x2f\165\160\144\141\164\x65\x2d\x73\154\x69\x64\145\x72", $data); $this->load->view("\141\x64\x6d\x69\156\151\163\x74\162\141\x74\157\x72\x2f\x66\157\x6f\x74\x65\x72"); } public function update_slider_data($page = "\x75\x70\144\141\164\x65\55\x73\154\x69\144\x65\x72") { if (!file_exists(APPPATH . "\x76\x69\x65\x77\163\57\x61\x64\x6d\151\x6e\x69\x73\164\162\x61\164\x6f\x72\x2f" . $page . "\x2e\x70\x68\160")) { show_404(); } if (!$this->session->userdata("\154\x6f\x67\151\156")) { redirect("\141\144\155\151\156\151\x73\x74\162\x61\164\x6f\x72\x2f\151\x6e\x64\x65\x78"); } $data["\x74\151\x74\154\x65"] = "\x55\x70\x64\141\164\x65\x20\123\154\151\144\145\x72"; $this->form_validation->set_rules("\164\151\164\x6c\x65", "\x54\151\164\154\145", "\162\145\x71\165\151\x72\x65\x64"); if ($this->form_validation->run() === FALSE) { $this->load->view("\x61\144\x6d\151\x6e\151\163\x74\162\141\164\157\x72\57\150\145\141\144\x65\x72\55\x73\x63\162\x69\x70\164"); $this->load->view("\141\x64\x6d\151\x6e\151\163\164\x72\141\164\157\x72\57\150\x65\x61\144\145\x72"); $this->load->view("\141\144\155\x69\156\x69\163\x74\x72\x61\164\157\162\x2f\x68\145\x61\x64\145\x72\x2d\142\x6f\x74\164\x6f\x6d"); $this->load->view("\141\x64\x6d\x69\156\151\163\164\x72\x61\x74\157\162\x2f" . $page, $data); $this->load->view("\x61\144\155\x69\x6e\151\x73\164\162\x61\164\x6f\162\57\146\157\157\x74\145\162"); } else { $config["\165\x70\x6c\157\141\x64\x5f\160\141\x74\x68"] = "\x2e\57\141\x73\x73\145\x74\163\x2f\151\155\141\x67\145\163\x2f\x73\x6c\151\144\145\162\163"; $config["\x61\x6c\x6c\157\167\x65\144\x5f\164\171\160\145\163"] = "\x67\151\x66\174\152\160\x67\x7c\160\156\x67\174\x6a\160\x65\147"; $config["\x6d\141\170\137\163\x69\172\145"] = "\x32\60\x34\x38"; $config["\x6d\x61\x78\137\167\151\144\164\x68"] = "\62\60\x30\60"; $config["\x6d\x61\170\x5f\x68\145\151\x67\x68\x74"] = "\x32\x30\x30\60"; $this->load->library("\165\160\x6c\x6f\141\x64", $config); if (!$this->upload->do_upload()) { $id = $this->input->post("\x69\x64"); $data["\151\155\x67"] = $this->Administrator_Model->get_slider_data($id); $errors = array("\x65\162\162\x6f\162" => $this->upload->display_errors()); $post_image = $data["\151\155\147"]["\151\155\x61\147\x65"]; } else { $data = array("\x75\x70\x6c\x6f\141\x64\137\x64\x61\164\141" => $this->upload->data()); $post_image = $_FILES["\165\163\x65\x72\146\151\154\x65"]["\156\x61\155\145"]; } $this->Administrator_Model->update_slider_data($post_image); $this->session->set_flashdata("\163\x75\x63\x63\145\163\163", "\123\x6c\x69\x64\x65\x72\40\x49\155\x61\x67\145\163\x20\150\x61\x73\x20\142\145\x65\x6e\x20\x55\160\x64\141\164\145\x64\40\x53\x75\x63\x63\145\x73\x73\x66\165\154\x6c\56"); redirect("\141\144\155\151\x6e\151\163\x74\162\141\164\157\162\x2f\163\154\x69\144\145\162\x73"); } } public function view_chart() { $data = array(); $data["\x74\151\x74\x6c\x65"] = "\103\x68\141\162\x74\x73"; $data["\x63\x68\141\x72\164\163"] = $this->Administrator_Model->getMatkaDetails(); $this->load->view("\x61\144\x6d\x69\156\x31\x2f\x6c\151\x73\x74\137\143\150\141\x72\x74\x73", $data); } public function add_chart() { $data["\164\x69\x74\154\x65"] = "\103\150\141\162\x74\x73"; $data["\143\150\141\162\164\x73"] = $this->Administrator_Model->getMatkaDetails(); $this->load->view("\x61\144\x6d\x69\156\x31\57\141\x64\144\137\143\150\x61\x72\164", $data); } public function edit_profile() { $this->load->view("\x61\144\x6d\151\156\x31\x2f\145\144\151\x74\x2d\160\162\157\x66\151\154\x65"); } public function chart_add() { if (!$this->session->userdata("\x6c\x6f\x67\151\156")) { redirect("\x61\x64\x6d\x69\156\x2f\x69\x6e\x64\x65\170"); } $matkaname = $this->input->post("\143\x68\141\162\x74"); $data = array(); $data["\164\151\164\x6c\145"] = "\103\150\141\162\164\x73"; $name = $this->db->where("\156\141\x6d\145", $matkaname)->get("\x6d\141\164\153\x61")->row_array()["\x6e\141\155\x65"]; $data["\164\x72\x61\156\x73\141\x63\164\x69\x6f\x6e\x73"] = $this->Administrator_Model->getChartDetails($name); $data["\143\x68\141\162\164\x73"] = $this->Administrator_Model->getChart(); $this->Administrator_Model->add_chart_data(); $this->session->set_flashdata("\163\165\x63\x63\x65\163\x73", "\x43\x68\x61\162\x74\x20\x68\x61\x73\x20\142\145\145\x6e\x20\x41\144\x64\x65\x64\40\123\165\x63\143\145\x73\163\146\165\154\x6c\x79\56"); redirect("\x61\144\x6d\151\x6e\57\141\x64\x64\x5f\x63\x68\x61\162\x74"); } public function cpassword() { $this->load->view("\141\144\155\151\156\57\x63\150\x61\x6e\147\145\55\x70\141\x73\163\167\x6f\x72\x64"); } public function edit_chart($page = "\x63\150\141\x72\164\x73\x5f\145\144\x69\x74") { $data = array(); $data["\171\x69\x65\154\144"] = "\141\x64\x6d\151\156\151\x73\x74\x72\x61\164\157\x72\57\x63\150\141\162\164\x73\137\145\x64\x69\x74"; $data["\164\x69\164\x6c\145"] = "\103\150\141\162\x74\163"; $data["\x63\150\x61\x72\x74\x73"] = $this->Administrator_Model->getMatkaDetails(); $this->load->view("\x61\144\155\x69\156\x69\163\164\162\141\164\157\x72\x2f\x68\145\141\144\x65\162\55\163\143\x72\151\x70\164"); $this->load->view("\x61\144\x6d\151\156\x69\163\x74\x72\x61\x74\x6f\x72\x2f\x68\x65\x61\144\145\x72"); $this->load->view("\141\x64\155\x69\156\151\x73\x74\x72\141\164\x6f\162\x2f\x68\x65\x61\144\145\x72\x2d\x62\157\164\164\157\x6d"); $this->load->view("\141\x64\155\151\156\x69\x73\164\x72\141\x74\157\162\x2f" . $page, $data); $this->load->view("\x61\x64\155\x69\156\151\x73\x74\162\141\x74\x6f\x72\x2f\146\157\x6f\164\x65\x72"); } public function chart_update() { if (!$this->session->userdata("\154\x6f\x67\x69\x6e")) { redirect("\141\x64\x6d\x69\156\x2f\151\156\144\x65\170"); } $matkaname = $this->input->post("\143\150\x61\x72\164"); $data = array(); $data["\164\151\164\x6c\145"] = "\x43\x68\x61\x72\x74\163"; $name = $this->db->where("\x6e\141\155\x65", $matkaname)->get("\155\141\164\x6b\141")->row_array()["\156\x61\155\x65"]; $data["\164\x72\x61\x6e\163\141\x63\164\x69\x6f\x6e\x73"] = $this->Administrator_Model->getChartDetails($name); $data["\143\150\141\x72\164\x73"] = $this->Administrator_Model->getChart(); $this->Administrator_Model->update_chart_data(); $this->session->set_flashdata("\163\165\x63\x63\x65\163\x73", "\x43\x68\141\x72\x74\40\x68\141\163\x20\x62\145\145\156\40\125\x70\x64\x61\x74\145\x64\40\123\x75\143\x63\x65\163\x73\x66\x75\154\x6c\x79\x2e"); redirect("\x61\144\x6d\x69\156\x2f\x61\x64\144\137\x63\x68\x61\162\164"); } public function chartshow($page = "\143\150\x61\x72\x74\163\150\x6f\x77") { $matkaname = $this->input->post("\x63\x68\141\x72\x74"); $name = $this->db->where("\156\x61\155\x65", $matkaname)->get("\155\141\164\x6b\x61")->row_array()["\156\141\155\145"]; $data["\x74\162\x61\156\163\x61\143\164\151\x6f\x6e\x73"] = $this->Administrator_Model->getChartDetails($name); if ($data["\164\x72\x61\156\x73\x61\143\x74\x69\157\156\x73"] == NULL) { echo "\x3c\160\40\x63\x6c\x61\163\163\75\42\x74\x65\x78\164\x2d\x63\145\156\164\x65\162\40\164\145\x78\x74\55\x77\141\x72\x6e\x69\156\147\42\76\123\157\162\x72\x79\41\40\116\157\40\x49\x6e\x66\x6f\162\155\141\x74\x69\x6f\x6e\x20\x46\x6f\165\x6e\x64\x3c\57\160\x3e"; } else { $this->load->view("\x61\144\155\x69\156\61\57\143\150\141\162\x74\x73\150\157\167", $data); } } public function chartupdate($page = "\x63\150\141\x72\164\x75\x70\144\141\x74\x65") { $matkaname = $this->input->post("\x63\150\x61\x72\164"); $name = $this->db->where("\156\141\155\145", $matkaname)->get("\x6d\141\164\153\141")->row_array()["\156\x61\x6d\x65"]; $data["\x74\x72\x61\x6e\x73\x61\143\x74\x69\157\x6e\163"] = $this->Administrator_Model->getChartDetails($name); $this->load->view("\141\144\x6d\x69\x6e\151\x73\x74\162\141\164\x6f\x72\57\x68\145\x61\x64\145\162\x2d\163\x63\x72\151\x70\164"); $this->load->view("\x61\x64\x6d\151\156\151\x73\164\x72\141\164\x6f\x72\57\150\x65\141\144\x65\x72"); $this->load->view("\x61\144\155\151\x6e\151\x73\164\162\x61\x74\157\x72\x2f\150\x65\x61\x64\x65\162\55\142\157\164\x74\157\x6d"); $this->load->view("\141\x64\x6d\151\x6e\x69\163\x74\162\141\x74\x6f\162\x2f" . $page, $data); $this->load->view("\141\144\x6d\x69\x6e\151\163\x74\162\141\x74\157\x72\57\x66\x6f\157\164\145\162"); } public function add_matka($page = "\141\144\x64\x2d\155\141\164\x6b\x61") { if (!$this->session->userdata("\x6c\157\x67\x69\156")) { redirect("\x61\144\155\x69\156\57\151\x6e\x64\x65\x78"); } $data["\x74\151\164\x6c\x65"] = ''; $data["\x75\x73\145\162\163"] = $this->Administrator_Model->getUserDetails(); $this->form_validation->set_rules("\156\141\x6d\x65", "\124\x65\141\155\x20\116\x61\155\145", "\x72\x65\x71\x75\151\162\x65\x64"); if ($this->form_validation->run() === FALSE) { $this->load->view("\141\x64\x6d\151\156\151\x73\x74\162\x61\x74\157\162\57\150\x65\141\x64\145\162\55\163\143\x72\151\x70\164"); $this->load->view("\x61\x64\155\151\x6e\151\x73\164\162\141\164\x6f\162\57\x68\x65\x61\x64\x65\x72"); $this->load->view("\x61\x64\x6d\x69\x6e\151\163\164\x72\141\164\157\162\x2f\x68\145\x61\x64\x65\162\55\142\157\x74\164\x6f\155"); $this->load->view("\141\144\x6d\151\x6e\x69\x73\164\162\x61\x74\157\x72\57" . $page, $data); $this->load->view("\x61\144\x6d\151\x6e\151\163\x74\162\x61\164\157\x72\57\x66\157\x6f\164\x65\162"); } else { $config["\x75\160\154\157\141\144\x5f\160\141\x74\150"] = "\x2e\57\x61\x73\x73\145\x74\x73\57\151\155\141\x67\x65\x73\x2f\164\x65\141\x6d\x73"; $config["\141\x6c\154\157\x77\x65\144\137\164\x79\x70\x65\x73"] = "\147\151\x66\x7c\x6a\x70\x67\x7c\160\156\147\x7c\x6a\x70\145\x67"; $config["\x6d\141\170\x5f\x73\151\x7a\x65"] = "\62\x30\x34\x38"; $config["\155\x61\170\x5f\x77\151\144\164\x68"] = "\x32\x30\x30\x30"; $config["\x6d\x61\170\x5f\150\x65\x69\x67\x68\x74"] = "\x32\x30\60\x30"; $this->load->library("\165\160\x6c\157\x61\144", $config); if (!$this->upload->do_upload()) { $errors = array("\145\x72\x72\x6f\x72" => $this->upload->display_errors()); $team_image = "\156\157\x69\155\141\147\x65\x2e\x70\x6e\x67"; } else { $data = array("\165\x70\x6c\x6f\x61\x64\137\144\x61\164\x61" => $this->upload->data()); $team_image = $_FILES["\x75\x73\145\162\146\151\154\145"]["\x6e\141\155\145"]; } $ref = $this->Administrator_Model->create_matka($team_image); redirect("\141\x64\x6d\x69\x6e\57\x6d\141\x74\x6b\141\x2f" . $ref); } } public function list_matka($offset = 0) { $config["\x62\141\x73\145\137\165\x72\x6c"] = base_url() . "\141\x64\155\151\156\151\163\164\x72\141\164\x6f\162\57\155\x61\x74\x6b\141\57"; $config["\x74\x6f\164\141\154\x5f\162\157\167\x73"] = $this->db->count_all("\155\x61\x74\x6b\x61"); $config["\160\x65\162\x5f\x70\141\147\145"] = FALSE; $config["\x61\x74\164\x72\151\x62\165\x74\x65\x73"] = array("\143\154\141\163\163" => "\x70\141\147\x69\156\x61\x74\145\x2d\x6c\151\x6e\x6b"); $this->pagination->initialize($config); $data["\164\x69\x74\x6c\145"] = "\x4c\151\163\164\x20\157\x66\x20\x4c\x69\x76\145\40\x55\160\144\x61\x74\145\163"; $data["\x74\x65\x61\x6d\163"] = $this->Administrator_Model->listmatka(FALSE, $config["\160\145\162\137\x70\141\x67\x65"], $offset); $this->load->view("\x61\x64\155\x69\x6e\61\57\x6d\141\164\x6b\141", $data); } public function update_matka($teamId) { if (!$this->session->userdata("\x6c\157\x67\151\156")) { redirect("\x61\x64\155\151\x6e\57\x69\x6e\144\x65\170"); } $data["\x74\x69\164\154\145"] = "\125\x70\x64\x61\x74\145\x20\114\x69\166\145\x20\x55\160\x64\141\164\145\163"; $data["\165\163\x65\162\x73"] = $this->Administrator_Model->getUserDetails(); $data["\x74\x65\x61\155"] = $this->Administrator_Model->listmatka($teamId); $this->form_validation->set_rules("\x6e\x61\155\145", "\115\141\164\153\x61\x20\x4e\x61\x6d\145", "\162\145\161\165\x69\x72\x65\x64"); if ($this->form_validation->run() === FALSE) { $this->load->view("\x61\x64\x6d\151\156\61\57\x75\160\x64\141\164\x65\137\155\x61\x74\153\x61", $data); } else { $this->Administrator_Model->update_team_data(); $id = $this->input->post("\x69\x64"); $snum = $this->input->post("\163\x6e\x75\155"); $enum = $this->input->post("\145\156\165\155"); $num = $this->input->post("\156\165\x6d"); $udate = $this->input->post("\165\144\141\164\x65"); $set_winner = false; $send_notifications = true; if ($send_notifications) { $message = $snum . "\x2d" . $num; if ($enum != null) { $message .= "\x2d" . $enum; } if ($snum != '' || $enum != '' || $num != '' || $snum != null || $enum != null) { send_notice($this->input->post("\156\141\155\x65"), $message); } } if ($set_winner) { $data = array("\155\141\164\x6b\x61\137\x69\144" => $id, "\x73\156\x75\x6d" => $snum, "\156\x75\x6d" => $num, "\x65\156\165\x6d" => $enum); $closed = $enum ? "\61" : 0; $this->Game_model->getWinner($data, $udate, $closed); } $this->session->set_flashdata("\163\x75\143\143\x65\163\x73", "\x4d\x61\x74\153\141\40\x68\x61\163\x20\x62\145\145\156\x20\x55\x70\x64\141\164\x65\x64\40\123\x75\x63\x63\145\x73\x73\146\x75\x6c\x6c\x79\56"); redirect("\141\x64\x6d\151\156\57\155\141\164\153\x61\57\x6c\x69\163\164"); } } public function update_matka_point($id) { if (!$this->session->userdata("\154\x6f\147\x69\x6e")) { redirect("\x61\144\155\x69\156\57\151\156\x64\x65\170"); } $data["\164\151\164\x6c\x65"] = "\x53\x65\x74\40\x57\151\156\x6e\145\x72"; $data["\x75\163\x65\162\x73"] = $this->Administrator_Model->getUserDetails(); $data["\164\145\x61\x6d"] = $this->Administrator_Model->listmatka($id); $this->form_validation->set_rules("\x75\144\x61\x74\145", "\123\x65\164\40\x44\x61\x74\145", "\162\x65\161\x75\x69\x72\x65\144"); if ($this->form_validation->run() === FALSE) { $this->load->view("\141\144\155\x69\156\x31\x2f\163\145\x74\x2d\x77\x69\x6e\156\x65\x72", $data); } else { $matka = $data["\164\145\x61\x6d"]; $udate = $this->input->post("\165\x64\x61\164\145"); $setWinner = strtotime(date("\131\55\x6d\55\144")) - strtotime(date("\131\x2d\x6d\55\x64", strtotime($matka["\165\x70\144\x61\x74\145\x64\137\x61\x74"]))); if ($setWinner != 0) { $this->session->set_flashdata("\167\x61\x72\156\151\x6e\x67", "\x4d\x61\x74\153\141\x20\156\x6f\164\40\x55\x70\144\x61\164\x65\144\56\x20\106\x69\162\x73\164\40\165\160\144\141\x74\145\40\164\x6f\x20\163\x65\164\x20\127\151\156\156\145\x72\56"); redirect("\141\x64\x6d\x69\x6e\151\163\164\x72\x61\x74\157\x72\57\155\x61\x74\153\x61\57\x6c\151\163\164"); } $data = array("\x6d\141\164\153\141\137\151\x64" => $id, "\x73\156\165\x6d" => $matka["\x73\x74\141\162\x74\151\156\x67\x5f\156\165\x6d"], "\156\165\155" => $matka["\156\x75\x6d\142\145\162"], "\145\156\x75\x6d" => $matka["\x65\x6e\144\x5f\156\165\x6d"]); $closed = strlen("\42" . $matka["\x6e\x75\155\x62\145\x72"] . "\42") > 1 ? "\x31" : 0; $this->Game_model->getWinner($data, $udate, $closed); echo "\x3c\143\x65\156\164\145\162\x3e\x3c\141\40\143\154\x61\163\163\75\42\x62\x74\156\x20\x62\x74\156\x2d\x70\162\151\155\141\162\x79\42\x20\150\x72\x65\x66\75\42" . site_url("\141\144\x6d\151\x6e\57\155\x61\164\x6b\x61\57\154\151\x73\x74") . "\x22\76\107\x6f\40\x42\141\143\153\x3c\x2f\141\x3e\74\57\x63\145\x6e\164\x65\x72\76"; $this->session->set_flashdata("\x73\x75\x63\143\x65\163\163", "\115\x61\164\153\x61\x20\120\x6f\151\156\164\40\144\x69\163\164\162\x69\x62\x75\164\x65\x64\x20\164\x6f\x20\141\x6c\x6c\x20\165\x73\x65\x72\163\56"); } } public function starline() { $data["\x74\x69\164\154\145"] = "\x73\164\141\x72\x6c\151\x6e\145\40"; $data["\x75\163\145\162\163"] = $this->Administrator_Model->starline(); $this->load->view("\141\144\x6d\x69\x6e\61\x2f\163\x74\141\x72\154\151\156\x65", $data); } public function starline_update($id) { $data["\165\x73\x65\x72\x73"] = $this->Administrator_Model->starline_update($id); $this->load->view("\x61\x64\155\151\156\x31\57\163\x74\x61\162\x6c\151\156\145\137\x75\160\x64\x61\x74\x65", $data); } public function starline_update2($id) { if (!$this->session->userdata("\x6c\x6f\147\151\156")) { redirect("\x61\144\155\x69\156\57\151\156\144\145\x78"); } $data["\x74\x69\x74\x6c\145"] = "\125\160\144\x61\x74\x65\x20\123\x74\x61\162\154\151\156\x65"; $snum = trim($this->input->post("\x73\x6e\x75\155")); $w = $this->Administrator_Model->starline_update2($id); $snums = explode("\55", $snum)[0]; $num = explode("\x2d", $snum)[1]; $data = array("\x6d\141\x74\153\x61\x5f\151\x64" => $id, "\x73\x6e\x75\155" => $snums, "\x6e\165\155" => $num, "\145\156\x75\155" => 0); $this->Game_model->getWinner($data); redirect("\x61\144\155\x69\156\57\x73\164\x61\x72\154\151\156\x65"); } public function member_list_team($offset = 0) { $config["\x62\141\x73\x65\137\x75\162\x6c"] = base_url() . "\141\144\x6d\x69\x6e\x2f\155\x61\x74\x6b\x61\57"; $config["\164\x6f\x74\x61\x6c\x5f\x72\157\x77\x73"] = $this->db->count_all("\x6d\141\x74\153\x61"); $config["\141\164\x74\x72\x69\142\x75\x74\145\163"] = array("\143\154\x61\163\x73" => "\x70\141\x67\151\x6e\x61\x74\x65\55\x6c\151\x6e\153"); $this->pagination->initialize($config); $id = $this->session->userdata("\x75\163\145\162\x5f\151\144"); $data["\164\x69\164\154\x65"] = "\114\x69\163\x74\x20\x6f\146\x20\114\151\166\145\40\x55\x70\x64\141\164\145\x73"; $data["\x74\x65\x61\x6d\x73"] = $this->Administrator_Model->memberlistteams($id); $this->load->view("\x61\144\x6d\151\x6e\x31\x2f\155\x61\x74\x6b\141", $data); } public function get_admin_data() { $data["\x63\x68\141\x6e\x67\145\120\141\x73\163\167\157\x72\144"] = $this->Administrator_Model->get_admin_data(); $data["\164\151\164\154\x65"] = "\103\150\141\156\147\x65\x20\x50\141\163\163\167\157\162\x64"; $this->load->view("\x61\x64\155\x69\x6e\61\57\x63\x68\141\156\x67\x65\55\x70\x61\163\x73\x77\157\162\144", $data); } public function view_users_old() { $data["\x63\x68\141\x6e\x67\145\x50\141\x73\x73\167\x6f\x72\x64"] = $this->Administrator_Model->get_admin_data(); $data["\x74\x69\x74\x6c\145"] = "\x76\151\x65\167\x20"; $data["\x75\163\x65\x72\x73"] = $this->Administrator_Model->get_user_profile(); $this->load->view("\141\x64\x6d\151\156\x31\57\x76\151\145\167\137\x75\163\145\x72\x73", $data); } public function view_users() { $data["\x63\x68\x61\156\147\145\x50\141\163\163\x77\157\x72\x64"] = $this->Administrator_Model->get_admin_data(); $data["\x74\151\164\154\x65"] = "\166\x69\145\167\40"; if (isset($_POST["\163\165\142\x6d\151\x74\x77"])) { $user_id = ''; if ($this->input->post("\x6d\x6f\x62\x69\154\x65")) { $user_id = $this->Administrator_Model->get_user_id($this->input->post("\x6d\157\x62\x69\x6c\145")); $data["\165\163\145\162\163"] = $this->Administrator_Model->get_user_profile($user_id); } $this->load->view("\x61\x64\155\151\x6e\61\x2f\166\151\x65\x77\137\165\163\145\x72\163\x5f\156\145\x77", $data); } else { $this->load->view("\x61\144\x6d\x69\156\x31\57\x76\x69\x65\167\x5f\165\x73\145\x72\163\137\163\x65\x6c\x65\143\x74\x69\157\x6e", $data); } } public function view_users_ajax() { $data["\x63\150\x61\x6e\147\145\x50\x61\x73\163\167\157\x72\144"] = $this->Administrator_Model->get_admin_data(); $data["\x74\x69\164\154\145"] = "\166\x69\x65\x77\40"; $user_id = ''; $table_value = $this->Administrator_Model->get_user_profile_ajax($user_id); $data["\x64\141\x74\141"] = $table_value["\x64\141\x74\x61"]; $data["\x72\x65\143\x6f\162\144\x73\x46\151\154\x74\x65\x72\x65\x64"] = $table_value["\x72\x65\143\157\x72\x64\x73\106\151\x6c\164\x65\x72\x65\x64"]; $data["\162\145\x63\157\x72\x64\163\x54\x6f\164\x61\x6c"] = $table_value["\162\145\143\x6f\162\144\x73\x54\157\x74\x61\154"]; $data["\162\x65\x63\157\x72\x64\x73\x54\157\164\141\x6c"] = $table_value["\162\x65\x63\x6f\x72\x64\163\x54\x6f\164\141\154"]; echo json_encode($data); } public function view_users_old2() { $data["\x63\x68\141\156\x67\145\120\x61\163\163\167\x6f\162\144"] = $this->Administrator_Model->get_admin_data(); $data["\x74\x69\164\x6c\x65"] = "\x76\x69\x65\x77\x20"; if (isset($_POST["\x73\165\x62\x6d\x69\x74\x77"])) { $user_id = ''; if ($this->input->post("\x6d\157\x62\151\154\145")) { $user_id = $this->Administrator_Model->get_user_id($this->input->post("\x6d\x6f\142\x69\x6c\x65")); } $data["\x75\x73\x65\162\163"] = $this->Administrator_Model->get_user_profile($user_id); $this->load->view("\x61\144\155\x69\x6e\x31\57\x76\x69\145\x77\137\165\163\x65\x72\163", $data); } else { $this->load->view("\x61\x64\x6d\151\156\x31\57\x76\151\x65\167\137\x75\163\x65\x72\x73\137\x73\145\x6c\x65\143\164\151\157\156", $data); } } public function deleteuser($id) { $this->Administrator_Model->deleteuser($id); $this->session->set_flashdata("\144\x65\x6c\145\x74\x65", "\x3c\x64\x69\166\40\143\x6c\x61\163\x73\75\x22\x61\x6c\145\162\164\40\x61\x6c\x65\162\164\55\x73\165\x63\x63\x65\163\x73\42\x3e\x75\163\x65\162\x20\x64\x61\164\141\x20\144\145\x6c\x65\164\x65\144\x20\x73\165\143\x63\145\x73\x73\146\x75\x6c\154\171\74\x2f\144\x69\166\76"); redirect("\141\x64\x6d\x69\x6e\57\x76\151\x65\x77\x5f\x75\x73\145\162\x73"); } public function changepass($id) { $pass = $this->input->post("\160\x61\163\163\x77\x6f\162\144"); if ($pass != '') { $this->Administrator_Model->changepass($id, $pass); } $this->session->set_flashdata("\x64\145\154\145\164\x65", "\74\x64\151\166\40\x63\154\141\x73\x73\75\x22\141\x6c\x65\162\164\x20\141\154\x65\162\x74\x2d\163\x75\x63\x63\x65\163\163\x22\76\125\163\145\x72\x20\160\141\x73\163\167\x6f\162\x64\x20\143\x68\141\156\x67\145\x64\x20\163\165\143\x63\145\x73\163\146\x75\154\154\171\74\x2f\144\x69\166\x3e"); redirect("\x61\144\x6d\x69\156\x2f\x76\151\145\x77\x5f\x75\x73\x65\x72\x73"); } public function view_games($id = NULL) { $data["\x74\x69\x74\x6c\x65"] = "\x76\x69\145\x77\x20"; $data["\x6d\x61\x74\153\x61\x5f\x69\x64"] = $id; $data["\x75\163\145\x72\x73"] = $this->Administrator_Model->get_games($id); $this->load->view("\141\144\155\151\x6e\x31\x2f\166\151\145\x77\x5f\147\141\155\145\163", $data); } public function view_point_lists($id = NULL) { $data["\x74\151\164\154\145"] = "\x76\x69\145\x77\x20"; $data["\x6d\x61\x74\153\x61\137\x69\x64"] = $id; $from = $this->input->get("\x66\162\157\x6d"); $to = $this->input->get("\x74\x6f"); $data["\x75\163\x65\162\163"] = $this->Administrator_Model->get_point_lists($id, $from, $to); $this->load->view("\141\x64\155\151\156\x31\57\x76\x69\x65\167\137\x70\x6f\x69\x6e\x74\137\154\x69\x73\164\163", $data); } public function view_user_games() { $matka_id = $this->input->get("\x6d\x61\164\x6b\x61\x5f\151\144"); $game_id = $this->input->get("\147\x61\x6d\145\x5f\x69\144"); $data["\164\151\x74\154\145"] = "\x76\151\x65\167\x20"; $data["\147\141\155\x65\x5f\151\x64"] = $game_id; $data["\155\141\x74\x6b\x61\137\151\144"] = $matka_id; $data["\x75\163\145\162\x73"] = $this->Administrator_Model->get_user_games($game_id, $matka_id); $this->load->view("\x61\x64\x6d\x69\156\x31\x2f\x76\x69\145\x77\137\165\x73\145\162\x5f\x67\x61\x6d\145\163", $data); } public function view_history() { $matka_id = $this->input->get("\x6d\141\x74\153\141\x5f\x69\x64"); $game_id = $this->input->get("\147\x61\x6d\145\137\151\144"); $user_id = $this->input->get("\165\163\x65\162\x5f\151\x64"); $from = $this->input->get("\x66\162\x6f\x6d"); $to = $this->input->get("\164\157"); $data["\x74\x69\x74\x6c\x65"] = "\x76\151\145\167\x20"; $data["\x67\x61\x6d\x65\x5f\x69\144"] = $game_id; $data["\155\x61\x74\153\141\x5f\151\144"] = $matka_id; $data["\x75\x73\x65\x72\163"] = $this->Administrator_Model->get_history($user_id, $matka_id, $game_id, $from, $to); $this->load->view("\x61\x64\155\151\x6e\x31\x2f\x76\151\145\x77\137\147\141\x6d\145\x5f\x68\151\163\164\x6f\162\x79", $data); } public function app_bid_history() { $user_id = $this->input->get("\x75\163\145\162\137\x69\144"); $data["\164\151\x74\x6c\x65"] = "\x76\151\x65\167\40"; $data["\165\x73\145\x72\163"] = $this->Administrator_Model->get_bid_history($user_id); $this->load->view("\x61\x64\155\x69\x6e\x31\57\141\160\x70\x5f\142\x69\144\137\x68\x69\x73\x74\157\162\171", $data); } public function app_startline_bid_history() { $user_id = $this->input->get("\x75\163\x65\162\x5f\151\144"); $data["\164\151\x74\154\x65"] = "\x76\151\145\x77\40"; $data["\165\163\145\162\163"] = $this->Administrator_Model->get_bid_history($user_id); $this->load->view("\x61\x64\155\151\x6e\x31\x2f\141\x70\160\137\142\x69\144\137\150\151\x73\x74\x6f\162\x79", $data); } public function add_wallet() { $no = $this->input->post("\x6e\x6f"); $wa = $this->input->post("\167\141"); $wallet = $this->input->post("\167\141\x6c\154\145\164"); $data["\x75\163\x65\x72\x73"] = $this->Administrator_Model->add_wallet($no); if (isset($data["\165\x73\145\162\163"])) { foreach ($data["\165\163\x65\x72\163"] as $u) { $data["\143\x68\145\x63\153"] = $this->Administrator_Model->check_wallet($u["\x69\144"]); $this->Administrator_Model->add_point_req_by_admin($wa, $u["\x69\x64"], $wallet); if ($data["\143\x68\x65\143\153"] == NULL) { $data["\x77\x61\x6c"] = $this->Administrator_Model->add_wallet3($u["\x69\x64"], $wa, $wallet); if ($data["\167\141\x6c"] == TRUE) { $this->session->set_flashdata("\160\157\x69\156\164\x5f\163\x74", "\120\157\x69\156\x74\163\40\x41\x64\x64\x65\x64\40\163\165\x63\x63\145\x73\x73\146\165\154\154\x79\x2e"); } } else { $data["\167\141\154"] = $this->Administrator_Model->add_wallet2($u["\151\x64"], $wa, $wallet); if ($data["\167\x61\154"] == TRUE) { $this->session->set_flashdata("\x70\x6f\151\x6e\x74\137\x73\x74", "\120\x6f\151\156\164\x73\40\101\144\x64\x65\x64\40\163\x75\143\x63\x65\163\163\x66\165\154\x6c\x79\56"); } } } } $this->load->view("\x61\144\155\151\x6e\61\57\x61\144\144\137\x77\141\154\x6c\x65\164"); } public function add_wallet2() { $no = $this->input->post("\156\x6f"); $wa = $this->input->post("\167\141"); $data["\x75\x73\x65\162\163"] = $this->Administrator_Model->add_wallet($no); foreach ($data["\x75\163\x65\x72\163"] as $u) { $data["\x63\150\145\x63\x6b"] = $this->Administrator_Model->check_wallet($u["\x69\144"]); $this->Administrator_Model->add_point_req_by_admin($wa, $u["\151\144"]); if ($data["\143\x68\x65\143\153"] == NULL) { $data["\167\x61\154"] = $this->Administrator_Model->add_wallet3($u["\151\x64"], $wa); if ($data["\167\x61\x6c"] == TRUE) { $this->session->set_flashdata("\x70\157\x69\156\164\x5f\163\x74", "\x50\157\x69\x6e\164\163\40\101\144\x64\145\144\x20\x73\165\143\143\x65\163\163\146\x75\x6c\154\171\56"); } } else { $data["\167\141\x6c"] = $this->Administrator_Model->add_wallet2($u["\151\144"], $wa); if ($data["\167\x61\x6c"] == TRUE) { $this->session->set_flashdata("\x70\x6f\x69\156\164\137\x73\164", "\x50\157\151\156\164\x73\x20\101\x64\x64\x65\144\x20\163\165\x63\143\145\163\163\x66\x75\x6c\x6c\171\x2e"); } } } redirect("\x61\144\155\151\156\57\141\144\144\x5f\167\x61\154\154\145\164"); } public function notify() { $message = $this->input->post("\x6e\x6f\x74\151"); $d = $this->Administrator_Model->notify($message); if ($d) { send_notice("\116\x6f\x74\x69\146\151\143\x61\x74\x69\x6f\156\x73", $message); $this->session->set_flashdata("\x6e\157\x74\151\143\x65\137\163\x74", "\x4e\x6f\164\151\x66\x69\143\x61\164\x69\x6f\156\x73\40\163\x65\x6e\144\x20\x73\x75\143\x63\x65\163\163\x66\165\x6c\x6c\x79\x2e"); } $this->load->view("\141\x64\x6d\151\156\61\57\141\x64\x64\137\156\157\x74\x69\x66\151\x63\x61\x74\x69\x6f\156"); } public function add_point_req_old() { sleep(5); $data["\x74\151\164\x6c\145"] = "\166\x69\x65\167\40"; $data["\165\163\145\x72\x73"] = $this->Administrator_Model->add_point_req(); $this->load->view("\141\x64\x6d\151\x6e\x31\x2f\141\x64\144\x5f\x70\157\x69\x6e\x74\x5f\x72\x65\x71", $data); } public function add_point_req() { $data["\x74\151\164\154\x65"] = "\x76\151\x65\167\x20"; $this->load->view("\x61\x64\155\151\156\61\x2f\x61\x64\x64\x5f\x70\x6f\151\x6e\164\x5f\162\145\x71\62", $data); } public function get_add_point_req() { ini_set("\155\145\155\x6f\x72\x79\x5f\x6c\151\x6d\151\x74", "\x2d\x31"); $postData = $this->input->post(); $data = $this->Administrator_Model->get_add_point_req($postData); echo json_encode($data); } public function add_point_req2($req_id = NULL, $type = "\x61\x70\160\x72\157\166\145\144") { $req = $this->Administrator_Model->add_point_req2($req_id, $type); $data["\164\x69\x74\x6c\x65"] = "\166\x69\x65\167\40"; foreach ($req as $r) { $user_id = $r["\x75\x73\145\x72\137\x69\144"]; $points = $r["\162\145\161\165\x65\163\x74\137\160\x6f\x69\x6e\x74\x73"]; $t = $this->Administrator_Model->add_pending_point_req($user_id, $points); } if ($t || $type != "\x61\x70\x70\162\x6f\166\145\144") { redirect("\141\144\155\x69\x6e\x2f\141\144\x64\x5f\x70\x6f\151\156\x74\137\162\x65\x71"); } } public function failed_payment_req() { $data["\162\x65\x71\165\x65\x73\x74\163"] = $this->Administrator_Model->failed_payment_req(); $this->load->view("\141\x64\155\x69\x6e\61\x2f\x66\141\151\x6c\x65\144\137\160\141\x79\155\145\156\x74\137\162\x65\x71", $data); } public function approve_req($id) { $rdet = $this->db->select("\x61\155\x6f\x75\x6e\x74\54\x75\x73\145\x72\x5f\151\x64")->where("\x69\144", $id)->get("\162\x61\151\x73\145\x5f\164\x69\x63\153\x65\x74\x73")->row(); $amt = $rdet->amount; $uid = $rdet->user_id; $query = $this->db->query("\x9\x55\120\104\101\x54\x45\x20\164\142\154\167\x61\x6c\x6c\x65\x74\40\x73\x65\x74\x20\x6d\x61\151\x6e\137\x77\141\x6c\x6c\x65\164\x5f\160\157\x69\156\x74\x73\75\155\141\x69\156\x5f\167\141\x6c\x6c\145\164\137\x70\157\x69\x6e\164\x73\x2b\47{$amt}\x27\x20\x77\x68\x65\162\x65\x20\x75\163\145\162\x5f\x69\x64\x3d\47{$uid}\x27\x20"); $query1 = $this->db->query("\x20\125\x50\104\x41\124\105\40\x72\x61\151\x73\145\137\x74\x69\x63\153\145\x74\x73\40\x73\145\164\40\163\x74\141\x74\x75\163\75\61\x20\167\150\x65\x72\x65\40\x69\144\x3d\x27{$id}\47\40"); $type = "\101\144\144"; $insert_query = array("\x72\x65\161\165\x65\163\164\x5f\x70\157\151\156\x74\x73" => $amt, "\x75\x73\145\162\x5f\x69\x64" => $uid, "\164\x79\x70\145" => $type, "\162\x65\161\x75\x65\x73\x74\137\163\164\141\x74\x75\163" => "\141\x70\x70\x72\x6f\166\x65\144"); $query2 = $this->db->insert("\164\x62\154\122\145\x71\165\x65\163\x74", $insert_query); if ($query && $query1) { $this->session->set_flashdata("\x73\165\x63\x63\x65\x73\x73", "\x52\145\x71\165\x65\x73\164\x20\x41\x70\160\x72\x6f\166\x65\144\x20\x53\165\143\x63\145\163\x73\146\165\154\154\x79\56"); } else { $this->session->set_flashdata("\146\141\151\x6c", "\x52\145\161\165\x65\163\164\40\x66\157\x72\40\x61\x70\160\x72\x6f\166\141\154\x20\146\141\151\x6c\145\x64\56"); } redirect("\141\x64\x6d\151\156\x2f\146\x61\151\154\x65\144\137\160\141\x79\x6d\145\x6e\164\x5f\162\145\x71"); } public function reject_req($id) { $query = $this->db->query("\11\125\x50\104\101\x54\105\40\162\x61\151\163\x65\x5f\x74\x69\143\153\x65\x74\163\40\163\x65\x74\40\x73\x74\141\x74\x75\163\75\x32\40\167\x68\x65\162\145\x20\x69\144\75\47{$id}\x27\40"); if ($query) { $this->session->set_flashdata("\163\x75\143\143\x65\163\163", "\x52\145\x71\165\x65\x73\x74\40\x52\x65\152\145\143\164\x65\144\x20\123\x75\x63\143\145\x73\163\x66\165\154\x6c\x79\x2e"); } else { $this->session->set_flashdata("\146\x61\x69\154", "\x52\x65\x71\x75\x65\163\164\x20\146\x6f\162\40\x72\x65\x6a\145\x63\x74\151\x6f\156\x20\146\141\151\x6c\x65\x64\56"); } redirect("\x61\144\155\151\x6e\x2f\146\141\151\154\145\144\x5f\x70\141\171\155\145\x6e\164\137\162\x65\161"); } public function withdraw_point_req() { $data["\162\x65\x71\165\x65\163\164\x73"] = $this->Administrator_Model->withdraw_point_req(); $this->load->view("\141\144\155\x69\x6e\61\x2f\x77\x69\164\150\x64\x72\x61\x77\137\x70\157\x69\x6e\x74\x5f\162\145\x71", $data); } public function withdraw_point_req2($id = NULL) { if ($id == NULL) { return false; } $req = $this->Administrator_Model->withdraw_point_req2($id); $data["\164\151\164\x6c\145"] = "\x76\151\x65\x77\x20"; $t = FALSE; if (isset($req)) { $user_id = $req["\165\163\145\162\x5f\151\x64"]; $points = -$req["\162\145\161\165\x65\163\164\137\x70\x6f\151\156\164\163"]; $t = $this->Administrator_Model->withdraw_point_req3($user_id, $points); } if ($t) { $this->session->set_flashdata("\160\x6f\x69\x6e\164\137\x73\x74", "\127\151\164\x68\x64\x72\x61\x77\x20\x72\x65\x71\x75\145\x73\164\40\x63\157\x6d\160\x6c\145\x74\x65\144\56"); } redirect("\x61\144\155\x69\x6e\57\167\151\x74\150\x64\162\141\x77\137\x70\x6f\x69\x6e\x74\x5f\x72\145\161"); } public function withdraw_point_cancel($id = NULL) { if ($id == NULL) { return false; } $req = $this->Administrator_Model->withdraw_point_cancel($id); $data["\164\x69\x74\x6c\x65"] = "\x76\x69\145\x77\40"; if ($req) { $this->session->set_flashdata("\x70\x6f\151\156\164\x5f\163\164", "\127\151\164\150\144\162\141\x77\40\162\x65\x71\165\145\163\164\x20\143\141\156\143\x65\x6c\x6c\x65\144\56"); } redirect("\141\x64\x6d\x69\156\x2f\x77\151\x74\150\144\x72\x61\167\137\160\157\151\156\x74\x5f\162\x65\x71"); } public function change_password($page = "\143\x68\141\156\147\x65\x2d\160\x61\163\x73\167\x6f\162\144") { if (!file_exists(APPPATH . "\x76\x69\145\167\x73\57\141\x64\155\151\x6e\x31\x2f" . $page . "\56\x70\150\x70")) { show_404(); } if (!$this->session->userdata("\x6c\157\x67\151\156")) { redirect("\141\x64\155\151\x6e\x2f\151\x6e\x64\x65\170"); } $data["\x74\x69\x74\154\145"] = "\103\x68\141\156\x67\145\x20\160\x61\163\x73\x77\157\162\x64"; $this->form_validation->set_rules("\157\154\x64\x5f\x70\x61\x73\163\x77\157\x72\144", "\117\154\144\x20\120\141\x73\163\167\x6f\162\144", "\162\145\x71\x75\x69\x72\x65\144\174\143\141\154\154\142\141\143\153\x5f\155\x61\x74\x63\x68\x5f\157\x6c\144\137\x70\141\x73\163\x77\157\162\144"); $this->form_validation->set_rules("\156\x65\167\x5f\x70\141\163\163\x77\157\162\x64", "\x4e\145\x77\40\x50\x61\x73\163\167\x6f\x72\144\x20\106\151\145\x6c\x64", "\x72\145\161\165\x69\x72\145\144"); $this->form_validation->set_rules("\x63\x6f\x6e\146\x69\162\x6d\x5f\x6e\x65\167\137\160\x61\x73\x73\x77\x6f\162\144", "\x43\x6f\156\146\151\162\x6d\40\116\x65\167\40\120\x61\163\x73\x77\x6f\162\144", "\155\141\x74\143\150\145\x73\x5b\x6e\x65\x77\137\160\x61\x73\x73\x77\x6f\x72\144\x5d"); if ($this->form_validation->run() === FALSE) { $this->load->view("\x61\x64\155\151\x6e\61\57" . $page, $data); } else { $this->Administrator_Model->change_password($this->input->post("\x6e\145\167\137\160\x61\163\x73\167\157\162\144")); $this->session->set_flashdata("\x73\x75\x63\x63\145\163\x73", "\x50\141\x73\x73\167\x6f\x72\x64\x20\110\141\163\x20\102\x65\145\x6e\40\103\150\141\x6e\x67\145\x64\40\123\x75\x63\143\x65\x73\163\146\165\154\x6c\56"); redirect("\x61\144\155\x69\x6e\x2f\143\150\x61\156\x67\145\55\160\141\x73\x73\x77\157\162\x64"); } } public function match_old_password($old_password) { $this->form_validation->set_message("\x6d\141\x74\x63\150\137\x6f\x6c\x64\x5f\160\141\x73\x73\167\157\162\x64", "\x43\165\x72\x72\x65\156\x74\x20\x50\x61\163\x73\167\x6f\x72\x64\40\x44\157\145\163\x20\x6e\157\x74\x20\155\141\x74\143\x68\145\x64\x2c\x20\120\154\145\x61\x73\x65\40\124\162\x79\40\x41\x67\141\151\156\56"); $password = md5($old_password); $que = $this->Administrator_Model->match_old_password($password); if ($que) { return true; } else { return false; } } public function update_admin_profile() { $data["\x75\x73\145\162"] = $this->Administrator_Model->get_admin_data(); $data["\x74\151\164\154\145"] = "\x55\160\x64\141\x74\x65\40\120\162\x6f\146\x69\154\145"; $this->load->view("\x61\144\x6d\x69\156\61\57\x75\160\x64\141\x74\x65\x2d\160\162\x6f\x66\151\x6c\x65", $data); } public function update_admin_profile_data($page = "\165\160\x64\x61\x74\145\55\x70\162\157\146\151\154\145") { if (!file_exists(APPPATH . "\x76\x69\145\167\163\57\141\x64\155\151\x6e\x31\x2f" . $page . "\x2e\160\150\160")) { show_404(); } if (!$this->session->userdata("\154\157\x67\x69\156")) { redirect("\141\144\x6d\x69\x6e\x2f\151\156\x64\x65\x78"); } $data["\164\x69\x74\154\x65"] = "\x55\x70\x64\141\x74\145\x20\120\162\x6f\x66\x69\x6c\x65"; $this->form_validation->set_rules("\156\x61\155\145", "\x4e\x61\155\145", "\x72\145\161\x75\x69\x72\x65\x64"); if ($this->form_validation->run() === FALSE) { $this->load->view("\x61\144\x6d\x69\x6e\61\57" . $page, $data); } else { $config["\165\x70\154\x6f\x61\144\x5f\160\141\x74\x68"] = "\56\x2f\141\x73\x73\x65\164\x73\57\x69\155\x61\x67\x65\163\x2f\165\x73\145\x72\x73"; $config["\x61\x6c\154\157\x77\145\x64\137\x74\171\x70\145\x73"] = "\147\151\146\x7c\152\160\x67\174\160\x6e\147\174\152\160\x65\x67"; $config["\x6d\x61\170\137\x73\151\172\x65"] = "\x32\x30\64\70"; $config["\x6d\141\x78\x5f\x77\x69\x64\164\x68"] = "\x32\60\x30\x30"; $config["\x6d\x61\170\x5f\x68\145\x69\x67\150\x74"] = "\62\x30\60\60"; $this->load->library("\165\160\x6c\157\x61\144", $config); if (!$this->upload->do_upload()) { $id = $this->input->post("\151\144"); $data["\151\155\147"] = $this->Administrator_Model->get_user($id); $errors = array("\x65\162\x72\157\162" => $this->upload->display_errors()); $post_image = $data["\x69\x6d\147"]["\151\x6d\x61\147\x65"]; } else { $data = array("\x75\x70\154\x6f\141\x64\x5f\x64\x61\x74\141" => $this->upload->data()); $post_image = $_FILES["\165\x73\x65\x72\146\x69\x6c\145"]["\156\x61\x6d\145"]; } $this->Administrator_Model->update_user_data($post_image); $this->session->set_flashdata("\163\165\143\x63\x65\x73\x73", "\125\163\x65\x72\40\x68\x61\x73\x20\x62\x65\145\x6e\40\125\x70\144\141\x74\145\144\40\123\x75\x63\x63\145\x73\163\146\x75\154\x6c\56"); redirect("\141\144\155\x69\156\x2f\x75\160\144\141\x74\145\x2d\160\162\x6f\x66\x69\x6c\145"); } } public function forget_password_mail() { $this->load->library("\x66\157\162\155\137\166\x61\154\x69\x64\141\x74\151\x6f\156"); $this->form_validation->set_rules("\145\x6d\141\x69\154", "\105\155\x61\151\x6c", "\x72\x65\161\165\x69\162\x65\144\174\164\x72\x69\x6d\x7c\170\163\163\137\x63\154\145\141\156\x7c\x63\x61\x6c\154\x62\x61\x63\x6b\137\x76\x61\154\151\144\141\164\x65\137\143\162\x65\144\145\156\x74\151\x61\x6c\x73"); $this->load->model("\101\x64\155\x69\156\x69\163\164\x72\x61\x74\x6f\x72\137\115\x6f\x64\145\x6c"); if ($this->Administrator_Model->email_exists()) { $temp_pass = md5(uniqid()); $this->load->library("\145\x6d\141\x69\154", array("\155\141\151\154\164\x79\160\x65" => "\x68\x74\x6d\154")); $this->email->from("\x61\x64\155\x69\156\61\x32\63\x34\x35\x36\x37\x40\147\155\x61\x69\154\56\143\x6f\x6d", "\x53\x69\164\145"); $this->email->to($this->input->post("\x65\x6d\141\x69\x6c")); $this->email->subject("\x52\x65\x73\x65\x74\40\x79\x6f\165\x72\x20\x50\x61\x73\163\167\x6f\x72\144"); $message = "\74\160\76\124\150\x69\163\x20\145\155\x61\x69\x6c\x20\x68\141\x73\x20\x62\145\145\156\x20\163\x65\x6e\164\40\141\x73\40\141\40\x72\145\x71\x75\x65\163\164\x20\164\157\40\162\145\x73\x65\164\40\157\x75\x72\x20\x70\141\163\x73\167\x6f\x72\144\x3c\57\160\x3e"; $message .= "\x3c\160\76\74\141\40\x68\x72\145\x66\75\47" . base_url() . "\x61\144\x6d\151\x6e\151\x73\x74\162\141\164\x6f\162\57\x72\x65\163\x65\x74\55\160\x61\x73\x73\167\157\x72\144\x2f{$temp_pass}\47\x3e\103\154\x69\x63\x6b\40\x68\x65\162\x65\x20\74\x2f\x61\76\151\x66\40\171\x6f\x75\x20\167\x61\x6e\x74\40\x74\x6f\40\162\x65\163\145\164\40\x79\x6f\165\x72\x20\160\141\163\x73\x77\x6f\162\x64\x2c\xa\40\40\x20\40\40\40\40\x20\40\40\40\40\x20\x20\x20\40\40\x20\40\x20\40\40\x20\x20\x69\146\x20\x6e\x6f\x74\x2c\40\164\150\x65\x6e\40\151\x67\156\157\162\145\x3c\x2f\x70\x3e"; $this->email->message($message); if ($this->email->send()) { $this->load->model("\101\x64\155\151\x6e\x69\x73\164\162\x61\164\x6f\162\x5f\x4d\157\x64\x65\x6c"); if ($this->Administrator_Model->temp_reset_password($temp_pass)) { echo "\143\150\x65\x63\153\40\x79\x6f\165\162\x20\x65\155\x61\x69\154\40\146\x6f\162\40\x69\156\x73\x74\162\165\x63\x74\151\157\156\163\54\x20\x74\150\x61\156\x6b\40\x79\157\x75"; } } else { echo "\x65\x6d\141\x69\154\40\x77\141\163\x20\156\157\x74\x20\163\145\156\164\x2c\40\x70\x6c\x65\x61\163\x65\40\x63\x6f\x6e\x74\141\143\164\x20\171\157\x75\x72\40\141\144\x6d\151\156\x69\x73\x74\162\141\164\157\162"; } } else { echo "\x79\157\165\x72\40\x65\155\141\151\154\x20\x69\x73\x20\x6e\157\164\x20\151\x6e\x20\157\x75\162\x20\x64\141\164\141\x62\x61\163\x65"; } } public function reset_password($temp_pass) { $this->load->model("\101\x64\155\151\x6e\x69\163\164\162\x61\164\x6f\x72\137\115\x6f\144\145\x6c"); if ($this->Administrator_Model->is_temp_pass_valid($temp_pass)) { $this->load->view("\x72\x65\x73\x65\164\x2d\160\x61\163\163\x77\x6f\162\x64"); } else { echo "\164\x68\145\40\153\x65\171\x20\x69\x73\x20\x6e\x6f\164\40\166\x61\154\151\x64"; } } public function update_password() { $this->load->library("\146\x6f\162\155\x5f\x76\141\154\x69\x64\x61\x74\151\157\x6e"); $this->form_validation->set_rules("\x70\141\163\163\x77\157\x72\144", "\120\141\163\x73\x77\157\x72\x64", "\162\145\x71\165\151\162\x65\x64\174\x74\x72\151\155"); $this->form_validation->set_rules("\x63\160\141\163\x73\x77\157\x72\144", "\103\157\x6e\146\151\162\155\x20\x50\x61\x73\163\x77\x6f\x72\144", "\162\145\x71\165\151\x72\x65\144\174\x74\x72\151\x6d\174\x6d\x61\x74\143\x68\x65\163\133\x70\141\x73\x73\x77\157\x72\144\135"); if ($this->form_validation->run()) { echo "\x70\x61\163\163\167\157\x72\x64\163\x20\155\x61\164\x63\150"; } else { echo "\160\x61\x73\163\x77\x6f\x72\x64\163\40\144\157\40\156\x6f\164\x20\155\141\x74\x63\150"; } } public function login() { $this->load->view("\141\x64\x6d\x69\156\x31\57\154\157\x67\x69\x6e"); } public function forgot_password() { $this->load->view("\141\144\x6d\151\156\61\x2f\x66\x6f\162\147\x6f\x74\x5f\x70\x61\163\x73\x77\157\x72\144"); } public function profile() { $this->load->view("\141\x64\x6d\151\x6e\61\x2f\x70\x72\157\x66\151\154\145"); } public function chats() { $data["\x63\150\141\x74\163"] = $this->Administrator_Model->chats(); $this->load->view("\141\144\x6d\151\156\x31\x2f\x63\x68\141\164\163", $data); } public function view_chats($id = NULL) { if ($id == NULL) { return false; } $data["\x63\150\141\164\x73"] = $this->Administrator_Model->chat_detail($id); $data["\165\x69\x64"] = $id; $this->load->view("\x61\144\155\x69\156\61\x2f\x76\151\x65\x77\x5f\143\x68\141\x74\x73", $data); } public function reply_chat() { if (isset($_POST["\x72\x65\160\x6c\x79\137\143\150\141\164"])) { $id = $this->input->post("\165\x73\145\x72"); $data["\x61\x64\155\137\143\150\141\164\x73"] = $this->Administrator_Model->adm_chat_detail($id); $data["\x75\151\x64"] = $id; $this->load->view("\x61\144\x6d\151\156\x31\x2f\162\x65\160\x6c\171\x5f\x63\x68\x61\x74", $data); } } public function admin_reply() { if (isset($_POST["\x61\x64\x6d\151\x6e\137\x72\145\160\x6c\171"])) { $type = $this->input->post("\x74\x79\x70\x65"); $user_id = $this->input->post("\165\163\x65\162\x5f\151\144"); $from = "\141\x64\x6d\151\x6e"; if ($type == "\x69\x6d\141\x67\145") { if (isset($_FILES["\x69\x6d\141\x67\x65"]) && $_FILES["\x69\155\x61\x67\x65"]["\163\x69\172\x65"] > 0) { $config["\x75\160\x6c\x6f\141\x64\x5f\x70\141\x74\150"] = "\x2e\x2f\x69\155\147\57\x63\150\x61\164\163\57"; $config["\141\154\154\157\x77\145\x64\x5f\164\x79\160\145\x73"] = "\x67\151\x66\174\x6a\x70\147\174\160\156\x67\174\x6a\160\145\x67"; $config["\x65\156\143\x72\x79\x70\x74\x5f\x6e\x61\x6d\x65"] = TRUE; $this->load->library("\165\x70\154\157\x61\x64", $config); if (!$this->upload->do_upload("\x69\x6d\x61\x67\x65")) { $data["\x72\145\x73\160\x6f\x6e\x63\145"] = false; $data["\145\162\162\157\x72"] = "\105\x72\x72\157\x72\41\x20\72\x20" . $this->upload->display_errors(); } else { $img_data = $this->upload->data(); $img_name = $img_data["\x66\151\x6c\x65\137\156\x61\x6d\145"]; $this->load->model("\103\157\x6d\155\157\156\x5f\155\157\x64\145\154"); $q = $this->db->insert("\x63\150\x61\164", array("\165\x73\x65\x72\137\x69\x64" => $user_id, "\155\145\163\x73\x61\x67\145" => $img_data["\x66\x69\x6c\x65\x5f\x6e\x61\x6d\145"], "\x66\162\x6f\155" => $from, "\164\x79\160\145" => $type)); } } } else { if ($type == "\164\145\170\164") { $message = $this->input->post("\155\x65\163\163\x61\147\x65"); $q = $this->db->insert("\x63\150\141\x74", array("\165\x73\145\x72\137\151\x64" => $user_id, "\155\x65\163\163\x61\x67\145" => $message, "\x66\162\x6f\155" => $from, "\x74\x79\x70\145" => $type)); } } $this->session->set_flashdata("\x70\157\151\x6e\164\x5f\x73\164", "\115\145\163\163\x61\x67\145\x20\x53\145\x6e\164\40\x53\x75\143\143\x65\x73\x73\x66\165\154\x6c\x79\56"); redirect("\x61\x64\155\x69\x6e\x2f\166\x69\145\x77\137\143\150\x61\164\x73\57" . $user_id); } } public function delete_chats($id) { $arr = array("\x73\x74\x61\x74\165\x73" => "\x32"); $this->db->where("\x75\x73\x65\162\x5f\x69\144", $id); $this->db->update("\143\x68\141\164", $arr); redirect("\x61\x64\155\x69\156\x2f\143\x68\x61\164\x73"); } public function blockuser($id, $status) { $this->Administrator_Model->blockuser($id, $status); if ($status == 1) { $this->session->set_flashdata("\x62\x6c\x6f\x63\153", "\74\x64\151\x76\40\x63\154\141\x73\163\x3d\42\x61\154\145\x72\x74\40\141\x6c\145\162\164\x2d\x73\165\x63\143\145\x73\163\x22\x3e\x55\x73\145\x72\x20\x62\154\x6f\x63\153\145\144\x20\163\x75\143\x63\x65\x73\163\x66\165\154\154\x79\x2e\x3c\x2f\x64\151\x76\76"); } else { $this->session->set_flashdata("\x62\x6c\x6f\x63\153", "\x3c\144\151\166\x20\x63\154\x61\x73\x73\x3d\42\141\x6c\145\x72\164\x20\141\x6c\x65\162\164\x2d\163\165\143\x63\145\x73\x73\42\x3e\x55\x73\145\162\x20\165\x6e\142\x6c\x6f\x63\153\145\144\40\163\x75\x63\143\x65\163\x73\146\x75\x6c\x6c\x79\56\x3c\x2f\144\151\166\x3e"); } redirect(site_url("\x61\x64\x6d\x69\156\57\x76\x69\145\167\137\x75\x73\145\x72\x73")); } public function packages() { $data["\160\141\x63\x6b\141\147\x65\163"] = $this->db->where("\163\x74\141\x74\x75\163\x21\75", "\x32")->get("\x70\x61\x63\x6b\141\x67\145")->result(); $this->load->view("\x61\x64\155\x69\x6e\61\x2f\x70\141\143\153\x61\x67\145\163", $data); } public function deletepackage($id) { $this->Administrator_Model->deletepackage($id); $this->session->set_flashdata("\144\145\154\145\x74\x65", "\x3c\x64\x69\166\x20\x63\x6c\x61\x73\x73\75\42\141\x6c\x65\162\164\40\x61\154\x65\x72\x74\55\x73\165\x63\x63\x65\x73\x73\42\x3e\120\x61\x63\x6b\141\x67\145\x20\144\145\x6c\x65\164\x65\144\40\163\x75\x63\x63\145\x73\x73\x66\165\154\x6c\171\74\x2f\144\x69\x76\76"); redirect(site_url("\x61\144\155\151\x6e\x2f\160\141\143\153\x61\147\x65\163")); } public function add_package() { if (isset($_POST["\x73\165\x62\x6d\151\164\x5f\160\141\143\x6b"])) { $arr = array("\x6e\141\x6d\145" => $this->input->post("\156\141\155\x65"), "\141\x6d\157\165\x6e\x74" => $this->input->post("\141\x6d\157\165\x6e\164"), "\143\x61\x73\x68\x62\141\x63\153" => $this->input->post("\143\141\x73\x68\x62\141\x63\153")); $q = $this->db->insert("\160\x61\143\x6b\x61\x67\145", $arr); if ($q) { $this->session->set_flashdata("\x73\x75\x63\143\x5f\x70\x61\143\153", "\74\x64\151\166\x20\143\x6c\x61\163\x73\75\x22\x61\154\x65\162\x74\x20\x61\x6c\145\x72\x74\x2d\x73\x75\143\x63\145\163\163\42\76\x50\x61\x63\153\x61\x67\145\40\x61\144\x64\x65\x64\40\163\x75\143\x63\x65\x73\x73\x66\165\x6c\x6c\171\x3c\57\x64\151\x76\76"); redirect(site_url("\x61\x64\x6d\151\156\x2f\160\141\143\x6b\x61\x67\145\163")); } else { $this->session->set_flashdata("\x66\141\151\154\x5f\x70\141\143\x6b", "\x3c\144\151\166\x20\x63\154\141\x73\163\75\42\x61\154\145\162\164\x20\141\154\x65\162\x74\55\x64\x61\156\x67\145\x72\x22\76\x53\157\x6d\145\x74\x68\x69\x6e\147\40\x57\145\156\164\x20\x57\162\x6f\x6e\x67\56\74\x2f\x64\151\166\76"); redirect(site_url("\141\144\x6d\x69\x6e\57\x61\x64\x64\x5f\160\141\x63\x6b\x61\x67\145")); } } $data["\x74\x69\x74\154\x65"] = "\101\x64\x64\x20\120\141\x63\153\141\x67\x65\x20"; $this->load->view("\x61\x64\x6d\x69\x6e\61\57\x61\x64\144\137\160\141\143\x6b\x61\147\145", $data); } public function refer_history() { $data["\x68\x69\163\x74\157\162\171"] = $this->Administrator_Model->refer_history(); $this->load->view("\x61\144\x6d\151\156\x31\57\162\145\146\x65\162\137\x68\151\163\164\x6f\162\171", $data); } public function transfer_money_history() { $data["\x68\151\x73\x74\157\x72\171"] = $this->Administrator_Model->transfer_money_history(); $this->load->view("\141\144\155\151\156\61\57\164\x72\141\156\x73\x66\x65\x72\x5f\x6d\x6f\x6e\x65\171\x5f\150\x69\163\164\x6f\x72\x79", $data); } public function winning_transfer_history() { $data["\150\151\x73\x74\x6f\x72\x79"] = $this->Administrator_Model->winning_transfer_history(); $this->load->view("\141\144\155\x69\156\x31\57\167\x69\156\x6e\x69\x6e\147\x5f\x74\162\141\x6e\x73\146\145\x72\137\x68\x69\x73\164\x6f\x72\171", $data); } public function register() { if ($this->input->post("\x73\x75\142\x6d\x69\x74")) { $this->load->library("\x66\157\162\x6d\137\166\x61\154\151\144\x61\x74\151\x6f\156"); $this->form_validation->set_rules("\x6d\x6f\x62\x69\154\x65\x5f\x6e\157", "\115\157\142\x69\154\145\x20\116\x75\155\x62\145\162", "\162\x65\x71\165\151\162\145\144\174\162\x65\x67\x65\x78\x5f\155\141\164\x63\150\x5b\57\x5e\133\65\x2d\71\x5d\133\x30\x2d\x39\x5d\173\71\x7d\x24\x2f\135"); $this->form_validation->set_rules("\x75\163\145\x72\156\x61\155\145", "\165\x73\x65\162\x6e\x61\155\x65", "\x72\x65\161\165\x69\x72\145\x64\x7c\164\162\x69\x6d"); $this->form_validation->set_rules("\156\x61\155\x65", "\x6e\141\x6d\145", "\x72\x65\x71\165\x69\x72\145\x64\174\164\x72\151\x6d"); $this->form_validation->set_rules("\x6d\x70\x69\156", "\x6d\x70\x69\156", "\162\145\161\x75\151\162\145\x64\174\164\162\x69\155"); $this->form_validation->set_rules("\x70\141\x73\163\x77\157\162\x64", "\120\141\163\163\167\157\162\144", "\162\x65\x71\165\151\162\x65\x64\174\x74\162\x69\155"); if ($this->form_validation->run() == FALSE) { $error_msg = validation_errors(); $this->session->set_flashdata("\145\162\x72\157\x72", $error_msg); return redirect($_SERVER["\x48\124\124\x50\137\122\105\x46\105\x52\x45\122"]); } else { $post = $this->input->post(); $check_mobile = $this->db->where("\155\x6f\x62\x69\154\x65\x6e\157", $post["\155\157\142\151\154\x65\137\x6e\x6f"])->get("\165\x73\x65\162\137\160\162\x6f\x66\x69\154\145")->num_rows(); $check_refer = $this->db->where("\x75\x73\145\x72\x5f\x72\x65\146\x65\x72\145\x6e\x63\145\x5f\x63\157\x64\x65", $post["\162\145\x66\x65\x72\x5f\x63\x6f\x64\x65"])->get("\x75\163\145\x72\x5f\160\x72\157\x66\151\154\x65")->num_rows(); if ($check_mobile > 0) { $this->session->set_flashdata("\x65\162\162\157\162", "\x3c\144\x69\166\40\143\x6c\141\163\x73\75\x22\x61\x6c\x65\x72\164\40\141\x6c\145\162\x74\55\144\141\156\x67\x65\x72\42\x3e\115\157\142\151\x6c\145\x20\156\x75\155\x62\x65\x72\40\x61\154\162\x65\141\x64\x79\40\162\x65\x67\x69\163\x74\145\162\74\x2f\x64\x69\x76\76"); return redirect($_SERVER["\x48\124\x54\x50\137\122\105\106\105\x52\105\122"]); } elseif ($check_refer == 0) { $this->session->set_flashdata("\145\x72\162\x6f\x72", "\74\144\151\166\40\143\154\x61\x73\x73\75\42\x61\x6c\145\x72\164\40\141\x6c\x65\x72\164\55\x64\x61\x6e\147\145\162\x22\x3e\x52\x65\x66\x65\x72\x20\143\x6f\144\x65\40\x6e\157\x74\x20\x66\157\x75\156\x64\x3c\x2f\144\x69\x76\x3e"); return redirect($_SERVER["\x48\124\x54\120\x5f\122\105\x46\105\x52\105\x52"]); } else { $this->load->model("\x75\x73\x65\x72\137\155\x6f\144\145\x6c"); $inset = array("\x6e\141\155\x65" => $post["\156\x61\155\145"], "\165\163\145\162\156\141\155\x65" => $post["\x75\x73\x65\162\x6e\x61\155\x65"], "\155\x6f\x62\x69\x6c\x65\156\157" => $post["\155\x6f\142\x69\154\x65\x5f\156\157"], "\x70\x61\163\x73\x77\x6f\162\144" => $post["\x70\141\163\x73\x77\157\x72\144"], "\155\151\x64" => $post["\x6d\160\151\x6e"], "\162\145\x66\x66\x65\x72\x65\144\x5f\143\x6f\x64\x65" => $post["\x72\145\146\145\162\x5f\x63\157\144\145"] != '' ? $post["\x72\145\x66\x65\162\x5f\x63\157\144\x65"] : ''); $inset["\165\x73\x65\x72\x5f\x72\x65\x66\145\162\145\x6e\143\x65\137\x63\x6f\144\145"] = $this->user_model->isExistingUserRef(); $this->db->insert("\165\163\145\x72\x5f\x70\x72\157\146\151\x6c\x65", $inset); $user_id = $this->db->insert_id(); $this->db->insert("\x74\142\154\167\x61\x6c\154\x65\164", array("\x75\x73\x65\162\x5f\x69\x64" => (int) $user_id, "\167\141\x6c\154\x65\x74\137\160\157\151\156\x74\x73" => 0, "\x6d\x61\151\x6e\x5f\x77\x61\x6c\154\145\164\x5f\160\157\151\156\164\x73" => 0)); $this->session->set_flashdata("\163\165\x63\x63\145\163\163", "\74\x64\x69\x76\x20\x63\154\141\163\x73\75\x22\141\154\145\162\164\40\x61\154\145\x72\x74\x2d\x64\x61\x6e\x67\x65\x72\42\76\125\x73\145\x72\x20\x69\x6e\x73\x65\x72\164\145\x64\74\x2f\144\x69\x76\76"); return redirect($_SERVER["\110\124\x54\x50\137\x52\105\106\105\x52\x45\x52"]); } } } $this->load->view("\141\144\x6d\151\156\x31\57\162\x65\x67\151\x73\x74\x65\162", $data); } }?>
Function Calls
None |
Stats
MD5 | bd5f31ca31cacd2b322123189db587ff |
Eval Count | 0 |
Decode Time | 146 ms |