hai ragione ecco tutto il sorgente
Codice PHP:
<?session_start( );
echo'<html><head>';
include ("inc/parametri.inc.php");
include ("inc/controllo.php");
include ("inc/open2.php");
include ("inc/controlloesilio.php");
include ("inc/header.html.inc.php");
?>
<link href="main.css" rel="stylesheet" type="text/css"></head>
<body style="background-image: url(img/main.jpg); background-attachment: fixed;">
<center>
<?
$Corrente= 0+$_SESSION['Mappa'];
$Result= 0;
$End=9999;
$Beg=1;
if (ISSET($_POST['Vai'])) {$Corrente=$_POST['Vai']; $_SESSION['Mappa']=$Corrente;
$MySql = "UPDATE Personaggio SET Mappa = '".$Corrente."' WHERE Nome = '".$_SESSION['Login']."'"; mysql_query($MySql);}
$MySql = 'SELECT * FROM Mappa_Click WHERE IDClick = '.$Corrente.' ';
$Result = mysql_query($MySql);
$rs = mysql_fetch_array($Result);
if (!mysql_affected_rows()) {echo "[img]img/work-in-progress.gif[/img]";}
else{
echo "<font size=4 color=white>".$rs['Nome']."</font>
";
$Beg=$rs['Stanza_beg'];
$End=$rs['Stanza_end'];
$MySql = 'SELECT * FROM Mappa WHERE Chat = 1 AND ID BETWEEN '.$Beg.' AND '.$End.'';
$ResultG = mysql_query($MySql);
while ($rsG = mysql_fetch_array($ResultG)) {
$Esci=$rsG['Esci'];
$Entra=$rsG['Entra'];
$Griglia[$Esci][$Entra]=$rsG['ID'];
$GrigliaNome[$Esci][$Entra]=$rsG['Breve'];
}
echo '<table border=0 width=500 height=413 style="background-image: url(img/mappe/'.$rs['Urlimg'].');">';}//else
for($i=1;$i<=20;$i++){
echo"<tr>";
for($j=1;$j<=5;$j++){
echo "<td height=18 width=100 style='FILTER: dropshadow(color=#000000,OffX=2,OffY=2,Positive=2);'>";
if($GrigliaNome[$i][$j]!=""){
echo "[url='main.php?Dir=".$Griglia[$i][$j]."']<font style='font-size: 7pt;'>[b]".$GrigliaNome[$i][$j]."[/b]</font>[/url]";
}else{echo "[img]img/spacer.gif[/img]";}
echo "</td>";
}
echo"</tr>";
}
$rs->close;
mysql_free_result($Result);
echo '</table>
<table border=0>';
echo '<td><form action="mappaclick.php" method="Post">';
echo '<input type=submit value="Unita Disponibili "><select Name="Vai">';
$MySql = 'SELECT IDClick, Nome FROM Mappa_Click WHERE posizione = '.$Corrente.' ORDER BY Nome';
$Result = mysql_query($MySql);
while ($rs = mysql_fetch_array($Result)) {
echo '<option value="'.$rs['IDClick'].'"';
if ($Corrente == $rs['IDClick']) {
echo ' SELECTED';
}
echo '>'.htmlspecialchars($rs['Nome']).'</option>';
}
$rs->close;
mysql_free_result($Result);
echo '</select></form></td><td>';
?>
</center>
</body>
</html>