<?php ob_start(); session_start(); include_once "../classes/ConnectionFactory.php"; include_once "../properties/constants.php"; include_once "../properties/serverproperties.php"; include_once "../classes/User.php"; include_once "../classes/Item.php"; include_once "../classes/Utils.php"; include_once "../classes/common_functions.php"; include_once '../googlecheckout/google_checkout.php'; $fn = new common_functions(); $userID = $_SESSION['userID']; $user = User::getUser($userID); $update_cash = $fn->get('update_cash'); $diamonds = $fn->get('diamonds'); $refill = $fn->get('refill'); $attack_type = $fn->get('attack_type'); $userID = $fn->get('userID'); $itemID = $fn->get('itemID'); $itemType = $fn->get('itemType'); $missionID = $fn->get('missionID'); $cityID = $fn->get('cityID'); $add_soldier = $fn->get('add_soldier'); $stolen_goods = $fn->get('stolen_goods'); $blackmarket_goods = $fn->get('blackmarket_goods'); $updateDiamond = $fn->get('update_diamond'); $request_quantity = $fn->get('request_quantity'); $quantity = $fn->get('quantity'); $previousQuanity = $fn->get('previousQuanity');
<?php include_once "../properties/serverproperties.php"; include_once "../classes/Bounty.php"; include_once "../classes/User.php"; require_once '../classes/common_functions.php'; $fn = new common_functions(); session_start(); $userID = $_SESSION['userID']; //echo '<br/>'; $serverRoot; $targetID = $fn->get('targetID'); //echo '<br/>'; $payment = $fn->get('bountyAmount'); $payment = $payment - ceil($payment * 0.1); //echo '<br/>'; //echo '<br/>'; $userBounty = User::getUser($userID); $targetName = $userBounty->getName(); if ($payment > $userBounty->getCash()) { header("Location: {$serverRoot}externalplayerprofile.php?error=notEnoughCashForBounty&userID={$targetID}"); } else { if ($userBounty->checkSameUsersInAgency($userID, $targetID) == true) { $_SESSION['sameAgencyUser'] = true; header("Location: {$serverRoot}externalplayerprofile.php?error=sameAgencyUser&userID={$targetID}"); } else { $bounty = Bounty::createBounty($userID, $targetID, $payment); if (!$bounty) { //echo '!$bounty found'; $fn->redirect("{$serverRoot}externalplayerprofile.php?error=unKnownError&userID={$targetID}"); }