function showMessagePrivate($bdd, $accountID) { global $messageprivate0, $messageprivate1, $messageprivate2; $MPList = $bdd->prepare("SELECT * FROM Caranille_Private_Messages \n WHERE (Private_Message_Receiver = ? OR Private_Message_Transmitter = ?) AND Private_Message_Parent_ID = '0'"); $MPList->execute([$accountID, $accountID]); while ($MP = $MPList->fetch()) { ?> <table class="table"> <tr> <th> <?php if ($MP['Private_Message_Lu'] == '0' && $MP['Private_Message_Transmitter'] != $accountID) { ?> <span class="glyphicon glyphicon-star" aria-hidden="true"></span> <?php } else { ?> <span class="glyphicon glyphicon-star-empty" aria-hidden="true"></span> <?php } $parentID = stripslashes($MP['Private_Message_ID']); $transit = newCharacter($bdd, $MP['Private_Message_Transmitter']); echo ": " . $transit->getFirstName() . " " . $transit->getLastName(); ?> <?php echo $messageprivate0; stripslashes($MP['Private_Message_Subject']); $messageprivate1; ?> <form method="POST" action="Conversation.php"> <input type="hidden" name="parentID" value="$parentID"> <input type="submit" class="btn btn-info" value="<?php echo $messageprivate2; ?> "> </form> </th> </tr> <tr> <td> <?php echo stripslashes($MP['Private_Message_Message']); ?> </td> </tr> </table> <hr> <?php } }
<?php if (isset($_SESSION['Account_ID'])) { $account = newAccount($bdd, $_SESSION['Account_ID']); $character = newCharacter($bdd, $_SESSION['Account_ID']); $town = newTown($bdd, $character->getTownID()); $verifyBattle = verifyBattle($bdd, $character->getID()); if ($verifyBattle >= 1) { $monster = newBattleMonster($bdd, $character->getID()); $monsterID = $monster->getID(); $monsterPicture = $monster->getPicture(); $monsterName = $monster->getName(); $monsterDescription = $monster->getDescription(); $monsterLevel = $monster->getLevel(); $monsterHP = $monster->getHp(); $monsterMP = $monster->getMp(); $monsterStrength = $monster->getStrength(); $monsterMagic = $monster->getMagic(); $monsterAgility = $monster->getAgility(); $monsterDefense = $monster->getDefense(); $monsterExperience = $monster->getExperience(); $monsterGold = $monster->getGold(); $minStrength = $character->getStrength() / 1.1; $maxStrength = $character->getStrength() * 1.1; $minMagic = $character->getMagic() / 1.1; $maxMagic = $character->getMagic() * 1.1; $minDefense = $character->getDefense() / 1.1; $maxDefense = $character->getDefense() * 1.1; $monsterMinStrength = $monster->getStrength() / 1.1; $monsterMaxStrength = $monster->getStrength() * 1.1; $monsterMinDefense = $monster->getDefense() / 1.1;