当前位置: 首页>>代码示例>>PHP>>正文


PHP buildPage函数代码示例

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


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

示例1: all

    public function all()
    {
        global $_FANWE;
        $is_best = false;
        $is_all = true;
        $_FANWE['nav_title'] = lang('common', 'daren');
        $count = FDB::resultFirst('SELECT COUNT(uid) FROM ' . FDB::table('user_daren') . ' WHERE status = 1');
        $pager = buildPage('daren/all', array(), $count, $_FANWE['page'], 18);
        $col = 3;
        $index = 0;
        $list = array();
        $today_time = getTodayTime();
        $sql = 'SELECT ud.*,u.user_name,u.server_code,uc.fans,uc.goods,uc.shares,
			up.reside_province,up.reside_city,up.introduce 
			FROM ' . FDB::table('user_daren') . ' AS ud 
			INNER JOIN ' . FDB::table('user') . ' AS u ON u.uid = ud.uid 
			INNER JOIN ' . FDB::table('user_count') . ' AS uc ON uc.uid = u.uid 
			INNER JOIN ' . FDB::table('user_profile') . ' AS up ON up.uid = ud.uid 
			WHERE ud.status = 1 
			ORDER BY ud.day_time DESC,ud.id DESC LIMIT ' . $pager['limit'];
        $res = FDB::query($sql);
        while ($data = FDB::fetch($res)) {
            $data['today_best'] = false;
            $data['url'] = FU('u/index', array('uid' => $data['uid']));
            $province = $_FANWE['cache']['citys']['all'][$data['reside_province']]['name'];
            $city = $_FANWE['cache']['citys']['all'][$data['reside_city']]['name'];
            $data['city'] = $province . ' ' . $city;
            $list[$index % $col][] = $data;
            $index++;
        }
        include template('page/daren');
        display();
    }
开发者ID:dalinhuang,项目名称:concourse,代码行数:33,代码来源:daren.module.php

示例2: getPage

 private function getPage($key)
 {
     // Generate the object Page
     $Page = buildPage($key);
     if (!$Page) {
         return json_encode(array('status' => '0', 'bludit' => 'Bludit API plugin', 'message' => 'The page doesn\'t exist'));
     }
     return $Page->json();
 }
开发者ID:kaaleth,项目名称:bludit,代码行数:9,代码来源:plugin.php

示例3: target

 public function target()
 {
     define("ACTION_NAME", "target");
     if (intval($GLOBALS['fanwe']->var['uid']) == 0) {
         fHeader("location: " . FU('user/login'));
     }
     global $_FANWE;
     $sql = "select f.f_uid as uid,u.user_name from " . FDB::table("user_follow") . " as f left join " . FDB::table("user") . " as u on f.f_uid = u.uid where f.uid = " . intval($GLOBALS['fanwe']->var['uid']);
     $sql_count = "select count(f.f_uid) from " . FDB::table("user_follow") . " as f left join " . FDB::table("user") . " as u on f.f_uid = u.uid where f.uid = " . intval($GLOBALS['fanwe']->var['uid']);
     $page_size = 21;
     $count = FDB::resultFirst($sql_count);
     $pager = buildPage('message/target', array(), $count, $_FANWE['page'], $page_size);
     $sql = $sql . " limit " . $pager['limit'];
     $follow_user = FDB::fetchAll($sql);
     include template('page/message_target');
     display();
 }
开发者ID:BGCX261,项目名称:zhubao-tupu-svn-to-git,代码行数:17,代码来源:message.module.php

