<?php require_once "../../../include/config.php"; require_once $basedir . "/admin/include/functions.php"; $private_key = $config['private_key']; $hash = isset($_POST['hash']) ? $_POST['hash'] : 0; $public_key = isset($_POST['public']) ? $_POST['public'] : 0; $time = isset($_POST['t']) ? $_POST['t'] : 0; $myhash = md5($public_key . $private_key . $time); if ($hash != $myhash) { echo json_encode(array('error' => 'Hash is invalid')); exit; } $dollarvalue = isset($_POST['dollar']) ? $_POST['dollar'] : 0; $coinvalue = isset($_POST['coin']) ? $_POST['coin'] : 0; if (!$coinvalue or !$dollarvalue) { echo json_encode(array('error' => 'Some fields are blank')); exit; } $bool = addPackage($coinvalue, $dollarvalue); if ($bool) { echo json_encode(array('error' => '', 'status' => $bool)); exit; } else { echo json_encode(array('error' => '', 'status' => 'fail')); exit; }
require_once 'include.php'; $act = $_REQUEST['act']; //@$id=$_REQUEST['id']; @($recipients_id = $_REQUEST['recipients_id']); @($user_id = $_REQUEST['user_id']); if ($act == "register") { $mes = register(); } elseif ($act == "login") { $mes = login(); } elseif ($act == "userOut") { $mes = userOut(); } elseif ($act == "changePwd") { $mes = changePwd(); } elseif ($act == "addPackage") { $mes = addPackage(); } elseif ($act == "addRecipients") { $mes = addRecipients(); } elseif ($act == "delRecipients") { $mes = delRecipients($recipients_id, $user_id); } elseif ($act == "addOrder") { $mes = addOrder(); } ?> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Welcome</title> </head>