📄 index.php
字号:
<?php
define('DUOXUN','OK');
require_once('global.php');
echo "<!--
/******************************************************************************
* 程序名称:DuoXun CMS *
* 程序开发:多讯网 http://www.duoxun.com *
* 帮助中心: *
* 1)QQ:405228655 *
* 2)E-mail:duoxun@163.com *
* 更多联系方法请登陆:多讯网 http://www.duoxun.com *
******************************************************************************/
-->";
$guide='';
require_once('head.php');
@include_once(R_P.'cache/bbs.php');
@include_once(R_P.'cache/sortcache.php');
@include_once(R_P.'cache/sort_cache.php');
@include_once(R_P.'cache/set.php');
echo "<script for=window event=onload>var clink=document.links[document.links.length-1];clink.innerText='http://www.duoxun.com';clink.href='http://www.duoxun.com/';clink.title='DuoXun CMS(多讯网)';</script>";
$regurl=$set['ifhtml']=='1' && file_exists(R_P.'reg.html') ? 'reg.html' : 'reg.php';
$loginurl=$set['ifhtml']=='1' && file_exists(R_P.'login.html') ? 'login.html' : 'login.php';
$query_news1=query("SELECT * FROM duoxun_news WHERE topped<>0 ORDER BY topped ASC");
while($rs=fetch_array($query_news1)) {
$news1[]=$rs;
}
$query_news2=query("SELECT * FROM duoxun_news WHERE topped=0 ORDER BY aid DESC");
while($rs=fetch_array($query_news2)) {
$news2[]=$rs;
}
if(!empty($news1) && empty($news2)) {
$news=array_slice($news1,0,$set['news_num']);
} elseif(!empty($news2) && empty($news1)) {
$news=array_slice($news2,0,$set['news_num']);
} elseif(!empty($news1) && !empty($news2)) {
$new=array_merge($news1,$news2);
$news=array_slice($new,0,$set['news_num']);
}
$arr=array_merge($sort,$bbs);
foreach($arr as $value) {
$out[]=$value;
}
!empty($out) ? $num=count($out) : $num=0;
if(!file_exists(R_P.'cache/ad.php')) {
touch(R_P.'cache/ad.php');
}
$ads=readover(R_P.'cache/ad.php');
if($num<>0) {
$adnum=ceil($num/3);
for($i=1;$i<$adnum+1;$i++) {
$filename="ad".$i.".php";
if(!file_exists(R_P.'cache/'.$filename)) {
touch(R_P.'cache/'.$filename);
}
$ad[$i]=readover(R_P.'cache/'.$filename);
}
for($i=$adnum+1;$i<11;$i++) {
$filename="ad".$i.".php";
if(@file_exists(R_P.'cache/'.$filename)) {
@unlink(R_P.'cache/'.$filename);
}
}
}
$sortnum=count($sort);
for($i=0;$i<$sortnum;$i++) {
$query=query("SELECT * FROM duoxun_subject WHERE sid='{$sort[$i]['id']}' AND ifshow=1 AND topped=0 ORDER BY aid DESC LIMIT {$set['index_num']}");
while($rs=fetch_array($query)) {
$catedb[$sort[$i]['id']][]=$rs;
}
}
@include_once(R_P.'cache/toppic.php');
function toppic_c($len="") {
global $toppic;
$imgjs='';
if(count($toppic)==0) {
$imgjs="toppic[1]=new ztstr('1','test/noimg.gif','#','暂无主题图片');\n";
} else {
foreach($toppic as $key=>$value) {
$value['title']=str_replace("'","",$value['title']);
if($len) $value['title']=substrs($value['title'],$len);
$imgjs.="toppic[$key]=new ztstr('$key','$value[picurl]','$value[linkurl]','$value[title]');\n";
}
}
$imgjs="<script language=\"javascript\" src=\"include/img.js\"></script><script language=\"javascript\">$imgjs startPicShow();</script>";
return $imgjs;
}
require_once template('index');
echo toppic_c('30');
require_once('foot.php');
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -