All pastes #427802 Raw Edit

Miscellany

public php v1 · immutable
·published 2007-04-07 00:52 UTC
rendered paste body
<?phpinclude "config.php";require './includes/smarty/libs/Smarty.class.php';$smarty = new Smarty;$smarty->compile_check = true;$smarty->debugging = false;$smarty->template_dir = "./themes/default/";$smarty->compile_dir = "./themes/default/cache/";$smarty->assign("theme", "default");$smarty->assign("siteName", "CMS");$smarty->assign("pageTitle", "Test");class CMSModule {	var $mName;	var $mID;	function setName($name){		$this->mName = $name;	}	function setID($id){	 	$this->mID = $id;	}}$lCol = array();$rCol = array();$mDir = opendir("./modules/");while ($mItem = readdir($mDir)) {	if ($mItem != "." && $mItem != "..") {		include "./modules/".$mItem."/".$mItem.".module.php";		$modName = $mItem."Module";		if (class_exists($modName)) {			$module[$mItem] = new $modName();			if ($modules[$mItem]['enabled']) {				switch($modules[$mItem]['col']) {					case "right":					$rCol[] = $mItem;					break;					case "left":					$lCol[] = $mItem;					break;				}			}		} else {error_log("Error loading class: ".$modName, 3, "F:/web/www/CMS/errorlog.log");}	}}closedir($mDir);for ($i=0; $i < count($lCol); $i++) {$lColMods[$i]['name'] = $module[$lCol[$i]]->mName;$lColMods[$i]['content'] = $module[$lCol[$i]]->drawSideBar();}for ($i=0; $i < count($rCol); $i++) {$rColMods[$i]['name'] = $module[$rCol[$i]]->mName;$rColMods[$i]['content'] = $module[$rCol[$i]]->drawSideBar();}$smarty->assign("lMods", $lColMods);$smarty->assign("rMods", $rColMods);if (!isset($_GET['module']) || !isset($_GET['mode']) || empty($module[$_GET['module']])) {	$cModule['title'] = "Article Title";	$cModule['content'] = "Articles will be posted here. This is my CMS system I'm working on. I am just making a design right now (Based off of one from www.oswd.org good site). It is going to be a plugin based CMS, and plugins are going to be rather easy to create.";} else {	$cModule['title'] = $module[$_GET['module']]->mName;	$func = $_GET['module'].$_GET['mode'];	$cModule['content'] = $module[$_GET['module']]->$func();}$smarty->assign("cModule", $cModule);$smarty->display('index.tpl');?>