function getNickName($mid)
{
    Helper_Archive::loadModule('common');
    $model = new CommonModule('#@__member');
    $membername = $model->getField('nickname', "mid='{$mid}'");
    return $membername ? $membername : '匿名';
}
Beispiel #2
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;
 }
Beispiel #3
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;
}
Beispiel #4
0
 //订单号
 $memberid = $User->uid ? $User->uid : 0;
 $info = getSpotInfo($productautoid);
 $ticketinfo = getTicketInfo($suitid);
 $status = $paytype == 1 ? 1 : 0;
 $total_store = intval($ticketinfo['number']);
 $total_dingnum = intval(Helper_Archive::pregReplace($dingnum, 2));
 if ($total_store != -1 && $total_store < $total_dingnum) {
     echo 'nonumber';
     exit;
 }
 $linktel = Helper_Archive::pregReplace($linktel, 2);
 $arr = array('ordersn' => $ordersn, 'webid' => $webid, 'typeid' => $typeid, 'productautoid' => $productautoid, 'productaid' => $productaid, 'productname' => $productname, 'price' => $ticketinfo['ourprice'], 'childprice' => 0, 'dingnum' => Helper_Archive::pregReplace($dingnum, 2), 'usedate' => $usedate, 'childnum' => $childnum, 'linkman' => Helper_Archive::pregReplace($linkman, 5), 'linktel' => Helper_Archive::pregReplace($linktel, 2), 'linkemail' => Helper_Archive::pregReplace($linkemail, 5), 'linkqq' => '', 'jifentprice' => $ticketinfo['jifentprice'], 'jifenbook' => $ticketinfo['jifenbook'], 'jifencomment' => $ticketinfo['jifencomment'], 'addtime' => time(), 'memberid' => $memberid, 'dingjin' => $dingjin, 'suitid' => $suitid, 'paytype' => $paytype, 'usejifen' => $usejifen, 'needjifen' => $needjifen, 'status' => $status, 'haschild' => 0, 'pid' => 0, 'remark' => Helper_Archive::pregReplace($remarkinfo, 5));
 if (Helper_Archive::addOrder($arr)) {
     $model = new CommonModule('#@__member_order');
     $orderid = $model->getField('id', "ordersn='{$ordersn}'");
     //判断是否开启在线支付
     if (!empty($choosepay) && $paytype != '3' && $choosepay != '6') {
         $url = $GLOBALS['cfg_basehost'] . '/spots/booking.php?dopost=payonline&id=' . $orderid . "&paytype=" . $choosepay;
     } else {
         //$url = "{$GLOBALS['cfg_basehost']}/spots/show_{$arr['productaid']}.html";
         $url = "{$GLOBALS['cfg_basehost']}/member/query.php?dopost=search&mobile={$linktel}";
     }
     $mailto = $cfg_Email139;
     $title = $productname . "门票订单";
     $content = $linkman . "预定" . $usedate . $productname . "(价格:" . $price . ")" . "门票,数量:" . $dingnum . "张" . "联系电话:" . $linktel . "-----" . $GLOBALS['cfg_webname'];
     if (!empty($mailto)) {
         ordermaill($mailto, $title, $content);
     }
     //扣除积分
     if (!empty($usejifen)) {
Beispiel #5
0
    $arr['score2'] = $score2;
    $arr['score3'] = $score3;
    $arr['score4'] = $score4;
    $arr['articleid'] = $productid;
    $arr['level'] = getPinLunLevel($scores);
    $arr['typeid'] = $typeid;
    $arr['addtime'] = time();
    //$arr['kindlist'] = Helper_Archive::getProductKindList($arr['articleid'],$arr['typeid']);
    $status = 0;
    if ($_model->add($arr)) {
        $order = new CommonModule('#@__member_order');
        $ar = array('ispinlun' => 1);
        $w = array('id' => $orderid);
        $order->update($ar, $w);
        //点评积分
        $jifencomment = $order->getField('jifencomment', "id={$orderid}");
        if (!empty($jifencomment)) {
            $sql = "update sline_member set jifen=jifen+{$jifencomment} where mid='{$uid}'";
            $dsql->ExecuteNoneQuery($sql);
        }
        $status = 1;
    }
    echo json_encode(array('status' => $status));
    exit;
}
if ($dopost == 'delorder') {
    refundStorage($orderid, 'plus');
    $sql = "delete from #@__member_order where memberid='{$uid}' and id='{$orderid}' and status!=2";
    $result = $dsql->ExecuteNoneQuery($sql);
    if ($result) {
        echo 'ok';
Beispiel #6
0
    }
    $pv->Fields['pagename'] = $pagename;
    $pv->SetTemplet(MEMBERTEMPLET . "changepass.htm");
    $pv->Display();
    exit;
}
/*-----------------------------
//用户新密码保存

-----------------*/
if ($dopost == 'savenewpass') {
    Helper_Archive::loadModule('common');
    $_model = new CommonModule('#@__member');
    $oldpwd = md5($oldpwd);
    $newpwd = md5($newpwd1);
    $usermid = $_model->getField('mid', "mid='{$uid}' and pwd='{$oldpwd}'");
    if ($usermid == $uid) {
        $arr = array('pwd' => $newpwd);
        $where = array('mid' => $uid);
        $url = $GLOBALS['cfg_basehost'] . '/member/index.php';
        if ($_model->update($arr, $where)) {
            ShowMsg('密码修改成功!', $url);
            exit;
        }
    } else {
        ShowMsg('旧密码输入错误,请检查', '-1');
        exit;
    }
}
/*-----------------------------
//我的咨询管理
Beispiel #7
0
function getSuitNumberByDay($suitid, $day)
{
    Helper_Archive::loadModule('common');
    $model = new CommonModule('#@__car_suit_price');
    $number = $model->getField('number', "day='" . strtotime($day) . "' and suitid=" . $suitid);
    return intval($number);
}
function getMemberPic($mid)
{
    Helper_Archive::loadModule('common');
    $model = new CommonModule('#@__member');
    $pic = $model->getField('litpic', "mid='{$mid}'");
    $pic = $pic ? $pic : '/templets/smore/images/member_default.gif';
    return $pic;
}
Beispiel #9
0
function getHotelService($attrid, $groupid)
{
    global $dsql;
    Helper_Archive::loadModule('common');
    $_model = new CommonModule('#@__hotel_attr');
    $attr = explode(',', $attrid);
    foreach ($attr as $id) {
        $name = $_model->getField('attrname', "pid='{$groupid}' and id='{$id}'");
        $out .= !empty($name) ? $name . '|' : '';
    }
    return $out;
}
Beispiel #10
0
    $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;
}
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');