當前位置: 首頁>>代碼示例>>PHP>>正文


PHP query_picture函數代碼示例

本文整理匯總了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;
}
開發者ID:nullog,項目名稱:zhanglubao,代碼行數:61,代碼來源:query_match.php

示例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">
開發者ID:nullog,項目名稱:zhanglubao,代碼行數:31,代碼來源:2c08e54e04dda21121e859974571739d.php

示例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"]);
            ?>
開發者ID:wait121000,項目名稱:zhanglubao,代碼行數:31,代碼來源:fd1fd260ad40e2e515dc79ffecfc2073.php

示例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>
開發者ID:wait121000,項目名稱:zhanglubao,代碼行數:31,代碼來源:418a470c79711098ce51807e2a38fdeb.php

示例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"];
            ?>
開發者ID:nullog,項目名稱:zhanglubao,代碼行數:31,代碼來源:6f7ad85fa8673dabbbf7861cf71fc2f7.php

示例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>
開發者ID:nullog,項目名稱:zhanglubao,代碼行數:31,代碼來源:22d680651f4a130c55f1d61bcfdfb0e5.php

示例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
開發者ID:nullog,項目名稱:zhanglubao,代碼行數:31,代碼來源:ac340456db9c8b71259f33ae539f4d81.php

示例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"]);
            ?>
開發者ID:nullog,項目名稱:zhanglubao,代碼行數:31,代碼來源:c75cbed005380367c96c4d2e1eea063f.php

示例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">
開發者ID:nullog,項目名稱:zhanglubao,代碼行數:31,代碼來源:ac7ffa9b046535e99009ebafa69474cf.php

示例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">
開發者ID:nullog,項目名稱:zhanglubao,代碼行數:31,代碼來源:ab21c9e1b1edc5218b6c5002fad4154b.php

示例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">
開發者ID:nullog,項目名稱:zhanglubao,代碼行數:31,代碼來源:01eea104bb77db3b07937a7a1fb8e3f2.php

示例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 
開發者ID:nullog,項目名稱:zhanglubao,代碼行數:31,代碼來源:ff7c4e4e938fbd26131ee8449bbe7d22.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 
開發者ID:nullog,項目名稱:zhanglubao,代碼行數:31,代碼來源:c763a7bc97245dbea1972c827f306c16.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">
開發者ID:nullog,項目名稱:zhanglubao,代碼行數:31,代碼來源:b0ec720d3fe0d40434b6eef4eaa1c89b.php

示例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 
開發者ID:nullog,項目名稱:zhanglubao,代碼行數:31,代碼來源:54692f135996282984b9962e023e860c.php


注:本文中的query_picture函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。