Yea i was a bugger and its not really nice to say we are buggers i mean yea we did bug you guys i guess but we dont know this stuff and thats why we are here. to learn from others and to help form a better community by teaching others what we learned.
besides that. this scripts works thanks for the post it helped me out.
Note
-------------------
(1) To anyone else that may have problems with this script all you have to do is redo the url redirect "IF" yours is different.
Example
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The above url in the script would not originally work for me because my scripts are in a different directory
The original script's url is typed like this
.../forsaken1/login.php
The url above was directing the user to the forsaken1 folder then to the login.php script
This did not work for me because i had my scripts in the main directory so i had to change mine to
.../login.php
(2) This script obviously doesn't replace the entire index script. This just replaces the second php portion of the script.
Example - This is not the revised script do not just copy paste this over your index script because this is the original i am just posting this so everone can learn how to do this and starting to get the feel of changing your scripts around.
I added a comment in the script to show you where to copy paste the new lines of code at in the script. Hope this helps.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Code: Select all
?php
include 'connect.php';
session_start();
?>
<style type="text/css">
<!--
body {
background-color: #000000;
}
body,td,th {
color: #FFFFFF;
font-size: 12px;
font-weight: bold;
}
.style2 {
font-size: 14px;
color: #CCCCCC;
}
-->
</style>
/////////////////////////REPLACE THIS PART OF THE SCRIPT WITH THE ABOVE SCRIPT FROM THE FIRST POST
<?php
if (isset($_SESSION['player']))
{
$player=$_SESSION['player'];
$playerinfo="SELECT * from players where name='$player'";
$playerinfo2=mysql_query($playerinfo) or die("Could not get user stats");
$playerinfo3=mysql_fetch_array($playerinfo2);
print "<input type='hidden' name='id' value='$playerinfo3[id]'>";
$updaterefresh="update players set lastattacked=0 where ID='$playerinfo3[id]'";
mysql_query($updaterefresh) or die("Died");
}
else
{
print "Sorry, not logged in please <A href='login.php'>Login</a><br>";
exit;
}
?>
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
<p><img src="images/homebutt.png" width="181" height="36" /><img src="images/marketbutt.png" width="181" height="36" /></p>
<table width="100%" height="204" border="0">
<tr>
<td width="18%"><img src="/images/sidebarstats12.png" width="167" height="455" /> <div
style="
top: 299;
left: 35;
position: absolute; <?php
if(!isset($start))
{
$start=0;
}
$order="SELECT * from players";
$order2=mysql_query($order);
$t=0;
$d=0;
$f=0;
$g=1;
while($order3=mysql_fetch_array($order2))
{
if($f%10==0)
{
$g++;
}
$d=$d+1;
$f++;
}
$topplayers="SELECT * from players order by level DESC Limit $start, 20";
$topplayers2=mysql_query($topplayers) or die("Could not query players");
while($topplayer3=mysql_fetch_array($topplayers2))
{
$t++;
$topplayer3[playername]=strip_tags($topplayer3[playername]);
print $t . ". " . $topplayer3[playername] . " (" . $topplayer3[level] . ")" . "<br />";
}
?>
z-index: 2;
visibility: show;">
</div></td>
</div>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<p align="left">
<p align="left">
<p align="left">
<p align="left">
<p align="left">
<map name="Map2" id="Map2"><area shape="rect" coords="23,212,119,235" href="/watermill.php" />
<area shape="rect" coords="225,269,300,304" href="steelmill.php" />
<area shape="rect" coords="360,232,449,253" href="oilrefinery.php" />
<area shape="rect" coords="220,193,317,218" href="hydrolabs.php" />
<area shape="rect" coords="395,171,485,191" href="tarininglabs.php" />
<area shape="rect" coords="350,340,454,363" href="researchlabs.php" />
<area shape="rect" coords="539,244,620,268" href="housing.php" />
<area shape="rect" coords="82,62,183,89" href="spacezone1.php" />
</map>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------