Пример #1
0
<?php

$timeStart = microtime(true);
session_start();
ob_start();
if (empty($_SESSION)) {
    exit(header("Location: ../../index.php"));
}
require_once $_SESSION['File_Root'] . '/Kernel/Include.php';
require_once $_SESSION['File_Root'] . '/HTML/Header.php';
require_once 'Functions/SQL.php';
redirectToLogin($accountID, $linkRoot);
redirectToBattle($verifyBattle, $linkRoot);
$itemID = htmlspecialchars(addslashes($_POST['itemID']));
$canBePurchased = canBePurchased($bdd, $itemID, $characterTownID);
if ($canBePurchased == 1) {
    $item = newItem($bdd, $itemID);
    if ($character->getGold() - $item->getPurchase() >= 0) {
        addItem($bdd, $itemID, $characterID);
        $gold = $character->getGold() - $item->getPurchase();
        updateCharacterGold($bdd, $gold, $characterID);
    } else {
        echo $itemShop14;
    }
} else {
    echo "An error has surved";
}
require_once $_SESSION['File_Root'] . '/HTML/Footer.php';
Пример #2
0
<?php

$timeStart = microtime(true);
session_start();
ob_start();
if (empty($_SESSION)) {
    exit(header("Location: ../../index.php"));
}
require_once $_SESSION['File_Root'] . '/Kernel/Include.php';
require_once $_SESSION['File_Root'] . '/HTML/Header.php';
require_once 'Functions/SQL.php';
redirectToLogin($accountID, $linkRoot);
redirectToBattle($verifyBattle, $linkRoot);
$equipmentID = htmlspecialchars(addslashes($_POST['EquipmentID']));
$canBePurchased = canBePurchased($bdd, $equipmentID, $characterTownID);
if ($canBePurchased == 1) {
    $number = verifyEquipment($bdd, $equipmentID, $characterID);
    if ($number <= 0) {
        $equipment = newEquipment($bdd, $equipmentID);
        addEquipment($bdd, $equipmentID, $characterID);
        $gold = $character->getGold() - $equipment->getPurchase();
        updateCharacterGold($bdd, $gold, $characterID);
    } else {
        updateEquipment($bdd, $characterID, $equipmentID);
    }
} else {
    echo "An error has surved";
}
require_once $_SESSION['File_Root'] . '/HTML/Footer.php';
Пример #3
0
<?php

$timeStart = microtime(true);
session_start();
ob_start();
if (empty($_SESSION)) {
    exit(header("Location: ../../index.php"));
}
require_once $_SESSION['File_Root'] . '/Kernel/Include.php';
require_once $_SESSION['File_Root'] . '/HTML/Header.php';
require_once 'Functions/SQL.php';
redirectToLogin($accountID, $linkRoot);
redirectToBattle($verifyBattle, $linkRoot);
$invocationID = htmlspecialchars(addslashes($_POST['invocationID']));
$canBePurchased = canBePurchased($bdd, $invocationID, $characterTownID);
if ($canBePurchased == 1) {
    $number = verifyInvocation($bdd, $invocationID, $characterID);
    if ($number <= 0) {
        $invocation = newInvocation($bdd, $invocationID);
        addInvocation($bdd, $invocationID, $characterID);
        $gold = $character->getGold() - $invocation->getPrice();
        updateCharacterGold($bdd, $gold, $characterID);
    } else {
        echo "{$temple8}";
    }
} else {
    echo "An error has surved";
}
require_once $_SESSION['File_Root'] . '/HTML/Footer.php';
Пример #4
0
<?php

$timeStart = microtime(true);
session_start();
ob_start();
if (empty($_SESSION)) {
    exit(header("Location: ../../index.php"));
}
require_once $_SESSION['File_Root'] . '/Kernel/Include.php';
require_once $_SESSION['File_Root'] . '/HTML/Header.php';
require_once 'Functions/SQL.php';
redirectToLogin($accountID, $linkRoot);
redirectToBattle($verifyBattle, $linkRoot);
$magicID = htmlspecialchars(addslashes($_POST['magicID']));
$canBePurchased = canBePurchased($bdd, $magicID, $characterTownID);
if ($canBePurchased == 1) {
    $number = verifyMagic($bdd, $magicID, $characterID);
    if ($number <= 0) {
        $magic = newMagic($bdd, $magicID);
        addMagic($bdd, $magicID, $characterID);
        $gold = $character->getGold() - $magic->getPrice();
        updateCharacterGold($bdd, $gold, $characterID);
    } else {
        ?>
		<?php 
        echo $magicShop8;
        ?>
		<?php 
    }
} else {
    ?>