Browse Source

格式化

tags/6.1.8
xushubieli 2 years ago
parent
commit
fb6e1df3f3
29 changed files with 27 additions and 135 deletions
  1. +1
    -4
      src/apps/ad_js.php
  2. +1
    -12
      src/apps/advancedsearch.php
  3. +6
    -22
      src/apps/arcmulti.php
  4. +1
    -6
      src/apps/count.php
  5. +1
    -10
      src/apps/digg_ajax.php
  6. +1
    -2
      src/apps/disdls.php
  7. +0
    -1
      src/apps/diy.php
  8. +0
    -1
      src/apps/download.php
  9. +2
    -7
      src/apps/erraddsave.php
  10. +0
    -7
      src/apps/feedback.php
  11. +2
    -6
      src/apps/flink.php
  12. +1
    -2
      src/apps/flink_add.php
  13. +0
    -1
      src/apps/freelist.php
  14. +1
    -2
      src/apps/heightsearch.php
  15. +0
    -1
      src/apps/list.php
  16. +1
    -9
      src/apps/mytag_js.php
  17. +1
    -7
      src/apps/qrcode.php
  18. +1
    -5
      src/apps/recommend.php
  19. +0
    -1
      src/apps/rss.php
  20. +0
    -1
      src/apps/search.php
  21. +2
    -6
      src/apps/showphoto.php
  22. +0
    -3
      src/apps/statistics.php
  23. +1
    -7
      src/apps/stow.php
  24. +0
    -3
      src/apps/tags.php
  25. +0
    -1
      src/apps/view.php
  26. +0
    -2
      src/apps/vote.php
  27. +1
    -1
      src/system/archive/listview.class.php
  28. +1
    -1
      src/system/channelunit.func.php
  29. +2
    -4
      src/system/helpers/channelunit.helper.php

+ 1
- 4
src/apps/ad_js.php View File

