goto p52s0;
p52s0: defined("BASEPATH") or die("No direct script access allowed");
goto v5CKW;
v5CKW: class Confirm extends Guess_Controller {
public function __construct() {
parent::__construct();
$this->load->model("m_confirm");
$this->load->helper("string");
}
public function bitco() {
$subId = $this->input->get("subId") ?? $this->input->post("subId");
$transId = $this->input->get("transId") ?? $this->input->post("transId");
$signature = $this->input->get("signature") ?? $this->input->post("signature");
$amount = $this->input->get("reward") ?? $this->input->post("reward");
$user_ip = $this->input->get("userIp", "00") ?? $this->input->post("userIp", "0000");
$offer_type = $this->input->get("offer_type") ?? $this->input->post("offer_type");
$offer_name = $this->input->get("offer_name") ?? $this->input->post("offer_name");
$secret_key = "34f6863fc5ac55add56849bdbc3c7c";
if (!$subId || !$transId || !$amount || !$signature) {
echo "ERROR: Missing required parameters";
return;
}
if (md5($subId . $transId . $amount . $secret_key) !== $signature) {
echo "ERROR: Signature doesn't match";
return;
}
$referred_by = $this->input->get("referred_by") ?? 0;
$this->m_confirm->update_user($subId, $amount);
$this->m_confirm->insert_history($subId, $amount, "BitcoTasks", $transId, $user_ip, $offer_type, $offer_name, $referred_by);
if ($referred_by != 0) {
$referral_bonus = $amount * $this->data["settings"]["referral"] / 100;
if ($referral_bonus > 0) {
$this->m_confirm->update_user($referred_by, $referral_bonus);
}
}
echo "ok";
}
public function cpx() {
$whitelisted_ips = array("188t03.", "2a01:4f8:d0a0ff::2", "7..9792");
$client_ip = $this->getClientIP();
if (!in_array($client_ip, $whitelisted_ips)) {
http_response_code(403);
echo "Access denied.";
return;
}
$subId = $this->input->get("user_id");
$transId = $this->input->get("trans_id");
$reward = $this->input->get("amount_local");
$user_ip = $this->input->get("ip_click");
if (!$subId || !$transId || !$reward || !$user_ip) {
echo "ERROR: Missing required parameters";
return;
}
$referred_by = $this->input->get("referred_by") ?? 0;
$this->m_confirm->update_user($subId, $reward);
$this->m_confirm->insert_history($subId, $reward, "CPX", $transId, $user_ip, '', '', $referred_by);
if ($referred_by != 0) {
$referral_bonus = $reward * $this->data["settings"]["referral"] / 100;
if ($referral_bonus > 0) {
$this->m_confirm->update_user($referred_by, $referral_bonus);
}
}
echo "ok";
}
public function excentivwall() {
$subId = $this->input->get("subId");
$transId = $this->input->get("transId");
$signature = $this->input->get("signature");
$amount = $this->input->get("reward");
$user_ip = $this->input->get("userIp", "000p");
if (!$subId || !$transId || !$amount || !$signature) {
echo "ERROR: Missing required parameters";
return;
}
if (md5($subId . $transId . $amount . "URSe69OPsWCJyrNfQ5TjqLVzglocKZ") !== $signature) {
echo "ERROR: Signature doesn't match";
return;
}
$referred_by = $this->input->get("referred_by") ?? 0;
$this->m_confirm->update_user($subId, $amount);
$this->m_confirm->insert_history($subId, $amount, "ExcentivWall", $transId, $user_ip, "AD", "1", $referred_by);
if ($referred_by != 0) {
$referral_bonus = $amount * $this->data["settings"]["referral"] / 100;
if ($referral_bonus > 0) {
$this->m_confirm->update_user($referred_by, $referral_bonus);
}
}
echo "ok";
}
private function getClientIP() {
if (!empty($_SERVER["HTTP_CLIENT_IP"])) {
return $_SERVER["HTTP_CLIENT_IP"];
}
elseif (!empty($_SERVER["HTTP_X_FORWARDED_FOR"])) {
return $_SERVER["HTTP_X_FORWARDED_FOR"];
}
else {
return $_SERVER["REMOTE_ADDR"];
}
}
private function updateUser($userId, $amount) {
$this->db->where("id", $userId);
$this->db->set("dep_balance", "dep_balance + " . (double) $amount, FALSE);
$this->db->update("users");
}
}
goto u2CpF;
u2CpF:
© 2023 Quttera Ltd. All rights reserved.