ecshop广告-》单张,多张
2015-10-24 11:25
302 查看
//读取广告 function get_ad_id($ad_id){ //读取指定ad_id广告 $sql = 'select * from '. $GLOBALS['ecs']->table('ad') .'where ad_id = '.$ad_id; $result = $GLOBALS['db']->GetAll($sql); $result[0]['url'] = 'http://localhost'.url_domain().'affiche.php?ad_id='.$result[0]['ad_id'].'&from=&uri='.$result[0]['ad_link']; return $result; } function get_ad_class($position_id){ //读取分类下所有广告 $sql = 'select * from '. $GLOBALS['ecs']->table('ad') .'where position_id = '.$position_id; $result = $GLOBALS['db']->GetAll($sql); foreach($result as $k=>$v){ $result[$k]['url'] = 'http://localhost'.url_domain().'affiche.php?ad_id='.$v['ad_id'].'&from=&uri='.$v['ad_link']; } return $result; }
相关文章推荐
- VS中使用openssl/aes加密解密
- centos6.7x86_64php7安装笔记 new
- 查看linux下arp信息
- 查看linux下网卡mac地址
- linux下通过lseek()实现文件大小设置
- 查看linux路由信息
- OpenCV之创建Mat函数的方法
- hadoop 读书笔记(1)
- OpenCV—图像椒盐噪声生成器
- 定制自己的内核
- 内核配置与裁剪浅析
- centos 安装rpmforge、rpmfusion、epel软件仓库 ( a old article !!!!!! )
- linux日志文件
- Linux系统下设置静态IP或自动获取动态IP的简单方法
- Linux下的platform总线驱动
- Ubuntu 14.04 wubi 硬盘安装 ~ linux小白
- Openstack Murano(kilo)二次开发之添加Volume
- CentOS yum 源的配置与使用----rpmforge
- Docker的那些事(1)--什么是Docker和如何迁移
- Opencv + cuda 混编模式