• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP tplFetch函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中tplFetch函数的典型用法代码示例。如果您正苦于以下问题:PHP tplFetch函数的具体用法?PHP tplFetch怎么用?PHP tplFetch使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了tplFetch函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: getImageServer

 public function getImageServer($server = '', $request = array())
 {
     global $_FANWE;
     $result = array();
     $result['status'] = 0;
     if ($_FANWE['uid'] == 0) {
         return $result;
     }
     $type = $request['type'];
     switch ($type) {
         case 'uploadphoto':
             $server = FS("Image")->formatServer($server, 'DE');
             break;
         case 'uploadavatar':
             $server = FS("Image")->getServer($_FANWE['user']['server_code']);
             break;
     }
     $server = FS("Image")->getImageUrlToken($request['args'], $server);
     if ($server === false) {
         return $result;
     }
     switch ($type) {
         case 'uploadphoto':
             $cache_file = getTplCache('services/image/pic_item');
             $args = array();
             $result['html'] = base64_encode(tplFetch("services/image/pic_item", $args, '', $cache_file));
             break;
     }
     $result['status'] = 1;
     $result['max_upload'] = (int) $_FANWE['setting']['max_upload'];
     $result['url'] = $server['url'];
     $result['token'] = $server['token'];
     $result['image_server'] = $server['image_server'];
     return $result;
 }
开发者ID:BGCX261,项目名称:zhubao-tupu-svn-to-git,代码行数:35,代码来源:fanwe.service.php


示例2: getHomeNav

/**
 * 右侧会员空间导航模块
 * @param $uid
 */
function getHomeNav($args)
{
    list($uid, $active) = explode(',', $args);
    unset($args);
    $args = array('uid' => $uid, 'active' => $active, 'user' => FS('User')->getUserById($uid), 'user_show_name' => FS('User')->getUserShowName($uid));
    return tplFetch('inc/u/home_nav', $args);
}
开发者ID:dalinhuang,项目名称:concourse,代码行数:11,代码来源:u.dynamic.php


示例3: getShareByUserClickShareID

function getShareByUserClickShareID()
{
    global $_FANWE;
    $share_id = (int) $_FANWE['user_click_share_id'];
    if ($share_id > 0) {
        $share = FS('Share')->getShareById($share_id);
        if ($share) {
            $temp_share[] = $share;
            $temp_share = FS('Share')->getShareDetailList($temp_share, false, false, false, true, 5);
            $temp_share = $temp_share[$share_id];
            $args = array('share' => &$temp_share);
            $result = array();
            $result['share_id'] = $share_id;
            switch (ACTION_NAME) {
                case 'dapei':
                    $result['html'] = tplFetch('inc/book/book_dapei', $args);
                    break;
                case 'look':
                    $result['html'] = tplFetch('inc/book/book_look', $args);
                    break;
                default:
                    $result['html'] = tplFetch('inc/book/book_index', $args);
                    break;
            }
            return "ShowUserClickShare(" . outputJson($result, false) . ");";
        }
    }
    return '';
}
开发者ID:dalinhuang,项目名称:concourse,代码行数:29,代码来源:book.dynamic.php


