function showInvocationsTown($bdd, $townID) { global $atown19, $atown23; $showInvocationTown = $bdd->prepare('SELECT * FROM Caranille_Towns_Invocations WHERE Town_Invocation_Town_ID = ? ORDER BY Town_Invocation_ID desc'); $showInvocationTown->execute([$townID]); ?> <br><table class="table"> <tr> <th>Invocation</th> <th></th> </tr> <?php while ($invocation = $showInvocationTown->fetch()) { $invocationID = stripslashes($invocation['Town_Invocation_Invocation_ID']); $townInvocationID = stripslashes($invocation['Town_Invocation_ID']); ?> <tr> <td> <?php newInvocation($bdd, $invocationID)->getName(); ?> </td> <td> <form method="POST" action="Delete.php"> <input type="hidden" name="townID" value="<?php echo $townID; ?> "> <input type="hidden" name="townInvocationID" value="<?php echo $townInvocationID; ?> "> <input class="btn btn-warning" type="submit" value="<?php echo $atown23; ?> "> </form> </td> </tr> <?php } ?> </table> <?php $showInvocationTown->closeCursor(); }
<?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); $battle = findBattle($bdd, $characterID); $invocationID = htmlspecialchars(addslashes($_POST['invocationID'])); $MPChoice = htmlspecialchars(addslashes($_POST['MPChoice'])); $invocation = newInvocation($bdd, $invocationID); ?> <div class="panel panel-warning"> <div class="panel-heading"> <img src="<?php echo $monsterPicture; ?> " alt=""> </div> <div class="panel-body"> <?php if ($characterMP >= $MPChoice) { $invocationDamageTotal = $invocation->getDamage() * $MPChoice; if ($totalDamageMonster <= 0) { $totalDamageMonster = 0;