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


PHP Pw::getPath方法代码示例

本文整理汇总了PHP中Pw::getPath方法的典型用法代码示例。如果您正苦于以下问题:PHP Pw::getPath方法的具体用法?PHP Pw::getPath怎么用?PHP Pw::getPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Pw的用法示例。


在下文中一共展示了Pw::getPath方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getData

 protected function getData($field, $order, $limit, $offset)
 {
     Wind::import('SRV:tag.vo.PwTagSo');
     $so = new PwTagSo();
     $field['tag_ids'] && $so->setTagId(explode(' ', $field['tag_ids']));
     $field['category_id'] && $so->setCategoryId($field['category_id']);
     $so->setIflogo($field['islogo']);
     $so->setIfhot(1);
     switch ($field['order']) {
         case 0:
             $so->orderbyCreatedTime();
             break;
         case 1:
             $so->orderbyAttentionCount();
             break;
         case 2:
             $so->orderbyContentCount();
             break;
     }
     $list = Wekit::load('tag.PwTagSearch')->searchTag($so, $limit, $offset);
     if (!$list) {
         return array();
     }
     foreach ($list as $k => $v) {
         $list[$k]['tagid'] = $v['tag_id'];
         $list[$k]['tag_name'] = $this->_formatTitle($v['tag_name']);
         $list[$k]['url'] = WindUrlHelper::createUrl('tag/index/view', array('name' => $v['tag_name']), '', 'pw');
         $list[$k]['logo'] = Pw::getPath($v['tag_logo']);
         $list[$k]['attention_count'] = $v['attention_count'];
         $list[$k]['content_count'] = $v['content_count'];
         $list[$k]['excerpt'] = $v['excerpt'];
         $list[$k]['thumb_attach'] = $v['tag_logo'] ? $v['tag_logo'] : '';
     }
     return $list;
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:35,代码来源:PwDesignTagDataService.php

示例2: _buildSignKey

 private function _buildSignKey($list)
 {
     $_username = array();
     $_tids = array();
     foreach ($list as $k => $v) {
         $_tids[] = $v['lastpost_tid'];
     }
     $thread = $this->_getThread($_tids);
     foreach ($list as $k => $v) {
         $list[$k]['name'] = $this->_filterForumHtml($v['name']);
         if ($v['type'] == 'category') {
             $list[$k]['forum_url'] = WindUrlHelper::createUrl('bbs/cate/run', array('fid' => $v['fid']), '', 'pw');
         } else {
             $list[$k]['forum_url'] = WindUrlHelper::createUrl('bbs/thread/run', array('fid' => $v['fid']), '', 'pw');
         }
         $list[$k]['descrip'] = $this->_formatDes($v['descrip']);
         $list[$k]['logo'] = $v['logo'] ? Pw::getPath($v['logo']) : '';
         $lastthread = $thread[$v['lastpost_tid']];
         $list[$k]['lastpost_time'] = $this->_formatTime($lastthread['lastpost_time']);
         $list[$k]['lastpost_smallavatar'] = $lastthread['lastpost_userid'] ? Pw::getAvatar($lastthread['lastpost_userid'], 'small') : '';
         $list[$k]['lastpost_middleavatar'] = $lastthread['lastpost_userid'] ? Pw::getAvatar($lastthread['lastpost_userid'], 'middle') : '';
         $list[$k]['lastpost_userid'] = $lastthread['lastpost_userid'];
         $list[$k]['lastpost_username'] = $lastthread['lastpost_username'];
         $list[$k]['lastpost_space'] = $lastthread['lastpost_userid'] ? WindUrlHelper::createUrl('space/index/run', array('uid' => $lastthread['lastpost_userid']), '', 'pw') : '';
         $list[$k]['lastthread_space'] = $lastthread['created_userid'] ? WindUrlHelper::createUrl('space/index/run', array('uid' => $lastthread['created_userid']), '', 'pw') : '';
         $list[$k]['lastthread_smallavatar'] = $lastthread['created_userid'] ? Pw::getAvatar($lastthread['created_userid'], 'small') : '';
         $list[$k]['lastthread_middleavatar'] = $lastthread['created_userid'] ? Pw::getAvatar($lastthread['created_userid'], 'middle') : '';
         $list[$k]['lastthread_username'] = $lastthread['created_username'];
         $list[$k]['lastthread_time'] = $this->_formatTime($lastthread['created_time']);
         $list[$k]['lastthread'] = $this->_formatTitle($lastthread['subject']);
     }
     return $list;
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:33,代码来源:PwDesignForumDataService.php

示例3: setStoragesAction

 public function setStoragesAction()
 {
     $storage = $this->getInput('storage', 'post');
     $attService = Wekit::load('LIB:storage.PwStorage');
     $_r = $attService->setStoragesComponents($storage);
     if ($_r !== true) {
         $this->output(0);
     }
     $config = new PwConfigSet('attachment');
     $config->set('storage.type', $storage)->flush();
     $components = Wekit::C()->get('components')->toArray();
     Wind::getApp()->getFactory()->loadClassDefinitions($components);
     Wekit::C()->setConfig('site', 'avatarUrl', substr(Pw::getPath('1.gpg'), 0, -6));
     $this->_getNotifyService()->send('alterAvatarUrl', array(), $this->appid);
     $this->output(1);
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:16,代码来源:AvatarController.php

示例4: dostroageAction

 /**
  * 附件存储方式设置列表页
  */
 public function dostroageAction()
 {
     $att_storage = $this->getInput('att_storage', 'post');
     $avatarurl = $this->getInput('avatarurl', 'post');
     $attService = Wekit::load('LIB:storage.PwStorage');
     $_r = $attService->setStoragesComponents($att_storage);
     if ($_r !== true) {
         $this->showError($_r->getError());
     }
     $config = new PwConfigSet('attachment');
     $config->set('storage.type', $att_storage)->flush();
     $components = Wekit::C()->get('components')->toArray();
     Wind::getApp()->getFactory()->loadClassDefinitions($components);
     Wekit::C()->setConfig('site', 'avatarUrl', substr(Pw::getPath('1.gpg'), 0, -6));
     Wekit::load('WSRV:notify.srv.WindidNotifyService')->send('alterAvatarUrl', array());
     $this->showMessage('WINDID:success');
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:20,代码来源:StorageController.php

示例5: getThreadImgs

 public function getThreadImgs($tid)
 {
     $tid = intval($tid);
     if ($tid < 1) {
         return $this->buildResponse(THREAD_INVALID_PARAMS);
     }
     $_attaches = $this->_getThreadAttach()->getAttachByTid($tid, 0);
     $attaches = array();
     foreach ($_attaches as $v) {
         if ($v['type'] != 'img') {
             continue;
         }
         $attaches['img'][] = array('url' => Pw::getPath($v['path']));
     }
     $attaches['count'] = count($attaches['img']);
     return $this->buildResponse(0, $attaches);
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:17,代码来源:ACloudVerCommonThread.php

示例6: _uploadFile

 private function _uploadFile()
 {
     Wind::import('SRV:upload.action.PwDesignImageUpload');
     Wind::import('SRV:upload.PwUpload');
     $bhv = new PwDesignImageUpload();
     $upload = new PwUpload($bhv);
     if (($result = $upload->check()) === true) {
         $result = $upload->execute();
     }
     if ($result !== true) {
         return $result;
     }
     $image = $bhv->getAttachInfo();
     if (!$image['filename']) {
         return '';
     }
     return Pw::getPath($image['path'] . $image['filename']);
 }
开发者ID:fanqimeng,项目名称:4tweb,代码行数:18,代码来源:PwDesignImageDataService.php

示例7: _uploadFile

 private function _uploadFile($key, $moduleid = 0)
 {
     Wind::import('SRV:upload.action.PwDesignDataUpload');
     Wind::import('SRV:upload.PwUpload');
     $bhv = new PwDesignDataUpload($key, $moduleid);
     $upload = new PwUpload($bhv);
     if (($result = $upload->check()) === true) {
         $result = $upload->execute();
     }
     if ($result !== true) {
         $this->showError($result->getError());
     }
     $image = $bhv->getAttachInfo();
     return $image['filename'] ? Pw::getPath($image['path'] . $image['filename']) : "";
 }
开发者ID:fanqimeng,项目名称:4tweb,代码行数:15,代码来源:DataController.php

示例8: getAttachInfo

 public function getAttachInfo()
 {
     if (!$this->attachs) {
         return array();
     }
     $array = current($this->attachs);
     $result = array('aid' => $array['aid']);
     if ($array['type'] == 'img') {
         $result['path'] = Pw::getPath($array['path']);
         $result['thumbpath'] = Pw::getPath($array['path'], $array['ifthumb']);
     }
     return $result;
 }
开发者ID:fanqimeng,项目名称:4tweb,代码行数:13,代码来源:PwAttMultiUpload.php

示例9: dotaoAction

 /**
  * 淘宝推广图片 
  * 
  * @access public
  * @return void
  */
 public function dotaoAction()
 {
     if (!($user = $this->_getUser())) {
         $this->showError('login.not');
     }
     $fid = $this->getInput('fid', 'post');
     //
     $this->_accpetUploadForH5();
     //
     Wind::import('SRV:upload.action.PwTaoUpload');
     Wind::import('LIB:upload.PwUpload');
     $bhv = new PwTaoUpload();
     $bhv->filename = date('YmdHis');
     //
     $upload = new PwUpload($bhv);
     if (($result = $upload->check()) === true) {
         $result = $upload->execute();
     }
     if ($result !== true) {
         $this->showError($result->getError());
     }
     if (!($data = $bhv->getAttachInfo())) {
         $this->showError('upload.fail');
     }
     $data['path'] = Pw::getPath($data['path'] . $data['filename']);
     //
     $this->setOutput($data, 'data');
     $this->showMessage('upload.success');
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:35,代码来源:UploadController.php

示例10: getNotifier

 public static function getNotifier()
 {
     $config = Wekit::C()->getValues('notifier');
     if (empty($config)) {
         $config = self::$defaultNotifier;
     } else {
         $config['avatar'] = empty($config['avatar']) ? self::$defaultNotifier['avatar'] : Pw::getPath($config['avatar']);
     }
     return $config;
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:10,代码来源:PwLaiWangSerivce.php

示例11: getMedalImage

 public function getMedalImage($path = '', $filename = '')
 {
     if ($path) {
         return Pw::getPath($path . $filename);
     } else {
         return WindUrlHelper::checkUrl(PUBLIC_RES . '/images/medal/', PUBLIC_URL) . '/' . $filename;
     }
     /*if ($type == 'image'){
     			return WindUrlHelper::checkUrl(PUBLIC_RES . '/images/medal/big', PUBLIC_URL);
     		} else {
     			return WindUrlHelper::checkUrl(PUBLIC_RES . '/images/medal/small', PUBLIC_URL);	
     		}*/
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:13,代码来源:PwMedalService.php

示例12: _bulidAttachs

 private function _bulidAttachs($attach)
 {
     if (!$attach) {
         return '';
     }
     $array = array();
     ksort($attach);
     reset($attach);
     foreach ($attach as $key => $value) {
         $array[$key] = array('name' => $value['name'], 'size' => $value['size'], 'path' => Pw::getPath($value['path'], $value['ifthumb'] & 1), 'thumbpath' => Pw::getPath($value['path'], $value['ifthumb']), 'desc' => $value['descrip'], 'special' => $value['special'], 'cost' => $value['cost'], 'ctype' => $value['ctype']);
     }
     return $array;
 }
开发者ID:YoursBoss,项目名称:nextwind,代码行数:13,代码来源:PostController.php

示例13: _getSpace

 private function _getSpace()
 {
     $this->space = $this->_getSpaceDs()->getSpace($this->spaceUid);
     empty($this->space['space_name']) && ($this->space['space_name'] = $this->spaceUser['username'] . '的个人空间');
     empty($this->space['space_privacy']) && ($this->space['space_privacy'] = array());
     $this->space['domain'] = $this->_getDomain();
     list($image, $repeat, $fixed, $align) = unserialize($this->space['back_image']);
     empty($repeat) && ($repeat = 'no-repeat');
     empty($fixed) && ($fixed = 'scroll');
     empty($align) && ($align = 'center');
     $this->space['back_image'] = array($image, $repeat, $fixed, $align);
     $this->space['backbround'] = '';
     if (empty($image)) {
         return;
     }
     $image = Pw::getPath('') . $image;
     $image = htmlentities($image);
     $repeat = htmlentities($repeat);
     $fixed = htmlentities($fixed);
     $align = htmlentities($align);
     $this->space['backbround'] = 'style="';
     $this->space['backbround'] .= 'background-image: url( ' . $image . ');';
     $this->space['backbround'] .= 'background-repeat:' . $repeat . ';';
     $this->space['backbround'] .= 'background-attachment:' . $fixed . ';';
     $this->space['backbround'] .= 'background-position:top ' . $align . ';';
     $this->space['backbround'] .= '"';
     return;
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:28,代码来源:PwSpaceBo.php

示例14: _getDataFromThread

 private function _getDataFromThread($infoids)
 {
     $_aTid = array();
     //有附件的帖子
     $datas = $data = array();
     $infos = Wekit::load('forum.PwThread')->fetchThread($infoids, PwThread::FETCH_ALL);
     foreach ($infos as $info) {
         $data['subject'] = $info['subject'];
         $data['lasttime'] = $info['created_time'];
         $data['content'] = $this->_buildLikeContent($info['content']);
         $data['from'] = '帖子';
         $data['uid'] = $info['created_userid'];
         $data['username'] = $info['created_username'];
         $data['fid'] = $info['fid'];
         $data['like_count'] = $info['like_count'];
         $data['url'] = WindUrlHelper::createUrl('bbs/read/run', array('tid' => $info['tid'], 'fid' => $info['fid']));
         $this->_appendFid($info['fid']);
         if ($info['aids']) {
             $_aTid[] = $info['tid'];
         }
         $datas[$info['tid']] = $data;
     }
     $images = $this->_getThreadAttachs($_aTid);
     foreach ($images as $img) {
         $datas[$img['tid']]['image'] = Pw::getPath($img['path'], $img['ifthumb']);
     }
     return $datas;
 }
开发者ID:chendong0444,项目名称:phpwind,代码行数:28,代码来源:PwBuildLikeService.php

示例15: getAttachInfo

 public function getAttachInfo()
 {
     $array = current($this->attachs);
     return array('aid' => $array['aid'], 'path' => Pw::getPath($array['path']), 'name' => $array['name']);
 }
开发者ID:fanqimeng,项目名称:4tweb,代码行数:5,代码来源:PwAttReplaceUpload.php


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