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


PHP getImageUrlByAttachId函数代码示例

本文整理汇总了PHP中getImageUrlByAttachId函数的典型用法代码示例。如果您正苦于以下问题:PHP getImageUrlByAttachId函数的具体用法?PHP getImageUrlByAttachId怎么用?PHP getImageUrlByAttachId使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: w3gSlideShow

 /**
  * 3G办广场轮播列表
  *
  * @author Medz Seven <lovevipdsw@vip.qq.com>
  **/
 public function w3gSlideShow()
 {
     // # 设置页面字段
     $this->pageKeyList = array('image', 'url', 'doaction');
     // # 添加tab
     array_push($this->pageTab, array('title' => '轮播列表', 'tabHash' => 'w3gSlideShow', 'url' => U('admin/Mobile/w3gSlideShow')));
     array_push($this->pageTab, array('title' => '添加轮播', 'tabHash' => 'addW3gSlideShow', 'url' => U('admin/Mobile/addW3gSlideShow')));
     // # 分页获取数据,20条
     $list = D('w3g_slide_show')->findPage(20);
     // # 加入操作按钮
     foreach ($list['data'] as $key => $value) {
         // # 参数
         $aid = $value['image'];
         $id = $value['id'];
         // # 添加图片
         $value = '<a href="%s" target="_blank"><img src="%s" width="300px" height="140px"></a>';
         $value = sprintf($value, getImageUrlByAttachId($aid), getImageUrlByAttachId($aid, 300, 140));
         $list['data'][$key]['image'] = $value;
         // # 添加操作按钮
         $value = '[<a href="%s">编辑</a>]&nbsp;-&nbsp;[<a href="%s">删除</a>]';
         $value = sprintf($value, U('admin/Mobile/addW3gSlideShow', array('id' => $id, 'tabHash' => 'addW3gSlideShow')), U('admin/Mobile/delW3gSlideShwo', array('id' => $id)));
         $list['data'][$key]['doaction'] = $value;
     }
     // # 设置无选择按钮
     $this->allSelected = false;
     // # 显示列表,并注销list变量
     $this->displayList($list);
     unset($list);
 }
开发者ID:medz,项目名称:thinksns-4,代码行数:34,代码来源:MobileAction.class.php

示例2: index

 /**
  * 频道首页页面
  * @return void
  */
 public function index()
 {
     // 添加样式
     $this->appCssList[] = 'channel.css';
     // 获取频道分类列表
     $channelCategory = model('CategoryTree')->setTable('channel_category')->getCategoryList();
     $this->assign('channelCategory', $channelCategory);
     // 频道分类选中
     $cid = intval($_GET['cid']);
     $categoryIds = getSubByKey($channelCategory, 'channel_category_id');
     if (!in_array($cid, $categoryIds) && !empty($cid)) {
         $this->error('您请求的频道分类不存在');
         return false;
     }
     $channelConf = model('Xdata')->get('channel_Admin:index');
     if (empty($cid)) {
         $cid = $channelConf['default_category'];
         if (empty($cid)) {
             $cid = array_shift($categoryIds);
         }
     }
     $this->assign('cid', $cid);
     // 获取用户与频道分类的关注状态
     $followStatus = model('ChannelFollow')->getFollowStatus($this->mid, $cid);
     $this->assign('followStatus', $followStatus);
     // 获取模板样式
     $templete = t($_GET['tpl']);
     if (empty($templete) || !in_array($templete, array('load', 'list'))) {
         $categoryConf = model('CategoryTree')->setTable('channel_category')->getCatgoryConf($cid);
         $templete = empty($categoryConf) ? $channelConf['show_type'] == 1 ? 'list' : 'load' : ($categoryConf['show_type'] == 1 ? 'list' : 'load');
     }
     $templete = 'load';
     $this->assign('tpl', $templete);
     //获取频道信息
     //广播数
     $channel_count = model('Channel')->where('channel_category_id=' . $cid . ' AND status=1')->count();
     $this->assign("channel_count", $channel_count);
     //收听人数
     $channel_follower_count = model("ChannelFollow")->where('channel_category_id=' . $cid)->count();
     $this->assign("channel_follower_count", $channel_follower_count);
     //banner,desc
     $channel_category = D("channelCategory")->where('channel_category_id=' . $cid)->getField('ext');
     $channel_category = unserialize($channel_category);
     $channel_banner = getImageUrlByAttachId($channel_category['attach'], 1000);
     $this->assign('channel_banner', $channel_banner);
     $this->assign('channel_desc', $channel_category['desc']);
     //排序
     $order = $_GET['order'] == null ? 0 : $_GET['order'];
     $this->assign("order", intval($order));
     // 设置页面信息
     $titleHash = model('CategoryTree')->setTable('channel_category')->getCategoryHash();
     $title = empty($cid) ? '频道首页' : $titleHash[$cid];
     $this->setTitle($title);
     $this->setKeywords($title);
     $this->setDescription(implode(',', getSubByKey($channelCategory, 'title')));
     $this->display();
 }
