Exemplo n.º 1
0
function getPiaoDetail($spotid, $tickettypeid, $kindname)
{
    Helper_Archive::loadModule('common');
    $_model = new CommonModule('#@__spot_ticket');
    $arr = $_model->getAll("spotid='{$spotid}' and tickettypeid='{$tickettypeid}' and number!=0", "displayorder asc");
    $out = '';
    foreach ($arr as $row) {
        $savemoney = $row['sellprice'] - $row['ourprice'];
        $award1 = !empty($row['jifentprice']) ? $row['jifentprice'] : '无';
        $award2 = !empty($row['jifenbook']) ? $row['jifenbook'] : '无';
        $award3 = !empty($row['jifencomment']) ? $row['jifencomment'] : '无';
        $bookurl = "booking.php?spotid={$row['spotid']}&ticketid={$row['id']}";
        $out .= '<dl>
			<dt class="dl_title"><a href="javascript:void()">' . $row['title'] . '</a></dt>
			<dd class="dd1">&yen;' . $row['sellprice'] . '</dd>
			<dd class="dd2">&yen;' . $row['ourprice'] . '</dd>
			<dd class="dd3"><span>' . $award1 . '</span></dd>
			<dd class="dd4"><span>' . $award2 . '</span></dd>
			<dd class="dd5"><span>' . $award3 . '</span></dd>
			<dd class="dd6"><a href="' . $bookurl . '" class="btn_ding" data-ticketid="' . $row['id'] . '">预定</a></dd>
			</dl>
			<div class="con_hide">
			<s class="s_bg"></s>
			<p>' . $row['description'] . '</p>
			</div>';
    }
    return $out;
}
Exemplo n.º 2
0
function getNickName($mid)
{
    Helper_Archive::loadModule('common');
    $model = new CommonModule('#@__member');
    $membername = $model->getField('nickname', "mid='{$mid}'");
    return $membername ? $membername : '匿名';
}
Exemplo n.º 3
0
function getTuanMianbao($destid)
{
    $result = Helper_Archive::getParentDestNav($destid);
    foreach ($result as $k => $v) {
        $str .= ' &gt; <a href="/tuan/index.php?dest_id=' . $v['id'] . '">' . $v['kindname'] . '</a>';
    }
    return $str;
}
Exemplo n.º 4
0
function getTemplet($spotid)
{
    Helper_Archive::loadModule('common');
    $_model = new CommonModule('#@__spot_ticket');
    $arr = $_model->getAll("spotid='{$spotid}'");
    $num = count($arr);
    $templet = $num > 0 ? 'spot_show_ticket.htm' : 'spot_show.htm';
    return $templet;
}
Exemplo n.º 5
0
/**
 * 获取结伴标签代码
 *
 * @version        $Id: getjieban.lib.php netman
 * @package        Stourweb.Taglib
 * @copyright      Copyright (c) 2007 - 2015, Stourweb, Inc.
 * @link           http://www.stourweb.com
 */
