本文整理汇总了PHP中get_cover_url函数的典型用法代码示例。如果您正苦于以下问题:PHP get_cover_url函数的具体用法?PHP get_cover_url怎么用?PHP get_cover_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_cover_url函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getCommonArticles
public function getCommonArticles($extra_int)
{
$map['token'] = get_token();
$extra_int && ($map['id'] = $extra_int);
$data = M('scratch')->where($map)->order('id desc')->select();
if (!$data) {
return true;
}
// 其中token和openid这两个参数一定要传,否则程序不知道是哪个微信用户进入了系统
//$param ['token'] = get_token ();
//$param ['openid'] = get_openid ();
foreach ($data as $key => $vo) {
$param['id'] = $vo['id'];
$url = addons_url('Scratch://Scratch/show', $param);
$articles[$key] = array('Title' => $vo['title'], 'Url' => $url);
$now = time();
if ($vo['end_time'] > $now) {
$articles[$key]['Description'] = $vo['intro'];
$articles[$key]['PicUrl'] = !empty($vo['cover']) ? get_cover_url($vo['cover']) : SITE_URL . '/Addons/Scratch/View/default/Public/cover_pic.jpg';
} else {
$articles[$key]['Description'] = $vo['end_tips'];
$articles[$key]['PicUrl'] = !empty($vo['end_cover']) ? get_cover_url($vo['end_cover']) : SITE_URL . '/Addons/Scratch/View/default/Public/cover_pic_over.png';
}
}
//foreach
$this->replyNews($articles);
}
开发者ID:strivi,项目名称:siples,代码行数:27,代码来源:WeixinAddonModel.class.php
示例2: _initialize
function _initialize()
{
parent::_initialize();
$controller = strtolower(_CONTROLLER);
$action = strtolower(_ACTION);
$res['title'] = '支付配置';
$res['url'] = addons_url('Payment://Payment/lists');
$res['class'] = $action == 'lists' || $action == 'listsv3' || $action == 'zfbpay' || $action == 'cftwappay' || $action == 'ctfpay' || $action == 'quickpay' ? 'current' : '';
$nav[] = $res;
$res['title'] = '功能配置';
$res['url'] = addons_url('Payment://Payment/config');
$res['class'] = $action == 'config' ? 'current' : '';
$nav[] = $res;
$this->assign('nav', $nav);
$config = getAddonConfig('Payment');
$config['cover_url'] = get_cover_url($config['cover']);
$config['background'] = get_cover_url($config['background']);
$this->config = $config;
$this->assign('config', $config);
// 定义模板常量
$act = strtolower(_ACTION);
$temp = $config['template_' . $act];
$act = ucfirst($act);
define('CUSTOM_TEMPLATE_PATH', ONETHINK_ADDON_PATH . 'Payment/View/default/Template');
}
开发者ID:strivi,项目名称:siples,代码行数:25,代码来源:BaseController.class.php
示例3: reply
function reply($dataArr, $keywordArr = array())
{
$config = getAddonConfig('Salon');
// 获取后台插件的配置参数
$param['token'] = get_token();
$param['openid'] = get_openid();
//初始化查找条件,51,52,。。。55分别为E沙龙几个固定的图文项
$map_news['id'] = array('in', array(51, 52, 53, 54, 61, 60));
$list = M('custom_reply_news')->where($map_news)->select();
$contact = array();
foreach ($list as $k => $info) {
if ($k > 8) {
continue;
}
if ($info['title'] == "联系我们") {
$contact = array('Title' => $info['title'], 'Description' => $info['intro'], 'PicUrl' => get_cover_url($info['cover']), 'Url' => addons_url($info['jump_url'], $param));
continue;
}
//商家登录
if ($info['id'] == 61) {
$articles[] = array('Title' => $info['title'], 'Description' => $info['intro'], 'PicUrl' => get_cover_url($info['cover']), 'Url' => $info['jump_url']);
continue;
}
$articles[] = array('Title' => $info['title'], 'Description' => $info['intro'], 'PicUrl' => get_cover_url($info['cover']), 'Url' => addons_url($info['jump_url'], $param));
}
$articles[] = $contact;
$res = $this->replyNews($articles);
}
开发者ID:HivenKay,项目名称:ESalon,代码行数:28,代码来源:WeixinAddonModel.class.php
示例4: keyword
public function keyword($params)
{
if ($params['mp_id']) {
$kmap['mp_id'] = $params['mp_id'];
$kmap['keyword'] = $params['weObj']->getRevContent();
//TODO:先只支持精确匹配,后续根据keyword_type字段增加模糊匹配
$Keyword = M('Keyword')->where($kmap)->find();
if ($Keyword['model'] && $Keyword['aim_id']) {
//如果有指定模型,就用模型中的aim_id数据组装回复的内容
$amap['id'] = $Keyword['aim_id'];
$aimData = M($Keyword['model'])->where($amap)->find();
$reData[0]['Title'] = $aimData['title'];
$reData[0]['Description'] = $aimData['intro'];
$reData[0]['PicUrl'] = get_cover_url($aimData['cover']);
//'http://images.domain.com/templates/domaincom/logo.png';
$reData[0]['Url'] = $aimData['url'];
trace('wechat:keyword' . get_cover_url($aimData['cover']), '微信', 'DEBUG', true);
$params['weObj']->news($reData);
} elseif ($Keyword['addon']) {
//TODO:没有指定模型,就用addon的配置信息组装回复的内容
$amap['name'] = $Keyword['addon'];
$aimData = M('Addons')->where($amap)->find();
//插件信息组装回复,当然插件需要先安装了
$reData[0]['Title'] = $aimData['title'];
$reData[0]['Description'] = $aimData['description'];
$reData[0]['PicUrl'] = get_addoncover_url($Keyword['addon']);
//插件目录下放个回复封面图片例如jssdk插件中的cover.png
$param['mp_id'] = $params['mp_id'];
$reData[0]['Url'] = get_addonreply_url($Keyword['addon'], $param);
$params['weObj']->news($reData);
}
} else {
}
// $params['weObj']->text("hello ");
}
开发者ID:suhanyujie,项目名称:digitalOceanVps,代码行数:35,代码来源:KeywordAddon.class.php
示例5: reply
function reply($dataArr, $keywordArr = array())
{
$map['id'] = $keywordArr['aim_id'];
$param['token'] = get_token();
$param['openid'] = get_openid();
if ($keywordArr['extra_text'] == 'custom_reply_mult') {
// 多图文回复
$mult = M('custom_reply_mult')->where($map)->find();
$map_news['id'] = array('in', $mult['mult_ids']);
$list = M('custom_reply_news')->where($map_news)->select();
foreach ($list as $k => $info) {
if ($k > 8) {
continue;
}
$articles[] = array('Title' => $info['title'], 'Description' => $info['intro'], 'PicUrl' => get_cover_url($info['cover']), 'Url' => $this->_getNewsUrl($info, $param));
}
$res = $this->replyNews($articles);
} elseif ($keywordArr['extra_text'] == 'custom_reply_news') {
// 单条图文回复
$info = M('custom_reply_news')->where($map)->find();
// 组装微信需要的图文数据,格式是固定的
$articles[0] = array('Title' => $info['title'], 'Description' => $info['intro'], 'PicUrl' => get_cover_url($info['cover']), 'Url' => $this->_getNewsUrl($info, $param));
$res = $this->replyNews($articles);
} else {
// 增加积分
add_credit('custom_reply', 300);
// 文本回复
$info = M('custom_reply_text')->where($map)->find();
$contetn = replace_url(htmlspecialchars_decode($info['content']));
$this->replyText($contetn);
}
}
开发者ID:noikiy,项目名称:weiphp,代码行数:32,代码来源:WeixinAddonModel.class.php
示例6: reply
function reply($dataArr, $keywordArr = array())
{
$map['token'] = get_token();
$keywordArr['aim_id'] && ($map['id'] = $keywordArr['aim_id']);
$data = M('sendredpack')->where($map)->order('id desc')->select();
foreach ($data as $key => $vo) {
$param['id'] = $vo['id'];
$url = addons_url('Sendredpack://Sendredpack/index', $param);
$articles[$key] = array('Title' => $vo['title'], 'Url' => $url);
$now = time();
if ($vo['end_time'] > $now) {
$articles[$key]['Description'] = $vo['intro'];
$articles[$key]['PicUrl'] = !empty($vo['cover']) ? get_cover_url($vo['cover']) : SITE_URL . '/Addons/Scratch/View/default/Public/cover_pic.jpg';
} else {
$articles[$key]['Description'] = $vo['end_tips'];
$articles[$key]['PicUrl'] = !empty($vo['end_cover']) ? get_cover_url($vo['end_cover']) : SITE_URL . '/Addons/Scratch/View/default/Public/cover_pic_over.png';
}
}
//foreach
if ($articles) {
$this->replyNews($articles);
} else {
$this->replyText('Sorry,当前无红包活动!');
}
}
开发者ID:strivi,项目名称:siples,代码行数:25,代码来源:WeixinAddonModel.class.php
示例7: _initialize
function _initialize()
{
parent::_initialize();
$controller = strtolower(_CONTROLLER);
$action = strtolower(_ACTION);
$res['title'] = '客服管理';
$res['url'] = addons_url('YouaskService://YouaskService/lists');
$res['class'] = ($controller == 'youaskservice' || $controller == 'group') && $action != 'config' ? 'current' : '';
$nav[] = $res;
$res['title'] = '关键词指定客服';
$res['url'] = addons_url('YouaskService://KeywordKF/lists');
$res['class'] = $controller == 'keywordkf' ? 'current' : '';
$nav[] = $res;
$res['title'] = '微信客服设置';
$res['url'] = addons_url('YouaskService://YouaskService/config');
$res['class'] = $controller == 'youaskservice' && $action == 'config' ? 'current' : '';
$nav[] = $res;
$this->assign('nav', $nav);
$config = getAddonConfig('YouaskService');
$config['cover_url'] = get_cover_url($config['cover']);
$config['background'] = get_cover_url($config['background']);
$this->config = $config;
$this->assign('config', $config);
// 定义模板常量
$act = strtolower(_ACTION);
$temp = $config['template_' . $act];
$act = ucfirst($act);
}
开发者ID:LukeChow1018,项目名称:weixin,代码行数:28,代码来源:BaseController.class.php
示例8: reply
function reply($dataArr, $keywordArr = array())
{
$map['id'] = $keywordArr['aim_id'];
$info = M('auto_reply')->where($map)->find();
if ($info['msg_type'] == 'news') {
$map_news['group_id'] = $info['group_id'];
$list = M('material_news')->where($map_news)->select();
$param['publicid'] = get_token_appinfo('', 'id');
foreach ($list as $k => $vo) {
if ($k > 8) {
continue;
}
$articles[] = array('Title' => $vo['title'], 'Description' => $vo['intro'], 'PicUrl' => get_cover_url($vo['cover_id']), 'Url' => $this->_getNewsUrl($vo, $param));
}
$res = $this->replyNews($articles);
} elseif ($info['msg_type'] == 'image') {
if ($info['image_id']) {
// $d['image_id']=url_img_html(get_cover_url($d['image_id']));
$media_id = D('Common/Custom')->get_image_media_id($info['image_id']);
} else {
if ($info['image_material']) {
$map2['id'] = $info['image_material'];
$media_img = M('material_image')->where($map2)->find();
$media_id = $media_img['image_id'];
if (!$media_id) {
$media_id = D('Common/Custom')->get_image_media_id($media_img['cover_id']);
}
}
}
$this->replyImage($media_id);
} else {
$contetn = replace_url(htmlspecialchars_decode($info['content']));
$this->replyText($contetn);
}
}
开发者ID:yxz1025,项目名称:weiphp3.0,代码行数:35,代码来源:WeixinAddonModel.class.php
示例9: getList
function getList($sportsId, $update = false)
{
$key = 'LotteryPrizeList_getList_' . $sportsId;
$info = S($key);
if ($info === false || $update) {
$map['sports_id'] = $sportsId;
$map['uid'] = session('manager_id');
if (empty($map['uid'])) {
$map['uid'] = get_mid();
}
$info = (array) $this->where($map)->select();
$awardDao = D('Addons://Draw/Award');
if (count($info) != 0) {
foreach ($info as &$v) {
$award = $awardDao->getInfo($v['award_id']);
$v['awardarr'] = $award;
$v['award_name'] = $award['name'];
$v['award_pic'] = get_cover_url($award['img']);
}
}
// $info['awardarr']=M('Award')->getInfo($info['sports_id']);
// $info['sports']=M('Addons://Sports/Sports')->getInfo($info['sports_id']);
S($key, $info, 86400);
}
return $info;
}
开发者ID:chenpusn,项目名称:haozhixian_bak,代码行数:26,代码来源:LotteryPrizeListModel.class.php
示例10: lists
public function lists()
{
D('Addons://Shop/Order')->autoSetFinish();
$this->assign('add_button', false);
$this->assign('del_button', false);
$this->assign('check_all', false);
$map['token'] = get_token();
$map['shop_id'] = $this->shop_id;
$search = $_REQUEST['order_number'];
if ($search) {
$this->assign('search', $search);
$map1['nickname'] = array('like', '%' . htmlspecialchars($search) . '%');
$nickname_follow_ids = D('Common/User')->where($map1)->getFields('uid');
$nickname_follow_ids = implode(',', $nickname_follow_ids);
if (!empty($nickname_follow_ids)) {
$map['uid'] = array('exp', ' in (' . $nickname_follow_ids . ') ');
} else {
$map['order_number'] = array('like', '%' . htmlspecialchars($search) . '%');
}
unset($_REQUEST['order_number']);
}
session('common_condition', $map);
$list_data = $this->_get_model_list($this->model);
// 分类数据
$map['is_show'] = 1;
$list = M('weisite_category')->where($map)->field('id,title')->select();
$cate[0] = '';
foreach ($list as $vo) {
$cate[$vo['id']] = $vo['title'];
}
$orderDao = D('Addons://Shop/Order');
// dump($list_data ['list_data']);
foreach ($list_data['list_data'] as &$vo) {
$param['id'] = $vo['id'];
$order = $orderDao->getInfo($vo['id']);
// dump($order);
$vo = array_merge($vo, $order);
$follow = get_followinfo($vo['uid']);
$param2['uid'] = $follow['uid'];
$vo['uid'] = '<a target="_blank" href="' . addons_url('UserCenter://UserCenter/detail', $param2) . '">' . $follow['nickname'] . '</a>';
$vo['cate_id'] = intval($vo['cate_id']);
$vo['cate_id'] = $cate[$vo['cate_id']];
$goods = json_decode($order['goods_datas'], true);
foreach ($goods as $vv) {
$vo['goods'] .= '<img width="50" style="vertical-align:middle;margin:0 10px 0 0" src="' . get_cover_url($vv['cover']) . '"/>' . $vv['title'] . '<br><br>';
}
$vo['goods'] = rtrim($vo['goods'], '<br><br>');
$vo['order_number'] = '<a href="' . addons_url('Shop://Order/detail', $param) . '">' . $vo['order_number'] . '</a>';
$vo['action'] = '<a href="' . addons_url('Shop://Order/detail', $param) . '">详情</a>';
if ($vo['status_code'] == 1) {
$vo['action'] .= '<br><br><a href="' . addons_url('Shop://Order/set_confirm', $param) . '">商家确认</a>';
}
}
// dump($list_data ['list_data'] );
$this->assign($list_data);
// dump ( $list_data );
$templateFile = $this->model['template_list'] ? $this->model['template_list'] : '';
$this->display($templateFile);
}
开发者ID:chenpusn,项目名称:haozhixian_bak,代码行数:59,代码来源:OrderController.class.php
示例11: _initialize
function _initialize()
{
parent::_initialize();
$config = getAddonConfig('Leaflets');
$config['img'] = is_numeric($config['img']) ? get_cover_url($config['img']) : SITE_URL . '/Addons/Leaflets/View/default/Public/qrcode_default.jpg';
$this->assign('config', $config);
// dump($config);
}
开发者ID:yxz1025,项目名称:weiphp3.0,代码行数:8,代码来源:LeafletsController.class.php
示例12: get_list
function get_list($map)
{
$map['token'] = get_token();
$list = $this->where($map)->order('pid asc, sort asc')->select();
foreach ($list as &$vo) {
$vo['icon'] = get_cover_url($vo['icon']);
}
return $list;
}
开发者ID:ChenwayWong,项目名称:weidamp,代码行数:9,代码来源:FooterModel.class.php
示例13: reply
function reply($dataArr, $keywordArr = array())
{
$config = getAddonConfig('LostAndFound');
// 获取后台插件的配置参数
$param['token'] = get_token();
$param['openid'] = get_openid();
$url = addons_url("LostAndFound://LostAndFound/index", $param);
$articles[0] = array('Title' => $config['title'], 'Description' => $config['desc'], 'PicUrl' => get_cover_url($config['img']), 'Url' => $url);
$this->replyNews($articles);
}
开发者ID:Rayuu,项目名称:weiphp,代码行数:10,代码来源:WeixinAddonModel.class.php
示例14: reply
function reply($dataArr, $keywordArr = array())
{
$config = getAddonConfig('Donations');
// 获取后台插件的配置参数
//dump($config);
$param['token'] = get_token();
$param['openid'] = get_openid();
$picurl = get_cover_url($config['cover']);
$url = addons_url('Donations://Donations/index', $param);
$articles[0] = array('Title' => $config['title'], 'Description' => $config['desc'], 'PicUrl' => $picurl, 'Url' => $url);
$this->replyNews($articles);
}
开发者ID:LukeChow1018,项目名称:weixin,代码行数:12,代码来源:WeixinAddonModel.class.php
示例15: reply
function reply($dataArr, $keywordArr = array())
{
$config = getAddonConfig('Jianzhi');
// 获取后台插件的配置参数
//dump($config);
$param['token'] = get_token();
$param['openid'] = get_openid();
$url = addons_url('Jianzhi://Jianzhi/index', $param);
$picurl = $config['cover'] ? get_cover_url($config['cover']) : 'http://img.wdjimg.com/mms/icon/v1/e/08/0f7cb18996b23754fed4b5fed2ff808e_256_256.png';
$articles[0] = array('Title' => $config['title'], 'Description' => $config['desc'], 'PicUrl' => $picurl, 'Url' => $url);
$this->replyNews($articles);
}
开发者ID:Rayuu,项目名称:weiphp,代码行数:12,代码来源:WeixinAddonModel.class.php
示例16: lists
public function lists()
{
$map['token'] = get_token();
session('common_condition', $map);
$list_data = $this->_get_model_list($this->model);
foreach ($list_data['list_data'] as &$vo) {
$vo['img'] = '<img src="' . get_cover_url($vo['img']) . '" width="50px" >';
}
$this->assign($list_data);
//dump ( $list_data );
$templateFile = $this->model['template_list'] ? $this->model['template_list'] : '';
$this->display($templateFile);
}
开发者ID:ennnnny,项目名称:weiphp3,代码行数:13,代码来源:SlideshowController.class.php
示例17: reply
function reply($dataArr, $keywordArr = array())
{
$config = getAddonConfig('Hotel');
// 获取后台插件的配置参数
$hotel = M('hotel')->where(array('token' => get_token()))->find();
if ($hotel) {
$url = addons_url('Hotel://Web/index', array('token' => get_token(), 'openid' => get_openid()));
$articles[0] = array('Title' => $hotel['name'], 'Description' => $hotel['name'] . "\n电话:" . $hotel['tel'] . "\n地址:" . $hotel['address'] . "\n点击进入在线订房。", 'PicUrl' => get_cover_url($hotel['image']), 'Url' => $url);
$this->replyNews($articles);
} else {
$this->replyText('亲,老板正在配置酒店,请稍后再来...');
}
}
开发者ID:Rayuu,项目名称:weiphp,代码行数:13,代码来源:WeixinAddonModel.class.php
示例18: _initialize
function _initialize()
{
parent::_initialize();
$controller = strtolower(_CONTROLLER);
/*
* $res ['title'] = '微网设置';
* $res ['url'] = addons_url ( 'WeiSite://WeiSite/config' );
* $res ['class'] = $controller == 'weisite' ? 'current' : '';
* $nav [] = $res;
*
* $res ['title'] = '分类管理';
* $res ['url'] = addons_url ( 'WeiSite://Category/lists' );
* $res ['class'] = $controller == 'category' ? 'current' : '';
* $nav [] = $res;
*
* $res ['title'] = '首页幻灯片';
* $res ['url'] = addons_url ( 'WeiSite://Slideshow/lists' );
* $res ['class'] = $controller == 'slideshow' ? 'current' : '';
* $nav [] = $res;
*
* $res ['title'] = '底部导航';
* $res ['url'] = addons_url ( 'WeiSite://Footer/lists' );
* $res ['class'] = $controller == 'footer' ? 'current' : '';
* $nav [] = $res;
*
* $res ['title'] = '文章管理';
* $res ['url'] = addons_url ( 'WeiSite://Cms/lists' );
* $res ['class'] = $controller == 'cms' ? 'current' : '';
* $nav [] = $res;
*
* $res ['title'] = '模板管理';
* $res ['url'] = addons_url ( 'WeiSite://Template/index' );
* $res ['class'] = $controller == 'template' ? 'current' : '';
* $nav [] = $res;
*/
$this->assign('nav', array());
$config = getAddonConfig('WeiSite');
$config['cover_url'] = get_cover_url($config['cover']);
$config['background_id'] = $config['background'];
$config['background'] = get_cover_url($config['background']);
$this->config = $config;
$this->assign('config', $config);
// dump ( $config );
// dump(get_token());
// 定义模板常量
$act = strtolower(_ACTION);
$temp = $config['template_' . $act];
$act = ucfirst($act);
$this->assign('page_title', $config['title']);
define('CUSTOM_TEMPLATE_PATH', ONETHINK_ADDON_PATH . 'WeiSite/View/default/Template');
}
开发者ID:yxz1025,项目名称:weiphp3.0,代码行数:51,代码来源:BaseController.class.php
示例19: reply
function reply($dataArr, $keywordArr = array())
{
$config = getAddonConfig('MoonEating');
// 获取后台插件的配置参数
//dump($config);
//$url = addons_url( 'Dreammore://Dreammore/index', array('openid'=>get_openid(), 'token'=>get_token()) );
//$this->replyText( $config['title'] );
$param['token'] = get_token();
$param['openid'] = get_openid();
$picurl = get_cover_url($config['cover']);
$url = addons_url('MoonEating://MoonEating/index', $param);
$articles[0] = $arrayName = array('Title' => $config['title'], 'Description' => $config['desc'], 'PicUrl' => $picurl, 'Url' => $url);
$this->replyNews($articles);
}
开发者ID:Rayuu,项目名称:weiphp,代码行数:14,代码来源:WeixinAddonModel.class.php
示例20: image
function image()
{
$list_data = $this->_get_data('image');
unset($list_data['list_grids']['group_id'], $list_data['list_grids']['content']);
foreach ($list_data['list_data'] as &$d) {
$map2['id'] = $d['image_id'];
$url = M('material_image')->where($map2)->getField('cover_url');
// $d ['image_id'] = url_img_html ( $url );
$d['image_id'] = url_img_html(get_cover_url($d['image_id']));
}
$this->assign($list_data);
// dump($list_data);
$this->display('lists');
}
开发者ID:chenpusn,项目名称:guoxian,代码行数:14,代码来源:AutoReplyController.class.php
注:本文中的get_cover_url函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论