<?php include_once 'Core.php'; chatHeadprint(); $AID = $_SESSION["idnum"]; if (isset($_POST["msg"])) { $MSG = $_POST["msg"]; $target = $_POST["Target"]; if ($target == 0) { AddtoChat($AID, $MSG, 1, 0); } else { AddtoChat($AID, $MSG, 0, $target); } } echo "<chatsender>"; echo "<form action='chatSend.php' method='post'>\n\t\t\t<select name='Target'>\n\t\t\t<option value='0'>All</option>"; $Favorites = getChatFavorites($AID); $FavoritesN = count($Favorites); if ($FavoritesN > 0) { for ($x = 0; $x < $FavoritesN; $x++) { echo "<option value='{$Favorites[$x]}'>"; $x++; echo "{$Favorites[$x]}</option>"; } } echo "</select>\n\t\t<input type='text' name='msg' class='chatbox'>\n\t\t<input type='submit' value='Send' class='MediumButton'>\n\t\t</form>"; echo "</chatsender>";
<?php include_once 'Functions.php'; Headprint(); $mode = $_POST["mode"]; $PID = $_SESSION["PID"]; if ($mode == "CHAT") { $msg = $_POST["msg"]; AddtoChat($PID, $msg, 1, 0); } else { if ($mode == "ACTION") { $AID = $_POST["activity"]; TakeAction($PID, $AID); } else { if ($mode == "MOVE") { $route = $_POST["route"]; MovePlayer($PID, $route); } else { if ($mode == "ACTIVATE") { $BID = $_POST["bag"]; activateItem($PID, $BID); } } } } PrintUI($PID);