示例4: detail

    public function detail()
    {
        global $_FANWE;
        $id = intval($_FANWE['request']['id']);
        if ($id == 0) {
            fHeader("location: " . FU('index/index'));
        }
        include fimport('dynamic/u');
        //获取相关的分享ID
        $eventinfo = FDB::fetchFirst("select * from " . FDB::table("event") . " where id=" . $id);
        if (intval($eventinfo['share_id']) == 0) {
            fHeader("location: " . FU('index/index'));
        }
        $eventinfo['share'] = FS('Share')->getShareDetail($eventinfo['share_id']);
        if ($share_detail === false) {
            fHeader("location: " . FU('index'));
        }
        $user_share_collect = FS('Share')->getShareCollectUser($eventinfo['share_id']);
        $page_title = preg_replace("/\\[[^\\]]+\\]/i", "", $eventinfo['title']);
        $_FANWE['nav_title'] = $page_title . ' - ' . lang('common', 'event');
        $_FANWE['seo_description'] = $page_title;
        $_FANWE['setting']['site_description'] = '';
        //分享评论
        $page_args = array('id' => $id);
        $count = $eventinfo['thread_count'];
        $post_list = array();
        if ($count > 0) {
            $pager = buildPage('event/' . ACTION_NAME, $page_args, $count, $_FANWE['page'], 10);
            $sql = 'SELECT share_id FROM ' . FDB::table('event_share') . ' 
				WHERE event_id = ' . $id . ' ORDER BY share_id DESC LIMIT ' . $pager['limit'];
            $ids = array();
            $res = FDB::query($sql);
            while ($data = FDB::fetch($res)) {
                $ids[] = $data['share_id'];
            }
            $ids = implode(',', $ids);
            $sql = 'SELECT * from ' . FDB::table('share') . ' where share_id IN (' . $ids . ') ORDER BY share_id';
            $list = FDB::fetchAll($sql);
            $post_list = FS('Share')->getShareDetailList($list, true, true, true);
        }
        $args = array('share_list' => &$post_list, 'pager' => &$pager, 'current_share_id' => $eventinfo['share_id']);
        $post_html = tplFetch("inc/share/post_share_list", $args);
        //热门话题
        $hot_event_list = FS("event")->getHotEvent(10);
        if (intval($_FANWE['uid']) > 0) {
            //我发布的
            $me_event_list = FS("event")->getUserEvent($_FANWE['uid'], 5);
            //我参与的
            $me_join_event_list = FS("event")->getUserJoinevent($_FANWE['uid'], 5);
        }
        if (intval($_FANWE['page']) == 1) {
            FDB::query('UPDATE ' . FDB::table('share') . ' SET click_count = click_count + 1 WHERE share_id = ' . $eventinfo['share_id']);
        }
        include template('page/event/event_detail');
        display();
    }
开发者ID:dalinhuang,项目名称:concourse,代码行数:56,代码来源:event.module.php


示例5: getTipUserFollow

function getTipUserFollow($uid)
{
    global $_FANWE;
    $is_follow = false;
    if ($_FANWE['uid'] > 0 && $_FANWE['uid'] != $uid) {
        $is_follow = FS('User')->getIsFollowUId($uid);
    }
    $args = array('uid' => $uid, 'is_follow' => $is_follow);
    return tplFetch('services/user/tip_follow', $args);
}
开发者ID:dalinhuang,项目名称:concourse,代码行数:10,代码来源:user.dynamic.php


示例6: getBestFlashs

function getBestFlashs($fid)
{
    global $_FANWE;
    $args = array();
    $cache_file = getTplCache('inc/club/flash_topic', array($fid), 1);
    if (getCacheIsUpdate($cache_file, 300)) {
        $args['best_list'] = FS('Topic')->getImgTopic('best', 6, 1, $fid);
    }
    return tplFetch('inc/club/flash_topic', $args, '', $cache_file);
}
开发者ID:dalinhuang,项目名称:concourse,代码行数:10,代码来源:club.dynamic.php


示例7: getHotUser

/**
 * 热心排行榜
 */
function getHotUser()
{
    $cache_file = getTplCache('inc/ask/hot_user', array(), 1);
    if (getCacheIsUpdate($cache_file, 300)) {
        //热心排行榜
        $sql = "SELECT uc.uid,u.user_name,uc.ask,ask_posts,uc.ask_best_posts \r\n\t\t\tFROM " . FDB::table("user_count") . " AS uc \r\n\t\t\tINNER JOIN " . FDB::table("user") . " AS u ON u.uid = uc.uid \r\n\t\t\tORDER BY uc.ask_best_posts DESC ,uc.ask_posts DESC limit 10";
        $hot_users = FDB::fetchAll($sql);
        $args['hot_users'] =& $hot_users;
    }
    return tplFetch('inc/ask/hot_user', $args, '', $cache_file);
}
开发者ID:BGCX261,项目名称:zhubao-tupu-svn-to-git,代码行数:14,代码来源:ask.dynamic.php


