예제 #1
0
function lib_leftnav(&$ctag, &$refObj)
{
    global $dsql;
    include SLINEDATA . "/webinfo.php";
    $attlist = "row|20,";
    FillAttsDefault($ctag->CAttribute->Items, $attlist);
    extract($ctag->CAttribute->Items, EXTR_SKIP);
    $innertext = trim($ctag->GetInnertext());
    $revalue = '';
    $table = "#@__destinations";
    $sql = "select id,kindname,pinyin from {$table} where pid= 0 and isopen=1 order by displayorder asc";
    $kindnames = array();
    $ids = $pinyin = array();
    $arr = $dsql->getAll($sql);
    for ($i = 0; isset($arr[$i]['id']); $i++) {
        $ids[] = $arr[$i]['id'];
        $kindname[] = $arr[$i]['kindname'];
        $pinyin[] = $arr[$i]['pinyin'];
    }
    $GLOBALS['autoindex'] = 0;
    for ($k = 0; isset($ids[$k]); $k++) {
        $GLOBALS['autoindex']++;
        $pv = new View(0);
        $pv->Fields['kindname'] = $kindnames[$k];
        $pv->Fields['kindid'] = $ids[$k];
        $pv->Fields['pinyin'] = $pinyin[$k];
        $pv->SetTemplet($innertext, 'string');
        $revalue .= $pv->GetResult();
    }
    return $revalue;
}
예제 #2
0
function lib_helplist(&$ctag, &$refObj)
{
    global $dsql;
    include SLINEDATA . "/webinfo.php";
    $attlist = "row|5,helpkindid|,flag|";
    FillAttsDefault($ctag->CAttribute->Items, $attlist);
    extract($ctag->CAttribute->Items, EXTR_SKIP);
    $innertext = trim($ctag->GetInnerText());
    $artlist = '';
    $helpkindid = isset($refObj->Fields['helpkindid']) ? $refObj->Fields['helpkindid'] : '';
    //针对指定kindid只查询一个分类的信息.
    $typeid = isset($refObj->Fields['typeid']) ? $refObj->Fields['typeid'] : '0';
    if ($innertext == '') {
        return '';
    }
    //获得类别ID总数的信息
    $ids = array();
    $kindnames = array();
    if ($flag == 'all') {
        $sql = "select id,kindname,litpic from #@__help_kind where webid=0 and isopen=1 order by displayorder asc";
    } else {
        if ($helpkindid == '') {
            $sql = "select id,kindname,litpic from #@__help_kind where webid=0 and isopen=1 order by displayorder asc limit 0,{$row}";
        } else {
            $sql = "select id,kindname,litpic from #@__help_kind where webid=0 and isopen=1 and id={$helpkindid} order by displayorder asc limit 0,{$row}";
        }
    }
    $dsql->SetQuery($sql);
    $dsql->Execute();
    while ($row = $dsql->GetArray()) {
        $ids[] = $row['id'];
        $kindnames[] = $row['kindname'];
        //获取帮助分类名称
        $imgsrc[] = $row['litpic'];
    }
    if (!isset($ids[0])) {
        return '';
    }
    //如里分类不存在则退出
    for ($i = 0; isset($ids[$i]); $i++) {
        $pv = new View($typeid);
        if ($imgsrc[$i] != '') {
            $kindname = "<img src=\"{$imgsrc[$i]}\" alt=\"{$kindnames[$i]}\">";
        } else {
            $kindname = $kindnames[$i];
        }
        $url = $GLOBALS['cfg_base_url'] . "/help/index_{$ids[$i]}.html";
        $pv->Fields['kindname'] = $kindname;
        $pv->Fields['helpkindname'] = $kindnames[$i];
        $pv->Fields['ids'] = $ids[$i];
        $pv->Fields['id'] = $ids[$i];
        $pv->Fields['sonid'] = $ids[$i];
        $pv->Fields['url'] = $url;
        $pv->Fields['litpic'] = $imgsrc[$i];
        $pv->SetTemplet($innertext, 'string');
        $artlist .= $pv->GetResult();
    }
    return $artlist;
}
예제 #3
0
function lib_logo(&$ctag, &$refObj)
{
    $innertext = trim($ctag->GetInnertext());
    $revalue = '';
    $a = !empty($GLOBALS['typeid']) ? $GLOBALS['typeid'] : '0';
    // $b=explode(',',$GLOBALS['cfg_logodisplay']);
    // if(in_array($a,$b) || $a=='12')
    $pv = new View(0);
    $pv->SetTemplet($innertext, 'string');
    $revalue .= $pv->GetResult();
    return $revalue;
}
예제 #4
0
function lib_attrgrouplist(&$ctag, &$refObj)
{
    global $dsql;
    $attlist = "row|8,flag|,filterid|";
    FillAttsDefault($ctag->CAttribute->Items, $attlist);
    extract($ctag->CAttribute->Items, EXTR_SKIP);
    $innertext = trim($ctag->GetInnerText());
    $artlist = '';
    $typeid = $typeid ? $typeid : $refObj->Fields['typeid'];
    if (empty($typeid)) {
        return '';
    }
    $tablearr = array('1' => '#@__line_attr', '2' => '#@__hotel_attr', '3' => '#@__car_attr', '4' => '#@__article_attr', '5' => '#@__spot_attr', '6' => '#@__photo_attr', '11' => '#@__jieban_attr', '13' => '#@__tuan_attr');
    $tablename = isset($tablearr[$typeid]) ? $tablearr[$typeid] : '#@__model_attr';
    if ($innertext == '') {
        return '';
    }
    //获得类别ID总数的信息
    $groupids = array();
    $groupnames = array();
    $w = !empty($filterid) ? " and id not in({$filterid})" : '';
    //排除不要的项
    $w .= $typeid > 13 ? " and typeid={$typeid}" : '';
    //如果是扩展模块,则增加typeid判断
    $dest_id = $GLOBALS['dest_id'] ? $GLOBALS['dest_id'] : 0;
    if ($flag == 'bydestid') {
        $w .= !empty($dest_id) ? " and FIND_IN_SET({$dest_id},destid)" : '';
    }
    $sql = "select id,attrname as groupname from {$tablename} where pid=0 and isopen=1 {$w} order by displayorder asc limit 0,{$row}";
    $dsql->SetQuery($sql);
    $dsql->Execute();
    while ($row = $dsql->GetArray()) {
        $groupids[] = $row['id'];
        $groupnames[] = $row['groupname'];
        //获取组名
    }
    if (!isset($groupids[0])) {
        return '';
    }
    //如里不存在则退出
    $GLOBALS['itemindex'] = 0;
    for ($i = 0; isset($groupids[$i]); $i++) {
        $GLOBALS['itemindex']++;
        $pv = new View(0);
        $pv->Fields['groupname'] = $groupnames[$i];
        $pv->Fields['groupid'] = $groupids[$i];
        $pv->Fields['attrid'] = $groupids[$i];
        $pv->Fields['typeid'] = $typeid;
        $pv->SetTemplet($innertext, 'string');
        $artlist .= $pv->GetResult();
    }
    return $artlist;
}
예제 #5
0
function lib_getattrbygroupid(&$ctag, &$refObj)
{
    global $dsql;
    $attlist = "row|80,typeid|,groupname|,groupid|,filterid|";
    FillAttsDefault($ctag->CAttribute->Items, $attlist);
    extract($ctag->CAttribute->Items, EXTR_SKIP);
    $attrtable = array('1' => '#@__line_attr', '2' => '#@__hotel_attr', '3' => '#@__car_attr', '4' => '#@__article_attr', '5' => '#@__spot_attr', '6' => '#@__photo_attr', '11' => '#@__jieban_attr', '13' => '#@__tuan_attr');
    $innertext = trim($ctag->GetInnertext());
    $revalue = '';
    $typeid = empty($typeid) ? $refObj->Fields['typeid'] : $typeid;
    $tablename = isset($attrtable[$typeid]) ? $attrtable[$typeid] : '#@__model_attr';
    $w = !empty($filterid) ? " and id not in({$filterid})" : '';
    //排除不要的项
    $w .= $typeid > 13 ? " and typeid={$typeid}" : '';
    //如果是扩展模块,则增加typeid判断
    if (!empty($groupname)) {
        $sql = "select id from {$tablename} where  attrname='{$groupname}' {$w}";
        $row = $dsql->GetOne($sql);
        if (is_array($row)) {
            $pid = $row['id'];
        }
    } else {
        $pid = empty($groupid) ? $refObj->Fields['attrid'] : $groupid;
    }
    if (empty($pid)) {
        return;
    }
    $sql = "select id,attrname from {$tablename} where pid='{$pid}' {$w} order by displayorder asc limit 0,{$row}";
    $dsql->SetQuery($sql);
    $dsql->Execute();
    while ($row = $dsql->GetArray()) {
        $groupids[] = $row['id'];
        $groupnames[] = $row['attrname'];
        //获取组名
    }
    if (!isset($groupids[0])) {
        return '';
    }
    //如里不存在则退出
    $GLOBALS['itemindex'] = 0;
    for ($i = 0; isset($groupids[$i]); $i++) {
        $GLOBALS['itemindex']++;
        $pv = new View(0);
        $pv->Fields['groupname'] = $groupnames[$i];
        $pv->Fields['groupid'] = $groupids[$i];
        $pv->Fields['attrid'] = $groupids[$i];
        $pv->Fields['typeid'] = $typeid;
        $pv->SetTemplet($innertext, 'string');
        $artlist .= $pv->GetResult();
    }
    return $artlist;
}
예제 #6
0
function lib_getcarguide(&$ctag, &$refObj)
{
    global $dsql;
    $attlist = "row|8,flag|,limit|0";
    FillAttsDefault($ctag->CAttribute->Items, $attlist);
    extract($ctag->CAttribute->Items, EXTR_SKIP);
    $innertext = trim($ctag->GetInnerText());
    $artlist = '';
    switch ($flag) {
        case 'stylelist':
            $sqlstr = "select * from #@__car_kind  order by displayorder asc";
            break;
        case 'brandlist':
            $sqlstr = "select * from #@__car_brand where webid=0";
            break;
        case "pricerange":
            $sqlstr = "select * from #@__car_pricelist where webid=0";
            break;
    }
    //获得类别ID总数的信息
    $groupids = array();
    $groupnames = array();
    if (empty($sqlstr)) {
        return '';
    }
    $dsql->SetQuery($sqlstr);
    $dsql->Execute();
    while ($row = $dsql->GetArray()) {
        $groupids[] = $row['id'];
        $groupnames[] = $row['kindname'];
        //获取组名
    }
    if (!isset($groupids[0])) {
        return '';
    }
    //如里不存在则退出
    $GLOBALS['itemindex'] = 0;
    for ($i = 0; isset($groupids[$i]); $i++) {
        $GLOBALS['itemindex']++;
        $pv = new View(0);
        $pv->Fields['groupname'] = $groupnames[$i];
        $pv->Fields['kindid'] = $groupids[$i];
        $pv->Fields['groupid'] = $groupids[$i];
        $pv->Fields['attrid'] = $groupids[$i];
        $pv->SetTemplet($innertext, 'string');
        $artlist .= $pv->GetResult();
    }
    return $artlist;
}
예제 #7
0
/**
 * 获取线路子级id标签代码
 *
 * @version        $Id: linechild.lib.php netman
 * @package        Stourweb.Taglib
 * @copyright      Copyright (c) 2007 - 2013, Stourweb, Inc.
 * @link           http://www.stourweb.com
 */
