<?php
require "data/config.php";
require("skymvc/skymvc.php");
$_GET['m']=isset($_GET['m']) && in_array($_GET['m'],array('index','article'))?$_GET['m']:'index';
require_once(ADMIN_DIR."/".CTRL_DIR."/{$_GET['m']}.ctrl.php");
$classname = $_GET['m'].'Control';
$control = new $classname();
//ÅäÖÃÎ±¾²Ì¬µÄ
$control->smarty->template_dir="tpl/admin";
$control->smarty->compile_dir="data/admincompiled";
$control->smarty->rewrite_on=true;
$control->smarty->rewrite_arr=array(array("/index.php/","index.html"));
$method=isset($_GET['a']) && method_exists($control,'on'.$_GET['a'])? 'on'.$_GET['a']:"onDefault";
$control->$method();
?>