示例8: detail

 function detail()
 {
     global $_FANWE;
     $id = intval($_FANWE['request']['tid']);
     if ($id == 0) {
         fHeader('location: ' . FU('club/index'));
     }
     $topic = FS('Topic')->getTopicById($id);
     if (empty($topic)) {
         fHeader('location: ' . FU('club/index'));
     }
     $_FANWE['nav_title'] = lang('common', 'club');
     $_FANWE['nav_title'] = $topic['title'] . ' - ' . $_FANWE['nav_title'];
     FDB::query('UPDATE ' . FDB::table('share') . ' SET click_count = click_count + 1 WHERE share_id = ' . $topic['share_id']);
     $topic['time'] = getBeforeTimelag($topic['create_time']);
     $topic['share'] = FS('Share')->getShareDetail($topic['share_id']);
     $user_share_collect = FS('Share')->getShareCollectUser($topic['share_id']);
     $forum_id = $topic['fid'];
     $forum = $_FANWE['cache']['forums']['all'][$forum_id];
     $root_forum = $forum;
     $is_root = true;
     if ($forum['parent_id'] > 0) {
         $is_root = false;
         $root_forum = $_FANWE['cache']['forums']['all'][$forum['parent_id']];
     }
     FS('Topic')->updateTopicLooksCache($id);
     $topic_looks = FS('Topic')->getTopicLooks($id, 33);
     $is_follow = FS('Topic')->getIsFollowTid($id);
     $follow_count = FS('Topic')->getTopicFollowCount($id);
     $follow_users = FS('Topic')->getTopicFollows($id, 9);
     $user_new_topics = FS('Topic')->getUserNewTopicList($id, $topic['uid'], 5);
     $forum_hot_topics = FS('Topic')->getHotTopicList($id, $root_forum['fid'], 9);
     $forum_new_topics = FS('Topic')->getNowTopicList($id, $root_forum['fid'], 10);
     $forum_hot_pics = FS('Topic')->getImgTopic('hot', 9, 1, $root_forum['fid']);
     $new_events = FS('Event')->getHotNewEvent(10);
     $best_topics = FS('Topic')->getImgTopic('hot', 12, 1);
     $best_topics = array_chunk($best_topics, 3);
     $page_args = array('tid' => $id);
     $count = $topic['post_count'];
     $pager = buildPage('club/' . ACTION_NAME, $page_args, $count, $_FANWE['page'], 10);
     $post_list = FS('Topic')->getTopicPostList($id, $pager['limit']);
     $args = array('share_list' => &$post_list, 'pager' => &$pager, 'current_share_id' => $topic['share_id']);
     $post_html = tplFetch("inc/share/post_share_list", $args);
     include template('page/club/club_detail');
     display();
 }
开发者ID:dalinhuang,项目名称:concourse,代码行数:46,代码来源:club.module.php


示例9: getIndexCateShare

/**
 * 首页分类推荐分享
 */
function getIndexCateShare()
{
    $args = array();
    $cache_file = getTplCache('inc/index/index_cate_share', array(), 1);
    if (getCacheIsUpdate($cache_file, 600)) {
        global $_FANWE;
        FanweService::instance()->cache->loadCache('goods_category');
        $cate_indexs = $_FANWE['cache']['goods_category']['all'];
        foreach ($cate_indexs as $k => $v) {
            if ($v['parent_id'] == 0 && $v['is_index'] == 1) {
                $cids = array();
                FS('Share')->getChildCids($v['cate_id'], $cids);
                /*$tags = FDB::fetchAll("select gt.tag_name,gt.tag_code from ".FDB::table("goods_category_tags")." as gct INNER JOIN ".FDB::table("goods_tags")." as gt on gt.tag_id = gct.tag_id where gct.cate_id in (".implode(",",$cids).") order by  gct.weight desc,gt.count desc,gt.tag_id desc limit 12");
                		foreach($tags as $tk=>$tv){
                			$tags[$tk]["encode"] = urlencode($tv['tag_code']);
                		}
                		$v['hot_tags'] = $tags ;
                		*/
                $v['share_count'] = FDB::resultFirst("select count(DISTINCT s.uid) from " . FDB::table("share") . " as s INNER JOIN " . FDB::table("share_category") . " as sc ON sc.share_id = s.share_id where sc.cate_id in (" . implode(",", $cids) . ")");
                $v['user'] = array();
                $users = FDB::fetchAll("select DISTINCT(s.uid) as uid from " . FDB::table("share") . " as s INNER JOIN " . FDB::table("share_category") . " as sc ON sc.share_id = s.share_id where sc.cate_id in (" . implode(",", $cids) . ") order by s.share_id desc limit 10");
                foreach ($users as $kk => $vv) {
                    $user = FS("User")->getUserShowName($vv['uid']);
                    $v['user'][$vv['uid']] = $user['name'];
                }
                $sql = "SELECT s.*,st.tag_name FROM " . FDB::table("share") . " as s \r\n\t\t\t\t\t\tINNER JOIN " . FDB::table("share_category") . " as sc ON sc.share_id = s.share_id \r\n\t\t\t\t\t\tINNER JOIN " . FDB::table("share_tags") . " as st ON st.share_id = s.share_id\r\n\t\t\t\t\t\tINNER JOIN " . FDB::table("goods_category_tags") . " as gct ON gct.cate_id = sc.cate_id\r\n\t\t\t\t\t\tWHERE gct.cate_id in (" . implode(",", $cids) . ") AND s.is_index=1 GROUP BY s.share_id ORDER BY s.sort desc,s.share_id desc limit 30";
                $v['share_list'] = FDB::fetchAll($sql);
                foreach ($v['share_list'] as $kk => $vv) {
                    $tag['tag_name'] = $vv['tag_name'];
                    $tag['tag_code'] = $vv['tag_name'];
                    $tag['encode'] = urlencode($vv['tag_name']);
                    $v['hot_tags'][$vv['tag_name']] = $tag;
                }
                $v['share_list'] = FS("Share")->getShareDetailList($v['share_list']);
                $args['cate_list'][] = $v;
            }
        }
        unset($cate_indexs);
    }
    return tplFetch('inc/index/index_cate_share', $args, '', $cache_file);
}
开发者ID:dalinhuang,项目名称:concourse,代码行数:44,代码来源:index.dynamic.php


