| @@ -1,6 +1,5 @@ | |||||
| <?php | <?php | ||||
| /** | /** | ||||
| * | |||||
| * 广告JS调用方式 | * 广告JS调用方式 | ||||
| * | * | ||||
| * @version $Id: ad_js.php 1 20:30 2010年7月8日Z tianya $ | * @version $Id: ad_js.php 1 20:30 2010年7月8日Z tianya $ | ||||
| @@ -10,11 +9,9 @@ | |||||
| * @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
| */ | */ | ||||
| require_once(dirname(__FILE__)."/../system/common.inc.php"); | require_once(dirname(__FILE__)."/../system/common.inc.php"); | ||||
| if (isset($arcID)) $aid = $arcID; | if (isset($arcID)) $aid = $arcID; | ||||
| $arcID = $aid = (isset($aid) && is_numeric($aid)) ? $aid : 0; | $arcID = $aid = (isset($aid) && is_numeric($aid)) ? $aid : 0; | ||||
| if ($aid == 0) die('dedebiz'); | if ($aid == 0) die('dedebiz'); | ||||
| $cacheFile = DEDEDATA.'/cache/myad-'.$aid.'.htm'; | $cacheFile = DEDEDATA.'/cache/myad-'.$aid.'.htm'; | ||||
| if (isset($nocache) || !file_exists($cacheFile) || time() - filemtime($cacheFile) > $cfg_puccache_time) { | if (isset($nocache) || !file_exists($cacheFile) || time() - filemtime($cacheFile) > $cfg_puccache_time) { | ||||
| $row = $dsql->GetOne("SELECT * FROM `#@__myad` WHERE aid='$aid' "); | $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); | fwrite($fp, $adbody); | ||||
| fclose($fp); | fclose($fp); | ||||
| } | } | ||||
| include $cacheFile; | |||||
| include $cacheFile; | |||||
| @@ -1,6 +1,5 @@ | |||||
| <?php | <?php | ||||
| /** | /** | ||||
| * | |||||
| * 高级搜索 | * 高级搜索 | ||||
| * | * | ||||
| * @version $Id: advancedsearch.php 1 15:38 2010年7月8日Z tianya $ | * @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"); | require_once(DEDEINC."/datalistcp.class.php"); | ||||
| $timestamp = time(); | $timestamp = time(); | ||||
| @session_start(); | @session_start(); | ||||
| //限制同时搜索数量 | //限制同时搜索数量 | ||||
| $timelock = DEDEDATA.'/time.lock'; | $timelock = DEDEDATA.'/time.lock'; | ||||
| if ($cfg_allsearch_limit < 1) { | if ($cfg_allsearch_limit < 1) { | ||||
| @@ -28,12 +26,10 @@ if (file_exists($timelock)) { | |||||
| @touch($timelock, $timestamp); | @touch($timelock, $timestamp); | ||||
| $mid = isset($mid) && is_numeric($mid) ? $mid : 0; | $mid = isset($mid) && is_numeric($mid) ? $mid : 0; | ||||
| $sqlhash = isset($sqlhash) && preg_match("/^[A-Za-z0-9]+$/", $sqlhash) ? $sqlhash : ''; | $sqlhash = isset($sqlhash) && preg_match("/^[A-Za-z0-9]+$/", $sqlhash) ? $sqlhash : ''; | ||||
| if ($mid == 0) { | if ($mid == 0) { | ||||
| showmsg('参数不正确,高级自定义搜索必须指定模型id', 'javascript'); | showmsg('参数不正确,高级自定义搜索必须指定模型id', 'javascript'); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| $query = "SELECT maintable, mainfields, addontable, addonfields, template FROM `#@__advancedsearch` WHERE mid='$mid'"; | $query = "SELECT maintable, mainfields, addontable, addonfields, template FROM `#@__advancedsearch` WHERE mid='$mid'"; | ||||
| $searchinfo = $dsql->GetOne($query); | $searchinfo = $dsql->GetOne($query); | ||||
| if (!is_array($searchinfo)) { | if (!is_array($searchinfo)) { | ||||
| @@ -42,7 +38,6 @@ if (!is_array($searchinfo)) { | |||||
| } | } | ||||
| $template = $searchinfo['template'] != '' ? $searchinfo['template'] : 'advancedsearch.htm'; | $template = $searchinfo['template'] != '' ? $searchinfo['template'] : 'advancedsearch.htm'; | ||||
| $sql = empty($_SESSION[$sqlhash]) ? '' : $_SESSION[$sqlhash]; | $sql = empty($_SESSION[$sqlhash]) ? '' : $_SESSION[$sqlhash]; | ||||
| if (empty($sql)) { | if (empty($sql)) { | ||||
| //主表字段处理 | //主表字段处理 | ||||
| $q = stripslashes($q); | $q = stripslashes($q); | ||||
| @@ -62,11 +57,9 @@ if (empty($sql)) { | |||||
| $enddate = isset($enddate) ? trim($enddate) : ''; | $enddate = isset($enddate) ? trim($enddate) : ''; | ||||
| if ($startdate != '') $starttime = strtotime($startdate); | if ($startdate != '') $starttime = strtotime($startdate); | ||||
| else $starttime = 0; | else $starttime = 0; | ||||
| if ($enddate != '') $endtime = strtotime($enddate); | if ($enddate != '') $endtime = strtotime($enddate); | ||||
| else $endtime = 0; | else $endtime = 0; | ||||
| $where = ' WHERE main.arcrank>-1 '; | $where = ' WHERE main.arcrank>-1 '; | ||||
| if ($q != '') $where .= " AND main.title LIKE '%$q%' "; | if ($q != '') $where .= " AND main.title LIKE '%$q%' "; | ||||
| if ($iscommend == 1) $where .= " AND FIND_IN_SET('c', main.flag)>0 "; | if ($iscommend == 1) $where .= " AND FIND_IN_SET('c', main.flag)>0 "; | ||||
| if (!empty($typeid)) { | if (!empty($typeid)) { | ||||
| @@ -100,7 +93,6 @@ if (empty($sql)) { | |||||
| $mainfieldsarr = explode(',', $mainfields); | $mainfieldsarr = explode(',', $mainfields); | ||||
| $addonfieldsarr = explode(',', $addonfields); | $addonfieldsarr = explode(',', $addonfields); | ||||
| array_pop($addonfieldsarr); //弹出 | array_pop($addonfieldsarr); //弹出 | ||||
| $intarr = array('int', 'float'); | $intarr = array('int', 'float'); | ||||
| $textarr = array('textdata', 'textchar', 'text', 'htmltext', 'multitext'); | $textarr = array('textdata', 'textchar', 'text', 'htmltext', 'multitext'); | ||||
| foreach ($addonfieldsarr as $addonfield) { | foreach ($addonfieldsarr as $addonfield) { | ||||
| @@ -185,12 +177,10 @@ if (empty($sql)) { | |||||
| $sql = urldecode($sql); | $sql = urldecode($sql); | ||||
| $query = $sql; | $query = $sql; | ||||
| } | } | ||||
| $sql = urlencode($sql); | $sql = urlencode($sql); | ||||
| //生成sql的唯一序列化字符串,并将sql语句记录到session中去 | //生成sql的唯一序列化字符串,并将sql语句记录到session中去 | ||||
| $sqlhash = md5($sql); | $sqlhash = md5($sql); | ||||
| $_SESSION[$sqlhash] = $sql; | $_SESSION[$sqlhash] = $sql; | ||||
| $dlist = new DataListCP(); | $dlist = new DataListCP(); | ||||
| $dlist->pageSize = 20; | $dlist->pageSize = 20; | ||||
| $dlist->SetParameter("hash", $sqlhash); | $dlist->SetParameter("hash", $sqlhash); | ||||
| @@ -203,10 +193,9 @@ if (file_exists(DEDEROOT."/theme/templets/$template")) { | |||||
| $dlist->SetTemplate($templatefile); | $dlist->SetTemplate($templatefile); | ||||
| $dlist->SetSource($query); | $dlist->SetSource($query); | ||||
| require_once(DEDEINC."/channelunit.class.php"); | require_once(DEDEINC."/channelunit.class.php"); | ||||
| //获得一个指定档案的链接 | //获得一个指定档案的链接 | ||||
| function GetArcUrl($aid, $typeid, $timetag, $title, $ismake = 0, $rank = 0, $namerule = '', $artdir = '', $money = 0) | 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); | return GetFileUrl($aid, $typeid, $timetag, $title, $ismake, $rank, $namerule, $artdir, $money); | ||||
| } | } | ||||
| $dlist->Display(); | |||||
| $dlist->Display(); | |||||
| @@ -2,13 +2,10 @@ | |||||
| require_once(dirname(__FILE__)."/../system/common.inc.php"); | require_once(dirname(__FILE__)."/../system/common.inc.php"); | ||||
| require_once(DEDEINC.'/channelunit.class.php'); | require_once(DEDEINC.'/channelunit.class.php'); | ||||
| require_once(DEDEINC.'/taglib/arcpagelist.lib.php'); | require_once(DEDEINC.'/taglib/arcpagelist.lib.php'); | ||||
| $mtype = empty($mtype)? 0 : intval(preg_replace("/[^\d]/",'', $mtype)); | $mtype = empty($mtype)? 0 : intval(preg_replace("/[^\d]/",'', $mtype)); | ||||
| $pnum = empty($pnum)? 0 : intval(preg_replace("/[^\d]/",'', $pnum)); | $pnum = empty($pnum)? 0 : intval(preg_replace("/[^\d]/",'', $pnum)); | ||||
| $tagid = empty($tagid)? '' : (preg_replace("/[^a-z0-9]/",'', $tagid)); | $tagid = empty($tagid)? '' : (preg_replace("/[^a-z0-9]/",'', $tagid)); | ||||
| if($tagid=='' || $pnum==0) die("dedebiz"); | if($tagid=='' || $pnum==0) die("dedebiz"); | ||||
| if($tagid !='') | if($tagid !='') | ||||
| { | { | ||||
| $row = $dsql->GetOne("SELECT * FROM `#@__arcmulti` WHERE tagid='$tagid'"); | $row = $dsql->GetOne("SELECT * FROM `#@__arcmulti` WHERE tagid='$tagid'"); | ||||
| @@ -17,21 +14,18 @@ if($tagid !='') | |||||
| //取出属性并解析为变量 | //取出属性并解析为变量 | ||||
| $attarray = unserialize($row['attstr']); | $attarray = unserialize($row['attstr']); | ||||
| extract($attarray, EXTR_SKIP); | extract($attarray, EXTR_SKIP); | ||||
| $artlist = ''; | $artlist = ''; | ||||
| //通过页面及总数解析当前页面数据范围 | //通过页面及总数解析当前页面数据范围 | ||||
| $strnum = ($pnum-1) * $row['pagesize']; | $strnum = ($pnum-1) * $row['pagesize']; | ||||
| $limitsql = " LIMIT $strnum,{$row['pagesize']} "; | $limitsql = " LIMIT $strnum,{$row['pagesize']} "; | ||||
| if($mtype == 0) | 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->SetQuery($query); | ||||
| $dsql->Execute('al'); | $dsql->Execute('al'); | ||||
| $dtp2 = new DedeTagParse(); | $dtp2 = new DedeTagParse(); | ||||
| @@ -39,7 +33,6 @@ if($tagid !='') | |||||
| $dtp2->LoadString($row['innertext']); | $dtp2->LoadString($row['innertext']); | ||||
| $GLOBALS['autoindex'] = 0; | $GLOBALS['autoindex'] = 0; | ||||
| $ids = array(); | $ids = array(); | ||||
| for($i=0; $i<$line; $i++) | for($i=0; $i<$line; $i++) | ||||
| { | { | ||||
| if($col>1) $artlist .= "<tr>\r\n"; | if($col>1) $artlist .= "<tr>\r\n"; | ||||
| @@ -52,18 +45,14 @@ if($tagid !='') | |||||
| //处理一些特殊字段 | //处理一些特殊字段 | ||||
| $row['info'] = $row['infos'] = cn_substr($row['description'],$infolen); | $row['info'] = $row['infos'] = cn_substr($row['description'],$infolen); | ||||
| $row['id'] = $row['id']; | $row['id'] = $row['id']; | ||||
| if($row['corank'] > 0 && $row['arcrank']==0) | if($row['corank'] > 0 && $row['arcrank']==0) | ||||
| { | { | ||||
| $row['arcrank'] = $row['corank']; | $row['arcrank'] = $row['corank']; | ||||
| } | } | ||||
| $row['filename'] = $row['arcurl'] = GetFileUrl($row['id'],$row['typeid'],$row['senddate'],$row['title'],$row['ismake'], | $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['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['typeurl'] = GetTypeUrl($row['typeid'],$row['typedir'],$row['isdefault'],$row['defaultname'],$row['ispart'], | ||||
| $row['namerule2'],$row['moresite'],$row['siteurl'],$row['sitepath']); | $row['namerule2'],$row['moresite'],$row['siteurl'],$row['sitepath']); | ||||
| if($row['litpic'] == '-' || $row['litpic'] == '') | if($row['litpic'] == '-' || $row['litpic'] == '') | ||||
| { | { | ||||
| $row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/web/img/defaultpic.jpg'; | $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($row['color']!='') $row['title'] = "<span style='color:".$row['color']."'>".$row['title']."</span>"; | ||||
| if(preg_match('#b#', $row['flag'])) $row['title'] = "".$row['title'].""; | if(preg_match('#b#', $row['flag'])) $row['title'] = "".$row['title'].""; | ||||
| //$row['title'] = "".$row['title'].""; | //$row['title'] = "".$row['title'].""; | ||||
| $row['textlink'] = "<a href='".$row['filename']."'>".$row['title']."</a>"; | $row['textlink'] = "<a href='".$row['filename']."'>".$row['title']."</a>"; | ||||
| $row['plusurl'] = $row['phpurl'] = $GLOBALS['cfg_phpurl']; | $row['plusurl'] = $row['phpurl'] = $GLOBALS['cfg_phpurl']; | ||||
| $row['memberurl'] = $GLOBALS['cfg_memberurl']; | $row['memberurl'] = $GLOBALS['cfg_memberurl']; | ||||
| $row['templeturl'] = $GLOBALS['cfg_templeturl']; | $row['templeturl'] = $GLOBALS['cfg_templeturl']; | ||||
| if(is_array($dtp2->CTags)) | if(is_array($dtp2->CTags)) | ||||
| { | { | ||||
| foreach($dtp2->CTags as $k=>$ctag) | foreach($dtp2->CTags as $k=>$ctag) | ||||
| @@ -116,15 +102,13 @@ if($tagid !='') | |||||
| }//loop line | }//loop line | ||||
| if($col>1) $artlist .= " </table>\r\n"; | if($col>1) $artlist .= " </table>\r\n"; | ||||
| $dsql->FreeResult("al"); | $dsql->FreeResult("al"); | ||||
| } else | |||||
| { | |||||
| } else { | |||||
| //处理分页字段 | //处理分页字段 | ||||
| $artlist .= '<div id="page_'.$tagid.'">'; | $artlist .= '<div id="page_'.$tagid.'">'; | ||||
| $artlist .= multipage($totalnum, $pnum, $row['pagesize'], $tagid); | $artlist .= multipage($totalnum, $pnum, $row['pagesize'], $tagid); | ||||
| $artlist .= '</div>'; | $artlist .= '</div>'; | ||||
| } | } | ||||
| } | } | ||||
| AjaxHead(); | AjaxHead(); | ||||
| echo $artlist; | echo $artlist; | ||||
| exit(); | exit(); | ||||
| @@ -1,6 +1,5 @@ | |||||
| <?php | <?php | ||||
| /** | /** | ||||
| * | |||||
| * 文档统计 | * 文档统计 | ||||
| * | * | ||||
| * 如果想显示点击次数,请增加view参数,即把下面JS调用放到文档模板适当位置 | * 如果想显示点击次数,请增加view参数,即把下面JS调用放到文档模板适当位置 | ||||
| @@ -16,15 +15,12 @@ | |||||
| */ | */ | ||||
| require_once(dirname(__FILE__)."/../system/common.inc.php"); | require_once(dirname(__FILE__)."/../system/common.inc.php"); | ||||
| if (isset($aid)) $arcID = $aid; | if (isset($aid)) $arcID = $aid; | ||||
| $cid = empty($cid) ? 1 : intval($cid); | $cid = empty($cid) ? 1 : intval($cid); | ||||
| $arcID = $aid = empty($arcID) ? 0 : intval($arcID); | $arcID = $aid = empty($arcID) ? 0 : intval($arcID); | ||||
| $format = isset($format) ? $format : ""; | $format = isset($format) ? $format : ""; | ||||
| $maintable = '#@__archives'; | $maintable = '#@__archives'; | ||||
| $idtype = 'id'; | $idtype = 'id'; | ||||
| if ($aid == 0) exit(); | if ($aid == 0) exit(); | ||||
| //获得频道模型ID | //获得频道模型ID | ||||
| if ($cid < 0) { | if ($cid < 0) { | ||||
| $row = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$cid' AND issystem='-1';"); | $row = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$cid' AND issystem='-1';"); | ||||
| @@ -32,7 +28,6 @@ if ($cid < 0) { | |||||
| $idtype = 'aid'; | $idtype = 'aid'; | ||||
| } | } | ||||
| $mid = (isset($mid) && is_numeric($mid)) ? $mid : 0; | $mid = (isset($mid) && is_numeric($mid)) ? $mid : 0; | ||||
| //UpdateStat(); | //UpdateStat(); | ||||
| if (!empty($maintable)) { | if (!empty($maintable)) { | ||||
| $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET click=click+1 WHERE {$idtype}='$aid' "); | $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET click=click+1 WHERE {$idtype}='$aid' "); | ||||
| @@ -56,4 +51,4 @@ if (!empty($view)) { | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| exit(); | |||||
| exit(); | |||||
| @@ -1,6 +1,5 @@ | |||||
| <?php | <?php | ||||
| /** | /** | ||||
| * | |||||
| * 文档digg处理ajax文件 | * 文档digg处理ajax文件 | ||||
| * | * | ||||
| * @version $Id: digg_ajax.php$ | * @version $Id: digg_ajax.php$ | ||||
| @@ -14,9 +13,7 @@ $action = isset($action) ? trim($action) : ''; | |||||
| $format = isset($format) ? $format : ''; | $format = isset($format) ? $format : ''; | ||||
| $id = empty($id) ? 0 : intval($id); | $id = empty($id) ? 0 : intval($id); | ||||
| $cid = empty($cid) ? 1 : intval($cid); | $cid = empty($cid) ? 1 : intval($cid); | ||||
| helper('cache'); | helper('cache'); | ||||
| if ($id < 1) { | if ($id < 1) { | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| @@ -28,11 +25,9 @@ if ($cid < 0) { | |||||
| $maintable = empty($row['addtable']) ? '' : $row['addtable']; | $maintable = empty($row['addtable']) ? '' : $row['addtable']; | ||||
| $idtype = 'aid'; | $idtype = 'aid'; | ||||
| } | } | ||||
| $prefix = 'diggCache'; | $prefix = 'diggCache'; | ||||
| $key = 'aid-'.$id; | $key = 'aid-'.$id; | ||||
| $row = GetCache($prefix, $key); | $row = GetCache($prefix, $key); | ||||
| if (!is_array($row) || $cfg_digg_update == 0) { | if (!is_array($row) || $cfg_digg_update == 0) { | ||||
| $row = $dsql->GetOne("SELECT goodpost,badpost,scores FROM `$maintable` WHERE $idtype='$id' "); | $row = $dsql->GetOne("SELECT goodpost,badpost,scores FROM `$maintable` WHERE $idtype='$id' "); | ||||
| if ($cfg_digg_update == 0) { | if ($cfg_digg_update == 0) { | ||||
| @@ -66,8 +61,6 @@ if (!is_array($row) || $cfg_digg_update == 0) { | |||||
| } | } | ||||
| SetCache($prefix, $key, $row, 0); | SetCache($prefix, $key, $row, 0); | ||||
| } | } | ||||
| $digg = ''; | $digg = ''; | ||||
| if (!is_array($row)) exit(); | 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['goodper'] = number_format($row['goodpost'] / ($row['goodpost'] + $row['badpost']), 3) * 100; | ||||
| $row['badper'] = 100 - $row['goodper']; | $row['badper'] = 100 - $row['goodper']; | ||||
| } | } | ||||
| if (empty($formurl)) $formurl = ''; | if (empty($formurl)) $formurl = ''; | ||||
| if ($formurl == 'caicai') { | if ($formurl == 'caicai') { | ||||
| if ($action == 'good') $digg = $row['goodpost']; | if ($action == 'good') $digg = $row['goodpost']; | ||||
| @@ -85,7 +77,6 @@ if ($formurl == 'caicai') { | |||||
| } else { | } else { | ||||
| $row['goodper'] = trim(sprintf("%4.2f", $row['goodper'])); | $row['goodper'] = trim(sprintf("%4.2f", $row['goodper'])); | ||||
| $row['badper'] = trim(sprintf("%4.2f", $row['badper'])); | $row['badper'] = trim(sprintf("%4.2f", $row['badper'])); | ||||
| if (!empty($format)) { | if (!empty($format)) { | ||||
| //输出JSON API的方式 | //输出JSON API的方式 | ||||
| $result = array( | $result = array( | ||||
| @@ -120,4 +111,4 @@ if ($formurl == 'caicai') { | |||||
| } | } | ||||
| AjaxHead(); | AjaxHead(); | ||||
| echo $digg; | echo $digg; | ||||
| exit(); | |||||
| exit(); | |||||
| @@ -1,6 +1,5 @@ | |||||
| <?php | <?php | ||||
| /** | /** | ||||
| * | |||||
| * 下载次数统计 | * 下载次数统计 | ||||
| * | * | ||||
| * 如果想显示下载次数,即把下面JS调用放到文档模板适当位置 | * 如果想显示下载次数,即把下面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' "); | $row = $dsql->GetOne("SELECT SUM(downloads) AS totals FROM `#@__downloads` WHERE id='$aid' "); | ||||
| if (empty($row['totals'])) $row['totals'] = 0; | if (empty($row['totals'])) $row['totals'] = 0; | ||||
| echo "document.write('{$row['totals']}');"; | echo "document.write('{$row['totals']}');"; | ||||
| exit(); | |||||
| exit(); | |||||
| @@ -1,6 +1,5 @@ | |||||
| <?php | <?php | ||||
| /** | /** | ||||
| * | |||||
| * 自定义表单 | * 自定义表单 | ||||
| * | * | ||||
| * @version $Id: diy.php$ | * @version $Id: diy.php$ | ||||
| @@ -1,6 +1,5 @@ | |||||
| <?php | <?php | ||||
| /** | /** | ||||
| * | |||||
| * 下载 | * 下载 | ||||
| * | * | ||||
| * @version $Id: download.php$ | * @version $Id: download.php$ | ||||
| @@ -1,6 +1,5 @@ | |||||
| <?php | <?php | ||||
| /** | /** | ||||
| * | |||||
| * 错误提交 | * 错误提交 | ||||
| * | * | ||||
| * @version $Id: erraddsave.php$ | * @version $Id: erraddsave.php$ | ||||
| @@ -11,7 +10,6 @@ | |||||
| */ | */ | ||||
| require_once(dirname(__FILE__)."/../system/common.inc.php"); | require_once(dirname(__FILE__)."/../system/common.inc.php"); | ||||
| require_once(DEDEINC.'/memberlogin.class.php'); | require_once(DEDEINC.'/memberlogin.class.php'); | ||||
| $dopost = isset($dopost) ? $dopost : ""; | $dopost = isset($dopost) ? $dopost : ""; | ||||
| $aid = isset($aid) ? intval($aid) : 0; | $aid = isset($aid) ? intval($aid) : 0; | ||||
| if (empty($aid)) { | if (empty($aid)) { | ||||
| @@ -22,7 +20,6 @@ if (empty($aid)) { | |||||
| )); | )); | ||||
| exit; | exit; | ||||
| } | } | ||||
| if ($dopost == "saveedit") { | if ($dopost == "saveedit") { | ||||
| $cfg_ml = new MemberLogin(); | $cfg_ml = new MemberLogin(); | ||||
| $title = HtmlReplace($title); | $title = HtmlReplace($title); | ||||
| @@ -39,10 +36,9 @@ if ($dopost == "saveedit") { | |||||
| )); | )); | ||||
| exit; | exit; | ||||
| } | } | ||||
| $time = time(); | $time = time(); | ||||
| $query = "INSERT INTO `#@__erradd`(aid,mid,title,type,errtxt,oktxt,sendtime) | $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); | $dsql->ExecuteNoneQuery($query); | ||||
| if (!empty($format)) { | if (!empty($format)) { | ||||
| echo json_encode(array( | echo json_encode(array( | ||||
| @@ -52,7 +48,6 @@ if ($dopost == "saveedit") { | |||||
| } else { | } else { | ||||
| ShowMsg("谢谢您对本网站的支持,我们会尽快处理您的建议", "javascript:window.close();"); | ShowMsg("谢谢您对本网站的支持,我们会尽快处理您的建议", "javascript:window.close();"); | ||||
| } | } | ||||
| exit(); | exit(); | ||||
| } else { | } else { | ||||
| echo json_encode(array( | echo json_encode(array( | ||||
| @@ -61,4 +56,4 @@ if ($dopost == "saveedit") { | |||||
| "msg" => "未知方法", | "msg" => "未知方法", | ||||
| )); | )); | ||||
| exit; | exit; | ||||
| } | |||||
| } | |||||
| @@ -1,6 +1,5 @@ | |||||
| <?php | <?php | ||||
| /** | /** | ||||
| * | |||||
| * 评论 | * 评论 | ||||
| * | * | ||||
| * @version $Id: feedback.php$ | * @version $Id: feedback.php$ | ||||
| @@ -43,9 +42,6 @@ if (empty($aid) && empty($fid)) { | |||||
| include_once(DEDEINC."/memberlogin.class.php"); | include_once(DEDEINC."/memberlogin.class.php"); | ||||
| $cfg_ml = new MemberLogin(); | $cfg_ml = new MemberLogin(); | ||||
| //查看评论 | //查看评论 | ||||
| /* | |||||
| function __ViewFeedback(){ } | |||||
| */ | |||||
| if ($action == '' || $action == 'show') { | if ($action == '' || $action == 'show') { | ||||
| //读取文档信息 | //读取文档信息 | ||||
| $arcRow = GetOneArchive($aid); | $arcRow = GetOneArchive($aid); | ||||
| @@ -83,9 +79,6 @@ if ($action == '' || $action == 'show') { | |||||
| exit; | exit; | ||||
| } | } | ||||
| //发表评论 | //发表评论 | ||||
| /* | |||||
| function __SendFeedback(){ } | |||||
| */ | |||||
| else if ($action == 'send') { | else if ($action == 'send') { | ||||
| //读取文档信息 | //读取文档信息 | ||||
| $arcRow = GetOneArchive($aid); | $arcRow = GetOneArchive($aid); | ||||
| @@ -1,6 +1,5 @@ | |||||
| <?php | <?php | ||||
| /** | /** | ||||
| * | |||||
| * 友情链接 | * 友情链接 | ||||
| * | * | ||||
| * @version $Id: flink.php$ | * @version $Id: flink.php$ | ||||
| @@ -11,8 +10,6 @@ | |||||
| */ | */ | ||||
| require_once(dirname(__FILE__)."/../system/common.inc.php"); | require_once(dirname(__FILE__)."/../system/common.inc.php"); | ||||
| if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
| if ($dopost == 'save') { | if ($dopost == 'save') { | ||||
| $validate = isset($validate) ? strtolower(trim($validate)) : ''; | $validate = isset($validate) ? strtolower(trim($validate)) : ''; | ||||
| $svali = GetCkVdValue(); | $svali = GetCkVdValue(); | ||||
| @@ -32,6 +29,5 @@ if ($dopost == 'save') { | |||||
| $dsql->ExecuteNoneQuery($query); | $dsql->ExecuteNoneQuery($query); | ||||
| ShowMsg('成功增加一个链接,但需要审核后才能显示!', '-1', 1); | ShowMsg('成功增加一个链接,但需要审核后才能显示!', '-1', 1); | ||||
| } | } | ||||
| //显示模板(简单PHP文件) | |||||
| include_once(DEDETEMPLATE.'/plus/flink-list.htm'); | |||||
| //显示模板简单PHP文件 | |||||
| include_once(DEDETEMPLATE.'/plus/flink-list.htm'); | |||||
| @@ -1,6 +1,5 @@ | |||||
| <?php | <?php | ||||
| /** | /** | ||||
| * | |||||
| * 增加友情链接 | * 增加友情链接 | ||||
| * | * | ||||
| * @version $Id: flink_add.php$ | * @version $Id: flink_add.php$ | ||||
| @@ -11,4 +10,4 @@ | |||||
| */ | */ | ||||
| require_once(dirname(__FILE__).'/../system/common.inc.php'); | require_once(dirname(__FILE__).'/../system/common.inc.php'); | ||||
| //显示模板(简单PHP文件) | //显示模板(简单PHP文件) | ||||
| include_once(DEDETEMPLATE.'/plus/flink-add.htm'); | |||||
| include_once(DEDETEMPLATE.'/plus/flink-add.htm'); | |||||
| @@ -1,6 +1,5 @@ | |||||
| <?php | <?php | ||||
| /** | /** | ||||
| * | |||||
| * 自由列表 | * 自由列表 | ||||
| * | * | ||||
| * @version $Id: freelist.php$ | * @version $Id: freelist.php$ | ||||
| @@ -1,6 +1,5 @@ | |||||
| <?php | <?php | ||||
| /** | /** | ||||
| * | |||||
| * 高级搜索 | * 高级搜索 | ||||
| * | * | ||||
| * @version $Id: heightsearch.php$ | * @version $Id: heightsearch.php$ | ||||
| @@ -11,4 +10,4 @@ | |||||
| */ | */ | ||||
| require_once(dirname(__FILE__).'/../system/common.inc.php'); | require_once(dirname(__FILE__).'/../system/common.inc.php'); | ||||
| require_once(DEDEINC.'/typelink/typelink.class.php'); | require_once(DEDEINC.'/typelink/typelink.class.php'); | ||||
| require_once(DEDETEMPLATE.'/plus/heightsearch.htm'); | |||||
| require_once(DEDETEMPLATE.'/plus/heightsearch.htm'); | |||||
| @@ -1,6 +1,5 @@ | |||||
| <?php | <?php | ||||
| /** | /** | ||||
| * | |||||
| * 栏目列表/频道动态页 | * 栏目列表/频道动态页 | ||||
| * | * | ||||
| * @version $Id: list.php$ | * @version $Id: list.php$ | ||||
| @@ -1,6 +1,5 @@ | |||||
| <?php | <?php | ||||
| /** | /** | ||||
| * | |||||
| * 自定义标签js调用方式 | * 自定义标签js调用方式 | ||||
| * | * | ||||
| * @version $Id: mytag_js.php$ | * @version $Id: mytag_js.php$ | ||||
| @@ -11,11 +10,9 @@ | |||||
| */ | */ | ||||
| require_once(dirname(__FILE__).'/../system/common.inc.php'); | require_once(dirname(__FILE__).'/../system/common.inc.php'); | ||||
| require_once(DEDEINC.'/archive/partview.class.php'); | require_once(DEDEINC.'/archive/partview.class.php'); | ||||
| if (isset($arcID)) $aid = $arcID; | if (isset($arcID)) $aid = $arcID; | ||||
| $arcID = $aid = (isset($aid) && is_numeric($aid)) ? $aid : 0; | $arcID = $aid = (isset($aid) && is_numeric($aid)) ? $aid : 0; | ||||
| if ($aid == 0) die(" document.write('Request Error!'); "); | if ($aid == 0) die(" document.write('Request Error!'); "); | ||||
| $cacheFile = DEDEDATA.'/cache/mytag-'.$aid.'.htm'; | $cacheFile = DEDEDATA.'/cache/mytag-'.$aid.'.htm'; | ||||
| if (isset($nocache) || !file_exists($cacheFile) || time() - filemtime($cacheFile) > $cfg_puccache_time) { | if (isset($nocache) || !file_exists($cacheFile) || time() - filemtime($cacheFile) > $cfg_puccache_time) { | ||||
| $pv = new PartView(); | $pv = new PartView(); | ||||
| @@ -41,11 +38,6 @@ if (isset($nocache) || !file_exists($cacheFile) || time() - filemtime($cacheFile | |||||
| $myvalues = str_replace("\n", "\\n", $myvalues); | $myvalues = str_replace("\n", "\\n", $myvalues); | ||||
| $myvalues = "<!--\r\ndocument.write(\"{$myvalues}\");\r\n-->\r\n"; | $myvalues = "<!--\r\ndocument.write(\"{$myvalues}\");\r\n-->\r\n"; | ||||
| file_put_contents($cacheFile, $myvalues); | file_put_contents($cacheFile, $myvalues); | ||||
| /* 使用 file_put_contents替换下列代码提高执行效率 | |||||
| $fp = fopen($cacheFile, 'w'); | |||||
| fwrite($fp, $myvalues); | |||||
| fclose($fp); | |||||
| */ | |||||
| } | } | ||||
| } | } | ||||
| include $cacheFile; | |||||
| include $cacheFile; | |||||
| @@ -1,6 +1,5 @@ | |||||
| <?php | <?php | ||||
| /** | /** | ||||
| * | |||||
| * 二维码生成 | * 二维码生成 | ||||
| * | * | ||||
| * @version $Id: qrcode.php$ | * @version $Id: qrcode.php$ | ||||
| @@ -10,15 +9,12 @@ | |||||
| * @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
| */ | */ | ||||
| $cfg_NotPrintHead = 'Y'; | $cfg_NotPrintHead = 'Y'; | ||||
| require_once(dirname(__FILE__).'/../system/common.inc.php'); | require_once(dirname(__FILE__).'/../system/common.inc.php'); | ||||
| require_once(DEDEINC.'/libraries/qrcode.class.php'); | require_once(DEDEINC.'/libraries/qrcode.class.php'); | ||||
| $action = isset($action) ? $action : ''; | $action = isset($action) ? $action : ''; | ||||
| $type = isset($type) ? RemoveXSS(HtmlReplace($type, 3)) : ''; | $type = isset($type) ? RemoveXSS(HtmlReplace($type, 3)) : ''; | ||||
| $id = (isset($id) && is_numeric($id)) ? $id : 0; | $id = (isset($id) && is_numeric($id)) ? $id : 0; | ||||
| if (!in_array($type, array('list', 'arc', 'index'))) $url = "https://www.dedebiz.com"; | if (!in_array($type, array('list', 'arc', 'index'))) $url = "https://www.dedebiz.com"; | ||||
| if ($action == 'get_qrcode') { | if ($action == 'get_qrcode') { | ||||
| if ($type == 'arc') { | if ($type == 'arc') { | ||||
| $url = $cfg_basehost.$cfg_plus_dir.'/view.php?aid='.$id; | $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 ($id == 0) $url = "https://www.dedebiz.com"; | ||||
| if ($type == 'index') $url = $cfg_basehost.$cfg_plus_dir.'/index.php'; | if ($type == 'index') $url = $cfg_basehost.$cfg_plus_dir.'/index.php'; | ||||
| header("Content-Type: image/png"); | header("Content-Type: image/png"); | ||||
| $params = array(); | $params = array(); | ||||
| $params['data'] = $url; | $params['data'] = $url; | ||||
| $params['size'] = 6; | $params['size'] = 6; | ||||
| $qrcode = new DedeQrcode; | $qrcode = new DedeQrcode; | ||||
| $qrcode->generate($params); | $qrcode->generate($params); | ||||
| } else { | } else { | ||||
| header("Content-Type: text/html; charset={$cfg_soft_lang}"); | header("Content-Type: text/html; charset={$cfg_soft_lang}"); | ||||
| @@ -44,4 +38,4 @@ if ($action == 'get_qrcode') { | |||||
| $dtp->SetVar('type', $type); | $dtp->SetVar('type', $type); | ||||
| $dtp->Display(); | $dtp->Display(); | ||||
| exit(); | exit(); | ||||
| } | |||||
| } | |||||
| @@ -1,6 +1,5 @@ | |||||
| <?php | <?php | ||||
| /** | /** | ||||
| * | |||||
| * 信息推荐 | * 信息推荐 | ||||
| * | * | ||||
| * @version $Id: recommend.php$ | * @version $Id: recommend.php$ | ||||
| @@ -16,12 +15,10 @@ unset($_FILES); | |||||
| if (isset($arcID)) $aid = $arcID; | if (isset($arcID)) $aid = $arcID; | ||||
| $arcID = $aid = (isset($aid) && is_numeric($aid) ? $aid : 0); | $arcID = $aid = (isset($aid) && is_numeric($aid) ? $aid : 0); | ||||
| $type = (!isset($type) ? "" : $type); | $type = (!isset($type) ? "" : $type); | ||||
| if (empty($aid)) { | if (empty($aid)) { | ||||
| ShowMsg("文档ID不能为空!", "-1"); | ShowMsg("文档ID不能为空!", "-1"); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| //读取文档信息 | //读取文档信息 | ||||
| if ($action == '') { | if ($action == '') { | ||||
| //读取文档信息 | //读取文档信息 | ||||
| @@ -32,7 +29,6 @@ if ($action == '') { | |||||
| } | } | ||||
| extract($arcRow, EXTR_OVERWRITE); | extract($arcRow, EXTR_OVERWRITE); | ||||
| } | } | ||||
| //发送推荐信息 | //发送推荐信息 | ||||
| else if ($action == 'send') { | else if ($action == 'send') { | ||||
| if (!CheckEmail($email)) { | if (!CheckEmail($email)) { | ||||
| @@ -74,4 +70,4 @@ if ($arcRow['aid'] == '') { | |||||
| } | } | ||||
| extract($arcRow, EXTR_OVERWRITE); | extract($arcRow, EXTR_OVERWRITE); | ||||
| //显示模板(简单PHP文件) | //显示模板(简单PHP文件) | ||||
| include(DEDETEMPLATE.'/plus/recommend.htm'); | |||||
| include(DEDETEMPLATE.'/plus/recommend.htm'); | |||||
| @@ -1,6 +1,5 @@ | |||||
| <?php | <?php | ||||
| /** | /** | ||||
| * | |||||
| * RSS列表页 | * RSS列表页 | ||||
| * | * | ||||
| * @version $Id: rss.php$ | * @version $Id: rss.php$ | ||||
| @@ -1,6 +1,5 @@ | |||||
| <?php | <?php | ||||
| /** | /** | ||||
| * | |||||
| * 搜索页 | * 搜索页 | ||||
| * | * | ||||
| * @version $Id: search.php$ | * @version $Id: search.php$ | ||||
| @@ -1,6 +1,5 @@ | |||||
| <?php | <?php | ||||
| /** | /** | ||||
| * | |||||
| * 显示图片 | * 显示图片 | ||||
| * | * | ||||
| * @version $Id: showphoto.php$ | * @version $Id: showphoto.php$ | ||||
| @@ -11,17 +10,14 @@ | |||||
| */ | */ | ||||
| require_once(dirname(__FILE__)."/../system/common.inc.php"); | require_once(dirname(__FILE__)."/../system/common.inc.php"); | ||||
| require_once(DEDEINC."/channelunit.class.php"); | require_once(DEDEINC."/channelunit.class.php"); | ||||
| if (isset($arcID)) $aid = $arcID; | if (isset($arcID)) $aid = $arcID; | ||||
| $arcID = $aid = (isset($aid) && is_numeric($aid)) ? $aid : 0; | $arcID = $aid = (isset($aid) && is_numeric($aid)) ? $aid : 0; | ||||
| if ($aid == 0) die("dedebiz"); | if ($aid == 0) die("dedebiz"); | ||||
| //读取文档信息 | //读取文档信息 | ||||
| $arctitle = ''; | $arctitle = ''; | ||||
| $arcurl = ''; | $arcurl = ''; | ||||
| $topid = 0; | $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)) { | if (is_array($arcRow)) { | ||||
| $arctitle = $arcRow['title']; | $arctitle = $arcRow['title']; | ||||
| $topid = $arcRow['topid']; | $topid = $arcRow['topid']; | ||||
| @@ -79,4 +75,4 @@ if ($nextSrc != '') { | |||||
| $pageGuide .= " | 没有了"; | $pageGuide .= " | 没有了"; | ||||
| } | } | ||||
| require_once(DEDETEMPLATE.'/plus/showphoto.htm'); | require_once(DEDETEMPLATE.'/plus/showphoto.htm'); | ||||
| exit(); | |||||
| exit(); | |||||
| @@ -1,6 +1,5 @@ | |||||
| <?php | <?php | ||||
| /** | /** | ||||
| * | |||||
| * 统计程序 | * 统计程序 | ||||
| * | * | ||||
| * @version $Id: statistics.php$ | * @version $Id: statistics.php$ | ||||
| @@ -11,10 +10,8 @@ | |||||
| */ | */ | ||||
| require_once(dirname(__FILE__)."/../system/common.inc.php"); | require_once(dirname(__FILE__)."/../system/common.inc.php"); | ||||
| require_once(DEDEINC."/libraries/statistics.class.php"); | require_once(DEDEINC."/libraries/statistics.class.php"); | ||||
| if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
| $stat = new DedeStatistics; | $stat = new DedeStatistics; | ||||
| if ($dopost == "stat") { | if ($dopost == "stat") { | ||||
| $rs = $stat->Record(); | $rs = $stat->Record(); | ||||
| $result = array( | $result = array( | ||||
| @@ -1,6 +1,5 @@ | |||||
| <?php | <?php | ||||
| /** | /** | ||||
| * | |||||
| * 收藏 | * 收藏 | ||||
| * | * | ||||
| * @version $Id: stow.php$ | * @version $Id: stow.php$ | ||||
| @@ -10,14 +9,12 @@ | |||||
| * @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
| */ | */ | ||||
| require_once(dirname(__FILE__)."/../system/common.inc.php"); | require_once(dirname(__FILE__)."/../system/common.inc.php"); | ||||
| $aid = (isset($aid) && is_numeric($aid)) ? $aid : 0; | $aid = (isset($aid) && is_numeric($aid)) ? $aid : 0; | ||||
| $type = empty($type) ? "" : HtmlReplace($type, 1); | $type = empty($type) ? "" : HtmlReplace($type, 1); | ||||
| if ($aid == 0) { | if ($aid == 0) { | ||||
| ShowMsg('文档id不能为空!', 'javascript:window.close();'); | ShowMsg('文档id不能为空!', 'javascript:window.close();'); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| require_once(DEDEINC."/memberlogin.class.php"); | require_once(DEDEINC."/memberlogin.class.php"); | ||||
| $ml = new MemberLogin(); | $ml = new MemberLogin(); | ||||
| @@ -25,7 +22,6 @@ if ($ml->M_ID == 0) { | |||||
| ShowMsg('只有会员才允许收藏操作', 'javascript:window.close();'); | ShowMsg('只有会员才允许收藏操作', 'javascript:window.close();'); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| //读取文档信息 | //读取文档信息 | ||||
| $arcRow = GetOneArchive($aid); | $arcRow = GetOneArchive($aid); | ||||
| if ($arcRow['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'); "); | $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}' "); | $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."'"); | $dsql->ExecuteNoneQuery("UPDATE `#@__member_tj` SET `stow`='{$row['nums']}' WHERE `mid`='".$ml->M_ID."'"); | ||||
| ShowMsg('成功收藏一篇文档', 'javascript:window.close();'); | |||||
| ShowMsg('成功收藏一篇文档', 'javascript:window.close();'); | |||||
| @@ -6,11 +6,9 @@ | |||||
| * @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
| * @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
| */ | */ | ||||
| require_once(dirname(__FILE__)."/../system/common.inc.php"); | require_once(dirname(__FILE__)."/../system/common.inc.php"); | ||||
| require_once(DEDEINC."/archive/taglist.class.php"); | require_once(DEDEINC."/archive/taglist.class.php"); | ||||
| $PageNo = 1; | $PageNo = 1; | ||||
| if (isset($_SERVER['QUERY_STRING'])) { | if (isset($_SERVER['QUERY_STRING'])) { | ||||
| $tag = trim($_SERVER['QUERY_STRING']); | $tag = trim($_SERVER['QUERY_STRING']); | ||||
| $tags = explode('/', $tag); | $tags = explode('/', $tag); | ||||
| @@ -19,7 +17,6 @@ if (isset($_SERVER['QUERY_STRING'])) { | |||||
| } else { | } else { | ||||
| $tag = ''; | $tag = ''; | ||||
| } | } | ||||
| $tag = FilterSearch(urldecode($tag)); | $tag = FilterSearch(urldecode($tag)); | ||||
| if ($tag != addslashes($tag)) $tag = ''; | if ($tag != addslashes($tag)) $tag = ''; | ||||
| if ($tag == '') $dlist = new TagList($tag, 'tag.htm'); | if ($tag == '') $dlist = new TagList($tag, 'tag.htm'); | ||||
| @@ -1,6 +1,5 @@ | |||||
| <?php | <?php | ||||
| /** | /** | ||||
| * | |||||
| * 关于文章权限设置的说明 | * 关于文章权限设置的说明 | ||||
| * 文章权限设置限制形式如下: | * 文章权限设置限制形式如下: | ||||
| * 如果指定了会员等级,那么必须到达这个等级才能浏览 | * 如果指定了会员等级,那么必须到达这个等级才能浏览 | ||||
| @@ -1,6 +1,5 @@ | |||||
| <?php | <?php | ||||
| /** | /** | ||||
| * | |||||
| * 投票 | * 投票 | ||||
| * | * | ||||
| * @version $Id: vote.php$ | * @version $Id: vote.php$ | ||||
| @@ -23,7 +22,6 @@ $ENV_GOBACK_URL = empty($_SERVER['HTTP_REFERER']) ? '' : $_SERVER['HTTP_REFERER' | |||||
| if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
| $aid = (isset($aid) && is_numeric($aid)) ? $aid : 0; | $aid = (isset($aid) && is_numeric($aid)) ? $aid : 0; | ||||
| if ($aid == 0) die("dedebiz"); | if ($aid == 0) die("dedebiz"); | ||||
| if ($aid == 0) { | if ($aid == 0) { | ||||
| ShowMsg("没指定投票项目的ID", "-1"); | ShowMsg("没指定投票项目的ID", "-1"); | ||||
| exit(); | exit(); | ||||
| @@ -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"; | $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(); | $purl = $this->GetCurUrl(); | ||||
| //如果开启为静态,则对规则进行替换 | |||||
| //如果开启为静态,则对规则进行替换 | |||||
| if ($cfg_rewrite == 'Y') { | if ($cfg_rewrite == 'Y') { | ||||
| $nowurls = preg_replace("/\-/", ".php?", $purl); | $nowurls = preg_replace("/\-/", ".php?", $purl); | ||||
| $nowurls = explode("?", $nowurls); | $nowurls = explode("?", $nowurls); | ||||
| @@ -1,7 +1,7 @@ | |||||
| <?php | <?php | ||||
| if (!defined('DEDEINC')) exit('dedebiz'); | if (!defined('DEDEINC')) exit('dedebiz'); | ||||
| /** | /** | ||||
| * 栏目小助手,本文件仅做一个映射 | |||||
| * 栏目小助手,本文件仅做一个映射 | |||||
| * | * | ||||
| * @version $Id: channelunit.func.php 2 16:46 2010年7月6日Z tianya $ | * @version $Id: channelunit.func.php 2 16:46 2010年7月6日Z tianya $ | ||||
| * @package DedeBIZ.Helpers | * @package DedeBIZ.Helpers | ||||
| @@ -140,15 +140,14 @@ if (!function_exists('GetFileName')) { | |||||
| function GetFileName($aid, $typeid, $timetag, $title, $ismake = 0, $rank = 0, $namerule = '', $typedir = '', $money = 0, $filename = '') | 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; | global $cfg_rewrite, $cfg_cmspath, $cfg_arcdir, $cfg_special, $cfg_arc_dirname; | ||||
| //没指定栏目时用固定规则(专题) | |||||
| //没指定栏目时用固定专题规则 | |||||
| if (empty($namerule)) { | if (empty($namerule)) { | ||||
| $namerule = $cfg_special.'/arc-{aid}.html'; | |||||
| $namerule = $cfg_special.'/{aid}.html'; | |||||
| $typeid = -1; | $typeid = -1; | ||||
| } | } | ||||
| //伪静态文档,Nginx伪静态规则参考: | //伪静态文档,Nginx伪静态规则参考: | ||||
| //rewrite ^/([0-9]+).html$ /apps/view.php?arcID=$1; | //rewrite ^/([0-9]+).html$ /apps/view.php?arcID=$1; | ||||
| //rewrite ^/([0-9]+)-([0-9]+).html$ /apps/view.php?aid=$1&pageno=$2; | //rewrite ^/([0-9]+)-([0-9]+).html$ /apps/view.php?aid=$1&pageno=$2; | ||||
| if ($rank != 0 || $ismake == -1 || $typeid == 0 || $money > 0) { | if ($rank != 0 || $ismake == -1 || $typeid == 0 || $money > 0) { | ||||
| if ($cfg_rewrite == 'Y') { | if ($cfg_rewrite == 'Y') { | ||||
| //目录版return "/article/".$aid.""; | //目录版return "/article/".$aid.""; | ||||
| @@ -215,7 +214,6 @@ if (!function_exists('GetTypeUrl')) { | |||||
| //网页版 | //网页版 | ||||
| return $GLOBALS['cfg_cmspath']."/list-".$typeid.""; | return $GLOBALS['cfg_cmspath']."/list-".$typeid.""; | ||||
| } | } | ||||
| if($isdefault==-1) { | if($isdefault==-1) { | ||||
| //动态 | //动态 | ||||
| $reurl = $GLOBALS['cfg_phpurl']."/list.php?tid=".$typeid; | $reurl = $GLOBALS['cfg_phpurl']."/list.php?tid=".$typeid; | ||||