Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/01/2014, 08:56
santi2892009
 
Fecha de Ingreso: mayo-2012
Mensajes: 363
Antigüedad: 11 años, 11 meses
Puntos: 0
error de sintaxis ..?

a ver si me podeis ayudar en este error:os dejo el codigo;
Código PHP:
Ver original
  1. <?php
  2.  
  3.     require('seguridad.php');
  4.     conectar_base_datos();
  5.     $consulta = mysql_query("SELECT * FROM ex_usuarios WHERE usuario = '$us'");
  6.     $row = mysql_fetch_array($consulta);
  7.     echo "Bienvenido: <b>$row[7]</b>";
  8.  
  9.     echo "<html><head><title>Mapa 2</title><script type='text/javascript' src='js_ajax.js'></script><link href='estilos_mapa.css' rel='stylesheet' type='text/css'></head><body>";
  10.     echo "<center><h1>Mapa del Mundo</h1></center>";
  11.     if ($_GET['x'] < 1 || $_GET['x'] > 100 || $_GET['y'] < 1 || $_GET['y'] > 100) {
  12.         echo "<center><h3>Mapa Fuera de Rango</h3><p>S贸lo valores entre 1 y 100 para X e Y.</p></center>";
  13.     } else {
  14.         $y = $_GET['y'] - 2;
  15.         echo "<table align='center' class='mapa2'>";
  16.         for ($a = 0; $a < 5; $a++) {
  17.             $x = $_GET['x'] - 2;
  18.             echo "<tr>";
  19.             for ($b = 0; $b < 5; $b++) {
  20.                 $consulta = mysql_query("SELECT * FROM ex_mapa2 WHERE x = '$x' and y = '$y' ORDER BY x, y");
  21.                 $array = mysql_fetch_array($consulta);
  22.                 echo "<td >";
  23.                 if ($x > 100 or $y > 100 or $x < 1 or $y < 1) {
  24.                     echo "";
  25.                 } else {
  26.                     echo "<div onmouseover=\"iniciarConsulta('mapa2_con.php?x=$x&y=$y');\" onmousemove=\"cursor('resultado');\" onmouseout=\"esconder('resultado');\" style='width: 50px; height:50px;'><a href='mapa2.php?x=$array[2]&y=$array[3]'>$array[2]/$array[3]</a></div>";
  27.                 }
  28.                 echo "</td>";
  29.                 $x++;
  30.             }
  31.             echo "</tr>";
  32.             $y++;
  33.         }
  34.     }
  35.     $x_ = $_GET['x'];
  36.     $x_1 = $_GET['x'] - 1;
  37.     $x1 = $_GET['x'] + 1;
  38.     $y_ = $_GET['y'];
  39.     $y_1 = $_GET['y'] - 1;
  40.     $y1 = $_GET['y'] + 1;
  41.  
  42.     echo "</table>";
  43.     echo "<table align='center'><tr><td colspan='3'>";
  44.     if ($_GET['y'] <= 1) {
  45.         echo "";
  46.     } else {
  47.         echo "<center><a href='mapa2.php?x=$x_&y=$y_1'><img src='img/flecha_up.png'></a></center>";
  48.     }
  49.     echo "</td></tr><tr><td>";
  50.     if ($_GET['x'] <= 1) {
  51.         echo "";
  52.     } else {
  53.         echo "<a href='mapa2.php?x=$x_1&y=$y_'><img src='img/flecha_left.png'></a>";
  54.     }
  55.     echo "</td><td><form action='mapa2.php' method='GET'>X : <input type='text' name='x' size='1' maxlength='3'> Y: <input type='text' name='y' size='1' maxlength='3'><input type='submit' value='IR'></form>";
  56.     echo "<td>";
  57.     if ($_GET['x'] >= 100) {
  58.         echo "";
  59.     } else {
  60.         echo "<a href='mapa2.php?x=$x1&y=$y_'><img src='img/flecha_right.png'></a>";
  61.     }
  62.     echo "</td></tr><tr><td colspan='3'>";
  63.     if ($_GET['y'] == 100) {
  64.         echo "";
  65.     } else {
  66.         echo "<center><a href='mapa2.php?x=$x_&y=$y1'><img src='img/flecha_down.png'></a></center>";
  67.     }
  68.  
  69.     echo "</td></tr></table><div class='anuncio' id='resultado'></div><center><a href='main.php'>Volver</a></center></body></html>";
  70. }
  71. ?>