示例10: FS

if ($uid == 0) {
    exit;
}
$share = FS('Share')->getShareById($share_id);
if (empty($share)) {
    exit;
}
if ($share['uid'] != $uid) {
    exit;
}
$tags = trim($_FANWE['request']['tags']);
$check_result = FS('Share')->checkWord($tags, 'tag');
if ($check_result['error_code'] == 1) {
    $result['status'] = 0;
    $result['error'] = $check_result['error_msg'];
    outputJson($result);
}
$tags = str_replace('***', '', $tags);
$tags = str_replace(' ', ' ', $tags);
$tags = explode(' ', $tags);
$tags = array_unique($tags);
$tags = array_slice($tags, 0, $_FANWE['setting']['share_tag_count']);
$share_tags['user'] = trim($_FANWE['request']['tags']);
FS('Share')->updateShareTags($share_id, $share_tags);
$args['tags'] = FS('Share')->getShareTags($share_id);
$args['tags'] = $args['tags']['user'];
FS('Share')->tagsFormat($args['tags']);
$result['tags'] = implode(' ', $tags);
$result['status'] = 1;
$result['html'] = tplFetch("services/share/tag_list", $args);
outputJson($result);
开发者ID:dalinhuang,项目名称:concourse,代码行数:31,代码来源:savetag.php


示例11: array

<?php

global $_FANWE;
$share_id = (int) $_FANWE['request']['share_id'];
if (!$share_id) {
    exit;
}
$img = FDB::resultFirst('select img from ' . FDB::table('share_photo') . ' where share_id = ' . $share_id);
$args = array('img' => $img);
if ($img) {
    $result['status'] = 1;
} else {
    $result['status'] = 0;
}
$result['html'] = tplFetch('services/share/detail', $args);
outputJson($result);
开发者ID:BGCX261,项目名称:zhubao-tupu-svn-to-git,代码行数:16,代码来源:sharedetail.php


示例12: FS

<?php

global $_FANWE;
$list = FS("Album")->getAlbumListByUid($_FANWE['uid']);
FanweService::instance()->cache->loadCache('albums');
$args = array('list' => &$list);
if ($_FANWE['request']['type'] == 'more') {
    $result['html'] = tplFetch('services/share/select_album_list', $args);
} else {
    $result['html'] = tplFetch('services/share/select_album', $args);
}
outputJson($result);
开发者ID:BGCX261,项目名称:zhubao-tupu-svn-to-git,代码行数:12,代码来源:selectalbum.php


示例13: getUserShareShopHtml

 /**
  * 获取会员分享的店铺百分比信息HTML
  * @param int $uid 会员编号
  * @param int $num 显示数量
  * @return string
  */
 public function getUserShareShopHtml($uid, $num = 10)
 {
     $user = FS('User')->getUserById($uid);
     $user_lang = $_FANWE['uid'] == $uid ? lang('user', 'me') : lang('user', 'ta_' . $user['gender']);
     $shops = ShopService::getUserShareShops($uid, $num);
     $args = array('shops' => &$shops, 'user' => &$user, 'user_lang' => &$user_lang);
     return tplFetch("inc/shop/user_shop_percent", $args);
 }
开发者ID:dalinhuang,项目名称:concourse,代码行数:14,代码来源:shop.service.php


示例14: FS