@@ -1,6 +1,5 @@
<?php
/**
*
* 广告JS调用方式
*
* @version $Id: ad_js.php 1 20:30 2010年7月8日Z tianya $
@@ -10,11 +9,9 @@
* @link https://www.dedebiz.com
*/
require_once(dirname(__FILE__)."/../system/common.inc.php");
if (isset($arcID)) $aid = $arcID;
$arcID = $aid = (isset($aid) && is_numeric($aid)) ? $aid : 0;
if ($aid == 0) die('dedebiz');
$cacheFile = DEDEDATA.'/cache/myad-'.$aid.'.htm';
if (isset($nocache) || !file_exists($cacheFile) || time() - filemtime($cacheFile) > $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;

+ 1
- 12
src/apps/advancedsearch.php View File

@@ -1,6 +1,5 @@
<?php
/**
*
* 高级搜索
*
* @version $Id: advancedsearch.php 1 15:38 2010年7月8日Z tianya $
@@ -13,7 +12,6 @@ require_once(dirname(__FILE__)."/../system/common.inc.php");
require_once(DEDEINC."/datalistcp.class.php");
$timestamp = time();
@session_start();
//限制同时搜索数量
$timelock = DEDEDATA.'/time.lock';
if ($cfg_allsearch_limit < 1) {
@@ -28,12 +26,10 @@ if (file_exists($timelock)) {
@touch($timelock, $timestamp);
$mid = isset($mid) && is_numeric($mid) ? $mid : 0;
$sqlhash = isset($sqlhash) && preg_match("/^[A-Za-z0-9]+$/", $sqlhash) ? $sqlhash : '';
if ($mid == 0) {
showmsg('参数不正确,高级自定义搜索必须指定模型id', 'javascript');
exit();
}
$query = "SELECT maintable, mainfields, addontable, addonfields, template FROM `#@__advancedsearch` WHERE mid='$mid'";
$searchinfo = $dsql->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();

+ 6
- 22
src/apps/arcmulti.php View File

@@ -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 .= "<tr>\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'] = "<span style='color:".$row['color']."'>".$row['title']."</span>";
if(preg_match('#b#', $row['flag'])) $row['title'] = "".$row['title']."";
//$row['title'] = "".$row['title']."";
$row['textlink'] = "<a href='".$row['filename']."'>".$row['title']."</a>";
$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 .= " </table>\r\n";
$dsql->FreeResult("al");
} else
{
} else {
//处理分页字段
$artlist .= '<div id="page_'.$tagid.'">';
$artlist .= multipage($totalnum, $pnum, $row['pagesize'], $tagid);
$artlist .= '</div>';
}
}
AjaxHead();
echo $artlist;
exit();

+ 1
- 6
src/apps/count.php View File

@@ -1,6 +1,5 @@
<?php
/**
*
* 文档统计
*
* 如果想显示点击次数,请增加view参数,即把下面JS调用放到文档模板适当位置
@@ -16,15 +15,12 @@
*/
require_once(dirname(__FILE__)."/../system/common.inc.php");
if (isset($aid)) $arcID = $aid;
$cid = empty($cid) ? 1 : intval($cid);
$arcID = $aid = empty($arcID) ? 0 : intval($arcID);
$format = isset($format) ? $format : "";
$maintable = '#@__archives';
$idtype = 'id';
if ($aid == 0) exit();
//获得频道模型ID
if ($cid < 0) {
$row = $dsql->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();

+ 1
- 10
src/apps/digg_ajax.php View File

@@ -1,6 +1,5 @@
<?php
/**
*
* 文档digg处理ajax文件
*
* @version $Id: digg_ajax.php$
@@ -14,9 +13,7 @@ $action = isset($action) ? trim($action) : '';
$format = isset($format) ? $format : '';
$id = empty($id) ? 0 : intval($id);
$cid = empty($cid) ? 1 : intval($cid);
helper('cache');
if ($id < 1) {
exit();
}
@@ -28,11 +25,9 @@ if ($cid < 0) {
$maintable = empty($row['addtable']) ? '' : $row['addtable'];
$idtype = 'aid';
}
$prefix = 'diggCache';
$key = 'aid-'.$id;
$row = GetCache($prefix, $key);
if (!is_array($row) || $cfg_digg_update == 0) {
$row = $dsql->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();

+ 1
- 2
src/apps/disdls.php View File

@@ -1,6 +1,5 @@
<?php
/**
*
* 下载次数统计
*
* 如果想显示下载次数,即把下面JS调用放到文档模板适当位置
@@ -17,4 +16,4 @@ $aid = (isset($aid) && is_numeric($aid)) ? $aid : 0;
$row = $dsql->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();

+ 0
- 1
src/apps/diy.php View File

@@ -1,6 +1,5 @@
<?php
/**
*
* 自定义表单
*
* @version $Id: diy.php$


+ 0
- 1
src/apps/download.php View File

@@ -1,6 +1,5 @@
<?php
/**
*
* 下载
*
* @version $Id: download.php$


+ 2
- 7
src/apps/erraddsave.php View File

@@ -1,6 +1,5 @@
<?php
/**
*
* 错误提交
*
* @version $Id: erraddsave.php$
@@ -11,7 +10,6 @@
*/
require_once(dirname(__FILE__)."/../system/common.inc.php");
require_once(DEDEINC.'/memberlogin.class.php');
$dopost = isset($dopost) ? $dopost : "";
$aid = isset($aid) ? intval($aid) : 0;
if (empty($aid)) {
@@ -22,7 +20,6 @@ if (empty($aid)) {
));
exit;
}
if ($dopost == "saveedit") {
$cfg_ml = new MemberLogin();
$title = HtmlReplace($title);
@@ -39,10 +36,9 @@ if ($dopost == "saveedit") {
));
exit;
}
$time = time();
$query = "INSERT INTO `#@__erradd`(aid,mid,title,type,errtxt,oktxt,sendtime)
VALUES ('$aid','$mid','$title','$type','$err','$oktxt','$time'); ";
VALUES ('$aid','$mid','$title','$type','$err','$oktxt','$time'); ";
$dsql->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;
}
}