开发者ID:songhongyu,项目名称:THINKSNS,代码行数:61,代码来源:IndexAction.class.php

示例3: getSlideShow

 /**
  * 获取application幻灯数据
  *
  * @return array
  * @author Medz Seven <lovevipdsw@vip.qq.com>
  **/
 public function getSlideShow()
 {
     $list = D('application_slide')->field('`title`, `image`, `type`, `data`')->select();
     foreach ($list as $key => $value) {
         $value['image'] = getImageUrlByAttachId($value['image']);
         $list[$key] = $value;
     }
     return $list;
 }
开发者ID:songhongyu,项目名称:THINKSNS,代码行数:15,代码来源:PublicApi.class.php

示例4: index

 /**
  * 微吧管理首页-修改微吧信息
  * @return void
  */
 public function index()
 {
     $weiba_id = intval($_GET['weiba_id']);
     $this->assign('weiba_id', $weiba_id);
     $weiba_detail = D('weiba')->where('weiba_id=' . $weiba_id)->find();
     if ($weiba_detail['logo']) {
         $weiba_detail['logo_url'] = getImageUrlByAttachId($weiba_detail['logo']);
     }
     $this->assign('weiba_detail', $weiba_detail);
     $this->display();
 }
开发者ID:lyhiving,项目名称:icampus,代码行数:15,代码来源:LogAction.class.php

示例5: getInfo

 /**
  * 获取礼物详细
  *
  * @request int $id 礼物ID
  * @return array
  * @author Seven Du <lovevipdsw@vip.qq.com>
  **/
 public function getInfo()
 {
     $id = intval(Common::getInput('id'));
     $data = GiftModel::getInstance()->getById($id);
     $data['image'] && ($data['image'] = getImageUrlByAttachId($data['image']));
     $data['count'] = LogModel::getInstance()->getUserCount($id);
     $data['info'] = preg_replace('/\\<img(.*?)src\\=\\"\\/(.*?)\\"(.*?)(\\/?)\\>/is', '<img\\1src="SITE_URL/\\2"\\3\\4>', $data['info']);
     $data['info'] = str_replace('SITE_URL', parse_url(SITE_URL, PHP_URL_SCHEME) . '://' . parse_url(SITE_URL, PHP_URL_HOST) . '/', $data['info']);
     /* # 剔除width和height和align,防止宽高溢出 */
     $data['info'] = preg_replace('/(width|height|align)\\=\\"(.*?)\\"/is', '', $data['info']);
     return $data;
 }
开发者ID:medz,项目名称:thinksns-4,代码行数:19,代码来源:GiftApi.class.php

示例6: index

 /**
  * 微吧管理首页-修改微吧信息
  * @return void
  */
 public function index()
 {
     $weiba_id = intval($_GET['weiba_id']);
     $weiba_detail = D('weiba')->where('weiba_id=' . $weiba_id)->find();
     if ($weiba_detail['logo']) {
         $weiba_detail['logo_url'] = getImageUrlByAttachId($weiba_detail['logo']);
     }
     $weiba_cates = D('WeibaCategory')->getAllWeibaCate();
     $this->assign('weiba_cates', $weiba_cates);
     $this->assign('weiba_detail', $weiba_detail);
     $this->setTitle('基本信息 ' . $weiba_detail['weiba_name']);
     $this->setKeywords('基本信息 ' . $weiba_detail['weiba_name']);
     $this->display();
 }
开发者ID:omusico,项目名称:ThinkSNS-4,代码行数:18,代码来源:ManageAction.class.php

