// timezone - one of those words in the English language that sounds cool but is really boring
date_default_timezone_set('Europe/Madrid');
//today is friday - tomorrow is saturday and sunday comes afterwards
$ymdtoday=date("Y-m-d");
// tomorrow - it's only a day away
$tomorrow = mktime(0, 0, 0, date("m"), date("d")+1, date("y"));
$tomorrowcode=date("Y-m-d", $tomorrow);
// Saturday - I feel like the air is getting pretty hot
$saturday= date("Y-m-d", strtotime("Saturday")) ;
// Esta semana - today until sunday
$thisweekend= date("Y-m-d", strtotime("Sunday")) ;
// next week - next monday to sunday
$nxtweekmon= date("Y-m-d", strtotime("Monday next week")) ;
$nxtweeksun= date("Y-m-d", strtotime("Sunday next week")) ;
// week after next - a week monday to sunday
$wanmon= date("Y-m-d", strtotime("Monday +1 weeks")) ;
$nwansun= date("Y-m-d", strtotime("Sunday +1 weeks")) ;
// to infinity and beyond fornight - 2 a weeks monday to sunday
$twowkson= date("Y-m-d", strtotime("Monday +2 weeks")) ;
$fourwkson= date("Y-m-d", strtotime("Monday +6 weeks")) ;
?>
//tomorrow Select
$blackcurtains = "SELECT * FROM bcnmes_dbem_events,bcnmes_dbem_locations,bcnmes_dbem_categories WHERE bcnmes_dbem_events.location_id = bcnmes_dbem_locations.location_id AND bcnmes_dbem_events.event_category_ids = bcnmes_dbem_categories.category_id AND bcnmes_dbem_categories.category_name LIKE '%art%' AND bcnmes_dbem_events.event_start_date>=’$ymdtoday’ AND bcnmes_dbem_events.event_start_date<='$fourwkson' ORDER BY event_start_date,event_start_time";
$blackresult = mysql_query($blackcurtains);
$blackrow=mysql_num_rows($blackresult);
$bananas="" ;
If ($blackrow == 0) {$bananas="It's oh so quiet - ssshhhhhh... ssshhhhhh... "; $pineapples="false";}
Else {
$pineapples="true";
while($row = mysql_fetch_array( $blackresult )) { {
// the content loop
$bananas="" ;
//code
$kiwibr="
” ;
$Kiwib1=”” ;
$kiwib2=”” ;
$kiwibullet=” • ” ;
$kiwip=’
‘ ;
$kiwipend=’
‘ ;
// event name
// $kiwieventname=$row['event_name'] ;
//
//
//
//
//
//
// database bcnmes_dbem_events
//
// ;>]
// bcnmes_dbem_categories
// bcnmes_dbem_locations
//
//
//
//
$eventnotes=$row['event_notes'] ;
$shortnotes=substr($eventnotes,0,550);
$locstart=”;
$locend=”]”;
$locfull=”";
$locfull=$locstart.$locid.$locend;
// More info link
$moreinfoa= ‘‘ ;
$moreinfoc=’
‘ ;
// More info link
$css1start=’
$css1end=’
‘;
$moreinfoa= ‘‘ ;
$moreinfoc=’‘ ;
$head5a=”";
$head5a=$head5a.$css1start.$moreinfoa.$kiwieventid.$slash.$kiwieventname.$slash.$moreinfob.$eventdate.’ / ‘.$kiwieventname.’ @ ‘.$locname.$moreinfoc.$css1end ;
echo $head5a;
//subheading
$css2start=’
$css2end=”
“;
$estart= $row['event_start_time'] ;
$estarttrim= substr($estart,0,5);
$attfull=$row['event_attributes'] ;
$attstart = strstr($attfull, ’7:’);
$adquote = strstr($attstart , ‘;’, true);
$attquote2 = strstr($adquote, ‘”‘);
$admission = ‘ ‘.str_replace(‘”‘, ”, $attquote2);
$catname=$row['category_name'] ;
$postyellow=”";
$postyellow=$postyellow.$css2start.$estarttrim.’ • ‘.$admission.’ ‘.$catname.$css1end ;
echo $postyellow;
//content
//content
$eventnotes=$row['event_notes'] ;
$shortnotes=substr($eventnotes,0,550);
$poschecker=’ ‘;
$pos = strrpos($shortnotes,$poschecker);
$shortnotes=substr($shortnotes, 0, $pos);
$dash=’‘;
$dashdash=$moreinfoa.$kiwieventid.$slash.$kiwieventname.$slash.$moreinfob.$dash.$moreinfoc;
$shortnotes=’
‘.$shortnotes.’ … ‘.$dashdash.’
‘;
echo $shortnotes;
//space
$whiteline=’
‘;
$spaceliner=’
‘.$whiteline;
echo $spaceliner ;
}
}
}
?>









