diff --git a/src/apps/ad_js.php b/src/apps/ad_js.php
index f6bbeb4c..0810453b 100755
--- a/src/apps/ad_js.php
+++ b/src/apps/ad_js.php
@@ -1,6 +1,5 @@
$cfg_puccache_time) {
$row = $dsql->GetOne("SELECT * FROM `#@__myad` WHERE aid='$aid' ");
@@ -37,4 +34,4 @@ if (isset($nocache) || !file_exists($cacheFile) || time() - filemtime($cacheFile
fwrite($fp, $adbody);
fclose($fp);
}
-include $cacheFile;
+include $cacheFile;
\ No newline at end of file
diff --git a/src/apps/advancedsearch.php b/src/apps/advancedsearch.php
index 52cac815..e2ab5bf0 100755
--- a/src/apps/advancedsearch.php
+++ b/src/apps/advancedsearch.php
@@ -1,6 +1,5 @@
GetOne($query);
if (!is_array($searchinfo)) {
@@ -42,7 +38,6 @@ if (!is_array($searchinfo)) {
}
$template = $searchinfo['template'] != '' ? $searchinfo['template'] : 'advancedsearch.htm';
$sql = empty($_SESSION[$sqlhash]) ? '' : $_SESSION[$sqlhash];
-
if (empty($sql)) {
//主表字段处理
$q = stripslashes($q);
@@ -62,11 +57,9 @@ if (empty($sql)) {
$enddate = isset($enddate) ? trim($enddate) : '';
if ($startdate != '') $starttime = strtotime($startdate);
else $starttime = 0;
-
if ($enddate != '') $endtime = strtotime($enddate);
else $endtime = 0;
$where = ' WHERE main.arcrank>-1 ';
-
if ($q != '') $where .= " AND main.title LIKE '%$q%' ";
if ($iscommend == 1) $where .= " AND FIND_IN_SET('c', main.flag)>0 ";
if (!empty($typeid)) {
@@ -100,7 +93,6 @@ if (empty($sql)) {
$mainfieldsarr = explode(',', $mainfields);
$addonfieldsarr = explode(',', $addonfields);
array_pop($addonfieldsarr); //弹出
-
$intarr = array('int', 'float');
$textarr = array('textdata', 'textchar', 'text', 'htmltext', 'multitext');
foreach ($addonfieldsarr as $addonfield) {
@@ -185,12 +177,10 @@ if (empty($sql)) {
$sql = urldecode($sql);
$query = $sql;
}
-
$sql = urlencode($sql);
//生成sql的唯一序列化字符串,并将sql语句记录到session中去
$sqlhash = md5($sql);
$_SESSION[$sqlhash] = $sql;
-
$dlist = new DataListCP();
$dlist->pageSize = 20;
$dlist->SetParameter("hash", $sqlhash);
@@ -203,10 +193,9 @@ if (file_exists(DEDEROOT."/theme/templets/$template")) {
$dlist->SetTemplate($templatefile);
$dlist->SetSource($query);
require_once(DEDEINC."/channelunit.class.php");
-
//获得一个指定档案的链接
function GetArcUrl($aid, $typeid, $timetag, $title, $ismake = 0, $rank = 0, $namerule = '', $artdir = '', $money = 0)
{
return GetFileUrl($aid, $typeid, $timetag, $title, $ismake, $rank, $namerule, $artdir, $money);
}
-$dlist->Display();
+$dlist->Display();
\ No newline at end of file
diff --git a/src/apps/arcmulti.php b/src/apps/arcmulti.php
index 3e2b024f..c1902bd8 100755
--- a/src/apps/arcmulti.php
+++ b/src/apps/arcmulti.php
@@ -2,13 +2,10 @@
require_once(dirname(__FILE__)."/../system/common.inc.php");
require_once(DEDEINC.'/channelunit.class.php');
require_once(DEDEINC.'/taglib/arcpagelist.lib.php');
-
$mtype = empty($mtype)? 0 : intval(preg_replace("/[^\d]/",'', $mtype));
$pnum = empty($pnum)? 0 : intval(preg_replace("/[^\d]/",'', $pnum));
$tagid = empty($tagid)? '' : (preg_replace("/[^a-z0-9]/",'', $tagid));
-
if($tagid=='' || $pnum==0) die("dedebiz");
-
if($tagid !='')
{
$row = $dsql->GetOne("SELECT * FROM `#@__arcmulti` WHERE tagid='$tagid'");
@@ -17,21 +14,18 @@ if($tagid !='')
//取出属性并解析为变量
$attarray = unserialize($row['attstr']);
extract($attarray, EXTR_SKIP);
-
$artlist = '';
//通过页面及总数解析当前页面数据范围
$strnum = ($pnum-1) * $row['pagesize'];
$limitsql = " LIMIT $strnum,{$row['pagesize']} ";
-
if($mtype == 0)
{
//处理列表内容项
- $query = "SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,
- tp.moresite,tp.siteurl,tp.sitepath
- {$row['addfieldsSql']}
- FROM `#@__archives` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id
- {$row['addfieldsSqlJoin']}
- WHERE arc.id IN({$row['arcids']}) {$row['ordersql']} $limitsql";
+ $query = "SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath
+ {$row['addfieldsSql']}
+ FROM `#@__archives` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id
+ {$row['addfieldsSqlJoin']}
+ WHERE arc.id IN({$row['arcids']}) {$row['ordersql']} $limitsql";
$dsql->SetQuery($query);
$dsql->Execute('al');
$dtp2 = new DedeTagParse();
@@ -39,7 +33,6 @@ if($tagid !='')
$dtp2->LoadString($row['innertext']);
$GLOBALS['autoindex'] = 0;
$ids = array();
-
for($i=0; $i<$line; $i++)
{
if($col>1) $artlist .= "
\r\n";
@@ -52,18 +45,14 @@ if($tagid !='')
//处理一些特殊字段
$row['info'] = $row['infos'] = cn_substr($row['description'],$infolen);
$row['id'] = $row['id'];
-
if($row['corank'] > 0 && $row['arcrank']==0)
{
$row['arcrank'] = $row['corank'];
}
-
$row['filename'] = $row['arcurl'] = GetFileUrl($row['id'],$row['typeid'],$row['senddate'],$row['title'],$row['ismake'],
$row['arcrank'],$row['namerule'],$row['typedir'],$row['money'],$row['filename'],$row['moresite'],$row['siteurl'],$row['sitepath']);
-
$row['typeurl'] = GetTypeUrl($row['typeid'],$row['typedir'],$row['isdefault'],$row['defaultname'],$row['ispart'],
$row['namerule2'],$row['moresite'],$row['siteurl'],$row['sitepath']);
-
if($row['litpic'] == '-' || $row['litpic'] == '')
{
$row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/web/img/defaultpic.jpg';
@@ -82,13 +71,10 @@ if($tagid !='')
if($row['color']!='') $row['title'] = "".$row['title']."";
if(preg_match('#b#', $row['flag'])) $row['title'] = "".$row['title']."";
//$row['title'] = "".$row['title']."";
-
$row['textlink'] = "".$row['title']."";
-
$row['plusurl'] = $row['phpurl'] = $GLOBALS['cfg_phpurl'];
$row['memberurl'] = $GLOBALS['cfg_memberurl'];
$row['templeturl'] = $GLOBALS['cfg_templeturl'];
-
if(is_array($dtp2->CTags))
{
foreach($dtp2->CTags as $k=>$ctag)
@@ -116,15 +102,13 @@ if($tagid !='')
}//loop line
if($col>1) $artlist .= " \r\n";
$dsql->FreeResult("al");
- } else
- {
+ } else {
//处理分页字段
$artlist .= '';
$artlist .= multipage($totalnum, $pnum, $row['pagesize'], $tagid);
$artlist .= '
';
}
}
-
AjaxHead();
echo $artlist;
exit();
\ No newline at end of file
diff --git a/src/apps/count.php b/src/apps/count.php
index 5f9c3665..ff4f9073 100755
--- a/src/apps/count.php
+++ b/src/apps/count.php
@@ -1,6 +1,5 @@
GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$cid' AND issystem='-1';");
@@ -32,7 +28,6 @@ if ($cid < 0) {
$idtype = 'aid';
}
$mid = (isset($mid) && is_numeric($mid)) ? $mid : 0;
-
//UpdateStat();
if (!empty($maintable)) {
$dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET click=click+1 WHERE {$idtype}='$aid' ");
@@ -56,4 +51,4 @@ if (!empty($view)) {
}
}
}
-exit();
+exit();
\ No newline at end of file
diff --git a/src/apps/digg_ajax.php b/src/apps/digg_ajax.php
index e6b57d93..848779f6 100755
--- a/src/apps/digg_ajax.php
+++ b/src/apps/digg_ajax.php
@@ -1,6 +1,5 @@
GetOne("SELECT goodpost,badpost,scores FROM `$maintable` WHERE $idtype='$id' ");
if ($cfg_digg_update == 0) {
@@ -66,8 +61,6 @@ if (!is_array($row) || $cfg_digg_update == 0) {
}
SetCache($prefix, $key, $row, 0);
}
-
-
$digg = '';
if (!is_array($row)) exit();
@@ -77,7 +70,6 @@ if ($row['goodpost'] + $row['badpost'] == 0) {
$row['goodper'] = number_format($row['goodpost'] / ($row['goodpost'] + $row['badpost']), 3) * 100;
$row['badper'] = 100 - $row['goodper'];
}
-
if (empty($formurl)) $formurl = '';
if ($formurl == 'caicai') {
if ($action == 'good') $digg = $row['goodpost'];
@@ -85,7 +77,6 @@ if ($formurl == 'caicai') {
} else {
$row['goodper'] = trim(sprintf("%4.2f", $row['goodper']));
$row['badper'] = trim(sprintf("%4.2f", $row['badper']));
-
if (!empty($format)) {
//输出JSON API的方式
$result = array(
@@ -120,4 +111,4 @@ if ($formurl == 'caicai') {
}
AjaxHead();
echo $digg;
-exit();
+exit();
\ No newline at end of file
diff --git a/src/apps/disdls.php b/src/apps/disdls.php
index 250cda38..7e26c973 100755
--- a/src/apps/disdls.php
+++ b/src/apps/disdls.php
@@ -1,6 +1,5 @@
GetOne("SELECT SUM(downloads) AS totals FROM `#@__downloads` WHERE id='$aid' ");
if (empty($row['totals'])) $row['totals'] = 0;
echo "document.write('{$row['totals']}');";
-exit();
+exit();
\ No newline at end of file
diff --git a/src/apps/diy.php b/src/apps/diy.php
index e6d3ea05..1ef29032 100755
--- a/src/apps/diy.php
+++ b/src/apps/diy.php
@@ -1,6 +1,5 @@
ExecuteNoneQuery($query);
if (!empty($format)) {
echo json_encode(array(
@@ -52,7 +48,6 @@ if ($dopost == "saveedit") {
} else {
ShowMsg("谢谢您对本网站的支持,我们会尽快处理您的建议", "javascript:window.close();");
}
-
exit();
} else {
echo json_encode(array(
@@ -61,4 +56,4 @@ if ($dopost == "saveedit") {
"msg" => "未知方法",
));
exit;
-}
+}
\ No newline at end of file
diff --git a/src/apps/feedback.php b/src/apps/feedback.php
index ea8edec7..0cd67275 100755
--- a/src/apps/feedback.php
+++ b/src/apps/feedback.php
@@ -1,6 +1,5 @@
ExecuteNoneQuery($query);
ShowMsg('成功增加一个链接,但需要审核后才能显示!', '-1', 1);
}
-
-//显示模板(简单PHP文件)
-include_once(DEDETEMPLATE.'/plus/flink-list.htm');
+//显示模板简单PHP文件
+include_once(DEDETEMPLATE.'/plus/flink-list.htm');
\ No newline at end of file
diff --git a/src/apps/flink_add.php b/src/apps/flink_add.php
index 77e82ef4..af7a57b2 100755
--- a/src/apps/flink_add.php
+++ b/src/apps/flink_add.php
@@ -1,6 +1,5 @@
$cfg_puccache_time) {
$pv = new PartView();
@@ -41,11 +38,6 @@ if (isset($nocache) || !file_exists($cacheFile) || time() - filemtime($cacheFile
$myvalues = str_replace("\n", "\\n", $myvalues);
$myvalues = "\r\n";
file_put_contents($cacheFile, $myvalues);
- /* 使用 file_put_contents替换下列代码提高执行效率
- $fp = fopen($cacheFile, 'w');
- fwrite($fp, $myvalues);
- fclose($fp);
- */
}
}
-include $cacheFile;
+include $cacheFile;
\ No newline at end of file
diff --git a/src/apps/qrcode.php b/src/apps/qrcode.php
index a1c820c0..408c552a 100755
--- a/src/apps/qrcode.php
+++ b/src/apps/qrcode.php
@@ -1,6 +1,5 @@
generate($params);
} else {
header("Content-Type: text/html; charset={$cfg_soft_lang}");
@@ -44,4 +38,4 @@ if ($action == 'get_qrcode') {
$dtp->SetVar('type', $type);
$dtp->Display();
exit();
-}
+}
\ No newline at end of file
diff --git a/src/apps/recommend.php b/src/apps/recommend.php
index 476ebd70..04763472 100755
--- a/src/apps/recommend.php
+++ b/src/apps/recommend.php
@@ -1,6 +1,5 @@
GetOne("SELECT arc.title,arc.senddate,arc.arcrank,arc.ismake,arc.money,arc.typeid,tp.topid,tp.typedir,tp.namerule,
- tp.moresite,tp.siteurl,tp.sitepath FROM `#@__archives` arc LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid WHERE arc.id='$aid'");
+$arcRow = $dsql->GetOne("SELECT arc.title,arc.senddate,arc.arcrank,arc.ismake,arc.money,arc.typeid,tp.topid,tp.typedir,tp.namerule,tp.moresite,tp.siteurl,tp.sitepath FROM `#@__archives` arc LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid WHERE arc.id='$aid'");
if (is_array($arcRow)) {
$arctitle = $arcRow['title'];
$topid = $arcRow['topid'];
@@ -79,4 +75,4 @@ if ($nextSrc != '') {
$pageGuide .= " | 没有了";
}
require_once(DEDETEMPLATE.'/plus/showphoto.htm');
-exit();
+exit();
\ No newline at end of file
diff --git a/src/apps/statistics.php b/src/apps/statistics.php
index eeeae3da..80e208c2 100644
--- a/src/apps/statistics.php
+++ b/src/apps/statistics.php
@@ -1,6 +1,5 @@
Record();
$result = array(
diff --git a/src/apps/stow.php b/src/apps/stow.php
index f6fcde85..db1cea1d 100755
--- a/src/apps/stow.php
+++ b/src/apps/stow.php
@@ -1,6 +1,5 @@
M_ID == 0) {
ShowMsg('只有会员才允许收藏操作', 'javascript:window.close();');
exit();
}
-
//读取文档信息
$arcRow = GetOneArchive($aid);
if ($arcRow['aid'] == '') {
@@ -48,9 +44,7 @@ if ($type == '') {
$dsql->ExecuteNoneQuery("INSERT INTO `#@__member_stow`(mid,aid,title,addtime,type) VALUES ('".$ml->M_ID."','$aid','$title','$addtime','$type'); ");
}
}
-
//更新用户统计
$row = $dsql->GetOne("SELECT COUNT(*) AS nums FROM `#@__member_stow` WHERE `mid`='{$ml->M_ID}' ");
$dsql->ExecuteNoneQuery("UPDATE `#@__member_tj` SET `stow`='{$row['nums']}' WHERE `mid`='".$ml->M_ID."'");
-
-ShowMsg('成功收藏一篇文档', 'javascript:window.close();');
+ShowMsg('成功收藏一篇文档', 'javascript:window.close();');
\ No newline at end of file
diff --git a/src/apps/tags.php b/src/apps/tags.php
index 6012294f..e44c9ecd 100755
--- a/src/apps/tags.php
+++ b/src/apps/tags.php
@@ -6,11 +6,9 @@
* @license https://www.dedebiz.com/license
* @link https://www.dedebiz.com
*/
-
require_once(dirname(__FILE__)."/../system/common.inc.php");
require_once(DEDEINC."/archive/taglist.class.php");
$PageNo = 1;
-
if (isset($_SERVER['QUERY_STRING'])) {
$tag = trim($_SERVER['QUERY_STRING']);
$tags = explode('/', $tag);
@@ -19,7 +17,6 @@ if (isset($_SERVER['QUERY_STRING'])) {
} else {
$tag = '';
}
-
$tag = FilterSearch(urldecode($tag));
if ($tag != addslashes($tag)) $tag = '';
if ($tag == '') $dlist = new TagList($tag, 'tag.htm');
diff --git a/src/apps/view.php b/src/apps/view.php
index 8580a306..61dc1c83 100755
--- a/src/apps/view.php
+++ b/src/apps/view.php
@@ -1,6 +1,5 @@
{$totalpage}页".$this->TotalResult."条\r\n";
$purl = $this->GetCurUrl();
- //如果开启为静态,则对规则进行替换
+ //如果开启为静态,则对规则进行替换
if ($cfg_rewrite == 'Y') {
$nowurls = preg_replace("/\-/", ".php?", $purl);
$nowurls = explode("?", $nowurls);
diff --git a/src/system/channelunit.func.php b/src/system/channelunit.func.php
index 073b264b..9f9dfc35 100755
--- a/src/system/channelunit.func.php
+++ b/src/system/channelunit.func.php
@@ -1,7 +1,7 @@
0) {
if ($cfg_rewrite == 'Y') {
//目录版return "/article/".$aid."";
@@ -215,7 +214,6 @@ if (!function_exists('GetTypeUrl')) {
//网页版
return $GLOBALS['cfg_cmspath']."/list-".$typeid."";
}
-
if($isdefault==-1) {
//动态
$reurl = $GLOBALS['cfg_phpurl']."/list.php?tid=".$typeid;