<?php
/**
 * Copyright (C) 2009  Honghao Geng (genghonghao@gmail.com)
 * $Id: init.php 540 2010-01-24 03:25:11Z genghonghao $
 */
 
define('IN_GEN', TRUE);

if (!defined('IN_ADMIN')) {
    die("Hacking attempt");
}
$lang = array();
require_once substr(dirname(__FILE__), 0, -15) . '/includes/common.inc.php';
require_once GEN_ROOT . '/admin/includes/function.inc.php';
require_once GEN_ROOT . '/languages/' . $_CONF['lang'] . '/admin/menu.inc.lang.php';
require_once GEN_ROOT . '/languages/' . $_CONF['lang'] . '/admin/common.lang.php';

// 网站根目录
$base_root_url = substr($base_url, 0, -6);

// 设置js,image,css文件的路径
$tpl->assign('js_path',    $base_root_url . '/js/');
$tpl->assign('admin_js_path',    $base_url . '/js/');
$tpl->assign('image_path', $base_url . '/images/');
$tpl->assign('style_path', $base_url . '/styles/');

// 语言载入模板
$tpl->assign('lang', $lang);
?>