本文整理汇总了PHP中query_picture函数的典型用法代码示例。如果您正苦于以下问题:PHP query_picture函数的具体用法?PHP query_picture怎么用?PHP query_picture使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了query_picture函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: query_match
/**
* 支持的字段有
* member表中的所有字段,ucenter_member表中的所有字段
* 等级:title
* 头像:avatar32 avatar64 avatar128 avatar256 avatar512
* 个人中心地址:space_url
* 认证图标:icons_html
*
* @param $fields array|string 如果是数组,则返回数组。如果不是数组,则返回对应的值
* @param null $matchid
* @return array|null
*/
function query_match($fields, $matchid = null)
{
//如果fields不是数组,则返回值也不是数组
if (!is_array($fields)) {
$result = query_match(array($fields), $matchid);
return $result[$fields];
}
//默认获取自己的资料
$matchid = $matchid ? $matchid : 1;
if (!$matchid) {
return null;
}
//查询缓存,过滤掉已缓存的字段
$cachedFields = array();
$cacheResult = array();
foreach ($fields as $field) {
$cache = read_query_match_cache($matchid, $field);
if (!empty($cache)) {
$cacheResult[$field] = $cache;
$cachedFields[] = $field;
}
}
//获取两张用户表格中的所有字段
$matchModel = M('Match');
$matchFields = $matchModel->getDbFields();
$matchFields = array_intersect($matchFields, $fields);
//查询需要的字段
$matchResult = array();
if ($matchFields) {
$matchResult = $matchModel->where(array('id' => $matchid))->field($matchFields)->find();
}
//读取头像数据
$result = array();
//读取头像数据
if (in_array('cover', $fields)) {
$result['cover'] = query_picture('url', $matchResult['cover']);
}
//合并结果,不包括缓存
$result = array_merge($matchResult, $result);
//写入缓存
foreach ($result as $field => $value) {
$result[$field] = $value;
write_query_match_cache($matchid, $field, str_replace('"', '', $value));
}
//合并结果,包括缓存
$result = array_merge($result, $cacheResult);
//返回结果
return $result;
}
示例2: foreach
if (count($__LIST__) == 0) {
echo "";
} else {
foreach ($__LIST__ as $key => $hot) {
$mod = $i % 2;
++$i;
?>
<li>
<div class="video-thumb">
<a href="<?php
echo U('/video/' . $hot['id']);
?>
"> <img
src="/Public/Core/images/placeholder.png"
lazy-src="<?php
echo query_picture('url', $hot['cover']);
?>
"
alt="<?php
echo $hot['title'];
?>
" width="216px" height="120px">
</a>
<div class="video-name">
<span><?php
echo $hot['title'];
?>
</span>
</div>
</div>
<div class="video-des">
示例3: U
?>
<?php
if ($vo['goods']['is_new'] == 1) {
?>
<i class="ico_new"></i><?php
}
}
?>
<dl>
<dt>
<a href="<?php
echo U('Shop/Index/goodsDetail', array('id' => $vo['goods']['id']));
?>
">
<img class="img-responsive" src="<?php
echo query_picture('url', $vo . goods . goods_ico);
?>
" height="150px" width="222px">
</a>
</dt>
<dd>
<div class="left" style="width: 140px">
<a class="text-more color_33"
href="<?php
echo U('Shop/Index/goodsDetail', array('id' => $vo['goods']['id']));
?>
"
style="width: 100%;">
<font title="<?php
echo op_t($vo["goods"]["goods_name"]);
?>
示例4: foreach
$k = 0;
$__LIST__ = $recads;
if (count($__LIST__) == 0) {
echo "";
} else {
foreach ($__LIST__ as $key => $recad) {
$mod = $k % 2;
++$k;
?>
<li><a href="<?php
echo $recad['url'];
?>
"><img
style="height: 114px; width: 292px;"
src="/Public/Core/images/placeholder.png"
lazy-src="<?php
echo query_picture('url', $recad['cover']);
?>
"
alt="<?php
echo $recad['title'];
?>
"></a></li><?php
}
}
} else {
echo "";
}
?>
</ul>
</div>
示例5: foreach
if (count($__LIST__) == 0) {
echo "";
} else {
foreach ($__LIST__ as $key => $video) {
$mod = $i % 2;
++$i;
?>
<li>
<div class="video-thumb">
<a href="<?php
echo U('/video/' . $video['id']);
?>
"> <img
src="/Public/Static/quntiao/image/placeholder.png"
lazy-src="<?php
echo query_picture('url', $video['cover']);
?>
"
alt="<?php
echo $video['title'];
?>
" width="216px" height="120px">
</a>
</div>
<div class="video-des"><a href="<?php
echo U('/video/' . $video['id']);
?>
"><?php
echo $video["title"];
?>
示例6: foreach
if (count($__LIST__) == 0) {
echo "";
} else {
foreach ($__LIST__ as $key => $lol) {
$mod = $i % 2;
++$i;
?>
<li>
<div class="lol-thumb">
<a href="<?php
echo U('/video/' . $lol['id']);
?>
"> <img
src="/Public/Core/images/placeholder.png"
lazy-src="<?php
echo query_picture('url', $lol['cover']);
?>
"
alt="<?php
echo $lol['title'];
?>
" width="160px" height="90px">
</a>
<div class="lol-name">
<span><a href="<?php
echo U('/video/' . $lol['id']);
?>
"><?php
echo $lol['title'];
?>
</a></span>
示例7: foreach
if (count($__LIST__) == 0) {
echo "";
} else {
foreach ($__LIST__ as $key => $game) {
$mod = $i % 2;
++$i;
?>
<li>
<div>
<a href="<?php
echo U('/team/list/' . $game['id']);
?>
"> <img
src="/Public/Core/images/placeholder.png"
lazy-src="<?php
echo query_picture('url', $game['cover']);
?>
"
alt="<?php
echo $game['title'];
?>
" width="170" height="220">
</a>
</div>
<div class="game-des">
<span class="pull-left"><?php
echo $game['title'];
?>
</span> <span
class="pull-right"> <span
class="glyphicon glyphicon-user clo"></span> <span
示例8: U
?>
<i class="ico_new"></i><?php
}
}
?>
<dl>
<dt>
<a href="<?php
echo U('Shop/Index/goodsDetail', array('id' => $vo['id']));
?>
">
<img class="img-responsive" src="<?php
echo query_picture('url', $vo['goods_ico']);
?>
" height="150px" width="222px">
</a>
</dt>
<dd>
<div class="left" style="width: 140px">
<a class="text-more color_33"
href="<?php
echo U('Shop/Index/goodsDetail', array('id' => $vo['id']));
?>
"
style="width: 100%;">
<font title="<?php
echo op_t($vo["goods_name"]);
?>
示例9: foreach
if (count($__LIST__) == 0) {
echo "";
} else {
foreach ($__LIST__ as $key => $live) {
$mod = $i % 2;
++$i;
?>
<li>
<div class="live-thumb">
<a href="<?php
echo U('/live/' . $live['id']);
?>
"> <img
src="/Public/Core/images/placeholder.png"
lazy-src="<?php
echo query_picture('url', $live['cover']);
?>
"
alt="<?php
echo $live['title'];
?>
" width="216px" height="120px">
</a>
<div class="live-name">
<span><?php
echo $live["title"];
?>
</span>
</div>
</div>
<div class="live-des">
示例10: foreach
if (count($__LIST__) == 0) {
echo "";
} else {
foreach ($__LIST__ as $key => $series) {
$mod = $i % 2;
++$i;
?>
<li>
<div class="series-thumb">
<a href="<?php
echo U('/series/' . $series['id']);
?>
"> <img
src="/Public/Static/quntiao/image/placeholder.png"
lazy-src="<?php
echo query_picture('url', $series['cover']);
?>
"
alt="<?php
echo $series['title'];
?>
" width="216px" height="120px">
</a>
<div class="series-name">
<span><?php
echo $series['title'];
?>
</span>
</div>
</div>
<div class="series-des">
示例11: foreach
if (count($__LIST__) == 0) {
echo "";
} else {
foreach ($__LIST__ as $key => $dota) {
$mod = $i % 2;
++$i;
?>
<li>
<div class="video-thumb">
<a href="<?php
echo U('/video/' . $dota['id']);
?>
"> <img
src="/Public/Core/images/placeholder.png"
lazy-src="<?php
echo query_picture('url', $dota['cover']);
?>
"
alt="<?php
echo $dota['title'];
?>
" width="216px" height="120px">
</a>
<div class="video-name">
<span><?php
echo $dota['title'];
?>
</span>
</div>
</div>
<div class="video-des">
示例12: foreach
echo "";
} else {
foreach ($__LIST__ as $key => $match) {
$mod = $i % 2;
++$i;
?>
<li class="match-item">
<div class="match-item-image">
<a href="<?php
echo U('/match/' . $match['id']);
?>
"> <img width="273"
height="118" src="/Public/Static/quntiao/image/placeholder.png"
lazy-src="<?php
echo query_picture('url', $match['cover']);
?>
"
alt="<?php
echo $matche["title"];
?>
">
</a>
</div>
<div class="match-item-innr ">
<div class="match-item-tit">
<a href="<?php
echo U('/match/' . $match['id']);
?>
"><?php
示例13: foreach
if (count($__LIST__) == 0) {
echo "";
} else {
foreach ($__LIST__ as $key => $album) {
$mod = $i % 2;
++$i;
?>
<li>
<div class="album-thumb">
<a href="<?php
echo U('/album/' . $album['id']);
?>
"> <img
src="/Public/Core/images/placeholder.png"
lazy-src="<?php
echo query_picture('url', $album['cover']);
?>
"
alt="<?php
echo $album['title'];
?>
" width="216px" height="120px">
</a>
</div>
<div class="album-des">
<?php
echo $album['title'];
?>
</div>
</li><?php
示例14: foreach
if (count($__LIST__) == 0) {
echo "";
} else {
foreach ($__LIST__ as $key => $heartstone) {
$mod = $i % 2;
++$i;
?>
<li>
<div class="video-thumb">
<a href="<?php
echo U('/video/' . $heartstone['id']);
?>
"> <img
src="/Public/Core/images/placeholder.png"
lazy-src="<?php
echo query_picture('url', $heartstone['cover']);
?>
"
alt="<?php
echo $heartstone['title'];
?>
" width="216px" height="120px">
</a>
<div class="video-name">
<span><?php
echo $heartstone['title'];
?>
</span>
</div>
</div>
<div class="video-des">
示例15: foreach
if (count($__LIST__) == 0) {
echo "";
} else {
foreach ($__LIST__ as $key => $team) {
$mod = $i % 2;
++$i;
?>
<li>
<div class="team-thumb">
<a href="<?php
echo U('/team/' . $team['id']);
?>
"> <img
src="/Public/Core/images/placeholder.png"
lazy-src="<?php
echo query_picture('url', $team['cover']);
?>
"
alt="<?php
echo $team['name'];
?>
" width="140" height="140">
</a>
</div>
<div class="team-name">
<span><?php
echo $team['name'];
?>
</span>
</div>
</li><?php