@@ -72,7 +72,7 @@ $wintitle = "随机模板防采集设置"; | |||
$wecome_info = "随机模板防采集设置"; | |||
make_hash(); | |||
$msg = " | |||
<link rel='stylesheet' href='../static/web/css/admin.css' /> | |||
<link rel='stylesheet' href='../static/web/css/admin.css'> | |||
<script language='javascript' src='js/main.js'></script> | |||
<script language='javascript' src='../static/web/js/webajax.js'></script> | |||
<script language='javascript'> | |||
@@ -87,13 +87,13 @@ function DoRand(jobname) | |||
}); | |||
} | |||
</script> | |||
<div id='loading' style='z-index:3000;top:160;left:300;position:absolute;display:none;'> | |||
<div id='loading' style='position:absolute;top:160;display:none;z-index:3000'> | |||
<img src='../static/web/img/loadinglit.gif'>请稍后,正在操作中 | |||
</div> | |||
<table width='98%' align='center'> | |||
<tr> | |||
<td height='26'> | |||
如果您想对旧的文章应用随机模板设置,请点击此对旧文章进行处理(必须设置好模板项) | |||
如果您想对旧的文章应用随机模板设置,请点击此对旧文章进行处理(必须设置好模板项) | |||
<a href='#' onclick='DoRand(\"makeold\")' class='btn btn-success btn-sm'>设置全部</a> | |||
<a href='#' onclick='DoRand(\"clearold\")' class='btn btn-success btn-sm'>取消全部</a> | |||
<span id='tmpct' style='color:#dc3545;font-weight:bold'>$okmsg</span> | |||
@@ -88,8 +88,8 @@ function GetKeywordList($dsql, $pageno, $pagesize, $orderby = 'aid') | |||
<td><a href='{$cfg_phpurl}/search.php?kwtype=0&keyword=".urlencode($row['keyword'])."&searchtype=titlekeyword' target='_blank'>{$row['result']}</a></td> | |||
<td>".MyDate("Y-m-d H:i:s", $row['lasttime'])."</td> | |||
<td> | |||
<a href='#' onclick='UpdateNote({$row['aid']})' class='btn btn-success btn-sm'>更新</a> | | |||
<a href='#' onclick='DelNote({$row['aid']})' class='btn btn-success btn-sm'>删除</a> | |||
<a href='#' onclick='UpdateNote({$row['aid']})' class='btn btn-success btn-sm'>更新</a> | |||
<a href='#' onclick='DelNote({$row['aid']})' class='btn btn-success btn-sm'>删除</a> | |||
</td> | |||
</tr> | |||
"; | |||
@@ -35,14 +35,10 @@ | |||
<td width="25%" style="padding-left:10px">关键词维护</td> | |||
<form name='form1' action="article_keywords_main.php"> | |||
<td width="75%" align="right"> | |||
搜索:<input type='text' name='keyword' size='20' /> | |||
搜索:<input type='text' name='keyword' size='20' /> | |||
<button type='submit' name='sb' value='' class="btn btn-success btn-sm">确定</button> | |||
| |||
<button class="btn btn-success btn-sm" name="n1" type="button" id="n1" | |||
onClick="location='article_keywords_make.php';">分析系统内的关键词</button> | |||
| |||
<button class="btn btn-success btn-sm" name="n11" type="button" id="n11" | |||
onClick="location='search_keywords_main.php';">管理搜索的关键词</button> | |||
<button class="btn btn-success btn-sm" name="n1" type="button" id="n1" onClick="location='article_keywords_make.php';">分析系统内的关键词</button> | |||
<button class="btn btn-success btn-sm" name="n11" type="button" id="n11" onClick="location='search_keywords_main.php';">管理搜索的关键词</button> | |||
</td> | |||
</form> | |||
</tr> | |||
@@ -55,13 +51,13 @@ | |||
<td width="100%" height="30" colspan="6"> | |||
<table border="0" cellspacing="0" cellpadding="0" class="table table-borderless"> | |||
<tr> | |||
<td width="90" align="center">新增关键词:</td> | |||
<td width="140"><input name="keyword" type="text" id="keyword"/></td> | |||
<td width="90">新增关键词:</td> | |||
<td><input name="keyword" type="text" id="keyword" style="width:260px"></td> | |||
<td width="90">链接网址:</td> | |||
<td width="140"><input name="rpurl" type="text" id="rpurl"/></td> | |||
<td width="86">频率:</td> | |||
<td width="60"><input name="rank" type="text" id="rank" style="width:50px" value="30"></td> | |||
<td width="86"><button type="submit" name="Submit" class="btn btn-success btn-sm">保存</button></td> | |||
<td><input name="rpurl" type="text" id="rpurl" style="width:260px"></td> | |||
<td width="60">频率:</td> | |||
<td><input name="rank" type="text" id="rank" value="30" style="width:260px"></td> | |||
<td><button type="submit" name="Submit" class="btn btn-success btn-sm">保存</button></td> | |||
</tr> | |||
</table> | |||
</td> | |||
@@ -17,11 +17,10 @@ | |||
</tr> | |||
<tr> | |||
<td height="30" colspan="3" bgcolor="#FFFFFF"> | |||
自定义属性的意义和使用说明:<br> | |||
在以往的版本中,网站主页、频道封面的设计,都只能单调的用 arclist | |||
标记把某栏目最新或按特定排序方式的文档无选择的读出来,这样做法存在很大的不足,例如,我希望在最顶部的地方显示我想要的文档,在以往的版本中是无法做到的,但使用自定义属性之后,只要给arclist 标记加上 | |||
att='自定义属性的ID' 的属性,然后在发布的时候对适合的文档选择专门的属性,那么使用arclist的地方就会按您的意愿显示指定的文档<br> | |||
注意事项:这个版本中att对应的字段是SET类型字段,因此为了数据安全起见不允许用户增加其它类型,但调用时允许使用组合条件,如:att='c,p'表示推荐图片新闻 </td> | |||
自定义属性的意义和使用说明:<br> | |||
在以往的版本中,网站主页、频道封面的设计,都只能单调的用 arclist 标记把某栏目最新或按特定排序方式的文档无选择的读出来,这样做法存在很大的不足,例如,我希望在最顶部的地方显示我想要的文档,在以往的版本中是无法做到的,但使用自定义属性之后,只要给arclist 标记加上 att='自定义属性的ID' 的属性,然后在发布的时候对适合的文档选择专门的属性,那么使用arclist的地方就会按您的意愿显示指定的文档<br> | |||
注意事项:这个版本中att对应的字段是SET类型字段,因此为了数据安全起见不允许用户增加其它类型,但调用时允许使用组合条件,如:att='c,p'表示推荐图片新闻 | |||
</td> | |||
</tr> | |||
<tr bgcolor="#FBFCE2" align="center"> | |||
<td width="15%" height="26">ID</td> | |||
@@ -42,12 +41,10 @@ | |||
<?php echo $row->att; ?> | |||
</td> | |||
<td> | |||
<input name="sortid_<?php echo $k?>" value="<?php echo $row->sortid; ?>" type="text" | |||
id="sortid_<?php echo $k?>" class='pubinputs' style='width:50%' /> | |||
<input name="sortid_<?php echo $k?>" value="<?php echo $row->sortid; ?>" type="text" id="sortid_<?php echo $k?>" class='pubinputs' style='width:50%' /> | |||
</td> | |||
<td style="padding-left:5px;"> | |||
<input name="attname_<?php echo $k?>" value="<?php echo $row->attname; ?>" type="text" | |||
id="attname_<?php echo $k?>" size="30" class='pubinputs' /> | |||
<input name="attname_<?php echo $k?>" value="<?php echo $row->attname; ?>" type="text" id="attname_<?php echo $k?>" size="30" class='pubinputs' /> | |||
</td> | |||
</tr> | |||
<?php | |||
@@ -16,12 +16,12 @@ | |||
{ | |||
i++; | |||
myob = document.getElementById("upfield"); | |||
myob.innerHTML+="<p>文件"+i+":<input type='file' name='upfile"+i+"' size='40'></p>"; | |||
myob.innerHTML+="<p>文件"+i+":<input type='file' name='upfile"+i+"' size='56'></p>"; | |||
} | |||
function reset_upload() | |||
{ | |||
myob = document.getElementById("upfield"); | |||
myob.innerHTML="<p>文件1:<input type='file' name='upfile1' size='40'></p>"; | |||
myob.innerHTML="<p>文件1:<input type='file' name='upfile1' size='56'></p>"; | |||
} | |||
</script> | |||
<form method="POST" enctype="multipart/form-data" action="file_manage_control.php" name="form1"> | |||
@@ -38,7 +38,7 @@ | |||
<tr> | |||
<td width="10%"></td> | |||
<td width="90%"> | |||
<div id="upfield"><p>文件1:<input type='file' name='upfile1' size='40'></p></div> | |||
<div id="upfield"><p>文件1:<input type='file' name='upfile1' size='56'></p></div> | |||
</td> | |||
</tr> | |||
<tr> | |||
@@ -36,8 +36,7 @@ | |||
<td height="26" valign="top"><?php echo $row->id; ?> | |||
</td> | |||
<td height="26" 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 height="26" 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' /> | |||
@@ -38,10 +38,8 @@ | |||
class='autoinput alltxt' /></td> | |||
<td><input name="rank_<?php echo $k?>" value="<?php echo $row->rank; ?>" type="text" id="rank_<?php echo $k?>" | |||
class='autoinput alltxt' /></td> | |||
<td><input name="money_<?php echo $k?>" value="<?php echo $row->money; ?>" type="text" | |||
id="money_<?php echo $k?>" class='autoinput alltxt' /></td> | |||
<td><input name="scores_<?php echo $k?>" value="<?php echo $row->scores; ?>" type="text" | |||
id="scores_<?php echo $k?>" class='autoinput alltxt' /></td> | |||
<td><input name="money_<?php echo $k?>" value="<?php echo $row->money; ?>" type="text" id="money_<?php echo $k?>" class='autoinput alltxt' /></td> | |||
<td><input name="scores_<?php echo $k?>" value="<?php echo $row->scores; ?>" type="text" id="scores_<?php echo $k?>" class='autoinput alltxt' /></td> | |||
<td align="center"> | |||
<?php | |||
if($row->id<=5) { echo "系统"; } | |||
@@ -376,8 +376,7 @@ else | |||
修改配置文本可调整字段顺序,但不会修改字段属性 | |||
</td> | |||
<td width="65%" bgcolor="#FFFFFF"> | |||
<textarea name="fieldset" style="width:99%;height:300px" rows="10" | |||
id="fieldset"><?php echo stripslashes($row['fieldset']); ?></textarea> | |||
<textarea name="fieldset" style="width:99%;height:300px" rows="10" id="fieldset"><?php echo stripslashes($row['fieldset']); ?></textarea> | |||
</td> | |||
</tr> | |||
</table> | |||
@@ -157,8 +157,7 @@ | |||
天以内 (0 表示不限)</td> | |||
</tr> | |||
<tr> | |||
<td height="26">提取特定文档:<button class="btn btn-success btn-sm" type="button" id="selarc" | |||
onClick="SelectArcList('form1.arcid');">选择节点文章</button> | |||
<td height="26">提取特定文档:<button class="btn btn-success btn-sm" type="button" id="selarc" onClick="SelectArcList('form1.arcid');">选择节点文章</button> | |||
<textarea name="arcid" rows="3" id="arcid" style="width:90%" class="mt-3"></textarea> | |||
</td> | |||
</tr> | |||
@@ -41,7 +41,6 @@ | |||
} | |||
//获得选中文件的数据表 | |||
function getCheckboxItem() { | |||
var myform = document.form1; | |||
var allSel = ""; | |||
@@ -108,7 +107,7 @@ | |||
<form name="form1" onSubmit="checkSubmit()" action="sys_data_done.php?dopost=bak" method="post" target="stafrm"> | |||
<input type='hidden' name='tablearr' value='' /> | |||
<tr bgcolor="#F7F8ED"> | |||
<td height="26" colspan="8">DedeBIZV6默认系统表:</td> | |||
<td height="26" colspan="8">系统默认表:</td> | |||
</tr> | |||
<tr bgcolor="#FBFCE2" align="center"> | |||
<td height="26" width="5%">选择</td> | |||
@@ -690,9 +690,8 @@ class Archives | |||
$nextR = $this->dsql->GetOne("Select id From `#@__arctiny` where id>$aid And arcrank>-1 And typeid='{$this->Fields['typeid']}' order by id asc"); | |||
$next = (is_array($nextR) ? " where arc.id={$nextR['id']} " : ' where 1>2 '); | |||
$pre = (is_array($preR) ? " where arc.id={$preR['id']} " : ' where 1>2 '); | |||
$query = "Select arc.id,arc.title,arc.shorttitle,arc.typeid,arc.ismake,arc.senddate,arc.arcrank,arc.money,arc.filename,arc.litpic, | |||
t.typedir,t.typename,t.namerule,t.namerule2,t.ispart,t.moresite,t.siteurl,t.sitepath | |||
from `#@__archives` arc left join #@__arctype t on arc.typeid=t.id "; | |||
$query = "Select arc.id,arc.title,arc.shorttitle,arc.typeid,arc.ismake,arc.senddate,arc.arcrank,arc.money,arc.filename,arc.litpic,t.typedir,t.typename,t.namerule,t.namerule2,t.ispart,t.moresite,t.siteurl,t.sitepath | |||
from `#@__archives` arc left join #@__arctype t on arc.typeid=t.id "; | |||
$nextRow = $this->dsql->GetOne($query.$next); | |||
$preRow = $this->dsql->GetOne($query.$pre); | |||
if (is_array($preRow)) { | |||
@@ -1013,42 +1012,23 @@ class Archives | |||
$karr = $kaarr = $GLOBALS['replaced'] = array(); | |||
//暂时屏蔽超链接 | |||
$body = preg_replace("#(<a(.*))(>)(.*)(<)(\/a>)#isU", '\\1-]-\\4-[-\\6', $body); | |||
$query = "SELECT * FROM `#@__keywords` WHERE rpurl<>'' ORDER BY `rank` DESC"; | |||
$query = "SELECT * FROM #@__keywords WHERE rpurl<>'' ORDER BY rank DESC"; | |||
$this->dsql->SetQuery($query); | |||
$this->dsql->Execute(); | |||
while($row = $this->dsql->GetArray()) | |||
{ | |||
global $cfg_replace_num; | |||
while ($row = $this->dsql->GetArray()) { | |||
$key = trim($row['keyword']); | |||
$key_url=trim($row['rpurl']); | |||
$key_url = trim($row['rpurl']); | |||
$karr[] = $key; | |||
$kaarr[] = "<a href='$key_url' target='_blank'>$key</a>"; | |||
} | |||
$GLOBALS['_dd_karr'] = $karr; | |||
$GLOBALS['_dd_kaarr'] = $kaarr; | |||
//这里可能会有错误 | |||
if (version_compare(PHP_VERSION, '5.5.0', '>=')) | |||
{ | |||
if($cfg_replace_num > 0) | |||
{ | |||
$query = "SELECT * FROM `#@__keywords` WHERE rpurl<>'' ORDER BY `rank` DESC"; | |||
$this->dsql->SetQuery($query); | |||
$this->dsql->Execute(); | |||
while($row = $this->dsql->GetArray()) | |||
{ | |||
$key = trim($row['keyword']); | |||
$key_url=trim($row['rpurl']); | |||
$body = str_replace_limit($key, "<a href='$key_url' target='_blank'>$key</a>", $body, $cfg_replace_num); | |||
} | |||
} else { | |||
$query = "SELECT * FROM `#@__keywords` WHERE rpurl<>'' ORDER BY `rank` DESC"; | |||
$this->dsql->SetQuery($query); | |||
$this->dsql->Execute(); | |||
while($row = $this->dsql->GetArray()) | |||
{ | |||
$key = trim($row['keyword']); | |||
$key_url=trim($row['rpurl']); | |||
$body = str_replace($key, "<a href='$key_url' target='_blank'>$key</a>", $body); | |||
} | |||
} | |||
if (version_compare(PHP_VERSION, '8.0.0', '>=')) { | |||
$body = @preg_replace_callback("#(^|>)([^<]+)(?=<|$)#sU", "_highlight8", $body); | |||
} else if (version_compare(PHP_VERSION, '5.5.0', '>=')) { | |||
$body = @preg_replace_callback("#(^|>)([^<]+)(?=<|$)#sU", "_highlight('\\2', \$karr, \$kaarr, '\\1')", $body); | |||
} else { | |||
$body = @preg_replace("#(^|>)([^<]+)(?=<|$)#sUe", "_highlight('\\2', \$karr, \$kaarr, '\\1')", $body); | |||
} | |||
@@ -1057,43 +1037,30 @@ class Archives | |||
return $body; | |||
} | |||
}//End Archives | |||
//指定替换次数功能 | |||
function str_replace_limit($search, $replace, $subject, $limit){ | |||
if(is_array($search)){ | |||
foreach($search as $k=>$v){ | |||
$search[$k] = '`'. preg_quote($search[$k], '`'). '`'; | |||
} | |||
} else { | |||
$search = '`'. preg_quote($search, '`'). '`'; | |||
} | |||
return preg_replace($search, $replace, $subject, $limit); | |||
function _highlight8($matches){ | |||
return _highlight($matches[2], $GLOBALS['_dd_karr'], $GLOBALS['_dd_kaarr'], $matches[1]); | |||
} | |||
//高亮专用, 替换多次时可能不能达到最多次 | |||
//高亮专用, 替换多次是可能不能达到最多次 | |||
function _highlight($string, $words, $result, $pre) | |||
{ | |||
global $cfg_replace_num; | |||
if (version_compare(PHP_VERSION, '5.5.0', '>=')) | |||
{ | |||
if (version_compare(PHP_VERSION, '5.5.0', '>=') && version_compare(PHP_VERSION, '8.0.0', '<')) { | |||
$string = $string[0]; | |||
$pre = $pre[0]; | |||
} | |||
$string = str_replace('\"', '"', $string); | |||
if($cfg_replace_num > 0) | |||
{ | |||
foreach ($words as $key => $word) | |||
{ | |||
if($GLOBALS['replaced'][$word] == 1) | |||
{ | |||
if ($cfg_replace_num > 0) { | |||
foreach ($words as $key => $word) { | |||
if ($GLOBALS['replaced'][$word] == 1) { | |||
continue; | |||
} | |||
$string = preg_replace("#".preg_quote($word)."#", $result[$key], $string, $cfg_replace_num); | |||
if(strpos($string, $word) !== FALSE) | |||
{ | |||
$string = preg_replace("#" . preg_quote($word) . "#", $result[$key], $string, $cfg_replace_num); | |||
if (strpos($string, $word) !== FALSE) { | |||
$GLOBALS['replaced'][$word] = 1; | |||
} | |||
} | |||
} else { | |||
$string = str_replace($words, $result, $string); | |||
} | |||
return $pre.$string; | |||
return $pre . $string; | |||
} |
@@ -156,8 +156,7 @@ | |||
<td><a name="mate_vdimgck" /> | |||
<input name="vdcode" id="vdcode" type="text" class="ipt-txt" size="10" | |||
style="text-transform:uppercase;" /> | |||
<a href="#mate_vdimgck"><img id="vdimgck_img" src="../apps/vdimgck.php" hspace="6" align="absmiddle" | |||
onClick="vdimgck();" title="看不清换一张" /></a> <a href="#mate_vdimgck" onClick="vdimgck();">看不清换一张</a> | |||
<a href="#mate_vdimgck"><img id="vdimgck_img" src="../apps/vdimgck.php" hspace="6" align="absmiddle" onClick="vdimgck();" title="看不清换一张" /></a> <a href="#mate_vdimgck" onClick="vdimgck();">看不清换一张</a> | |||
</td> | |||
</tr> | |||
</tbody> | |||