示例4: show

    public function show()
    {
        global $_FANWE;
        $id = (int) $_FANWE['request']['id'];
        if (!$id) {
            exit;
        }
        $shop = FDB::fetchFirst('SELECT * FROM ' . FDB::table('shop') . ' WHERE shop_id = ' . $id);
        if (!$shop) {
            fHeader("location: " . FU('shop/index'));
        }
        $_FANWE['nav_title'] = $shop['shop_name'] . ' - ' . $_FANWE['nav_title'];
        $cache_data = fStripslashes(unserialize($shop['data']));
        $shop['tags'] = $cache_data['tags'];
        if (empty($shop['taoke_url'])) {
            $shop['to_url'] = FU('tgo', array('url' => $shop['shop_url']));
        } else {
            $shop['to_url'] = FU('tgo', array('url' => $shop['taoke_url']));
        }
        $page_args['id'] = $id;
        $sql = 'SELECT COUNT(DISTINCT sg.share_id) FROM ' . FDB::table('share_goods') . ' AS sg 
			INNER JOIN ' . FDB::table('share') . ' AS s ON s.share_id = sg.share_id 
			WHERE s.status = 1 AND sg.shop_id = ' . $id;
        $share_count = FDB::resultFirst($sql);
        $page_size = 20;
        $pager = buildPage('shop/show', $page_args, $share_count, $_FANWE['page'], $page_size);
        $share_ids = array();
        $sql = 'SELECT DISTINCT sg.share_id FROM ' . FDB::table('share_goods') . ' AS sg 
			INNER JOIN ' . FDB::table('share') . ' AS s ON s.share_id = sg.share_id 
			WHERE s.status = 1 AND sg.shop_id = ' . $id . ' ORDER BY sg.share_id DESC LIMIT ' . $pager['limit'];
        $res = FDB::query($sql);
        while ($data = FDB::fetch($res)) {
            $share_ids[] = $data['share_id'];
        }
        $share_list = array();
        if (count($share_ids) > 0) {
            $share_ids = implode(',', $share_ids);
            $sql = 'SELECT * FROM ' . FDB::table('share') . ' WHERE share_id IN (' . $share_ids . ') ORDER BY share_id DESC';
            $share_list = FDB::fetchAll($sql);
            $share_list = FS('Share')->getShareDetailList($share_list, false, true, true, false, 0, 10);
        }
        $shops_tags = FS('Shop')->getUserOtherShopAndTags($id);
        include template('page/shop/shop_show');
        display();
    }
开发者ID:dalinhuang,项目名称:concourse,代码行数:45,代码来源:shop.module.php

示例5: buildAllPages

function buildAllPages()
{
    global $pagesParents;
    global $dbPages;
    $list = $dbPages->getDB();
    // Clean pages array.
    $pages = array();
    unset($list['error']);
    foreach ($list as $key => $db) {
        $Page = buildPage($key);
        if ($Page !== false) {
            // --- Order pages by parents ---
            // Generate all posible parents.
            if ($Page->parentKey() === false) {
                // Add the parent key in the dbPages
                $dbPages->addParentKey($Page->key());
                $pagesParents[NO_PARENT_CHAR][$Page->key()] = $Page;
            } else {
                $pagesParents[$Page->parentKey()][$Page->key()] = $Page;
            }
            // --- All pages in 1 array ---
            $pages[$Page->key()] = $Page;
        }
    }
    // --- SORT PAGES ---
    // Sort parents.
    $parents = $pagesParents[NO_PARENT_CHAR];
    uasort($parents, 'sortPages');
    // Sort children.
    unset($pagesParents[NO_PARENT_CHAR]);
    $children = $pagesParents;
    $tmpPageWithParent = array();
    foreach ($children as $parentKey => $childrenPages) {
        // If the child doesn't have a valid parent, then doesn't included them.
        if (isset($pages[$parentKey])) {
            $tmpPageWithParent[$parentKey] = $childrenPages;
            uasort($tmpPageWithParent[$parentKey], 'sortPages');
        }
    }
    $pagesParents = array(NO_PARENT_CHAR => $parents) + $tmpPageWithParent;
    return $pages;
}
开发者ID:michaelctorres,项目名称:bludit,代码行数:42,代码来源:71.pages.php

