Example #1
0
$html = dirname(__FILE__) . '/index.html';
$child_html = SLINEDATA . '/html/child/' . $GLOBALS['sys_webprefix'] . '_' . 'index.html';
if (file_exists($html) && $genpage != 1 && $GLOBALS['sys_child_webid'] == 0) {
    include $html;
    //载入主站首页
    exit;
} else {
    if (file_exists($child_html) && $genpage != 1 && $GLOBALS['sys_child_webid'] != 0) {
        include $child_html;
        //载入子站首页
        exit;
    } else {
        require_once SLINEINC . "/view.class.php";
        $pv = new View();
        $temp_num = $dsql->GetOne("select count(*) as num from #@__member_order");
        $pv->GetChannelKeywords(0);
        $pv->Fields['sellnum'] = $temp_num['num'];
        $templet = Helper_Archive::getUseTemplet('index');
        //获取首页使用模板(根据当前域名自动判断是主站还是子站)
        if (!$GLOBALS['sys_child_webid']) {
            $indextemplet = $GLOBALS['cfg_index_templet'] ? $GLOBALS['cfg_index_templet'] : 'index_1.htm';
            $templet = !empty($templet) ? $templet : SLINETEMPLATE . "/" . $cfg_df_style . "/index/" . $indextemplet;
            //主站默认模板
        } else {
            $templet = !empty($templet) ? $templet : SLINETEMPLATE . "/" . $cfg_childsite_style . "/" . "index.htm";
            //子站默认模板
        }
        $pv->SetTemplet($templet);
        $pv->Display();
    }
}
Example #2
0
<?php

require_once dirname(__FILE__) . "/../include/common.inc.php";
$typeid = 1;
//线路栏目
require_once SLINEINC . "/view.class.php";
$html = dirname(__FILE__) . '/index.html';
if (file_exists($html) && $genpage != 1) {
    include $html;
    exit;
} else {
    $pv = new View($typeid);
    $pv->GetChannelKeywords($typeid);
    //根据栏目类型获取关键词.介绍,栏目名称
    $templet = Helper_Archive::getUseTemplet('line_index');
    //获取首页使用模板
    $templet = !empty($templet) ? $templet : SLINETEMPLATE . "/" . $cfg_df_style . "/" . "lines/" . "line_index.htm";
    $pv->SetTemplet($templet);
    $pv->Display();
    exit;
}
Example #3
0
<?php

require_once dirname(__FILE__) . "/../include/common.inc.php";
require_once dirname(__FILE__) . "/destination.index.class.php";
require_once SLINEINC . "/view.class.php";
$typeid = 12;
$pv = new View($typeid);
//$dest = new DestinationCache();
$pv->GetChannelKeywords(12);
//根据栏目类型获取关键词.介绍,栏目名称
$pv->Fields['seokeyword'] = !empty($pv->Fields['seokeyword']) ? "<meta name=\"keywords\" content=\"" . $pv->Fields['seokeyword'] . "\"/>" : "";
$pv->Fields['seodescription'] = !empty($pv->Fields['seodescription']) ? "<meta name=\"description\" content=\"" . $pv->Fields['seodescription'] . "\"/>" : "";
//$pv->Fields['list'] = $dest->getCacheDest();
$templet = Helper_Archive::getUseTemplet('dest_boot');
//获取目的地引导页使用模板
$templet = !empty($templet) ? $templet : SLINETEMPLATE . "/" . $cfg_df_style . "/" . "destination/" . "index.htm";
$pv->SetTemplet($templet);
$pv->Display();
//功能函数
//获取目的地下级HTML
function getDestChildHtml($pid)
{
    Helper_Archive::loadModule('common');
    $model = new CommonModule('#@__destinations');
    $arr = $model->getAll("pid='{$pid}' and isopen=1", "displayorder asc");
    $out = '';
    foreach ($arr as $row) {
        $num = $model->getCount("pid='{$row['id']}'");
        $class = $num ? " class='haschild'" : "";
        $url = $GLOBALS['cfg_basehost'] . '/' . $row['pinyin'] . '/';
        $out .= '<dd><a href="' . $url . '" target="_blank"' . $class . ' data-id="' . $row['id'] . '">' . $row['kindname'] . '</a></dd>';