示例7: index

 /**
  * 频道首页页面
  * @return void
  */
 public function index()
 {
     global $ts;
     $xdata = M('Xdata');
     $tip = $xdata->getConfig('tip', 'config', 'bboard_Admin');
     $big_logo = $xdata->getConfig('big_logo', 'config', 'bboard_Admin');
     $this->assign('tip', $tip);
     $this->assign('big_logo', getImageUrlByAttachId($big_logo));
     //$path=$attach['save_path'].$attach['save_name'];
     //  dump(getImageUrlByAttachId($big_logo));exit;
     // 添加样式
     $this->appCssList[] = 'bboard/bboard.css';
     // 获取频道分类列表
     $topic = D('topic')->getData(20);
     $this->assign('topic', $topic);
     $this->display();
 }
开发者ID:lyhiving,项目名称:icampus,代码行数:21,代码来源:IndexAction.class.php

示例8: render

 /**
  * 渲染关注按钮模板
  * @example
  * $data['manage_uid'] integer 用户ID
  * @param  array  $data 渲染的相关配置参数
  * @return string 渲染后的模板数据
  */
 public function render($data)
 {
     $var = array();
     $manage = D('weiba_follow')->where(array('follower_uid' => $data['manage_uid'], 'level' => array('in', array(2, 3))))->findAll();
     $map['weiba_id'] = array('in', getSubByKey($manage, 'weiba_id'));
     $map['is_del'] = 0;
     $var['manageWeibaList'] = D('weiba')->where($map)->findAll();
     $var['manageWeibaListCount'] = D('weiba')->where($map)->count();
     foreach ($var['manageWeibaList'] as $k => $v) {
         $var['manageWeibaList'][$k]['logo'] = getImageUrlByAttachId($v['logo'], 50, 50);
     }
     is_array($data) && ($var = array_merge($var, $data));
     // 渲染模版
     $content = $this->renderFile(dirname(__FILE__) . '/manageWeibaList.html', $var);
     unset($var, $data);
     // 输出数据
     return $content;
 }
开发者ID:medz,项目名称:thinksns-4,代码行数:25,代码来源:ManageWeibaListWidget.class.php

示例9: render

 /**
  * 渲染关注按钮模板
  * @example
  * $data['follower_uid'] integer 用户ID
  * @param array $data 渲染的相关配置参数
  * @return string 渲染后的模板数据
  */
 public function render($data)
 {
     $var = array();
     $var['type'] = 'FollowWeibaList';
     $follow = D('weiba_follow')->where('follower_uid=' . $data['follower_uid'])->findAll();
     $map['weiba_id'] = array('in', getSubByKey($follow, 'weiba_id'));
     $map['is_del'] = 0;
     $var['weibaList'] = D('weiba')->where($map)->findAll();
     $var['weibaListCount'] = D('weiba')->where($map)->count();
     foreach ($var['weibaList'] as $k => $v) {
         $var['weibaList'][$k]['logo'] = getImageUrlByAttachId($v['logo'], 30, 30);
     }
     is_array($data) && ($var = array_merge($var, $data));
     // 渲染模版
     $content = $this->renderFile(dirname(__FILE__) . "/followWeibaList.html", $var);
     unset($var, $data);
     // 输出数据
     return $content;
 }
开发者ID:yang7hua,项目名称:hunshe,代码行数:26,代码来源:FollowWeibaListWidget.class.php

示例10: login

 /**
  * 默认登录页
  * @return void
  */
 public function login()
 {
     // 添加样式
     $this->appCssList[] = 'login.css';
     if (model('Passport')->isLogged()) {
         redirect($this->site['home_url']);
     }
     // 获取邮箱后缀
     $registerConf = model('Xdata')->get('admin_Config:register');
     $this->assign('emailSuffix', explode(',', $registerConf['email_suffix']));
     $this->assign('register_type', $registerConf['register_type']);
     $data = model('Xdata')->get("admin_Config:seo_login");
     !empty($data['title']) && $this->setTitle($data['title']);
     !empty($data['keywords']) && $this->setKeywords($data['keywords']);
     !empty($data['des']) && $this->setDescription($data['des']);
     $login_bg = getImageUrlByAttachId($this->site['login_bg']);
     // if(empty($login_bg))
     // 	$login_bg = APP_PUBLIC_URL . '/image/login/banner.png';
     $this->assign('login_bg', $login_bg);
     $this->display('login');
 }
开发者ID:jianminglok,项目名称:thinksnsv4,代码行数:25,代码来源:PassportAction.class.php