function lib_getjieban(&$ctag, &$refObj)
{
    global $dsql;
    $attlist = "row|6,flag|new,limit|0";
    FillAttsDefault($ctag->CAttribute->Items, $attlist);
    extract($ctag->CAttribute->Items, EXTR_SKIP);
    $innertext = trim($ctag->GetInnertext());
    $revalue = '';
    $ctp = new STTagParse();
    $ctp->SetNameSpace("field", "[", "]");
    $ctp->LoadSource($innertext);
    $GLOBALS['autoindex'] = 0;
    if ($flag == 'new') {
        $sql = "select * from sline_jieban where status=1 order by addtime desc limit {$limit},{$row}";
    } else {
        if ($flag == 'finish') {
            $sql = "select * from sline_jieban where status=2 order by addtime desc limit {$limit},{$row}";
        } else {
            if ($flag == 'join') {
                $jiebanid = $refObj->Fields['id'];
                $sql = "select * from sline_jieban_join  where jiebanid='{$jiebanid}' group by memberid order by addtime desc";
            }
        }
    }
    $arr = $dsql->getAll($sql);
    foreach ($arr as $row) {
        $GLOBALS['autoindex']++;
        if ($flag != 'join') {
            $row['title'] = TagJB::getJiebanTitle($row);
            $row['kindnamelist'] = TagJB::getKindnameList($row, '-');
            $row['posttime'] = TagJB::formatViewTime($row['addtime']);
            $row['membername'] = TagJB::getMemberName($row['memberid']);
            $row['url'] = $GLOBALS['cfg_cmsurl'] . '/jieban/show_' . $row['id'] . '.html';
            $row['attrlist'] = TagJB::getAttrList($row['attrid']);
            $row['joinnum'] = TagJB::getJoinNumber($row['id']);
        } else {
            $memberinfo = Helper_Archive::getMemberInfo($row['memberid']);
            $row['membername'] = $memberinfo['nickname'];
            $row['litpic'] = $memberinfo['litpic'] ? $memberinfo['litpic'] : '/templets/smore/images/member_default.gif';
            $row['joinnum'] = TagJB::getSingleJoinNumber($row['jiebanid'], $row['memberid']);
        }
        foreach ($ctp->CTags as $tagid => $ctag) {
            if ($ctag->GetName() == 'array') {
                $ctp->Assign($tagid, $row);
            } else {
                if (!empty($row[$ctag->GetName()])) {
                    $ctp->Assign($tagid, $row[$ctag->GetName()]);
                } else {
                    $ctp->Assign($tagid, '');
                }
            }
        }
        $revalue .= $ctp->GetResult();
    }
    return $revalue;
}
Exemplo n.º 6
0
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>';
    }
    return $out;
}
Exemplo n.º 7
0
/**
 * 文章属性调用标签
 *
 * @version        $Id: getarcattr.lib.php netman
 * @package        Stourweb.Taglib
 * @copyright      Copyright (c) 2007 - 2011, Stourweb, Inc.
 * @link           http://www.stourweb.com
 */
function lib_getarcattr(&$ctag, &$refObj)
{
    global $dsql;
    $attlist = "row|8,limit|0,flag|";
    FillAttsDefault($ctag->CAttribute->Items, $attlist);
    extract($ctag->CAttribute->Items, EXTR_SKIP);
    $innertext = trim($ctag->GetInnertext());
    $revalue = '';
    $kindid = $refObj->Fields['kindid'];
    $sql = "select * from #@__article_attr where isopen=1 and pid!=0 order by displayorder asc limit {$limit},{$row}";
    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 limit {$limit},{$row}";
    }
    $dsql->SetQuery($sql);
    $dsql->Execute();
    $ctp = new STTagParse();
    $ctp->SetNameSpace("field", "[", "]");
    $ctp->LoadSource($innertext);
    $GLOBALS['autoindex'] = 0;
    while ($row = $dsql->GetArray()) {
        if (checkExist($row['id'])) {
            $destid = isset($GLOBALS['destid']) ? $GLOBALS['destid'] : 0;
            $py = Helper_Archive::getDestPinyin($destid);
            $py = !empty($py) ? $py : 'all';
            //$row['url'] = $GLOBALS['cfg_cmsurl']."/raiders/search.php?attrid={$row['id']}&destid={$destid}";
            $row['url'] = $GLOBALS['cfg_cmsurl'] . "/raiders/" . $py . '-' . $row['id'];
            $row['title'] = $row['attrname'];
            $row['number'] = getCount($row['id']);
            if ($flag == 'mdd') {
                $row['number'] = $row['num'];
            }
            foreach ($ctp->CTags as $tagid => $ctag) {
                if ($ctag->GetName() == 'array') {
                    $ctp->Assign($tagid, $row);
                } else {
                    if (!empty($row[$ctag->GetName()])) {
                        $ctp->Assign($tagid, $row[$ctag->GetName()]);
                    }
                }
            }
            $revalue .= $ctp->GetResult();
            $GLOBALS['autoindex']++;
        } else {
            continue;
        }
    }
    return $revalue;
}
Exemplo n.º 8
0
 public function getMobileShowUrl($type, $aid)
 {
     $info = Helper_Archive::getSlineWebInfo();
     if (!empty($info['webid'])) {
         $table = $this->tables[$type][0];
         $where = "aid='{$aid}' and webid='{$info['webid']}'";
         Helper_Archive::loadModule('common');
         $model = new CommonModule($table);
         $id = $model->getField('id', $where);
         $url = $GLOBALS['cfg_basehost'] . '/shouji/' . $this->tables[$type][1] . '/show/id/' . $id;
     } else {
         //子战跳转
         $table = $this->tables[$type][0];
         $where = "aid='{$aid}' and webid='{$info['id']}'";
         Helper_Archive::loadModule('common');
         $model = new CommonModule($table);
         $id = $model->getField('id', $where);
         $url = $GLOBALS['cfg_basehost'] . '/shouji/' . $this->tables[$type][1] . '/show/id/' . $id;
     }
     return $url;
 }
