Da non perdere.... |
include ('antihaking.php');
$b=date("d/m/Y");
list($gg,$mm,$aa)=explode("/",$b);
$f="$aa$mm$gg";
$oggi="$aa-$mm-$gg";
$date_array = getdate(); // no argument passed so today's date will be used
$fine = $oggi;
$giorno = substr($fine,6);
$mese = substr($fine,4,2);
$anno = substr($fine,0,4);
$sp="select * from spettacoli where ((al>='$oggi' or (dal='--' or al='--')) and bambini='s' and promo='s')order by dal";
//echo $sp;
$spe=mysql_query($sp,$db);
/*seleziono il nome del teatro dalla tabella teatri tramite il codt */
$bambin=0;
//echo "oggi= $oggi";
?>
/*Fintanto che si verifica la condizione tipo_costo=abb e codt=$codt stampo i dati*/
while ($spett=mysql_fetch_array($spe)){
$ID=$spett["ID"];
$d=$spett["dal"];
$codt=$spett["codt"];
$locandina =$spett["locandina"];
$nometeatro="select * from teatri where ID='$codt'";
$nometeatro_sql=mysql_query($nometeatro,$db);
$nomet=mysql_fetch_array($nometeatro_sql);
$nome_teatro=$nomet["teatro"];
if ($d!='--' and $d!=' '){
$d=strtotime($d);
$dal=date('d/m/Y',$d);
}
else
{
$dal='';
}
if ($spett["al"]!='--' and $spett["al"]!=' '){
$a=$spett["al"];
$a=strtotime($a);
$al=date('d/m/Y',$a);
}
else
{
$al='';
}
/*list($gg,$mm,$aaaa)=explode("-",$a);
$al="$gg/$mm/$aaaa";
$d=$spett["dal"];
list($gg,$mm,$aaaa)=explode("-",$d);
$dal="$gg/$mm/$aaaa";*/
$titolo=$spett["spett"];
echo "
 | $titolo - $nome_teatro ";
if ($dal!='')
{
echo " dal $dal ";
}
if ($al!=''){
echo "al $al";
}
echo"
|
";
}
?>
|
|
Spettacoli in corso |
$db = mysql_connect("localhost", "deltaf","251978");
mysql_select_db(deltaf,$db)
or die ("Errore nella selezione del database");
$oggi=date("Y-m-d");
$sp="select * from spettacoli where ((al>='$oggi' and (dal='--' or dal<='$oggi')) and bambini='s')order by al";
//echo $sp;
$spe=mysql_query($sp,$db);
$spet=0;
/*seleziono il nome del teatro dalla tabella teatri tramite il codt */
/*Fintanto che si verifica la condizione tipo_costo=abb e codt=$codt stampo i dati*/
while ($spett=mysql_fetch_array($spe) and $spet<5){
$ID=$spett["ID"];
$d=$spett["dal"];
$codt=$spett["codt"];
$locandina =$spett["locandina"];
$nometeatro="select * from teatri where ID='$codt'";
$nometeatro_sql=mysql_query($nometeatro,$db);
$nomet=mysql_fetch_array($nometeatro_sql);
$nome_teatro=$nomet["teatro"];
if ($d!='--' and $d!=' '){
$d=strtotime($d);
$dal=date('d/m/Y',$d);
}
else
{
$dal='';
}
if ($spett["al"]!='--' and $spett["al"]!=' '){
$a=$spett["al"];
$a=strtotime($a);
$al=date('d/m/Y',$a);
}
else
{
$al='';
}
/*list($gg,$mm,$aaaa)=explode("-",$a);
$al="$gg/$mm/$aaaa";
$d=$spett["dal"];
list($gg,$mm,$aaaa)=explode("-",$d);
$dal="$gg/$mm/$aaaa";*/
$titolo=$spett["spett"];
if ($titolo!=''){
echo "  |
$titolo - $nome_teatro ";
if ($dal!=''){
echo " dal $dal ";
}
if ($al!=''){
echo "al $al |
";
}
/*echo "dal $dal al $al" ; */
}
$spet=$spet+1;
}
//mysql_close();
?>
|
Spettacoli in programmazione |
$db = mysql_connect("localhost", "deltaf","251978");
mysql_select_db(deltaf,$db)
or die ("Errore nella selezione del database");
mysql_set_charset('utf8');
mysql_query("SET NAMES 'UTF8'");
$oggi=date("Y-m-d");
$sp="select * from spettacoli where (dal>'$oggi' and bambini='s')order by al";
//echo $sp;
$spe=mysql_query($sp,$db);
$spet=0;
/*seleziono il nome del teatro dalla tabella teatri tramite il codt */
?>
/*Fintanto che si verifica la condizione tipo_costo=abb e codt=$codt stampo i dati*/
while ($spett=mysql_fetch_array($spe) and $spet<5){
$ID=$spett["ID"];
$d=$spett["dal"];
$codt=$spett["codt"];
$locandina =$spett["locandina"];
$nometeatro="select * from teatri where ID='$codt'";
$nometeatro_sql=mysql_query($nometeatro,$db);
$nomet=mysql_fetch_array($nometeatro_sql);
$nome_teatro=$nomet["teatro"];
if ($d!='--' and $d!=' '){
$d=strtotime($d);
$dal=date('d/m/Y',$d);
}
else
{
$dal='';
}
if ($spett["al"]!='--' and $spett["al"]!=' '){
$a=$spett["al"];
$a=strtotime($a);
$al=date('d/m/Y',$a);
}
else
{
$al='';
}
/*list($gg,$mm,$aaaa)=explode("-",$a);
$al="$gg/$mm/$aaaa";
$d=$spett["dal"];
list($gg,$mm,$aaaa)=explode("-",$d);
$dal="$gg/$mm/$aaaa";*/
$titolo=$spett["spett"];
if ($titolo!=''){
echo "
 | $titolo - $nome_teatro ";
if ($dal!=''){
echo " dal $dal ";
}
if ($al!=''){
echo "al $al";
}
echo" |
";
/*echo "dal $dal al $al" ; */
}
$spet=$spet+1;
}
//mysql_close();
?>
Matinee per le scuole |
$db = mysql_connect("localhost", "deltaf","251978");
mysql_select_db(deltaf,$db)
or die ("Errore nella selezione del database");
mysql_set_charset('utf8');
mysql_query("SET NAMES 'UTF8'");
$oggi=date("Y-m-d");
$sp="select * from spettacoli where (dal>'$oggi' and matinee='s')order by al";
//echo $sp;
$spe=mysql_query($sp,$db);
$spet=0;
/*seleziono il nome del teatro dalla tabella teatri tramite il codt */
?>
/*Fintanto che si verifica la condizione tipo_costo=abb e codt=$codt stampo i dati*/
while ($spett=mysql_fetch_array($spe) and $spet<5){
$ID=$spett["ID"];
$d=$spett["dal"];
$codt=$spett["codt"];
$locandina =$spett["locandina"];
$nometeatro="select * from teatri where ID='$codt'";
$nometeatro_sql=mysql_query($nometeatro,$db);
$nomet=mysql_fetch_array($nometeatro_sql);
$nome_teatro=$nomet["teatro"];
if ($d!='--' and $d!=' '){
$d=strtotime($d);
$dal=date('d/m/Y',$d);
}
else
{
$dal='';
}
if ($spett["al"]!='--' and $spett["al"]!=' '){
$a=$spett["al"];
$a=strtotime($a);
$al=date('d/m/Y',$a);
}
else
{
$al='';
}
/*list($gg,$mm,$aaaa)=explode("-",$a);
$al="$gg/$mm/$aaaa";
$d=$spett["dal"];
list($gg,$mm,$aaaa)=explode("-",$d);
$dal="$gg/$mm/$aaaa";*/
$titolo=$spett["spett"];
if ($titolo!=''){
echo "
 | $titolo matinée - $nome_teatro ";
if ($dal!=''){
echo " dal $dal ";
}
if ($al!=''){
echo "al $al";
}
echo" |
";
/*echo "dal $dal al $al" ; */
}
$spet=$spet+1;
}
//mysql_close();
?>
|
Visite guidate per bambini |
//include ('teatri/cancella.php');
$db=mysql_connect ("localhost", "admin","4-4he8a");
mysql_select_db("gep");
mysql_set_charset('utf8');
mysql_query("SET NAMES 'UTF8'");
$b=date("d/m/Y");
list($gg,$mm,$aa)=explode("/",$b);
$c="$aa$mm$gg";
$sql="SELECT * from gep where (tipo='bambini' and dataout>$c) order by dataout";
$result=mysql_query($sql, $db);
while ($valori = mysql_fetch_array ($result)){
$titolo=$valori["titolo"];
$dataoutvis=$valori["dataoutvis"];
$ID=$valori["ID"];
$locandina = $valori ["foto"];
echo" | $titolo - visita guidata per bambini $dataoutvis |
";
//mysql_error()
}
mysql_close();
?> |
|
Eventi per bambini |
//include ('teatri/cancella.php');
$db = mysql_connect("localhost", "deltaf", "251978");
mysql_select_db(deltaf, $db);
mysql_set_charset('utf8');
mysql_query("SET NAMES 'UTF8'");
$sql="SELECT * from prime where (bambini='s') order by dataout";
$result=mysql_query($sql, $db);
while ($valori = mysql_fetch_array ($result)){
$titolo=$valori["titolo"];
$luogo=$valori["luogo"];
$dataoutvis=$valori["dataoutvis"];
$ID=$valori["ID"];
$locandina = $valori ["locandina"];
$pagina=$valori["pagina"];
echo" | $titolo - $luogo fino al $dataoutvis |
";
//mysql_error()
}
mysql_close();
?> |
Mostre per bambini |
//include ('teatri/cancella.php');
$db = mysql_connect("localhost", "deltaf", "251978");
mysql_select_db(deltaf, $db);
$b=date("d/m/Y");
list($gg,$mm,$aa)=explode("/",$b);
$c="$aa$mm$gg";
$sql="SELECT * from mostre where (bambini='s' and dataout>$c) order by dataout";
$result=mysql_query($sql, $db);
while ($valori = mysql_fetch_array ($result)){
$titolo=$valori["titolo"];
$luogo=$valori["luogo"];
$dataoutvis=$valori["dataoutvis"];
$ID=$valori["ID"];
$pagina=$valori["pagina"];
$locandina = $valori ["foto"];
echo" | $titolo - $luogo fino al $dataoutvis |
";
//mysql_error()
}
mysql_close();
?> |
|
| | |