include/helpers/archive.helper.php
(开头部分) 8KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php if(!defined('DEDEINC')) exit('dedecms');
/**
* 文档小助手
*
* @version $Id: archive.helper.php 2 23:00 2010年7月5日Z tianya $
* @package DedeCMS.Helpers
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc.
* @license http://help.dedecms.com/usersguide/license.html
* @link http://www.dedecms.com
*/
/**
* 获取单篇文档信息
*
* @param int $aid 文档id
* @return array
*/
if ( ! function_exists('GetOneArchive'))
{
function GetOneArchive($aid)
{
global $dsql;
include_once(DEDEINC."/channelunit.func.php");
$aid = trim(preg_replace('/[^0-9]/', '', $aid));
$reArr = array();
$chRow = $dsql->GetOne("SELECT arc.*,ch.maintable,ch.addtable,ch.issystem FROM `#@__arctiny` arc LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel WHERE arc.id='$aid' ");
if(!is_array($chRow)) {
return $reArr;
}
else {
if(empty($chRow['maintable'])) $chRow['maintable'] = '#@__archives';
}
if($chRow['issystem']!=-1)
{
$nquery = " SELECT arc.*,tp.typedir,tp.topid,tp.namerule,tp.moresite,tp.siteurl,tp.sitepath
FROM `{$chRow['maintable']}` arc LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid
WHERE arc.id='$aid' ";
}
else
{
$nquery = " SELECT arc.*,1 AS ismake,0 AS money,'' AS filename,tp.typedir,tp.topid,tp.namerule,tp.moresite,tp.siteurl,tp.sitepath
FROM `{$chRow['addtable']}` arc LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid
WHERE arc.aid='$aid' ";
}
$arcRow = $dsql->GetOne($nquery);
if(!is_array($arcRow)) {
return $reArr;
}
if(!isset($arcRow['description'])) {
$arcRow['description'] = '';
}
if(empty($arcRow['description']) && isset($arcRow['body'])) {
$arcRow['description'] = cn_substr(html2text($arcRow['body']), 250);
后面还有 234 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。