Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ( in_array( $_SERVER['REMOTE_ADDR'], $allowedIps ) ) {
- @$action = $_GET['action'];
- @$data = json_decode($_GET['data']);
- if(empty($action) || empty($data) || @$data->secret != $secret) {
- die("X01");
- }
- switch($action) {
- case "givepoints":
- @$username = $data->username;
- @$points = is_int($data->points) ? $data->points : 2000000;
- $member = null;
- $bridge->member($member, $username, "username");
- $found = (strtolower($member['name']) == strtolower($username));
- //print_r($member);
- if($found) {
- $result = Database::query("INSERT INTO account_panel_data(username, store_credits, vote_points) VALUES(?, ?, ?) ON DUPLICATE KEY UPDATE store_credits = store_credits + ?, vote_points = vote_points + ?",
- [$username, $points, $points, $points, $points]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement