/**
* convert database literal into unix epoch timestamp
*
* @param string $dbliteral DB literal timestamp representation
* @return timestamp, or false if literal could not be parsed
*/
function timestamp_from_db_literal($dbliteral)
{
if (empty($dbliteral)) return false; // empty value -> no timestamp
if ($dbliteral == '0000-00-00 00:00:00') return false; // this is no timestamp, either
$timestamp = strtotime($dbliteral);
if ($timestamp==-1) $timestamp=false; // convert pre-PGP 5.1.0 failure indication
return $timestamp;
} // timestamp_from_db_literal
$now = time();
$startdate = timestamp_from_db_literal("2010-11-20");
$enddate = timestamp_from_db_literal("2010-11-20");
if ($now<$startdate || $now>=($enddate+24*60*60)) {
?>
MixWerk
} else {
// Eröffnung
?>
}
?>