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


PHP ListView::SetTemplet方法代碼示例

本文整理匯總了PHP中ListView::SetTemplet方法的典型用法代碼示例。如果您正苦於以下問題:PHP ListView::SetTemplet方法的具體用法?PHP ListView::SetTemplet怎麽用?PHP ListView::SetTemplet使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ListView的用法示例。


在下文中一共展示了ListView::SetTemplet方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: GetName

if (isset($pageno)) {
    $pageno = intval(preg_replace("/[^\\d]/", '', $pageno));
}
//當前頁
if ($tid == '7') {
    $sql = "select * from #@__leave where reply is null and approval='1' order by addtime desc";
} else {
    if ($tid == '8') {
        $sql = "select * from #@__leave where reply is not null and approval='1' order by addtime desc";
    } else {
        $sql = "select * from #@__leave where typeid='{$tid}' and approval='1' order by addtime desc";
    }
}
$pv = new ListView($typeid);
$pv->listGetChannelKeywords($typeid);
//根據欄目類型獲取關鍵詞.介紹,欄目名稱
$pv->Fields['name'] = GetName($tid);
$pv->pagesize = 30;
//分頁條數.
$pv->SetSql($sql);
//注意以下這兩句與偽靜態規則有關係,不能寫反了.
$pv->SetParameter('tid', $tid);
$pv->SetTemplet(SLINETEMPLATE . "/" . $cfg_df_style . "/" . "questions/" . "list.htm");
$pv->Display();
function GetName($typeid)
{
    global $dsql;
    $sql = "select shortname from #@__nav where webid='0' and isopen='1' and typeid='{$typeid}'";
    $row = $dsql->GetOne($sql);
    return $row['shortname'];
}
開發者ID:lz1988,項目名稱:stourwebcms,代碼行數:31,代碼來源:list.php

示例2: on

    $sql = "select a.* from sline_model_archive a left join sline_allorderlist b on(a.id=b.aid and b.typeid={$typeid} ) {$where} order by b.displayorder asc, a.modtime desc,a.addtime desc ";
}
$destinfo = TongYong::getDestSeoInfo($module_dest_table, $dest_id);
//目的地優化信息;
$seoinfo = TongYong::getSeoInfo($destinfo, $attrid, $typeid);
//組合搜索標題
//下級目的地
$destlist = Helper_Archive::getChildDest($dest_id, $typeid);
$pv = new ListView($typeid);
$pv->pagesize = 16;
//分頁條數.
$pv->SetSql($sql);
//seo變量賦值
foreach ($destinfo as $k => $v) {
    $pv->Fields[$k] = $v;
}
foreach ($seoinfo as $k => $v) {
    $pv->Fields[$k] = $v;
}
$pv->Fields['typeid'] = $typeid;
$pv->Fields['modulename'] = $module_name;
$pv->Fields['modulepinyin'] = $module_pinyin;
$pv->SetParameter('destid', $dest_id);
$pv->SetParameter('attrid', $attrid);
$templet = Helper_Archive::getUseTemplet('line_list');
//獲取使用模板
$templet = SLINETEMPLATE . "/" . $cfg_df_style . "/tongyong/tongyong_index.htm";
//默認模板
$pv->SetTemplet($templet);
$pv->Display();
exit;
開發者ID:lz1988,項目名稱:stourwebcms,代碼行數:31,代碼來源:index.php

示例3: header

if ($dopost == 'search') {
    //判斷是否是從訂單頁跳轉
    if (!empty($_POST)) {
        $mobile = Helper_Archive::pregReplace($searchkey, 2);
    }
    if (empty($mobile)) {
        header("location:{$GLOBALS['cfg_basehost']}/member/query.php");
    }
    $sql = "select * from sline_member_order where linktel='{$mobile}' and pid=0 order by addtime desc";
    $dzorder = QueryOrder::getDzOrder($searchkey);
    $pv = new ListView(0);
    $pv->pagesize = 100;
    //分頁條數.
    $pv->SetSql($sql);
    $pv->Fields['searchkey'] = $mobile;
    $pv->SetTemplet(MEMBERTEMPLET . "order_query.htm");
    $pv->Display();
    exit;
}
//在線支付
if ($dopost == 'payonline') {
    $order = Helper_Archive::getOrderInfo($orderid);
    if ($order['typeid'] != 2) {
        if (empty($order['dingjin'])) {
            $price = intval($order['dingnum']) * $order['price'] + intval($order['childnum']) * $order['childprice'] + intval($order['oldnum']) * $order['oldprice'];
            if (!empty($order['usejifen']) && !empty($order['jifentprice'])) {
                $price = $price - intval($order['jifentprice']);
                //減去積分抵現的價格.
            }
        } else {
            $price = (intval($order['dingnum']) + intval($order['childnum']) + intval($order['oldnum'])) * $order['dingjin'];
開發者ID:lz1988,項目名稱:stourwebcms,代碼行數:31,代碼來源:query.php


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