当前位置: 首页>>代码示例>>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;未经允许,请勿转载。