if($_GET["cat"]==27 OR $_GET["cat"]==22 OR $_GET["cat"]==28 OR $_GET["cat"]==32 OR $_GET["cat"]==21){ ?> $ev=1; /*Events*/ ?> }
if($_GET["films"]==1){ ?>Films }
if(!isset($_GET["cat"]) AND !isset($_GET["films"])){ ?>All Events } ?>
if(isset($_GET["cat"])){ $sql="SELECT * FROM categorias WHERE id='".$_GET["cat"]."'"; $result=mysql_query($sql); $row=mysql_fetch_assoc($result);
?> if($ev!=1){ ?> } ?>=$row["ingles"]?> if($ev!=1){ ?> } ?> } ?>
if(!isset($_GET["cat"])){ ?>
Please select a category to view all films in it.
$sql="SELECT * FROM categorias ORDER BY ingles";
if($_GET["films"]==1){ $sql="SELECT * FROM categorias WHERE id!=27 AND id!=22 AND id!=28 AND id!=32 AND id!=21 ORDER BY ingles"; $page="films"; }
$result=mysql_query($sql);
while($row=mysql_fetch_assoc($result)){
$sq="SELECT count(*) from peliculas WHERE categoria='".$row["id"]."'";
$re=mysql_query($sq);
$ro=mysql_fetch_assoc($re);
?>
if(!isset($_GET["order"]) OR $_GET["order"]==""){ $_GET["order"]="film"; }
if($_GET["order"]=="prog"){ $sql="SELECT * FROM peliculas WHERE categoria='".$_GET["cat"]."' ORDER BY programa"; }
if($_GET["order"]=="film"){ $sql="SELECT * FROM peliculas WHERE categoria='".$_GET["cat"]."' ORDER BY titulo_en"; }
if($_GET["order"]=="rating"){ $sql="SELECT * FROM peliculas WHERE categoria='".$_GET["cat"]."' ORDER BY rating DESC"; }
if($_GET["order"]=="comments"){ $sql="SELECT * FROM peliculas WHERE categoria='".$_GET["cat"]."' ORDER BY numcomentarios DESC"; }
if($_GET["order"]=="date"){ $sql="SELECT * FROM peliculas WHERE categoria='".$_GET["cat"]."' ORDER BY fecha1"; }
if(isset($_GET["venue"]) AND $_GET["venue"]!=""){ $sql=str_replace("ORDER BY"," AND (sala1='".$_GET["venue"]."' OR sala2='".$_GET["venue"]."') ORDER BY",$sql); }
$result=mysql_query($sql);
$bgor=1;
while($row=mysql_fetch_assoc($result)){
$sq="SELECT * FROM programas WHERE id='".$row["programa"]."'";
$re=mysql_query($sq);
$ro=mysql_fetch_assoc($re);
$mes1=$row["fecha1"][0];
$mes2=$row["fecha2"][0];
$dia1=$row["fecha1"][1].$row["fecha1"][2];
$dia2=$row["fecha2"][1].$row["fecha2"][2];
$hora1=$row["fecha1"][3].$row["fecha1"][4];
$hora2=$row["fecha2"][3].$row["fecha2"][4];
$minuto1=$row["fecha1"][5].$row["fecha1"][6];
$minuto2=$row["fecha2"][5].$row["fecha2"][6];
$sala1="SELECT * FROM salas WHERE id='".$row["sala1"]."'";
$sala1=mysql_query($sala1);
$sala1=mysql_fetch_assoc($sala1);
$sala1=$sala1["sala"];
$sala2="SELECT * FROM salas WHERE id='".$row["sala2"]."'";
$sala2=mysql_query($sala2);
$sala2=mysql_fetch_assoc($sala2);
$sala2=$sala2["sala"];
if($bgor==1){ $bg="FFFFFF"; }
if($bgor==2){ $bg="EEEEEE"; $bgor=0;}
?>