@@ -3969,7 +3969,7 @@ INSERT INTO `#@__sysconfig` VALUES('1','cfg_basehost','站点根网址','1','str | |||
('25','cfg_multi_site','(是/否)支持多站点,开启此项后附件、栏目连接、arclist内容启用绝对网址','2','bool','N'), | |||
('58','cfg_rm_remote','远程图片本地化','7','bool','Y'), | |||
('27','cfg_dede_log','(是/否)开启管理日志','2','bool','N'), | |||
('28','cfg_powerby','网站版权信息','1','bstring','Copyright © 2002-2020 DedeCMS. 织梦科技 版权所有'), | |||
('28','cfg_powerby','网站版权信息','1','bstring','Copyright © 2020 DedeBIZ 版权所有'), | |||
('722','cfg_jump_once','跳转网址是否直接跳转?(否则显示中转页)','7','bool','Y'), | |||
('723','cfg_task_pwd','系统计划任务客户端许可密码<br/>(需要客户端,通常不会太重要)','7','string',''), | |||
('29','cfg_arcsptitle','(是/否)开启分页标题,开启会影响HTML生成速度','6','bool','N'), | |||
@@ -1,4 +1,5 @@ | |||
<?php | |||
/** | |||
* 内容列表 | |||
* | |||
@@ -8,82 +9,73 @@ | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__)."/config.php"); | |||
CheckRank(0,0); | |||
require_once(DEDEINC."/typelink.class.php"); | |||
require_once(DEDEINC."/datalistcp.class.php"); | |||
require_once(DEDEMEMBER."/inc/inc_list_functions.php"); | |||
setcookie("ENV_GOBACK_URL",$dedeNowurl,time()+3600,"/"); | |||
require_once(dirname(__FILE__) . "/config.php"); | |||
CheckRank(0, 0); | |||
require_once(DEDEINC . "/typelink.class.php"); | |||
require_once(DEDEINC . "/datalistcp.class.php"); | |||
require_once(DEDEMEMBER . "/inc/inc_list_functions.php"); | |||
setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | |||
$cid = isset($cid) && is_numeric($cid) ? $cid : 0; | |||
$channelid = isset($channelid) && is_numeric($channelid) ? $channelid : 0; | |||
$mtypesid = isset($mtypesid) && is_numeric($mtypesid) ? $mtypesid : 0; | |||
if(!isset($keyword)) $keyword = ''; | |||
if(!isset($arcrank)) $arcrank = ''; | |||
if (!isset($keyword)) $keyword = ''; | |||
if (!isset($arcrank)) $arcrank = ''; | |||
$positionname = ''; | |||
$menutype = 'content'; | |||
$mid = $cfg_ml->M_ID; | |||
$tl = new TypeLink($cid); | |||
$cInfos = $tl->dsql->GetOne("Select arcsta,issend,issystem,usertype From `#@__channeltype` where id='$channelid'; "); | |||
if(!is_array($cInfos)) | |||
{ | |||
$cInfos = $tl->dsql->GetOne("SELECT arcsta,issend,issystem,usertype FROM `#@__channeltype` WHERE id='$channelid'; "); | |||
if (!is_array($cInfos)) { | |||
ShowMsg('模型不存在', '-1'); | |||
exit(); | |||
} | |||
$arcsta = $cInfos['arcsta']; | |||
$dtime = time(); | |||
$maxtime = $cfg_mb_editday * 24 *3600; | |||
$maxtime = $cfg_mb_editday * 24 * 3600; | |||
//禁止访问无权限的模型 | |||
if($cInfos['usertype'] !='' && $cInfos['usertype']!=$cfg_ml->M_MbType) | |||
{ | |||
if ($cInfos['usertype'] != '' && $cInfos['usertype'] != $cfg_ml->M_MbType) { | |||
ShowMsg('你无权限访问该部分', '-1'); | |||
exit(); | |||
} | |||
if($cid==0) | |||
{ | |||
if ($cid == 0) { | |||
$row = $tl->dsql->GetOne("Select typename From #@__channeltype where id='$channelid'"); | |||
if(is_array($row)) | |||
{ | |||
if (is_array($row)) { | |||
$positionname = $row['typename']; | |||
} | |||
} | |||
else | |||
{ | |||
$positionname = str_replace($cfg_list_symbol,"",$tl->GetPositionName())." "; | |||
} else { | |||
$positionname = str_replace($cfg_list_symbol, "", $tl->GetPositionName()) . " "; | |||
} | |||
$whereSql = " where arc.channel = '$channelid' And arc.mid='$mid' "; | |||
if($keyword!='') | |||
{ | |||
$keyword = cn_substr(trim(preg_replace("#[><\|\"\r\n\t%\*\.\?\(\)\$ ;,'%-]#", "", stripslashes($keyword))),30); | |||
if ($keyword != '') { | |||
$keyword = cn_substr(trim(preg_replace("#[><\|\"\r\n\t%\*\.\?\(\)\$ ;,'%-]#", "", stripslashes($keyword))), 30); | |||
$keyword = addslashes($keyword); | |||
$whereSql .= " And (arc.title like '%$keyword%') "; | |||
} | |||
if($cid!=0) $whereSql .= " And arc.typeid in (".GetSonIds($cid).")"; | |||
if ($cid != 0) $whereSql .= " And arc.typeid in (" . GetSonIds($cid) . ")"; | |||
//增加分类查询 | |||
if($arcrank == '1'){ | |||
if ($arcrank == '1') { | |||
$whereSql .= " And arc.arcrank >= 0"; | |||
}else if($arcrank == '-1'){ | |||
} else if ($arcrank == '-1') { | |||
$whereSql .= " And arc.arcrank = -1"; | |||
}else if($arcrank == '-2'){ | |||
} else if ($arcrank == '-2') { | |||
$whereSql .= " And arc.arcrank = -2"; | |||
} | |||
$classlist = ''; | |||
$dsql->SetQuery("SELECT * FROM `#@__mtypes` WHERE `mid` = '$cfg_ml->M_ID';"); | |||
$dsql->Execute(); | |||
while ($row = $dsql->GetArray()) | |||
{ | |||
$classlist .= "<option value='content_list.php?channelid=".$channelid."&mtypesid=".$row['mtypeid']."'>".$row['mtypename']."</option>\r\n"; | |||
while ($row = $dsql->GetArray()) { | |||
$classlist .= "<option value='content_list.php?channelid=" . $channelid . "&mtypesid=" . $row['mtypeid'] . "'>" . $row['mtypename'] . "</option>\r\n"; | |||
} | |||
if($mtypesid != 0 ) | |||
{ | |||
if ($mtypesid != 0) { | |||
$whereSql .= " And arc.mtype = '$mtypesid'"; | |||
} | |||
$query = "select arc.id,arc.typeid,arc.senddate,arc.flag,arc.ismake,arc.channel,arc.arcrank, | |||
$query = "SELECT arc.id,arc.typeid,arc.senddate,arc.flag,arc.ismake,arc.channel,arc.arcrank, | |||
arc.click,arc.title,arc.color,arc.litpic,arc.pubdate,arc.mid,tp.typename,ch.typename as channelname | |||
from `#@__archives` arc | |||
left join `#@__arctype` tp on tp.id=arc.typeid | |||
@@ -91,10 +83,10 @@ $query = "select arc.id,arc.typeid,arc.senddate,arc.flag,arc.ismake,arc.channel, | |||
$whereSql order by arc.senddate desc "; | |||
$dlist = new DataListCP(); | |||
$dlist->pageSize = 20; | |||
$dlist->SetParameter("dopost","listArchives"); | |||
$dlist->SetParameter("keyword",$keyword); | |||
$dlist->SetParameter("cid",$cid); | |||
$dlist->SetParameter("channelid",$channelid); | |||
$dlist->SetTemplate(DEDEMEMBER."/templets/content_list.htm"); | |||
$dlist->SetParameter("dopost", "listArchives"); | |||
$dlist->SetParameter("keyword", $keyword); | |||
$dlist->SetParameter("cid", $cid); | |||
$dlist->SetParameter("channelid", $channelid); | |||
$dlist->SetTemplate(DEDEMEMBER . "/templets/content_list.htm"); | |||
$dlist->SetSource($query); | |||
$dlist->Display(); | |||
$dlist->Display(); |
@@ -58,8 +58,15 @@ if($cid!=0) | |||
{ | |||
$whereSql .= " AND arc.typeid in (".GetSonIds($cid).")"; | |||
} | |||
if ($arcrank == '1') { | |||
$whereSql .= " And arc.arcrank >= 0"; | |||
} else if ($arcrank == '-1') { | |||
$whereSql .= " And arc.arcrank = -1"; | |||
} else if ($arcrank == '-2') { | |||
$whereSql .= " And arc.arcrank = -2"; | |||
} | |||
$query = "SELECT arc.aid,arc.aid as id,arc.typeid,arc.senddate,arc.channel,arc.click,arc.title,arc.mid,tp.typename | |||
$query = "SELECT arc.aid,arc.aid as id,arc.typeid,arc.senddate,arc.channel,arc.click,arc.title,arc.mid,tp.typename,arc.arcrank | |||
FROM `{$cInfos['addtable']}` arc | |||
LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid | |||
$whereSql | |||
@@ -13,14 +13,7 @@ if(empty($action)) $action = ''; | |||
if(empty($aid)) $aid = ''; | |||
$menutype = 'mydede'; | |||
if ( preg_match("#PHP (.*) Development Server#",$_SERVER['SERVER_SOFTWARE']) ) | |||
{ | |||
if ( $_SERVER['REQUEST_URI'] == dirname($_SERVER['SCRIPT_NAME']) ) | |||
{ | |||
header('HTTP/1.1 301 Moved Permanently'); | |||
header('Location:'.$_SERVER['REQUEST_URI'].'/'); | |||
} | |||
} | |||
//会员后台 | |||
if($uid=='') | |||
{ | |||
@@ -46,9 +39,9 @@ if($uid=='') | |||
/* 最新文档8条 */ | |||
$archives = array(); | |||
$sql = "SELECT arc.*, category.namerule, category.typedir, category.moresite, category.siteurl, category.sitepath, mem.userid | |||
FROM #@__archives arc | |||
LEFT JOIN #@__arctype category ON category.id=arc.typeid | |||
LEFT JOIN #@__member mem ON mem.mid=arc.mid | |||
FROM `#@__archives` arc | |||
LEFT JOIN `#@__arctype` category ON category.id=arc.typeid | |||
LEFT JOIN `#@__member` mem ON mem.mid=arc.mid | |||
WHERE arc.arcrank > -1 | |||
ORDER BY arc.sortrank DESC LIMIT 8"; | |||
$dsql->SetQuery($sql); | |||
@@ -85,7 +78,7 @@ if($uid=='') | |||
} | |||
/** 有没新短信 **/ | |||
$pms = $dsql->GetOne("SELECT COUNT(*) AS nums FROM #@__member_pms WHERE toid='{$cfg_ml->M_ID}' AND `hasview`=0 AND folder = 'inbox'"); | |||
$pms = $dsql->GetOne("SELECT COUNT(*) AS nums FROM `#@__member_pms` WHERE toid='{$cfg_ml->M_ID}' AND `hasview`=0 AND folder = 'inbox'"); | |||
$dpl = new DedeTemplate(); | |||
$tpl = dirname(__FILE__)."/templets/index.htm"; | |||
@@ -10,6 +10,17 @@ | |||
<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/css/dede.css"> | |||
<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/css/member.css"> | |||
<title>文档管理 - 会员中心 - <?php echo $cfg_webname; ?></title> | |||
<script type="text/javascript"> | |||
function viewArc(aid){ | |||
window.open("{dede:global.cfg_phpurl /}/view.php?aid="+aid); | |||
} | |||
function editArc(aid,channelid){ | |||
location = "archives_do.php?dopost=edit&channelid="+channelid+"&aid="+aid; | |||
} | |||
function delArc(aid){ | |||
if(window.confirm('你确定要删除这篇文档吗?')) location="archives_do.php?aid="+aid+"&dopost=delArc"; | |||
} | |||
</script> | |||
</head> | |||
<body> | |||
@@ -1,72 +1,104 @@ | |||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |||
<html xmlns="http://www.w3.org/1999/xhtml"> | |||
<!doctype html> | |||
<html lang="zh-CN"> | |||
<head> | |||
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>" /> | |||
<title>文档管理 - 会员中心 - <?php echo $cfg_webname; ?></title> | |||
<link href="templets/style/base.css" rel="stylesheet" type="text/css" /> | |||
<script type="text/javascript" src="../static/js/jquery.js"></script> | |||
<script type="text/javascript" src="templets/js/load.js"></script> | |||
<script type="text/javascript" src="templets/js/leftmenu.js"></script> | |||
<script type="text/javascript"> | |||
function viewArc(aid){ | |||
window.open("{dede:global.cfg_phpurl /}/view.php?aid="+aid); | |||
} | |||
function editArc(aid,channelid){ | |||
location = "archives_do.php?dopost=edit&channelid="+channelid+"&aid="+aid; | |||
} | |||
function delArc(aid){ | |||
if(window.confirm('你确定要删除这篇文档吗?')) location="archives_do.php?aid="+aid+"&dopost=delArc"; | |||
} | |||
</script> | |||
<meta charset="<?php echo $cfg_soft_lang; ?>"> | |||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |||
<script src="<?php echo $cfg_cmsurl;?>/static/js/jquery.min.js"></script> | |||
<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/css/bootstrap.min.css"> | |||
<link href="<?php echo $cfg_cmsurl;?>/static/font-awesome/css/font-awesome.min.css" rel="stylesheet"> | |||
<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/css/dede.css"> | |||
<link rel="stylesheet" href="<?php echo $cfg_cmsurl;?>/static/css/member.css"> | |||
<title>文档管理 - 会员中心 - <?php echo $cfg_webname; ?></title> | |||
<script type="text/javascript"> | |||
function viewArc(aid){ | |||
window.open("{dede:global.cfg_phpurl /}/view.php?aid="+aid); | |||
} | |||
function editArc(aid,channelid){ | |||
location = "archives_do.php?dopost=edit&channelid="+channelid+"&aid="+aid; | |||
} | |||
function delArc(aid){ | |||
if(window.confirm('你确定要删除这篇文档吗?')) location="archives_do.php?aid="+aid+"&dopost=delArc"; | |||
} | |||
</script> | |||
</head> | |||
<body> | |||
<div id="main"> | |||
<?php include(DEDEMEMBER."/templets/head.htm"); ?> | |||
<div id="content" class="w960 clearfix"> | |||
<?php include(DEDEMEMBER."/templets/menu.php"); ?> | |||
<div id="mcpmain"> | |||
<div id="appTab"> | |||
<ul> | |||
<li class="thisTab"><a href="#"><span><?php echo $cInfos['typename']; ?></span></a></li> | |||
</ul> | |||
<?php include(DEDEMEMBER."/templets/top_login.htm"); ?> | |||
<main class="member"> | |||
<?php include(DEDEMEMBER."/templets/info.htm"); ?> | |||
<div class="container-fluid pannel"> | |||
<div class="container"> | |||
<div class="row"> | |||
<?php | |||
$_menu_conex = true; // 展开编辑信息 | |||
?> | |||
<?php include(DEDEMEMBER."/templets/menu.htm"); ?> | |||
<div class="pannel-main col-md-9 mt-3 mb-3"> | |||
<div class="pannel-main-container"> | |||
<ul class="nav mt-2"> | |||
<li class="nav-item"> | |||
<a class="nav-link<?php echo ($arcrank=='')? ' active' : '';?>" | |||
href="content_sg_list.php?channelid=<?php echo $channelid;?>">全部</a> | |||
</li> | |||
<li class="nav-item"> | |||
<a class="nav-link<?php echo ($arcrank=='1')? ' active' : '';?>" | |||
href="content_sg_list.php?channelid=<?php echo $channelid;?>&arcrank=1">已审核</a> | |||
</li> | |||
<li class="nav-item"> | |||
<a class="nav-link<?php echo ($arcrank=='-1')? ' active' : '';?>" | |||
href="content_sg_list.php?channelid=<?php echo $channelid;?>&arcrank=-1">未审核</a> | |||
</li> | |||
<li class="nav-item"> | |||
<a class="nav-link<?php echo ($arcrank=='-2')? ' active' : '';?>" | |||
href="content_sg_list.php?channelid=<?php echo $channelid;?>&arcrank=-2">被退回</a> | |||
</li> | |||
</ul> | |||
<div class="table-responsive"> | |||
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="table"> | |||
<thead> | |||
<tr> | |||
<th width="25%">文章标题</th> | |||
<th width="15%">类目 </th> | |||
<th>状态 </th> | |||
<th>点击 </th> | |||
<th width="15%">发布时间 </th> | |||
<th width="25%">操作</th> | |||
</tr> | |||
</thead> | |||
<tbody> | |||
{dede:datalist} | |||
<tr> | |||
<td class="tabTitle"><a href='<?php echo $cfg_phpurl; ?>/view.php?aid=<?php echo $fields['aid']; ?>' target='_blank'><?php echo $fields['title']; ?></a> </td> | |||
<td align="center"><?php echo $fields['typename']; ?></td> | |||
<td align="center"><?php | |||
if($fields['arcrank']>=0) echo "已审核"; | |||
else if($fields['arcrank']==-2) echo "<font color='blue'>被退回</font>"; | |||
else echo "<font color='red'>未审核</font>"; | |||
?></td> | |||
<td align="center"><?php echo $fields['click']; ?></td> | |||
<td align="center"><?php echo GetDateMk($fields['senddate']); ?></td> | |||
<td align="center" class="doPost"> | |||
<a href="javascript:editArc(<?php echo $fields['aid']?>,<?php echo $fields['channel']?>);">修改</a> | <a href="javascript:delArc(<?php echo $fields['aid']?>);">删除</a> | <a href="javascript:viewArc(<?php echo $fields['aid']; ?>);">预览</a> | |||
</td> | |||
</tr> | |||
{/dede:datalist} | |||
</tbody> | |||
</table> | |||
</div> | |||
<nav> | |||
{dede:pagelist listsize=5 /} | |||
</nav> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div id="mainCp"> | |||
<!--内容消息提示 --> | |||
<h3 class="meTitle"><span class="fLeft">已发布<?php echo $cInfos['typename']; ?></span><small>(曾经发布的所有<?php echo $cInfos['typename']; ?>)</small></h3> | |||
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="list"> | |||
<thead> | |||
<tr> | |||
<th width="40%">文章标题</th> | |||
<th width="15%">类目 </th> | |||
<th>点击 </th> | |||
<th width="11%">发布时间 </th> | |||
<th width="25%">操作</th> | |||
</tr> | |||
</thead> | |||
<tbody> | |||
{dede:datalist} | |||
<tr> | |||
<td class="tabTitle"><a href='<?php echo $cfg_phpurl; ?>/view.php?aid=<?php echo $fields['aid']; ?>' target='_blank'><?php echo $fields['title']; ?></a> </td> | |||
<td align="center"><?php echo $fields['typename']; ?></td> | |||
<td align="center"><?php echo $fields['click']; ?></td> | |||
<td align="center"><?php echo GetDateMk($fields['senddate']); ?></td> | |||
<td align="center" class="doPost"> | |||
<a href="javascript:editArc(<?php echo $fields['aid']?>,<?php echo $fields['channel']?>);">修改</a> | <a href="javascript:delArc(<?php echo $fields['aid']?>);">删除</a> | <a href="javascript:viewArc(<?php echo $fields['aid']; ?>);">预览</a> | |||
</td> | |||
</tr> | |||
{/dede:datalist} | |||
</tbody> | |||
<tfoot> | |||
<tr> | |||
<td colspan="5"><div class="pageList">{dede:pagelist listsize=5/}</div></td> | |||
</tr> | |||
</tfoot> | |||
</table> | |||
</div> | |||
<!--主操作区域 --> | |||
</div> | |||
</div> | |||
<?php include(DEDEMEMBER."/templets/foot.htm"); ?> | |||
</div> | |||
</main> | |||
<?php include(DEDEMEMBER."/templets/footer.htm"); ?> | |||
</body> | |||
</html> | |||
</html> |
@@ -1,3 +1,11 @@ | |||
<?php | |||
// 这里读取channel用于显示菜单 | |||
$dsql->Execute('addmod', "SELECT id,nid,typename,useraddcon,usermancon,issend,issystem,usertype,isshow FROM `#@__channeltype` "); | |||
$channels = array(); | |||
while ($channel = $dsql->GetArray('addmod')) { | |||
$channels[$channel['id']] = $channel; | |||
} | |||
?> | |||
<div class="member-menu col-md-3"> | |||
<ul class="list-group list-group-flush mt-3 mb-3"> | |||
<li class="list-group-item justify-content-between align-items-center"> | |||
@@ -5,15 +13,13 @@ | |||
</div> | |||
<div id="collapseArchives" class="collapse mt-3<?php echo (isset($_menu_conex) && $_menu_conex===true)? ' show' : '';?>"> | |||
<ul class="list-group list-group-flush"> | |||
<li class="list-group-item justify-content-between align-items-center active"> | |||
<a href="javascript:;">文章</a> | |||
</li> | |||
<li class="list-group-item justify-content-between align-items-center"> | |||
<a href="javascript:;">图集</a> | |||
</li> | |||
<li class="list-group-item justify-content-between align-items-center"> | |||
<a href="javascript:;">软件</a> | |||
<?php foreach($channels as $chid => $channel) { ?> | |||
<?php if($channel['issend'] == 1) { ?> | |||
<li class="list-group-item justify-content-between align-items-center<?php if(isset($_menu_conex) && $channelid == $channel['id']) echo ' active';?>"> | |||
<a href="<?php echo $channel['usermancon'];?>?channelid=<?php echo $channel['id'];?>"><?php echo $channel['typename'];?></a> | |||
</li> | |||
<?php } ?> | |||
<?php } ?> | |||
</ul> | |||
</div> | |||
</li> | |||