function lib_linechild(&$ctag, &$refObj)
{
    global $dsql;
    include SLINEDATA . "/webinfo.php";
    $attlist = "typeid|0,row|5";
    FillAttsDefault($ctag->CAttribute->Items, $attlist);
    extract($ctag->CAttribute->Items, EXTR_SKIP);
    $pid = isset($refObj->Fields['kindid']) ? $refObj->Fields['kindid'] : 0;
    $pname = isset($refObj->Fields['kindname']) ? $refObj->Fields['kindname'] : '';
    $pshownum = isset($refObj->Fields['shownum']) ? $refObj->Fields['shownum'] : 5;
    $ppy = isset($refObj->Fields['pinyin']) ? $refObj->Fields['pinyin'] : '';
    $innertext = trim($ctag->GetInnertext());
    $revalue = '';
    $sql = "select distinct a.kindname,a.kindname,a.id,a.pinyin,b.shownum from #@__destinations as a inner join  #@__line_kindlist as b on a.id=b.kindid where a.pid={$pid} and a.isopen=1 order by b.displayorder asc limit 0,{$row}";
    $dsql->SetQuery($sql);
    $dsql->Execute();
    $ctp = new STTagParse();
    $ctp->SetNameSpace("field", "[", "]");
    $ctp->LoadSource($innertext);
    $GLOBALS['autoindex'] = 0;
    $kindnames = $ids = $shownumber = array();
    while ($row = $dsql->GetArray()) {
        if (ExistLine($row['id'], 1)) {
            $ids[] = $row['id'];
            $kindnames[] = $row['kindname'];
            //获取导航分类名称
            $shownumber[] = !empty($row['shownum']) ? $row['shownum'] : 8;
            $pinyin[] = $row['pinyin'];
        }
    }
    //这里增加一个当没有子级时判断,将直接读取父级列表.
    if (empty($ids[0])) {
        $ids[] = $pid;
        $kindnames[] = $pname;
        $shownumber[] = $pshownum;
        $pinyin[] = $ppy;
    }
    for ($i = 0; isset($ids[$i]); $i++) {
        $pv = new View();
        $pv->Fields['kindname'] = $kindnames[$i];
        $pv->Fields['kindid'] = $ids[$i];
        $pv->Fields['pinyin'] = $pinyin[$i];
        $pv->Fields['shownum'] = $shownumber[$i];
        $pv->SetTemplet($innertext, 'string');
        $artlist .= $pv->GetResult();
    }
    return $artlist;
}
예제 #8
0
function lib_arclist(&$ctag, &$refObj)
{
    global $dsql;
    include SLINEDATA . "/webinfo.php";
    $attlist = "flag|,groupname|";
    FillAttsDefault($ctag->CAttribute->Items, $attlist);
    extract($ctag->CAttribute->Items, EXTR_SKIP);
    $innertext = trim($ctag->GetInnerText());
    $artlist = '';
    if ($innertext == '') {
        return '';
    }
    //获得类别ID总数的信息
    $ids = array();
    $typenames = array();
    $pids = array();
    if ($flag == 'attrlist') {
        $sql = "select id from #@__article_attr where attrname='{$groupname}'";
        $ar = $dsql->GetOne($sql);
        $pid = $ar['id'];
        $sql = "select id,attrname from #@__article_attr where pid = '{$pid}'";
    }
    $dsql->SetQuery($sql);
    $dsql->Execute();
    while ($row = $dsql->GetArray()) {
        $ids[] = $row['id'];
        $kindnames[] = $row['attrname'];
        //获取子栏目名称
    }
    if (!isset($ids[0])) {
        return '';
    }
    //如里不存在子栏目则退出
    $GLOBALS['itemindex'] = 0;
    for ($i = 0; isset($ids[$i]); $i++) {
        $GLOBALS['itemindex']++;
        $pv = new View($ids[$i]);
        $pv->Fields['attrid'] = $ids[$i];
        $pv->Fields['kindname'] = $kindnames[$i];
        $pv->SetTemplet($innertext, 'string');
        $artlist .= $pv->GetResult();
    }
    return $artlist;
}
예제 #9
0
function lib_getrightcontent(&$ctag, &$refObj)
{
    global $dsql, $sys_webid;
    include SLINEDATA . "/webinfo.php";
    $attlist = "pagename|index";
    FillAttsDefault($ctag->CAttribute->Items, $attlist);
    extract($ctag->CAttribute->Items, EXTR_SKIP);
    $typeid = isset($refObj->Fields['typeid']) ? $refObj->Fields['typeid'] : 0;
    //
    //if($typeid==0) return'';
    //if($pagename=="")return'';
    //$cloudlist="<div  id=\"search_right\"></div>"; //云搜索
    $webid = $GLOBALS['sys_child_webid'];
    $innertext = $cloudlist;
    $sql = "select moduleids from #@__module_config where webid={$webid} and shortname='{$pagename}' and typeid='{$typeid}'";
    $row = $dsql->GetOne($sql);
    if (is_array($row)) {
        $mids = explode(',', $row['moduleids']);
        //拆分
        for ($i = 0; isset($mids[$i]); $i++) {
            $sql = "select body from #@__module_list where aid='{$mids[$i]}' and webid={$sys_webid}";
            $dsql->SetQuery($sql);
            $dsql->Execute();
            while ($arr = $dsql->GetArray()) {
                $innertext .= $arr['body'];
            }
        }
    }
    $artlist = '';
    if ($innertext == '') {
        return '';
    }
    //如里为空则退出
    $GLOBALS['itemindex'] = 0;
    $GLOBALS['itemindex']++;
    $pv = new View($typeid);
    $pv->Fields['tagword'] = $refObj->Fields['tagword'];
    $pv->Fields['kindlist'] = $refObj->Fields['kindlist'];
    $pv->SetTemplet($innertext, 'string');
    $artlist .= $pv->GetResult();
    return $artlist;
}
예제 #10
0
function lib_slidenavlist(&$ctag, &$refObj)
{
    global $dsql;
    include SLINEDATA . "/webinfo.php";
    $attlist = "row|20,";
    FillAttsDefault($ctag->CAttribute->Items, $attlist);
    extract($ctag->CAttribute->Items, EXTR_SKIP);
    $innertext = trim($ctag->GetInnertext());
    $revalue = '';
    $sql = "select id,linkurl,kindname,litpic,remark,color from #@__plugin_leftnav where pid=0 and isopen=1  order by displayorder asc limit 0,{$row}";
    $kindnames = array();
    $ids = array();
    $linkurls = array();
    $litpics = array();
    $arr = $dsql->getAll($sql);
    for ($i = 0; isset($arr[$i]['id']); $i++) {
        $id = $arr[$i]['id'];
        $kindname = !empty($arr[$i]['color']) ? '<font color="' . $arr[$i]['color'] . '">' . $arr[$i]['kindname'] . '</font>' : $arr[$i]['kindname'];
        //$kindname=$arr[$i]['kindname'];
        $linkurl = $arr[$i]['linkurl'];
        $litpic = $arr[$i]['litpic'];
        $remark = $arr[$i]['remark'];
        array_push($ids, $id);
        array_push($kindnames, $kindname);
        array_push($litpics, $litpic);
        array_push($remarks, $remark);
        array_push($linkurls, $linkurl);
    }
    $GLOBALS['autoindex'] = 0;
    for ($k = 0; isset($ids[$k]); $k++) {
        $GLOBALS['autoindex']++;
        $pv = new View(0);
        $pv->Fields['kindname'] = $kindnames[$k];
        $pv->Fields['url'] = $linkurls[$k];
        $pv->Fields['kindid'] = $ids[$k];
        $pv->Fields['litpic'] = $litpics[$k];
        $pv->Fields['remark'] = $remarks[$k];
        $pv->SetTemplet($innertext, 'string');
        $revalue .= $pv->GetResult();
    }
    return $revalue;
}
예제 #11
0
function lib_if(&$ctag, &$refObj)
{
    global $dsql;
    include SLINEDATA . "/webinfo.php";
    $attlist = "row|20,showall|0";
    FillAttsDefault($ctag->CAttribute->Items, $attlist);
    extract($ctag->CAttribute->Items, EXTR_SKIP);
    $condition = isset($GLOBALS['condition'][$var]) ? $GLOBALS['condition'][$var] : 0;
    //
    $innertext = trim($ctag->GetInnertext());
    $revalue = '';
    if ($condition) {
        $pv = new View(0);
        $pv->Fields['typeid'] = 0;
        $pv->Fields = $refObj->Fields;
        $pv->SetTemplet($innertext, 'string');
        $revalue .= $pv->GetResult();
    }
    return $revalue;
}
예제 #12
0
function lib_destlist(&$ctag, &$refObj)
{
    global $dsql;
    include SLINEDATA . "/webinfo.php";
    $attlist = "row|20,destid|,flag|";
    FillAttsDefault($ctag->CAttribute->Items, $attlist);
    extract($ctag->CAttribute->Items, EXTR_SKIP);
    $innertext = trim($ctag->GetInnerText());
    $artlist = '';
    $destid = isset($refObj->Fields['kindid']) ? $refObj->Fields['kindid'] : $destid;
    $destid = empty($destid) ? 0 : $destid;
    if ($innertext == '') {
        return '';
    }
    $tablename = '#@__destinations';
    //获得类别ID总数的信息
    $ids = array();
    $kindnames = array();
    $sql = "select id,kindname from {$tablename} where pid='{$destid}' and isopen=1 order by displayorder asc,pinyin asc";
    //获取下一级
    $dsql->SetQuery($sql);
    $dsql->Execute();
    while ($row = $dsql->GetArray()) {
        $ids[] = $row['id'];
        $kindnames[] = $row['kindname'];
        //目的地名称
    }
    if (!isset($ids[0])) {
        return '';
    }
    //如里分类不存在则退出
    for ($i = 0; isset($ids[$i]); $i++) {
        $pv = new View(0);
        $pv->Fields['destname'] = $kindnames[$i];
        $pv->Fields['parentid'] = $ids[$i];
        $pv->Fields['kindid'] = $ids[$i];
        $pv->SetTemplet($innertext, 'string');
        $artlist .= $pv->GetResult();
    }
    return $artlist;
}
예제 #13
0
function lib_gettemplet(&$ctag, &$refObj)
{
    global $dsql, $sys_webid;
    include SLINEDATA . "/webinfo.php";
    $attlist = "pagename|";
    FillAttsDefault($ctag->CAttribute->Items, $attlist);
    extract($ctag->CAttribute->Items, EXTR_SKIP);
    $innertext = '';
    $revalue = '';
    $sql = "select b.path from #@__site_page a left join #@__site_page_config b on a.id=b.pageid where a.pagename='{$pagename}' and b.isuse = 1 and webid='{$sys_webid}'";
    $row = $dsql->GetOne($sql);
    if (!empty($row['path'])) {
        $innertext = "{sline:include file='uploadtemplets/" . $row['path'] . "/index.htm'/}";
    } else {
        $innertext = "{sline:include file='public/" . $pagename . "_sys.htm'/}";
    }
    $pv = new View(0);
    $pv->SetTemplet($innertext, 'string');
    $revalue .= $pv->GetResult();
    return $revalue;
}
예제 #14
0
function lib_getsinglemodule(&$ctag, &$refObj)
{
    global $dsql, $sys_webid;
    include SLINEDATA . "/webinfo.php";
    $attlist = "name|index";
    FillAttsDefault($ctag->CAttribute->Items, $attlist);
    extract($ctag->CAttribute->Items, EXTR_SKIP);
    $innertext = '';
    $sql = "select body from #@__module_list where modulename='{$name}'";
    $row = $dsql->GetOne($sql);
    $innertext .= $row['body'];
    $out = '';
    if ($innertext == '') {
        return '';
    }
    //如里为空则退出
    $pv = new View(0);
    $pv->SetTemplet($innertext, 'string');
    $out .= $pv->GetResult();
    return $out;
}
예제 #15
0
function lib_getarcattrlist(&$ctag, &$refObj)
{
    global $dsql;
    $attlist = "row|8,flag|,filterid|";
    FillAttsDefault($ctag->CAttribute->Items, $attlist);
    extract($ctag->CAttribute->Items, EXTR_SKIP);
    $innertext = trim($ctag->GetInnerText());
    $artlist = '';
    $sql = "select * from #@__article_attr where isopen=1 and pid!=0 order by displayorder asc";
    if ($flag == 'mdd') {
        $sql = "select a.*,count(b.id) as num from #@__article_attr as a inner join #@__article as b on find_in_set(a.id,b.attrid) where find_in_set({$kindid},b.kindlist) group by a.id";
    }
    //获得类别ID总数的信息
    $groupids = array();
    $groupnames = array();
    $dsql->SetQuery($sql);
    $dsql->Execute();
    while ($row = $dsql->GetArray()) {
        $groupids[] = $row['id'];
        $groupnames[] = $row['attrname'];
        //获取组名
    }
    if (!isset($groupids[0])) {
        return '';
    }
    //如里不存在则退出
    $GLOBALS['itemindex'] = 0;
    for ($i = 0; isset($groupids[$i]); $i++) {
        $GLOBALS['itemindex']++;
        $pv = new View(0);
        $pv->Fields['groupname'] = $groupnames[$i];
        $pv->Fields['groupid'] = $groupids[$i];
        $pv->Fields['attrid'] = $groupids[$i];
        $pv->Fields['typeid'] = $typeid;
        $pv->SetTemplet($innertext, 'string');
        $artlist .= $pv->GetResult();
    }
    return $artlist;
}
예제 #16
0
function lib_channelcheck(&$ctag, &$refObj)
{
    global $dsql, $sys_webid;
    include SLINEDATA . "/webinfo.php";
    $attlist = "typeid|0";
    FillAttsDefault($ctag->CAttribute->Items, $attlist);
    extract($ctag->CAttribute->Items, EXTR_SKIP);
    if (empty($typeid)) {
        return '';
    }
    $innertext = trim($ctag->GetInnertext());
    $revalue = '';
    $webid = $GLOBALS['sys_child_webid'];
    $sql = "select isopen from sline_nav where  typeid='{$typeid}' and webid='{$webid}'";
    $row = $dsql->GetOne($sql);
    if ($row['isopen'] == 1) {
        $pv = new View(0);
        $pv->SetTemplet($innertext, 'string');
        $revalue .= $pv->GetResult();
    }
    return $revalue;
}
예제 #17
0
function lib_plugincheck(&$ctag, &$refObj)
{
    global $dsql, $sys_webid;
    include SLINEDATA . "/webinfo.php";
    $attlist = "row|20,identify|";
    FillAttsDefault($ctag->CAttribute->Items, $attlist);
    extract($ctag->CAttribute->Items, EXTR_SKIP);
    if (empty($identify)) {
        return '';
    }
    $innertext = trim($ctag->GetInnertext());
    $revalue = '';
    /* $sql="select isopen from #@__plugins where  identify='$identify' and webid=$sys_webid";
    
       $row=$dsql->GetOne($sql);*/
    if ($GLOBALS[$identify] == 1) {
        $pv = new View(0);
        $pv->SetTemplet($innertext, 'string');
        $revalue .= $pv->GetResult();
    }
    return $revalue;
}
예제 #18
0
function lib_commentlist(&$ctag, &$refObj)
{
    global $dsql;
    include SLINEDATA . "/webinfo.php";
    $attlist = "row|8,flag|,typeid|1,limit|0";
    FillAttsDefault($ctag->CAttribute->Items, $attlist);
    extract($ctag->CAttribute->Items, EXTR_SKIP);
    $innertext = trim($ctag->GetInnerText());
    if ($innertext == '') {
        return '';
    }
    $id = $refObj->Fields['commenthomeid'];
    $pageno = $refObj->Fields['commentpage'];
    $pageno = empty($pageno) ? 1 : $pageno;
    if (empty($id) || empty($typeid)) {
        return '';
    }
    $offset = ($pageno - 1) * $row;
    $sql = "select * from #@__comment where articleid='{$id}' and typeid='{$typeid}' and pid=0 and isshow=1 order by addtime desc limit {$offset},{$row}";
    $result = $dsql->getAll($sql);
    $GLOBALS['itemindex'] = 0;
    foreach ($result as $k => $row) {
        $GLOBALS['itemindex']++;
        $pv = new View(0);
        $userinfo = $GLOBALS['User']->getInfoByMid($row['memberid']);
        $row['litpic'] = $userinfo['litpic'] ? $userinfo['litpic'] : '/templets/smore/images/member_default.gif';
        $row['nickname'] = empty($userinfo['nick']) ? '匿名' : $userinfo['nickname'];
        $row['commentid'] = $row['id'];
        $row['articleid'] = $id;
        foreach ($row as $key => $val) {
            $pv->Fields[$key] = $val;
        }
        $pv->SetTemplet($innertext, 'string');
        $artlist .= $pv->GetResult();
    }
    return $artlist;
}
예제 #19
0
파일: show.php 프로젝트: lz1988/stourwebcms
$row = $dsql->GetOne($sql);
$kindarr = getHelpkind($aid);
$kindid = $kindarr['kindid'];
$kindname = $kindarr['kindname'];
$pv = new View($typeid);
//帮助基本信息
foreach ($row as $k => $v) {
    $pv->Fields[$k] = $v;
}
//帮助分类信息
$pv->Fields['kindid'] = $kindid;
$pv->Fields['kindname'] = $kindname;
$templet = Helper_Archive::getUseTemplet('help_show');
//获取首页使用模板
$templet = !empty($templet) ? $templet : SLINETEMPLATE . "/" . $cfg_df_style . "/" . "help/" . "help_show.htm";
$pv->SetTemplet($templet);
$pv->Display();
/**
 *  根据帮助id获得帮助分类名称
 *
 * @access    private
 * @return    arr
 */
