本文整理匯總了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