All pastes #931600 Raw Edit

Miscellany

public php v1 · immutable
·published 2008-03-07 08:40 UTC
rendered paste body
<?phpinclude "top.inc.php";$clock = (int) date("G");	if ($clock <= 5) {		echo "\n\t\t\t\t<h1>God natt</h1>";	} elseif ($clock <= 10) {		echo "\n\t\t\t\t<h1>God morgen</h1>";	} elseif ($clock <= 12) {		echo "\n\t\t\t\t<h1>God formiddag</h1>";	} elseif ($clock <= 14) {		echo "\n\t\t\t\t<h1>God dag</h1>";	} elseif ($clock <= 16) {		echo "\n\t\t\t\t<h1>God middag</h1>";	} elseif ($clock <= 18	) {		echo "\n \t\t\t\t<h1>God ettermiddag</h1>";	} else {echo "\n\t\t\t\t<h1>God kveld</h1>";	}	$dager = array("søndag", "mandag", "tirsdag", "onsdag", "torsdag", "fredag", "lørdag");$norDay = $dager[date("w")]; // date("w") == tallverdi for dagen i uka, 0 er søndag        	if ($norDay == "søndag") {		echo "\n\t\t\t\t<strong style='color:maroon;'>I dag er det $norDay</strong>\n";	} else {echo "\n\t\t\t\t<strong style='color:#878787;'>I dag er det $norDay</strong>\n";	}include "bottom.inc.php";?>