function getHelpkind($aid)
{
    global $dsql;
    $kindname = array();
    $sql = "select a.id as kindid,a.kindname from #@__help_kind a inner join #@__help b on a.id=b.kindid where a.webid=0 and b.aid={$aid}";
    $row = $dsql->GetOne($sql);
    if (is_array($row)) {
        $kindname['kindid'] = $row['kindid'];
예제 #20
0
function getTjXianlu($destid)
{
    require_once SLINEINC . '/view.class.php';
    $out = '';
    $innertext = '  {sline:getlinelist type="mdd" flag="recommend" row="2"}
                              <dl>
                                  <dt>
                                      <a class="fl" href="[field:url/]" target="_blank"><img class="fl" src="[field:lit160/]" width="90" height="70" alt="[field:title/]" title="[field:title/]" /></a>
                                  <h4><a href="[field:url/]" target="_blank">[field:title/]</a></h4>
                                  <p><b>[field:price2/]</b><label>满意度:<span class="color_f60">[field:satisfyscore/]</span></label><label>预订量:<span class="color_f60">[field:sellnum/]</span></label></p>
                                  </dt>
                                  <dd><span class="color_f60">产品特点:</span>[field:sellpoint/]</dd>
                              </dl>
                              {/sline:getlinelist}';
    $pv = new View(0);
    $pv->Fields['kindid'] = $destid;
    $pv->SetTemplet($innertext, 'string');
    $out = $pv->GetResult();
    return $out;
}
예제 #21
0
파일: pay.php 프로젝트: lz1988/stourwebcms
<?php

require_once dirname(__FILE__) . "/../include/common.inc.php";
if ($dopost == 'save') {
    $addtime = time();
    $sql = "insert into sline_dzorder (ordersn,title,dingjin,username,phone,description,travelnum,addtime) values ('{$ordersn}','{$title}','{$dingjin}','{$username}','{$phone}','{$description}','{$travelnum}','{$addtime}')";
    $result = $dsql->ExecuteNoneQuery2($sql);
    if ($result) {
        echo Helper_Archive::payOnline($ordersn, $title, $dingjin);
    } else {
        header('location:/pay/pay.php');
    }
    exit;
}
require_once SLINEINC . "/view.class.php";
$pv = new View();
$ordersn = 'dz' . date('YmdHs');
if (empty($GLOBALS['cfg_pay_type']) || $GLOBALS['cfg_pay_type'] == 1) {
    $template = 'pay_alipay.htm';
} else {
    if ($GLOBALS['cfg_pay_type'] == 2) {
        $template = 'pay_99bill.htm';
    }
}
$pv->SetTemplet(SLINETEMPLATE . "/" . $cfg_df_style . "/pay/" . $template);
$pv->Display();
exit;
예제 #22
0
        $info['exopen'] = $exopen;
        //优惠是否开启.
        $info['islogin'] = $islogin;
        $info['myjifen'] = $userinfo['jifen'];
    }
    foreach ($info as $k => $v) {
        $pv->Fields[$k] = $v;
    }
    foreach ($ticketinfo as $k => $v) {
        $pv->Fields[$k] = $v;
    }
    $pkname = get_par_value($info['kindlist'], $typeid);
    //上一级
    //获取上级开启了导航的目的地
    getTopNavDest($info['kindlist']);
    $pv->SetTemplet(SLINETEMPLATE . "/" . $cfg_df_style . "/" . "spots/" . "spot_booking.htm");
    $pv->Display();
    exit;
} else {
    if ($dopost == "savebooking") {
        //验证验证码
        $checkcode = $_POST['checkcode'];
        $orgCheckcode = GetCkVdValue();
        if ($checkcode != $orgCheckcode || empty($checkcode)) {
            echo 'nocheckcode';
            return;
        }
        $_SESSION['total_value'] = '';
        $needjifen = $usejifen ? Helper_Archive::getNeedJifen($jifentprice) : 0;
        $userinfo = $User->getInfoByMid($User->uid);
        //获取用户信息
예제 #23
0
<?php

require_once dirname(__FILE__) . "/../include/common.inc.php";
$typeid = 2;
//酒店栏目
require_once SLINEINC . "/view.class.php";
$pv = new View($typeid);
$pv->Fields['roomid'] = $roomid;
$pv->Fields['hotelid'] = $hotelid;
$pv->SetTemplet(SLINETEMPLATE . "/" . $cfg_df_style . "/" . "hotels/" . "hotel_calendar.htm");
$pv->Display();
예제 #24
0
*/
require_once dirname(__FILE__) . "/../include/common.inc.php";
require_once dirname(__FILE__) . "/../data/webinfo.php";
$typeid = 0;
if (!isset($aid)) {
    ShowMsg('非法操作', '-1', 1);
}
$kindname = GetHelpkind($aid);
require_once SLINEINC . "/view.class.php";
$pv = new View($typeid);
$pv->Fields['helpkindid'] = $aid;
//帮助分类id
$pv->Fields['sonid'] = $aid;
//帮助分类id
$pv->Fields['kindname'] = $kindname;
$pv->SetTemplet(SLINETEMPLATE . "/" . $cfg_df_style . "/" . "help/" . "help_index.htm");
$pv->Display();
/**
 *  获得帮助分类名称
 *
 * @access    private
 * @return    string
 */
function GetHelpkind($aid)
{
    global $dsql;
    $kindname = '';
    $sql = "select aid,kindname from #@__help_kind where webid=0 and id={$aid}";
    $row = $dsql->GetOne($sql);
    if (is_array($row)) {
        $kindname = $row['kindname'];
예제 #25
0
파일: reg.php 프로젝트: lz1988/stourwebcms
        $GLOBALS['condition']['_msgcode'] = 0;
        //短信验证码
        $GLOBALS['condition']['_txtcode'] = 1;
        //文字验证码
    }
    $emailInfo = Helper_Archive::getEmailMsgConfig('reg_msgcode');
    if (!empty($emailInfo) && $emailInfo['isopen'] == 1) {
        $GLOBALS['condition']['_emailcode'] = 1;
    } else {
        $GLOBALS['condition']['_emailtxtcode'] = 1;
    }
    $templet = Helper_Archive::getUseTemplet('member_reg');
    //获取使用模板
    $templet = !empty($templet) ? $templet : MEMBERTEMPLET . 'reg.htm';
    $pv->Fields['stoken'] = $token;
    $pv->SetTemplet(MEMBERTEMPLET . 'reg.htm');
    $pv->Display();
    exit;
}
//用户注册
if ($dopost == 'doreg') {
    @session_start();
    $pwd = md5($password);
    $jointime = time();
    $joinip = GetIP();
    $jifen = empty($cfg_reg_jifen) ? 0 : $cfg_reg_jifen;
    //网上注册赠送积分
    $nickname = substr($mobile, 0, 5) . '***';
    $validateResult = validatePhone();
    $_SESSION['mobilecode_' . $mobile] = '';
    if ($validateResult !== true) {
예제 #26
0
        }
        if ($flag) {
            $url = "{$GLOBALS['cfg_basehost']}/member";
            // ShowMsg("绑定帐户成功!",$url);
            header("Location:{$url}");
            exit;
        }
    } else {
        echo $dsql->GetError();
        exit;
    }
}
//直接绑定帐户
if ($dopost == 'bind_direct') {
    $pv = new View(0);
    $pv->SetTemplet(dirname(__FILE__) . "/templets/index_connect_direct.htm");
    $pv->Display();
    exit;
}
//保存绑定(已有帐户)
if ($dopost == 'savebind_direct') {
    session_start();
    $connectid = $_SESSION['connectid'];
    $from = $_SESSION['from'];
    $User = new Member(7 * 3600);
    $flag = $User->login($loginname, $pwd);
    if ($flag) {
        $mid = $User->uid;
        $sql = "update #@__member set `connectid`='{$connectid}',`from`='{$from}' where mid={$mid}";
        if ($dsql->ExecuteNoneQuery($sql)) {
            $url = "{$GLOBALS['cfg_basehost']}/member";
예제 #27
0
$pv = new View($typeid);
$num = count($lanmu);
$listnum = "0";
for ($i = 1; $i <= $num; $i++) {
    $limit = 6;
    //显示条数
    $article = "";
    if (!$tagword == "") {
        $where = " where webid={$sys_webid} and tagword like '%{$tagword}%'";
        $sql = "select {$name[$i]} as name,aid from #@__{$lanmu[$i]}  {$where} order by aid desc limit 0,{$limit}";
        $dsql->SetQuery($sql);
        $dsql->Execute();
        while ($row = $dsql->GetArray()) {
            $listnum++;
            $row['name'] = cutword($row['name'], 20);
            $row['name'] = str_replace($tagword, "<span style='color:red;'>" . $tagword . "</span>", $row['name']);
            $article .= " <dd><a href='{$url[$i]}show_{$row['aid']}.html'>{$row['name']}</a></dd>";
        }
    }
    $alllist['num'] = "当前显示 " . $tagword . " 相关信息{$listnum}条";
    $alllist[$lanmu[$i]] = $article;
    $alllist[$lanmu[$i] . "url"] = "arctag_{$tag}_{$i}.html";
}
if (is_array($alllist)) {
    //$row['taglook']=GetTagsLink($row['tagword']);
    foreach ($alllist as $k => $v) {
        $pv->Fields[$k] = $v;
    }
}
$pv->SetTemplet(SLINETEMPLATE . "/" . $cfg_df_style . "/" . "raiders/" . "arctaglist.htm");
$pv->Display();
예제 #28
0
파일: show.php 프로젝트: lz1988/stourwebcms
    $GLOBALS['condition']['_hasyinlian'] = 1;
}
if (in_array(5, $paytypeArr)) {
    $GLOBALS['condition']['_hasqianbao'] = 1;
}
if (in_array(7, $paytypeArr)) {
    $GLOBALS['condition']['_hasbeibao'] = 1;
}
if (in_array(8, $paytypeArr)) {
    $GLOBALS['condition']['_hasweixin'] = 1;
}
/*$prenext=getPreNext($aid);//获取上一条,下一条
foreach($prenext as $k=>$v {
	$pv->Fields[$k] = $v;
}*/
//图片获取
$picArr = getPiclistArr($row['piclist']);
$biglist = $picArr['big'];
//大图
$thumblist = $picArr['thumb'];
//小图
//获取上级开启了导航的目的地
getTopNavDest($row['kindlist']);
$typename = GetTypeName($typeid);
//获取栏目名称.
$pv->Fields['typename'] = $typename;
$templet = getTemplet($row['id']);
//获取显示模板
$pv->SetTemplet(SLINETEMPLATE . "/" . $cfg_df_style . "/" . "spots/" . $templet);
$pv->Display();
exit;
예제 #29
0
    $row['subname'] = $row['title'];
    $row['id'] = strlen($row['id']) == 1 ? "0" . $row['id'] : $row['id'];
    $row['seotitle'] = !empty($row['seotitle']) ? $row['seotitle'] : $row['title'];
    $row['startplacename'] = getStartCityName($row['startcity']);
    foreach ($row as $k => $v) {
        $pv->Fields[$k] = $v;
    }
    //print_r($this->Fields);
}
$pv->Fields['title'] = !empty($row['seotitle']) ? $row['seotitle'] : $row['title'];
$linecontent = getLineContentPrint($row, 1);
//线路介绍分类
$typename = GetTypeName($typeid);
//获取栏目名称.
$pv->Fields['typename'] = $typename;
$pv->SetTemplet(SLINETEMPLATE . "/" . $cfg_df_style . "/" . "lines/" . "print.htm");
$pv->Display();
//打印页面函数重写
//线路内容模块
function getLineContentPrint($row, $istemplets)
{
    global $dsql;
    $linecontent = array();
    $sql = "select columnname,chinesename from #@__line_content where webid=0 and isopen=1 order by displayorder asc";
    $dsql->Execute('me', $sql);
    while ($arr = $dsql->GetArray()) {
        if ($arr['columnname'] == "payment") {
            if ($row[$arr['columnname']] == "") {
                $row[$arr['columnname']] = $GLOBALS['cfg_payment'];
            }
        }
예제 #30
0
//会员中心首页
if (!isset($dopost)) {
    Helper_Archive::loadModule('common');
    $_model = new CommonModule('#@__member_order');
    $pv->Fields['unpinlun'] = $_model->getCount("memberid='{$uid}' and ispinlun=0 and status=2 and pid=0");
    //未评论订单数量
    $pv->Fields['unpay'] = $_model->getCount("memberid='{$uid}' and ispay=0 and pid=0");
    //未付款
    $pv->Fields['complete'] = $_model->getCount("memberid='{$uid}' and status=2 and pid=0");
    //已完成
    $userinfo = $User->getInfoByMid($uid);
    foreach ($userinfo as $key => $value) {
        $pv->Fields[$key] = $value;
    }
    $pv->Fields['litpic'] = empty($pv->Fields['litpic']) ? $GLOBALS['cfg_templets_skin'] . '/images/member_default.gif' : $pv->Fields['litpic'];
    $pv->SetTemplet(MEMBERTEMPLET . "index.htm");
    $pv->Display();
    exit;
}
if ($dopost == 'uploadfacepage') {
    $pv->SetTemplet(MEMBERTEMPLET . "uploadface.htm");
    $pv->Display();
    exit;
}
/*-----------------------------
//用户资料设置

------------------------------*/
if ($dopost == 'userinfo') {
    $userinfo = $User->getInfoByMid($uid);
    $pagename = $dopost;