//未登陆直接退出
$uid = $_FANWE['uid'];
if ($uid == 0) {
    exit;
}
$share = FS('Share')->getShareById($share_id);
//没有分享直接退出
if (empty($share)) {
    exit;
}
$result = array();
if ($share['uid'] == $uid) {
    $result['status'] = 3;
    outputJson($result);
}
if (FS('Share')->getIsCollectByUid($share_id, $uid)) {
    $result['status'] = 2;
    outputJson($result);
}
FS('Share')->saveFav($share);
$share_dynamic = FS('Share')->getShareDynamic($share_id);
$result['count'] = $share_dynamic['collect_count'];
$result['status'] = 4;
$img_size = intval($_FANWE['request']['size']);
if ($img_size == 0) {
    $img_size = 12;
}
$user_list = FS('Share')->getShareCollectUser($share_id, $_FANWE['uid'], $img_size);
$args = array('collects' => $user_list, 'img_size' => 32);
$result['collects'] = tplFetch("inc/share/collect_list", $args);
outputJson($result);
开发者ID:dalinhuang,项目名称:concourse,代码行数:31,代码来源:fav.php


示例15: FS

}
$share = FS('Share')->getShareById($share_id);
//没有分享直接退出
if (empty($share)) {
    exit;
}
$result = array('status' => 1, 'html' => '', 'error' => '');
if (!checkIpOperation("add_comment", SHARE_INTERVAL_TIME)) {
    $result['status'] = 0;
    $result['error'] = lang('share', 'interval_tips');
    outputJson($result);
}
$check_result = FS('Share')->checkWord($_FANWE['request']['content'], 'content');
if ($check_result['error_code'] == 1) {
    $result['status'] = 0;
    $result['error'] = $check_result['error_msg'];
    outputJson($result);
}
$comment_id = FS('Share')->saveComment($_FANWE['request']);
//FS("User")->updateUserScore($_FANWE['uid'],'share','comments',$_FANWE['request']['content'],$comment_id);
$comment = FS('Share')->getShareComment($comment_id);
$comment['user'] = array('uid' => $_FANWE['uid'], 'user_name' => $_FANWE['user_name'], 'url' => FU('u/index', array('uid' => $_FANWE['uid'])));
$comment['time'] = getBeforeTimelag($comment['create_time']);
$is_remove_comment = FS('Share')->getIsRemoveComment($share);
$args = array('comment' => $comment, 'is_remove_comment' => $is_remove_comment);
if ($_FANWE['request']['comment_type'] == 'album') {
    $result['html'] = tplFetch('services/album/comment_item', $args);
} else {
    $result['html'] = tplFetch('inc/share/comment_item', $args);
}
outputJson($result);
开发者ID:dalinhuang,项目名称:concourse,代码行数:31,代码来源:addcomment.php


示例16: array

<?php

if (!isset($_FILES['image']) || empty($_FILES['image'])) {
    exit;
}
$result = array();
$pic = $_FILES['image'];
include_once fimport('class/image');
$image = new Image();
if (intval($_FANWE['setting']['max_upload']) > 0) {
    $image->max_size = intval($_FANWE['setting']['max_upload']);
}
$image->init($pic);
if ($image->save()) {
    //$type = $_FANWE['request']['photo_type'];
    //if(empty($type) || !in_array($type,array('default', 'dapei', 'look')))
    //$type = 'default';
    $result['img'] = $image->file['target'];
    $result['status'] = 1;
    $info = array('path' => $image->file['local_target'], 'type' => $_FANWE['request']['photo_type']);
    $result['info'] = authcode(serialize($info), 'ENCODE');
    $args = array('result' => $result);
    $result['html'] = tplFetch("services/share/pic_item", $args);
} else {
    $result['status'] = 0;
}
$json = getJson($result);
echo "<textarea>{$json}</textarea>";
开发者ID:BGCX261,项目名称:zhubao-tupu-svn-to-git,代码行数:28,代码来源:uploadpic.php


示例17: intval

<?php

$page = $_FANWE['page'];
if ($page == 0) {
    echo '{"status":0}';
    exit;
}
$size = intval($_FANWE['request']['size']);
if ($size == 0 || $size > 50) {
    $size = 15;
}
$limit = $page * $size . ',' . $size;
$daren_list = FS('Daren')->getDarens($limit);
$daren_count = count($daren_list);
if ($size - $daren_count > 0) {
    $limit = '0,' . ($size - $daren_count);
    $daren_list1 = FS('Daren')->getDarens($limit);
    $daren_list = array_merge($daren_list, $daren_list1);
    $page = 0;
}
$args['no_lazyload'] = 1;
$args['daren_list'] = $daren_list;
$html = tplFetch('inc/index/daren_list', $args);
$page++;
outputJson(array('status' => 1, 'html' => $html, 'page' => $page));
开发者ID:dalinhuang,项目名称:concourse,代码行数:25,代码来源:daren.php


