-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
executable file
·72 lines (69 loc) · 2.1 KB
/
index.php
File metadata and controls
executable file
·72 lines (69 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
/**
* 引入文件
*
* @version 2015年7月12日Z by 海东青
* @package DuomiCms.Administrator
* @copyright Copyright (c) 2015, SamFea, Inc.
* @link http://www.duomicms.net
*/
if(!file_exists("data/common.inc.php"))
{
header("Location:install/index.php");
exit();
}
require_once ("duomiphp/common.php");
require_once duomi_INC."/core.class.php";
//站点状态
if($cfg_website==0)
{
ShowMsg('站点已关闭!','-1');
exit();
}
if($cfg_runmode=='0')
{
header("Location:index".$cfg_filesuffix2);
}
checkIP();
if($_SESSION['cfg_ac'] == "app" and $_SESSION['duomi_user_name'] == ""){
header("Location:/member/login.php");
}
echoIndex();
function echoIndex()
{
global $cfg_iscache,$t1;;
$cacheName="parsed_index";
$templatePath="/duomiui/".$GLOBALS['cfg_df_style']."/".$GLOBALS['cfg_df_html']."/index.html";
if($cfg_iscache){
if(chkFileCache($cacheName)){
$indexStr = getFileCache($cacheName);
}else{
$indexStr = parseIndexPart($templatePath);
setFileCache($cacheName,$indexStr);
}
}else{
$indexStr = parseIndexPart($templatePath);
}
$indexStr=str_replace("{duomicms:member}",front_member(),$indexStr);
echo str_replace("{duomicms:runinfo}",getRunTime($t1),$indexStr) ;
}
function parseIndexPart($templatePath)
{
global $mainClassObj;
$content=loadFile(duomi_ROOT.$templatePath);
$content=$mainClassObj->parseTopAndFoot($content);
$content=replaceCurrentTypeId($content,-444);
$content=$mainClassObj->parseSelf($content);
$content=$mainClassObj->parseHistory($content);
$content=$mainClassObj->parseGlobal($content);
$content=$mainClassObj->parduomireaList($content);
$content=$mainClassObj->parseNewsAreaList($content);
$content=$mainClassObj->parseMenuList($content,"",$currentTypeId);
$content=$mainClassObj->parseVideoList($content,$currentTypeId);
$content=$mainClassObj->parseNewsList($content,$currentTypeId);
$content=$mainClassObj->parseTopicList($content);
$content=$mainClassObj->parseLinkList($content);
$content=$mainClassObj->parseIf($content);
return $content;
}
?>