<?php
	session_start();
	include_once '../config.php';
	$act = $_GET['act'];
	$title = '';
	$tplname = '';
	$phpname = '';
	switch($act){
		case 'reg':
			$title = '用户注册';
			$tplname = 'register.tpl';
			break;
		case 'login':
			$title = '用户登录';
			$tplname = 'login.tpl';
			break;
		case 'mess':
			$title = '发表留言';
			$tplname = 'mess.tpl';
			break;
		case 'rev':
			$title = '回复留言';
			$tplname = 'review.tpl';
			break;
	}
	if($tplname != ''){
		$smarty->assign('title',$title);
		$smarty->assign('tplname','12/'.$tplname);
		$smarty->display('12/index.tpl');
	}else{
		switch($act){
			case 'show':
				$title = '查看留言';
				$phpname = $_SERVER['DOCUMENT_ROOT'].dirname($_SERVER['SCRIPT_NAME']).'/show.php';
				break;
			case 'mod':
				$phpname =  $_SERVER['DOCUMENT_ROOT'].dirname($_SERVER['SCRIPT_NAME']).'/modify.php';
				$title = '修改';
				break;
			default:
				$title = '留言列表';
				$phpname = $_SERVER['DOCUMENT_ROOT'].dirname($_SERVER['SCRIPT_NAME']).'/messlist.php';
				break;
		}
		$smarty->assign('title',$title);
		$smarty->assign('phpname',$phpname);
		$smarty->display('12/index.tpl');
	}
?>