<?php

/*
  PHP version 5
  Copyright (c) 2002-2018 ECISP.CN、EarcLink.COM
  警告：这不是一个免费的软件，请在许可范围内使用，请尊重知识产权，侵权必究，举报有奖
  作者：黄祥云 E-mail:6326420@qq.com  QQ:6326420 TEL:18665655030

 */

$module_array = espcms_action_url($action);

spl_autoload_register('admin_autoload');

$espcms_admin_templates = espcms_admin_template();

$espcms_db_cache = espcms_start_cache();

require_once(ESPCMS_FILE_ROOT . 'espcms_public/espcms_db.php');

require_once(ESPCMS_FILE_ROOT . 'espcms_public/espcms_dbsave.php');

$module_filename = ESPCMS_FILE_ROOT . ESPCMS_ADMIN_DIRNAME . '/control/' . $module_array['module'] . '.php';
if (!is_file($module_filename)) {
    espcms_message_err('public_pack-espcms_module_file_err', array($action));
}

include $module_filename;

global $module_array;
$module = $module_array['module'];
$method = $module_array['method'];
if (method_exists($module, $method)) {
    $control = new $module;
    $control->$method();
} else {
    $methodName = $module_array['module'] . '/' . $module_array['method'];
    espcms_message_err('public_pack-espcms_method_name_err', array($methodName));
}
