Location: PHPKode > projects > ACSoc Comics Library Management System > odin-0.589/index.php
<?php
	require_once "odincom.php";
	require_once "$ui_dir/uicom.inc";
	require_once "$ui_dir/disptpl.inc";
	//require_once "$ui_dir/renderer.inc";
	
	$script	="index.php";
	if ($_GET['action'] == "logout") {
		odin_logout();
	}
	odin_login();

	$_SESSION['navbar']->register("root_main");
	
	$linebuf = '';
	foreach (explode("\n", $tplcfg['index']) as $l) {
		$linebuf .= "\n";
		if ($l{0} != '@') {
			$linebuf .= $l;
			continue;
		};
		preg_match('/^@(.*)\((.*)\)@$/', $l, $m);
		//print "match result:<br>"; print_r($m);
		list(, $func, $arg) = $m;
		$args = explode(',', $arg);
		switch (strtolower($func)) {
		case "recent":
			require_once "dbo/ItemList.php";
			$list = new ItemList();
			$list->query_recent_checkout_return($args[0]);
			//print_r($list->list);
			$linebuf .= get_render_recent_return($list, $args[0], $args[1], $args[2]);
			break;
		case "searchbox":
			$linebuf .= get_searchbox();
			break;
		case "loginbox":
			$linebuf .= get_login_form();
			break;
		case "cms":
			require_once "dbo/Msg.php";
			$list = new MsgList();
			$list->db_msg = 'odin_msgcms';
			$list->lim = $_GET['lim'];
			$list->page = $_GET['page'];
			$list->orderby = $_GET['ord'];
			$list->orderdesc = $_GET['odn'];
			$list->flag = 1;
			$list->search($board);
			//print_r($list);
			$linebuf .= get_cms_content($list);
			break;
		default:
			$linebuf .= $l;
		}
	}
	
	print_header(array("navbar"=>0));
	print $linebuf;
	print_footer(array("navbar"=>0));
?>
Return current item: ACSoc Comics Library Management System