+ 0
- 7
src/apps/feedback.php View File

@@ -1,6 +1,5 @@
<?php
/**
*
* 评论
*
* @version $Id: feedback.php$
@@ -43,9 +42,6 @@ if (empty($aid) && empty($fid)) {
include_once(DEDEINC."/memberlogin.class.php");
$cfg_ml = new MemberLogin();
//查看评论
/*
function __ViewFeedback(){ }
*/
if ($action == '' || $action == 'show') {
//读取文档信息
$arcRow = GetOneArchive($aid);
@@ -83,9 +79,6 @@ if ($action == '' || $action == 'show') {
exit;
}
//发表评论
/*
function __SendFeedback(){ }
*/
else if ($action == 'send') {
//读取文档信息
$arcRow = GetOneArchive($aid);


+ 2
- 6
src/apps/flink.php View File

@@ -1,6 +1,5 @@
<?php
/**
*
* 友情链接
*
* @version $Id: flink.php$
@@ -11,8 +10,6 @@
*/
require_once(dirname(__FILE__)."/../system/common.inc.php");
if (empty($dopost)) $dopost = '';
if ($dopost == 'save') {
$validate = isset($validate) ? strtolower(trim($validate)) : '';
$svali = GetCkVdValue();
@@ -32,6 +29,5 @@ if ($dopost == 'save') {
$dsql->ExecuteNoneQuery($query);
ShowMsg('成功增加一个链接,但需要审核后才能显示!', '-1', 1);
}
//显示模板(简单PHP文件)
include_once(DEDETEMPLATE.'/plus/flink-list.htm');
//显示模板简单PHP文件
include_once(DEDETEMPLATE.'/plus/flink-list.htm');

+ 1
- 2
src/apps/flink_add.php View File

@@ -1,6 +1,5 @@
<?php
/**
*
* 增加友情链接
*
* @version $Id: flink_add.php$
@@ -11,4 +10,4 @@
*/
require_once(dirname(__FILE__).'/../system/common.inc.php');
//显示模板(简单PHP文件)
include_once(DEDETEMPLATE.'/plus/flink-add.htm');
include_once(DEDETEMPLATE.'/plus/flink-add.htm');

+ 0
- 1
src/apps/freelist.php View File

@@ -1,6 +1,5 @@
<?php
/**
*
* 自由列表
*
* @version $Id: freelist.php$


+ 1
- 2
src/apps/heightsearch.php View File

@@ -1,6 +1,5 @@
<?php
/**
*
* 高级搜索
*
* @version $Id: heightsearch.php$
@@ -11,4 +10,4 @@
*/
require_once(dirname(__FILE__).'/../system/common.inc.php');
require_once(DEDEINC.'/typelink/typelink.class.php');
require_once(DEDETEMPLATE.'/plus/heightsearch.htm');
require_once(DEDETEMPLATE.'/plus/heightsearch.htm');

+ 0
- 1
src/apps/list.php View File

@@ -1,6 +1,5 @@
<?php
/**
*
* 栏目列表/频道动态页
*
* @version $Id: list.php$


+ 1
- 9
src/apps/mytag_js.php View File

@@ -1,6 +1,5 @@
<?php
/**
*
* 自定义标签js调用方式
*
* @version $Id: mytag_js.php$
@@ -11,11 +10,9 @@
*/
require_once(dirname(__FILE__).'/../system/common.inc.php');
require_once(DEDEINC.'/archive/partview.class.php');
if (isset($arcID)) $aid = $arcID;
$arcID = $aid = (isset($aid) && is_numeric($aid)) ? $aid : 0;
if ($aid == 0) die(" document.write('Request Error!'); ");
$cacheFile = DEDEDATA.'/cache/mytag-'.$aid.'.htm';
if (isset($nocache) || !file_exists($cacheFile) || time() - filemtime($cacheFile) > $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\ndocument.write(\"{$myvalues}\");\r\n-->\r\n";
file_put_contents($cacheFile, $myvalues);
/* 使用 file_put_contents替换下列代码提高执行效率
$fp = fopen($cacheFile, 'w');
fwrite($fp, $myvalues);
fclose($fp);
*/
}
}
include $cacheFile;
include $cacheFile;

+ 1
- 7
src/apps/qrcode.php View File

@@ -1,6 +1,5 @@
<?php
/**
*
* 二维码生成
*
* @version $Id: qrcode.php$
@@ -10,15 +9,12 @@
* @link https://www.dedebiz.com
*/
$cfg_NotPrintHead = 'Y';
require_once(dirname(__FILE__).'/../system/common.inc.php');
require_once(DEDEINC.'/libraries/qrcode.class.php');
$action = isset($action) ? $action : '';
$type = isset($type) ? RemoveXSS(HtmlReplace($type, 3)) : '';
$id = (isset($id) && is_numeric($id)) ? $id : 0;
if (!in_array($type, array('list', 'arc', 'index'))) $url = "https://www.dedebiz.com";
if ($action == 'get_qrcode') {
if ($type == 'arc') {
$url = $cfg_basehost.$cfg_plus_dir.'/view.php?aid='.$id;
@@ -27,13 +23,11 @@ if ($action == 'get_qrcode') {
}
if ($id == 0) $url = "https://www.dedebiz.com";
if ($type == 'index') $url = $cfg_basehost.$cfg_plus_dir.'/index.php';
header("Content-Type: image/png");
$params = array();
$params['data'] = $url;
$params['size'] = 6;
$qrcode = new DedeQrcode;
$qrcode->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();
}
}

+ 1
- 5
src/apps/recommend.php View File

@@ -1,6 +1,5 @@
<?php
/**
*
* 信息推荐
*
* @version $Id: recommend.php$
@@ -16,12 +15,10 @@ unset($_FILES);
if (isset($arcID)) $aid = $arcID;
$arcID = $aid = (isset($aid) && is_numeric($aid) ? $aid : 0);
$type = (!isset($type) ? "" : $type);
if (empty($aid)) {
ShowMsg("文档ID不能为空!", "-1");
exit();
}
//读取文档信息
if ($action == '') {
//读取文档信息
@@ -32,7 +29,6 @@ if ($action == '') {
}
extract($arcRow, EXTR_OVERWRITE);
}
//发送推荐信息
else if ($action == 'send') {
if (!CheckEmail($email)) {
@@ -74,4 +70,4 @@ if ($arcRow['aid'] == '') {
}
extract($arcRow, EXTR_OVERWRITE);
//显示模板(简单PHP文件)
include(DEDETEMPLATE.'/plus/recommend.htm');
include(DEDETEMPLATE.'/plus/recommend.htm');

+ 0
- 1
src/apps/rss.php View File

@@ -1,6 +1,5 @@
<?php
/**
*
* RSS列表页
*
* @version $Id: rss.php$


+ 0
- 1
src/apps/search.php View File

@@ -1,6 +1,5 @@
<?php
/**
*
* 搜索页
*
* @version $Id: search.php$


+ 2
- 6
src/apps/showphoto.php View File

@@ -1,6 +1,5 @@
<?php
/**
*
* 显示图片
*
* @version $Id: showphoto.php$
@@ -11,17 +10,14 @@
*/
require_once(dirname(__FILE__)."/../system/common.inc.php");
require_once(DEDEINC."/channelunit.class.php");
if (isset($arcID)) $aid = $arcID;
$arcID = $aid = (isset($aid) && is_numeric($aid)) ? $aid : 0;
if ($aid == 0) die("dedebiz");
//读取文档信息
$arctitle = '';
$arcurl = '';
$topid = 0;
$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'");
$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();

+ 0
- 3
src/apps/statistics.php View File

@@ -1,6 +1,5 @@
<?php
/**
*
* 统计程序
*
* @version $Id: statistics.php$
@@ -11,10 +10,8 @@
*/
require_once(dirname(__FILE__)."/../system/common.inc.php");
require_once(DEDEINC."/libraries/statistics.class.php");

if (empty($dopost)) $dopost = '';
$stat = new DedeStatistics;

if ($dopost == "stat") {
$rs = $stat->Record();
$result = array(


+ 1
- 7
src/apps/stow.php View File

@@ -1,6 +1,5 @@
<?php
/**
*
* 收藏
*
* @version $Id: stow.php$
@@ -10,14 +9,12 @@
* @link https://www.dedebiz.com
*/
require_once(dirname(__FILE__)."/../system/common.inc.php");
$aid = (isset($aid) && is_numeric($aid)) ? $aid : 0;
$type = empty($type) ? "" : HtmlReplace($type, 1);
if ($aid == 0) {
ShowMsg('文档id不能为空!', 'javascript:window.close();');
exit();
}
require_once(DEDEINC."/memberlogin.class.php");
$ml = new MemberLogin();
@@ -25,7 +22,6 @@ if ($ml->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();');

+ 0
- 3
src/apps/tags.php View File

@@ -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');


+ 0
- 1
src/apps/view.php View File

@@ -1,6 +1,5 @@
<?php
/**
*
* 关于文章权限设置的说明
* 文章权限设置限制形式如下:
* 如果指定了会员等级,那么必须到达这个等级才能浏览


+ 0
- 2
src/apps/vote.php View File

@@ -1,6 +1,5 @@
<?php
/**
*
* 投票
*
* @version $Id: vote.php$
@@ -23,7 +22,6 @@ $ENV_GOBACK_URL = empty($_SERVER['HTTP_REFERER']) ? '' : $_SERVER['HTTP_REFERER'
if (empty($dopost)) $dopost = '';
$aid = (isset($aid) && is_numeric($aid)) ? $aid : 0;
if ($aid == 0) die("dedebiz");
if ($aid == 0) {
ShowMsg("没指定投票项目的ID", "-1");
exit();


+ 1
- 1
src/system/archive/listview.class.php View File

@@ -937,7 +937,7 @@ class ListView
}
$maininfo = "<li class='d-none d-sm-block page-item disabled'><span class='page-link'>{$totalpage}页".$this->TotalResult."条</span></li>\r\n";
$purl = $this->GetCurUrl();
//如果开启为静态,则对规则进行替换
//如果开启为静态则对规则进行替换
if ($cfg_rewrite == 'Y') {
$nowurls = preg_replace("/\-/", ".php?", $purl);
$nowurls = explode("?", $nowurls);


+ 1
- 1
src/system/channelunit.func.php View File

@@ -1,7 +1,7 @@
<?php
if (!defined('DEDEINC')) exit('dedebiz');
/**
* 栏目小助手,本文件仅做一个映射
* 栏目小助手本文件仅做一个映射
*
* @version $Id: channelunit.func.php 2 16:46 2010年7月6日Z tianya $
* @package DedeBIZ.Helpers


+ 2
- 4
src/system/helpers/channelunit.helper.php View File

@@ -140,15 +140,14 @@ if (!function_exists('GetFileName')) {
function GetFileName($aid, $typeid, $timetag, $title, $ismake = 0, $rank = 0, $namerule = '', $typedir = '', $money = 0, $filename = '')
{
global $cfg_rewrite, $cfg_cmspath, $cfg_arcdir, $cfg_special, $cfg_arc_dirname;
//没指定栏目时用固定规则(专题)
//没指定栏目时用固定专题规则
if (empty($namerule)) {
$namerule = $cfg_special.'/arc-{aid}.html';
$namerule = $cfg_special.'/{aid}.html';
$typeid = -1;
}
//伪静态文档,Nginx伪静态规则参考:
//rewrite ^/([0-9]+).html$ /apps/view.php?arcID=$1;
//rewrite ^/([0-9]+)-([0-9]+).html$ /apps/view.php?aid=$1&pageno=$2;
if ($rank != 0 || $ismake == -1 || $typeid == 0 || $money > 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;


Loading…
Cancel
Save