首页
模板
模板分类
整站模板
商铺模板
功能插件
会员中心
企业官网
授权
定制
设计稿
设计稿分类
平台网站
企业官网
案例
案例分类
企业官网
B2B网站
行业平台
外贸平台
百科
百科分类
热门搜索
答网友问
技术文章
联系
联系我们
微信联系
登录
/
注册
首页
>
标签
>
常用调用
>
常用调用
标签大全
高级标签
系统标签
系统常量
系统常用变量
系统函数
网站设置
各模块连接
各模块名称
会员模块常用调用
会员信息
通用调用
头部header区域
底部footer区域
常用调用
常用调用
列表页
通用
供应
供应-求购-商城共用
知道
商城
公司
内容页
通用
文章
品牌
商铺页
商铺页
手机版
手机版
公司LOGO调用方法
1、在/include中 查找到 global.func.php 这个文件 在这个文件中添加一个函数: function get_company_setting($userid, $key = '', $cache = '') { global $db; if($key) { $r = $db->get_one("SELECt * FROM {$db->pre}company_setting WHERe userid=$userid AND item_key='$key'", $cache); return $r ? $r['item_value'] : ''; } else { $setting = array(); if($cache) { $query = $db->query("SELECt * FROM {$db->pre}company_setting WHERe userid=$userid", $cache); } else { $query = $db->query("SELECt * FROM {$db->pre}company_setting WHERe userid=$userid", $cache); } while($r = $db->fetch_array($query)) { $setting[$r['item_key']] = $r['item_value']; } return $setting; } } 这个函数在module->company->global.func.php 中也有直接复制就行了 同时删掉 这个文件中的 这个函数,不然进company 会因为加载了两个同名函数而报错! 2、在首页需要显示logo的地方运用此函数 <!--{php $tags=tag("table=category&condition=parentid=0 and moduleid=4&order=listorder asc&template=null");}--> {loop $tags $i $t} <div id="xHTabC_{$i+1}" {if $i==0}class="newcar_con" style="display: block;margin-top: 10px; min-height:110px;"{/if} {if $i>0} class="newcar_con" style="display: none;margin-top: 10px; min-height:110px; "{/if} > <ul> <!--{php $tags2=tag("moduleid=4&condition=vip>0 and level>0 and catids like '%,".$t[catid].",%'&order=fromtime desc&template=null");}--> {loop $tags2 $t2} <li style="width:130px; overflow:hidden; float:left; min-height:110px;"> <div style="width:130px;text-align: center; height:110px; overflow:hidden; float:left; padding:0px"> <a href="{$t2[linkurl]}" target="_blank"><img src="{get_company_setting($t2[userid], $key = 'logo', $cache = '')}" width="80" height="80" alt=""/> <br><span>{$t2[company]}</span></a></div> </li> {/loop} </ul> </div> {/loop}
产地秀,助你成就大平台
便捷高效,快速部署
免费体验
联系我们
咨询电话
18176930112
13878897862
微信咨询
业务咨询