Example #1
0
    }
}
?>
                        </select>
                   </form> 
                   
                   
                   
                   
                   
                </div>
                <?php 
if (!$_POST[destino] || $_POST[destino] == "todos") {
    $result = $atraccions->getAtraccions();
} else {
    $result = $atraccions->getAtraccionByDesti($_POST[destino]);
}
$numAtracciones = 0;
// Contem les atraccions que mostrem
for ($i = 0; $i < mysql_num_rows($result); $i++) {
    if ($_POST[tipusAtraccio] == mysql_result($result, $i, 10) || $_POST[tipusAtraccio] == 'todos' || !$_POST[tipusAtraccio]) {
        $numAtracciones++;
        echo '<a class="iframes fancybox.iframe" href="atraccions.php?id=' . mysql_result($result, $i, 0) . '">';
        echo '<div id="atraccion">';
        echo '  <div id="titulo_atraccion"><b>' . mysql_result($result, $i, 1) . '</b></div>';
        echo '	<div id="foto_atraccion"><img width="70px" height="70px" src="' . mysql_result($result, $i, 9) . '"/></div>';
        echo '	<div id="descripcion_atraccion">' . substr(mysql_result($result, $i, 2), 0, 90) . '..."</div> ';
        echo '</div></a>';
    }
}
if ($numAtracciones == 0) {
Example #2
0
            }
        }
        if ($trobat == false) {
            $destinos[sizeof($destinos)] = $valorDesti;
        }
    }
}
//   for($y = 0 ; $y < sizeof($destinos);$y++)
//          echo "Destinos: ".$destinos[$y];
echo "<h2> Recomendación por destinos: </h2>";
echo "<hr>";
echo "<table>";
$numAtr = 0;
for ($x = 0; $x < sizeof($destinos); $x++) {
    echo "<tr><td><B><p style='font-size:12px'>" . $desti->getNomByID($destinos[$x]) . ":</p></B></td><td></td></tr>";
    $result = $atraccions->getAtraccionByDesti($destinos[$x]);
    for ($i = 0; $i < mysql_num_rows($result); $i++) {
        $numAtr++;
        if ($x % 2 == 0) {
            echo "<tr>";
        }
        echo '<td><a class="iframes fancybox.iframe" href="atraccions.php?id=' . mysql_result($result, $i, 0) . '">';
        echo '<div id="atraccion" style="height:5px;">';
        echo '  <div id="titulo_atraccion" style="font-size:11px; padding-top:5px"><b>' . mysql_result($result, $i, 1) . '</b></div>';
        //      echo '	<div id="foto_atraccion"><img width="70px" height="70px" src="'.mysql_result($result,$i,9).'"/></div>';
        //      echo '	<div id="descripcion_atraccion">'.substr(mysql_result($result,$i,2),0,90).'..."</div> ';
        echo '</div></a></td>';
        if ($x % 2 == 0) {
            echo "</tr>";
        }
    }