本文整理汇总了PHP中L::loadDB方法的典型用法代码示例。如果您正苦于以下问题:PHP L::loadDB方法的具体用法?PHP L::loadDB怎么用?PHP L::loadDB使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类L
的用法示例。
在下文中一共展示了L::loadDB方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_cardtopic
function get_cardtopic($uid, $num = 1)
{
require_once R_P . 'require/functions.php';
$_sql_where = '';
if ($notInFid = getSpecialFid()) {
$_sql_where = ' AND fid NOT IN(' . $notInFid . ')';
}
$rt = $this->_db->get_one("SELECT tid,subject,postdate FROM pw_threads WHERE authorid=" . S::sqlEscape($uid) . $_sql_where . ' ORDER BY tid DESC LIMIT 1');
if (empty($rt)) {
return array();
}
$pw_tmsgs = getTtable($rt['tid']);
$r2 = $this->_db->get_one("SELECT aid,content FROM {$pw_tmsgs} WHERE tid=" . S::sqlEscape($rt['tid']));
$rt['subject'] = substrs(stripWindCode($rt['subject']), 100, N);
$rt['content'] = substrs(stripWindCode($r2['content']), 100, N);
$rt['postdate_s'] = get_date($rt['postdate']);
if ($r2['aid']) {
$attachs = L::loadDB('attachs', 'forum');
$rt['attimages'] = array();
$atts = $attachs->getByTid($rt['tid'], 0, 4, 'img');
foreach ($atts as $key => $val) {
$a_url = geturl($val['attachurl'], 'show', $val['ifthumb']);
if ($a_url != 'nopic') {
$rt['attimages'][] = is_array($a_url) ? $a_url[0] : $a_url;
}
}
}
return $rt;
}
示例2: transfer
function transfer()
{
if (empty($this->flashatt)) {
return false;
}
global $timestamp, $winddb;
require_once R_P . 'require/functions.php';
$pw_attachs = L::loadDB('attachs', 'forum');
$saveAttach = $this->getSaveAttach($this->uid);
$deltmp = array();
$attach = $pw_attachs->gets(array('tid' => 0, 'pid' => 0, 'uid' => $this->uid, 'did' => 0, 'mid' => 0));
foreach ($attach as $rt) {
$deltmp[] = $rt['aid'];
if (!isset($this->flashatt[$rt['aid']])) {
pwDelatt($rt['attachurl'], $this->ifftp);
continue;
}
$saveAttach && $saveAttach->add($rt);
$value = $this->flashatt[$rt['aid']];
$rt['descrip'] = $value['desc'];
$this->attachs[] = array('id' => $rt['aid'], 'attname' => 'attachment', 'name' => $rt['name'], 'type' => $rt['type'], 'fileuploadurl' => $rt['attachurl'], 'size' => $rt['size'], 'descrip' => str_replace('\\', '', $rt['descrip']), 'ifthumb' => $rt['ifthumb']);
$winddb['uploadnum']++;
$winddb['uploadtime'] = $timestamp;
}
$saveAttach && $saveAttach->execute();
$deltmp && $pw_attachs->delete($deltmp);
return true;
}
示例3: transfer
function transfer()
{
if (empty($this->flashatt)) {
return false;
}
global $db_enhideset, $db_sellset, $db_ifpwcache, $timestamp;
require_once R_P . 'require/functions.php';
$pw_attachs = L::loadDB('attachs', 'forum');
$saveAttach = $this->getSaveAttach($this->uid);
$deltmp = array();
$attach = $pw_attachs->gets(array('tid' => 0, 'pid' => 0, 'uid' => $this->uid, 'did' => 0, 'mid' => 0));
foreach ($attach as $rt) {
if (!isset($this->flashatt[$rt['aid']])) {
pwDelatt($rt['attachurl'], $this->ifftp);
$deltmp[] = $rt['aid'];
continue;
}
$saveAttach && $saveAttach->add($rt);
$value = $this->flashatt[$rt['aid']];
$rt['descrip'] = $value['desc'];
$pw_attachs->updateById($rt['aid'], array('mid' => '1', 'descrip' => $rt['descrip']));
$this->attachs[$rt['aid']] = array('aid' => $rt['aid'], 'name' => $rt['name'], 'type' => $rt['type'], 'attachurl' => $rt['attachurl'], 'size' => $rt['size'], 'hits' => $rt['hits'], 'desc' => str_replace('\\', '', $rt['descrip']), 'ifthumb' => $rt['ifthumb']);
$this->fieldDatas[] = array('uid' => $this->uid, 'aid' => $rt['aid'], 'mid' => $this->mid, 'rid' => $this->rid, 'status' => 1);
}
$saveAttach && $saveAttach->execute();
$deltmp && $pw_attachs->delete($deltmp);
return true;
}
示例4: AttUpload
function AttUpload($uid, $flashatt = null, $savetoalbum = 0, $albumid = 0)
{
global $db, $pwforum, $pwpost, $db_ifathumb, $db_athumbsize, $db_uploadfiletype;
parent::uploadBehavior();
$this->pw_attachs = L::loadDB('attachs', 'forum');
$this->uid = $uid;
$this->db =& $db;
$this->forum =& $pwforum;
$this->post =& $pwpost;
if ($pwforum->forumset['ifthumb'] == 1) {
$this->ifthumb = 1;
$this->thumbsize = $pwforum->forumset['thumbsize'];
} elseif ($pwforum->forumset['ifthumb'] == 2) {
$this->ifthumb = 0;
$this->thumbsize = 0;
} else {
$this->ifthumb = $db_ifathumb;
$this->thumbsize = $db_athumbsize;
}
list($uploadcredit, $uploadmoney) = explode("\t", $pwforum->forumset['uploadset']);
$this->uploadmoney = $uploadmoney;
$this->uploadcredit = $uploadcredit;
$this->ftype =& $db_uploadfiletype;
$this->uploadImgNum = 0;
$this->uptype = 'all';
$this->setFlashAtt($flashatt, $savetoalbum, $albumid);
}
示例5: getPcvalueDao
function getPcvalueDao()
{
static $sPcvalueDao;
if (!$sPcvalueDao) {
$sPcvalueDao = L::loadDB('pcvalue', 'forum');
}
return $sPcvalueDao;
}
示例6: getDebateDao
function getDebateDao()
{
static $sDebateDao;
if (!$sDebateDao) {
$sDebateDao = L::loadDB('debate', 'forum');
}
return $sDebateDao;
}
示例7: _getWeiboContentsDataByMidsNoCache
/**
* 不通过缓存直接从数据库获取weibo content信息
*
* @param array $mids
* @return array
*/
function _getWeiboContentsDataByMidsNoCache($mids)
{
if (!S::isArray($mids)) {
return false;
}
$contentDao = L::loadDB('weibo_content', 'sns');
return $contentDao->getWeibosByMid($mids);
}
示例8: getForumsDao
function getForumsDao()
{
static $sForumsDao;
if (!$sForumsDao) {
$sForumsDao = L::loadDB('forums', 'forum');
}
return $sForumsDao;
}
示例9: getRewardDao
function getRewardDao()
{
static $sRewardDao;
if (!$sRewardDao) {
$sRewardDao = L::loadDB('reward', 'forum');
}
return $sRewardDao;
}
示例10: getDefaultBlockByStamp
function getDefaultBlockByStamp($stamp)
{
$stampdata = $this->getDataByStamp($stamp);
if ($stampdata['init']) {
$pw_block = L::loadDB('block');
return $pw_block->getData($stampdata['init']);
}
}
示例11: _getWeiboDao
/**
* @return PW_Weibo_ContentDB
*/
function _getWeiboDao()
{
static $sWeiboDao;
if (!$sWeiboDao) {
$sWeiboDao = L::loadDB('weibo_content', 'sns');
}
return $sWeiboDao;
}
示例12: _getDataByTags
/**
* 根据日志ID数组获得日志信息
* @return array
*/
function _getDataByTags()
{
if (empty($this->tags)) {
return array();
}
$diaryDB = L::loadDB('diary', 'diary');
$result = $diaryDB->getsByDids($this->tags);
return $result;
}
示例13: _getDataByTags
/**
* 根据日志ID数组获得日志信息
* @return array
*/
function _getDataByTags()
{
if (empty($this->tags)) {
return array();
}
$threadsDB = L::loadDB('threads', 'forum');
$result = $threadsDB->getsBythreadIds($this->tags);
return $result;
}
示例14: _getDataByTags
/**
* 根据日志ID数组获得日志信息
* @return array
*/
function _getDataByTags()
{
if (empty($this->tags)) {
return array();
}
$cnphotoDB = L::loadDB('cnphoto', 'colony');
$result = $cnphotoDB->getDataByPids($this->tags);
return $result;
}
示例15: _getDataByTags
/**
* 根据日志ID数组获得日志信息
* @return array
*/
function _getDataByTags()
{
if (empty($this->tags)) {
return array();
}
$cnphotoDB = L::loadDB('owritedata', 'sns');
$result = $cnphotoDB->getDataByIds($this->tags);
return $result;
}