예제 #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;
}
예제 #2
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;
}
예제 #3
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;
}
예제 #4
0
파일: ajax.php 프로젝트: lz1988/stourwebcms
        echo 'no';
    }
}
//积分操作记录
if ($dopost == 'jifenlog') {
    Helper_Archive::loadModule('common');
    $_model = new CommonModule('#@__member_jifen_log');
    $head = '<table width="1000" border="0" cellspacing="0" cellpadding="0">
            	  <tr>
            	    <th width="125" height="30" align="left" scope="col">时间</th>
            	    <th width="475" align="left" scope="col">操作</th>

           	    </tr>';
    $foot = '</table>';
    $offset = ($curpage - 1) * $pagesize;
    $arr = $_model->getAll("memberid='{$uid}'", "addtime desc", "{$offset},{$pagesize}");
    foreach ($arr as $row) {
        $addtime = Mydate('Y-m-d H:i:s', $row['addtime']);
        $out .= ' <tr>
            	    <td height="50">' . $addtime . '</td>
            	    <td>' . $row['content'] . '</td>

          	    </tr>';
    }
    $out = !empty($out) ? $head . $out . $foot : $nocontent_msg;
    $totalnum = $_model->getCount("memberid='{$uid}'");
    $totalpage = ceil($totalnum / $pagesize);
    $pageinfo = setPageInfo($curpage, $totalpage);
    $data = array('list' => $out, 'pageinfo' => $pageinfo);
    echo json_encode($data);
    exit;
예제 #5
0
function getTaoCanDetail($carid, $suittypeid)
{
    $_suitModel = new CommonModule('sline_car_suit');
    $arr = $_suitModel->getAll("carid={$carid} and suittypeid='{$suittypeid}'", "displayorder asc");
    foreach ($arr as $v) {
        $price = getCarNewRealPrice(null, null, $carid, $v['id']);
        //最低报价
        $price = empty($price) ? '电询' : '&yen;' . $price;
        $supportdj = !empty($v['dingjin']) ? '<img src="' . $GLOBALS['cfg_templets_skin'] . '/images/zcdj.gif" />' : '';
        $jifentprice = $v['jifentprice'] ? $v['jifentprice'] : '无';
        $out .= ' <dl>
                  <dt class="dl_title"><a href="javascript:void()">' . $v['suitname'] . '</a></dt>
                  <dd class="dd1">' . $v['unit'] . '</dd>
                  <dd class="dd2">' . $price . '</dd>
                  <dd class="dd3">
										<div class="car-date">
											<input type="text" id="" class="car-bj usedate" data-suitid="' . $v['id'] . '" data-carid="' . $carid . '" name="" value="用车日期" />
										</div>
									</dd>
									<dd class="dd4"><span>' . $jifentprice . '</span></dd>
                  <dd class="dd5">' . $supportdj . '</dd>
                  <dd class="dd6"><a href="javascript:;" class="btn_ding">预定</a></dd>
                </dl>
                <div class="con_hide">
                	<s class="s_bg"></s>
                	' . $v['content'] . '
                </div> ';
    }
    return $out;
}
예제 #6
0
        $where .= !empty($v) ? " and FIND_IN_SET({$v},a.attrid)" : '';
    }
}
$_photoModule = new CommonModule('sline_photo as a');
//获取目的地列表
$destlist = getPhotoChildDest($dest_id);
//获取目的地面包屑
$mianbao = getPhotoMianbao($dest_id);
//获取结果集
$pagesize = 12;
//每页数量
$pageno = empty($pageno) ? 1 : $pageno;
//第几页
$offset = ($pageno - 1) * $pagesize;
$count = $_photoModule->getCount($where);
$photolist = $_photoModule->getAll($where, $tableorder, "{$offset},{$pagesize}", "a.*", $join);
$page = getPhotoPage($count, $pageno, $pagesize, array('dest_id' => $dest_id, 'attrid' => $attrid));
//获取分页结果
foreach ($photolist as $k => $v) {
    $weburl = GetWebURLByWebid($v['webid']);
    $photolist[$k]['pic'] = getUploadFileUrl(str_replace('litimg', 'allimg', $v['litpic']));
    $photolist[$k]['url'] = $weburl . '/photos/show_' . $v['aid'] . '.html';
}
$destname = !empty($dest_id) ? Helper_Archive::getDestName($dest_id) : '全部';
foreach ($attrid_arr as $k => $v) {
    $attrname .= !empty($v) ? getPhotoAttrName($v) . '-' : '';
}
$attrname = trim($attrname, '-');
$seotitle = $pageno > 1 ? "第{$pageno}页" : '';
if ((!empty($destname) || !empty($attrname)) && $destname != '全部') {
    $seotitle .= $attrname;
예제 #7
0
파일: ajax.php 프로젝트: lz1988/stourwebcms
if ($dopost == 'getDestId') {
    $sql = "select id from #@__destinations where kindname='{$destname}'";
    $row = $dsql->GetOne($sql);
    echo $row['id'] ? $row['id'] : 36;
}
//获取目的地拼音
if ($dopost == 'getDestPinYin') {
    $sql = "select pinyin from #@__destinations where kindname='{$destname}'";
    $row = $dsql->GetOne($sql);
    echo $row['pinyin'] ? $row['pinyin'] : '';
}
//获取目的地下级html
if ($dopost == 'getMddChild') {
    Helper_Archive::loadModule('common');
    $model = new CommonModule('#@__destinations');
    $arr = $model->getAll("pid='{$dest_id}' and isopen=1");
    foreach ($arr as $row) {
        $url = $GLOBALS['cfg_basehost'] . '/' . $row['pinyin'] . '/';
        $out .= "<a href='{$url}' target='_blank'>{$row['kindname']}</a>";
    }
    echo ' <div class="pf">' . $out . "</div>";
    exit;
}
function matchPinyin($keyword)
{
    global $dsql;
    $sql = "select kindname as matchname from #@__destinations where isopen=1";
    $res = $dsql->getAll($sql);
    $str = '';
    foreach ($res as $row) {
        if (strlen($keyword) == 1) {
예제 #8
0
파일: show.php 프로젝트: lz1988/stourwebcms
if (in_array(8, $paytypeArr)) {
    $GLOBALS['condition']['_hasweixin'] = 1;
}
if (is_array($row)) {
    //$row['litpic']=!empty($row['litpic']) ? $row['litpic'] : getDefaultImage();
    $row['title'] = !empty($row['seotitle']) ? $row['seotitle'] : $row['title'];
    $row['subname'] = $row['title'];
    $row['startcity'] = $_startModule->getField('cityname', "id='{$row['startplaceid']}'");
    $row['carkind'] = getCarKind($row['carkindid']);
    $row['brandid'] = getCarBrand($row['carbrandid']);
    $row['taglook'] = GetTagsLink($row['tagword']);
    $row['attrname'] = getCarAttrName($row['attrid'], '租车类型');
    $row['tanknum'] = getCarAttrName($row['attrid'], '厢型');
    $row['description'] = !empty($row['description']) ? "<meta name=\"description\" content=\"" . $row['description'] . "\"/>" : "";
    $row['keyword'] = !empty($row['keyword']) ? "<meta name=\"keywords\" content=\"" . $row['keyword'] . "\"/>" : "";
    $taocan = $_suitModule->getAll("carid={$row['id']}");
    $pic_arr = getCarPicList($row['piclist'], $row['title'], $row['litpic']);
    //print_r($pic_arr);
    $row['litpic'] = getUploadFileUrl($row['litpic']);
    $row['thumbpic'] = $pic_arr['thumbpic'];
    $row['bigpic'] = $pic_arr['bigpic'];
    $row['commenthomeid'] = $row['id'];
    $row['carseries'] = getSeries($row['id'], '03');
    //编号
    foreach ($row as $k => $v) {
        $pv->Fields[$k] = $v;
    }
}
$pv->Fields['seotitle'] = !empty($row['seotitle']) ? $row['seotitle'] : $row['title'];
$pv->Fields['arealist'] = getAreaList($aid);
$pv->Fields['typename'] = GetTypeName($typeid);
예제 #9
0
<?php

require_once dirname(__FILE__) . "/../include/common.inc.php";
Helper_Archive::loadModule('common');
$_leaveModule = new CommonModule('sline_leave');
$questionModel = new CommonModule('sline_question');
$leaveAll = $_leaveModule->getAll();
foreach ($leaveAll as $k => $v) {
    $_arr['title'] = $v['title'];
    $_arr['content'] = $v['content'];
    $_arr['replycontent'] = $v['reply'];
    $_arr['replytime'] = $v['retime'];
    $_arr['nickname'] = $v['leavename'];
    $_arr['ip'] = $v['ip'];
    $_arr['status'] = $v['approval'] ? 1 : 0;
    $_arr['addtime'] = $v['addtime'];
    $_arr['qq'] = $v['qq'];
    $_arr['webid'] = $v['webid'];
    $_arr['weixin'] = $v['weixin'];
    $_arr['email'] = $v['email'];
    $_arr['phone'] = $v['phone'];
    $questionModel->add($_arr);
}
예제 #10
0
$pv->Fields['seodescription'] = !empty($pv->Fields['seodescription']) ? "<meta name=\"description\" content=\"" . $pv->Fields['seodescription'] . "\"/>" : "";
$pv->Fields['seotitle'] = !empty($pv->Fields['seotitle']) ? $pv->Fields['seotitle'] : $pv->Fields['shortname'];
Helper_Archive::loadModule('common');
$typename = GetTypeName($typeid);
$_leaveModule = new CommonModule('sline_question');
//获取结果集
$where = 'status=1 and webid=' . $GLOBALS['sys_child_webid'];
$tableorder = "replytime desc";
$pagesize = 12;
//每页数量
$pageno = empty($pageno) ? 1 : $pageno;
//第几页
$offset = ($pageno - 1) * $pagesize;
$count = $_leaveModule->getCount($where);
$totalcount = $_leaveModule->getCount("id is not null and webid={$GLOBALS['sys_child_webid']}");
$list = $_leaveModule->getAll($where, $tableorder, "{$offset},{$pagesize}");
foreach ($list as $k => $v) {
    $list[$k]['title'] = $v['questype'] == 0 ? get_productname($v['typeid'], $v['productid']) : $v['title'];
}
$pagestr = page($count, $pageno, $pagesize, '/questions/{page}', 5, '/questions');
if ($User->IsLogin()) {
    $userinfo = $User->getInfoByMid($User->uid);
}
//模板选择
$templet = Helper_Archive::getUseTemplet('questions_index');
//获取使用模板
$templet = !empty($templet) ? $templet : SLINETEMPLATE . "/" . $cfg_df_style . "/" . "questions/" . "questions_index.htm";
//默认模板
$pv->SetTemplet($templet);
$pv->Display();
exit;