1) define('MSIE', true); else define('MSIE', false); $needsauth = array('fm','sped','eduser'); $wz=array('columnside'=>'left','pagewidth'=>960,'columnwidth'=>250,'textcolor'=>'#00','headingcolor'=>'#c00','linkcolor'=>'#33c','textfont'=>'"Trebuchet MS",Helvetica,sans-serif','pagebackground'=>'#111','textbackground'=>'#fff','itembackground'=>'#eee','itemborder'=>'1px outset #fff','headerbackground'=>'#bbb','columnbackground'=>'#ccc','thumbnailsize'=>120,'imagedir'=>'images','moduledir'=>'modules','templatefile'=>'template.htm');//fallback if no whizzy.ini $config=is_file('whizzy.ini')?parse_ini_file('whizzy.ini'):array(); $wz['qs']=$_SERVER['QUERY_STRING']; session_start(); $wz=array_merge($wz,$config,$_GET,$_POST,$_SESSION); if ($wz['diag']) print_r($wz); //diag if (!preg_match('/(left|right)/',$wz['columnside']))$wz['columnside']='left'; $wz['mainside']=($wz['columnside']=='left') ? 'right' : 'left'; $wz['mainwidth']=$wz['pagewidth']-$wz['columnwidth']; if (!$wz['headingfont']) $wz['headingfont']=$wz['textfont']; define('WHIZZQM',$wz['usemodrewrite']?'':'?'); define('TNSIZE',$wz['thumbnailsize']); define('IMAGES',$wz['imagedir']); if (empty($wz['go'])){ //index.php?pagename or ?go=function&(f|d|to|etc)= if (!is_dir('.users')||!is_dir('.pages')) {installer(); exit;} if (empty($wz['qs'])) $wz['go'] = 'Home'; else if (strpos($wz['qs'],'=') === false) $wz['go'] = $wz['qs']; else if ($wz['sped']) $wz['go']= 'sped'; } define('GO',$wz['go']); if (!function_exists(GO) && (is_file(GO.'.php'))) include GO.'.php'; if (function_exists(GO)) { if (in_array(GO,$needsauth)&& !authorized())login(); else $wz['go'](); exit; } spit(); exit ('['.VERSION.' Fallen through! ]'); //---------------------------------------FUNCTIONS function spit() { // ------------------------------------------------Show Page In Template global $wz; extract($wz); $pagepath = empty($wz['go']) ? 'Home' : $wz['go']; if (is_file(".pages/$pagepath")) { $content = content(".pages/$pagepath"); } else { if (!is_dir($pagepath)) { if ($pagepath=='admin' && authorized()) fm(); //Allows user to create a page 'admin' $content = '' . $pagepath .' not found'; } $content .= pagelist(""); } $tpltag=tag('templatefile',$content); if ($tpltag)$templatefile=$tpltag; if (empty($templatefile)) $templatefile = 'template.htm'; //path to template file $by='
'; if (is_file($templatefile)) $page=str_replace('',$by.'',content($templatefile)); else $page = "
{HERE_TAG:head}