当前位置: 首页>>代码示例>>PHP>>正文


PHP L::loadDB方法代码示例

本文整理汇总了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;
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:29,代码来源:usermodedata.class.php

示例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;
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:28,代码来源:articleupload.class.php

示例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;
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:28,代码来源:messageupload.class.php

示例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);
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:27,代码来源:attupload.class.php

示例5: getPcvalueDao

 function getPcvalueDao()
 {
     static $sPcvalueDao;
     if (!$sPcvalueDao) {
         $sPcvalueDao = L::loadDB('pcvalue', 'forum');
     }
     return $sPcvalueDao;
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:8,代码来源:pcvaluesource.class.php

示例6: getDebateDao

 function getDebateDao()
 {
     static $sDebateDao;
     if (!$sDebateDao) {
         $sDebateDao = L::loadDB('debate', 'forum');
     }
     return $sDebateDao;
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:8,代码来源:debatesource.class.php

示例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);
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:14,代码来源:pw_weibo_content.cache.php

示例8: getForumsDao

 function getForumsDao()
 {
     static $sForumsDao;
     if (!$sForumsDao) {
         $sForumsDao = L::loadDB('forums', 'forum');
     }
     return $sForumsDao;
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:8,代码来源:forums.class.php

示例9: getRewardDao

 function getRewardDao()
 {
     static $sRewardDao;
     if (!$sRewardDao) {
         $sRewardDao = L::loadDB('reward', 'forum');
     }
     return $sRewardDao;
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:8,代码来源:rewardsource.class.php

示例10: getDefaultBlockByStamp

 function getDefaultBlockByStamp($stamp)
 {
     $stampdata = $this->getDataByStamp($stamp);
     if ($stampdata['init']) {
         $pw_block = L::loadDB('block');
         return $pw_block->getData($stampdata['init']);
     }
 }
开发者ID:adi00,项目名称:wumaproject,代码行数:8,代码来源:stamp.db.php

示例11: _getWeiboDao

 /**
  * @return PW_Weibo_ContentDB
  */
 function _getWeiboDao()
 {
     static $sWeiboDao;
     if (!$sWeiboDao) {
         $sWeiboDao = L::loadDB('weibo_content', 'sns');
     }
     return $sWeiboDao;
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:11,代码来源:weibosearcher.extend.php

示例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;
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:13,代码来源:diaryanalyse.class.php

示例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;
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:13,代码来源:threadanalyse.class.php

示例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;
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:13,代码来源:photoanalyse.class.php

示例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;
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:13,代码来源:owriteanalyse.class.php


注:本文中的L::loadDB方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。