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