Esempio n. 1
0
function showChapter($bdd, $characterChapter)
{
    global $story1;
    $chapterQuery = $bdd->prepare("SELECT * FROM Caranille_Chapters\n\tWHERE Chapter_Number = ?");
    $chapterQuery->execute([$characterChapter]);
    while ($chapterLevel = $chapterQuery->fetch()) {
        $chapter = newChapter($bdd, $chapterLevel['Chapter_ID']);
        ?>
		<?php 
        echo $chapter->getName();
        ?>
		<?php 
        echo $chapter->getOpening();
        ?>
<br />
		<form method="POST" action="Story.php">
		<input type="submit" class="btn btn-success" name="Start" value="<?php 
        echo $story1;
        ?>
">
		</form><br /><br />
		<?php 
    }
    $chapterQuery->closeCursor();
}
Esempio n. 2
0
$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);
?>

<br>
<div class="panel panel-warning">
	<div class="panel-heading"></div>
	<div class="panel-body">
	<?php 
$chapter = newChapter($bdd, $characterChapter);
$monsterID = htmlspecialchars(addslashes($chapter->getMonster()));
$monster = previewBattle($bdd, $monsterID);
addBattle($bdd, $characterID, $chapter->getID(), '0', 'Chapter');
$battle = findBattle($bdd, $characterID)['Battle_List_ID'];
addMonsterBattle($bdd, $battle, $monster->getID(), $monster->getPicture(), $monster->getName(), $monster->getDescription(), $monster->getLevel(), $monster->getHp(), $monster->getMp(), $monster->getStrength(), $monster->getMagic(), $monster->getAgility(), $monster->getDefense(), $monster->getExperience(), $monster->getGold());
exit(header("Location: {$linkRoot}/Modules/SkillPoint/index.php"));
?>
	</div>
</div>

<?php 
require_once $_SESSION['File_Root'] . '/HTML/Footer.php';
Esempio n. 3
0
<?php

$timeStart = microtime(true);
session_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);
hasAdmin($accountAccess);
$chapterID = $_POST['chapterID'];
$chapter = newChapter($bdd, $chapterID);
$chapterNumber = $chapter->getNumber();
$chapterName = $chapter->getName();
$chapterOpening = $chapter->getOpening();
$chapterEnding = $chapter->getEnding();
$chapterDefeate = $chapter->getDefeate();
$chapterMonster = $chapter->getMonster();
?>

<br>
<div class="panel panel-warning">
	<div class="panel-heading"></div>
	<div class="panel-body">
		<form method="POST" action="EndEdit.php">
			<?php 
echo $achapter6;
?>