<?php
error_reporting(E_ALL ^ E_NOTICE);
//超时设置
if($public_r['php_outtime'])
{
@set_time_limit($public_r['php_outtime']);
}
//页面编码
if($phome_headercharset==1)
{
if($phome_ecms_charver=='gb2312'||$phome_ecms_charver=='big5'||$phome_ecms_charver=='utf-8')
{
@header('Content-Type: text/html; charset='.$phome_ecms_charver);
}
}
//禁止IP
eCheckAccessIp(0);
//分页
function postpage($num,$line,$page_line,$start,$page,$form){
global $fun_r;
$pagetotal=$line*$page_line;//所要显示的总条数
$total=ceil(($num-$start)/$line);//取得总页数
$total_start=ceil($num/$pagetotal);//取得总偏移数
$returnstr=$fun_r[totalrecord]." ".$num." ".$fun_r[totalrecorde]." ";
if($start!=0)
{
$old_start=$start-$pagetotal;
$returnstr.=" <a href='#ecms' onclick='javascript:GotoPostPage(0,$old_start);' title='UP".$page_line."Pages'><font face=webdings>7</font></a>";
}
$pagestart=$start/$pagetotal*$page_line;//取得当前页数
for($i=0;$i<$total&&$i<$page_line;$i++)
{
if($page==$i)
{
$is_1="<b>[";$is_2="]</b>";
}
else
{
$is_1="<a href='#ecms' onclick='javascript:GotoPostPage($i,$start);'>";
$is_2="</a>";
}
$pagenum=$pagestart+$i+1;
$returnstr.=" ".$is_1.$pagenum.$is_2;
}
if($total_start!=($start/$pagetotal+1)&&$num!=0)
{
$new_start=$start+$pagetotal;
$returnstr.=" <a href='#ecms' onclick='javascript:GotoPostPage(0,$new_start);' title='Next".$page_line."Pages'><font face=webdings>8</font></a>";
}
$returnstr.="<script>
function GotoPostPage(page,start){
".$form.".page.value=page;
".$form.".start.value=start;
".$form.".submit();
}
</script>";
return $returnstr;
}
//取得模型表名
function GetModTable($mid){
global $empire,$dbtbpre;
$r=$empire->fetch1("select tid,tbname from {$dbtbpre}enewsmod where mid='$mid'");
return $r;
}
//建立专题目录
function CreateZtPath($ztpath){
$createpath='../../'.$ztpath;
$mk=DoMkdir($createpath);
}
//建立栏目目录
function CreateClassPath($classpath){
$createpath='../../'.$classpath;
$mk=DoMkdir($createpath);
$createfilepath="../../d/file/".$classpath;//建立附件目录
$mk1=DoMkdir($createfilepath);
}
//删除栏目缓存文件
function DelListEnews(){
$file="../data/fc/ListEnews.php";
DelFiletext($file);
$file1="../data/fc/ListClass0.php";
DelFiletext($file1);
$file2="../data/fc/ListClass1.php";
DelFiletext($file2);
}
//替换php代码
function RepPhpAspJspcode($string){
global $public_r;
if(!$public_r[candocode]){
//$string=str_replace("<?xml","[!--ecms.xml--]",$string);
$string=str_replace("<?","<?",$string);
$string=str_replace("<%","<%",$string);
//$string=str_replace("[!--ecms.xml--]","<?xml",$string);
}
return $string;
}
//替换php代码
function RepPhpAspJspcodeText($string){
//$string=str_replace("<?xml","[!--ecms.xml--]",$string);
$string=str_replace("<?","<?",$string);
$string=str_replace("<%","<%",$string);
//$string=str_replace("[!--ecms.xml--]","<?xml",$string);
$string=str_replace("<!--code.start-->","<!--code.start-->",$string);
$string=str_replace("<!--code.end-->","<!--code.end-->",$string);
return $string;
}
//标签替换
function NewsBq($classid,$indextext,$enews=0,$doing=0){
global $empire,$public_r,$class_r,$class_zr,$fun_r,$navinfor,$addgethtmlpath,$dbtbpre;
$indextext=stripSlashes($indextext);
if($enews==0)//生成大栏目文件
{
if(strstr($public_r['nreclass'],','.$classid.',')||$class_r[$classid][wburl])//不生成栏目
{
return '';
}
$GLOBALS['navclassid']=$classid;
$url="<!--empire.url-->".ReturnClassLink($classid)."<!--empire.url-->";//栏目导航
if($doing)//修改栏目时
{
$cr=$empire->fetch1("select classpath,classtype,classname from {$dbtbpre}enewsclass where classid='$classid'");
$class_r[$classid][classpath]=$cr[classpath];
$class_r[$classid][classtype]=$cr[classtype];
$class_r[$classid][classname]=$cr[classname];
}
$pagetitle=$class_r[$classid][classname];//标题
if($public_r['openclasspv'])//开启点击
{
$onclick="<script src=".$public_r[newsurl]."e/public/onclick?enews=doclass&classid=$classid></script>";
}
$truefile="../../".ReturnSaveClassPath($classid,1);
$file="../data/tmp/class".$classid.".php";
}
elseif($enews==1)//生成首页文件
{
$pagetitle=$public_r[sitename];
$url="<!--empire.url--><a href=\"".$public_r[newsurl]."\">".$fun_r['index']."</a><!--empire.url-->";//栏目导航
$onclick="";
$truefile="../../".ReturnSaveIndexFile();
$file="../data/tmp/index.php";
}
elseif($enews==2)//页面模板标签
{
$onclick="";
$truefile="";
$file=$addgethtmlpath."../data/tmp/temp".$classid.".php";
}
elseif($enews==3)//专题
{
$GLOBALS['navclassid']=$classid;
$url="<!--empire.url-->".ReturnZtLink($classid)."<!--empire.url-->";//栏目导航
if($doing)//修改专题时
{
$cr=$empire->fetch1("select ztpath,zttype,ztname from {$dbtbpre}enewszt where ztid='$classid'");
$class_zr[$classid][ztpath]=$cr[ztpath];
$class_zr[$classid][zttype]=$cr[zttype];
$class_zr[$classid][ztname]=$cr[ztname];
}
$pagetitle=$class_zr[$classid][ztname];
if($public_r['openclasspv'])
{
$onclick="<script src=".$public_r[newsurl]."e/public/onclick?enews=dozt&ztid=$ztid></script>";
}
$truefile="../../".ReturnSaveZtPath($classid,1);
$file="../data/tmp/zt".$classid.".php";
}
$indextext=ReplaceTempvar($indextext);//替换全局模板变量
if($classid&&$enews==0)//栏目id
{
$indextext=RepClassPageVar($indextext,$classid,$r,0);
$indextext=str_replace("[!--self.classid--]",$classid,$indextext);
$indextext=str_replace("[!--news.url--]",$public_r['newsurl'],$indextext);
$indextext=str_replace("[!--pagetitle--]",$pagetitle,$indextext);//替换标题
}
elseif($classid&&$enews==3)//专题id
{
$indextext=RepClassPageVar($indextext,$classid,$r,1);
$indextext=str_replace("[!--self.classid--]",$classid,$indextext);
$indextext=str_replace("[!--news.url--]",$public_r['newsurl'],$indextext);
$indextext=str_replace("[!--pagetitle--]",$pagetitle,$indextext);//替换标题
}
elseif($enews==1)//首页
{
$indextext=str_replace("[!--self.classid--]",0,$indextext);
$indextext=str_replace("[!--news.url--]",$public_r['newsurl'],$indextext);
$indextext=str_replace("[!--pagetitle--]",$pagetitle,$indextext);//替换标题
}
//替换导航
if($url)
{
$indextext=str_replace("[!--newsnav--]",$url,$indextext);
}
//替换标签
$indextext=DoRepEcmsLoopBq($indextext);
$indextext=RepBq($indextext);
//写文件
WriteFiletext($file,AddCheckViewTempCode().$indextext);
//读取文件内容
@ob_start();
@include($file);
$string=@ob_get_contents();
@ob_end_clean();
if($enews==0||$enews==1||$enews==3){
$string=str_replace("[!--page.stats--]",$onclick,$string);
}
//解析代码
$string=RepExeCode($string);
if($enews<>2){
WriteFiletext($truefile,$string);
}
//WriteFiletext($file,"");
return $string;
}
//加模板验证代码
function AddCheckViewTempCode(){
$code="<?php
if(!defined('InEmpireCMS'))
{
exit();
}
?>";
return $code;
}
//解析代码
function RepExeCode($string){
global $public_r;
if($public_r[candocode]){
$string=str_replace("<!--code.start-->","<",$string);
$string=str_replace("<!--code.end-->",">",$string);
}
return $string;
}
function ClearRepDoECode($string){
$string=str_replace("<!--code.start-->","<!--code.start-->",$string);
$string=str_replace("<!--code.end-->","<!--code.end-->",$string);
return $string;
}
//重命名列表文件
function RenameListfile($classid,$lencord,$num,$type,$newtype,$classpath){
$page=ceil($num/$lencord);
for($j=1;$j<=$page;$j++){
if($j==1){
$listfile="../../".$classpath."/index";
}
else{
$listfile="../../".$classpath."/index_".$j;
}
@rename($listfile.$type,$listfile.$newtype);
}
}
//取得模型ID
functio
没有合适的资源?快使用搜索试试~ 我知道了~
帝国CMS 5.1开源版.zip
共1568个文件
gif:688个
php:496个
js:138个
需积分: 9 10 下载量 76 浏览量
2009-05-03
10:36:31
上传
评论
收藏 2.91MB ZIP 举报
温馨提示
EmpireCMS卓越之处在于:不仅提供了网站管理功能,而且还提供了系统扩展框架,您可以直接在后台通过新建表、自定义字段,然后组成新的系统模型,以实现各种适合用户自己的系统。如下载系统、音乐系统、商城系统、产品库、分类信息等等......同时,此功能可将信息量分配于不同的信息表,为数据量较大的网站进行数据部署。因系统模型扩展特性,EmpireCMS又被誉为“万能建站工具”。在4.7以上版本中,此功能又一次得到升华,不仅增强了后台管理系统的可扩展性,而且前台互动性系统的扩展也能发挥得淋漓尽致,在稳定性、扩展性与完善性等诸多方面都得到了更完美的提升!
资源推荐
资源详情
资源评论
收起资源包目录
帝国CMS 5.1开源版.zip (1568个子文件)
style.css 10KB
fck_editor.css 8KB
fck_dialog.css 6KB
htmlarea.css 4KB
htmlarea.css 4KB
fck_internal.css 4KB
fck_editorarea.css 3KB
edit.css 2KB
edit.css 2KB
Style.css 2KB
contextmenu.css 2KB
site.css 2KB
fck_dialog_common.css 2KB
fck_showtableborders_gecko.css 2KB
css.css 2KB
qcss.css 2KB
css.css 2KB
adminstyle.css 2KB
adminstyle.css 2KB
site.css 2KB
menu.css 1KB
site.css 1KB
tab.winclassic.css 1KB
menu.css 1KB
menu.css 1KB
tab.winclassic.css 1KB
tab.winclassic.css 1KB
css.css 1KB
css.css 1KB
style.css 1KB
style.css 1KB
css.css 1KB
player.css 919B
player.css 591B
css.css 499B
spell-check-style.css 449B
spell-check-style.css 449B
empirebak.gif 103KB
head_bg.gif 16KB
head_bg.gif 16KB
changedata.gif 15KB
opensource.gif 14KB
rss.gif 9KB
empiresoft.gif 9KB
notimg.gif 7KB
notimg.gif 7KB
notemp.gif 7KB
empirecms.gif 7KB
bug_wmp.gif 6KB
login_r2_c3.gif 6KB
login_r1_c2.gif 5KB
fck_strip.gif 5KB
logo.gif 5KB
login_r1_c1.gif 4KB
nav_class_website.gif 4KB
nav_class_program.gif 4KB
logo.gif 4KB
login_r2_c4.gif 3KB
logo.gif 3KB
login_r2_c2.gif 3KB
homepage.gif 2KB
001.gif 2KB
pic_05.gif 2KB
control3_10.gif 2KB
pic_04.gif 2KB
main2.gif 2KB
004.gif 2KB
pic_02.gif 2KB
pic_004.gif 2KB
empirebbs.gif 2KB
login2.gif 2KB
home.gif 2KB
pic_03.gif 2KB
main.gif 2KB
pic_07.gif 2KB
pic_06.gif 2KB
pic_01.gif 2KB
bottom.gif 2KB
logo_fckeditor.gif 2KB
002.gif 2KB
nouserpic.gif 2KB
003.gif 2KB
changedata.gif 2KB
qfinfo.gif 2KB
pl.gif 2KB
pl2.gif 2KB
fck_plugin.gif 2KB
usercp.gif 2KB
tool.gif 2KB
template.gif 2KB
other.gif 2KB
pic0001.gif 2KB
info.gif 2KB
bg.gif 2KB
bodybg.gif 2KB
bg.gif 2KB
bodybg.gif 2KB
bg.gif 2KB
bodybg.gif 2KB
class.gif 2KB
共 1568 条
- 1
- 2
- 3
- 4
- 5
- 6
- 16
资源评论
xrnic
- 粉丝: 0
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功