include/dedevote.class.php
(开头部分) 10KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php if(!defined('DEDEINC')) exit("Request Error!");
/**
* 投票类
*
* @version $Id: dedevote.class.php 1 10:31 2010年7月6日Z tianya $
* @package DedeCMS.Libraries
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc.
* @license http://help.dedecms.com/usersguide/license.html
* @link http://www.dedecms.com
*/
require_once(DEDEINC."/dedetag.class.php");
/**
* 投票类
*
* @package DedeVote
* @subpackage DedeCMS.Libraries
* @link http://www.dedecms.com
*/
class DedeVote
{
var $VoteInfos;
var $VoteNotes;
var $VoteCount;
var $VoteID;
var $dsql;
//php5构造函数
function __construct($aid)
{
$this->dsql = $GLOBALS['dsql'];
$this->VoteInfos = $this->dsql->GetOne("SELECT * FROM `#@__vote` WHERE aid='$aid'");
$this->VoteNotes = Array();
$this->VoteCount = 0;
$this->VoteID = $aid;
if(!is_array($this->VoteInfos))
{
return;
}
$dtp = new DedeTagParse();
$dtp->SetNameSpace("v", "<", ">");
$dtp->LoadSource($this->VoteInfos['votenote']);
if(is_array($dtp->CTags))
{
foreach($dtp->CTags as $ctag)
{
$this->VoteNotes[$ctag->GetAtt('id')]['count'] = $ctag->GetAtt('count');
$this->VoteNotes[$ctag->GetAtt('id')]['name'] = trim($ctag->GetInnerText());
$this->VoteCount++;
}
}
$dtp->Clear();
}
//兼容php4的构造函数
function DedeVote($aid)
{
$this->__construct($aid);
}
function Close()
后面还有 244 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。