* @time 20111004 */ //初始化 $pagetitle = '基本信息'; $pagepower = 'sys'; //基本部分 require 'checkpower.inc.php'; //功能部分 include_once WEB_INC . 'file.class.php'; include_once WEB_INC . 'string.class.php'; if (isset($submit)) { $FS = new files(); $STR = new C_STRING(); $info = array('isclose' => $isclose, 'closeinfo' => $closeinfo, 'webtitle' => $webtitle, 'indextitle' => $indextitle, 'webkeywords' => $webkeywords, 'webdescription' => $webdescription, 'webcopyright' => $webcopyright, 'webbeian' => $webbeian, 'templates' => $systemplates); $rs_msg = $STR->safe($info); if ($FS->file_Write($rs_msg, WEB_INC . 'sys.inc.php', 'sys')) { errorInfo('编辑成功'); } else { errorInfo(); } } else { $rs_sys = $sys; $templatesList = array(); function getTemplatesList() { global $config; $handler = opendir(WEB_ROOT . $config['defaultTemplates']); while (($filename = readdir($handler)) !== false) { //务必使用!==,防止目录下出现类似文件名“0”等情况 if ($filename != "." && $filename != "..") { $files[] = $filename;
function make_module_cache() { $tmp_path = WEB_MODULE; $tmp_my_path = dir($tmp_path); $cache_modtype = array(); $cache_modmenu = array(); $cache_modpower = array(); while ($tmp_my_file = $tmp_my_path->read()) { if (is_dir("{$tmp_path}{$tmp_my_file}") and $tmp_my_file != "." and $tmp_my_file != "..") { if (is_file("{$tmp_path}{$tmp_my_file}/info.install.php")) { include "{$tmp_path}{$tmp_my_file}/info.install.php"; //$config['modtype_module'] foreach ($moduleController as $value) { $cache_modtype['module'][] = $value; } //$config['modtype_module_arr'] $cache_modtype['module_arr'][$moduleName] = $moduleController; //$config['modmenu_module'] if (isset($moduleMenu)) { $cache_modmenu[$moduleName] = $moduleMenu; } //$config['modpower_module'] if (isset($modulePower)) { $cache_modpower['module'][$moduleName] = $modulePower; } //$config['modpower_module_class'] if (isset($moduleClassPower)) { $cache_modpower['module_class'][$moduleName] = $moduleClassPower; } unset($moduleName, $moduleController, $moduleMenu, $modulePower, $moduleClassPower); } } } if (!class_exists('files')) { include_once WEB_INC . 'file.class.php'; } $FS = new files(); $FS->file_Write($cache_modtype, WEB_CACHE . 'modtype.cache.php', 'cache_modtype'); $FS->file_Write($cache_modmenu, WEB_CACHE . 'modmenu.cache.php', 'cache_modmenu'); $FS->file_Write($cache_modpower, WEB_CACHE . 'modpower.cache.php', 'cache_modpower'); $tmp_my_path->close(); }