Jump to content
MakeWebGames

peterisgb

Members
  • Posts

    759
  • Joined

  • Last visited

  • Days Won

    46

Everything posted by peterisgb

  1. Optimizing the database stuff, explain, alot has changed since i left.   ty for the nice attempt, so with the unnecessary if statements, what should of do instead?   What do you mean by inline styling? I don't know how to properly do array logic, it confuses me and i get stuck, What do you mean constant defined in the middle of the script. functions that echo HTML, how else do i print something? print "? Yeah the staff options was abit rushed, That was the last thing i was working on before posting it up, Protection against staff SQL injections lol, ouch yeah i know, I've never quite got the hang of how to "secure stuff" reason why i don't run a game, just make crap lol. "Where's the classes? The extendibility? The awesome?!" explain, what awsome? the map is awsome and you can move around it and go into town and buy a house lol.
  2. I am kinda hoping that because this is such a great mod and idea that someone might clean it up and post it back here to share, i've done most of the hardwork, as its now free, input and peoples changes and ideas posted backk :D
  3. guys bug off with this lol. This thread is about my rubbish code with great ideas and potential, All comments about my map system please. Also if any of you have used this please post your updates here and i want this to be a communal project.
  4. Nice, Well this is a preview of what has been done so far, feel free to update this, secure it and repost your work back here, as i said its a big project and its alot to do on my own, specially when i aint a great coder and havent really been coding for the last few years.
  5. I don't really post here much, not as much as i should. This is a mod i have been working on, with some help for a while now, it could be better and would love to see what users do with it. Please do post back feedback and your updates. :D. This is a Map system, you can travel around the map, attack other players, find stuff, go to towns, buy a house within a town, upgrade your house, do missions and plans for more. Here goes, move.php <?php $locationmxy ="25"; $locationmxx ="25"; include "globals.php"; $tresder=(int) rand(100,999); if($ir['jail'] or $ir['hospital']) { echo "This page cannot be accessed while in jail or hospital."; $h->endpage(); exit; } $locationx = $ir['locationx']; $locationy = $ir['locationy']; $moves = $ir['moves']; $action = ( array_key_exists( 'action', $_GET) ? $_GET['action'] : "" ); switch ($action) { case 'moven': do_move1_north(); break; case 'movenw': do_move1_northwest(); break; case 'movene': do_move1_northeast(); break; case 'movew': do_move1_west(); break; case 'movee': do_move1_east(); break; case 'moves': do_move1_south(); break; case 'movesw': do_move1_southwest(); break; case 'movese': do_move1_southeast(); break; case 'search1': do_search1_ad(); break; case 'search2': do_search2_ad(); break; case 'staff': do_staff(); break; case 'stafftowncreate': staff_town_create(); break; case 'stafftowncreatedo': staff_town_create_do(); break; case 'stafftownedit': staff_town_edit(); break; case 'stafftowneditdo': staff_town_edit_do(); break; case 'stafftowneditcom': staff_town_edit_com(); break; case 'stafftowndelete': staff_town_delete(); break; case 'stafftowndeletedo': staff_town_delete_do(); break; case 'staffcreate': staff_create(); break; case 'staffcreatedo': staff_create_do(); break; case 'staffedit': staff_edit(); break; case 'staffeditdo': staff_edit_do(); break; case 'staffeditcom': staff_edit_com(); break; case 'staffdelete': staff_delete(); break; case 'staffdeletedo': staff_delete_do(); break; case 'staffmoveuser': staff_move_user(); break; case 'staffmoveuserdo': staff_move_user_do(); break; case 'staffmoveusercom': staff_move_user_com(); break; default: echo "<br /><hr /><h3>The Maps</h3>"; if($ir['user_level'] == 2) { echo "<a href=move.php?action=staff>Staff Options</a><br />"; } echo " <small>Being a donator you are 2x more likely to find money and gold while searching the map.</small><br /> <small>Please Note that most images are only temporary until system is completed</small> <table width='95%'> <tr><td></td> <td align='center'> </td><tr> <tr><td align='center' valign='top' width='100'><hr />"; if ($locationy == 0) { $northstop="<img src='/images/no.png' width='44' height='44'>"; } else { $northstop="<a href='move.php?action=moven'><img src='/images/up.png'></a>"; } if ($locationy == 0) { $northstopwest="<img src='/images/no.png' width='42' height='42'>"; } else { $northstopwest="<a href='move.php?action=movenw'><img src='/images/nw.png'></a>"; } if ($locationy == 0) { $northstopeast="<img src='/images/no.png' width='42' height='42'>"; } else { $northstopeast="<a href='move.php?action=movene'><img src='/images/ne.png'></a>"; } if ($locationy == $locationmxy) { $eaststop="<img src='/images/no.png' width='44' height='44'>"; } else { $eaststop="<a href='move.php?action=movee'><img src='/images/right.png'></a>"; } if ($locationx == $locationmxx) { $southstop="<img src='/images/no.png' width='44' height='44'>"; } else { $southstop="<a href='move.php?action=moves'><img src='/images/down.png'></a>"; } if ($locationx == 0) { $southstopwest="<img src='/images/no.png' width='42' height='42'>"; } else { $southstopwest="<a href='move.php?action=movesw'><img src='/images/sw.png'></a>"; } if ($locationx == 0) { $southstopeast="<img src='/images/no.png' width='42' height='42'>"; } else { $southstopeast="<a href='move.php?action=movese'><img src='/images/se.png'></a>"; } if ($locationx == 0) { $weststop="<img src='/images/no.png' width='44' height='44'>"; } else { $weststop="<a href='move.php?action=movew'><img src='/images/left.png'></a>"; } if ($moves <= 0) { echo "No Moves, Nav Disabled"; } else { echo " Your Map Location: <font color='blue' size='3'> <font color='green'>".$locationx."</font>, <font color='red'>".$locationy."</font><br /> You have <font color='yellow'>".$moves."</font> left.</font><hr /> <table> <tr> <td><font color='red'><b>N</b></font><font color='green'><b>W</b></font></td> <td></td> <td align='center'><font color='red'><b>N</b></font></td> <td></td> <td><font color='red'><b>N</b></font><font color='green'><b>E</b></font></td> </tr> <tr> <td></td> <td align='center'>".$northstopwest."</td> <td align='center'>".$northstop."</td> <td align='center'>".$northstopeast."</td> <td></td> </tr> <tr> <td><font color='green'><b>W</b></font></td> <td align='center'>".$weststop."</td> <td align='center'><b>+</b></td> <td align='center'>".$eaststop."</a></td> <td><font color='green'><b>E</b></font></td> </tr> <tr> <td></td> <td align='center'>".$southstopwest."</td> <td align='center'>".$southstop."</td> <td align='center'>".$southstopeast."</td> <td></td> </tr> <tr> <td><font color='red'><b>S</b></font><font color='green'><b>W</b></font></td> <td></td> <td align='center'><font color='red'><b>S</b></font></td> <td></td> <td><font color='red'><b>S</b></font><font color='green'><b>E</b></font></td> </tr> </table>"; } echo "<hr /><h4>Misc</h4>"; $ulocation = array(); $ulocationq = $db->query("SELECT * FROM users"); while ($r=$db->fetch_row($ulocationq)){ $username = $r['username']; $ulocation[$r['userid']] = array(); $ulocation[$r['userid']][0] = $r['locationy']; $ulocation[$r['userid']][1] = $r['locationx']; } if($ir['donatordays']) { $x1 = rand(1,50); $y1 = rand(1,50); $x2 = rand(1,50); $y2 = rand(1,20); $x3 = rand(1,50); $y3 = rand(1,50); $x4 = rand(1,50); $y4 = rand(1,50); $x1 = rand(1,50); $y1 = rand(1,50); $x2 = rand(1,50); $y2 = rand(1,50); $x3 = rand(1,50); $y3 = rand(1,50); $x4 = rand(1,50); $y4 = rand(1,50); } else { $x1 = rand(1,50); $y1 = rand(1,50); $x2 = rand(1,50); $y2 = rand(1,50); $x3 = rand(1,50); $y3 = rand(1,50); $x4 = rand(1,50); $y4 = rand(1,50); } // Display Missions $mission = $db->query("SELECT * FROM mapmission"); while($mapm = $db->fetch_row($mission)) { $id = $mapm['id']; $mmy = $mapm['locationy']; $mmx = $mapm['locationx']; $missionnamelink = $mapm['missionlink']; if (($locationy == $mmy) && ($locationx == $mmx)) { echo "<a href='move.php?action=".$id."'>".$missionnamelink."</a>"; } } // Display Towns $town = $db->query("SELECT * FROM maptowns"); while($t = $db->fetch_row($town)) { $name = $t['townID']; $tmy = $t['locationy']; $tmx = $t['locationx']; if (($locationy == $tmy) && ($locationx == $tmx)) { echo "<h3>Town of $name<br /> <a href='movetown1.php'><u>Check it Out</u></a><br /></h3>"; } } if (($locationy == $y1) && ($locationx == $x1)) { echo "<h3>Hmm.. Whats that?<br /> <a href='move.php?action=search1'><u>Check it Out</u></a><br /></h3>"; } if (($locationy == $y2) && ($locationx == $x2)) { echo "<h3>Hmm.. Whats that?<br /> <a href='move.php?action=search2'><u>Check it Out</u></a><br /></h3>"; } if (($locationy == $y3) && ($locationx == $x3)) { echo "<h3>Hmm.. Whats that?<br /> <a href='move.php?action=search1'><u>Check it Out</u></a><br /></h3>"; } if (($locationy == $y4) && ($locationx == $x4)) { echo "<h3>Hmm.. Whats that?<br /> <a href='move.php?action=search2'><u>Check it Out</u></a><br /></h3>"; } $i = 1; foreach($ulocation as $loc) { if (($locationy == $loc[1]) && ($locationx == $loc[0]) && ($i != $user_id)) { echo "<h3>Another User is Here.</h3> <a href='viewuser.php?u=".$i."'>View user ID ".$i."</a><br /> <a href='attack.php?ID=".$i."'>Attack user ID ".$i."</a><br /> <a href='mailbox.php?action=compose&ID=".$i."'>Mail user ID ".$i."</a><br /> "; } $i++; } echo "<hr /> <u><b>Legend</b></u><br /> <table width='110px'> <tr> <td>You</td> <td> - </td> <td><img src='/images/punki.jpg' width='20' height='20'></td> </tr> <tr> <td>Users</td> <td> - </td> <td><img src='/images/cop.jpg' width='20' height='20'></td> </tr> <tr> <td>Town</td> <td> - </td> <td><img src='/images/city.png' width='20' height='20'></td> </tr> <tr> <td>Missions</td> <td> - </td> <td><img src='/images/mission.png' width='20' height='20'></td> </tr> </table> <hr />"; echo "</td><td width='600' align='center'><small>(".$locationmxy."x".$locationmxx." Grid Currently.)</small><br />"; define('HEIGHT', $locationmxx); define('WIDTH', $locationmxy); define('GRASS', 0); define('MISSION', 1); define('YOU', 2); define('USERS', 3); define('TREE', 4); define('ROCK', 5); define('CITY', 6); define('CHURCH', 7); define('PUB', 8); define('HOUSE', 9); // Create blank map array [y][x] $map = array_fill(0, HEIGHT, array_fill(0, WIDTH, GRASS)); $i = 1; foreach($ulocation as $loc) { if($i != $user_id) { $map[$loc[1]][$loc[0]] = USERS; } $i++; } $map[$tmy][$tmx] = CITY; $map[$locationy][$locationx] = YOU; $map[$mmy][$mmx] = MISSION; // Translation table for integers to images $image = array( GRASS => '/images/grass.png', MISSION => '/images/mission.png', USERS => '/images/cop.jpg', TREE => '/images/grasstrees.png', ROCK => '/images/grassrock.png', CITY => '/images/city.png', YOU => '/images/punki.jpg', PUB => '/images/pub.png', HOUSE => '/images/grasshouse.png', CHURCH => '/images/church.png', ); // Display the map (Note that the \t and \n chars are simply for clarity) echo '<table style="background: url(/images/grass.png)" border="0" width="275px" height="275px">' . "\n"; for ($y = 0; $y < HEIGHT; $y++) { echo "\t" . '<tr>' . "\n"; for ($x = 0; $x < WIDTH; $x++) { echo "\t\t" . '<td><img src="'.$image[$map[$y][$x]].'" width="20" height="20"></td>' . "\n"; } echo "\t" . '</tr>' . "\n"; } echo '</table>'; echo "</td></tr> </table>"; } // Move Functions function do_move1_north() { global $db, $userid; $db->query("UPDATE users SET locationy=locationy-1, moves=moves-1 WHERE userid=$userid"); echo "Moved North<br /><meta http-equiv='refresh' content='0;URL=move.php' /> "; } function do_move1_northwest() { global $db, $userid; $db->query("UPDATE users SET locationy=locationy-1, locationx=locationx-2, moves=moves-1 WHERE userid=$userid"); echo "Moved North West<br /><meta http-equiv='refresh' content='0;URL=move.php' /> "; } function do_move1_northeast() { global $db, $userid; $db->query("UPDATE users SET locationy=locationy-1, locationx=locationx+2, moves=moves-1 WHERE userid=$userid"); echo "Moved North East<br /><meta http-equiv='refresh' content='0;URL=move.php' /> "; } function do_move1_east() { global $db, $userid; $db->query("UPDATE users SET locationx=locationx+1, moves=moves-1 WHERE userid=$userid"); echo "Moved East<br /><meta http-equiv='refresh' content='0;URL=move.php' /> "; } function do_move1_west() { global $db, $userid; $db->query("UPDATE users SET locationx=locationx-1, moves=moves-1 WHERE userid=$userid"); echo "Moved West<br /><meta http-equiv='refresh' content='0;URL=move.php' /> "; } function do_move1_southwest() { global $db, $userid; $db->query("UPDATE users SET locationy=locationy+1, locationx=locationx-1, moves=moves+2 WHERE userid=$userid"); echo "Moved South West<br /><meta http-equiv='refresh' content='0;URL=move.php' /> "; } function do_move1_southeast() { global $db, $userid; $db->query("UPDATE users SET locationy=locationy+1, locationx=locationx+1, moves=moves-2 WHERE userid=$userid"); echo "Moved South East<br /><meta http-equiv='refresh' content='0;URL=move.php' /> "; } function do_move1_south() { global $db, $userid; $db->query("UPDATE users SET locationy=locationy+1, moves=moves-1 WHERE userid=$userid"); echo "Moved South<br /><meta http-equiv='refresh' content='0;URL=move.php' /> "; } // searches function do_search1_ad() { global $db, $userid; $db->query("UPDATE users SET money=money+1000000 WHERE userid='$userid'"); echo "You Found 1000000 coins.<a href='move.php'>Continue</a>"; } function do_search2_ad() { global $db, $userid; $db->query("UPDATE users SET crystals=crystals+10000 WHERE userid='$userid'"); echo "You Found 10000 gold.<a href='move.php'>Continue</a>"; } // Staff Section function do_staff() { global $db,$ir, $c; if($ir['user_level'] != 2) { die("403"); } echo "<br /><br /> This Is Brand new so give me a chance to get all these options added and written.<br /> The Plan with this section is to be able to edit and create new missions to be put on the maps.<br /> If this goes to plan we should have all options controlling the map and all of its functions.<br /> <br /><br />Please do not use links below. These Missions links do work but are not yet ready for the map.<br /><br /> <i>Mission</i><br /> <a href=move.php?action=staffcreate>Create Mission</a><br /> <a href=move.php?action=staffedit>Edit Mission</a><br /> <a href=move.php?action=staffdelete>Delete Mission</a><br /><br /> <i>Towns</i><br /> <a href=move.php?action=stafftowncreate>Create Town</a><br /> <a href=move.php?action=stafftownedit>Edit Town</a><br /> <a href=move.php?action=stafftowndelete>Delete Town</a><br /><br /> <i>Other</i><br /> <a href=move.php?action=staffmoveuser>Move Users Location</a><br /> <br /> <a href=move.php>Back to Map</a><br /> "; } function staff_create() { global $db,$ir, $c; if($ir['user_level'] != 2) { die("Restricted Area"); } echo "<h3>Create Mission(s)</h3> Welcome to the mission section, Here you can create your mission to add to the maps.<br /> <form action='move.php?action=staffcreatedo' method='post'> Location Y :<input type='text' name='locationy' /><br /> Location X :<input type='text' name='locationx' /><br /> Mission Name : <input type='text' name='missionname' /><br /> Mission Length : <input type='text' name='missionlength' value='1'/><br /> Start Mission Link Text : <input type='text' name='missionlink' /><br /> Mission Text : <textarea rows=6 cols=60 name='missiontext' /></textarea><br /><hr /> Leave Mission Next Step Blank to End Mission.<br /> Mission Next Step : <textarea rows=6 cols=60 name='missionnext' /></textarea><br /> Mission Next Step Location : <br /> Location Y :<input type='text' name='locationynext' /><br /> Location X :<input type='text' name='locationxnext' /><br /><hr /> Mission Reward<br /> Cash : <input type='text' name='cash' /><br /> Gold : <input type='text' name='crystals' /><br /> Reward rewarded after mission? : <input type='text' name='rewardnumber' value='1'><br /> <input type='submit' value='Add Mission' /></form>"; } function staff_create_do() { global $db,$ir, $c; if($ir['user_level'] != 2) { die("Restricted Area"); } global $db,$c,$h,$userid; $db->query("INSERT INTO mapmission SET locationy={$_POST['locationy']}, locationx={$_POST['locationx']}, missionname='{$_POST['missionname']}', missionlength={$_POST['missionlength']}, missionlink='{$_POST['missionlink']}', missiontext='{$_POST['missiontext']}', missionnext='{$_POST['missionnext']}', locationynext={$_POST['locationynext']}, locationxnext='{$_POST['locationxnext']}', cash='{$_POST['cash']}', crystals='{$_POST['crystals']}', rewardnumber='{$_POST['rewardnumber']}'"); echo "Mission Created<br /><a href='move.php'>Back to Map<a/>"; } function staff_edit() { global $db,$ir, $c; if($ir['user_level'] != 2) { die("Restricted Area"); } global $db,$c,$h; echo " <form action='move.php?action=staffeditdo' method='post'> Item: ".mission_dropdown($c,'mission')."<br /> <input type='submit' value='Edit Mission' /></form>"; } function staff_edit_do() { global $db,$ir, $c; if($ir['user_level'] != 2) { die("Restricted Area"); } $d=$db->query("SELECT * FROM mapmission WHERE id={$_POST['mission']}"); $miss=$db->fetch_row($d); echo "<h3>Edit Mission(s)</h3> Welcome to the mission section, Here you can edit your mission to fix typos or update your mission.<br /> <form action='move.php?action=staffeditcom' method='post'> <input type='hidden' name='id' value='{$miss['id']}' /> Location Y :<input type='text' name='locationy' value='{$miss['locationy']}' /><br /> Location X :<input type='text' name='locationx' value='{$miss['locationx']}' /><br /> Mission Name : <input type='text' name='missionname' value='{$miss['missionname']}' /><br /> Mission Length : <input type='text' name='missionlength' value='{$miss['missionlength']}' /><br /> Start Mission Link Text : <input type='text' name='missionlink' value='{$miss['missionlink']}' /><br /> Mission Text : <textarea rows=6 cols=60 name='missiontext' value='' />{$miss['missiontext']}</textarea><br /><hr /> Leave Mission Next Step Blank to End Mission.<br /> Mission Next Step : <textarea rows=6 cols=60 name='missionnext' value='' />{$miss['missionnext']}</textarea><br /> Mission Next Step Location : <br /> Location Y :<input type='text' name='locationynext' value='{$miss['locationynext']}' /><br /> Location X :<input type='text' name='locationxnext' value='{$miss['locationxnext']}' /><br /><hr /> Mission Reward<br /> Cash : <input type='text' name='cash' value='{$miss['cash']}' /><br /> Gold : <input type='text' name='crystals' value='{$miss['crystals']}' /><br /> Reward rewarded after mission? : <input type='text' name='rewardnumber' value='{$miss['rewardnumber']}' /><br /> <input type='submit' value='Edit Mission' /></form>"; } function staff_edit_com() { global $db,$ir, $c; if($ir['user_level'] != 2) { die("Restricted Area"); } global $db,$c,$h; $db->query("INSERT INTO mapmission SET locationy={$_POST['locationy']}, locationx={$_POST['locationx']}, missionname='{$_POST['missionname']}', missionlength={$_POST['missionlength']}, missionlink='{$_POST['missionlink']}', missiontext='{$_POST['missiontext']}', missionnext='{$_POST['missionnext']}', locationynext={$_POST['locationynext']}, locationxnext='{$_POST['locationxnext']}', cash='{$_POST['cash']}', crystals='{$_POST['crystals']}', rewardnumber='{$_POST['rewardnumber']}'"); echo "Mission Edited<br /><a href='move.php'>Back to Map<a/>"; } function staff_delete() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("Restricted Area"); } echo "<h3>Deleting Mission</h3> The Mission will be permanently removed from the game.<br /> <form action='move.php?action=staffdeletedo' method='post'> Item: ".mission_dropdown($c,'mission')."<br /> <input type='submit' value='Delete Mission' /></form>"; } function staff_delete_do() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("Restricted Area"); } $d=$db->query("SELECT * FROM mapmission WHERE id={$_POST['mission']}"); $miss=$db->fetch_row($d); $db->query("DELETE FROM mapmission WHERE id={$_POST['mission']}"); echo "The {$miss['mission']} Mission was removed from the game."; } function staff_town_create() { global $db,$ir, $c; if($ir['user_level'] != 2) { die("Restricted Area"); } echo "<h3>Create Town</h3> Welcome to the create town section, Here you can create your town to add to the maps.<br /> <form action='move.php?action=stafftowncreatedo' method='post'> Town Name: <input type='text' name='townID' /><br /> Location Y: <input type='text' name='locationx' /><br /> Location X: <input type='text' name='locationy' /><br /> <input type='submit' value='Add Town' /></form>"; } function staff_town_create_do() { global $db,$ir, $c; if($ir['user_level'] != 2) { die("Restricted Area"); } global $db,$c,$h,$userid; $db->query("INSERT INTO maptowns SET townID='{$_POST['townID']}', locationy={$_POST['locationy']}, locationx={$_POST['locationx']}"); echo "Town Created<br /><a href='move.php'>Back to Map<a/>"; } function staff_town_edit() { global $db,$ir, $c; if($ir['user_level'] != 2) { die("Restricted Area"); } global $db,$c,$h; echo " <form action='move.php?action=stafftowneditdo' method='post'> Item: ".town_dropdown($c,'town')."<br /> <input type='submit' value='Edit Town' /></form>"; } function staff_town_edit_do() { global $db,$ir, $c; if($ir['user_level'] != 2) { die("Restricted Area"); } $d=$db->query("SELECT * FROM maptowns WHERE townID={$_POST['town']}"); $miss=$db->fetch_row($d); echo "<h3>Edit Town</h3> Welcome to the town section, Here you can edit your towns ID and location.<br /> <form action='move.php?action=stafftowneditcom' method='post'> <input type='hidden' name='id' value='{$miss['id']}' /> Town name: <input type='text' name='townID' value='{$miss['townID']}' /><br /> Location Y :<input type='text' name='locationy' value='{$miss['locationy']}' /><br /> Location X :<input type='text' name='locationx' value='{$miss['locationx']}' /><br /> <input type='submit' value='Edit Town' /></form>"; } function staff_town_edit_com() { global $db,$ir, $c; if($ir['user_level'] != 2) { die("Restricted Area"); } global $db,$c,$h; $db->query("INSERT INTO maptowns SET townID='{$_POST['townID']}', locationy={$_POST['locationy']}, locationx={$_POST['locationx']}"); echo "Town Edited<br /><a href='move.php'>Back to Map<a/>"; } function staff_town_delete() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("Restricted Area"); } echo "<h3>Deleting Town</h3> The Town Location will be permanently removed from the game.<br /> <form action='move.php?action=stafftowndeletedo' method='post'> Item: ".town_dropdown($c,'town')."<br /> <input type='submit' value='Delete Town' /></form>"; } function staff_town_delete_do() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] > 2) { die("Restricted Area"); } $d=$db->query("SELECT * FROM maptowns WHERE townID={$_POST['town']}"); $miss=$db->fetch_row($d); $db->query("DELETE FROM maptowns WHERE townID={$_POST['town']}"); echo "The {$miss['town']} Town was removed from the game."; } function staff_move_user() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("Restricted Area"); } print "<h3>Editing Users Location</h3> Enter users ID<br /> <form action='move.php?action=staffmoveuserdo' method='post'> User: <input type='text' name='user' value='0' /><br /> <input type='submit' value='Edit User Location' /></form>"; } function staff_move_user_do() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } $d=$db->query("SELECT * FROM users WHERE userid={$_POST['user']}"); $user=$db->fetch_row($d); echo "<h3>Editing Users Location</h3> <form action='move.php?action=staffmoveusercom' method='post'> <input type='hidden' name='userid' value='{$_POST['user']}' /><br /> <br /><br /> location x: <input type='text' name='locationx' value='{$user['locationx']}' /><br /> location y: <input type='text' name='locationy' value='{$user['locationy']}' /><br /> <input type='submit' value='Edit user location' /></form> <br />"; } function staff_move_user_com() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("Restricted Area"); } $db->query("UPDATE users SET locationx={$_POST['locationx']}, locationy={$_POST['locationy']} WHERE userid={$_POST['userid']}"); echo "User has been moved to location <font color='green'>{$_POST['locationx']} </font>, <font color='red'>{$_POST['locationy']}</font><meta http-equiv='refresh' content='2;URL=move.php' />"; } // Map interaction functions function do_leave() { echo "You Left, Returning to Map.<meta http-equiv='refresh' content='1;URL=move.php' /> "; } $h->endpage(); ?> movetown1.php <?php $locationmxy ="20"; $locationmxx ="20"; include "globals.php"; $tresder=(int) rand(100,999); if($ir['jail'] or $ir['hospital']) { echo "This page cannot be accessed while in jail or hospital."; $h->endpage(); exit; } $locationx = $ir['locationxt']; $locationy = $ir['locationyt']; $moves = $ir['moves']; $action = ( array_key_exists( 'action', $_GET) ? $_GET['action'] : "" ); switch ($action) { case 'moven': do_move1_north(); break; case 'movew': do_move1_west(); break; case 'movee': do_move1_east(); break; case 'moves': do_move1_south(); break; case 'leave': do_leave(); break; case 'entermainhouse': enter_main_house(); break; case 'house': enter_house(); break; case 'buyhouse': buy_house(); break; case 'buyhousedo': buy_house_do(); break; case 'sellhouse': sell_house(); break; case 'sellhousedo': sell_house_do(); break; case 'updatedesc': update_desc(); break; case 'updatedescdo': udpate_desc_do(); break; case 'allowguests': allow_guests(); break; case 'allowguestsdo': allow_guests_do(); break; case 'shop': enter_shop(); break; case 'church': enter_church(); break; case 'takeholywater': take_holywater(); break; case 'leaveholywater': leave_holywater(); break; case 'churchcontinue': church_continue(); break; case 'staff': do_staff(); break; case 'staffmoveuser': staff_move_user(); break; case 'staffmoveuserdo': staff_move_user_do(); break; case 'staffmoveusercom': staff_move_user_com(); break; default: $town = $db->query("SELECT * FROM maptowns"); while($t = $db->fetch_row($town)) { $name = $t['townID']; } echo "<br /><hr /><h3>In the Town of $name</h3><br /><a href=movetown1.php?action=leave>Back to Maps</a>"; if($ir['user_level'] == 2) { echo "<br /><a href=movetown1.php?action=staff>Staff Options</a><br />"; } echo " <small>Please Note that most images are only temporary until system is completed</small> <table width='95%'> <tr><td></td> <td align='center'> </td><tr> <tr><td align='center' valign='top' width='100'><hr />"; if ($locationy == 0) { $northstop="<img src='/images/no.png' width='44' height='44'>"; } else { $northstop="<a href='movetown1.php?action=moven'><img src='/images/up.png'></a>"; } if ($locationy == $locationmxy) { $eaststop="<img src='/images/no.png' width='44' height='44'>"; } else { $eaststop="<a href='movetown1.php?action=movee'><img src='/images/right.png'></a>"; } if ($locationx == $locationmxx) { $southstop="<img src='/images/no.png' width='44' height='44'>"; } else { $southstop="<a href='movetown1.php?action=moves'><img src='/images/down.png'></a>"; } if ($locationx == 0) { $weststop="<img src='/images/no.png' width='44' height='44'>"; } else { $weststop="<a href='movetown1.php?action=movew'><img src='/images/left.png'></a>"; } if ($moves <= 0) { echo "No Moves, Nav Disabled"; } else { echo " Your Map Location: <font color='blue' size='3'> <font color='green'>".$locationx."</font>, <font color='red'>".$locationy."</font><br /> You have <font color='yellow'>".$moves."</font> left.</font><hr /> <table> <tr> <td></td> <td></td> <td align='center'><font color='red'><b>N</b></font></td> <td></td> <td></td> </tr> <tr> <td></td> <td align='center'></td> <td align='center'>".$northstop."</td> <td align='center'></td> <td></td> </tr> <tr> <td><font color='green'><b>W</b></font></td> <td align='center'>".$weststop."</td> <td align='center'><b>+</b></td> <td align='center'>".$eaststop."</td> <td><font color='green'><b>E</b></font></td> </tr> <tr> <td></td> <td align='center'></td> <td align='center'>".$southstop."</td> <td align='center'></td> <td></td> </tr> <tr> <td></td> <td></td> <td align='center'><font color='red'><b>S</b></font></td> <td></td> <td></td> </tr> </table>"; } echo "<hr /><h4>Misc</h4>"; $ulocation = array(); $ulocationq = $db->query("SELECT * FROM users"); while ($r=$db->fetch_row($ulocationq)){ $username = $r['username']; $ulocation[$r['userid']] = array(); $ulocation[$r['userid']][0] = $r['locationyt']; $ulocation[$r['userid']][1] = $r['locationxt']; } if (($locationy == 0) && ($locationx == 0)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 0) && ($locationx == 1)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 0) && ($locationx == 2)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 0) && ($locationx == 3)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 0) && ($locationx == 4)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 0) && ($locationx == 5)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 0) && ($locationx == 6)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 0) && ($locationx == 7)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 0) && ($locationx == 8)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 0) && ($locationx == 9)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 0) && ($locationx == 10)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 0) && ($locationx == 11)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 0) && ($locationx == 12)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 0) && ($locationx == 13)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 0) && ($locationx == 14)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 0) && ($locationx == 15)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 0) && ($locationx == 16)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 0) && ($locationx == 17)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 0) && ($locationx == 18)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 0) && ($locationx == 19)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 2) && ($locationx == 0)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 2) && ($locationx == 1)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 2) && ($locationx == 2)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 2) && ($locationx == 4)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 2) && ($locationx == 5)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 2) && ($locationx == 6)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 2) && ($locationx == 7)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 2) && ($locationx == 8)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 2) && ($locationx == 9)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 2) && ($locationx == 12)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 2) && ($locationx == 13)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 2) && ($locationx == 14)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 2) && ($locationx == 15)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 2) && ($locationx == 16)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 2) && ($locationx == 18)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 2) && ($locationx == 19)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 3) && ($locationx == 0)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 3) && ($locationx == 1)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 3) && ($locationx == 2)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 3) && ($locationx == 4)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 3) && ($locationx == 5)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 3) && ($locationx == 6)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 3) && ($locationx == 7)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 3) && ($locationx == 8)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 3) && ($locationx == 9)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 3) && ($locationx == 12)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 3) && ($locationx == 13)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 3) && ($locationx == 14)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 3) && ($locationx == 15)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 3) && ($locationx == 16)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 3) && ($locationx == 18)) { echo "<h3>Shop</h3><a href='movetown1.php?action=shop'><u>CLOSED</u></a><br />"; } if (($locationy == 3) && ($locationx == 19)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 5) && ($locationx == 0)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 5) && ($locationx == 1)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 5) && ($locationx == 2)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 5) && ($locationx == 4)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 5) && ($locationx == 5)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 5) && ($locationx == 6)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 5) && ($locationx == 7)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 5) && ($locationx == 8)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 5) && ($locationx == 9)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 5) && ($locationx == 12)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 5) && ($locationx == 13)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 5) && ($locationx == 14)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 5) && ($locationx == 15)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 5) && ($locationx == 16)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 5) && ($locationx == 18)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 5) && ($locationx == 19)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 6) && ($locationx == 0)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 6) && ($locationx == 1)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 6) && ($locationx == 2)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 6) && ($locationx == 4)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 6) && ($locationx == 5)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 6) && ($locationx == 6)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 6) && ($locationx == 7)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 6) && ($locationx == 8)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 6) && ($locationx == 9)) { echo "<h3>Church</h3><a href='movetown1.php?action=church'><u>Check it Out</u></a><br />"; } if (($locationy == 6) && ($locationx == 12)) { echo "<h3>Shop</h3><a href='movetown1.php?action=shop'><u>CLOSED</u></a><br />"; } if (($locationy == 6) && ($locationx == 13)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 6) && ($locationx == 14)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 6) && ($locationx == 15)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 6) && ($locationx == 16)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 6) && ($locationx == 18)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 6) && ($locationx == 19)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 8) && ($locationx == 0)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 8) && ($locationx == 1)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 8) && ($locationx == 2)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 8) && ($locationx == 18)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 8) && ($locationx == 19)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 9) && ($locationx == 0)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 9) && ($locationx == 1)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 9) && ($locationx == 2)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 9) && ($locationx == 18)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 9) && ($locationx == 19)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 11) && ($locationx == 0)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 11) && ($locationx == 1)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 11) && ($locationx == 2)) { echo "<h3>Shop</h3><a href='movetown1.php?action=shop'><u>CLOSED</u></a><br />"; } if (($locationy == 11) && ($locationx == 18)) { echo "<h3>Shop</h3><a href='movetown1.php?action=shop'><u>CLOSED</u></a><br />"; } if (($locationy == 11) && ($locationx == 19)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 12) && ($locationx == 0)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 12) && ($locationx == 1)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 12) && ($locationx == 2)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 12) && ($locationx == 18)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 12) && ($locationx == 19)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 14) && ($locationx == 0)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 14) && ($locationx == 1)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 14) && ($locationx == 2)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 14) && ($locationx == 18)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 14) && ($locationx == 19)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 15) && ($locationx == 0)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 15) && ($locationx == 1)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 15) && ($locationx == 2)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 15) && ($locationx == 18)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 15) && ($locationx == 19)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 17) && ($locationx == 0)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 17) && ($locationx == 1)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 17) && ($locationx == 2)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 17) && ($locationx == 4)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 17) && ($locationx == 5)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 17) && ($locationx == 6)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 17) && ($locationx == 7)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 17) && ($locationx == 8)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 17) && ($locationx == 9)) { echo "<h3>Shop</h3><a href='movetown1.php?action=shop'><u>Closed</u></a><br />"; } if (($locationy == 17) && ($locationx == 12)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 17) && ($locationx == 13)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 17) && ($locationx == 14)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 17) && ($locationx == 15)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 17) && ($locationx == 16)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 17) && ($locationx == 18)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 17) && ($locationx == 19)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 18) && ($locationx == 0)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 18) && ($locationx == 1)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 18) && ($locationx == 2)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 18) && ($locationx == 4)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 18) && ($locationx == 5)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 18) && ($locationx == 6)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 18) && ($locationx == 7)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 18) && ($locationx == 8)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 18) && ($locationx == 9)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 18) && ($locationx == 12)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 18) && ($locationx == 13)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 18) && ($locationx == 14)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 18) && ($locationx == 15)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 18) && ($locationx == 16)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 18) && ($locationx == 18)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } if (($locationy == 18) && ($locationx == 19)) { echo "<h3>House No.".$locationx."".$locationy."</h3><a href='movetown1.php?action=house'><u>Enter</u></a><br />"; } $i = 1; foreach($ulocation as $loc) { if (($locationy == $loc[1]) && ($locationx == $loc[0]) && ($i != $user_id)) { echo "<h3>Another User is Here.</h3> <a href='viewuser.php?u=".$i."'>View user ID ".$i."</a><br /> <a href='mailbox.php?action=compose&ID=".$i."'>Mail user ID ".$i."</a><br /> "; } $i++; } echo "<hr /> <u><b>Legend</b></u><br /> <table width='110px'> <tr> <td>You</td> <td> - </td> <td><img src='/images/punki.jpg' width='20' height='20'></td> </tr> <tr> <td>Users</td> <td> - </td> <td><img src='/images/cop.jpg' width='20' height='20'></td> </tr> <tr> <td>House</td> <td> - </td> <td><img src='/images/grasshouse.png' width='20' height='20'></td> </tr> <tr> <td>Shops</td> <td> - </td> <td><img src='/images/pub.png' width='20' height='20'></td> </tr> <tr> <td>Church</td> <td> - </td> <td><img src='/images/church.png' width='20' height='20'></td> </tr> </table> <hr />"; echo "</td><td width='600' align='center'><small>(".$locationmxy."x".$locationmxx." Grid Currently.)</small><br />"; define('HEIGHT', $locationmxx); define('WIDTH', $locationmxy); define('GRASS', 0); define('PATH', 1); define('MISSION', 2); define('YOU', 3); define('USERS', 4); define('TREE', 5); define('ROCK', 6); define('CITY', 7); define('CHURCH', 8); define('PUB', 9); define('HOUSE', 10); // Create blank map array [y][x] $map = array_fill(0, HEIGHT, array_fill(0, WIDTH, GRASS)); $i = 1; foreach($ulocation as $loc) { if($i != $user_id) { $map[$loc[1]][$loc[0]] = USERS; } $i++; } $map[0][0] = HOUSE; $map[0][1] = HOUSE; $map[0][2] = HOUSE; $map[0][3] = HOUSE; $map[0][4] = HOUSE; $map[0][5] = HOUSE; $map[0][6] = HOUSE; $map[0][7] = HOUSE; $map[0][8] = HOUSE; $map[0][9] = HOUSE; $map[0][10] = HOUSE; $map[0][11] = HOUSE; $map[0][12] = HOUSE; $map[0][13] = HOUSE; $map[0][14] = HOUSE; $map[0][15] = HOUSE; $map[0][16] = HOUSE; $map[0][17] = HOUSE; $map[0][18] = HOUSE; $map[0][19] = HOUSE; $map[2][0] = HOUSE; $map[2][1] = HOUSE; $map[2][2] = HOUSE; $map[2][4] = HOUSE; $map[2][5] = HOUSE; $map[2][6] = HOUSE; $map[2][7] = HOUSE; $map[2][8] = HOUSE; $map[2][9] = HOUSE; $map[2][12] = HOUSE; $map[2][12] = HOUSE; $map[2][13] = HOUSE; $map[2][14] = HOUSE; $map[2][15] = HOUSE; $map[2][16] = HOUSE; $map[2][18] = HOUSE; $map[2][19] = HOUSE; $map[3][0] = HOUSE; $map[3][1] = HOUSE; $map[3][2] = HOUSE; $map[3][4] = HOUSE; $map[3][5] = HOUSE; $map[3][6] = HOUSE; $map[3][7] = HOUSE; $map[3][8] = HOUSE; $map[3][9] = HOUSE; $map[3][12] = HOUSE; $map[3][12] = HOUSE; $map[3][13] = HOUSE; $map[3][14] = HOUSE; $map[3][15] = HOUSE; $map[3][16] = HOUSE; $map[3][18] = PUB; $map[3][19] = HOUSE; $map[5][0] = HOUSE; $map[5][1] = HOUSE; $map[5][2] = HOUSE; $map[5][4] = HOUSE; $map[5][5] = HOUSE; $map[5][6] = HOUSE; $map[5][7] = HOUSE; $map[5][8] = HOUSE; $map[5][9] = HOUSE; $map[5][12] = HOUSE; $map[5][12] = HOUSE; $map[5][13] = HOUSE; $map[5][14] = HOUSE; $map[5][15] = HOUSE; $map[5][16] = HOUSE; $map[5][18] = HOUSE; $map[5][19] = HOUSE; $map[6][0] = HOUSE; $map[6][1] = HOUSE; $map[6][2] = HOUSE; $map[6][4] = HOUSE; $map[6][5] = HOUSE; $map[6][6] = HOUSE; $map[6][7] = HOUSE; $map[6][8] = HOUSE; $map[6][9] = CHURCH; $map[6][12] = PUB; $map[6][12] = HOUSE; $map[6][13] = HOUSE; $map[6][14] = HOUSE; $map[6][15] = HOUSE; $map[6][16] = HOUSE; $map[6][18] = HOUSE; $map[6][19] = HOUSE; $map[8][0] = HOUSE; $map[8][1] = HOUSE; $map[8][2] = HOUSE; $map[8][18] = HOUSE; $map[8][19] = HOUSE; $map[9][0] = HOUSE; $map[9][1] = HOUSE; $map[9][2] = HOUSE; $map[9][18] = HOUSE; $map[9][19] = HOUSE; $map[11][0] = HOUSE; $map[11][1] = HOUSE; $map[11][2] = PUB; $map[11][18] = PUB; $map[11][19] = HOUSE; $map[12][0] = HOUSE; $map[12][1] = HOUSE; $map[12][2] = HOUSE; $map[12][18] = HOUSE; $map[12][19] = HOUSE; $map[14][0] = HOUSE; $map[14][1] = HOUSE; $map[14][2] = HOUSE; $map[14][18] = HOUSE; $map[14][19] = HOUSE; $map[15][0] = HOUSE; $map[15][1] = HOUSE; $map[15][2] = HOUSE; $map[15][18] = HOUSE; $map[15][19] = HOUSE; $map[17][0] = HOUSE; $map[17][1] = HOUSE; $map[17][2] = HOUSE; $map[17][4] = HOUSE; $map[17][5] = HOUSE; $map[17][6] = HOUSE; $map[17][7] = HOUSE; $map[17][8] = HOUSE; $map[17][9] = PUB; $map[17][12] = HOUSE; $map[17][12] = HOUSE; $map[17][13] = HOUSE; $map[17][14] = HOUSE; $map[17][15] = HOUSE; $map[17][16] = HOUSE; $map[17][18] = HOUSE; $map[17][19] = HOUSE; $map[18][0] = HOUSE; $map[18][1] = HOUSE; $map[18][2] = HOUSE; $map[18][4] = HOUSE; $map[18][5] = HOUSE; $map[18][6] = HOUSE; $map[18][7] = HOUSE; $map[18][8] = HOUSE; $map[18][9] = HOUSE; $map[18][12] = HOUSE; $map[18][12] = HOUSE; $map[18][13] = HOUSE; $map[18][14] = HOUSE; $map[18][15] = HOUSE; $map[18][16] = HOUSE; $map[18][18] = HOUSE; $map[18][19] = HOUSE; $map[$locationy][$locationx] = YOU; // Translation table for integers to images $image = array( GRASS => '/images/grass.png', PATH => '/images/path.png', MISSION => '/images/mission.png', USERS => '/images/cop.jpg', TREE => '/images/grasstrees.png', ROCK => '/images/grassrock.png', CITY => '/images/city.png', YOU => '/images/punki.jpg', PUB => '/images/pub.png', HOUSE => '/images/grasshouse.png', CHURCH => '/images/church.png', ); // Display the map (Note that the \t and \n chars are simply for clarity) echo '<table style="background: url(/images/grass.png)" border="0" cellpadding="0" width="275px" height="275px">' . "\n"; for ($y = 0; $y < HEIGHT; $y++) { echo "\t" . '<tr>' . "\n"; for ($x = 0; $x < WIDTH; $x++) { echo "\t\t" . '<td><img src="'.$image[$map[$y][$x]].'" width="20" height="20"></td>' . "\n"; } echo "\t" . '</tr>' . "\n"; } echo '</table>'; echo "</td></tr> </table>"; } // Move Functions function do_move1_north() { global $db, $userid; $db->query("UPDATE users SET locationyt=locationyt-1, moves=moves-1 WHERE userid=$userid"); echo "Moved North<br /><meta http-equiv='refresh' content='0;URL=movetown1.php' /> "; } function do_move1_east() { global $db, $userid; $db->query("UPDATE users SET locationxt=locationxt+1, moves=moves-1 WHERE userid=$userid"); echo "Moved East<br /><meta http-equiv='refresh' content='0;URL=movetown1.php' /> "; } function do_move1_west() { global $db, $userid; $db->query("UPDATE users SET locationxt=locationxt-1, moves=moves-1 WHERE userid=$userid"); echo "Moved West<br /><meta http-equiv='refresh' content='0;URL=movetown1.php' /> "; } function do_move1_south() { global $db, $userid; $db->query("UPDATE users SET locationyt=locationyt+1, moves=moves-1 WHERE userid=$userid"); echo "Moved South<br /><meta http-equiv='refresh' content='0;URL=movetown1.php' /> "; } // Staff Section function do_staff() { global $db,$ir, $c; if($ir['user_level'] != 2) { die("403"); } echo "<br /><br /> <a href=movetown1.php?action=staffmoveuser>Move Users Town Location</a><br /><br /> <a href=movetown1.php>Back to Map</a><br /> "; } function staff_move_user() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("Restricted Area"); } print "<h3>Editing Users Town Location</h3> Enter users ID<br /> <form action='movetown1.php?action=staffmoveuserdo' method='post'> User: <input type='text' name='user' value='0' /><br /> <input type='submit' value='Edit Users Town Location' /></form>"; } function staff_move_user_do() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } $d=$db->query("SELECT * FROM users WHERE userid={$_POST['user']}"); $user=$db->fetch_row($d); echo "<h3>Editing Users Town Location</h3> <form action='movetown1.php?action=staffmoveusercom' method='post'> <input type='hidden' name='userid' value='{$_POST['user']}' /><br /> <br /><br /> location x: <input type='text' name='locationxt' value='{$user['locationxt']}' /><br /> location y: <input type='text' name='locationyt' value='{$user['locationyt']}' /><br /> <input type='submit' value='Edit users Town location' /></form> <br />"; } function staff_move_user_com() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("Restricted Area"); } $db->query("UPDATE users SET locationxt={$_POST['locationxt']}, locationyt={$_POST['locationyt']} WHERE userid={$_POST['userid']}"); echo "User has been moved to location <font color='green'>{$_POST['locationxt']} </font>, <font color='red'>{$_POST['locationyt']}</font><meta http-equiv='refresh' content='1;URL=movetown1.php' />"; } // Map interaction functions function enter_church() { echo "<br /><br /><h2>The Church</h2>You Enter the church. You see Holy Water to the right. Do you take some or not?<br /><br /> <a href='movetown1.php?action=takeholywater'>Take</a><br /> <a href='movetown1.php?action=leaveholywater'>Leave</a><br /> "; } function take_holywater() { global $db,$ir,$c,$h,$userid; $chance = rand(0, 1); $amount = rand(2, 100); $amount2 = rand(10, 100); if($chance == 1) { $db->query("UPDATE users SET will=will+$amount WHERE userid=$userid"); echo "<br /><br /><br /><br />You Grabbed the Holy Water, Put it in your pocket, Luckily the Priest didn't see you take it.<br />You gained $amount Will. <br /><br /><a href='movetown1.php?action=churchcontinue'>Continue</a>"; } else { $db->query("UPDATE users SET hp=hp-$amount2 WHERE userid=$userid"); echo "<br /><br /><br /><br />You Grabbed the Holy Water, You go to put it in your pocket before a man behinds you hits you in the head, You put the Holy Water back<br />The Man caused $amount2 damage to your health.<br /><br /><a href='movetown1.php?action=churchcontinue'>Continue</a>"; } } function leave_holywater() { global $db,$ir,$c,$h,$userid; $chance = rand(0, 1); $amount = rand(2,100); $amount2 = rand(10,20); if($chance == 1) { $db->query("UPDATE users SET will=will+$amount WHERE userid=$userid"); echo "<br /><br /><br /><br />You Left the Holy Water.<br />You gained $amount Will. <br /><br /><a href='movetown1.php?action=churchcontinue'>Continue</a>"; } else { $db->query("UPDATE users SET will=will-$amount2 WHERE userid=$userid"); echo "<br /><br /><br /><br />You Left the Holy Water.<br />You Lost $amount2 Will.<br /><br /><a href='movetown1.php?action=churchcontinue'>Continue</a>"; } } function church_continue() { echo "<br /><br /><br /><br />You Walk down the isle to a seat on your own on the far left side of the church, you look around.<br />This is as far as the church demo goes. If you Like this Stick around.<br /><br /> <a href='movetown1.php'>Back to Town</a>"; } // house options function enter_house() { global $db,$userid, $ir; $hidt=$db->query("SELECT * FROM maphouses WHERE houseID={$ir['locationxt']}{$ir['locationyt']}"); $tr=$db->fetch_row($hidt); echo "<br /><h3>House {$ir['locationxt']}{$ir['locationyt']}.</h3><br /><br />"; if($tr['houseOWNER'] == $userid) { echo "<i>Your House Options<i><br /> <a href='movetown1.php?action=sellhouse'>Sell House</a><br /> <a href='movetown1.php?action=updatedesc'>House Description</a><br /> <a href='movetown1.php?action=allowguests'>Allow Guests</a><br /> <a href='movetown1.php?aciton=slothouse'>House Items</a><br /><br />"; } if($tr['houseOWNER'] == 0) { echo " <i>Options<i><br /> <a href='movetown1.php?action=buyhouse'>Buy House</a><br />"; } if($tr['houseOWNER'] >= 1) { global $db,$c,$h,$userid; $u=$db->query("SELECT * FROM users WHERE userid={$tr['houseOWNER']}"); $user=$db->fetch_row($u); echo "This House belongs to: {$user['username']}.<br /> <a href='movetown1.php?action=entermainhouse'>Enter House</a><br /><br />"; } echo "<br /><br /> <a href='movetown1.php'>Back to Town</a>"; } function enter_main_house() { global $db,$c,$h,$userid,$ir; $hid=$db->query("SELECT * FROM maphouses WHERE houseID={$ir['locationxt']}{$ir['locationyt']}"); $r=$db->fetch_row($hid); $u=$db->query("SELECT * FROM users WHERE userid={$r['houseOWNER']}"); $user=$db->fetch_row($u); $username = $user['username']; $description = $r['houseDESC']; if($r['allowguests'] == 1) { echo "This House belongs to: $username.<br /><br /> <i>Desc.</i><br />$description<br /><br /> "; } else { echo "This User Does not wish to allow Guests."; } echo "<br /><br /> <a href='movetown1.php'>Back to Town</a>"; } function buy_house() { $cost='1000000'; echo "<h2>Buy This House</h3> It Currently Costs $cost.<br /><br /> Are you Sure?<br /> <a href='movetown1.php?action=buyhousedo'>Yes</a><br /> <a href='movetown1.php'>No</a> "; } function buy_house_do() { global $db,$c,$h,$userid; $d=$db->query("SELECT * FROM users WHERE userid=$userid"); $user=$db->fetch_row($d); $h=$db->query("SELECT * FROM maphouses"); $owned=$db->fetch_row($h); if(($user['money'] <= 999999) && ($owned['houseID'] <=0)) { echo "You don't have enough money or this house is Already Owned by someone.<br />Returning you to Town. <meta http-equiv='refresh' content='2;URL=movetown1.php' />"; } else { $db->query("UPDATE users SET money=money-1000000 WHERE userid=$userid"); $db->query("INSERT INTO `maphouses`(`houseID`, `houseOWNER`, `houseDESC`, `housesize`, `allowguests`, `itemslot1`, `itemslot2`, `itemslot3`, `itemslot4`, `itemslot5`, `itemslot6`, `itemslot7`, `itemslot8`, `itemslot9`, `itemslot10`, `itemslot11`, `itemslot12`, `itemslot13`, `itemslot14`, `itemslot15`, `itemslot16`, `itemslot17`, `itemslot18`, `itemslot19`, `itemslot20`) VALUES ( '{$user['locationxt']}{$user['locationyt']}', '$userid', 'Description', 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)"); echo "Contratz on Your New House.<br />No.{$user['locationxt']}{$user['locationyt']}. <br /><br />Returning you to Town. <meta http-equiv='refresh' content='2;URL=movetown1.php' />"; } } function sell_house() { echo "<h2>Sell This House</h3> <br /><br /> Are you Sure?<br /> <a href='movetown1.php?action=sellhousedo'>Yes</a><br /> <a href='movetown1.php'>No</a> "; } function sell_house_do() { global $db,$c,$h,$userid; $d=$db->query("SELECT * FROM users WHERE userid=$userid"); $user=$db->fetch_row($d); $db->query("UPDATE users SET money=money+1000000 WHERE userid=$userid"); $db->query("DELETE FROM maphouses WHERE houseID={$user['locationxt']}{$user['locationyt']}"); echo "Contratz on Your Selling your House.<br />No.{$user['locationxt']}{$user['locationyt']}. Returning you to Town. <meta http-equiv='refresh' content='5;URL=movetown1.php' />"; } function update_desc() { global $db,$c,$h,$userid,$ir; $d=$db->query("SELECT * FROM maphouses WHERE houseOWNER=$userid"); $miss=$db->fetch_row($d); echo "<h2>Your House Description</h3> <br /><br /> <form action='movetown1.php?action=updatedescdo' method='post'> <input type='hidden' name='uid' value='{$ir['userid']}' /><br /> <textarea rows=6 cols=60 name='hDESC' />{$miss['houseDESC']}</textarea><br /> <input type='submit' value='Update Description' /></form>"; } function update_desc_do() { global $db,$c,$h; $uidt = $_POST['uid']; $descc = $_POST['hDESC']; $db->query("UPDATE maphouses SET houseDESC='$descc' WHERE houseOWNER=$uidt"); echo "House Description Updated. Returning you to Town. <meta http-equiv='refresh' content='5;URL=movetown1.php?action=house' />"; } function allow_guests() { global $ir,$c,$userid,$h; echo "<h3>Allow Guests into your house?</h3><br /> <form action='movetown1.php?action=allowguestsdo' method='post'> <select name='allowguests' type='dropdown'> <option value='1'>Yes</option> <option value='0'>No</option></select> <input type='submit' value='Change' /></form>"; } function allow_guests_do() { global $db,$ir,$c,$userid,$h; $db->query("UPDATE maphouses SET allowguests={$_POST['allowguests']} WHERE houseOWNER=$userid"); echo "Set. Returning you to Town. <meta http-equiv='refresh' content='5;URL=movetown1.php?action=house' />"; } function enter_shop() { global $db,$c,$h,$userid; $d=$db->query("SELECT * FROM users WHERE userid=$userid"); $user=$db->fetch_row($d); echo "Shops Closed. <br />Returning you to Town. <meta http-equiv='refresh' content='2;URL=movetown1.php' />"; } function do_leave() { echo "You Left, Returning to Map.<meta http-equiv='refresh' content='1;URL=move.php' /> "; } $h->endpage(); ?> And of course the php stuff CREATE TABLE IF NOT EXISTS `maphouses` ( `id` int(11) NOT NULL AUTO_INCREMENT, `houseID` int(11) NOT NULL, `houseOWNER` int(11) NOT NULL, `houseDESC` varchar(255) NOT NULL, `housesize` int(11) NOT NULL, `allowguests` int(11) NOT NULL, `itemslot1` int(11) NOT NULL, `itemslot2` int(11) NOT NULL, `itemslot3` int(11) NOT NULL, `itemslot4` int(11) NOT NULL, `itemslot5` int(11) NOT NULL, `itemslot6` int(11) NOT NULL, `itemslot7` int(11) NOT NULL, `itemslot8` int(11) NOT NULL, `itemslot9` int(11) NOT NULL, `itemslot10` int(11) NOT NULL, `itemslot11` int(11) NOT NULL, `itemslot12` int(11) NOT NULL, `itemslot13` int(11) NOT NULL, `itemslot14` int(11) NOT NULL, `itemslot15` int(11) NOT NULL, `itemslot16` int(11) NOT NULL, `itemslot17` int(11) NOT NULL, `itemslot18` int(11) NOT NULL, `itemslot19` int(11) NOT NULL, `itemslot20` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; -- -- Table structure for table `mapmission` -- CREATE TABLE IF NOT EXISTS `mapmission` ( `id` int(11) NOT NULL AUTO_INCREMENT, `locationy` int(11) NOT NULL DEFAULT '0', `locationx` int(11) NOT NULL DEFAULT '0', `missionname` text, `missionlength` int(11) NOT NULL DEFAULT '1', `missionlink` text, `missiontext` text, `missionnext` text, `locationynext` int(11) NOT NULL DEFAULT '0', `locationxnext` int(11) NOT NULL DEFAULT '0', `cash` int(11) NOT NULL DEFAULT '0', `crystals` int(11) NOT NULL DEFAULT '0', `rewardnumber` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `maptowns` -- CREATE TABLE IF NOT EXISTS `maptowns` ( `id` int(11) NOT NULL AUTO_INCREMENT, `townID` varchar(20) NOT NULL, `locationx` int(11) NOT NULL, `locationy` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; -- -- Dumping data for table `maptowns` -- INSERT INTO `maptowns` (`id`, `townID`, `locationx`, `locationy`) VALUES (2, 'Launceston', 5, 5); -- -------------------------------------------------------- -- -- Table structure for table `mapusers` -- CREATE TABLE IF NOT EXISTS `mapusers` ( `missionID` int(11) NOT NULL DEFAULT '0', `userID` int(11) NOT NULL DEFAULT '0', `completed` int(11) NOT NULL DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=latin1; Also you need to create 6 new fields into the users locationx int 11 default 0 locationy int 11 default 0 moves int 11 default 50 (or whatever else you choose, you'll need to insert this into the cron line.). maxmoves int(11) 50 locationxt int(11) 10 locationyt int(11) 10 and i think at last but not least, the images, sorry the images ain't good but i'm not very good and pics. At least this is one idea thats never been done before. mapimageback.zip
  6. Have to register to check it out. free download?
  7. not bad. tho i think you should put some more rands in there tho.
  8. Regular updates (tweaks) and/or competition on a regular basis does wonders to. users knowing they have a chance of winning something every week or so is a good incentive.
  9. Thanks, it annoys me that tiny little things like and extra ' , ` or ) can bust everything lol grrrr. then i'm to bloody blind to see it staring me in the face lol,
  10. wasnt it, i though it was as Nonstopcoding pointed about how i had so many ,'','','' that was not needed lol. I've PM'ed you anyway.
  11. Done. Changed $query = "INSERT INTO soldier (`owner`, `soldiername`, `soldierrank`) VALUES('$user_id', '$soldiername', '1'))"; if(mysqli_query($con, $query)) { echo "Soldier Created"; } To $query = "insert into soldier (owner,soldiername,soldierrank) values ('$user_id','$soldiername','1')"; if(mysqli_query($con, $query)){ echo "Success, Your Soldier is Complete"; }   Will post more problems up here if and as they come
  12. Looking at the table structure i posted above it all looks ok.
  13. Yes it echos the Soldier name and owners ID.
  14. Nope Still does the same thing lol, If i PM'ed you the cpanel details would you take a look. because i feel like smashing the code lol
  15. Well i dont know, it just shows up a blank page. tried to refresh, just takes more coins and adds +1 soldier count in users but inserts nothing into the soldier table in the database. My buysoldier page is above in the posts and the Database is below -- -- Table structure for table `soldier` -- CREATE TABLE IF NOT EXISTS `soldier` ( `soldierid` int(11) NOT NULL AUTO_INCREMENT, `owner` int(11) NOT NULL, `soldiername` text NOT NULL, `soldierrank` int(11) NOT NULL, `soldierxp` int(11) NOT NULL DEFAULT '0', `soldierwep` int(11) NOT NULL DEFAULT '0', `soldierarmour` int(11) NOT NULL DEFAULT '0', `soldierspower` decimal(11,4) NOT NULL DEFAULT '10.0000', `soldiersdefence` decimal(11,4) NOT NULL DEFAULT '10.0000', `soldiersaglity` decimal(11,4) NOT NULL DEFAULT '10.0000', `health` int(11) NOT NULL DEFAULT '100', `maxhealth` int(11) NOT NULL DEFAULT '100', PRIMARY KEY (`soldierid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
  16. already set to Set error reporting to E_ALL and blank page And to non stop coding, i dont know about mccodes as i'm not using mccodes lol. but the blanks was autofilled into the db so ok i understand that part. The new line of code, $query = "INSERT INTO soldier (`owner`, `soldiername`, `soldierrank`) VALUES('$user_id', '$soldiername', '1')"; Does the same thing, it takes away the 50 coins, gives you 1 soldier count but still enters nothing into the soldier field on the site.... Soldier Rank isnt in the table and done php side.
  17. Ok map done. Now back to my buy soldier.php again lol I dont know what error this throws back, it just displays a blank screen, but i do know that the user info work but the insert into soldier table don't seem to insert. and reason why this might be? <?php include "header.php"; $action = ( array_key_exists( 'action', $_GET) ? $_GET['action'] : "" ); switch ($action) { case "buy1": buy1_soldier(); break; case 'buy2': do_buy1_soldier(); break; default: echo " <h2>Buy Soldiers</h2> Here you can buy a Soldier to fight for you.<br /><br /> <a href='buysoldier.php?action=buy1'>Buy your Soldier (Level 1) - 50 Coins</a>"; } function buy1_soldier() { print "<h3>Name your Soldier</h3> <form action='buysoldier.php?action=buy2' method='post'> Soldiers Name<input type='text' name='soldiername' /><br /> Are you sure?<br /> <input type='submit' value='Create Soldier (50 coins)' /></form>"; } function do_buy1_soldier() { $session=$_SESSION['email']; $con = mysqli_connect('localhost','user','pass','db'); $query1="UPDATE users SET soldiers=soldiers+1, coins=coins-50 WHERE user_email='$session'"; mysqli_query($con, $query1); $run = mysqli_query($con, "SELECT * FROM users WHERE user_email = '$session'"); while ($row=mysqli_fetch_array($run)){ $user_id = $row[0]; } $soldiername = $_POST['soldiername']; $query = "INSERT INTO soldier ('', 'owner', 'soldiername', 'soldierrank', '', '', '', '', '', '','','') VALUES( '', '$user_id', '$soldiername', '1', '', '', '', '', '', '','','')"; if(mysqli_query($con, $query)) { echo "Soldier Created"; } } include "footer.php"; ?>
  18. Absolute Legend, easy to understand. Thanks so much, this is a great step forward.
  19. Thanks, easier to understand, but not quite sure how to figure out where to place things in one location aka, location of the city is location 0,0, so how would i sit that into the grid into one location?
  20. Ok, very very new to arrays $a = array(); for($x = 0; $x <= 10; $x++) { $a[$x] = array(); for($y = 0; $y <= 10; $y++) { $a[$x][$y] = "<img src='/images/grassn.jpg' width='20' height='20'>"; } } $my_x = $locationx; $my_y = $locationy; $a[$my_x][$my_y] = "<img src='/images/punk.jpg' width='20' height='20'>"; print_r($a); Something like that? with that only thing thats wrong is shows array [0] =>image [1] => how is that displayed and hidden. also where would the <br /> go after the array? sorry newbs to arrays.
  21. This is what i have so far. It works and you can move etc, but it surely could be easier? $you="<img src='/images/punk.jpg' width='20' height='20'>"; if (($locationx == '0') && ($locationy == '0')) { $plocation00="".$you.""; } else { $plocation00=""; } if (($locationx == '0') && ($locationy == '1')) { $plocation01="".$you.""; } else { $plocation01=""; } if (($locationx == '0') && ($locationy == '2')) { $plocation02="".$you.""; } else { $plocation02=""; } if (($locationx == '0') && ($locationy == '3')) { $plocation03="".$you.""; } else { $plocation03=""; } if (($locationx == '0') && ($locationy == '4')) { $plocation04="".$you.""; } else { $plocation04=""; } if (($locationx == '0') && ($locationy == '5')) { $plocation05="".$you.""; } else { $plocation05=""; } if (($locationx == '0') && ($locationy == '6')) { $plocation06="".$you.""; } else { $plocation06=""; } if (($locationx == '0') && ($locationy == '7')) { $plocation07="".$you.""; } else { $plocation07=""; } if (($locationx == '0') && ($locationy == '8')) { $plocation08="".$you.""; } else { $plocation08=""; } if (($locationx == '0') && ($locationy == '9')) { $plocation09="".$you.""; } else { $plocation09=""; } if (($locationx == '0') && ($locationy == '10')) { $plocation010="".$you.""; } else { $plocation010=""; } if (($locationx == '1') && ($locationy == '0')) { $plocation10="".$you.""; } else { $plocation10=""; } if (($locationx == '1') && ($locationy == '1')) { $plocation11="".$you.""; } else { $plocation11=""; } if (($locationx == '1') && ($locationy == '2')) { $plocation12="".$you.""; } else { $plocation12=""; } if (($locationx == '1') && ($locationy == '3')) { $plocation13="".$you.""; } else { $plocation13=""; } if (($locationx == '1') && ($locationy == '4')) { $plocation14="".$you.""; } else { $plocation14=""; } if (($locationx == '1') && ($locationy == '5')) { $plocation15="".$you.""; } else { $plocation15=""; } if (($locationx == '1') && ($locationy == '6')) { $plocation16="".$you.""; } else { $plocation16=""; } if (($locationx == '1') && ($locationy == '7')) { $plocation17="".$you.""; } else { $plocation17=""; } if (($locationx == '1') && ($locationy == '8')) { $plocation18="".$you.""; } else { $plocation18=""; } if (($locationx == '1') && ($locationy == '9')) { $plocation19="".$you.""; } else { $plocation19=""; } if (($locationx == '1') && ($locationy == '10')) { $plocation110="".$you.""; } else { $plocation110=""; } if (($locationx == '2') && ($locationy == '0')) { $plocation20="".$you.""; } else { $plocation20=""; } if (($locationx == '2') && ($locationy == '1')) { $plocation21="".$you.""; } else { $plocation21=""; } if (($locationx == '2') && ($locationy == '2')) { $plocation22="".$you.""; } else { $plocation22=""; } if (($locationx == '2') && ($locationy == '3')) { $plocation23="".$you.""; } else { $plocation23=""; } if (($locationx == '2') && ($locationy == '4')) { $plocation24="".$you.""; } else { $plocation24=""; } if (($locationx == '2') && ($locationy == '5')) { $plocation25="".$you.""; } else { $plocation25=""; } if (($locationx == '2') && ($locationy == '6')) { $plocation26="".$you.""; } else { $plocation26=""; } if (($locationx == '2') && ($locationy == '7')) { $plocation27="".$you.""; } else { $plocation27=""; } if (($locationx == '2') && ($locationy == '8')) { $plocation28="".$you.""; } else { $plocation28=""; } if (($locationx == '2') && ($locationy == '9')) { $plocation29="".$you.""; } else { $plocation29=""; } if (($locationx == '2') && ($locationy == '10')) { $plocation210="".$you.""; } else { $plocation210=""; } if (($locationx == '3') && ($locationy == '0')) { $plocation30="".$you.""; } else { $plocation30=""; } if (($locationx == '3') && ($locationy == '1')) { $plocation31="".$you.""; } else { $plocation31=""; } if (($locationx == '3') && ($locationy == '2')) { $plocation32="".$you.""; } else { $plocation32=""; } if (($locationx == '3') && ($locationy == '3')) { $plocation33="".$you.""; } else { $plocation33=""; } if (($locationx == '3') && ($locationy == '4')) { $plocation34="".$you.""; } else { $plocation34=""; } if (($locationx == '3') && ($locationy == '5')) { $plocation35="".$you.""; } else { $plocation35=""; } if (($locationx == '3') && ($locationy == '6')) { $plocation36="".$you.""; } else { $plocation36=""; } if (($locationx == '3') && ($locationy == '7')) { $plocation37="".$you.""; } else { $plocation37=""; } if (($locationx == '3') && ($locationy == '8')) { $plocation38="".$you.""; } else { $plocation38=""; } if (($locationx == '3') && ($locationy == '9')) { $plocation39="".$you.""; } else { $plocation39=""; } if (($locationx == '3') && ($locationy == '10')) { $plocation310="".$you.""; } else { $plocation310=""; } if (($locationx == '4') && ($locationy == '0')) { $plocation40="".$you.""; } else { $plocation40=""; } if (($locationx == '4') && ($locationy == '1')) { $plocation41="".$you.""; } else { $plocation41=""; } if (($locationx == '4') && ($locationy == '2')) { $plocation42="".$you.""; } else { $plocation42=""; } if (($locationx == '4') && ($locationy == '3')) { $plocation43="".$you.""; } else { $plocation43=""; } if (($locationx == '4') && ($locationy == '4')) { $plocation44="".$you.""; } else { $plocation44=""; } if (($locationx == '4') && ($locationy == '5')) { $plocation45="".$you.""; } else { $plocation45=""; } if (($locationx == '4') && ($locationy == '6')) { $plocation46="".$you.""; } else { $plocation46=""; } if (($locationx == '4') && ($locationy == '7')) { $plocation47="".$you.""; } else { $plocation47=""; } if (($locationx == '4') && ($locationy == '8')) { $plocation48="".$you.""; } else { $plocation48=""; } if (($locationx == '4') && ($locationy == '9')) { $plocation49="".$you.""; } else { $plocation49=""; } if (($locationx == '4') && ($locationy == '10')) { $plocation410="".$you.""; } else { $plocation410=""; } if (($locationx == '5') && ($locationy == '0')) { $plocation50="".$you.""; } else { $plocation50=""; } if (($locationx == '5') && ($locationy == '1')) { $plocation51="".$you.""; } else { $plocation51=""; } if (($locationx == '5') && ($locationy == '2')) { $plocation52="".$you.""; } else { $plocation52=""; } if (($locationx == '5') && ($locationy == '3')) { $plocation53="".$you.""; } else { $plocation53=""; } if (($locationx == '5') && ($locationy == '4')) { $plocation54="".$you.""; } else { $plocation54=""; } if (($locationx == '5') && ($locationy == '5')) { $plocation55="".$you.""; } else { $plocation55=""; } if (($locationx == '5') && ($locationy == '6')) { $plocation56="".$you.""; } else { $plocation56=""; } if (($locationx == '5') && ($locationy == '7')) { $plocation57="".$you.""; } else { $plocation57=""; } if (($locationx == '5') && ($locationy == '8')) { $plocation58="".$you.""; } else { $plocation58=""; } if (($locationx == '5') && ($locationy == '9')) { $plocation59="".$you.""; } else { $plocation59=""; } if (($locationx == '5') && ($locationy == '10')) { $plocation510="".$you.""; } else { $plocation510=""; } if (($locationx == '6') && ($locationy == '0')) { $plocation60="".$you.""; } else { $plocation60=""; } if (($locationx == '6') && ($locationy == '1')) { $plocation61="".$you.""; } else { $plocation61=""; } if (($locationx == '6') && ($locationy == '2')) { $plocation62="".$you.""; } else { $plocation62=""; } if (($locationx == '6') && ($locationy == '3')) { $plocation63="".$you.""; } else { $plocation63=""; } if (($locationx == '6') && ($locationy == '4')) { $plocation64="".$you.""; } else { $plocation64=""; } if (($locationx == '6') && ($locationy == '5')) { $plocation65="".$you.""; } else { $plocation65=""; } if (($locationx == '6') && ($locationy == '6')) { $plocation66="".$you.""; } else { $plocation66=""; } if (($locationx == '6') && ($locationy == '7')) { $plocation67="".$you.""; } else { $plocation67=""; } if (($locationx == '6') && ($locationy == '8')) { $plocation68="".$you.""; } else { $plocation68=""; } if (($locationx == '6') && ($locationy == '9')) { $plocation69="".$you.""; } else { $plocation69=""; } if (($locationx == '6') && ($locationy == '10')) { $plocation610="".$you.""; } else { $plocation610=""; } if (($locationx == '7') && ($locationy == '0')) { $plocation70="".$you.""; } else { $plocation70=""; } if (($locationx == '7') && ($locationy == '1')) { $plocation71="".$you.""; } else { $plocation71=""; } if (($locationx == '7') && ($locationy == '2')) { $plocation72="".$you.""; } else { $plocation72=""; } if (($locationx == '7') && ($locationy == '3')) { $plocation73="".$you.""; } else { $plocation73=""; } if (($locationx == '7') && ($locationy == '4')) { $plocation74="".$you.""; } else { $plocation74=""; } if (($locationx == '7') && ($locationy == '5')) { $plocation75="".$you.""; } else { $plocation75=""; } if (($locationx == '7') && ($locationy == '6')) { $plocation76="".$you.""; } else { $plocation76=""; } if (($locationx == '7') && ($locationy == '7')) { $plocation77="".$you.""; } else { $plocation77=""; } if (($locationx == '7') && ($locationy == '8')) { $plocation78="".$you.""; } else { $plocation78=""; } if (($locationx == '7') && ($locationy == '9')) { $plocation79="".$you.""; } else { $plocation79=""; } if (($locationx == '7') && ($locationy == '10')) { $plocation710="".$you.""; } else { $plocation710=""; } if (($locationx == '8') && ($locationy == '0')) { $plocation80="".$you.""; } else { $plocation80=""; } if (($locationx == '8') && ($locationy == '1')) { $plocation81="".$you.""; } else { $plocation81=""; } if (($locationx == '8') && ($locationy == '2')) { $plocation82="".$you.""; } else { $plocation82=""; } if (($locationx == '8') && ($locationy == '3')) { $plocation83="".$you.""; } else { $plocation83=""; } if (($locationx == '8') && ($locationy == '4')) { $plocation84="".$you.""; } else { $plocation84=""; } if (($locationx == '8') && ($locationy == '5')) { $plocation85="".$you.""; } else { $plocation85=""; } if (($locationx == '8') && ($locationy == '6')) { $plocation86="".$you.""; } else { $plocation86=""; } if (($locationx == '8') && ($locationy == '7')) { $plocation87="".$you.""; } else { $plocation87=""; } if (($locationx == '8') && ($locationy == '8')) { $plocation88="".$you.""; } else { $plocation88=""; } if (($locationx == '8') && ($locationy == '9')) { $plocation89="".$you.""; } else { $plocation89=""; } if (($locationx == '8') && ($locationy == '10')) { $plocation810="".$you.""; } else { $plocation810=""; } if (($locationx == '9') && ($locationy == '0')) { $plocation90="".$you.""; } else { $plocation90=""; } if (($locationx == '9') && ($locationy == '1')) { $plocation91="".$you.""; } else { $plocation91=""; } if (($locationx == '9') && ($locationy == '2')) { $plocation92="".$you.""; } else { $plocation92=""; } if (($locationx == '9') && ($locationy == '3')) { $plocation93="".$you.""; } else { $plocation93=""; } if (($locationx == '9') && ($locationy == '4')) { $plocation94="".$you.""; } else { $plocation94=""; } if (($locationx == '9') && ($locationy == '5')) { $plocation95="".$you.""; } else { $plocation95=""; } if (($locationx == '9') && ($locationy == '6')) { $plocation96="".$you.""; } else { $plocation96=""; } if (($locationx == '9') && ($locationy == '7')) { $plocation97="".$you.""; } else { $plocation97=""; } if (($locationx == '9') && ($locationy == '8')) { $plocation98="".$you.""; } else { $plocation98=""; } if (($locationx == '9') && ($locationy == '9')) { $plocation99="".$you.""; } else { $plocation99=""; } if (($locationx == '9') && ($locationy == '10')) { $plocation910="".$you.""; } else { $plocation910=""; } if (($locationx == '10') && ($locationy == '0')) { $plocation100="".$you.""; } else { $plocation100=""; } if (($locationx == '10') && ($locationy == '1')) { $plocation101="".$you.""; } else { $plocation101=""; } if (($locationx == '10') && ($locationy == '2')) { $plocation102="".$you.""; } else { $plocation102=""; } if (($locationx == '10') && ($locationy == '3')) { $plocation103="".$you.""; } else { $plocation103=""; } if (($locationx == '10') && ($locationy == '4')) { $plocation104="".$you.""; } else { $plocation104=""; } if (($locationx == '10') && ($locationy == '5')) { $plocation105="".$you.""; } else { $plocation105=""; } if (($locationx == '10') && ($locationy == '6')) { $plocation106="".$you.""; } else { $plocation106=""; } if (($locationx == '10') && ($locationy == '7')) { $plocation107="".$you.""; } else { $plocation107=""; } if (($locationx == '10') && ($locationy == '8')) { $plocation108="".$you.""; } else { $plocation108=""; } if (($locationx == '10') && ($locationy == '9')) { $plocation109="".$you.""; } else { $plocation109=""; } if (($locationx == '10') && ($locationy == '10')) { $plocation1010="".$you.""; } else { $plocation1010=""; } echo " <table style='background: url(/images/grass.jpg)' border='1' width='275px' height='275px'> <tr width='25' height='25'> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='10,0' align='center'>".$plocation100."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='10,1' align='center'>".$plocation101."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='10,2' align='center'>".$plocation102."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='10,3' align='center'>".$plocation103."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='10,4' align='center'>".$plocation104."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='10,5' align='center'>".$plocation105."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='10,6' align='center'>".$plocation106."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='10,7' align='center'>".$plocation107."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='10,8' align='center'>".$plocation108."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='10,9' align='center'>".$plocation109."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='10,10' align='center'>".$plocation1010."</td> </tr> <tr width='25' height='25'> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='9,0' align='center'>".$plocation90."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='9,1' align='center'>".$plocation91."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='9,2' align='center'>".$plocation92."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='9,3' align='center'>".$plocation93."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='9,4' align='center'>".$plocation94."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='9,5' align='center'>".$plocation95."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='9,6' align='center'>".$plocation96."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='9,7' align='center'>".$plocation97."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='9,8' align='center'>".$plocation98."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='9,9' align='center'>".$plocation99."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='9,10' align='center'>".$plocation910."</td> </tr> <tr width='25' height='25'> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='8,0' align='center'>".$plocation80."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='8,1' align='center'>".$plocation81."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='8,2' align='center'>".$plocation82."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='8,3' align='center'>".$plocation83."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='8,4' align='center'>".$plocation84."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='8,5' align='center'>".$plocation85."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='8,6' align='center'>".$plocation86."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='8,7' align='center'>".$plocation87."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='8,8' align='center'>".$plocation88."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='8,9' align='center'>".$plocation89."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='8,10' align='center'>".$plocation810."</td> </tr> <tr width='25' height='25'> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='7,0' align='center'>".$plocation70."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='7,1' align='center'>".$plocation71."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='7,2' align='center'>".$plocation72."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='7,3' align='center'>".$plocation73."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='7,4' align='center'>".$plocation74."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='7,5' align='center'>".$plocation75."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='7,6' align='center'>".$plocation76."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='7,7' align='center'>".$plocation77."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='7,8' align='center'>".$plocation78."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='7,9' align='center'>".$plocation79."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='7,10' align='center'>".$plocation710."</td> </tr> <tr width='25' height='25'> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='6,0' align='center'>".$plocation60."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='6,1' align='center'>".$plocation61."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='6,2' align='center'>".$plocation62."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='6,3' align='center'>".$plocation63."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='6,4' align='center'>".$plocation64."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='6,5' align='center'>".$plocation65."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='6,6' align='center'>".$plocation66."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='6,7' align='center'>".$plocation67."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='6,8' align='center'>".$plocation68."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='6,9' align='center'>".$plocation69."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='6,10' align='center'>".$plocation610."</td> </tr> <tr width='25' height='25'> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='5,0' align='center'>".$plocation50."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='5,1' align='center'>".$plocation51."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='5,2' align='center'>".$plocation52."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='5,3' align='center'>".$plocation53."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='5,4' align='center'>".$plocation54."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='5,5' align='center'><img src='/images/pub.png' width='20' height='20'>".$plocation55."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='5,6' align='center'>".$plocation56."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='5,7' align='center'>".$plocation57."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='5,8' align='center'>".$plocation58."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='5,9' align='center'>".$plocation59."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='5,10' align='center'>".$plocation510."</td> </tr> <tr width='25' height='25'> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='4,0' align='center'>".$plocation40."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='4,1' align='center'>".$plocation41."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='4,2' align='center'>".$plocation42."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='4,3' align='center'>".$plocation43."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='4,4' align='center'>".$plocation44."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='4,5' align='center'>".$plocation45."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='4,6' align='center'>".$plocation46."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='4,7' align='center'>".$plocation47."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='4,8' align='center'>".$plocation48."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='4,9' align='center'>".$plocation49."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='4,10' align='center'>".$plocation410."</td> </tr> <tr width='25' height='25'> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='3,0' align='center'>".$plocation30."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='3,1' align='center'>".$plocation31."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='3,2' align='center'>".$plocation32."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='3,3' align='center'>".$plocation33."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='3,4' align='center'>".$plocation34."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='3,5' align='center'>".$plocation35."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='3,6' align='center'>".$plocation36."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='3,7' align='center'>".$plocation37."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='3,8' align='center'>".$plocation38."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='3,9' align='center'>".$plocation39."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='3,10' align='center'>".$plocation310."</td> </tr> <tr width='25' height='25'> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='2,0' align='center'>".$plocation20."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='2,1' align='center'>".$plocation21."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='2,2' align='center'>".$plocation22."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='2,3' align='center'>".$plocation23."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='2,4' align='center'>".$plocation24."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='2,5' align='center'>".$plocation25."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='2,6' align='center'>".$plocation26."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='2,7' align='center'>".$plocation27."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='2,8' align='center'>".$plocation28."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='2,9' align='center'>".$plocation29."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='2,10' align='center'>".$plocation210."</td> </tr> <tr width='25' height='25'> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='1,0' align='center'>".$plocation10."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='1,1' align='center'>".$plocation11."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='1,2' align='center'>".$plocation12."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='1,3' align='center'>".$plocation13."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='1,4' align='center'>".$plocation14."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='1,5' align='center'>".$plocation15."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='1,6' align='center'>".$plocation16."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='1,7' align='center'>".$plocation17."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='1,8' align='center'>".$plocation18."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='1,9' align='center'>".$plocation19."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='1,10' align='center'>".$plocation110."</td> </tr> <tr width='25' height='25'> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='0,0' align='center'><img src='/images/city.png' width='20' height='20'>".$plocation00."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='0,1' align='center'>".$plocation01."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='0,2' align='center'>".$plocation02."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='0,3' align='center'>".$plocation03."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='0,4' align='center'>".$plocation04."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='0,5' align='center'>".$plocation05."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='0,6' align='center'>".$plocation06."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='0,7' align='center'>".$plocation07."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='0,8' align='center'>".$plocation08."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='0,9' align='center'>".$plocation09."</td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='0,10' align='center'>".$plocation010."</td> </tr> </table> </td></tr> </table>"; }
  22. Ok, well i dont suppose anyone could help me with this or help me understand and teach me how i could do this?
  23. Thanks, not much on that site means anything to me.
  24. There isnt one, The locations for the cities and random things are done php side, my mysqli are skills are lacking abit, doing if locationx and locationy = 1,1 do city etc. First part of the map page <?php include "header.php"; $action = ( array_key_exists( 'action', $_GET) ? $_GET['action'] : "" ); switch ($action) { case 'moven': do_move1_north(); break; case 'movew': do_move1_west(); break; case 'movee': do_move1_east(); break; case 'moves': do_move1_south(); break; case 'search1': do_search1_ad(); break; case 'search2': do_search2_ad(); break; default: echo " <br /> <h2>Travel</h2> Here you travel around the map to find army or people to fight with.<br /><br /> <table width='75%'> <tr><td></td> <td align='center'> Your Map Location: <font color='blue' size='3'> <font color='red'>".$locationx."</font>, <font color='green'>".$locationy."</font>, You have <font color='black'>".$moves."</font> left.</font><br /><small>(Map Is currently out of action.)</small> </td><tr> <tr><td align='center' valign='top' width='100'> "; echo "<hr />Misc"; $x1 = rand(1,40); $y1 = rand(1,40); $x2 = rand(10,50); $y2 = rand(10,50); if (($locationx == 0) && ($locationy == 0)) { echo "<h3>Home City<br /> <a href='city.php'><u>Enter City</u></a><br /></h3>"; } if (($locationx == $x1) && ($locationy == $y1)) { echo "<h3>Hmm.. Whats that?<br /> <a href='move.php?action=search1'><u>Check it Out</u></a><br /></h3>"; } if (($locationx == $x2) && ($locationy == $y2)) { echo "<h3>Hmm.. Whats that?<br /> <a href='move.php?action=search2'><u>Check it Out</u></a><br /></h3>"; } echo "<hr />"; if ($moves <= 0) { echo "No Moves, Nav Disabled"; } else { echo " <table> <tr> <td></td> <td></td> <td align='center'><font color='red'><b>N</b></font></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td align='center'><a href='move.php?action=moven'><img src='/images/up.png'></a></td> <td></td> <td></td> </tr> <tr> <td><font color='green'><b>W</b></font></td> <td align='center'><a href='move.php?action=movew'><img src='/images/left.png'></a></td> <td align='center'><b>+</b></td> <td align='center'><a href='move.php?action=movee'><img src='/images/right.png'></a></td> <td><font color='green'><b>E</b></font></td> </tr> <tr> <td></td> <td></td> <td align='center'><a href='move.php?action=moves'><img src='/images/down.png'></a></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td align='center'><font color='red'><b>S</b></font></td> <td></td> <td></td> </tr> </table>"; } echo "</td><td width='600' align='center'> <table style='background: url(/images/grass.jpg)' border='1' width='275px' height='275px'> <tr width='25' height='25'> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='5,-5'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='5,-4'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='5,-3'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='5,-2'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='5,-1'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='5,0'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='5,1'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='5,2'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='5,3'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='5,4'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='5,5'></td> </tr> <tr width='25' height='25'> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='4,-5'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='4,-4'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='4,-3'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='4,-2'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='4,-1'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='4,0'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='4,1'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='4,2'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='4,3'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='4,4'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='4,5'></td> </tr> <tr width='25' height='25'> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='3,-5'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='3,-4'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='3,-3'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='3,-2'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='3,-1'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='3,0'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='3,1'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='3,2'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='3,3'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='3,4'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='3,5'></td> </tr> <tr width='25' height='25'> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='2,-5'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='2,-4'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='2,-3'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='2,-2'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='2,-1'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='2,0'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='2,1'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='2,2'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='2,3'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='2,4'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='2,5'></td> </tr> <tr width='25' height='25'> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='1,-5'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='1,-4'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='1,-3'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='1,-2'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='1,-1'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='1,0'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='1,1'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='1,2'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='1,3'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='1,4'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='1,5'></td> </tr> <tr width='25' height='25'> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='0,-5'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='0,-4'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='0,-3'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='0,-2'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='0,-1'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='0,0'><img src='/images/maincity.png' width='19' height='19'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='0,1'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='0,2'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='0,3'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='0,4'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='0,5'></td> </tr> <tr width='25' height='25'> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-1,-5'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-1,-4'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-1,-3'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-1,-2'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-1,-1'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-1,0'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-1,1'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-1,2'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-1,3'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-1,4'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-1,5'></td> </tr> <tr width='25' height='25'> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-2,-5'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-2,-4'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-2,-3'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-2,-2'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-2,-1'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-2,0'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-2,1'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-2,2'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-2,3'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-2,4'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-2,5'></td> </tr> <tr width='25' height='25'> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-3,-5'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-3,-4'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-3,-3'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-3,-2'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-3,-1'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-3,0'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-3,1'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-3,2'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-3,3'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-3,4'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-3,5'></td> </tr> <tr width='25' height='25'> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-4,-5'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-4,-4'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-4,-3'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-4,-2'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-4,-1'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-4,0'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-4,1'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-4,2'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-4,3'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-4,4'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-4,5'></td> </tr> <tr width='25' height='25'> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-5,-5'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-5,-4'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-5,-3'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-5,-2'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-5,-1'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-5,0'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-5,1'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-5,2'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-5,3'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-5,4'></td> <td style='background: url(/images/grass.jpg)' border='1' width='20' height='20' id='-5,5'></td> </tr> </table> </td></tr> </table>"; }   part of the move function do_move1_south() { $session=$_SESSION['email']; $con = mysqli_connect('localhost','user','pass',db'); $query="UPDATE users SET locationx=locationx-1, moves=moves-1 WHERE user_email='$session'"; if(mysqli_query($con, $query)) { echo "Moved South<br /><script>window.open('move.php','main')</script>"; } }
  25. any preview for inside?
×
×
  • Create New...