All pastes #931558 Raw Edit

Miscellany

public php v1 · immutable
·published 2008-03-07 08:14 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>";	}        /*$engDay = date("l");	switch($engDay) {		case "Monday":			$norDay = "mandag";			break;		case "Tuesday":			$norDay = "tirsdag";			break;		case "Wednesday":			$norDay = "onsdag";			break;		case "Thursday":			$norDay = "torsdag";			break;		case "Friday":			$norDay = "fredag";			break;		case "Saturday":			$norDay = "lørdag";			break;		case "Sunday":			$norDay = "søndag";			break;	}*/        $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";?>