<?php
/**
* ===========================================
* Project: Modoer(Mudder)点评系统
* Version: 1.1
* Time: 2007-7-17 @ Create
* Copyright (c) 2007 - 2008 Moufer Studio
* Website: http://www.modoer.com
* Developer: 林仕君(Moufer)
* E-mail: moufer@163.com
* ===========================================
*
* 网站首页
* @author moufer<moufer@163.com>
* @package modoer
* @copyright Moufer Studio(www.modoer.com)
* @version $Id: index.php 25 2008-10-05 02:57 $
*
*/

$lockfile = './data/install.lock';
if(!file_exists($lockfile)) {
	exit('Unsure whether the system of Modoer has been installed or not.If it has already been installed,under the folder of ./data , please create a new empty  file named as "install.lock".');
}

define('SCRIPTNAV', 'index');
require_once './include/common.inc.php';

$pcd = $_config['default_panel'];
$panelcfg = $_panel_config[$pcd];
$panelscores = $panelcfg['review'];

$newpictures_size = $_config['thumbdisplay'] == 'fixed' ? " width=\"{$_picture_thumb['small']['width']}\" height=\"{$_picture_thumb['small']['height']}\"" : "";

$classlist = array();
if ($_panels && $_classcodes) {
    $classnum = 10; //首页分类数量
    foreach( $_panels as $key => $val) {
        $list = array();
        $i = 0;
        foreach($_classcodes as $p_key => $p_val) {
            if(strlen($p_key) > 2 && substr($p_key, 0, 2) == $key) {
                $i++;
                $list[] = array('cd' => $p_key, 'name' => $p_val['classname']);
            }
            if($i >= $classnum) { 
                $list[] = array('cd' => $key, 'name' => '更多...');
                break;
            }
        }
        $classlist[$key] = $list;
    }
}

require_once MUDDER_ROOT.'header.php';
require_once template('modoer_index');
footer();
?>