@@ -5,6 +5,7 @@ | |||||
* @version $Id: action_search.php 1 8:26 2010年7月12日Z tianya $ | * @version $Id: action_search.php 1 8:26 2010年7月12日Z tianya $ | ||||
* @package DedeCMS.Administrator | * @package DedeCMS.Administrator | ||||
* @copyright Copyright (c) 2007 - 2020, DesDev, Inc. | * @copyright Copyright (c) 2007 - 2020, DesDev, Inc. | ||||
* @copyright Copyright (c) 2020, DedeBIZ.COM | |||||
* @license http://help.dedecms.com/usersguide/license.html | * @license http://help.dedecms.com/usersguide/license.html | ||||
* @link http://www.dedecms.com | * @link http://www.dedecms.com | ||||
*/ | */ | ||||
@@ -3,6 +3,7 @@ | |||||
* @version $Id: actionsearch_class.php 1 8:26 2010年7月12日Z tianya $ | * @version $Id: actionsearch_class.php 1 8:26 2010年7月12日Z tianya $ | ||||
* @package DedeCMS.Administrator | * @package DedeCMS.Administrator | ||||
* @copyright Copyright (c) 2007 - 2020, DesDev, Inc. | * @copyright Copyright (c) 2007 - 2020, DesDev, Inc. | ||||
* @copyright Copyright (c) 2020, DedeBIZ.COM | |||||
* @license http://help.dedecms.com/usersguide/license.html | * @license http://help.dedecms.com/usersguide/license.html | ||||
* @link http://www.dedecms.com | * @link http://www.dedecms.com | ||||
*/ | */ | ||||
@@ -11,11 +12,16 @@ class ActionSearch | |||||
var $keyword; | var $keyword; | ||||
var $asarray = array(); | var $asarray = array(); | ||||
var $result = array(); | var $result = array(); | ||||
function __construct($keyword) | |||||
{ | |||||
$this->asarray = $this->GetSearchstr(); | |||||
$this->keyword = $keyword; | |||||
} | |||||
//初始化系统 | //初始化系统 | ||||
function ActionSearch($keyword){ | function ActionSearch($keyword){ | ||||
$this->asarray = $this->GetSearchstr(); | |||||
$this->keyword = $keyword; | |||||
$this->__construct($keyword); | |||||
} | } | ||||
function GetSearchstr() | function GetSearchstr() | ||||
@@ -235,10 +235,12 @@ else if ($dopost == 'getRightSide') { | |||||
$client->appid = "1008665"; | $client->appid = "1008665"; | ||||
$client->key = "I04NcaYUCmRukRDE"; | $client->key = "I04NcaYUCmRukRDE"; | ||||
$rs = $client->SystemInfo(); | $rs = $client->SystemInfo(); | ||||
if ($rs->code === 200) { | if ($rs->code === 200) { | ||||
echo $rs->data; | echo $rs->data; | ||||
$client->Close(); | |||||
exit; | exit; | ||||
} | } | ||||
$client->Close(); | |||||
} | } | ||||
?> | ?> |
@@ -1,50 +1,55 @@ | |||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |||||
<!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"> | <html xmlns="http://www.w3.org/1999/xhtml"> | ||||
<head> | <head> | ||||
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>"> | |||||
<title>操作搜索</title> | |||||
<link href="css/base.css" rel="stylesheet" type="text/css"> | |||||
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>"> | |||||
<title>操作搜索</title> | |||||
<link rel="stylesheet" href="../static/css/bootstrap.min.css"> | |||||
<link href="../static/font-awesome/css/font-awesome.min.css" rel="stylesheet"> | |||||
<link href="css/base.css" rel="stylesheet" type="text/css"> | |||||
</head> | </head> | ||||
<body background="images/allbg.gif" leftmargin="8" topmargin="8"> | <body background="images/allbg.gif" leftmargin="8" topmargin="8"> | ||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6"> | |||||
<tr> | |||||
<td height="28" background="images/tbg.gif"><b>当前位置</b> > 搜索结果</td> | |||||
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6" class="table maintable table-bordered mt-3"> | |||||
<tr> | |||||
<td height="28" background="images/tbg.gif"><b>当前位置</b> > 搜索结果</td> | |||||
</tr> | |||||
<tr align="center" bgcolor="#F9FCEF" height="24"> | |||||
<td align="left">"<font color="red"><?php echo $keyword;?></font>"的搜索结果</td> | |||||
</tr> | |||||
<tr align="center" bgcolor="#FFFFFF" height="24"> | |||||
<td align="center"> | |||||
<?php foreach ($asresult as $row) {?> | |||||
<table width="98%" border="0" cellspacing="5" cellpadding="0" class="table table-borderless"> | |||||
<tr> | |||||
<td align="left" bgcolor="#F9FCEF"> ◇ <strong><?php echo $row['toptitle'] ?></strong> => | |||||
<strong><?php echo $row['title'] ?></strong></td> | |||||
</tr> | |||||
<tr> | |||||
<td align="center"> | |||||
<table width="98%" border="0" cellspacing="0" cellpadding="5"> | |||||
<?php foreach ($row['soniterm'] as $rows) {?> | |||||
<tr> | |||||
<td align="left"> ◇ <a href='<?php echo $rows['linkurl'] ?>' | |||||
target="main"><?php echo $rows['title'] ?></a><br> | |||||
<?php echo $rows['description'] ?></td> | |||||
</tr> | |||||
<?php } ?> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
<?php }?> | |||||
</td> | |||||
</tr> | |||||
<tr align="center" bgcolor="#F9FCEF" height="24"> | |||||
<td align="center"> </td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | </tr> | ||||
<tr align="center" bgcolor="#F9FCEF" height="24"> | |||||
<td align="left">"<font color="red"><?php echo $keyword;?></font>"的搜索结果</td> | |||||
</tr> | |||||
<tr align="center" bgcolor="#FFFFFF" height="24"> | |||||
<td align="center"> | |||||
<?php foreach ($asresult as $row) {?> | |||||
<table width="98%" border="0" cellspacing="5" cellpadding="0"> | |||||
<tr> | |||||
<td align="left" bgcolor="#F9FCEF">◇<strong><?php echo $row['toptitle'] ?></strong> => <strong><?php echo $row['title'] ?></strong></td> | |||||
</tr> | |||||
<tr> | |||||
<td align="center"> | |||||
<table width="98%" border="0" cellspacing="0" cellpadding="5"> | |||||
<?php foreach ($row['soniterm'] as $rows) {?> | |||||
<tr> | |||||
<td align="left">◇<a href='<?php echo $rows['linkurl'] ?>' target="main"><?php echo $rows['title'] ?></a><br> | |||||
<?php echo $rows['description'] ?></td> | |||||
</tr> | |||||
<?php } ?> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td> </td> | |||||
</tr> | |||||
</table> | |||||
<?php }?> | |||||
</td> | |||||
</tr> | |||||
<tr align="center" bgcolor="#F9FCEF" height="24"> | |||||
<td align="center"> </td> | |||||
</tr> | |||||
</table> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</table> | |||||
</body> | </body> | ||||
</html> | </html> |
@@ -1,145 +0,0 @@ | |||||
<!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"> | |||||
<head> | |||||
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>"> | |||||
<title>问题管理</title> | |||||
<link href="css/base.css" rel="stylesheet" type="text/css" /> | |||||
<script> | |||||
function selAll() | |||||
{ | |||||
for(i=0;i<document.form2.askid.length;i++) | |||||
{ | |||||
if(!document.form2.askid[i].checked) | |||||
{ | |||||
document.form2.askid[i].checked=true; | |||||
} | |||||
} | |||||
} | |||||
function noSelAll() | |||||
{ | |||||
for(i=0;i<document.form2.askid.length;i++) | |||||
{ | |||||
if(document.form2.askid[i].checked) | |||||
{ | |||||
document.form2.askid[i].checked=false; | |||||
} | |||||
} | |||||
} | |||||
//获得选中文件的文件名 | |||||
function getCheckboxItem() | |||||
{ | |||||
var allSel=""; | |||||
if(document.form2.askid.value) return document.form2.askid.value; | |||||
for(i=0;i<document.form2.askid.length;i++) | |||||
{ | |||||
if(document.form2.askid[i].checked) | |||||
{ | |||||
if(allSel=="") | |||||
allSel=document.form2.askid[i].value; | |||||
else | |||||
allSel=allSel+"`"+document.form2.askid[i].value; | |||||
} | |||||
} | |||||
return allSel; | |||||
} | |||||
//获得选中其中一个的id | |||||
function getOneItem() | |||||
{ | |||||
var allSel=""; | |||||
if(document.form2.askid.value) return document.form2.askid.value; | |||||
for(i=0;i<document.form2.askid.length;i++) | |||||
{ | |||||
if(document.form2.askid[i].checked) | |||||
{ | |||||
allSel = document.form2.askid[i].value; | |||||
break; | |||||
} | |||||
} | |||||
return allSel; | |||||
} | |||||
function digestask(aid){ | |||||
var qstr=getCheckboxItem(); | |||||
if(aid==0) aid = getOneItem(); | |||||
location="ask_admin.php?aid="+aid+"&action=digest&qstr="+qstr; | |||||
} | |||||
function checkask(aid){ | |||||
var qstr=getCheckboxItem(); | |||||
if(aid==0) aid = getOneItem(); | |||||
location="ask_admin.php?aid="+aid+"&action=check&qstr="+qstr; | |||||
} | |||||
function deleteask(aid){ | |||||
var qstr=getCheckboxItem(); | |||||
if(aid==0) aid = getOneItem(); | |||||
location="ask_admin.php?qstr="+qstr+"&aid="+aid+"&action=delete"; | |||||
} | |||||
</script> | |||||
</head> | |||||
<body> | |||||
<div class="bodytitle"> | |||||
<div class="bodytitleleft"></div> | |||||
<div class="bodytitletxt"><a href='../ask' target='_blank'><b>问答模块</b></a> -- 用户提问管理</div> | |||||
</div> | |||||
<table width="98%" border="0" cellpadding="1" cellspacing="1" align="center" class="tbtitle" style="background:#cfcfcf;"> | |||||
<tr> | |||||
<td height="24" colspan="9" align="left" bgcolor="#EDF9D5" background="images/tbg.gif"> | |||||
§<b>问题列表 <a href="ask_admin.php">全部问题</a> | <a href="ask_admin.php?status=-1">未审核的问题</a></b> | |||||
</td> | |||||
</tr> | |||||
<form name="form2" action="ask_admin.php"> | |||||
<tr align="center" height="25" bgcolor="#FBFCE2"> | |||||
<td width="6%">id</td> | |||||
<td width="4%">选择</td> | |||||
<td width="28%">问题</td> | |||||
<td width="6%">推荐</td> | |||||
<td width="10%">提问时间</td> | |||||
<td width="10%">所属大分类</td> | |||||
<td width="10%">所属小分类</td> | |||||
<td width="8%">回答数</td> | |||||
<td width="6%">问题状态</td> | |||||
</tr> | |||||
{dede:datalist} | |||||
<?php | |||||
if($fields['status'] == 0){ | |||||
$fields['status'] = '待解决'; | |||||
}else if($fields['status'] == 1){ | |||||
$fields['status'] = '已解决'; | |||||
}else if($fields['status'] == 2 ){ | |||||
$fields['status'] = '已关闭'; | |||||
}else if($fields['status'] == 3){ | |||||
$fields['status'] = '已过期'; | |||||
}else if($fields['status']<0){ | |||||
$fields['status'] = '未审核'; | |||||
} | |||||
$fields['dateline'] = gmdate('Y-m-d' , $fields['dateline'] + 3600*8); | |||||
?> | |||||
<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22" > | |||||
<td><?php echo $fields['id']; ?></td> | |||||
<td><input name="askid" type="checkbox" id="id" value="<?php echo $fields['id']; ?>" class='np' /></td> | |||||
<td align='left'><a href="../ask/question.php?id=<?php echo $fields['id']; ?>" target="_blank"><?php echo $fields['title']; ?></a></td> | |||||
<td><?php echo $fields['digest']; ?></td> | |||||
<td><?php echo $fields['dateline']; ?></td> | |||||
<td><a href="ask_admin.php?tid=<?php echo $fields['tid']; ?>"><?php echo $fields['tidname']; ?></a> </td> | |||||
<td><a href="ask_admin.php?tid2=<?php echo $fields['tid2']; ?>"><?php echo $fields['tid2name']; ?></a></td> | |||||
<td><?php echo $fields['replies']; ?></td> | |||||
<td><?php echo $fields['status']; ?></td> | |||||
</tr> | |||||
{/dede:datalist} | |||||
<tr bgcolor="#ffffff"> | |||||
<td height="24" colspan="10" align="left"> | |||||
| |||||
<a href="javascript:selAll()" class="coolbg">全选</a> | |||||
<a href="javascript:noSelAll()" class="coolbg">取消</a> | |||||
<a href="javascript:digestask(0)" class="coolbg">推荐</a> | |||||
<a href="javascript:checkask(0)" class="coolbg">审核</a> | |||||
<a href="javascript:deleteask(0)" class="coolbg">删除</a></td> | |||||
</tr> | |||||
</form> | |||||
<tr align="right"> | |||||
<td height="20" colspan="9" align="center" bgcolor="#F9FCEF"> | |||||
{dede:pagelist /} | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</body> | |||||
</html> |
@@ -1,127 +0,0 @@ | |||||
<!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"> | |||||
<head> | |||||
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>"> | |||||
<title>问答模块 -- 用户提问管理</title> | |||||
<link href='css/base.css' rel='stylesheet' type='text/css'> | |||||
<script> | |||||
function selAll() | |||||
{ | |||||
for(i=0;i<document.form2.answerid.length;i++) | |||||
{ | |||||
if(!document.form2.answerid[i].checked) | |||||
{ | |||||
document.form2.answerid[i].checked=true; | |||||
} | |||||
} | |||||
} | |||||
function noSelAll() | |||||
{ | |||||
for(i=0;i<document.form2.answerid.length;i++) | |||||
{ | |||||
if(document.form2.answerid[i].checked) | |||||
{ | |||||
document.form2.answerid[i].checked=false; | |||||
} | |||||
} | |||||
} | |||||
//获得选中文件的文件名 | |||||
function getCheckboxItem() | |||||
{ | |||||
var allSel=""; | |||||
if(document.form2.answerid.value) return document.form2.answerid.value; | |||||
for(i=0;i<document.form2.answerid.length;i++) | |||||
{ | |||||
if(document.form2.answerid[i].checked) | |||||
{ | |||||
if(allSel=="") | |||||
allSel=document.form2.answerid[i].value; | |||||
else | |||||
allSel=allSel+"`"+document.form2.answerid[i].value; | |||||
} | |||||
} | |||||
return allSel; | |||||
} | |||||
//获得选中其中一个的id | |||||
function getOneItem() | |||||
{ | |||||
var allSel=""; | |||||
if(document.form2.answerid.value) return document.form2.answerid.value; | |||||
for(i=0;i<document.form2.answerid.length;i++) | |||||
{ | |||||
if(document.form2.answerid[i].checked) | |||||
{ | |||||
allSel = document.form2.answerid[i].value; | |||||
break; | |||||
} | |||||
} | |||||
return allSel; | |||||
} | |||||
function checkanswer(aid){ | |||||
var qstr=getCheckboxItem(); | |||||
if(aid==0) aid = getOneItem(); | |||||
location="ask_answer.php?aid="+aid+"&action=check&qstr="+qstr; | |||||
} | |||||
function deleteanswer(aid){ | |||||
var qstr=getCheckboxItem(); | |||||
if(aid==0) aid = getOneItem(); | |||||
location="ask_answer.php?qstr="+qstr+"&aid="+aid+"&action=delete"; | |||||
} | |||||
</script> | |||||
</head> | |||||
<body background='img/allbg.gif' leftmargin='8' topmargin='8'> | |||||
<div class="bodytitle"> | |||||
<div class="bodytitleleft"></div> | |||||
<div class="bodytitletxt"><a href='../ask' target='_blank'><b>问答模块</b></a> -- 用户答案管理</div> | |||||
</div> | |||||
<table width="98%" border="0" cellpadding="1" cellspacing="1" align="center" class="tbtitle" style="background:#cfcfcf;"> | |||||
<tr> | |||||
<td height="24" colspan="6" align="left" bgcolor="#EDF9D5" background="images/tbg.gif"> | |||||
§<b>答案列表 <a href="ask_answer.php">全部答案</a> | <a href="ask_answer.php?check=1">未审核的答案</a></b> | |||||
</td> | |||||
</tr> | |||||
<form name="form2" action="ask_answer.php"> | |||||
<tr align="center" height="25" bgcolor="#FBFCE2"> | |||||
<td width="6%">id</td> | |||||
<td width="4%">选择</td> | |||||
<td width="62%">答案</td> | |||||
<td width="10%">回答时间</td> | |||||
<td width="6%">回答者</td> | |||||
<td width="6%">答案状态</td> | |||||
</tr> | |||||
{dede:datalist} | |||||
<?php | |||||
if($fields['ifcheck'] == 1){ | |||||
$fields['ifcheck'] = '已审核'; | |||||
}elseif($fields['ifcheck']==0){ | |||||
$fields['ifcheck'] = '未审核'; | |||||
} | |||||
$fields['dateline'] = gmdate('Y-m-d H:i:s' , $fields['dateline'] + 3600*$cfg_ask_timeoffset); | |||||
?> | |||||
<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22" > | |||||
<td><?php echo $fields['id']; ?></td> | |||||
<td><input name="answerid" type="checkbox" id="id" value="<?php echo $fields['id']; ?>" class='np' /></td> | |||||
<td align='left'><a title="点击查看问题页面" href="../ask/question.php?id=<?php echo $fields['askid']; ?>" target="_blank"><?php echo $fields['content']; ?></a></td> | |||||
<td><?php echo $fields['dateline']; ?></td> | |||||
<td><a href="member_view.php?ID=<?php echo $fields['uid'];?>" target="_blank"><?php echo $fields['username']; ?></a></td> | |||||
<td><?php echo $fields['ifcheck']; ?></td> | |||||
</tr> | |||||
{/dede:datalist} | |||||
<tr bgcolor="#ffffff"> | |||||
<td height="24" colspan="10" align="left"> | |||||
| |||||
<a href="javascript:selAll()" class="coolbg">全选</a> | |||||
<a href="javascript:noSelAll()" class="coolbg">取消</a> | |||||
<a href="javascript:checkanswer(0)" class="coolbg">审核</a> | |||||
<a href="javascript:deleteanswer(0)" class="coolbg">删除</a></td> | |||||
</tr> | |||||
</form> | |||||
<tr align="right" bgcolor="#E5F9FF"> | |||||
<td height="20" colspan="10" align="center" bgcolor="#F9FCEF"> | |||||
{dede:pagelist /} | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</body> | |||||
</html> |
@@ -1,198 +0,0 @@ | |||||
<!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"> | |||||
<head> | |||||
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>"> | |||||
<title>问答分类</title> | |||||
<link href="css/base.css" rel="stylesheet" type="text/css" /> | |||||
<style type="text/css"> | |||||
<!-- | |||||
.STYLE1 { | |||||
color: #FF0000; | |||||
font-weight: bold; | |||||
} | |||||
--> | |||||
</style> | |||||
</head> | |||||
<body background='img/allbg.gif' leftmargin='8' topmargin='8'> | |||||
<div class="bodytitle"> | |||||
<div class="bodytitleleft"></div> | |||||
<div class="bodytitletxt"><a href='../ask' target='_blank'><b>问答模块</b></a> -- 问答栏目管理</div> | |||||
</div> | |||||
<?php | |||||
if(empty($action)) | |||||
{ | |||||
?> | |||||
<form name="form2" action="ask_type.php" method="post"> | |||||
<table width="98%" border="0" cellpadding="1" cellspacing="1" align="center" class="tbtitle" style="background:#CFCFCF;margin-bottom:6px;"> | |||||
<tr> | |||||
<td colspan="2" bgcolor="#EDF9D5" background="images/tbg.gif"><strong> 添加分类</strong> | |||||
<input type="hidden" name="action" value="add" /></td> | |||||
</tr> | |||||
<tr> | |||||
<td width="150" height="20" align="right" bgcolor="#FFFFFF">分类名称:</td> | |||||
<td height="20" bgcolor="#FFFFFF"><input type="text" name="name" value="" />(分类名称长度最好不要超过10个字符,也就是5个汉字)</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="20" align="right" bgcolor="#FFFFFF"> | |||||
隶属大类: | |||||
</td> | |||||
<td height="20" bgcolor="#FFFFFF"> | |||||
<select name="reid" style="width:150px;"> | |||||
<option value="0">无(作为一级分类)</option> | |||||
<?php echo $sectorscache; ?> | |||||
</select> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="35" bgcolor="#FFFFFF"> </td> | |||||
<td height="20" bgcolor="#FFFFFF"><input type="submit" name="submit2" value="提交" class="np coolbg"/></td> | |||||
</tr> | |||||
</table> | |||||
</form> | |||||
<form name="merge" action="ask_type.php" method="post"> | |||||
<input type="hidden" name="action" value="merge" /> | |||||
<table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" class="tbtitle" style="background:#CFCFCF;margin-bottom:6px;"> | |||||
<tr> | |||||
<td colspan="2" bgcolor="#EDF9D5" background="images/tbg.gif"><strong> 问答分类合并</strong></td> | |||||
</tr> | |||||
<tr> | |||||
<td width="150" height="20" align="right" bgcolor="#FFFFFF">源分类:</td> | |||||
<td bgcolor="#FFFFFF"><select name="sourcetype" > | |||||
<?php | |||||
foreach($sectors as $sector) | |||||
{ | |||||
if($sector['reid'] == 0) | |||||
{ | |||||
echo "<option value='$sector[id]'>$sector[name]</option>"; | |||||
}else | |||||
{ | |||||
echo "<option value='$sector[id]'>|-- $sector[name]</option>"; | |||||
} | |||||
} | |||||
?> | |||||
</select> | |||||
(源分类不能有下级分类,否则不能合并;合并后源分类将被删除且不可恢复,请谨慎操作) </td> | |||||
</tr> | |||||
<tr> | |||||
<td height="20" align="right" bgcolor="#FFFFFF">目标分类:</td> | |||||
<td bgcolor="#FFFFFF"><select name="targettype" > | |||||
<?php | |||||
foreach($sectors as $sector) | |||||
{ | |||||
if($sector['reid'] == 0) | |||||
{ | |||||
echo "<option value='$sector[id]'>$sector[name]</option>"; | |||||
}else | |||||
{ | |||||
echo "<option value='$sector[id]'>|-- $sector[name]</option>"; | |||||
} | |||||
} | |||||
?> | |||||
</select></td> | |||||
</tr> | |||||
<tr> | |||||
<td height="20" bgcolor="#FFFFFF"> </td> | |||||
<td bgcolor="#FFFFFF"><input type="submit" name="submit2" value="提交" class="np coolbg"/></td> | |||||
</tr> | |||||
</table> | |||||
</form> | |||||
<form name="form3" action="ask_type.php" method="post"> | |||||
<table width="98%" border="0" cellpadding="1" cellspacing="1" align="center" class="tbtitle" style="background:#CFCFCF;"> | |||||
<tr> | |||||
<td colspan="4" bgcolor="#EDF9D5" background="images/tbg.gif"><strong> 编辑分类</strong> | |||||
<input type="hidden" name="action" value="update" /></td> | |||||
</tr> | |||||
<tr height="25" bgcolor="#FBFCE2"> | |||||
<td align="center">id</td> | |||||
<td>分类名称</td> | |||||
<td>排序</td> | |||||
<td align="center">管理操作</td> | |||||
</tr> | |||||
<?php | |||||
foreach($sectors as $sector) | |||||
{ | |||||
if($sector['reid'] == 0) | |||||
{ | |||||
echo "<tr bgcolor='#ffffff'><td align='center'>$sector[id]</td><td><input type=\"text\" name=\"names[$sector[id]]\" value=\"$sector[name]\" /></td><td><input type=\"text\" name=\"disorders[$sector[id]]\" value=\"$sector[disorder]\" /></td><td align='center'><a href=\"ask_type.php?action=edit&id=$sector[id]\">修改</a> <a href=\"ask_type.php?action=delete&id=$sector[id]\">删除</a></td></tr>"; | |||||
}else | |||||
{ | |||||
echo "<tr bgcolor='#ffffff'><td align='center'>$sector[id]</td><td>|- <input type=\"text\" name=\"names[$sector[id]]\" value=\"$sector[name]\" /></td><td><input type=\"text\" name=\"disorders[$sector[id]]\" value=\"$sector[disorder]\" /></td><td align='center'><a href=\"ask_type.php?action=edit&id=$sector[id]\">修改</a> <a href=\"ask_type.php?action=delete&id=$sector[id]\">删除</a></td></tr>"; | |||||
} | |||||
} | |||||
?> | |||||
<tr> | |||||
<td height="35" align="center" bgcolor="#F9FCEF" colspan="4"><input name="submit3" type="submit" value="提交" class="np coolbg"/></td> | |||||
</tr> | |||||
</table> | |||||
</form> | |||||
<?php | |||||
}elseif($action == 'edit') | |||||
{ | |||||
?> | |||||
<form name="form4" action="ask_type.php" method="post"> | |||||
<table width="98%" border="0" cellpadding="1" cellspacing="1" align="center" class="tbtitle" style="background:#CFCFCF;"> | |||||
<tr> | |||||
<td colspan="2" bgcolor="#EDF9D5" background="images/tbg.gif"><strong> 修改</strong> | |||||
<input type=hidden name=action value=edit /> | |||||
<input type=hidden name=step value=2 /> | |||||
<input type=hidden name=id value=<?php echo $id; ?> /></td> | |||||
</tr> | |||||
<tr> | |||||
<td width="150" align="right" bgcolor="#FFFFFF">所属分类:</td> | |||||
<td bgcolor="#FFFFFF"><select name="reid"> | |||||
<?php echo $sectorscache; ?> | |||||
</select> </td> | |||||
</tr> | |||||
<tr> | |||||
<td align="right" bgcolor="#FFFFFF">分类名称:</td> | |||||
<td bgcolor="#FFFFFF"><input type=text name=name value=<?php echo $sector['name']; ?> /></td> | |||||
</tr> | |||||
<tr> | |||||
<td align="right" bgcolor="#FFFFFF">顺序:</td> | |||||
<td bgcolor="#FFFFFF"><input type=text name=disorder value=<?php echo $sector['disorder']; ?> /></td> | |||||
</tr> | |||||
<tr> | |||||
<td height="35" bgcolor="#FFFFFF"> </td> | |||||
<td bgcolor="#FFFFFF"><input name="submit4" type="submit" value="提交" class="np coolbg"/></td> | |||||
</tr> | |||||
</table> | |||||
<br> | |||||
<br> | |||||
</form> | |||||
<?php | |||||
}elseif($action == 'delete') | |||||
{ | |||||
?> | |||||
<form action=ask_type.php method=post name=form5> | |||||
<table width="98%" border="0" cellpadding="1" cellspacing="1" align="center" class="tbtitle" style="background:#E2F5BC;"> | |||||
<tr> | |||||
<td height="20" bgcolor="#EDF9D5" background="img/wbg.gif"> | |||||
<strong> 删除分类确认</strong> | |||||
<input type=hidden name=action value=delete /> | |||||
<input type=hidden name=step value=2 /> | |||||
<input type=hidden name=id value=<?php echo $id; ?> /> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="60" align="center" bgcolor="#FFFFFF"> | |||||
<span class="STYLE1">删除分类时将删除该行业的所有下级分类,且不能恢复操作,请确认删除!</span> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td height="35" align="center" bgcolor="#FFFFFF"> | |||||
<input name="submit5" type="submit" value="确认删除" class="np coolbg" /> | |||||
<input type='button' value='返 回 继 续 操 作' onclick='javascript:history.go(-1);' class="np coolbg" /> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</form> | |||||
<?php | |||||
} | |||||
?> | |||||
</body> | |||||
</html> |
@@ -1,51 +1,60 @@ | |||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |||||
<!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"> | <html xmlns="http://www.w3.org/1999/xhtml"> | ||||
<head> | <head> | ||||
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>"> | |||||
<title>百度新闻地图</title> | |||||
<link href="css/base.css" rel="stylesheet" type="text/css" /> | |||||
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>"> | |||||
<title>百度新闻地图</title> | |||||
<link rel="stylesheet" href="../static/css/bootstrap.min.css"> | |||||
<link href="../static/font-awesome/css/font-awesome.min.css" rel="stylesheet"> | |||||
<link href="css/base.css" rel="stylesheet" type="text/css" /> | |||||
</head> | </head> | ||||
<body background="images/allbg.gif" leftmargin="8" topmargin="8"> | <body background="images/allbg.gif" leftmargin="8" topmargin="8"> | ||||
<div class="bodytitle"> | |||||
<div class="bodytitleleft"></div> | |||||
<div class="bodytitletxt" style="padding-left:10px;">辅助插件</div> | |||||
</div><table width="98%" border="0" align="center" cellpadding="4" cellspacing="1" class="tbtitle" style="background:#CFCFCF;"> | |||||
<tr> | |||||
<td bgcolor="#EDF9D5" colspan="2" background='images/tbg.gif' style="padding-left:10px;"> | |||||
<strong>百度新闻地图</strong> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td bgcolor="#FFFFFF" colspan="2"> | |||||
<p>《互联网新闻开放协议》是百度新闻搜索制定的搜索引擎新闻源收录标准,网站可将发布的新闻内容制作成遵循此开放协议的XML格式的网页(独立于原有的新闻发布形式)供搜索引擎索引。</p> | |||||
<p> <a href="http://news.baidu.com/newsop.html#kg" target="_blank">详情参见</a></p> | |||||
<p>配置的相关参数在 【<a href="sys_info.php">系统设置</a> -> 其他选项】中调整</p> | |||||
<p>只适用于文章频道,数据表为DedeCMS默认的</p> </td> | |||||
</tr> | |||||
<form id="form2" name="form1" method="post" action="?do=yes" target="stafrm"> | |||||
<tr> | |||||
<td colspan="2" bgcolor="#F9FCEF"> <b>设置:</b></td> | |||||
</tr> | |||||
<tr> | |||||
<td bgcolor="#FFFFFF"> <b>文件名:</b></td> | |||||
<td bgcolor="#FFFFFF"> | |||||
<input name="filename" type="text" id="textfield" value="../data/baidunews.xml" size="30" class='alltxt' /> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2" align="center" bgcolor="#FFFFFF"> | |||||
<input name="button" type="submit" class="np coolbg" id="button" value="开始生成" /> | |||||
</td> | |||||
</tr> | |||||
</form> | |||||
<tr> | |||||
<td bgcolor="#F9FCEF" colspan="2"> <b>状态:</b></td> | |||||
</tr> | |||||
<tr> | |||||
<td align="center" bgcolor="#FFFFFF" colspan="2"> | |||||
<iframe name="stafrm" frameborder="0" id="stafrm" width="96%" height="350px" /> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
<div class="bodytitle mt-3"> | |||||
<div class="bodytitleleft"></div> | |||||
<div class="bodytitletxt" style="padding-left:10px;">辅助插件</div> | |||||
</div> | |||||
<table width="98%" border="0" align="center" cellpadding="4" cellspacing="1" class="table maintable table-bordered" | |||||
style="background:#CFCFCF;"> | |||||
<tr> | |||||
<td bgcolor="#EDF9D5" colspan="2" background='images/tbg.gif' style="padding-left:10px;"> | |||||
<strong>百度新闻地图</strong> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td bgcolor="#FFFFFF" colspan="2"> | |||||
<p>《互联网新闻开放协议》是百度新闻搜索制定的搜索引擎新闻源收录标准,网站可将发布的新闻内容制作成遵循此开放协议的XML格式的网页(独立于原有的新闻发布形式)供搜索引擎索引。</p> | |||||
<p> <a href="http://news.baidu.com/newsop.html#kg" target="_blank">详情参见</a></p> | |||||
<p>配置的相关参数在 【<a href="sys_info.php">系统设置</a> -> 其他选项】中调整</p> | |||||
<p>只适用于文章频道,数据表为DedeCMS默认的</p> | |||||
</td> | |||||
</tr> | |||||
<form id="form2" name="form1" method="post" action="?do=yes" target="stafrm"> | |||||
<tr> | |||||
<td colspan="2" bgcolor="#F9FCEF"> <b>设置:</b></td> | |||||
</tr> | |||||
<tr> | |||||
<td bgcolor="#FFFFFF"> <b>文件名:</b></td> | |||||
<td bgcolor="#FFFFFF"> | |||||
<input name="filename" type="text" id="textfield" value="../data/baidunews.xml" size="30" class='alltxt' /> | |||||
</td> | |||||
</tr> | |||||
<tr> | |||||
<td colspan="2" align="center" bgcolor="#FFFFFF"> | |||||
<button name="button" type="submit" class="btn btn-secondary" id="button">开始生成</button> | |||||
</td> | |||||
</tr> | |||||
</form> | |||||
<tr> | |||||
<td bgcolor="#F9FCEF" colspan="2"> <b>状态:</b></td> | |||||
</tr> | |||||
<tr> | |||||
<td align="center" bgcolor="#FFFFFF" colspan="2"> | |||||
<iframe name="stafrm" frameborder="0" id="stafrm" width="96%" height="350px" /> | |||||
</td> | |||||
</tr> | |||||
</table> | |||||
</body> | </body> | ||||
</html> | |||||
</html> |
@@ -41,7 +41,7 @@ $i = 0; | |||||
var posLeft = 100; | var posLeft = 100; | ||||
var posTop = 100; | var posTop = 100; | ||||
} | } | ||||
window.open("./dialog/select_templets.php?f=" + fname, "poptempWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=400,left=" + posLeft + ", top=" + posTop); | |||||
window.open("./dialog/select_templets.php?f=" + fname, "poptempWin", "scrollbars=yes,resizable=yes,statebar=no,width=680,height=400,left=" + posLeft + ", top=" + posTop); | |||||
} | } | ||||
function ShowHide(objname) { | function ShowHide(objname) { | ||||
@@ -35,7 +35,7 @@ $i = 0; | |||||
function SelectTemplets(fname) { | function SelectTemplets(fname) { | ||||
var posLeft = 200; | var posLeft = 200; | ||||
var posTop = 300; | var posTop = 300; | ||||
window.open("./dialog/select_templets.php?f=" + fname, "poptempWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=400,left=" + posLeft + ", top=" + posTop); | |||||
window.open("./dialog/select_templets.php?f=" + fname, "poptempWin", "scrollbars=yes,resizable=yes,statebar=no,width=680,height=400,left=" + posLeft + ", top=" + posTop); | |||||
} | } | ||||
function ShowHide(objname) { | function ShowHide(objname) { | ||||
@@ -44,7 +44,7 @@ | |||||
<td align="center"> | <td align="center"> | ||||
<?php echo $row->att; ?> | <?php echo $row->att; ?> | ||||
</td> | </td> | ||||
<td style="padding:3px;"> | |||||
<td> | |||||
<input name="sortid_<?php echo $k?>" value="<?php echo $row->sortid; ?>" type="text" | <input name="sortid_<?php echo $k?>" value="<?php echo $row->sortid; ?>" type="text" | ||||
id="sortid_<?php echo $k?>" class='pubinputs' style='width:50%' /> | id="sortid_<?php echo $k?>" class='pubinputs' style='width:50%' /> | ||||
</td> | </td> | ||||
@@ -1,27 +1,32 @@ | |||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |||||
<!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"> | <html xmlns="http://www.w3.org/1999/xhtml"> | ||||
<head> | <head> | ||||
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>"> | |||||
<title>网站类型管理</title> | |||||
<link href="css/base.css" rel="stylesheet" type="text/css" /> | |||||
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>"> | |||||
<title>网站类型管理</title> | |||||
<link rel="stylesheet" href="../static/css/bootstrap.min.css"> | |||||
<link href="../static/font-awesome/css/font-awesome.min.css" rel="stylesheet"> | |||||
<link href="css/base.css" rel="stylesheet" type="text/css" /> | |||||
</head> | </head> | ||||
<body background="images/allbg.gif" leftmargin='8' topmargin='8'> | <body background="images/allbg.gif" leftmargin='8' topmargin='8'> | ||||
<table width="98%" border="0" cellpadding="1" cellspacing="1" align="center" class="tbtitle" style=" background:#CFCFCF;"> | |||||
<form name="form1" action="friendlink_type.php" method="post"> | |||||
<input type="hidden" name="dopost" value="save"> | |||||
<tr> | |||||
<td height="19" background="images/tbg.gif" colspan="9" style="padding-left:10px;"> | |||||
<b><a href="friendlink_main.php">友情链接管理</a></b> | |||||
[<a href="friendlink_add.php"><u>增加链接</u></a>] | |||||
[<a href="friendlink_type.php"><u>网站类型管理</u></a>] | |||||
[<a href='../plus/flink_add.php' target='_blank'><u>外部申请表单</u></a>]</td> | |||||
</tr> | |||||
<tr bgcolor="#FBFCE2"> | |||||
<td width="4%" height="24" align="center" valign="top">类型ID</td> | |||||
<td width="60%" align="center" valign="top">网站名称</td> | |||||
<td width="36%" align="center">状态</td> | |||||
</tr> | |||||
<?php | |||||
<table width="98%" border="0" cellpadding="1" cellspacing="1" align="center" class="table maintable table-bordered mt-3" | |||||
style=" background:#CFCFCF;"> | |||||
<form name="form1" action="friendlink_type.php" method="post"> | |||||
<input type="hidden" name="dopost" value="save"> | |||||
<tr> | |||||
<td height="19" background="images/tbg.gif" colspan="9" style="padding-left:10px;"> | |||||
<a href="friendlink_main.php">友情链接管理</a> | |||||
<a href="friendlink_add.php" class="btn btn-secondary btn-sm">增加链接</a> | |||||
<a href="friendlink_type.php" class="btn btn-secondary btn-sm">网站类型管理</a> | |||||
<a href='../plus/flink_add.php' target='_blank' class="btn btn-secondary btn-sm">外部申请表单</a></td> | |||||
</tr> | |||||
<tr bgcolor="#FBFCE2"> | |||||
<td width="4%" height="24" align="center" valign="top">类型ID</td> | |||||
<td width="60%" align="center" valign="top">网站名称</td> | |||||
<td width="36%" align="center">状态</td> | |||||
</tr> | |||||
<?php | |||||
$dsql->SetQuery("Select * From #@__flinktype"); | $dsql->SetQuery("Select * From #@__flinktype"); | ||||
$dsql->Execute(); | $dsql->Execute(); | ||||
$k=0; | $k=0; | ||||
@@ -29,36 +34,39 @@ | |||||
{ | { | ||||
$k++; | $k++; | ||||
?> | ?> | ||||
<input type="hidden" name="ID_<?php echo $k?>" value="<?php echo $row->id?>"> | |||||
<tr align="center" bgcolor="#FFFFFF"> | |||||
<td height="24" valign="top"><?php echo $row->id; ?> | |||||
</td> | |||||
<input type="hidden" name="ID_<?php echo $k?>" value="<?php echo $row->id?>"> | |||||
<tr align="center" bgcolor="#FFFFFF"> | |||||
<td height="24" valign="top"><?php echo $row->id; ?> | |||||
</td> | |||||
<td height="24" valign="top"><input name="pname_<?php echo $k?>" value="<?php echo $row->typename?>" type="text" id="pname_<?php echo $k?>" class='pubinputs' style="width:90%" /> </td> | |||||
<td> | |||||
<input name="check_<?php echo $k?>" type="checkbox" id="check_<?php echo $k?>" value="1" checked='1' class='np' /> | |||||
保留 </td> | |||||
</tr> | |||||
<?php | |||||
<td height="24" valign="top"><input name="pname_<?php echo $k?>" value="<?php echo $row->typename?>" type="text" | |||||
id="pname_<?php echo $k?>" class='pubinputs' style="width:90%" /> </td> | |||||
<td> | |||||
<label><input name="check_<?php echo $k?>" type="checkbox" id="check_<?php echo $k?>" value="1" checked='1' | |||||
class='np' /> | |||||
保留 </label></td> | |||||
</tr> | |||||
<?php | |||||
} | } | ||||
?> | ?> | ||||
<input type="hidden" name="idend" value="<?php echo $k?>"> | |||||
<tr bgcolor="#F8FCF1"> | |||||
<td height="24" colspan="5" valign="top" bgcolor="#F9FCEF"><strong>新增一个网站类型:</strong></td> | |||||
</tr> | |||||
<tr height="24" align="center" bgcolor="#FFFFFF"> | |||||
<td colspan="2" valign="top"> | |||||
<input name="pname_new" type="text" id="pname_new" class='pubinputs' style="width:90%" /> </td> | |||||
<input type="hidden" name="idend" value="<?php echo $k?>"> | |||||
<tr bgcolor="#F8FCF1"> | |||||
<td height="24" colspan="5" valign="top" bgcolor="#F9FCEF"><strong>新增一个网站类型:</strong></td> | |||||
</tr> | |||||
<tr height="24" align="center" bgcolor="#FFFFFF"> | |||||
<td colspan="2" valign="top"> | |||||
<input name="pname_new" type="text" id="pname_new" class='pubinputs' style="width:90%" /> </td> | |||||
<td align="center" bgcolor="#FFFFFF"> | |||||
<input name="check_new" type="checkbox" id="check_new" value="1" checked='1' class='np' /> | |||||
新增 </td> | |||||
</tr> | |||||
<tr> | |||||
<td height="34" colspan="5" align="center" bgcolor="#F9FCEF"> | |||||
<input name="imageField" type="submit" class="np coolbg" value="确定" /> </td> | |||||
</tr> | |||||
</form> | |||||
</table> | |||||
<td align="center" bgcolor="#FFFFFF"> | |||||
<label><input name="check_new" type="checkbox" id="check_new" value="1" checked='1' class='np' /> | |||||
新增 </label></td> | |||||
</tr> | |||||
<tr> | |||||
<td height="34" colspan="5" align="center" bgcolor="#F9FCEF"> | |||||
<input name="imageField" type="submit" class="np coolbg" value="确定" /> </td> | |||||
</tr> | |||||
</form> | |||||
</table> | |||||
</body> | </body> | ||||
</html> | </html> |
@@ -334,8 +334,6 @@ | |||||
<div class="footer"> | <div class="footer"> | ||||
<br style='clear:both' /> | |||||
<!-- //底部 --> | <!-- //底部 --> | ||||
<div align="center" class="footer"> | <div align="center" class="footer"> | ||||
Copyright © 2004-2020 <a href='http://www.dedecms.com' target='_blank'><u>DedeCMS</u></a>. 版权所有 <a | Copyright © 2004-2020 <a href='http://www.dedecms.com' target='_blank'><u>DedeCMS</u></a>. 版权所有 <a | ||||
@@ -406,21 +404,14 @@ if (defined('DEDEBIZ')) { | |||||
if (rsp.code === 200) { | if (rsp.code === 200) { | ||||
$("#_systeminfo").html(` | $("#_systeminfo").html(` | ||||
<table width="100%" class="table table-borderless"> | <table width="100%" class="table table-borderless"> | ||||
<tbody><tr> | |||||
<td width="50%" class="nline" style="text-align:left"> 会员数: </td> | |||||
<td class="nline" style="text-align:left"> 5 </td> | |||||
</tr> | |||||
<tbody> | |||||
<tr> | <tr> | ||||
<td class="nline" style="text-align:left"> 运行时间: </td> | <td class="nline" style="text-align:left"> 运行时间: </td> | ||||
<td class="nline" style="text-align:left"> ${rsp.result.server_run_time} </td> | <td class="nline" style="text-align:left"> ${rsp.result.server_run_time} </td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td class="nline" style="text-align:left"> 系统: </td> | <td class="nline" style="text-align:left"> 系统: </td> | ||||
<td class="nline" style="text-align:left"> ${rsp.result.server_goos} </td> | |||||
</tr> | |||||
<tr> | |||||
<td class="nline" style="text-align:left"> 环境: </td> | |||||
<td class="nline" style="text-align:left"> ${rsp.result.server_goarch} </td> | |||||
<td class="nline" style="text-align:left"> ${rsp.result.server_goos}(${rsp.result.server_goarch})</td> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td class="nline" style="text-align:left"> 版本号: </td> | <td class="nline" style="text-align:left"> 版本号: </td> | ||||
@@ -3,11 +3,12 @@ | |||||
* @version $Id: common.inc.php 3 17:44 2010-11-23 tianya $ | * @version $Id: common.inc.php 3 17:44 2010-11-23 tianya $ | ||||
* @package DedeCMS.Libraries | * @package DedeCMS.Libraries | ||||
* @copyright Copyright (c) 2007 - 2020, DesDev, Inc. | * @copyright Copyright (c) 2007 - 2020, DesDev, Inc. | ||||
* @copyright Copyright (c) 2020, DedeBIZ.COM | |||||
* @license http://help.dedecms.com/usersguide/license.html | * @license http://help.dedecms.com/usersguide/license.html | ||||
* @link http://www.dedecms.com | * @link http://www.dedecms.com | ||||
*/ | */ | ||||
// 生产环境使用production | |||||
// 生产环境使用production,如果采用dev模式,会有一些php的报错信息提示,便于开发调试 | |||||
define('DEDE_ENVIRONMENT', 'dev'); | define('DEDE_ENVIRONMENT', 'dev'); | ||||
if ( DEDE_ENVIRONMENT == 'production' ) | if ( DEDE_ENVIRONMENT == 'production' ) | ||||
@@ -16,6 +17,9 @@ if ( DEDE_ENVIRONMENT == 'production' ) | |||||
} else { | } else { | ||||
error_reporting(E_ALL); | error_reporting(E_ALL); | ||||
} | } | ||||
define('DEBUG_LEVEL', FALSE); // 如果设置为TRUE则会打印执行SQL的时间和标签加载时间方便调试 | |||||
define('DEDEINC', str_replace("\\", '/', dirname(__FILE__) ) ); | define('DEDEINC', str_replace("\\", '/', dirname(__FILE__) ) ); | ||||
define('DEDEROOT', str_replace("\\", '/', substr(DEDEINC,0,-8) ) ); | define('DEDEROOT', str_replace("\\", '/', substr(DEDEINC,0,-8) ) ); | ||||
define('DEDEDATA', DEDEROOT.'/data'); | define('DEDEDATA', DEDEROOT.'/data'); | ||||
@@ -27,8 +31,6 @@ define('DEDEMODEL', './model'); | |||||
define('DEDECONTROL', './control'); | define('DEDECONTROL', './control'); | ||||
define('DEDEAPPTPL', './templates'); | define('DEDEAPPTPL', './templates'); | ||||
define('DEBUG_LEVEL', FALSE); | |||||
if (version_compare(PHP_VERSION, '5.3.0', '<') && function_exists("get_magic_quotes_gpc")) | if (version_compare(PHP_VERSION, '5.3.0', '<') && function_exists("get_magic_quotes_gpc")) | ||||
{ | { | ||||
set_magic_quotes_runtime(0); | set_magic_quotes_runtime(0); | ||||
@@ -11,7 +11,7 @@ | |||||
*/ | */ | ||||
require_once(dirname(__FILE__)."/../include/common.inc.php"); | require_once(dirname(__FILE__)."/../include/common.inc.php"); | ||||
//$t1 = ExecTime(); | |||||
$t1 = ExecTime(); | |||||
$tid = (isset($tid) && is_numeric($tid) ? $tid : 0); | $tid = (isset($tid) && is_numeric($tid) ? $tid : 0); | ||||
@@ -24,6 +24,7 @@ if(isset($TotalResult)) $TotalResult = intval(preg_replace("/[^\d]/", '', $Total | |||||
//如果指定了内容模型ID但没有指定栏目ID,那么自动获得为这个内容模型的第一个顶级栏目作为频道默认栏目 | //如果指定了内容模型ID但没有指定栏目ID,那么自动获得为这个内容模型的第一个顶级栏目作为频道默认栏目 | ||||
if(!empty($channelid) && empty($tid)) | if(!empty($channelid) && empty($tid)) | ||||
{ | { | ||||
$tinfos = $dsql->GetOne("SELECT tp.id,ch.issystem FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.channeltype='$channelid' And tp.reid=0 order by sortrank asc"); | $tinfos = $dsql->GetOne("SELECT tp.id,ch.issystem FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.channeltype='$channelid' And tp.reid=0 order by sortrank asc"); | ||||
if(!is_array($tinfos)) die(" No catalogs in the channel! "); | if(!is_array($tinfos)) die(" No catalogs in the channel! "); | ||||
$tid = $tinfos['id']; | $tid = $tinfos['id']; | ||||
@@ -71,3 +72,7 @@ if($tinfos['issystem']==-1) | |||||
if($lv->IsError) ParamError(); | if($lv->IsError) ParamError(); | ||||
$lv->Display(); | $lv->Display(); | ||||
if (DEBUG_LEVEL===TRUE) { | |||||
$queryTime = ExecTime() - $t1; | |||||
echo "<div style='width:98%;margin:1rem auto;color: #721c24;background-color: #f8d7da;border-color: #f5c6cb;position: relative;padding: .75rem 1.25rem;border: 1px solid transparent;border-radius: .25rem;'>页面加载总消耗时间:<b>{$queryTime}</b></div>\r\n"; | |||||
} |
@@ -121,4 +121,8 @@ if($needMoney>0 || $needRank>1) | |||||
}//金币处理付处理 | }//金币处理付处理 | ||||
} | } | ||||
$arc->Display(); | |||||
$arc->Display(); | |||||
if (DEBUG_LEVEL===TRUE) { | |||||
$queryTime = ExecTime() - $t1; | |||||
echo "<div style='width:98%;margin:1rem auto;color: #721c24;background-color: #f8d7da;border-color: #f5c6cb;position: relative;padding: .75rem 1.25rem;border: 1px solid transparent;border-radius: .25rem;'>页面加载总消耗时间:<b>{$queryTime}</b></div>\r\n"; | |||||
} |