Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
- <?php
- include 'Check.php';
- $gamePass=mysql_fetch_array(mysql_query("SELECT * FROM games WHERE id='".$_REQUEST["id"]."'"));
- $Host = $gamePass["username"];
- if(isset($_POST["Bio"])){
- $_SESSION["Bio"] = $_POST["Bio"];
- }
- echo $_SESSION["Bio"];
- if ($myusername == $Host){ //check if in monsters.xml, if it is place it into the "active.txt"...use active.txt to carry values around, if not continue onto making it so they can spawn the entity and when they hit save instruct them to load the entity.
- if(file_exists("upload/users/".$Host."/monsters/".$_REQUEST["Mon"].".xml")){
- $_SESSION['ActiveEntity'] = $_REQUEST["Mon"];
- echo "Entity: " . $_REQUEST["Mon"] . " has been loaded, you may close this window!";
- }
- else{
- ?>
- <center>
- <form action="" name="forment" method="post">
- Create new Entity(player/npc): <?php echo $_REQUEST["Mon"]; ?>
- <table>
- <tr><td>Bio:</td><td><textarea cols="40" rows="5" name="Bio">
- Bob was an average salary man until he discovered one piece.
- </textarea></td></tr>
- <tr><td>Level:</td><td><input name="Lvl" type="text" id="Lvl" size="63" /></td></tr>
- <tr><td>Inventory:</td><td><input name="Inv" type="text" id="Inv" size="63" /></td></tr>
- <tr><td>Class:</td><td><input name="Class" type="text" id="Class" size="63" /></td></tr>
- <tr><td>Race:</td><td><input name="Race" type="text" id="Race" size="63" /></td></tr>
- <tr><td>Subclass:</td><td><input name="SClass" type="text" id="SClass" size="63" /></td></tr>
- <tr><td>Armor Slot:</td><td><input name="ArmS" type="text" id="ArmS" size="63" /></td></tr>
- <tr><td><input name="save" type="submit" id="save" value="Save" /></td></tr>
- </table>
- </form>
- </center>
- <script type="text/javascript">
- $(document).ready(function(){
- $("#save").click(function(){
- alert("Passed!");
- var Bioval = $("#Bio").val();
- var Invval = $("#Inv").val();
- var Classval = $("#Class").val();
- var Raceval = $("#Race").val();
- var SClassval = $("#SClass").val();
- var ArmSval = $("#ArmS").val(); //PHP_SELF is empty and the post isn't even sending
- $.post("<?php echo $PHP_SELF; ?>", { Bio: Bioval, Inv: Inval, Class: Classval, Race: Raceval, SClass: SClassval, ArmS: ArmSval}); //This isn't being posted for some reason
- return false;
- });
- });
- </script>
- <?php
- }
- }
- else{
- echo "You are not host of this game!";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement