$page='weblog'; $pageTitle='cookiecrook: james craig'; $sortArray; function permLink($sPostId,$sPostTitle){ global $file; if($file){ $myFile = $file; }else{ for($i=0;$i<5;$i++){ $sYear = date('Y'); $sMonth = date('m')-$i; if($sMonth<1){ $sMonth += 12; $sYear--; } if($sMonth<10){ $sMonth = '0'.$sMonth; } $myFile = 'blog/'.$sYear.'_'.$sMonth.'_01_archive.php'; if(file_exists($myFile)){ $aFile = file($myFile); $sFile = implode('',$aFile); if(substr_count($sFile,'id="cc'.$sPostId.'"')!=0){ $current=$sPostId; break; } } } if($current!=$sPostId){ return; } } $date = substr($myFile,5,4).substr($myFile,10,2); $dateYear = substr($myFile,5,4); $dateMonth = substr($myFile,10,2); echo '#'; } function sortArchive($path){ global $sortArray; $path = substr($path,0,4).substr($path,5,2); $sortArray[] = $path; } function AddComment($sPostId, $sPostTitle){ // no point in the blogback functionality if the site is not there. return; if ($sPostId > 8286196){ ?>
} } $logFile = false; $blogBack = false; if ($archive) { $file = 'blog/'.substr($archive,0,4).'_'.substr($archive,4,2).'_01_archive.php'; if(substr($archive,0,4)>2001) $blogBack = true; if ($archive=='all'){ $logFile = 'content/main_blogarchive.php'; } else if (file_exists($file)){ $logFile = $file; } else { $blogBack = true; $logFile = 'blog/blog.php'; } } else { $blogBack = true; $logFile = 'blog/blog.php'; } include('global.php'); include('structure/headopen.php'); include('structure/head.php'); include('structure/headclose.php'); include('structure/topnav.php'); include('structure/nav.php'); include('structure/openmain.php'); if($logFile)include($logFile); include('structure/closediv.php'); include('structure/foot.php'); include('structure/footclose.php'); ?>