示例11: login

 /**
  * 默认登录页
  * @return void
  */
 public function login()
 {
     // 添加样式
     $this->appCssList[] = 'login.css';
     if ($GLOBALS['ts']['mid'] > 0) {
         U('public/Index/index', '', true);
     }
     // 获取邮箱后缀
     $registerConf = model('Xdata')->get('admin_Config:register');
     $this->assign('emailSuffix', explode(',', $registerConf['email_suffix']));
     $this->assign('register_type', $registerConf['register_type']);
     $data = model('Xdata')->get("admin_Config:seo_login");
     !empty($data['title']) && $this->setTitle($data['title']);
     !empty($data['keywords']) && $this->setKeywords($data['keywords']);
     !empty($data['des']) && $this->setDescription($data['des']);
     $login_bg = getImageUrlByAttachId($this->site['login_bg']);
     if (empty($login_bg)) {
         $login_bg = APP_PUBLIC_URL . '/image/body-bg2.jpg';
     }
     $this->assign('login_bg', $login_bg);
     $this->display();
 }
开发者ID:naliduo,项目名称:ThinkSNS,代码行数:26,代码来源:PassportAction.class.php

示例12: index

 /**
  * 轮播列表
  *
  * @return void
  * @author Medz Seven <lovevipdsw@vip.qq.com>
  **/
 public function index()
 {
     $this->pageKeyList = array('title', 'image', 'type', 'data', 'doAction');
     array_push($this->pageTab, array('title' => '轮播列表', 'tabHash' => 'index', 'url' => U('admin/Application/index')));
     array_push($this->pageTab, array('title' => '添加轮播', 'tabHash' => 'addSlide', 'url' => U('admin/Application/addSlide')));
     $list = D('application_slide')->findPage(20);
     foreach ($list['data'] as $key => $value) {
         // # 参数
         $aid = $value['image'];
         $id = $value['id'];
         $list['data'][$key]['type'] = $this->type[$value['type']];
         // # 添加图片
         $value = '<a href="%s" target="_blank"><img src="%s" width="300px" height="140px"></a>';
         $value = sprintf($value, getImageUrlByAttachId($aid), getImageUrlByAttachId($aid, 300, 140));
         $list['data'][$key]['image'] = $value;
         // # 添加操作按钮
         $value = '[<a href="%s">编辑</a>]&nbsp;-&nbsp;[<a href="%s">删除</a>]';
         $value = sprintf($value, U('admin/Application/addSlide', array('id' => $id, 'tabHash' => 'addSlide')), U('admin/Application/delSlide', array('id' => $id)));
         $list['data'][$key]['doAction'] = $value;
     }
     $this->allSelected = false;
     $this->displayList($list);
 }
开发者ID:omusico,项目名称:ThinkSNS-4,代码行数:29,代码来源:ApplicationAction.class.php

示例13: core_display_tpl

 public function core_display_tpl()
 {
     if (!$this->checkAvailability()) {
         return;
     }
     $config = $config ? $config : model('AddonData')->lget('beautifyLogin');
     if (!$config['template']) {
         $config['template'] = 1;
     }
     if (!$config['color']) {
         $config['color'] = "FFFFFF";
     }
     switch ($config['template']) {
         case 1:
             // By Zue
             $templateFile = dirname(dirname(__FILE__)) . '/html/zue/login.html';
             break;
         case 2:
             // By Cali
             $templateFile = dirname(dirname(__FILE__)) . '/html/cali/login.html';
             break;
     }
     $siteConf = model('Xdata')->get('admin_Config:site');
     $config['login_bg'] = getImageUrlByAttachId($siteConf['login_bg']);
     $config['_title'] = $siteConf['site_slogan'];
     $config['_keywords'] = $siteConf['site_header_keywords'];
     $config['_description'] = $siteConf['site_header_description'];
     $config['site']['site_slogan'] = $siteConf['site_slogan'];
     $config['site']['site_name'] = $siteConf['site_name'];
     $config['site']['logo'] = getSiteLogo($siteConf['site_logo']);
     $config['site']['sys_version'] = $siteConf['sys_version'];
     // 获取当前Js语言包
     $this->langJsList = setLangJavsScript();
     $config['langJsList'] = $this->langJsList;
     echo fetch($templateFile, $config, $param['charset'], $param['contentType']);
     exit;
 }