示例6: index

 public function index()
 {
     global $_FANWE;
     $where = ' WHERE status = 1 AND (begin_time <= ' . TIME_UTC . ' OR begin_time = 0) AND (end_time >= ' . TIME_UTC . ' OR end_time = 0)';
     $order = ' ORDER BY sort ASC,end_time ASC,id DESC';
     $best_list = array();
     $best_ids = array();
     $sql = 'SELECT * FROM ' . FDB::table('exchange_goods') . $where . ' AND is_best = 1 ' . $order . ' LIMIT 0,4';
     $res = FDB::query($sql);
     while ($data = FDB::fetch($res)) {
         $data['num'] = $data['stock'] - $data['buy_count'];
         $data['url'] = FU('exchange/show', array('id' => $data['id']));
         $best_list[] = $data;
         $best_ids[] = $data['id'];
     }
     if (count($best_ids) > 0) {
         $best_ids = implode(',', $best_ids);
         $where .= ' AND id NOT IN (' . $best_ids . ')';
     }
     $sql = 'SELECT COUNT(id) FROM ' . FDB::table('exchange_goods') . $where;
     $goods_count = FDB::resultFirst($sql);
     $page_size = 10;
     $pager = buildPage('exchange/index', array(), $goods_count, $_FANWE['page'], $page_size);
     $sql = 'SELECT * FROM ' . FDB::table('exchange_goods') . $where . $order . ' LIMIT ' . $pager['limit'];
     $goods_list = array();
     $res = FDB::query($sql);
     while ($data = FDB::fetch($res)) {
         $data['num'] = $data['stock'] - $data['buy_count'];
         $data['url'] = FU('exchange/show', array('id' => $data['id']));
         $goods_list[] = $data;
     }
     $order_list = FS("Exchange")->getOrderTop();
     $score_list = FS("Exchange")->getScoreTop();
     $exchange_list = FS("Exchange")->getExchangeTop();
     if ($_FANWE['uid'] > 0) {
         $consignee = FDB::fetchFirst('SELECT * FROM ' . FDB::table('user_consignee') . ' WHERE uid = ' . $_FANWE['uid']);
     }
     include template('page/exchange/exchange_index');
     display();
 }
开发者ID:dalinhuang,项目名称:concourse,代码行数:40,代码来源:exchange.module.php

示例7: showPage

function showPage($configItems, $typeOfDemo)
{
    global $manifest;
    global $paths;
    // paths related to the environment
    global $typeOfDemo;
    $paths["webDefault"] = $paths["webHome"] . "/default/templates/" . $typeOfDemo;
    include $paths["templates"] . "/manifest.php";
    $manifest = getManifest($typeOfDemo);
    $basicHTMLstrings = getHTMLstrings($configItems);
    // grab any simple HTML
    //strings from the list of configurations
    $thesePaths = setPaths();
    // paths to all of the needed files
    $finalPaths = evaluatePaths($thesePaths);
    // files opened, html tags added
    $basicHTMLstrings["navigation"] = getNav();
    $finalHTML = getFinalHTML($finalPaths, $basicHTMLstrings);
    $htmlTemplate = getHTMLtemplate($configItems);
    $htmlString = buildPage($htmlTemplate, $finalHTML);
    echo $htmlString;
}
开发者ID:tomgsmith99,项目名称:JanrainDemoSites,代码行数:22,代码来源:demoGenerator.php

示例8: indexAction

 public function indexAction()
 {
     $word = deep_htmlspecialchars($this->get("word"));
     if (!$word) {
         $where = "status=-1";
     } else {
         $where = "status=1 AND title like '%" . $word . "%'";
     }
     $total = $this->m_search->getSearchArticle(0, $where);
     //获取符合条件的总是
     $page = $this->get('page');
     $page = $page ? $page : 1;
     $size = 15;
     $start = ($page - 1) * $size;
     $limit = $start . ',' . $size;
     $url = '/search?word=' . $word . "&page=";
     $buffer["word"] = $word;
     $buffer['pageNav'] = buildPage($page, $total, $url, $size, 5);
     $buffer["list"] = $this->m_search->getSearchArticle(1, $where, $limit);
     $m_user = $this->load("User");
     foreach ($buffer['list'] as $k => $v) {
         $buffer['list'][$k]["username"] = $m_user->SelectFieldByID("username", $v["user_id"]);
         $buffer['list'][$k]["avatar"] = $m_user->SelectFieldByID("avatar", $v["user_id"]);
         if ($v["table_name"] == "study") {
             $buffer['list'][$k]["url"] = "/study/detail?id=" . $v["id"];
         } elseif ($v["table_name"] == "discuss") {
             $buffer['list'][$k]["url"] = "/discuss/detail?id=" . $v["id"];
         } elseif ($v["table_name"] == "travel") {
             $buffer['list'][$k]["url"] = "/travel/detail?id=" . $v["id"];
         }
     }
     $buffer["list"] = deep_htmlspecialchars_decode($buffer['list']);
     $buffer['pageTitle'] = $this->get("word") . "_泰语导航网";
     $buffer["curNav"] = 5;
     $this->getView()->assign($buffer);
 }
开发者ID:GobYang,项目名称:thaidh,代码行数:36,代码来源:Search.php

