Beispiel #1
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;
}
Beispiel #2
0
            	    <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;
}
/*
 * 返库存操作
 * */
function refundStorage($orderid, $op)
{
    global $dsql;
    Helper_Archive::loadModule('common');
    $_model = new CommonModule('#@__member_order');
    $row = $_model->getOne("id='{$orderid}'");
Beispiel #3
0
/**
 * @version        $Id: index.php 1 8:24 2014年2月17日 netman $
 * @package        Smore.User
 */
require_once dirname(__FILE__) . "/config.php";
if (!$User->isLogin()) {
    header("Location: " . $cfg_cmsurl . "/member/login.php");
    exit;
}
$uid = empty($uid) ? "" : RemoveXSS($uid);
$pv = new View(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') {
Beispiel #4
0
function check_has_suit($suittypeid)
{
    $_suitModel = new CommonModule('sline_car_suit');
    $num = $_suitModel->getCount("suittypeid='{$suittypeid}'");
    return $num;
}
function getSellNum($productautoid)
{
    Helper_Archive::loadModule('common');
    $model = new CommonModule('#@__member_order');
    $num = $model->getCount("productautoid='{$productautoid}'");
    return $num ? $num : mt_rand(3, 20);
}
Beispiel #6
0
    foreach ($attrid_arr as $k => $v) {
        $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 != '全部') {
Beispiel #7
0
function getLeftNav($where, $typeid)
{
    Helper_Archive::loadModule('common');
    $model = new CommonModule('#@__search');
    $arr = array(array('typeid' => 1, 'channelname' => '线路'), array('typeid' => 2, 'channelname' => '酒店'), array('typeid' => 3, 'channelname' => '车辆'), array('typeid' => 4, 'channelname' => '攻略'), array('typeid' => 5, 'channelname' => '门票'), array('typeid' => 6, 'channelname' => '相册'), array('typeid' => 8, 'channelname' => '签证'), array('typeid' => 13, 'channelname' => '团购'));
    // $where = "title like'%{$keyword}%'";
    //取得全部的查询数量
    $allnum = $model->getCount($where);
    //全部数量
    $out = array();
    $out[] = array('channelname' => '全部', 'num' => $allnum, 'typeid' => 0);
    foreach ($arr as $row) {
        $wh = " ({$where}) and typeid = '{$row['typeid']}'";
        $num = $model->getCount($wh);
        $out[] = array('channelname' => $row['channelname'], 'num' => $num, 'typeid' => $row['typeid']);
    }
    return $out;
}
Beispiel #8
0
$id = $_GET['id'];
if (!is_numeric($id)) {
    exit('wrong ID');
}
$html = dirname(__FILE__) . '/questions_show.html';
if (file_exists($html) && $genpage != 1) {
    include $html;
    exit;
}
require_once SLINEINC . "/listview.class.php";
$pv = new View($typeid);
Helper_Archive::loadModule('common');
$_leaveModule = new CommonModule('sline_question');
$row = $_leaveModule->getOne('id=' . $id);
$where = 'status=1 and webid=' . $GLOBALS['sys_child_webid'];
$count = $_leaveModule->getCount($where);
$totalcount = $_leaveModule->getCount("id is not null and webid={$GLOBALS['sys_child_webid']}");
$row['title'] = $row['questype'] == 0 ? get_productname($row['typeid'], $row['productid']) : $row['title'];
$pv->Fields['seotitle'] = $row['title'];
foreach ($row as $k => $v) {
    $pv->Fields[$k] = $v;
    //模板变量赋值
}
//模板选择
$templet = Helper_Archive::getUseTemplet('questions_show');
//获取使用模板
$templet = !empty($templet) ? $templet : SLINETEMPLATE . "/" . $cfg_df_style . "/" . "questions/" . "questions_show.htm";
//默认模板
$pv->SetTemplet($templet);
$pv->Display();
exit;