Exemplo n.º 9
0
 public function NotifyProcess($data, &$msg)
 {
     $paySource = '微信支付';
     global $dsql;
     $notfiyOutput = array();
     if (!array_key_exists("transaction_id", $data)) {
         $msg = "输入参数不正确";
         return false;
     }
     //查询订单,判断订单真实性
     if (!$this->Queryorder($data["transaction_id"])) {
         $msg = "订单查询失败";
         return false;
     }
     $ordersn = $data['out_trade_no'];
     if (empty($ordersn)) {
         return false;
     }
     return Helper_Archive::paySuccess($ordersn, $paySource, $data);
     // return true;
 }
Exemplo n.º 10
0
function getProductName($id, $typeid, $productname = '')
{
    global $dsql;
    $channeltable = array("1" => "#@__line", "2" => "#@__hotel", "3" => "#@__car", "4" => "#@__article", "5" => "#@__spot", "6" => "#@__photo", "7" => "#@__theme", "8" => "#@__visa", "9" => "#@__ticket", "10" => "#@__leave", "11" => "#@__advertise", "12" => "#@__allcomments", "13" => "#@__tuan");
    $tablename = $channeltable[$typeid];
    $fields = array('1' => array('field' => 'title', 'link' => 'lines'), '2' => array('field' => 'title', 'link' => 'hotels'), '3' => array('field' => 'title', 'link' => 'cars'), '4' => array('field' => 'title', 'link' => 'article'), '5' => array('field' => 'title', 'link' => 'spots'), '8' => array('field' => 'title', 'link' => 'visa'), '13' => array('field' => 'title', 'link' => 'tuan'));
    $field = $fields[$typeid]['field'];
    $link = $fields[$typeid]['link'];
    //如果为空,则是通用模块
    if (empty($field)) {
        $moduleinfo = Helper_Archive::getModuleInfo($typeid);
        $field = 'title';
        $link = $moduleinfo['pinyin'];
        $tablename = 'sline_model_archive';
    }
    $sql = "select aid,{$field} as title,webid from {$tablename} where id='{$id}'";
    $row = $dsql->GetOne($sql);
    $title = !empty($productname) ? $productname : $row['title'];
    $weburl = GetWebURLByWebid($row['webid']);
    $out = "<a href=\"{$weburl}/{$link}/show_{$row['aid']}.html\" target=\"_blank\">{$title}</a>";
    return $out;
}
Exemplo n.º 11
0
function getPhotoUrlCls($class, $key, $val = null, $grouppid = null, $table = "#@__photo_attr")
{
    return Helper_Archive::getParamUrlCls($class, $key, $val, $grouppid, $table);
}
Exemplo n.º 12
0
    $GLOBALS['condition']['_hasbeibao'] = 1;
}
if (in_array(8, $paytypeArr)) {
    $GLOBALS['condition']['_hasweixin'] = 1;
}
if (is_array($row)) {
    $row['enddatetime'] = date('Y/m/d H:i:s', $row['endtime']);
    //截止时间
    $row['discount'] = floor($row['price'] / $row['sellprice'] * 100) / 10;
    //折扣
    $row['piclist'] = getImgList($row['piclist']);
    //获取轮播图片
    $row['seokeyword'] = empty($row['keyword']) ? '' : "<meta name=\"keywords\" content=\"{$row['keyword']}\"/>";
    $row['seodescription'] = empty($row['description']) ? '' : "<meta name=\"description\" content=\"{$row['description']}\"/>";
    $row['seotitle'] = empty($row['seotitle']) ? $row['title'] : $row['seotitle'];
    $row['booknum'] = Helper_Archive::getSellNum($row['id'], 13) + $row['virtualnum'];
    $row['typename'] = GetTypeName($typeid);
    $row['satisfyscore'] = empty($row['satisfyscore']) ? $row['satisfyscore'] : $row['satisfyscore'] . '%';
    foreach ($row as $k => $v) {
        $pv->Fields[$k] = $v;
        //模板变量赋值
    }
}
$templets = $row['templet'];
if (strpos($templets, 'uploadtemplets') !== false) {
    $templet = SLINETEMPLATE . '/smore/' . $templets . '/index.htm';
    //使用自定义模板
} else {
    $templet = SLINETEMPLATE . "/" . $cfg_df_style . "/" . "tuan/tuan_show.htm";
    //系统标准模板
}
Exemplo n.º 13
0
         $content = $msgInfo['msg'];
         $totalprice = $arr['price'] * $arr['dingnum'];
         $content = str_replace('{#MEMBERNAME#}', $memberinfo['nickname'], $content);
         $content = str_replace('{#PRODUCTNAME#}', $arr['productname'], $content);
         $content = str_replace('{#PRICE#}', $arr['PRICE'], $content);
         $content = str_replace('{#NUMBER#}', $arr['dingnum'], $content);
         $content = str_replace('{#TOTALPRICE#}', $totalPrice, $content);
         Helper_Archive::sendMsg($memberInfo['mobile'], $nickname, $content);
         //发送短信.
     }
     //支付成功后添加预订送积分
     if (!empty($arr['jifenbook'])) {
         $addjifen = intval($arr['jifenbook']);
         $sql = "update sline_member set jifen=jifen+{$addjifen} where mid='{$arr['memberid']}'";
         if ($dsql->ExecuteNoneQuery($sql)) {
             Helper_Archive::addJifenLog($arr['memberid'], "预订线路{$arr['productname']}获取得{$addjifen}", $addjifen, 2);
         }
     }
     //如果是酒店订单,则把子订单置为交易成功状态
     $sql = "select typeid,id from sline_member_order where ordersn='{$ordersn}'";
     $ar = $dsql->GetOne($sql);
     if ($ar['typeid'] == 2) {
         $s = "update sline_member_order set ispay=1 where pid='{$ar['id']}'";
         $dsql->ExecuteNoneQuery($s);
     }
 }
 //logResult('更新成功');
 //$subject='你成功预订'.$arr['productname'].'产品';
 //$text="尊敬的{$arr['linkman']},你已经成功在{$GLOBALS['cfg_webname']}预订{$arr['productname']},数量{$arr['dingnum']}.";
 echo "success";
 //请不要修改或删除