示例18: getTplCache

<?php

$cache_file = getTplCache('services/share/expression');
if (!@(include $cache_file)) {
    $expressions = getCache('expression');
    if ($expressions === NULL) {
        $expressions = array();
        $res = FDB::query('SELECT type,title,emotion,filename 
			FROM ' . FDB::table('expression') . ' ORDER BY type');
        while ($data = FDB::fetch($res)) {
            $data['url'] = './public/expression/' . $data['type'] . '/' . $data['filename'];
            $data['emotion'] = str_replace(array('[', ']'), array('', ''), $data['emotion']);
            $expressions[$data['type']][] = $data;
        }
        setCache('expression', $expressions);
    }
    $expressions_js = array();
    foreach ($expressions as $ekty => $elist) {
        $args = array('current_exp' => &$elist);
        $expressions_js[$ekty] = tplFetch("services/share/expression_item", $args);
    }
    $expressions_json = getJson($expressions_js);
    $current_exp = current($expressions_js);
    include template('services/share/expression');
}
display($cache_file);
开发者ID:dalinhuang,项目名称:concourse,代码行数:26,代码来源:expression.php


示例19: array

<?php

$_FANWE['request']['uid'] = $_FANWE['uid'];
$result = array();
if (!checkIpOperation("add_share", SHARE_INTERVAL_TIME)) {
    $result['status'] = 0;
    $result['error_msg'] = lang('share', 'interval_tips');
    outputJson($result);
}
$share = FS('Share')->submit($_FANWE['request'], true, true);
if ($share['status']) {
    $result['status'] = 1;
    $result['error_code'] = $share['error_code'];
    $result['error_msg'] = $share['error_msg'];
    $list = array();
    $list[] = FS('Share')->getShareById($share['share_id']);
    $list = FS('Share')->getShareDetailList($list, true, true, true);
    $args = array('share_item' => current($list));
    $result['html'] = tplFetch('services/share/u_share_item', $args);
} else {
    $result['status'] = 0;
    $result['error_code'] = $share['error_code'];
    $result['error_msg'] = $share['error_msg'];
}
outputJson($result);
开发者ID:dalinhuang,项目名称:concourse,代码行数:25,代码来源:post.php


示例20: array

			FROM ' . FDB::table("album") . $share_condition . "\r\n\t\t\tORDER BY id DESC LIMIT " . $next_limit;
$hasNextPage = FDB::fetchAll($next_sql);
if ($hasNextPage) {
    $is_next = 1;
} else {
    $is_next = 0;
}
$album_list = FDB::fetchAll($sql);
if ($album_list) {
    $list = array();
    $current_user = array();
    $current_user['u_url'] = FU('u/index', array('uid' => $_FANWE['uid']));
    $current_user['avt'] = avatar($_FANWE['uid'], 's', $is_src = 1);
    foreach ($album_list as $k => $v) {
        $album_list[$k]['imgs'] = array();
        $img_sql = "select sp.img as img from " . FDB::table("share_photo") . " as sp left join " . FDB::table("album_share") . " as als on als.share_id = sp.share_id left join " . FDB::table("album") . " as a on a.id = als.album_id where a.id = " . $v['id'];
        $res_img = FDB::query($img_sql);
        $photo_data = array();
        while ($img_data = FDB::fetch($res_img)) {
            $photo_data[] = $img_data['img'];
        }
        $album_list[$k]['url'] = FU('album/show', array('id' => $v['id']));
        $album_list[$k]['is_follow_album'] = FS('album')->getIsFollow($v['id'], $_FANWE['uid']);
        $album_list[$k]['isMe'] = $v['uid'] == $_FANWE['uid'] ? 1 : 0;
        $args = array('album_imgs' => &$photo_data, 'album_url' => &$album_list[$k]['url']);
        $album_list[$k]['imgs'] = tplFetch('services/album/album_img', $args);
    }
    outputJson(array('result' => $album_list, 'current_user' => $current_user, 'status' => 1, 'hasNextPage' => $is_next));
} else {
    outputJson(array('status' => 0, 'hasNextPage' => $is_next));
}
开发者ID:BGCX261,项目名称:zhubao-tupu-svn-to-git,代码行数:31,代码来源:album.php



注:本文中的tplFetch函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP tplUseTvs函数代码示例发布时间:2022-05-23
下一篇:
PHP tpl函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap