All pastes #955940 Raw Edit

Anonymous

public php v1 · immutable
#955940 ·published 2008-03-24 22:48 UTC
rendered paste body
<?phpif(isset($_GET['page_id'])) {	$page_id = $_GET['page_id'];} else {	$page_id = "index";}// :TODO: put me into database$pages = array(	"index" => array(		"name" => "Übersicht",							"file" => "uebersicht.php"	),								"vorstand" => array(	"name" => "Vorstand",							"file" => "vorstand.php" ),);$sidebar_directory = array(	"index",	"vorstand" );?><html><head><title>Feuerwehrverein Weiterstadt</title><style type="text/css" media="all">@import "default.css";</style></head><body>	<table id="global-wrap"><tr><td id="box1"><div class=t><div class=b><div class=l><div class=r><div class=tl><div class=tr><div class=bl><div class=br><div class=inner><table><tr>	<td id="sidebar" valign="top">		<p><img src="img/site/logo_ffw2.gif"></p>		<hr>		<?			foreach($sidebar_directory as $entry_id) {				$entry = $pages[$entry_id];				if($entry_id == $page_id) {					$divid = "sidebar-index-selected";				} else {					$divid = "sidebar-index";				}				printf('<div id="%s">%s</div><br />', $divid, $entry["name"]);			}		?>	</td>		<td id="content">		<?php			if(isset($pages[$page_id])) {				$page = $pages[$page_id];				include $page['file'];			} else {				print "not included";			}		?>	</td></tr></table></div></div></div></div></div></div></div></div></div></td></tr></table>		</body></html>