示例9: category

    public function category()
    {
        global $_FANWE;
        $id = (int) $_FANWE['request']['id'];
        if (!$id) {
            fHeader("location: " . FU('album'));
        }
        if (!isset($_FANWE['cache']['albums']['category'][$id])) {
            fHeader("location: " . FU('album'));
        }
        $album_cate = $_FANWE['cache']['albums']['category'][$id];
        $_FANWE['nav_title'] = $album_cate['name'] . $_FANWE['nav_title'];
        $page_args = array();
        $page_args['id'] = $id;
        $sort = $_FANWE['request']['sort'];
        switch ($sort) {
            case 'new':
                $page_args['sort'] = 'new';
                $order = " ORDER BY s.share_id DESC";
                break;
            default:
                $sort = 'hot';
                $page_args['sort'] = 'hot';
                $order = " ORDER BY s.collect_count DESC";
                break;
        }
        $where = ' WHERE a.cid = ' . $id;
        $sql = 'SELECT COUNT(DISTINCT share_id) FROM ' . FDB::table('album_share') . ' AS a ' . $where;
        $count = FDB::resultFirst($sql);
        $share_list = array();
        $share_display = array();
        if ($count > 0) {
            $pager = buildPage('album/' . ACTION_NAME, $page_args, $count, $_FANWE['page'], 40);
            $share_list = FDB::fetchAll('SELECT * FROM ' . FDB::table('album_share') . ' AS a 
				INNER JOIN ' . FDB::table('share') . ' AS s ON s.share_id = a.share_id ' . $where . ' 
				AND s.type = \'album_item\'' . $order . ' LIMIT ' . $pager['limit']);
            $share_list = FS('Share')->getShareDetailList($share_list, false, false, false, true, 2);
            $col = 4;
            $index = 0;
            $share_display = array();
            foreach ($share_list as $share) {
                $share['empty_content'] = sprintf(lang('album', 'rel_album_empty_content'), $share['title']);
                $mod = $index % $col;
                $share_display['col' . $mod][] = $share;
                $index++;
            }
        }
        include template('page/album/album_category');
        display();
    }
开发者ID:BGCX261,项目名称:zhubao-tupu-svn-to-git,代码行数:50,代码来源:album.module.php

示例10: editCampaign

 public function editCampaign($campaignId)
 {
     # code...
     if ($this->input->post('editcamp')) {
         $campaign = $this->input->post('editcamp');
         $date1 = date('Y-m-d H:i', strtotime($campaign['expirydate']));
         $date = date_create($date1);
         $title = $campaign['title'];
         $type = $campaign['type'];
         $points = (int) $campaign['points'];
         $userpoints = (int) $campaign['userpoints'];
         $description = $campaign['desc'];
         $gender = $campaign['gender'];
         $age = $campaign['age'];
         //var_dump($companyName);
         //exit;
         $status1 = true;
         $currentUser = ParseUser::getCurrentUser();
         if ($currentUser) {
             $editCampParse = $this->signup->doEditCampaign($title, $type, $points, $userpoints, $description, $gender, $age, $date, $campaignId);
             if (!$editCampParse['status']) {
                 $status1 = false;
             }
             if (!$status1) {
                 //echo "fuck";
                 notify('danger', $editCampParse['parseMsg'], 'company/campaigns');
             } else {
                 echo "Please wait, we'll take you back to the dashboard right away...";
                 notify('success', 'Campaign Edited Succesfully', 'company/campaigns');
             }
         } else {
             redirect('company/login', 'refresh');
         }
     } else {
         $currentUser = ParseUser::getCurrentUser();
         $displayData = 'display:none';
         $adminName = $this->editHeader($displayData, $campaignId);
         if ($currentUser) {
             $dashView = $this->load->view('beacons/editcampaign', $adminName, true);
             buildPage($dashView, 'Edit Campaign');
         } else {
             //echo 'hey';
             redirect('company/login', 'refresh');
         }
     }
 }
开发者ID:Lawrence94,项目名称:sme4me,代码行数:46,代码来源:Campaigns.php

示例11: getTorrentListFromFS

        $htmlMain .= '<pre>';
        $torrents = getTorrentListFromFS();
        foreach ($torrents as $torrent) {
            $htmlMain .= ' - ' . $torrent . "";
            if (isTorrentRunning($torrent)) {
                $htmlMain .= " (running)";
            }
            $htmlMain .= "\n";
        }
        $htmlMain .= '</pre>';
        printPage();
        exit;
    }
}
// standard-action
buildPage(@trim($_REQUEST["a"]));
printPage();
exit;
// -----------------------------------------------------------------------------
// functions
// -----------------------------------------------------------------------------
/**
 * performAuthentication
 *
 */