Exemplo n.º 14
0
<?php 
require dirname(dirname(dirname(__FILE__))) . '/include/common.inc.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/thirdpay/yinlian/func/common.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/thirdpay/yinlian/func/secureUtil.php';
$paySource = '银联支付';
if (isset($_POST['signature'])) {
    if (verify($_POST)) {
        $orderid = $_POST['orderId'];
        //其他字段也可用类似方式获取
        Helper_Archive::paySuccess($orderid, $paySource, $_POST);
    }
} else {
    echo '签名为空';
}
Exemplo n.º 15
0
<?php

require_once dirname(__FILE__) . "/../include/common.inc.php";
$typeid = 0;
require_once SLINEINC . "/view.class.php";
if (empty($tid)) {
    return '';
}
$themeid = Helper_Archive::pregReplace($tid, 2);
$seoarr = getThemeInfo($themeid);
$seoarr['keyword'] = !empty($seoarr['keyword']) ? "<meta name=\"keywords\" content=\"" . $seoarr['keyword'] . "\"/>" : "";
$seoarr['description'] = "<meta name=\"description\" content=\"" . $seoarr['description'] . "\"/>";
//各栏目数量
$seoarr['linenum'] = getThemeCount(1, $themeid);
$seoarr['hotelnum'] = getThemeCount(2, $themeid);
$seoarr['carnum'] = getThemeCount(3, $themeid);
$seoarr['raidernum'] = getThemeCount(4, $themeid);
$seoarr['spotnum'] = getThemeCount(5, $themeid);
$seoarr['photonum'] = getThemeCount(6, $themeid);
//是否显示条件.
if ($seoarr['hotelnum'] != 0) {
    $GLOBALS['condition']['_hasthemehotel'] = 1;
}
if ($seoarr['carnum'] != 0) {
    $GLOBALS['condition']['_hasthemecar'] = 1;
}
if ($seoarr['raidernum'] != 0) {
    $GLOBALS['condition']['_hasthemeraider'] = 1;
}
if ($seoarr['spotnum'] != 0) {
    $GLOBALS['condition']['_hasthemespot'] = 1;
Exemplo n.º 16
0
<?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;
Exemplo n.º 17
0
function getPeopleGroup($suitid)
{
    Helper_Archive::loadModule('common');
    $model = new CommonModule('#@__line_suit');
    $group = $model->getOne("id='{$suitid}'", null, 'propgroup,jifentprice,jifenbook');
    return $group;
}
Exemplo n.º 18
0
 public static function getSearchUrl($val = null, $key = null, $exclude = null, $arr = array('attrid'))
 {
     global $module_pinyin;
     $url = '/' . $module_pinyin . '/';
     $table = 'sline_model_attr';
     return Helper_Archive::getUrlStatic($val, $key, $exclude, $arr, $url, $table);
 }
Exemplo n.º 19
0
                    $price = $price - intval($order['jifentprice']);
                    //减去积分抵现的价格.
                }
            } else {
                $price = intval($order['dingnum']) * $order['dingjin'];
                if (!empty($order['usejifen']) && !empty($order['jifentprice'])) {
                    $price = $price - intval($order['jifentprice']);
                    //减去积分抵现的价格.
                }
            }
            if (empty($price)) {
                $url = "{$GLOBALS['cfg_basehost']}/spots/show_{$order['productaid']}.html";
                header("location:{$url}");
                exit;
            }
            echo Helper_Archive::payOnline($order['ordersn'], $order['productname'], $price, $paytype);
        }
    }
}
/**
 *  获得预订景点的基本信息
 *
 * @access    private
 * @return    array
 */