开发者ID:CaliProject,项目名称:thinksns,代码行数:37,代码来源:BeautifyLoginHooks.class.php

示例14: index

 public function index()
 {
     $indexList = D('weiba_post')->where('is_del=0 AND top=2')->order('is_index_time desc')->findAll();
     foreach ($indexList as &$v) {
         $imgIds = explode(',', $_POST['imageIds']);
         if ($imgIds) {
             $v['index_img_url'] = getImageUrlByAttachId($imgIds[0]);
         }
     }
     $this->assign('indexList', $indexList);
     $order = '`top` desc,FIELD(recommend+digest,0,1,2) desc,last_reply_time desc';
     $map['is_del'] = 0;
     $map['is_index'] = 0;
     $list = D('weiba_post')->where($map)->order($order)->limit(20)->select();
     $this->assign('list', $list);
     // 推荐微吧
     if (!($weibalist = S('rec_weibalist'))) {
         $weibalist = D('weiba')->where('is_del=0 and status=1')->order('recommend desc,follower_count desc,thread_count')->limit(4)->select();
         S('rec_weibalist', $weibalist);
     }
     $this->assign('weibalist', $weibalist);
     //dump($indexList);
     $this->display();
 }
开发者ID:jacyxie,项目名称:xindongfang,代码行数:24,代码来源:WeibaAction.class.php

示例15: weibaAudit

 /**
  * 微吧审核
  * @return void
  */
 public function weibaAudit()
 {
     $_REQUEST['tabHash'] = 'weibaAudit';
     $this->_initWeibaListAdminMenu();
     // 设置列表主键
     $this->_listpk = 'weiba_id';
     $this->pageButton[] = array('title' => '搜索', 'onclick' => "admin.fold('search_form')");
     $this->pageButton[] = array('title' => '通过', 'onclick' => "admin.doWeibaAudit('', 1)");
     $this->pageButton[] = array('title' => '驳回', 'onclick' => "admin.doWeibaAudit('', -1)");
     $this->searchKey = array('weiba_name');
     $this->pageKeyList = array('weiba_id', 'weiba_name', 'weiba_cate', 'info', 'uid', 'uinfo', 'live', 'ctime', 'DOACTION');
     if (!empty($_POST['weiba_name'])) {
         $maps['weiba_name'] = array('like', '%' . t($_POST['weiba_name']) . '%');
         $map['weiba_id'] = array('in', getSubByKey(D('weiba')->where($maps)->field('weiba_id')->findAll(), 'weiba_id'));
     }
     $map['status'] = 0;
     // 数据的格式化与listKey保持一致
     $listData = D('weiba')->where($map)->order('ctime desc')->findPage(20);
     $weibacate = D('weiba_category')->findAll();
     $cids = array();
     foreach ($weibacate as $c) {
         $cids[$c['id']] = $c['name'];
     }
     foreach ($listData['data'] as $k => $v) {
         $listData['data'][$k]['weiba_name'] = '<a target="_blank" href="' . U('weiba/Index/detail', array('weiba_id' => $v['weiba_id'])) . '">' . $v['weiba_name'] . '</a>';
         $listData['data'][$k]['logo'] && ($listData['data'][$k]['logo'] = '<img src="' . getImageUrlByAttachId($v['logo']) . '" width="50" height="50">');
         $create_uid = model('User')->getUserInfoByUids($v['uid']);
         $listData['data'][$k]['uid'] = $create_uid[$v['uid']]['space_link'];
         $listData['data'][$k]['uinfo'] = $create_uid[$v['uid']]['group_icon'];
         $listData['data'][$k]['live'] = $create_uid[$v['uid']]['credit_info']['level']['name'];
         $listData['data'][$k]['ctime'] = friendlyDate($v['ctime']);
         $listData['data'][$k]['weiba_cate'] = $cids[$v['cid']];
         $listData['data'][$k]['DOACTION'] = '<a href="javascript:void(0)" onclick="admin.doWeibaAudit(' . $v['weiba_id'] . ',1);">通过</a>&nbsp;-&nbsp;<a href="javascript:void(0)" onclick="admin.doWeibaAudit(' . $v['weiba_id'] . ',-1);">驳回</a>';
     }
     $this->displayList($listData);
 }
开发者ID:ElijahLabs,项目名称:ThinkSNS-4,代码行数:40,代码来源:AdminAction.class.php


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