function performAuthentication($message = "")
{
    if (!IsSuperAdmin()) {
        header("Content-Type: text/plain");
        echo "\nAccess Error" . "\n\n";
        if (isset($message) && $message != "") {
开发者ID:BackupTheBerlios,项目名称:tf-b4rt-svn,代码行数:31,代码来源:superadmin.php

示例12: buildPage

<body>
	<?php 
include_once 'header.inc.php';
?>
	<section class="container">
		<div class="row">
			
				<?php 
@(require_once "controller/PageController.php");
@(include buildPage($_SERVER['QUERY_STRING'], "Title"));
?>
			
		</div>
	</section>
	<?php 
include_once 'footer.inc.php';
?>
	
</body>
开发者ID:themohr,项目名称:cis665,代码行数:19,代码来源:body.inc.php

示例13: messageAction

 public function messageAction()
 {
     //点击进来就让redis中消息状态为已读
     $uid = $this->getSession("uid");
     $redis = Yaf_Registry::get('redis');
     $msg = $redis->get("message_" . $uid);
     if ($msg) {
         $data = json_decode($msg, true);
         if (!$data["comment"]["status"]) {
             $data["comment"]["status"] = 1;
             //标记为已读
             $data["comment"]["total"] = 0;
             //标记为0
             $redis->set("message_" . $uid, json_encode($data));
         }
         if (!$data["reply"]["status"]) {
             $data["reply"]["status"] = 1;
             //标记为已读
             $data["reply"]["total"] = 0;
             //标记为已读
             $redis->set("message_" . $uid, json_encode($data));
         }
     }
     $page = (int) $this->get('p');
     $page = $page ? $page : 1;
     $m_comment = $this->load("comment");
     $size = 10;
     $total = $m_comment->Where("to_id=" . $this->uid)->Total();
     $pages = ceil($total / $size);
     $start = ($page - 1) * $size;
     $limit = $start . ',' . $size;
     $article_list = $m_comment->Where("to_id=" . $this->uid)->Order("ctime desc")->Limit($limit)->Select();
     foreach ($article_list as $k => $v) {
         if ($v["type"] == 1) {
             $title = $this->m_study->Where("id=" . $v["article_id"])->Field("study_name")->SelectOne();
             $article_list[$k]["title"] = $title["study_name"];
             $article_list[$k]["url"] = "/study/detail?id=" . $v["article_id"];
             $from_user = $this->m_user->Where("id=" . $v["from_id"])->Field("email,username")->SelectOne();
             $article_list[$k]["from_username"] = $from_user["username"];
         } else {
             if ($v["type"] == 2) {
                 $title = $this->m_travel->Where("id=" . $v["article_id"])->Field("travel_name")->SelectOne();
                 $article_list[$k]["title"] = $title["travel_name"];
                 $article_list[$k]["url"] = "/travel/detail?id=" . $v["article_id"];
                 $from_user = $this->m_user->Where("id=" . $v["from_id"])->Field("email,username")->SelectOne();
                 $article_list[$k]["from_username"] = $from_user["username"];
             } else {
                 if ($v["type"] == 3) {
                     $title = $this->m_discuss->Where("id=" . $v["article_id"])->Field("discuss_name")->SelectOne();
                     $article_list[$k]["title"] = $title["discuss_name"];
                     $article_list[$k]["url"] = "/discuss/detail?id=" . $v["article_id"];
                     $from_user = $this->m_user->Where("id=" . $v["from_id"])->Field("email,username")->SelectOne();
                     $article_list[$k]["from_username"] = $from_user["username"];
                 }
             }
         }
     }
     $phpfile = "/member/message?p=";
     $buffer["article_list"] = $article_list;
     $buffer['pageNav'] = buildPage($page, $total, $phpfile, $size, 5);
     $buffer['pageTitle'] = "我的消息_泰语导航网";
     $this->getView()->assign($buffer);
 }
开发者ID:GobYang,项目名称:thaidh,代码行数:63,代码来源:Member.php

示例14: getList


//.........这里部分代码省略.........
                $hot7_url['act'] = 1;
            }
            $sort_page_args['sort'] = 'hot30';
            $hot30_url['url'] = FU('book/' . ACTION_NAME, $sort_page_args);
            if ($sort == 'hot30') {
                $hot30_url['act'] = 1;
            }
            $sort_page_args['sort'] = 'new';
            $new_url['url'] = FU('book/' . ACTION_NAME, $sort_page_args);
            if ($sort == 'new') {
                $new_url['act'] = 1;
            }
            $sort_page_args['sort'] = 'pop';
            $pop_url['url'] = FU('book/' . ACTION_NAME, $sort_page_args);
            if ($sort == 'pop') {
                $pop_url['act'] = 1;
            }
            if (!empty($_FANWE['request']['sort'])) {
                $page_args['sort'] = $sort;
            } else {
                $page_args['sort'] = 'pop';
            }
            $today_time = getTodayTime();
            switch ($sort) {
                //7天最热 点击次数
                case 'hot7':
                    $day7_time = $today_time - 604800;
                    $field = ",(s.create_time > {$day7_time}) AS time_sort ";
                    $sort = " ORDER BY time_sort DESC,s.click_count DESC";
                    break;
                    //30天最热 点击次数
                //30天最热 点击次数
                case 'hot30':
                    $day30_time = $today_time - 2592000;
                    $field = ",(s.create_time > {$day30_time}) AS time_sort ";
                    $sort = " ORDER BY time_sort DESC,s.click_count DESC";
                    break;
                    //最新
                //最新
                case 'new':
                    $field = '';
                    $sort = " ORDER BY s.share_id DESC";
                    break;
                    //潮流  喜欢人数
                //潮流  喜欢人数
                case 'pop':
                default:
                    $day7_time = $today_time - 604800;
                    $field = ",(s.create_time > {$day7_time}) AS time_sort ";
                    $sort = " ORDER BY time_sort DESC,s.collect_count DESC";
                    break;
            }
            $sql = 'SELECT DISTINCT(s.share_id),s.uid,s.content,s.collect_count,s.comment_count,s.create_time,s.cache_data ' . $field . '
					FROM ' . FDB::table('share') . ' AS s ';
            if (!$is_root) {
                $sql .= 'INNER JOIN ' . FDB::table('share_category') . ' AS sc ON s.share_id = sc.share_id ';
            }
            if ($is_match) {
                $sql .= 'INNER JOIN ' . FDB::table('share_match') . ' AS sm ON sm.share_id = s.share_id ';
            }
            $sql .= $condition . $sort;
            $sql_count = 'SELECT COUNT(DISTINCT s.share_id)
				FROM ' . FDB::table('share') . ' AS s ';
            if (!$is_root) {
                $sql_count .= 'INNER JOIN ' . FDB::table('share_category') . ' AS sc ON s.share_id = sc.share_id ';
            }
            if ($is_match) {
                $sql_count .= 'INNER JOIN ' . FDB::table('share_match') . ' AS sm ON sm.share_id = s.share_id ';
            }
            $sql_count .= $condition;
            $page_size = 50;
            $max_page = 100;
            $count = FDB::resultFirst($sql_count);
            if ($count > $max_page * $page_size) {
                $count = $max_page * $page_size;
            }
            if ($_FANWE['page'] > $max_page) {
                $_FANWE['page'] = $max_page;
            }
            $pager = buildPage('book/' . $action, $page_args, $count, $_FANWE['page'], $page_size, '', 3);
            $share_datas = array();
            $sql = $sql . ' LIMIT ' . $pager['limit'];
            $share_list = FDB::fetchAll($sql);
            $share_list = FS('Share')->getShareDetailList($share_list, false, false, false, true, 2);
            $col = 4;
            $index = 0;
            $share_display = array();
            foreach ($share_list as $share) {
                $mod = $index % $col;
                $share_display['col' . $mod][] = $share;
                $index++;
            }
            include template('page/book/book_index');
            display($cache_file);
            exit;
        } else {
            include $cache_file;
            display();
        }
    }
开发者ID:BGCX261,项目名称:zhubao-tupu-svn-to-git,代码行数:101,代码来源:s.module.php

示例15: array

<?php

require_once __DIR__ . "/../protected/backbone.php";
$validPages = array("home", "error");
$currentPage = $_GET['page'];
if (!in_array($currentPage, $validPages)) {
    header("Location: /error");
    die;
}
$error = isset($_GET['e']) ? $_GET['e'] : null;
buildPage($currentPage, getTitle($currentPage, $error));
die;
开发者ID:aerouk,项目名称:timetabler,代码行数:12,代码来源:handler.php


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