function getSpotinfo($id)
{
    global $dsql;
    $sql = "select *,id as productid,aid as productaid from #@__spot where id={$id}";
    $row = $dsql->GetOne($sql);
    return $row;
Exemplo n.º 20
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;
}
Exemplo n.º 21
0
 $row['memberlitpic'] = $memberinfo['litpic'] ? $memberinfo['litpic'] : $GLOBALS['cfg_templets_skin'] . '/images/member_default.gif';
 $row['url'] = $GLOBALS['cfg_cmsurl'] . '/jieban/show_' . $row['id'] . '.html';
 $row['attrlist'] = JieBan::getAttrList($row['attrid']);
 $row['joinnum'] = JieBan::getJoinNumber($row['id']);
 $row['memo'] = $row['memo'] == 'null' ? '' : $row['memo'];
 $row['vartime'] = empty($row['vartime']) ? 0 : $row['vartime'];
 $row['pkname'] = get_par_value($row['kindlist'], $typeid);
 $row['destid'] = array_remove_value($row['kindlist']);
 $row['pinyin'] = Helper_Archive::getDestPinyin($row['destid']);
 $row['kindid'] = $row['destid'];
 if (!empty($row['lineid'])) {
     $row['lineinfo'] = JieBan::getLineInfo($row['lineid']);
     $GLOBALS['condition']['_hasline'] = 1;
 }
 //短信状态判断
 $msgInfo = Helper_Archive::getDefineMsgInfo2('reg_msgcode');
 if ($msgInfo['isopen'] == 1) {
     $GLOBALS['condition']['_msgcode'] = 1;
     $row['msgtype'] = 'msg';
 } else {
     $GLOBALS['condition']['_txtcode'] = 1;
     $row['msgtype'] = 'txt';
 }
 @session_start();
 if (!isset($_SESSION['last_access']) || time() - $_SESSION['last_access'] > 120) {
     $_SESSION['last_access'] = time();
     $token = md5(time());
     $_SESSION['csrf_token_jb2'] = $token;
 }
 foreach ($row as $k => $v) {
     $pv->Fields[$k] = $v;
Exemplo n.º 22
0
 * @license http://www.gnu.org/licenses/gpl-3.0.txt
 * @link http://wapinet.ru/gmanager/
 * @version 0.8.1 beta
 * 
 * PHP version >= 5.2.3
 * 
 */
if (Registry::get('current') == '.') {
    Registry::set('current', Gmanager::getInstance()->getcwd() . '/');
    Registry::set('hCurrent', htmlspecialchars(Gmanager::getInstance()->getcwd(), ENT_COMPAT) . '/');
    Registry::set('rCurrent', Helper_View::getRawurl(Gmanager::getInstance()->getcwd()));
}
if (Registry::get('currentType') == 'dir') {
    $archive = null;
} else {
    $archive = Helper_Archive::isArchive(Helper_System::getType(Helper_System::basename(Registry::get('current'))));
}
$f = 0;
$if = isset($_GET['f']);
$ia = isset($_GET['add_archive']);
Gmanager::getInstance()->sendHeader();
echo str_replace('%title%', Registry::get('hCurrent'), Registry::get('top')) . '<div class="w2">' . Language::get('title_index') . '<br/></div>' . Gmanager::getInstance()->head() . Gmanager::getInstance()->langJS();
if (Config::get('Gmanager', 'addressBar')) {
    echo '<div class="edit"><form action="?" method="get"><div class="bar">';
    if ($ia) {
        echo '<input type="hidden" name="add_archive" value="' . htmlspecialchars($_GET['add_archive']) . '"/><input type="hidden" name="go" value="1"/>';
    }
    echo '<input type="text" name="c" value="' . Registry::get('hCurrent') . '"/> <input type="submit" value="' . Language::get('go') . '"/></div></form></div>';
}
if ($idown = isset($_GET['down'])) {
    $down = '&amp;up';
Exemplo n.º 23
0
    $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;
Exemplo n.º 24
0
<?php

/**
 * User: netman
 * Date: 14-4-17
 * Time: 下午1:39
 */
if (!file_exists(dirname(__FILE__) . '/data/common.inc.php')) {
    header('Location:install/index.php');
    exit;
}
require_once dirname(__FILE__) . "/include/common.inc.php";
//判断是否是手机浏览
if ($cfg_mobile_open == '1') {
    if (Helper_Archive::isMobile()) {
        header("Location:mobile/");
        //跳转到手机页面
        exit;
    }
}
$html = dirname(__FILE__) . '/index.html';
if (file_exists($html)) {
    include $html;
    exit;
} else {
    header("Location:index.php");
    exit;
}
Exemplo n.º 25
0
function getJiaGe($destid)
{
    global $dsql;
    $sql = "select id,aid,lowerprice as min,highprice as max from #@__line_pricelist where webid=0 order by min";
    $arr = $dsql->getAll($sql);
    foreach ($arr as $row) {
        $pinyin = Helper_Archive::getDestPinyin($destid);
        $pinyin = !empty($pinyin) ? $pinyin : $destid;
        //$url = $GLOBALS['cfg_basehost'].'/lines/'.$pinyin.'/';
        $url = $GLOBALS['cfg_cmsurl'] . '/lines/' . $pinyin . '-0-' . $row['aid'] . '-0-0-0';
        //$url = $GLOBALS['cfg_cmsurl'].'/lines/search.php?dest_id='.$destid.'&priceid='.$row['aid'];
        if ($row['min'] != '' && $row['max'] != '' && $row['min'] != 0) {
            $row['title'] = $row['min'] . '~' . $row['max'] . '';
        } else {
            if ($row['min'] == '' || $row['min'] == 0) {
                $row['title'] = $row['max'] . '以下';
            } else {
                if ($row['max'] == '') {
                    $row['title'] = $row['min'] . '以上';
                }
            }
        }
        $out .= '<a href="' . $url . '" target="_blank">' . $row['title'] . '</a>';
    }
    return $out;
}
Exemplo n.º 26
0
<?php

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2015/6/1 0001
 * Time: 14:20
 */
Helper_Archive::loadModule('common');
function page($count, $pageno, $pagesize, $url, $disnum = 5, $url1)
{
    $title_arr = array('firstpage' => '<<', 'prepage' => '上一页', 'lastpage' => '&gt;&gt;', 'nextpage' => '下一页');
    $str = '';
    if ($count == 0) {
        return '';
    }
    $page = ceil($count / $pagesize);
    $str .= '<div class="page">
		';
    //前一页按钮
    if ($pageno <= 1) {
        $str .= '';
    } else {
        $pre_pageno = $pageno - 1;
        $nurl = str_replace('{page}', $pre_pageno, $url);
        $str .= "<a class='pagePrev' href='{$nurl}'>" . $title_arr['prepage'] . "</a> ";
    }
    //计算页起始页和结束页
    if ($page >= $disnum) {
        $pre_num = ceil(($disnum - 1) / 2);
        $next_num = floor(($disnum - 1) / 2);
Exemplo n.º 27
0
    ShowMsg('非法操作', '-1', 1);
}
$sql = "select * from #@__help where webid={$sys_webid} and aid={$aid}";
$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}";
Exemplo n.º 28
0
 public static function getSearchUrl($val = null, $key = null, $exclude = null, $arr = array('monthid', 'dayid', 'attrid'))
 {
     $url = '/jieban/';
     $table = 'sline_jieban';
     return Helper_Archive::getUrlStatic($val, $key, $exclude, $arr, $url, $table);
 }
Exemplo n.º 29
0
function getHotelExistAttr($attrid)
{
    Helper_Archive::loadModule('common');
    $model = new CommonModule('#@__hotel_attr');
    $arr = explode(',', $attrid);
    $group = array();
    foreach ($arr as $id) {
        $row = $model->getOne("id='{$id}'");
        $attrname = $row['attrname'];
        $groupname = $model->getField('attrname', "id='{$row['pid']}'");
        $group[$groupname][] = $attrname;
    }
    foreach ($group as $key => $value) {
        $out .= "<p>" . $key . ":" . implode(',', $value) . '</p>';
    }
    return $out;
}
Exemplo n.º 30
0
<?php

/*-----攻略ajax操作控制器-----*/
require_once dirname(__FILE__) . "/../include/common.inc.php";
if ($action == 'adddownnum') {
    $articleid = Helper_Archive::pregReplace($articleid, 2);
    $sql = "update sline_article set downnum=downnum+1 where id='{$articleid}'";
    $dsql->ExecNoneQuery($sql);
}