2035) { $year = 2035; } } if (isset($_GET['today'])) { $today = $_GET['today']; $today = preg_replace ("/[[:space:]]/", "", $today); $today = preg_replace ("/[[:punct:]]/", "", $today); $today = preg_replace ("/[[:alpha:]]/", "", $today); } $month = (isset($month)) ? $month : date("n",time()); $year = (isset($year)) ? $year : date("Y",time()); $today = (isset($today))? $today : date("j", time()); $daylong = date("l",mktime(1,1,1,$month,$today,$year)); $monthlong = date("F",mktime(1,1,1,$month,$today,$year)); $dayone = date("w",mktime(1,1,1,$month,1,$year)); $numdays = date("t",mktime(1,1,1,$month,1,$year)); $alldays = array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); $next_year = $year + 1; $last_year = $year - 1; if ($today > $numdays) { $today--; } //begin outer table structure echo "
{$days_locale[$daylong]}, {$months_locale[$monthlong]} $today, $year
  $year  
"; //load and display day title and content in fields $sql_date = "$year-$month-$today"; $eventQuery = "SELECT v.address as va, v.city as vc, v.name as vn, v.webpage as vw, v.maplink as vm, title, event, eventtime, html, ticketprice, public, outdoor, eventpage FROM cal, venues as v WHERE eventdate = '$sql_date' AND v.id=cal.venue;"; $eventExec = mysqli_query($conn, $eventQuery); $event_event= $noevent_locale; $event_outdoor = ""; $event_time = ""; $venue_web = ""; $venue_map = ""; $venue_address; while($row = mysqli_fetch_array($eventExec)) { $html_setting = $row["html"]; $price = $row["ticketprice"]; $ispublic = $row["public"] == 1; $event_title = stripslashes($row["title"]); $event_title = htmlspecialchars($event_title, ENT_COMPAT | ENT_HTML401, "ISO-8859-1"); $event_event = stripslashes($row["event"]); $eventpage = stripslashes($row["eventpage"]); $eventtime = $row["eventtime"]; $venue = stripslashes($row["vn"]); $outdoor = $row["outdoor"]; if ($html_setting != 1) { $event_event = htmlspecialchars($event_event, ENT_COMPAT | ENT_HTML401, "ISO-8859-1"); $event_event = preg_replace ("#\n#", "
\n", $event_event); } if ( $price > 0 ) { $event_price = "Ingresso: " . $price . " euro

\n"; } else { $event_price = "Ingresso LIBERO

\n"; } if ( $outdoor > 0 ) { $event_outdoor = "Il concerto si terrà all'aperto

\n"; } if ( strlen($eventtime) > 0 ) { $prtime = prettyTime($eventtime); $event_time = "Inizio ore: $prtime
\n"; } if ( strlen($row["vw"]) > 0 ) { $venue_web = " [www]"; } if ( strlen($row["vm"]) > 0 ) { $venue_map = " [map]"; } $public_event = ""; if ( !$ispublic ) { if ( $price == 0 ) { $event_price = ""; } $public_event = "Festa privata

\n"; } $venue_address = stripslashes($row["va"]); $venue_city = stripslashes($row["vc"]); $event_venue = ""; if ( $ispublic && (strlen($venue) > 0) ) { $event_venue = "Dove:
" . $venue . "" . $venue_web . $venue_map . "
" . $venue_address . "
" . $venue_city . "

\n"; } } echo "$event_title
\n"; if ( strlen($eventpage) > 0 ) { echo "Vai alla pagina dell'evento
\n"; } echo "
"; if ( $ispublic ) { echo $event_venue; echo $event_time; echo $event_outdoor; echo $event_price; } echo $public_event; echo $event_event; echo "

Avete assistito a questo evento? Lasciateci "; echo "le vostre impressioni sul "; echo "" . "nostro guestbook!\n"; echo "
\n"; echo monthTable($year, "250") . "\n
\n"; //display name of month echo "\n\n"; echo "\n"; echo "\n\n"; //display day names foreach($alldays as $value) { echo "\n"; } echo "\n\n"; //display blank days as nbsp's for ($i = 0; $i < $dayone; $i++) { echo "\n"; } //display days for ($zz = 1; $zz <= $numdays; $zz++) { if ($i >= 7) { print("\n\n"); $i=0; } //check current day for an event $eventclass = "cellbg"; if ($zz == $today) { //mark todays cell regardless $eventclass = "celltoday"; } else { //search for event on this day and mark cell if title not empty $sql_currentday = "$year-$month-$zz"; $eventQuery = "SELECT title, public FROM cal WHERE eventdate = '$sql_currentday';"; $eventExec = mysqli_query($conn, $eventQuery); while($row = mysqli_fetch_array($eventExec)) { if (strlen($row["title"]) > 0) { if ($row["public"] == 1) { $eventclass = "cellevent"; } else { $eventclass = "cellprivateevent"; } } } } // show cell echo "\n"; $i++; $result_found = 0; } $create_emptys = 7 - (($dayone + $numdays) % 7); if ($create_emptys == 7) { $create_emptys = 0; } //display blank remaining cells if ($create_emptys != 0) { echo "\n"; } echo "\n"; echo "
" . $months_locale[date("F",mktime(1,1,1,$month,1,$year))] . "\n
" . $shortdays_locale[$value] . "
 
$zz

\n"; //weekly display echo "\n\n"; echo "\n"; for ($i = $today; $i <= ($today + 6); $i++) { //determine if days rollover into next month $current_day = $i; $current_year = $year; $current_month = $month; if ($i > $numdays) { $current_day = ($i - $numdays); $current_month = $month + 1; if ($current_month > 12) { $current_month = 1; $current_year = $year + 1; } } $dayname = date("l",mktime(1,1,1,$current_month,$current_day,$current_year)); $sql_currentday = "$current_year-$current_month-$current_day"; $eventQuery = "SELECT title FROM cal WHERE eventdate = '$sql_currentday';"; $eventExec = mysqli_query($conn, $eventQuery); while($row = mysqli_fetch_array($eventExec)) { if (strlen($row["title"]) > 0) { $this_days_title = stripslashes($row["title"]); $this_days_title = htmlspecialchars($this_days_title, ENT_COMPAT | ENT_HTML401, "ISO-8859-1"); } } echo "\n"; $this_days_title = ""; } echo "
{$glance_locale}
{$days_locale[$dayname]} - $current_day
\n"; //display day title if exists if (strlen($this_days_title) > 0) { echo "$this_days_title"; } echo "
\n"; echo "
{$jumpto_locale}
"; //end outer table echo "
\n"; ?>
test
.: home - concerti - biografia - audio - foto - scheda tecnica - contatti - guestbook - mailing list - credits - admin :.