Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
U
User
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangjun
User
Commits
c30266f4
Commit
c30266f4
authored
Jun 24, 2024
by
fangliyan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'refs/heads/subscribe2.0' into release_dev_107
# Conflicts: # esf_core/config/database.php
parents
f06fd4ff
08ba82ed
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
236 additions
and
2298 deletions
+236
-2298
.gitignore
.gitignore
+2
-0
esf_center_api.php
center/controllers/esf_center_api.php
+103
-0
login.php
center/controllers/login.php
+1
-1
user.php
center/controllers/user.php
+9
-4
user_lb.php
center/controllers/user_lb.php
+0
-2262
user_wang.php
center/controllers/user_wang.php
+6
-2
left.php
center/views/left.php
+2
-2
constants.php
esf_core/config/constants.php
+34
-17
MY_Model.php
esf_core/core/MY_Model.php
+2
-2
function_helper.php
esf_core/helpers/function_helper.php
+31
-1
user_model.php
esf_core/models/user_model.php
+46
-7
No files found.
.gitignore
View file @
c30266f4
# Created by .ignore support plugin (hsz.mobi)
.idea
\ No newline at end of file
center/controllers/esf_center_api.php
View file @
c30266f4
...
...
@@ -289,6 +289,109 @@ class Esf_center_api extends MY_Controller {
echo
serialize
(
$return_array
);
}
/**
* 关注房源操作接口,base_id版本
* @author fly
*/
public
function
save_house_focus_by_baseId
()
{
$return
=
''
;
$passport_uid
=
$this
->
input
->
get
(
'passport_uid'
);
$uid
=
0
;
$flag
=
$this
->
input
->
get
(
'flag'
);
if
(
$passport_uid
){
//根据passport_uid获取uid
$uid
=
$this
->
user_model
->
getUidByPassportId
(
$passport_uid
);
if
(
empty
(
$flag
))
{
$flag
=
2
;
}
if
(
$uid
==
0
)
{
$return
=
'N_USER'
;
}
}
$kind
=
$this
->
input
->
get
(
'kind'
);
$rowid
=
$this
->
input
->
get
(
'rowid'
);
$city
=
$this
->
input
->
get
(
'city'
);
$phone
=
$this
->
input
->
get
(
'phone'
);
$base_id
=
$this
->
input
->
get
(
'base_id'
);
$city
=
$city
?
$city
:
'nj'
;
$tbl
=
$kind
==
3
?
'sell'
:
'rent'
;
$result
=
$this
->
user_model
->
getCollectHouseIdByBaseID
(
$uid
,
$rowid
,
$city
);
//已关注此房源
if
(
$result
[
'id'
]
>
0
)
{
$return
=
'N_COL'
;
}
if
(
$tbl
==
'sell'
){
$houseinfo
=
$this
->
house_model
->
get_data
(
array
(
'form_name'
=>
$tbl
,
'where'
=>
array
(
'id'
=>
$rowid
,
'esta'
=>
'1'
),
'select'
=>
array
(
'infotype'
,
'infofrom'
,
'id'
,
'district'
,
'address'
,
'streetid'
,
'blockshowname'
,
'room'
,
'hall'
,
'buildarea'
,
'forward'
,
'fitment'
,
'buildyear'
,
'floor'
,
'totalfloor'
,
'subfloor'
,
'price'
,
'uid'
,
'telno'
,
'pic1'
,
'contactor'
,
'uid'
),
'limit'
=>
1
),
'esfhousebak'
);
}
else
{
$houseinfo
=
$this
->
house_model
->
get_data
(
array
(
'form_name'
=>
$tbl
,
'where'
=>
array
(
'id'
=>
$rowid
,
'esta'
=>
'1'
),
'select'
=>
array
(
'infotype'
,
'infofrom'
,
'id'
,
'district'
,
'address'
,
'streetid'
,
'blockshowname'
,
'room'
,
'hall'
,
'buildarea'
,
'forward'
,
'fitment'
,
'buildyear'
,
'floor'
,
'totalfloor'
,
'subfloor'
,
'price'
,
'uid'
,
'telno'
,
'pic1'
,
'contactor'
,
'uid'
,
'priceunit'
,
'renttype'
),
'limit'
=>
1
),
'esfhousebak'
);
}
if
(
empty
(
$houseinfo
[
0
])
&&
$city
==
'nj'
)
{
$return
=
'N_HOU'
;
}
elseif
(
$return
!=
'N_COL'
){
if
(
!
empty
(
$houseinfo
[
0
]))
{
$searchcond
=
serialize
(
$houseinfo
[
0
]);
}
else
{
$searchcond
=
''
;
}
$return
=
$this
->
user_model
->
addcollectByBaseID
(
$base_id
,
$rowid
,
$kind
,
$searchcond
,
$city
,
$flag
,
$passport_uid
,
$uid
);
}
if
(
$return
==
'N_COL'
){
$result
=
2
;
$msg
=
'已收藏此房源'
;
}
elseif
(
$return
==
'N_HOU'
){
$result
=
3
;
$msg
=
'无此房源'
;
}
elseif
(
$return
==
'N_USER'
){
$result
=
4
;
$msg
=
'无此用户'
;
}
elseif
(
$return
>
0
){
$result
=
1
;
$msg
=
'收藏成功'
;
$house_type
=
$houseinfo
[
0
][
'room'
]
.
"室"
.
$houseinfo
[
0
][
'hall'
]
.
"厅"
;
$houseinfo
[
0
][
'floor'
]
=
iconv
(
'gbk'
,
'utf-8'
,
$houseinfo
[
0
][
'floor'
]);
$houseinfo
[
0
][
'blockshowname'
]
=
iconv
(
'gbk'
,
'utf-8'
,
$houseinfo
[
0
][
'blockshowname'
]);
$houseinfo
[
0
][
'forward'
]
=
iconv
(
'gbk'
,
'utf-8'
,
$houseinfo
[
0
][
'forward'
]);
$house_type
=
iconv
(
'gbk'
,
'utf-8'
,
$house_type
);
if
(
$kind
==
3
){
$url
=
"http://crm.house365.com/index.php/Simulate/sea_utf8?mobile=
{
$phone
}
&city=
{
$city
}
&activefrom=485&my_floor=
{
$houseinfo
[
0
][
'floor'
]
}
&total_floor=
{
$houseinfo
[
0
][
'totalfloor'
]
}
&block_name=
{
$houseinfo
[
0
][
'blockshowname'
]
}
&area=
{
$houseinfo
[
0
][
'buildarea'
]
}
&forward=
{
$houseinfo
[
0
][
'forward'
]
}
&buy_old_property=
{
$houseinfo
[
0
][
'infotype'
]
}
&house_type=
{
$house_type
}
"
;
$ch
=
curl_init
();
curl_setopt
(
$ch
,
CURLOPT_URL
,
$url
);
curl_setopt
(
$ch
,
CURLOPT_TIMEOUT
,
1
);
curl_setopt
(
$ch
,
CURLOPT_RETURNTRANSFER
,
1
);
curl_setopt
(
$ch
,
CURLOPT_HEADER
,
0
);
$rs
=
curl_exec
(
$ch
);
curl_close
(
$ch
);
}
//验证不在白名单,不在推送库,不在推送历史库
$result2
=
$this
->
push_model
->
yzpush
(
$telno
);
if
(
$result2
<=
0
&&
$city
==
'nj'
){
//加入备选库
//$this->push_model->addalternatives($uid,$telno);
}
}
elseif
(
$return
==
0
){
$result
=
0
;
$msg
=
'收藏失败'
;
}
$return_array
=
array
(
'result'
=>
$result
,
'msg'
=>
$msg
);
echo
serialize
(
$return_array
);
}
...
...
center/controllers/login.php
View file @
c30266f4
...
...
@@ -17,7 +17,7 @@ class Login extends MY_Controller
function
index
()
{
Header
(
"HTTP/1.1 301 Moved Permanently"
);
Header
(
"Location: http://
newrent.house365.com/user/login
"
);
Header
(
"Location: http://
passport.house365.com/index/login?others_returnback=http://newrent.house365.com/user-center/index
"
);
exit
;
//IM 埋点
if
(
$_GET
[
'from'
]
==
'im'
){
...
...
center/controllers/user.php
View file @
c30266f4
...
...
@@ -45,7 +45,7 @@ class User extends MY_Controller
);
private
$address
=
array
(
'nj'
=>
'南京市
建邺区云龙山路99号江苏省建大厦B幢6楼信息中心;(地铁10号线中胜站下2A出口,向东300
米)'
,
'nj'
=>
'南京市
雨花台区花神大道90号中兴物联研发大楼3号楼4楼房源审核部。(地铁1号线软件大道站2号出口,步行363
米)'
,
'wh'
=>
'芜湖市镜湖区绿地新都会C座7层 365淘房二手房运营部'
,
);
...
...
@@ -544,6 +544,11 @@ class User extends MY_Controller
echo
$result
;
exit
;
}
if
(
isset
(
$_GET
[
'zj'
])
&&
$_GET
[
'zj'
]
==
1
)
{
var_dump
(
$house
);
die
();
}
//分页开始
$data
[
'collect_num'
]
=
$this
->
num_5
;
$data
[
'pagesize'
]
=
5
;
//设定每一页显示的记录数
...
...
@@ -552,7 +557,7 @@ class User extends MY_Controller
$data
[
'page'
]
=
(
$data
[
'page'
]
>
$data
[
'pages'
]
&&
$data
[
'pages'
]
!=
0
)
?
$data
[
'pages'
]
:
$data
[
'page'
];
//判断跳转页数
$data
[
'offset'
]
=
$data
[
'pagesize'
]
*
(
$data
[
'page'
]
-
1
);
//计算记录偏移量
$data
[
'collect'
]
=
$this
->
user_model
->
getcollect
(
5
,
$this
->
user_id
,
$data
[
'offset'
],
$data
[
'pagesize'
]);
$data
[
'sarr'
]
=
$this
->
user_model
->
getSeachcondStr
(
$data
[
'collect'
]);
$data
[
'sarr'
]
=
$this
->
user_model
->
getSeachcondStr
(
$data
[
'collect'
]
,
'rent'
);
$data
[
'surl'
]
=
$this
->
user_model
->
getSeachcondUrl
(
$data
[
'collect'
],
5
);
//获取你可能感兴趣的租房
$data
[
'likerent'
]
=
$this
->
user_model
->
getlikehouse
(
$this
->
user_id
,
'rent'
,
4
);
...
...
@@ -1920,7 +1925,7 @@ class User extends MY_Controller
}
}
$userIdArr
=
array
(
4112782
,
5355879
,
1729793
,
4449390
,
6264549
);
$userIdArr
=
array
(
4112782
,
5355879
,
1729793
,
4449390
,
6264549
,
6261067
);
if
(
in_array
(
$this
->
user_id
,
$userIdArr
)){
$price
=
$price
*
0.01
;
}
...
...
@@ -2255,7 +2260,7 @@ class User extends MY_Controller
$data
[
'orderData'
]
=
$orderData
;
$data
[
'title'
]
=
'发票在线填写'
;
$this
->
load
->
model
(
"tel_model"
);
$data
[
'telno_config'
]
=
$this
->
tel_model
->
getTelInfoByType
(
tel_model
::
TYPE
3
);
$data
[
'telno_config'
]
=
$this
->
tel_model
->
getTelInfoByType
(
tel_model
::
TYPE
2
);
$data
[
'address_config'
]
=
isset
(
$this
->
address
[
GB_CITY
])
?
$this
->
address
[
GB_CITY
]
:
''
;
$this
->
load
->
view
(
'order_invoice'
,
$data
);
...
...
center/controllers/user_lb.php
deleted
100644 → 0
View file @
f06fd4ff
<?php
if
(
!
defined
(
'BASEPATH'
))
exit
(
'No direct script access allowed'
);
class
User
extends
MY_Controller
{
/**
* Survey
* @author Candison <www.kandisheng.com>
*/
private
$surveyConfig
=
array
(
'nj'
=>
array
(
'surveyInfotype'
=>
array
(
1
,
'1'
),
'surveyDistrict'
=>
array
(
'雨花台区'
),
),
'wh'
=>
array
(
'surveyInfotype'
=>
array
(
1
,
2
,
3
,
4
,
5
,
6
,
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
),
'surveyDistrict'
=>
array
(
'镜湖区'
,
'鸠江区'
,
'弋江区'
,
'三山区'
),
),
);
/**
* 开通支付的城市
* @var array
*/
private
$openPayCitys
=
array
(
'nj'
,
'wh'
);
/**
* 支付中台活动id
* @var array
*/
private
$openPayCitysActId
=
array
(
'nj'
=>
57
,
'wh'
=>
82
,
);
private
$surveyStatus
=
array
(
0
=>
'实勘未知状态'
,
1
=>
'实勘审核中'
,
2
=>
'实勘不通过'
,
3
=>
'实勘已预约'
,
4
=>
'实勘处理中'
,
5
=>
'实勘已上传'
,
6
=>
'实勘已取消'
);
private
$address
=
array
(
'nj'
=>
'南京市建邺区云龙山路99号江苏省建大厦B幢6楼信息中心;(地铁10号线中胜站下2A出口,向东300米'
,
'wh'
=>
'芜湖市镜湖区绿地新都会C座7层 365淘房二手房运营部'
,
);
function
__construct
()
{
parent
::
__construct
();
$this
->
load
->
model
(
"user_model"
);
$this
->
load
->
model
(
"broker_model"
);
$this
->
load
->
model
(
"pic_model"
);
$this
->
load
->
model
(
"block_model"
);
$this
->
load
->
model
(
"ask_model"
);
$this
->
load
->
model
(
"house_model"
);
$this
->
load
->
model
(
"house_statistic_model"
);
// 租房9折优惠券 20200507添加
$this
->
load
->
model
(
'rent_coupon_model'
);
$this
->
load
->
library
(
"user_class"
);
$this
->
load
->
library
(
"apply_class"
);
$this
->
user_id
=
checklogin
();
if
(
$this
->
user_id
<=
0
)
{
jumpto
(
USER_CENTER
.
'login'
);
exit
();
}
//关注各项数量
$this
->
num_1
=
$this
->
user_model
->
getusercollect
(
$this
->
user_id
,
1
);
$this
->
num_2
=
$this
->
user_model
->
getusercollect
(
$this
->
user_id
,
2
);
$this
->
num_3
=
$this
->
user_model
->
getusercollect
(
$this
->
user_id
,
3
);
$this
->
num_4
=
$this
->
user_model
->
getusercollect
(
$this
->
user_id
,
4
);
$this
->
num_5
=
$this
->
user_model
->
getusercollect
(
$this
->
user_id
,
5
);
$this
->
num_7
=
$this
->
user_model
->
getusercollect
(
$this
->
user_id
,
7
);
}
private
function
getAD
(
$id
=
0
,
$width
=
0
,
$height
=
0
)
{
/*
$databaseHost = '172.17.1.5';
$databasePort = '3306';
$databaseName = 'njhouse';
$databaseAccount = 'root';
$databasePassword = 'idontcare';
$databaseCharset = 'gbk';
// Connect
$mysql = mysql_connect(sprintf('%s:%s', $databaseHost, $databasePort), $databaseAccount, $databasePassword);
if($mysql === false){
return $defaultString;
}
// Query
$sql = sprintf('select id,filetype,width,height,href,src from news_ad where id="%s" limit 1', $id);
$result = mysql_db_query($databaseName, $sql, $mysql);
if($result === false){
return $defaultString;
}
$data = mysql_fetch_row($result);
if($data === false){
return $defaultString;
}
*/
// Config
$defaultString
=
''
;
$adInterfaceBaseURL
=
'http://adadmin.house365.com/api/ad/sort_ads.php'
;
// Get Data
$adInterfaceURL
=
sprintf
(
'%s?city=%s&id=%s'
,
$adInterfaceBaseURL
,
GB_CITY
,
$id
);
$result
=
curl_get_contents
(
$adInterfaceURL
);
if
(
empty
(
$result
)){
return
$defaultString
;
}
$data
=
unserialize
(
$result
);
if
(
!
isset
(
$data
[
0
])){
return
$defaultString
;
}
$data
=
$data
[
0
];
// HTML
if
(
intval
(
$width
)
==
0
&&
intval
(
$height
)
==
0
){
$width
=
$data
[
'width'
];
$height
=
$data
[
'height'
];
}
if
(
$data
[
'filetype'
]
==
'i'
){
if
(
empty
(
$data
[
'href'
])){
return
sprintf
(
'<img target="_blank" src="%s" width="%s" height="%s" border="0">'
,
$data
[
'src'
],
$width
,
$height
);
}
return
sprintf
(
'<a target="_blank" href="%s"><img target="_blank" src="%s" width="%s" height="%s" border="0"></a>'
,
$data
[
'link'
],
$data
[
'src'
],
$width
,
$height
);
}
if
(
$data
[
'filetype'
]
==
'f'
){
return
sprintf
(
'<embed src="%s" quality="high" width="%s" height="%s" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent">'
,
$data
[
'src'
],
$width
,
$height
);
}
return
$defaultString
;
}
/**
* 用户中心首页
* @author cxf
*/
public
function
index
()
{
global
$house
;
header
(
"Location:http://newrent.house365.com/user-center/index"
);
die
;
$data
[
'conf_where'
]
=
'index'
;
$data
[
'title'
]
=
'会员中心'
;
$data
[
'priceunit'
]
=
$house
[
'priceunit'
];
$data
[
'sell_num'
]
=
$this
->
house_model
->
gethousenumbyuid
(
$this
->
user_id
,
'sell'
,
1
);
$data
[
'rent_num'
]
=
$this
->
house_model
->
gethousenumbyuid
(
$this
->
user_id
,
'rent'
,
1
);
$data
[
'want_num'
]
=
$this
->
user_model
->
get_rent_wantnum_by_uid
(
$this
->
user_id
,
1
);
$data
[
'buy_num'
]
=
$this
->
user_model
->
get_buynum_by_uid
(
$this
->
user_id
,
1
);
$data
[
'user_detail'
]
=
$this
->
user_model
->
get_userdetail
(
$this
->
user_id
,
array
(
'email'
,
'telno'
,
'auth_type'
,
'bank_type'
));
$data
=
array_merge
(
$data
,
$this
->
realNameData
());
//获取最新2条房源
$newhouse
=
$this
->
user_model
->
newhouse
(
$this
->
user_id
,
2
);
$data
[
'newhouse'
]
=
$newhouse
;
$count_newhouse
=
count
(
$newhouse
);
$active_num
=
0
;
$active_sell_num
=
0
;
for
(
$i
=
0
;
$i
<
$count_newhouse
;
$i
++
)
{
if
(
$newhouse
[
$i
][
'esta'
]
==
1
)
{
if
(
$newhouse
[
$i
][
'tbl'
]
==
'sell'
)
{
$active_sell_num
++
;
}
$active_num
++
;
}
}
$sell_collect_house
=
$this
->
user_model
->
getcollect
(
3
,
$this
->
user_id
,
0
,
8
);
//网友关注的二手房房源
$rent_collect_house
=
$this
->
user_model
->
getcollect
(
4
,
$this
->
user_id
,
0
,
8
);
//网友关注的租房房源
$sell_collect_block
=
$this
->
user_model
->
getcollect
(
2
,
$this
->
user_id
,
0
,
8
);
//网友关注的小区
$data
[
'sell_collect_house'
]
=
$sell_collect_house
;
$data
[
'rent_collect_house'
]
=
$rent_collect_house
;
$data
[
'sell_collect_block'
]
=
$sell_collect_block
;
//获取你可能感兴趣的二手房
$data
[
'likesell'
]
=
$this
->
user_model
->
getlikehousebyrule
(
$active_num
,
$active_sell_num
,
$newhouse
,
$sell_collect_house
,
$sell_collect_block
,
$this
->
user_id
,
'sell'
,
$active_sell_num
,
4
);
//获取你可能感兴趣的租房
$data
[
'likerent'
]
=
$this
->
user_model
->
getlikehousebyrule
(
$active_num
,
$active_sell_num
,
$newhouse
,
$rent_collect_house
,
$sell_collect_block
,
$this
->
user_id
,
'rent'
,
$active_sell_num
,
4
);
//获取你可能感兴趣的小区
$data
[
'likeblock'
]
=
$this
->
user_model
->
getlikehousebyrule
(
$active_num
,
$active_sell_num
,
$newhouse
,
$sell_collect_house
,
$sell_collect_block
,
$this
->
user_id
,
'block'
,
4
);
//中奖通知 5.25-8.31
$data
[
'is_win'
]
=
$this
->
_get_is_win
();
//BI统计 ----- start----->
$data
[
'isa_website'
]
=
'2,19,46'
;
$data
[
'isa_city'
]
=
GB_CITY
;
$data
[
'isa_addones'
]
=
''
;
$data
[
'isa_url'
]
=
'isa.house365.com/js/analyze.js?v=2.1'
;
$this
->
load
->
model
(
'package_model'
);
$data
[
'limitNumGtZero'
]
=
$this
->
package_model
->
getLimitNumGtZero
();
//BI统计 ----- ent----->
/**
* Survey
* @author Candison <www.kandisheng.com>
*/
if
(
is_array
(
$data
[
'newhouse'
]))
{
if
(
GB_CITY
==
'nj'
){
$this
->
load
->
model
(
'survey_model'
);
$modelSurvey
=
new
Survey_model
();
}
elseif
(
GB_CITY
==
'wh'
){
$this
->
load
->
model
(
'vr_model'
);
$modelSurvey
=
new
Vr_model
();
}
foreach
(
$data
[
'newhouse'
]
as
&
$value
)
{
$value
[
'survey_status'
]
=
''
;
$value
[
'can_survey'
]
=
false
;
$value
[
'show_survey_icon'
]
=
false
;
if
(
intval
(
$value
[
'esta'
])
!=
1
){
$value
[
'survey'
]
=
0
;
}
if
(
$value
[
'tbl'
]
==
'sell'
&&
$data
[
'limitNumGtZero'
][
5
][
'sell'
]
&&
intval
(
$value
[
'survey'
])
!=
1
&&
intval
(
$value
[
'esta'
])
==
1
&&
in_array
(
GB_CITY
,
array_keys
(
$this
->
surveyConfig
))
&&
in_array
(
intval
(
$value
[
'infotype'
]),
$this
->
surveyConfig
[
GB_CITY
][
'surveyInfotype'
])
&&
in_array
(
$value
[
'district'
],
$this
->
surveyConfig
[
GB_CITY
][
'surveyDistrict'
]))
{
$value
[
'can_survey'
]
=
true
;
}
if
(
intval
(
$value
[
'survey'
])
==
1
)
{
if
(
GB_CITY
==
'nj'
){
$surveyInformation
=
$modelSurvey
->
getInformation
(
'sell'
,
$value
[
'id'
]);
$status
=
isset
(
$surveyInformation
[
0
][
'status'
])
?
intval
(
$surveyInformation
[
0
][
'status'
])
:
0
;
if
(
$status
==
3
&&
!
empty
(
$surveyInformation
[
0
][
'time_order'
])
&&
time
()
>
intval
(
$surveyInformation
[
0
][
'time_order'
]))
{
$status
=
4
;
}
if
(
$status
!=
2
){
$value
[
'show_survey_icon'
]
=
true
;
}
$value
[
'survey_status'
]
=
isset
(
$this
->
surveyStatus
[
$status
])
?
$this
->
surveyStatus
[
$status
]
:
'实勘未知状态'
;
}
elseif
(
GB_CITY
==
'wh'
){
$surveyInformation
=
$modelSurvey
->
getVrInfoByHouseId
(
'sell'
,
$value
[
'id'
]);
if
(
$surveyInformation
){
$value
[
'show_survey_icon'
]
=
$surveyInformation
[
'show_icon'
];
$value
[
'survey_status'
]
=
$surveyInformation
[
'vr_status_word'
];
}
}
}
//获取房源已有套餐
if
(
in_array
(
GB_CITY
,
$this
->
openPayCitys
)){
$packageData
=
$this
->
package_model
->
getHousePackageNew
(
$value
[
'id'
],
$value
[
'tbl'
]);
if
(
$packageData
){
if
(
isset
(
$packageData
[
'leftTime'
]))
$value
[
'leftTime'
]
=
$packageData
[
'leftTime'
];
if
(
in_array
(
1
,
$packageData
[
'package_types'
])
||
in_array
(
2
,
$packageData
[
'package_types'
])
||
in_array
(
3
,
$packageData
[
'package_types'
])){
$value
[
'promoting'
]
=
1
;
}
else
{
$value
[
'promoting'
]
=
0
;
}
}
}
}
}
$data
[
'ad3799'
]
=
$this
->
getAD
(
3799
);
$data
[
'ad4217'
]
=
$this
->
getAD
(
4217
);
$this
->
load
->
view
(
'index'
,
$data
);
}
/**
* 会员中心切换城市
* @author cxf
*/
public
function
changecity
()
{
$city
=
$this
->
input
->
get
(
'city'
);
$city
=
!
empty
(
$city
)
?
$city
:
'nj'
;
header
(
"Location:http://newrent.house365.com/user-center/switch-city?city="
.
$city
);
die
;
setcoandsess
(
'website_jumpto_city'
,
$city
);
jumpto
(
USER_CENTER
.
'user'
);
}
/**
* 我的关注二手房页面
* @author cxf
*/
public
function
selllist
()
{
$data
[
'conf_where'
]
=
'selllist'
;
$data
[
'title'
]
=
'会员中心'
;
//删除操作
if
(
isset
(
$_POST
[
'muldel'
])
&&
$_POST
[
'muldel'
]
==
'del'
)
{
$result
=
$this
->
user_model
->
delcollect
(
$_POST
[
'actionid'
]);
echo
$result
;
exit
;
}
//分页开始
$data
[
'collect_num'
]
=
$this
->
num_3
;
$data
[
'pagesize'
]
=
8
;
//设定每一页显示的记录数
$data
[
'pages'
]
=
$data
[
'collect_num'
]
?
ceil
(
$data
[
'collect_num'
]
/
$data
[
'pagesize'
])
:
0
;
//计算总页数
$data
[
'page'
]
=
$this
->
uri
->
segment
(
3
)
?
intval
(
$this
->
uri
->
segment
(
3
))
:
1
;
// 获取当前页数
$data
[
'page'
]
=
(
$data
[
'page'
]
>
$data
[
'pages'
]
&&
$data
[
'pages'
]
!=
0
)
?
$data
[
'pages'
]
:
$data
[
'page'
];
//判断跳转页数
$data
[
'offset'
]
=
$data
[
'pagesize'
]
*
(
$data
[
'page'
]
-
1
);
//计算记录偏移量
$data
[
'collect'
]
=
$this
->
user_model
->
getcollect
(
3
,
$this
->
user_id
,
$data
[
'offset'
],
$data
[
'pagesize'
]);
if
(
is_array
(
$data
[
'collect'
])
&&!
empty
(
$data
[
'collect'
])){
foreach
(
$data
[
'collect'
]
as
$key
=>
$value
){
if
(
GB_CITY
==
'nj'
)
{
$isChoice
=
$this
->
user_model
->
isCheckPriceRemind
(
$this
->
user_id
,
$value
[
'collect_id'
]);
$infofrom_data
=
$this
->
user_model
->
get_infofrom_by_id
(
$value
[
'collect_id'
]);
}
$data
[
'collect'
][
$key
][
'infofrom'
]
=
$infofrom_data
[
0
][
'infofrom'
];
$data
[
'collect'
][
$key
][
'is_remind'
]
=
isset
(
$isChoice
[
0
][
'status'
])
&&
(
$isChoice
[
0
][
'status'
]
==
1
)
?
1
:
0
;
}
}
//获取你可能感兴趣的二手房
$data
[
'likesell'
]
=
$this
->
user_model
->
getlikehouse
(
$this
->
user_id
,
'sell'
,
4
);
//BI统计 ----- start----->
$data
[
'isa_website'
]
=
'2,19,79'
;
$data
[
'isa_city'
]
=
GB_CITY
;
$data
[
'isa_addones'
]
=
''
;
$data
[
'isa_url'
]
=
'isa.house365.com/js/analyze.js?v=2.1'
;
//BI统计 ----- ent----->
$this
->
load
->
view
(
'my_attention_sell'
,
$data
);
}
/**
* 我的关注租房页面
* @author cxf
*/
public
function
rentlist
()
{
GLOBAL
$house
;
$data
[
'conf_where'
]
=
'selllist'
;
$data
[
'title'
]
=
'我的关注'
;
//删除操作
if
(
isset
(
$_POST
[
'muldel'
])
&&
$_POST
[
'muldel'
]
==
'del'
)
{
$result
=
$this
->
user_model
->
delcollect
(
$_POST
[
'actionid'
]);
echo
$result
;
exit
;
}
//分页开始
$data
[
'collect_num'
]
=
$this
->
num_4
;
$data
[
'pagesize'
]
=
8
;
//设定每一页显示的记录数
$data
[
'pages'
]
=
$data
[
'collect_num'
]
?
ceil
(
$data
[
'collect_num'
]
/
$data
[
'pagesize'
])
:
0
;
//计算总页数
$data
[
'page'
]
=
$this
->
uri
->
segment
(
3
)
?
intval
(
$this
->
uri
->
segment
(
3
))
:
1
;
// 获取当前页数
$data
[
'page'
]
=
(
$data
[
'page'
]
>
$data
[
'pages'
]
&&
$data
[
'pages'
]
!=
0
)
?
$data
[
'pages'
]
:
$data
[
'page'
];
//判断跳转页数
$data
[
'offset'
]
=
$data
[
'pagesize'
]
*
(
$data
[
'page'
]
-
1
);
//计算记录偏移量
$data
[
'collect'
]
=
$this
->
user_model
->
getcollect
(
4
,
$this
->
user_id
,
$data
[
'offset'
],
$data
[
'pagesize'
]);
$data
[
'priceunit'
]
=
$house
[
'priceunit'
];
//获取你可能感兴趣的租房
$data
[
'likerent'
]
=
$this
->
user_model
->
getlikehouse
(
$this
->
user_id
,
'rent'
,
4
);
$this
->
load
->
view
(
'my_attention_rent'
,
$data
);
}
/**
* 我的关注小区页面
* @author cxf
*/
public
function
blocklist
()
{
$data
[
'conf_where'
]
=
'blocklist'
;
$data
[
'title'
]
=
'我的关注'
;
//删除操作
if
(
isset
(
$_POST
[
'muldel'
])
&&
$_POST
[
'muldel'
]
==
'del'
)
{
$result
=
$this
->
user_model
->
delcollect
(
$_POST
[
'actionid'
]);
echo
$result
;
exit
;
}
//分页开始
$data
[
'collect_num'
]
=
$this
->
num_2
;
$data
[
'pagesize'
]
=
8
;
//设定每一页显示的记录数
$data
[
'pages'
]
=
$data
[
'collect_num'
]
?
ceil
(
$data
[
'collect_num'
]
/
$data
[
'pagesize'
])
:
0
;
//计算总页数
$data
[
'page'
]
=
$this
->
uri
->
segment
(
3
)
?
intval
(
$this
->
uri
->
segment
(
3
))
:
1
;
// 获取当前页数
$data
[
'page'
]
=
(
$data
[
'page'
]
>
$data
[
'pages'
]
&&
$data
[
'pages'
]
!=
0
)
?
$data
[
'pages'
]
:
$data
[
'page'
];
//判断跳转页数
$data
[
'offset'
]
=
$data
[
'pagesize'
]
*
(
$data
[
'page'
]
-
1
);
//计算记录偏移量
$data
[
'collect'
]
=
$this
->
user_model
->
getcollect
(
2
,
$this
->
user_id
,
$data
[
'offset'
],
$data
[
'pagesize'
]);
//获取你可能感兴趣的小区
$data
[
'likeblock'
]
=
$this
->
user_model
->
getlikehouse
(
$this
->
user_id
,
'block'
,
4
);
//BI统计 ----- start----->
$data
[
'isa_website'
]
=
'2,19,80'
;
$data
[
'isa_city'
]
=
GB_CITY
;
$data
[
'isa_addones'
]
=
''
;
$data
[
'isa_url'
]
=
'isa.house365.com/js/analyze.js?v=2.1'
;
//BI统计 ----- ent----->
$this
->
load
->
view
(
'my_attention_block'
,
$data
);
}
/**
* 我的关注学区页面
* @author xue
*/
public
function
schoollist
()
{
$data
[
'conf_where'
]
=
'schoollist'
;
$data
[
'title'
]
=
'会员中心'
;
//删除操作
if
(
isset
(
$_POST
[
'muldel'
])
&&
$_POST
[
'muldel'
]
==
'del'
)
{
$result
=
$this
->
user_model
->
delcollect
(
$_POST
[
'actionid'
]);
echo
$result
;
exit
;
}
//分页开始
$data
[
'collect_num'
]
=
$this
->
num_7
;
$data
[
'pagesize'
]
=
8
;
//设定每一页显示的记录数
$data
[
'pages'
]
=
$data
[
'collect_num'
]
?
ceil
(
$data
[
'collect_num'
]
/
$data
[
'pagesize'
])
:
0
;
//计算总页数
$data
[
'page'
]
=
$this
->
uri
->
segment
(
3
)
?
intval
(
$this
->
uri
->
segment
(
3
))
:
1
;
// 获取当前页数
$data
[
'page'
]
=
(
$data
[
'page'
]
>
$data
[
'pages'
]
&&
$data
[
'pages'
]
!=
0
)
?
$data
[
'pages'
]
:
$data
[
'page'
];
//判断跳转页数
$data
[
'offset'
]
=
$data
[
'pagesize'
]
*
(
$data
[
'page'
]
-
1
);
//计算记录偏移量
$data
[
'collect'
]
=
$this
->
user_model
->
getCollectSchoolList
(
7
,
$this
->
user_id
,
$data
[
'offset'
],
$data
[
'pagesize'
]);
//获取你可能感兴趣的二手房
$data
[
'likesell'
]
=
$this
->
user_model
->
getLikeSchoolHouse
(
$this
->
user_id
);
//BI统计 ----- start----->
$data
[
'isa_website'
]
=
'2,19,77'
;
$data
[
'isa_city'
]
=
GB_CITY
;
$data
[
'isa_addones'
]
=
''
;
$data
[
'isa_url'
]
=
'isa.house365.com/js/analyze.js?v=2.1'
;
//BI统计 ----- ent----->
$this
->
load
->
view
(
'my_attention_school'
,
$data
);
}
/**
* 我的二手房关注条件页面
* @author cxf
*/
public
function
sell_condition
()
{
$data
[
'conf_where'
]
=
'sell_condition'
;
$data
[
'title'
]
=
'我的关注'
;
$muldel
=
$this
->
input
->
post
(
'muldel'
);
$actionid
=
$this
->
input
->
post
(
'actionid'
);
//删除操作
if
(
isset
(
$muldel
)
&&
$muldel
==
'del'
)
{
$result
=
$this
->
user_model
->
delcollect
(
$actionid
);
echo
$result
;
exit
;
}
//分页开始
$data
[
'collect_num'
]
=
$this
->
num_1
;
$data
[
'pagesize'
]
=
5
;
//设定每一页显示的记录数
//计算总页数
$data
[
'pages'
]
=
$data
[
'collect_num'
]
?
ceil
(
$data
[
'collect_num'
]
/
$data
[
'pagesize'
])
:
0
;
//获取当前页数
$data
[
'page'
]
=
$this
->
uri
->
segment
(
3
)
?
intval
(
$this
->
uri
->
segment
(
3
))
:
1
;
//判断跳转页数
$data
[
'page'
]
=
(
$data
[
'page'
]
>
$data
[
'pages'
]
&&
$data
[
'pages'
]
!=
0
)
?
$data
[
'pages'
]
:
$data
[
'page'
];
//计算记录偏移量
$data
[
'offset'
]
=
$data
[
'pagesize'
]
*
(
$data
[
'page'
]
-
1
);
$data
[
'collect'
]
=
$this
->
user_model
->
getcollect
(
1
,
$this
->
user_id
,
$data
[
'offset'
],
$data
[
'pagesize'
]);
$data
[
'sarr'
]
=
$this
->
user_model
->
getSeachcondStr
(
$data
[
'collect'
]);
$data
[
'surl'
]
=
$this
->
user_model
->
getSeachcondUrl
(
$data
[
'collect'
],
1
);
//获取你可能感兴趣的二手房
$data
[
'likesell'
]
=
$this
->
user_model
->
getlikehouse
(
$this
->
user_id
,
'sell'
,
4
);
//2018-8-16加,房源特色总标签
$data
[
'house_features'
]
=
$this
->
user_model
->
getHouseFeatures
();
//BI统计 ----- start----->
$data
[
'isa_website'
]
=
'2,19,78'
;
$data
[
'isa_city'
]
=
GB_CITY
;
$data
[
'isa_addones'
]
=
''
;
$data
[
'isa_url'
]
=
'isa.house365.com/js/analyze.js?v=2.1'
;
//BI统计 ----- ent----->
$this
->
load
->
view
(
'my_sell_condition'
,
$data
);
}
/**
* 我的关注条件页面
* @author cxf
*/
public
function
rent_condition
()
{
global
$house
;
$data
[
'conf_where'
]
=
'sell_condition'
;
$data
[
'title'
]
=
'我的关注'
;
$data
[
'priceunit'
]
=
$house
[
'priceunit'
];
//删除操作
if
(
isset
(
$_POST
[
'muldel'
])
&&
$_POST
[
'muldel'
]
==
'del'
)
{
$result
=
$this
->
user_model
->
delcollect
(
$_POST
[
'actionid'
]);
echo
$result
;
exit
;
}
//分页开始
$data
[
'collect_num'
]
=
$this
->
num_5
;
$data
[
'pagesize'
]
=
5
;
//设定每一页显示的记录数
$data
[
'pages'
]
=
$data
[
'collect_num'
]
?
ceil
(
$data
[
'collect_num'
]
/
$data
[
'pagesize'
])
:
0
;
//计算总页数
$data
[
'page'
]
=
$this
->
uri
->
segment
(
3
)
?
intval
(
$this
->
uri
->
segment
(
3
))
:
1
;
// 获取当前页数
$data
[
'page'
]
=
(
$data
[
'page'
]
>
$data
[
'pages'
]
&&
$data
[
'pages'
]
!=
0
)
?
$data
[
'pages'
]
:
$data
[
'page'
];
//判断跳转页数
$data
[
'offset'
]
=
$data
[
'pagesize'
]
*
(
$data
[
'page'
]
-
1
);
//计算记录偏移量
$data
[
'collect'
]
=
$this
->
user_model
->
getcollect
(
5
,
$this
->
user_id
,
$data
[
'offset'
],
$data
[
'pagesize'
]);
$data
[
'sarr'
]
=
$this
->
user_model
->
getSeachcondStr
(
$data
[
'collect'
]);
$data
[
'surl'
]
=
$this
->
user_model
->
getSeachcondUrl
(
$data
[
'collect'
],
5
);
//获取你可能感兴趣的租房
$data
[
'likerent'
]
=
$this
->
user_model
->
getlikehouse
(
$this
->
user_id
,
'rent'
,
4
);
$this
->
load
->
view
(
'my_rent_condition'
,
$data
);
}
/**
* 用户退出
* @author cxf
*/
public
function
logout
()
{
vbsetcookie
(
"esfuserid"
,
""
,
1
);
vbsetcookie
(
"esfpassword"
,
""
,
1
);
vbsetcookie
(
"esfusername"
,
""
,
1
);
vbsetcookie
(
"esfusertelno"
,
""
,
1
);
vbsetcookie
(
"esfshowname"
,
""
,
1
);
vbsetcookie
(
"esfusercity"
,
""
,
1
);
vbsetcookie
(
"sso_token"
,
""
,
1
);
setcookie
(
"esfuserid"
,
null
,
time
()
-
1000
,
"/"
,
"house365.com"
);
setcookie
(
"esfusername"
,
null
,
time
()
-
1000
,
"/"
,
"house365.com"
);
setcookie
(
"esfusertelno"
,
null
,
time
()
-
1000
,
"/"
,
"house365.com"
);
setcookie
(
"sso_token"
,
null
,
time
()
-
1000
,
"/"
,
"house365.com"
);
setcookie
(
"PHPSESSID"
,
null
,
time
()
-
1000
,
"/"
,
"house365.com"
);
setcookie
(
"PHPSESSID"
,
null
,
time
()
-
1000
,
"/"
,
"newrent.house365.com"
);
unset
(
$_SESSION
[
'esfuserid'
]);
unset
(
$_SESSION
[
'esfpassword'
]);
unset
(
$_SESSION
[
'esfusername'
]);
unset
(
$_SESSION
[
'esfusertelno'
]);
unset
(
$_SESSION
[
'esfusercity'
]);
unset
(
$_SESSION
[
'esfshowname'
]);
unset
(
$_SESSION
[
'sso_token'
]);
setcookie
(
"sessionid"
,
null
,
time
()
-
1000
,
"/"
,
"house365.com"
);
setcookie
(
"newrent_yii2-session"
,
null
,
time
()
-
1000
,
"/"
,
"house365.com"
);
if
(
isset
(
$_SERVER
[
'HTTP_REFERER'
]))
{
$url
=
substr
(
$_SERVER
[
'HTTP_REFERER'
],
0
,
35
);
$url1
=
substr
(
$_SERVER
[
'HTTP_REFERER'
],
0
,
40
);
if
(
$url
==
USER_CENTER
.
'user'
||
$url1
==
USER_CENTER
.
'statistic'
||
$url
==
USER_CENTER
.
'want'
)
{
//jumptotk(GB_SELL_URL,"退出成功!将返回二手房首页!",3000,'tips');
jumpto
(
GB_SELL_URL
);
}
else
{
//jumptotk($_SERVER['HTTP_REFERER'],"退出成功!将返回之前的页面!",3000,'tips');
jumpto
(
$_SERVER
[
'HTTP_REFERER'
]);
}
}
else
{
//jumptotk(GB_SELL_URL,"退出成功!将返回二手房首页!",3000,'tips');
jumpto
(
GB_SELL_URL
);
}
exit
();
}
public
function
bind_zmxy
()
{
if
(
!
defined
(
'OPEN_ZMXY'
))
{
exit
(
'该城市暂未开通此功能!'
);
}
//简单防止CSRF与模拟POST访问
$data
[
'time'
]
=
time
();
$data
[
'token'
]
=
md5
(
'house365'
.
$data
[
'time'
]
.
$this
->
user_id
);
//加盐
$_SESSION
[
$data
[
'token'
]]
=
1
;
$data
[
'conf_where'
]
=
'bind_zmxy'
;
$data
[
'title'
]
=
'认证管理'
;
$data
=
array_merge
(
$data
,
$this
->
realNameData
());
$this
->
load
->
model
(
'user_model'
);
$data
[
'user_card_info'
]
=
$this
->
user_model
->
getUserCardInfo
(
$this
->
user_id
,
1
);
//获取银行的配置文件
require_once
(
APPPATH
.
'config/bank.php'
);
$data
[
'bank'
]
=
$bank
;
//芝麻认证信息
$zhima
=
$this
->
user_model
->
getCertAuth
(
$this
->
user_id
,
1
);
//银联认证
$bank_cert
=
$this
->
user_model
->
getCertAuth
(
$this
->
user_id
,
2
);
$data
[
'zhima'
]
=
$zhima
;
$data
[
'bank_cert'
]
=
$bank_cert
;
if
(
$_POST
)
{
$result
=
array
(
'status'
=>
0
,
'msg'
=>
''
,
'url'
=>
''
);
$msg
=
''
;
$sessionToken
=
$_SESSION
[
$_POST
[
'token'
]];
unset
(
$_SESSION
[
$_POST
[
'token'
]]);
$_POST
[
'truename'
]
=
iconv
(
'utf8'
,
'gbk'
,
$_POST
[
'truename'
]);
$_POST
[
'truename'
]
=
addslashes
(
$_POST
[
'truename'
]);
$_POST
[
'idno'
]
=
addslashes
(
$_POST
[
'idno'
]);
$checkData
=
$this
->
user_model
->
checkIdNo
(
$_POST
[
'idno'
],
$this
->
user_id
);
if
(
!
$checkData
[
'result'
])
{
$msg
=
$checkData
[
'msg'
];
}
if
(
empty
(
$_POST
[
'idno'
])
||
empty
(
$_POST
[
'truename'
]))
{
$msg
=
'参数错误!'
;
}
//页面有效时间为5分钟
$timeFlag
=
time
()
-
$_POST
[
'time'
]
>
300
?
true
:
false
;
if
(
$_POST
[
'token'
]
!=
md5
(
'house365'
.
$_POST
[
'time'
]
.
$this
->
user_id
)
||
$timeFlag
||
$sessionToken
!=
1
)
{
$msg
=
'页面已过期!请重新刷新页面'
;
}
if
(
!
empty
(
$msg
))
{
$result
[
'msg'
]
=
iconv
(
'gbk'
,
'utf8'
,
$msg
);
exit
(
json_encode
(
$result
));
}
$url
=
$this
->
doBindZmxy
(
$_POST
);
$result
[
'status'
]
=
1
;
$result
[
'url'
]
=
$url
;
exit
(
json_encode
(
$result
));
}
$this
->
load
->
view
(
'bind_zmxy'
,
$data
);
}
private
function
doBindZmxy
(
$data
)
{
$userInfo
=
array
(
'name'
=>
iconv
(
'gbk'
,
'utf8'
,
$data
[
'truename'
]),
'certNo'
=>
$data
[
'idno'
],
'certType'
=>
'IDENTITY_CARD'
);
$state
=
$userInfo
;
$state
[
'userId'
]
=
$this
->
user_id
;
$bizParams
=
array
(
'auth_code'
=>
'M_APPPC_CERT'
,
'channelType'
=>
'apppc'
,
'state'
=>
json_encode
(
$state
)
);
//业务参数数组
$params
=
array
(
'identity_type'
=>
'2'
,
'identity_param'
=>
json_encode
(
$userInfo
),
'biz_params'
=>
json_encode
(
$bizParams
)
);
$this
->
load
->
library
(
"zmop_class"
);
$this
->
zmop_class
->
setRsaPriKeyFile
(
ZMXY_PRIVATE_KEY
);
$this
->
zmop_class
->
setRsaPubKeyFile
(
ZMXY_PUBLIC_KEY
);
$sign
=
$this
->
zmop_class
->
getSignature
(
$params
);
$encryptData
=
$this
->
zmop_class
->
encrypt
(
$params
);
// 公共参数数组
$sParam
=
array
(
'app_id'
=>
ZMXY_APPID
,
'method'
=>
"zhima.auth.info.authorize"
,
'charset'
=>
"utf-8"
,
'version'
=>
"1.0"
,
'params'
=>
$encryptData
,
'sign'
=>
$sign
);
$str
=
http_build_query
(
$sParam
);
$url
=
'https://zmopenapi.zmxy.com.cn/openapi.do?'
.
$str
;
//添加日志记录
$logData
=
array
(
'user_id'
=>
$this
->
user_id
,
'truename'
=>
$data
[
'truename'
],
'idno'
=>
$data
[
'idno'
],
'ip'
=>
get_ip
(),
'created_time'
=>
time
()
);
$this
->
user_model
->
addAuthLog
(
$logData
);
return
$url
;
}
public
function
zmxyCallback
()
{
if
(
!
defined
(
'OPEN_ZMXY'
))
{
exit
(
'该城市暂未开通此功能!'
);
}
$params
=
$this
->
input
->
get
(
'params'
);
$sign
=
$this
->
input
->
get
(
'sign'
);
if
(
empty
(
$params
)
||
empty
(
$sign
))
{
exit
(
'参数缺失!'
);
}
//含有%则urldecode
$params
=
strstr
(
$params
,
'%'
)
?
urldecode
(
$params
)
:
$params
;
$sign
=
strstr
(
$sign
,
'%'
)
?
urldecode
(
$sign
)
:
$sign
;
$this
->
load
->
library
(
"zmop_class"
);
$this
->
zmop_class
->
setRsaPriKeyFile
(
ZMXY_PRIVATE_KEY
);
$this
->
zmop_class
->
setRsaPubKeyFile
(
ZMXY_PUBLIC_KEY
);
//解密数据
$decryptData
=
$this
->
zmop_class
->
decrypt
(
$params
);
//验签
$result
=
$this
->
zmop_class
->
verify
(
$decryptData
,
$sign
);
if
(
!
$result
)
{
exit
(
'签名错误!'
);
}
parse_str
(
$decryptData
,
$paramList
);
if
(
$paramList
[
'success'
]
==
'false'
&&
!
empty
(
$paramList
[
'error_message'
]))
{
$paramList
[
'error_message'
]
=
iconv
(
'utf8'
,
'gbk'
,
$paramList
[
'error_message'
]);
$msg
=
"绑定失败!失败原因:"
.
$paramList
[
'error_message'
];
exit
(
$msg
);
}
//更新用户数据
$state
=
json_decode
(
$paramList
[
'state'
],
true
);
if
(
$this
->
user_id
!=
$state
[
'userId'
])
{
exit
(
'用户信息异常!'
);
}
$checkData
=
$this
->
user_model
->
checkIdNo
(
$state
[
'certNo'
],
$this
->
user_id
);
if
(
!
$checkData
[
'result'
])
{
exit
(
$checkData
[
'msg'
]);
}
if
(
empty
(
$state
[
'name'
])
||
empty
(
$state
[
'certNo'
])
||
empty
(
$paramList
[
'open_id'
]))
{
exit
(
'数据异常!'
);
}
$updateData
[
'truename'
]
=
iconv
(
'utf8'
,
'gbk'
,
$state
[
'name'
]);
$updateData
[
'idno'
]
=
$state
[
'certNo'
];
$updateData
[
'auth_type'
]
=
1
;
$updateData
[
'auth_open_id'
]
=
$paramList
[
'open_id'
];
$this
->
user_model
->
updateuser
(
$this
->
user_id
,
$updateData
);
header
(
'Location:'
.
GB_CRNTER_URL
.
'user/bind_zmxy/'
);
}
/**
* 修改个人资料
* @author cxf
*/
function
edit_profile
()
{
$_SESSION
[
'token'
]
=
md5
(
$this
->
user_id
);
$data
[
'js'
]
=
'<script type="text/javascript" src="'
.
USER_CENTER
.
'js/jquery.Jcrop.min.js"></script>'
;
$data
[
'conf_where'
]
=
'edit_profile'
;
$data
[
'title'
]
=
'修改资料'
;
$data
[
'user_detail_old'
]
=
$this
->
user_model
->
get_userdetail
(
$this
->
user_id
,
array
(
'username'
,
'email'
,
'sex'
,
'birthdate'
));
if
(
$_POST
)
{
if
(
$_POST
[
'token'
]
!=
$_SESSION
[
'token'
])
{
//echo $_POST['token']."<br/>";
//echo $_SESSION['token']."<br/>";
echo
"<script> alert('请输入正确的验证');</script>"
;
die
;
}
$arr
[
'email'
]
=
$this
->
input
->
post
(
'email'
);
$arr
[
'sex'
]
=
$this
->
input
->
post
(
'sex'
);
$arr
[
'birthdate'
]
=
strtotime
(
$this
->
input
->
post
(
'year'
)
.
"-"
.
$this
->
input
->
post
(
'month'
)
.
"-"
.
$this
->
input
->
post
(
'day'
));
//var_dump($arr['birthdate']);exit;
$result
=
$this
->
user_model
->
updateuser
(
$this
->
user_id
,
$arr
);
}
$data
[
'user_detail'
]
=
$this
->
user_model
->
get_userdetail
(
$this
->
user_id
,
array
(
'username'
,
'email'
,
'sex'
,
'birthdate'
,
'head_pic'
));
//BI统计 ----- start----->
$data
[
'isa_website'
]
=
'2,19,83'
;
$data
[
'isa_city'
]
=
GB_CITY
;
$data
[
'isa_addones'
]
=
''
;
$data
[
'isa_url'
]
=
'isa.house365.com/js/analyze.js?v=2.1'
;
//BI统计 ----- ent----->
$this
->
load
->
view
(
'edit_profile'
,
$data
);
}
/**
* 修改密码
* @author cxf
*/
function
edit_password
()
{
$_SESSION
[
'token'
]
=
md5
(
$this
->
user_id
);
$data
[
'js'
]
=
'<script type="text/javascript" src="'
.
USER_CENTER
.
'js/Validform_v5.3.2_ncr_min.js"></script>'
;
$select
=
array
(
'telno'
);
$data
[
'user'
]
=
$this
->
user_model
->
get_userdetail
(
$this
->
user_id
,
$select
);
$data
[
'conf_where'
]
=
'edit_password'
;
$data
[
'title'
]
=
'修改密码'
;
if
(
$_POST
)
{
if
(
$_POST
[
'token'
]
!=
$_SESSION
[
'token'
])
{
//echo $_POST['token']."<br/>";
//echo $_SESSION['token']."<br/>";
//echo "<script> alert('请输入正确的验证');</script>";die;
}
$newpassword
=
$this
->
input
->
post
(
'newpassword'
);
$againpassword
=
$this
->
input
->
post
(
'againpassword'
);
$password
=
$this
->
input
->
post
(
'password'
);
if
(
$newpassword
==
$againpassword
)
{
$result
=
$this
->
user_model
->
yzloginuser
(
$this
->
user_id
,
md5
(
$password
));
if
(
$result
>
0
)
{
$result_pass
=
$this
->
user_model
->
updatepassowrdbyuid
(
$this
->
user_id
,
$newpassword
);
echo
$result_pass
?
1
:
4
;
exit
;
}
else
{
echo
3
;
exit
;
}
}
else
{
echo
2
;
exit
;
}
}
$this
->
load
->
view
(
'edit_password'
,
$data
);
}
/**
* 修改电话号码
* @author cxf
*/
function
edit_telno
()
{
$_SESSION
[
'token'
]
=
md5
(
$this
->
user_id
);
$data
[
'conf_where'
]
=
'edit_telno'
;
$data
[
'title'
]
=
'修改手机号码'
;
$data
[
'js'
]
=
'<script type="text/javascript" src="'
.
USER_CENTER
.
'js/code.js"></script><script type="text/javascript" src="'
.
USER_CENTER
.
'js/Validform_v5.3.2_ncr_min.js"></script>'
;
$select
=
array
(
'telno'
);
$data
[
'user'
]
=
$this
->
user_model
->
get_userdetail
(
$this
->
user_id
,
$select
);
if
(
$_POST
)
{
if
(
$_POST
[
'token'
]
!=
$_SESSION
[
'token'
])
{
//echo $_POST['token']."<br/>";
//echo $_SESSION['token']."<br/>";
echo
"<script> alert('请输入正确的验证');</script>"
;
die
;
}
$telno
=
$this
->
input
->
post
(
'telnoold'
);
$telnonew
=
$this
->
input
->
post
(
'telno'
);
$validcode
=
$this
->
input
->
post
(
'validcode'
);
$kind
=
$this
->
input
->
post
(
'kind'
);
//验证手机号是否存在
$result2
=
$this
->
user_model
->
yztelnolt
(
$telnonew
);
if
(
$result2
)
{
echo
3
;
exit
;
}
//验证短信验证码是否正确
$result
=
$this
->
user_model
->
yzusersms
(
$validcode
,
$telnonew
,
$kind
);
if
(
$result
>
0
)
{
$result_pass
=
$this
->
user_model
->
updatetelnobyuid
(
$this
->
user_id
,
$telnonew
);
if
(
$result_pass
)
{
$this
->
user_model
->
SyncPhoneUserCenter
(
$this
->
user_id
,
$telno
,
$telnonew
);
//修改已经绑定的400号码
$this
->
load
->
model
(
"esf_400_model"
);
$this
->
esf_400_model
->
update_telno
(
$this
->
user_id
,
$telnonew
,
$telno
);
}
echo
$result_pass
?
1
:
0
;
if
(
$result2
[
0
][
'id'
]
>
0
&&
$result2
[
0
][
'infofrom'
]
==
2
)
{
//对原有账号进行失效操作
$this
->
user_model
->
updateuser
(
$result2
[
0
][
'id'
],
array
(
'is_use'
=>
0
));
//对原有房源进行id修改
$this
->
house_model
->
updatehouseuid
(
$result2
[
0
][
'id'
],
$this
->
user_id
,
'sell'
);
$this
->
house_model
->
updatehouseuid
(
$result2
[
0
][
'id'
],
$this
->
user_id
,
'rent'
);
}
exit
;
}
else
{
echo
2
;
exit
;
}
}
$this
->
load
->
view
(
'edit_telno'
,
$data
);
}
/**
* 编辑头像文件
* @author cxf
*/
function
edit_headfile
()
{
if
(
$this
->
input
->
post
(
"action"
)
==
'headfile'
)
{
$fileurl
=
common_file_upload
(
"headfile"
,
false
,
false
,
340
,
220
);
if
(
$fileurl
)
{
echo
"<script>window.parent.setHeadimgsrc('"
.
$fileurl
.
"');window.parent.document.getElementById('headpic').value='"
.
$fileurl
.
"';window.parent.jcSetImage();window.parent.changeShowPic('headShowPic');</script>"
;
}
else
{
echo
"<script>window.parent.document.getElementById('jsUploadHeadPortrait').style.display = 'none';window.parent.document.getElementById('jsDialogE_msg').innerHTML='图片上传失败,请重试!';window.parent.openWin('jsDialogE');setTimeout(function()
{
window.parent.location.reload();
}
,1000);</script>"
;
}
exit
;
}
else
if
(
$this
->
input
->
post
(
"action"
)
==
'savehead'
)
{
$headpic
=
trim
(
$this
->
input
->
post
(
"headpic"
));
$x
=
floatval
(
$this
->
input
->
post
(
"x"
));
$y
=
floatval
(
$this
->
input
->
post
(
"y"
));
$w
=
floatval
(
$this
->
input
->
post
(
"w"
));
$h
=
floatval
(
$this
->
input
->
post
(
"h"
));
$picfile
=
curl_get_contents
(
$headpic
);
if
(
$picfile
)
{
$targ_w
=
$w
;
$targ_h
=
$h
;
$jpeg_quality
=
100
;
//FISHER 2013-6-22
//获取远程图片再裁剪处理,然后还要FTP上传到图片服务器,目前只能在本地创建临时文件,想不出其他办法了。
$filename
=
GB_CITY
.
'_'
.
md5
(
$headpic
)
.
".jpg"
;
$cachefile
=
APPPATH
.
"/cache/"
.
$filename
;
if
(
$handle
=
fopen
(
$cachefile
,
"wb"
)
&&
$targ_w
>
0
&&
$targ_h
>
0
)
{
$img_r
=
imagecreatefromstring
(
$picfile
);
$dst_r
=
ImageCreateTrueColor
(
$targ_w
,
$targ_h
);
imagecopyresampled
(
$dst_r
,
$img_r
,
0
,
0
,
$x
,
$y
,
$targ_w
,
$targ_h
,
$w
,
$h
);
imagejpeg
(
$dst_r
,
$cachefile
,
$jpeg_quality
);
@
fclose
(
$handle
);
$_FILES
[
'headfile'
][
'nocheck'
]
=
"house365"
;
//uploadfile 类会检查这个文件是否是POST提交的文件,没办法啊绕过去。
$_FILES
[
'headfile'
][
'name'
]
=
$filename
;
$_FILES
[
'headfile'
][
'type'
]
=
'image/pjpeg'
;
$_FILES
[
'headfile'
][
'tmp_name'
]
=
$cachefile
;
$_FILES
[
'headfile'
][
'error'
]
=
0
;
$_FILES
[
'headfile'
][
'size'
]
=
@
filesize
(
$cachefile
);
$this
->
load
->
library
(
'uploadfile_class'
,
array
(
'filename'
=>
"headfile"
));
$this
->
uploadfile_class
->
setFileType
(
"jpg"
);
$this
->
uploadfile_class
->
setMaxSize
(
5120
);
$this
->
uploadfile_class
->
setUploadType
(
"ftp"
);
$this
->
uploadfile_class
->
setSaveDir
(
"/"
.
GB_CITY
.
"house/"
);
$this
->
uploadfile_class
->
setWatermark
(
false
);
$this
->
uploadfile_class
->
setImageCut
(
false
);
if
(
$this
->
uploadfile_class
->
upload
()
==
"success"
)
{
$headpicurl
=
$this
->
uploadfile_class
->
getSaveFileURL
();
//图片地址
}
else
{
$headpicurl
=
""
;
}
@
unlink
(
$cachefile
);
if
(
$headpicurl
!=
""
)
{
//更新用户头像
$id
=
$this
->
user_model
->
updateheadpic
(
$this
->
user_id
,
$headpicurl
);
if
(
$id
>
0
)
{
echo
"<script>window.parent.openWin('upfile-ok');</script>"
;
}
else
{
echo
"<script>window.parent.openWin('warning');</script>"
;
}
}
else
{
echo
"<script>window.parent.openWin('warning');</script>"
;
}
}
else
{
echo
"<script>window.parent.openWin('warning');setTimeout(function()
{
window.parent.location.reload();
}
,1000);</script>"
;
}
}
else
{
echo
"<script>window.parent.openWin('warning');setTimeout(function()
{
window.parent.location.reload();
}
,1000);</script>"
;
}
exit
;
}
}
/**
* 我的问答
* @author cxf
*/
function
myask
()
{
$data
[
'conf_where'
]
=
'ask'
;
$data
[
'title'
]
=
'我的问答'
;
//分页开始
$data
[
'ask_num'
]
=
$this
->
ask_model
->
getquelistnum
(
$this
->
user_id
);
$data
[
'pagesize'
]
=
8
;
//设定每一页显示的记录数
$data
[
'pages'
]
=
$data
[
'ask_num'
]
?
ceil
(
$data
[
'ask_num'
]
/
$data
[
'pagesize'
])
:
0
;
//计算总页数
$data
[
'page'
]
=
$this
->
uri
->
segment
(
3
)
?
intval
(
$this
->
uri
->
segment
(
3
))
:
1
;
// 获取当前页数
$data
[
'page'
]
=
(
$data
[
'page'
]
>
$data
[
'pages'
])
?
$data
[
'pages'
]
:
$data
[
'page'
];
//判断跳转页数
$data
[
'offset'
]
=
$data
[
'pagesize'
]
*
(
$data
[
'page'
]
-
1
);
//计算记录偏移量
//获取问题列表
$data
[
'asklist'
]
=
$this
->
ask_model
->
getquelist
(
$this
->
user_id
,
$data
[
'offset'
],
$data
[
'pagesize'
]);
$data
[
'expertslist'
]
=
$this
->
ask_model
->
getexperts
();
//BI统计 ----- start----->
$data
[
'isa_website'
]
=
'2,19,99'
;
$data
[
'isa_city'
]
=
GB_CITY
;
$data
[
'isa_addones'
]
=
''
;
$data
[
'isa_url'
]
=
'isa.house365.com/js/analyze.js?v=2.1'
;
//BI统计 ----- ent----->
//print_r($data);die;
$this
->
load
->
view
(
'myask'
,
$data
);
}
/**
* 提问详情页跳转页
* @author cxf
*/
function
qdetail
(
$qid
)
{
$arr
=
array
(
'a_qid'
=>
$qid
,
'a_esta'
=>
1
,
'a_read'
=>
0
);
$up
=
array
(
'a_read'
=>
1
);
$this
->
user_model
->
set_table
(
'qa_answer'
);
$result
=
$this
->
user_model
->
save
(
$arr
,
$up
,
'esfhouse'
);
//更新问答未读的cookie
$ask_num
=
$this
->
ask_model
->
getnewanswerbyuid
(
$this
->
user_id
);
setcoandsess
(
'esfasknum'
,
$ask_num
);
echo
'<script language="javascript">location= "'
.
get_questioninfo_url
(
$qid
)
.
'";</script>'
;
}
/**
* 我的消息
* @author cxf
*/
function
mymessage
()
{
$data
[
'conf_where'
]
=
'message'
;
$data
[
'title'
]
=
'我的消息'
;
//删除操作
if
(
isset
(
$_POST
[
'muldel'
])
&&
$_POST
[
'muldel'
]
==
'del'
)
{
$result
=
$this
->
user_model
->
delmessage
(
$_POST
[
'actionid'
]);
echo
$result
;
exit
;
}
//更新消息的点击状态
$this
->
user_model
->
updateannounceclick
(
$this
->
user_id
);
$data
[
'num'
]
=
$this
->
user_model
->
getmessagenumbyuid
(
$this
->
user_id
);
$data
[
'pagesize'
]
=
8
;
//设定每一页显示的记录数
$data
[
'pages'
]
=
$data
[
'num'
]
?
ceil
(
$data
[
'num'
]
/
$data
[
'pagesize'
])
:
0
;
//计算总页数
$data
[
'page'
]
=
$this
->
uri
->
segment
(
3
)
?
intval
(
$this
->
uri
->
segment
(
3
))
:
1
;
// 获取当前页数
$data
[
'page'
]
=
(
$data
[
'page'
]
>
$data
[
'pages'
]
&&
$data
[
'pages'
]
!=
0
)
?
$data
[
'pages'
]
:
$data
[
'page'
];
//判断跳转页数
$data
[
'offset'
]
=
$data
[
'pagesize'
]
*
(
$data
[
'page'
]
-
1
);
//计算记录偏移量
$data
[
'message'
]
=
$this
->
user_model
->
getmessagebyuid
(
$this
->
user_id
,
$data
[
'offset'
],
$data
[
'pagesize'
]);
//BI统计 ----- start----->
$data
[
'isa_website'
]
=
'2,19,82'
;
$data
[
'isa_city'
]
=
GB_CITY
;
$data
[
'isa_addones'
]
=
''
;
$data
[
'isa_url'
]
=
'isa.house365.com/js/analyze.js?v=2.1'
;
//BI统计 ----- ent----->
$this
->
load
->
view
(
'mymessage'
,
$data
);
}
function
updateread
()
{
$ids
=
$this
->
input
->
post
(
"ids"
);
if
(
!
empty
(
$ids
))
{
$id_arr
=
explode
(
','
,
$ids
);
foreach
(
$id_arr
as
$value
)
{
$result
=
$this
->
user_model
->
updateannounce
(
$value
);
}
}
else
{
$result
=
$this
->
user_model
->
updateannounce
(
$this
->
input
->
post
(
"id"
));
}
echo
$result
;
}
/**
* 实名认证弹窗
* @return array
*/
private
function
realNameData
(){
$data
=
array
();
$data
[
'userInfo'
]
=
$this
->
user_model
->
get_userdetail
(
$this
->
user_id
,
array
(
'truename'
,
'idno'
,
'auth_type'
,
'auth_open_id'
,
'passport_uid'
));
// $data['imgUrl'] = 'http://mtt.house365.com/H5/pctoapp/index.php?city=nj&TFRouteType=1058&TFRouteParm=' .urlencode(urlencode('type=3&uuid='.$data['userInfo'][0]['passport_uid']));
// $data['imgUrl'] = 'http://newrent.house365.com/api/common/get-qr-code?size=144&margin=0&url='.urlencode($data['imgUrl']);
$data
[
'imgUrl'
]
=
'/images/downloadTFApp.png'
;
$data
[
'imgUrlbg2'
]
=
'/images/smbg2.png'
;
$data
[
'imgUrlbg1'
]
=
'/images/mybg.png'
;
if
(
GB_CITY
==
'wh'
){
$data
[
'publishUrlSell'
]
=
'http://publish.wh.house365.com/?newWh=1&kind=1'
;
}
else
{
$data
[
'publishUrlSell'
]
=
"http://"
.
GB_CITY
.
".publish.house365.com"
;
}
if
(
GB_CITY
==
'nj'
){
$data
[
'publishUrlRent'
]
=
"http://publish.house365.com/nj/publish"
;
}
else
if
(
GB_CITY
==
'wh'
){
$data
[
'publishUrlRent'
]
=
"http://publish.wh.house365.com/?newWh=1&kind=2"
;
}
else
{
$data
[
'publishUrlRent'
]
=
" http://"
.
GB_CITY
.
".publish.house365.com/?kind=2"
;
}
return
$data
;
}
/**
* 我的房源二手房
* @author cxf
*/
function
myhousesell
()
{
header
(
"Location:http://newrent.house365.com/user-center/sell-list"
);
die
;
$data
[
'conf_where'
]
=
'housesell'
;
$data
[
'title'
]
=
'我的房源'
;
$this
->
load
->
model
(
'package_model'
);
$data
[
'limitNumGtZero'
]
=
$this
->
package_model
->
getLimitNumGtZero
();
$data
=
array_merge
(
$data
,
$this
->
realNameData
());
if
(
$_POST
)
{
$id
=
$this
->
input
->
post
(
'id'
);
$type
=
$this
->
input
->
post
(
'type'
);
$code
=
$this
->
input
->
post
(
'code'
);
$infotype
=
$this
->
input
->
post
(
'infotype'
);
$payday
=
$this
->
input
->
post
(
'payday'
);
$paytype
=
$this
->
input
->
post
(
'paytype'
);
//推广处理
if
(
$type
==
'tg'
){
//更新房源状态,改为有意向
$result
=
$this
->
house_model
->
updatehouse
(
$id
,
'sell'
,
array
(
'ischarge'
=>
'2'
));
//记录客户意向
$result1
=
$this
->
user_model
->
addusercharge
(
$id
,
$paytype
,
$payday
,
$this
->
user_id
);
if
(
$result1
>
0
)
{
//发送消息
$subject
=
'您的房源推广申请已提交。'
;
$msg
=
'您编号为"'
.
$id
.
'"的房源推广申请正在审核中,请耐心等待。'
;
$this
->
apply_class
->
send_systemmsg
(
$this
->
user_id
,
$subject
,
$msg
,
1
,
GB_CITY
);
//添加成功
echo
'1'
;
exit
;
}
else
{
//添加失败
echo
'3'
;
exit
;
}
}
//验证
if
(
md5
(
$id
.
'house365'
)
==
$code
)
{
if
(
$type
==
'refresh'
)
{
//验证刷新可用次数
$num
=
$this
->
house_model
->
yzrefrshnum
(
$this
->
user_id
,
$id
,
'sell'
);
//获取今日已刷新次数
$this
->
house_statistic_model
->
set_uid
(
$this
->
user_id
);
$this
->
house_statistic_model
->
set_city
(
GB_CITY
);
$this
->
house_statistic_model
->
set_nocache
(
1
);
$arr
=
$this
->
house_statistic_model
->
get_operate_list
(
2
,
$id
,
date
(
"Y-m-d"
));
//获得实际可刷新次数
$num
=
$num
-
count
(
$arr
);
if
(
$num
>
0
)
{
//更新房源刷新时间
$result
=
$this
->
house_model
->
updatehouse
(
$id
,
'sell'
,
array
(
'updatetime'
=>
time
()));
//记录刷新操作
$this
->
house_statistic_model
->
set_uid
(
$this
->
user_id
);
$this
->
house_statistic_model
->
set_city
(
GB_CITY
);
$result
=
$this
->
house_statistic_model
->
sub_operate_log
(
'sell'
,
$id
,
2
);
if
(
$result
[
'is_ok'
]
==
1
)
{
//发送消息
$subject
=
'您的房源刷新成功'
;
$msg
=
'您编号为"'
.
$id
.
'"房源刷新成功。如有疑问,请联系客服。'
;
$this
->
apply_class
->
send_systemmsg
(
$this
->
user_id
,
$subject
,
$msg
,
1
,
GB_CITY
);
//刷新成功
$arr1
[
'msg'
]
=
1
;
$arr1
[
'num'
]
=
$num
-
1
;
print
json_encode
(
$arr1
);
exit
;
}
else
{
//刷新失败
$arr1
[
'msg'
]
=
4
;
$arr1
[
'num'
]
=
$num
;
print
json_encode
(
$arr1
);
exit
;
}
}
else
{
//刷新次数不足
$arr1
[
'msg'
]
=
3
;
$arr1
[
'num'
]
=
$num
;
print
json_encode
(
$arr1
);
exit
;
}
}
elseif
(
$type
==
'del'
){
//更新房源状态,相当于失效状态
$result
=
$this
->
house_model
->
updatehouse
(
$id
,
'sell'
,
array
(
'esta'
=>
'2'
));
//记录再发布操作
$this
->
house_statistic_model
->
set_uid
(
$this
->
user_id
);
$this
->
house_statistic_model
->
set_city
(
GB_CITY
);
$result1
=
$this
->
house_statistic_model
->
sub_operate_log
(
'sell'
,
$id
,
3
);
if
(
$result
>
0
)
{
//删除成功
echo
'1'
;
exit
;
}
else
{
//删除失败
echo
'3'
;
exit
;
}
}
elseif
(
$type
==
'again_pub'
)
{
//更新房源状态
if
(
GB_CITY
==
'nj'
)
{
if
(
$infotype
==
1
or
$infotype
==
2
)
{
$expiretime
=
strtotime
(
"+45 day"
);
}
else
if
(
$infotype
==
3
or
$infotype
==
4
or
$infotype
==
5
or
$infotype
==
6
)
{
$expiretime
=
strtotime
(
"+60 day"
);
}
}
else
{
$expiretime
=
strtotime
(
"+90 day"
);
}
$result
=
$this
->
house_model
->
republishhouse
(
$id
,
'sell'
,
array
(
'esta'
=>
'1'
,
'creattime'
=>
time
(),
'updatetime'
=>
time
(),
'expiretime'
=>
$expiretime
),
GB_CITY
);
//记录再发布操作
$this
->
house_statistic_model
->
set_uid
(
$this
->
user_id
);
$this
->
house_statistic_model
->
set_city
(
GB_CITY
);
//$result1 = $this->house_statistic_model->sub_operate_log('sell' , $id , 5 ,1);
if
(
$result
>
0
)
{
$this
->
load
->
model
(
'user_model'
);
//增加云信accid
$this
->
user_model
->
yunxin_accid
(
$this
->
user_id
);
//再发布成功
echo
'1'
;
exit
;
}
else
{
//再发布失败
echo
'3'
;
exit
;
}
}
else
{
//验证不通过,来源不正确
echo
'2'
;
exit
;
}
}
else
{
//验证不通过,来源不正确
echo
'2'
;
exit
;
}
}
$data
[
'num'
]
=
$this
->
house_model
->
gethousenumbyuid
(
$this
->
user_id
,
'sell'
);
$data
[
'pagesize'
]
=
8
;
//设定每一页显示的记录数
$data
[
'pages'
]
=
$data
[
'num'
]
?
ceil
(
$data
[
'num'
]
/
$data
[
'pagesize'
])
:
0
;
//计算总页数
$data
[
'page'
]
=
$this
->
uri
->
segment
(
3
)
?
intval
(
$this
->
uri
->
segment
(
3
))
:
1
;
// 获取当前页数
$data
[
'page'
]
=
(
$data
[
'page'
]
>
$data
[
'pages'
]
&&
$data
[
'pages'
]
!=
0
)
?
$data
[
'pages'
]
:
$data
[
'page'
];
//判断跳转页数
$data
[
'offset'
]
=
$data
[
'pagesize'
]
*
(
$data
[
'page'
]
-
1
);
//计算记录偏移量
if
(
GB_CITY
==
'nj'
||
GB_CITY
==
'wh'
)
{
$data
[
'house_array'
]
=
$this
->
house_model
->
gethousebyuid
(
$this
->
user_id
,
'sell'
,
array
(
'id'
,
'address'
,
'buildarea'
,
'price'
,
'updatetime'
,
'creattime'
,
'esta'
,
'ischarge'
,
'pic1'
,
'district'
,
'streetid'
,
'blockshowname'
,
'infotype'
,
'room'
,
'hall'
,
'fitment'
,
'buildarea'
,
'ischarge'
,
'telno'
,
'floor '
,
'subfloor'
,
'totalfloor'
,
'survey'
),
$data
[
'offset'
],
$data
[
'pagesize'
]);
}
else
{
$data
[
'house_array'
]
=
$this
->
house_model
->
gethousebyuid
(
$this
->
user_id
,
'sell'
,
array
(
'id'
,
'address'
,
'buildarea'
,
'price'
,
'updatetime'
,
'creattime'
,
'esta'
,
'ischarge'
,
'pic1'
,
'district'
,
'streetid'
,
'blockshowname'
,
'infotype'
,
'room'
,
'hall'
,
'fitment'
,
'buildarea'
,
'ischarge'
,
'telno'
,
'floor '
,
'subfloor'
,
'totalfloor'
),
$data
[
'offset'
],
$data
[
'pagesize'
]);
}
if
(
is_array
(
$data
[
'house_array'
]))
{
if
(
GB_CITY
==
'nj'
){
$this
->
load
->
model
(
'survey_model'
);
$modelSurvey
=
new
Survey_model
();
}
elseif
(
GB_CITY
==
'wh'
){
$this
->
load
->
model
(
'vr_model'
);
$modelSurvey
=
new
Vr_model
();
}
foreach
(
$data
[
'house_array'
]
as
&
$value
)
{
$value
[
'survey_status'
]
=
''
;
$value
[
'can_survey'
]
=
false
;
$value
[
'show_survey_icon'
]
=
false
;
if
(
intval
(
$value
[
'esta'
])
!=
1
){
$value
[
'survey'
]
=
0
;
}
if
(
$data
[
'limitNumGtZero'
][
5
][
'sell'
]
&&
intval
(
$value
[
'survey'
])
!=
1
&&
intval
(
$value
[
'esta'
])
==
1
&&
in_array
(
GB_CITY
,
array_keys
(
$this
->
surveyConfig
))
&&
in_array
(
intval
(
$value
[
'infotype'
]),
$this
->
surveyConfig
[
GB_CITY
][
'surveyInfotype'
])
&&
in_array
(
$value
[
'district'
],
$this
->
surveyConfig
[
GB_CITY
][
'surveyDistrict'
]))
{
$value
[
'can_survey'
]
=
true
;
}
if
(
intval
(
$value
[
'survey'
])
==
1
)
{
if
(
GB_CITY
==
'nj'
){
$surveyInformation
=
$modelSurvey
->
getInformation
(
'sell'
,
$value
[
'id'
]);
$status
=
isset
(
$surveyInformation
[
0
][
'status'
])
?
intval
(
$surveyInformation
[
0
][
'status'
])
:
0
;
if
(
$status
==
3
&&
!
empty
(
$surveyInformation
[
0
][
'time_order'
])
&&
time
()
>
intval
(
$surveyInformation
[
0
][
'time_order'
]))
{
$status
=
4
;
}
if
(
$status
!=
2
){
$value
[
'show_survey_icon'
]
=
true
;
}
$value
[
'survey_status'
]
=
isset
(
$this
->
surveyStatus
[
$status
])
?
$this
->
surveyStatus
[
$status
]
:
'实勘未知状态'
;
}
elseif
(
GB_CITY
==
'wh'
){
$surveyInformation
=
$modelSurvey
->
getVrInfoByHouseId
(
'sell'
,
$value
[
'id'
]);
if
(
$surveyInformation
){
$value
[
'show_survey_icon'
]
=
$surveyInformation
[
'show_icon'
];
$value
[
'survey_status'
]
=
$surveyInformation
[
'vr_status_word'
];
}
}
}
//获取房源已有套餐
if
(
in_array
(
GB_CITY
,
$this
->
openPayCitys
)){
$packageData
=
$this
->
package_model
->
getHousePackageNew
(
$value
[
'id'
],
'sell'
);
if
(
$packageData
){
if
(
isset
(
$packageData
[
'leftTime'
]))
$value
[
'leftTime'
]
=
$packageData
[
'leftTime'
];
if
(
in_array
(
1
,
$packageData
[
'package_types'
])
||
in_array
(
2
,
$packageData
[
'package_types'
])
||
in_array
(
3
,
$packageData
[
'package_types'
])){
$value
[
'promoting'
]
=
1
;
}
else
{
$value
[
'promoting'
]
=
0
;
}
}
}
}
}
//中奖通知 5.25-8.31
$data
[
'is_win'
]
=
$this
->
_get_is_win
();
//BI统计 ----- start----->
$data
[
'isa_website'
]
=
'2,19,72'
;
$data
[
'isa_city'
]
=
GB_CITY
;
$data
[
'isa_addones'
]
=
''
;
$data
[
'isa_url'
]
=
'isa.house365.com/js/analyze.js?v=2.1'
;
//BI统计 ----- ent----->
$data
[
'userInfo'
]
=
$this
->
user_model
->
get_userdetail
(
$this
->
user_id
,
array
(
'truename'
,
'idno'
,
'auth_type'
,
'auth_open_id'
,
'passport_uid'
,
'bank_type'
));
$this
->
load
->
view
(
'myhousesell'
,
$data
);
}
/**
* 我的房源二手房
* @author cxf
*/
function
myhouserent
()
{
header
(
"Location:http://newrent.house365.com/user-center/rent-list"
);
die
;
global
$house
;
$data
[
'conf_where'
]
=
'houserent'
;
$data
[
'title'
]
=
'我的房源'
;
$data
=
array_merge
(
$data
,
$this
->
realNameData
());
$this
->
load
->
model
(
'package_model'
);
$data
[
'limitNumGtZero'
]
=
$this
->
package_model
->
getLimitNumGtZero
();
if
(
$_POST
)
{
$id
=
$this
->
input
->
post
(
'id'
);
$type
=
$this
->
input
->
post
(
'type'
);
$code
=
$this
->
input
->
post
(
'code'
);
$infotype
=
$this
->
input
->
post
(
'infotype'
);
$payday
=
$this
->
input
->
post
(
'payday'
);
$paytype
=
$this
->
input
->
post
(
'paytype'
);
//推广处理
if
(
$type
==
'tg'
){
//更新房源状态,改为有意向
$result
=
$this
->
house_model
->
updatehouse
(
$id
,
'rent'
,
array
(
'ischarge'
=>
'2'
));
//记录客户意向
$result1
=
$this
->
user_model
->
addusercharge
(
$id
,
$paytype
,
$payday
,
$this
->
user_id
,
'rent'
);
if
(
$result1
>
0
)
{
//发送消息
$subject
=
'您的房源推广申请已提交。'
;
$msg
=
'您编号为"'
.
$id
.
'"的房源推广申请正在审核中,请耐心等待。'
;
$this
->
apply_class
->
send_systemmsg
(
$this
->
user_id
,
$subject
,
$msg
,
1
,
GB_CITY
);
//添加成功
echo
'1'
;
exit
;
}
else
{
//添加失败
echo
'3'
;
exit
;
}
}
//验证
if
(
md5
(
$id
.
'house365'
)
==
$code
)
{
if
(
$type
==
'refresh'
)
{
//验证刷新可用次数
$num
=
$this
->
house_model
->
yzrefrshnum
(
$this
->
user_id
,
$id
,
'rent'
);
//获取今日已刷新次数
$this
->
house_statistic_model
->
set_uid
(
$this
->
user_id
);
$this
->
house_statistic_model
->
set_city
(
GB_CITY
);
$this
->
house_statistic_model
->
set_nocache
(
1
);
$arr
=
$this
->
house_statistic_model
->
get_operate_list
(
2
,
$id
,
date
(
"Y-m-d"
));
//获得实际可刷新次数
$num
=
$num
-
count
(
$arr
);
if
(
$num
>
0
)
{
//更新房源刷新时间
$result
=
$this
->
house_model
->
updatehouse
(
$id
,
'rent'
,
array
(
'updatetime'
=>
time
()));
if
(
empty
(
$result
))
{
$arr1
[
'msg'
]
=
4
;
$arr1
[
'num'
]
=
$num
;
print
json_encode
(
$arr1
);
exit
;
}
//记录刷新操作
$this
->
house_statistic_model
->
set_uid
(
$this
->
user_id
);
$this
->
house_statistic_model
->
set_city
(
GB_CITY
);
$result
=
$this
->
house_statistic_model
->
sub_operate_log
(
'rent'
,
$id
,
2
,
1
);
if
(
$result
[
'is_ok'
]
==
1
)
{
//发送消息
$subject
=
'您的房源刷新成功'
;
$msg
=
'您编号为"'
.
$id
.
'"房源刷新成功。如有疑问,请联系客服。'
;
$this
->
apply_class
->
send_systemmsg
(
$this
->
user_id
,
$subject
,
$msg
,
1
,
GB_CITY
);
//刷新成功
$arr1
[
'msg'
]
=
1
;
$arr1
[
'num'
]
=
$num
-
1
;
print
json_encode
(
$arr1
);
exit
;
}
else
{
//刷新失败
$arr1
[
'msg'
]
=
4
;
$arr1
[
'num'
]
=
$num
;
print
json_encode
(
$arr1
);
exit
;
}
}
else
{
//刷新次数不足
$arr1
[
'msg'
]
=
3
;
$arr1
[
'num'
]
=
$num
;
print
json_encode
(
$arr1
);
exit
;
}
}
elseif
(
$type
==
'del'
){
//更新房源状态
$result
=
$this
->
house_model
->
updatehouse
(
$id
,
'rent'
,
array
(
'esta'
=>
2
));
//记录再发布操作
$this
->
house_statistic_model
->
set_uid
(
$this
->
user_id
);
$this
->
house_statistic_model
->
set_city
(
GB_CITY
);
$result1
=
$this
->
house_statistic_model
->
sub_operate_log
(
'rent'
,
$id
,
3
);
if
(
$result
>
0
)
{
//通知爱租哪
if
(
GB_CITY
==
'nj'
||
GB_CITY
==
'hf'
)
{
$houseData
=
$this
->
house_model
->
gethousebywhere
(
array
(
'id'
=>
$id
),
'rent'
,
array
(
'iszhizu'
),
1
);
if
(
!
empty
(
$houseData
)
&&
$houseData
[
0
][
'iszhizu'
]
==
'1'
)
{
$url
=
'http://mtapi.house365.com/?method=zhizu.ApiRent_syncEsf2AznStatus&city='
.
GB_CITY
.
'&id='
.
$id
.
'&esta=2&uid='
.
$this
->
user_id
;
curl_get_contents
(
$url
);
}
}
//删除成功
echo
'1'
;
exit
;
}
else
{
//删除失败
echo
'3'
;
exit
;
}
}
elseif
(
$type
==
'again_pub'
)
{
//更新房源状态
if
(
GB_CITY
==
'nj'
)
{
if
(
$infotype
==
1
or
$infotype
==
2
)
{
$expiretime
=
strtotime
(
"+35 day"
);
}
else
if
(
$infotype
==
3
or
$infotype
==
4
or
$infotype
==
5
or
$infotype
==
6
)
{
$expiretime
=
strtotime
(
"+60 day"
);
}
}
else
{
$expiretime
=
strtotime
(
"+90 day"
);
}
$result
=
$this
->
house_model
->
republishhouse
(
$id
,
'rent'
,
array
(
'esta'
=>
1
,
'creattime'
=>
time
(),
'updatetime'
=>
time
(),
'expiretime'
=>
$expiretime
),
GB_CITY
);
//记录再发布操作
$this
->
house_statistic_model
->
set_uid
(
$this
->
user_id
);
$this
->
house_statistic_model
->
set_city
(
GB_CITY
);
$result1
=
$this
->
house_statistic_model
->
sub_operate_log
(
'rent'
,
$id
,
5
);
if
(
$result
>
0
)
{
//通知爱租哪
if
(
GB_CITY
==
'nj'
||
GB_CITY
==
'hf'
)
{
$houseData
=
$this
->
house_model
->
gethousebywhere
(
array
(
'id'
=>
$id
),
'rent'
,
array
(
'iszhizu'
),
1
);
if
(
!
empty
(
$houseData
)
&&
$houseData
[
0
][
'iszhizu'
]
==
'1'
)
{
$url
=
'http://mtapi.house365.com/?method=zhizu.ApiRent_syncEsf2AznStatus&city='
.
GB_CITY
.
'&id='
.
$id
.
'&esta=1&uid='
.
$this
->
user_id
;
curl_get_contents
(
$url
);
}
}
$this
->
load
->
model
(
'user_model'
);
//增加云信accid
$this
->
user_model
->
yunxin_accid
(
$this
->
user_id
);
//再发布成功
echo
'1'
;
exit
;
}
else
{
//再发布失败
echo
'3'
;
exit
;
}
}
else
{
//验证不通过,来源不正确
echo
'2'
;
exit
;
}
}
else
{
//验证不通过,来源不正确
echo
'2'
;
exit
;
}
}
$data
[
'num'
]
=
$this
->
house_model
->
gethousenumbyuid
(
$this
->
user_id
,
'rent'
);
$data
[
'pagesize'
]
=
8
;
//设定每一页显示的记录数
$data
[
'pages'
]
=
$data
[
'num'
]
?
ceil
(
$data
[
'num'
]
/
$data
[
'pagesize'
])
:
0
;
//计算总页数
$data
[
'page'
]
=
$this
->
uri
->
segment
(
3
)
?
intval
(
$this
->
uri
->
segment
(
3
))
:
1
;
// 获取当前页数
$data
[
'page'
]
=
(
$data
[
'page'
]
>
$data
[
'pages'
]
&&
$data
[
'pages'
]
!=
0
)
?
$data
[
'pages'
]
:
$data
[
'page'
];
//判断跳转页数
$data
[
'offset'
]
=
$data
[
'pagesize'
]
*
(
$data
[
'page'
]
-
1
);
//计算记录偏移量
//获取房源
$data
[
'house_array'
]
=
$this
->
house_model
->
gethousebyuid
(
$this
->
user_id
,
'rent'
,
array
(
'id'
,
'address'
,
'buildarea'
,
'price'
,
'updatetime'
,
'creattime'
,
'esta'
,
'ischarge'
,
'pic1'
,
'district'
,
'streetid'
,
'blockshowname'
,
'infotype'
,
'room'
,
'hall'
,
'fitment'
,
'buildarea'
,
'priceunit'
,
'ischarge'
,
'telno'
,
'floor '
,
'subfloor'
,
'totalfloor'
),
$data
[
'offset'
],
$data
[
'pagesize'
]);
//获取房源已有套餐
if
(
in_array
(
GB_CITY
,
$this
->
openPayCitys
)){
foreach
(
$data
[
'house_array'
]
as
&
$value
)
{
$packageData
=
$this
->
package_model
->
getHousePackageNew
(
$value
[
'id'
],
'rent'
);
if
(
$packageData
){
if
(
isset
(
$packageData
[
'leftTime'
]))
$value
[
'leftTime'
]
=
$packageData
[
'leftTime'
];
if
(
in_array
(
1
,
$packageData
[
'package_types'
])
||
in_array
(
2
,
$packageData
[
'package_types'
])
||
in_array
(
3
,
$packageData
[
'package_types'
])){
$value
[
'promoting'
]
=
1
;
}
else
{
$value
[
'promoting'
]
=
0
;
}
}
}
}
$data
[
'priceunit'
]
=
$house
[
'priceunit'
];
//中奖通知 5.25-8.31
$data
[
'is_win'
]
=
$this
->
_get_is_win
();
//BI统计 ----- start----->
$data
[
'isa_website'
]
=
'2,19,73'
;
$data
[
'isa_city'
]
=
GB_CITY
;
$data
[
'isa_addones'
]
=
''
;
$data
[
'isa_url'
]
=
'isa.house365.com/js/analyze.js?v=2.1'
;
//BI统计 ----- ent----->
$data
[
'userInfo'
]
=
$this
->
user_model
->
get_userdetail
(
$this
->
user_id
,
array
(
'truename'
,
'idno'
,
'auth_type'
,
'auth_open_id'
,
'passport_uid'
,
'bank_type'
));
$this
->
load
->
view
(
'myhouserent'
,
$data
);
}
/**
* 获取当前会员是否获取奖品
*
*/
private
function
_get_is_win
()
{
$result
=
array
();
if
(
GB_CITY
==
'nj'
&&
false
)
{
$time
=
time
();
$start_date
=
mktime
(
0
,
0
,
0
,
5
,
25
,
date
(
'Y'
));
$end_date
=
mktime
(
23
,
59
,
59
,
12
,
23
,
date
(
'Y'
));
if
(
$start_date
<=
$time
&&
$time
<=
$end_date
)
{
$user_data
=
$this
->
user_model
->
get_user_data
(
$this
->
user_id
);
if
(
!
empty
(
$user_data
)
&&
!
empty
(
$user_data
[
'telno'
]))
{
$result
=
$this
->
user_model
->
check_is_win
(
$this
->
user_id
,
$user_data
[
'telno'
],
$start_date
,
$end_date
);
}
}
}
return
$result
;
}
//价格提醒处理ajax
function
price_remind_ajax
(){
// error_reporting(7);
// ini_set("display_errors",true);
$this
->
load
->
model
(
"user_model"
);
$houseid
=
$this
->
input
->
post
(
'houseid'
);
$type
=
$this
->
input
->
post
(
'type'
);
$flag
=
$this
->
input
->
post
(
'flag'
);
$priceRemindNum
=
$this
->
user_model
->
getPriceRemindNum
(
$this
->
user_id
);
if
(
$priceRemindNum
>=
5
&&
$flag
==
1
){
//满4条提示
$result
=
3
;
}
else
{
$isChoice
=
$this
->
user_model
->
isCheckPriceRemind
(
$this
->
user_id
,
$houseid
);
//var_dump($isChoice);exit();
if
(
is_array
(
$isChoice
)){
if
(
empty
(
$isChoice
)
&&
$flag
==
1
){
$result
=
$this
->
user_model
->
addPriceRemind
(
$houseid
,
$this
->
user_id
);
//echo "444";
}
elseif
(
$isChoice
[
0
][
'status'
]
==
1
&&
$flag
==
0
){
$result
=
$this
->
user_model
->
updatePrcieRemind
(
$houseid
,
$this
->
user_id
,
0
);
}
elseif
(
$isChoice
[
0
][
'status'
]
==
0
&&
$flag
==
1
){
$result
=
$this
->
user_model
->
updatePrcieRemind
(
$houseid
,
$this
->
user_id
,
1
);
}
}
}
echo
$result
=
$result
?
$result
:
0
;
}
public
function
pay
(){
header
(
'Access-Control-Allow-Origin: *'
);
header
(
'Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept'
);
if
(
GB_CITY
!=
'nj'
&&
GB_CITY
!=
'wh'
){
return
$this
->
jump
(
USER_CENTER
,
'该城市暂未开通此功能!'
,
3000
,
'warning'
);
}
//定义支持的支付类型
$payTypeArr
=
array
(
'wxpay'
);
//获取房源属性
$packageId
=
intval
(
$this
->
input
->
post
(
'package_id'
,
true
));
$houseId
=
intval
(
$this
->
input
->
post
(
'house_id'
,
true
));
$tbl
=
addslashes
(
$this
->
input
->
post
(
'tbl'
,
true
));
$packageType
=
intval
(
$this
->
input
->
post
(
'package_type'
,
true
));
$packageKeyword
=
intval
(
$this
->
input
->
post
(
'package_keyword'
,
true
));
$day
=
intval
(
$this
->
input
->
post
(
'day_'
.
$packageType
,
true
));
$payType
=
addslashes
(
$this
->
input
->
post
(
'pay_type'
,
true
));
// 租房8折优惠券 20200507添加
$use_coupon
=
intval
(
$this
->
input
->
post
(
'use_coupon'
,
true
));
if
(
empty
(
$packageId
)
||
empty
(
$houseId
)
||
empty
(
$tbl
)
||
empty
(
$packageType
)
||
(
!
in_array
(
$packageType
,
array
(
4
,
5
))
&&
empty
(
$day
))
||
empty
(
$payType
)
||
!
in_array
(
$payType
,
$payTypeArr
)){
return
$this
->
jump
(
USER_CENTER
,
'参数缺失'
,
3000
,
'warning'
);
}
$searchArr
[
'id'
]
=
$houseId
;
$searchArr
[
'uid'
]
=
$this
->
user_id
;
$searchArr
[
'infofrom'
]
=
1
;
$searchArr
[
'esta'
]
=
1
;
//获取房源信息
$houseData
=
$this
->
house_model
->
gethousebywhere
(
$searchArr
,
$tbl
,
array
(
'id,infotype,district,telno'
),
1
);
if
(
empty
(
$houseData
)){
return
$this
->
jump
(
USER_CENTER
,
'房源状态异常'
,
3000
,
'warning'
);
}
$infoType
=
$houseData
[
0
][
'infotype'
]
==
1
?
1
:
2
;
//加载套餐model类
$this
->
load
->
model
(
"package_model"
);
$packageData
=
$this
->
package_model
->
getDetailById
(
$packageId
);
if
(
empty
(
$packageData
)){
return
$this
->
jump
(
USER_CENTER
,
'套餐状态异常'
,
3000
,
'warning'
);
}
//价格数据
$packageData
[
'package_desc'
]
=
unserialize
(
$packageData
[
'package_desc'
]);
foreach
(
$packageData
[
'package_desc'
]
as
$item
){
if
(
$packageType
==
4
){
$price
=
floatval
(
$item
[
'price'
]);
}
else
if
(
$packageType
==
5
){
if
(
$item
[
'property_type'
]
==
$infoType
){
$price
=
floatval
(
$item
[
'price'
]);
//处理折扣
if
(
isset
(
$item
[
'discount'
])
&&
$item
[
'discount'
]
>
0
){
$price
=
$this
->
pirceDiscount
(
$price
,
$item
[
'discount'
]);
}
}
}
else
{
if
(
$item
[
'property_type'
]
==
$infoType
&&
$item
[
'day'
]
==
$day
){
$price
=
floatval
(
$item
[
'price'
]);
if
(
GB_CITY
==
'wh'
&&
$packageType
==
2
){
//处理折扣
if
(
isset
(
$item
[
'discount'
])
&&
$item
[
'discount'
]
>
0
){
$price
=
$this
->
pirceDiscount
(
$price
,
$item
[
'discount'
]);
}
}
// 列表套餐8折券使用 20200507
if
(
GB_CITY
==
'nj'
&&
$packageType
==
2
&&
$tbl
==
'rent'
){
//
$checkbox_status
=
0
;
// 检查是否有可用的优惠券,如果有则使用,如果无,则跳转提示
$userInfoData
=
$this
->
user_model
->
getuserdetail
(
$this
->
user_id
);
$passport_uid
=
$userInfoData
?
$userInfoData
[
'passport_uid'
]
:
0
;
// 测试数据
if
(
$this
->
user_id
==
'1785149'
||
$this
->
user_id
==
'3367096'
){
$price
=
0.04
;
}
if
(
isset
(
$use_coupon
)
&&
$use_coupon
==
1
){
$check_coupon
=
$this
->
rent_coupon_model
->
checkCoupon
(
$passport_uid
);
if
(
!
$check_coupon
){
return
$this
->
jump
(
USER_CENTER
,
'租房优惠券状态异常'
,
3000
,
'warning'
);
}
$checkbox_status
=
1
;
// 列表优先套餐8折
$price
=
sprintf
(
"%.2f"
,
$price
*
0.8
);
// 锁定半小时
$this
->
rent_coupon_model
->
lockCoupon
(
$passport_uid
);
}
// 设置8折优惠券的选中状态
$this
->
rent_coupon_model
->
setCheckbox
(
$passport_uid
,
$checkbox_status
);
}
}
}
}
if
(
$this
->
user_id
==
2909549
||
$this
->
user_id
==
3137198
){
$price
=
0.01
;
}
//校验参数正确性
if
(
$packageType
!=
$packageData
[
'package_type'
]
||
empty
(
$price
)
||
$price
<=
0
){
return
$this
->
jump
(
USER_CENTER
,
'套餐价格数据异常'
,
3000
,
'warning'
);
}
if
(
$packageType
==
1
&&
(
$packageKeyword
!=
$packageData
[
'package_keyword'
]
||
$packageKeyword
<=
0
)
){
return
$this
->
jump
(
USER_CENTER
,
'套餐关键词异常'
,
3000
,
'warning'
);
}
//首页推荐需要限制数量
if
(
$packageType
==
1
){
//已售出和已锁定的套餐数量
$count
=
$this
->
package_model
->
getPackageNum
(
$packageKeyword
,
$tbl
);
if
(
$count
>=
$packageData
[
'package_num'
]){
return
$this
->
jump
(
USER_CENTER
,
'套餐已售完'
,
3000
,
'warning'
);
}
}
//wh实勘限制购买数量
if
(
$packageType
==
5
){
//城市限制
if
(
!
in_array
(
$houseData
[
0
][
'district'
],
$this
->
surveyConfig
[
GB_CITY
][
'surveyDistrict'
]))
{
return
$this
->
jump
(
USER_CENTER
,
'所在区域实勘服务暂未开通'
,
3000
,
'warning'
);
}
$this
->
load
->
model
(
'vr_model'
);
$countVr
=
$this
->
vr_model
->
getVrApplyNowNum
(
1
,
3
);
//sell 个人房源
$countOrder
=
$this
->
package_model
->
getPackageOrderNumByType
(
$packageType
,
$tbl
);
//未支付有效订单
if
(
$countVr
+
$countOrder
>=
$packageData
[
'package_num'
]){
return
$this
->
jump
(
USER_CENTER
,
'套餐已售完'
,
3000
,
'warning'
);
}
}
//首页推荐和列表排序在有效期内不能同时购买(南京租房除外 修改日期2020/3/4)
//获取该房源的套餐状态
$housePackage
=
$this
->
package_model
->
getHousePackage
(
$houseId
,
$tbl
);
//获取禁止的套餐数组
$banHousePackage
=
array
();
if
(
!
empty
(
$housePackage
)){
foreach
(
$housePackage
as
$k
=>
$v
){
if
(
$v
==
1
||
$v
==
2
){
if
(
GB_CITY
==
'nj'
&&
$tbl
==
'rent'
){
$banHousePackage
[]
=
$v
;
}
else
{
$banHousePackage
[]
=
1
;
$banHousePackage
[]
=
2
;
}
}
if
(
$v
==
3
){
$banHousePackage
[]
=
3
;
}
}
}
if
(
in_array
(
$packageData
[
'package_type'
],
$banHousePackage
)){
return
$this
->
jump
(
USER_CENTER
,
'请勿重复购买套餐'
,
3000
,
'warning'
);
}
//创建订单
$tblArr
=
array
(
'sell'
=>
1
,
'rent'
=>
2
);
$tableId
=
$tblArr
[
$tbl
];
$orderData
=
array
();
$orderData
[
'transaction_id'
]
=
$this
->
package_model
->
getTransactionId
(
$packageType
);
$orderData
[
'user_id'
]
=
$this
->
user_id
;
$orderData
[
'house_type'
]
=
$tableId
;
$orderData
[
'house_id'
]
=
$houseId
;
$orderData
[
'house_tel'
]
=
$houseData
[
0
][
'telno'
];
$orderData
[
'package_id'
]
=
$packageId
;
$orderData
[
'package_type'
]
=
$packageType
;
if
(
$packageType
==
1
){
$orderData
[
'package_keyword'
]
=
$packageKeyword
;
}
$orderData
[
'package_days'
]
=
$day
;
$orderData
[
'price'
]
=
$price
;
$orderData
[
'create_time'
]
=
time
();
$orderData
[
'pay_type'
]
=
$payType
;
$orderData
[
'source'
]
=
1
;
$orderData
[
'ip'
]
=
get_ip
();
$orderId
=
$this
->
package_model
->
createOrder
(
$orderData
);
$orderData
[
'id'
]
=
$orderId
;
//极小概率出现的订单号重复处理
if
(
$orderId
<=
0
){
return
$this
->
jump
(
USER_CENTER
,
'订单创建失败'
,
3000
,
'warning'
);
}
$data
=
$this
->
getWxPayCodeByHouse365
(
$orderId
);
if
(
$data
[
'status'
]
!=
1
){
return
$this
->
jump
(
USER_CENTER
,
$data
[
'msg'
],
3000
,
'warning'
);
}
$data
[
'orderData'
]
=
$orderData
;
$data
[
'title'
]
=
'微信支付'
;
$this
->
load
->
view
(
'wxpay'
,
$data
);
}
/**
* 折扣
* @param $price
* @param $discount
*/
private
function
pirceDiscount
(
$price
,
$discount
){
return
$price
*
$discount
/
10
;
}
/**
* 向house365支付中台查询订单状态
* @param $transactionId
* @return string
*/
public
function
queryOrder
(
$transactionId
){
$data
=
array
(
'status'
=>
0
);
if
(
!
in_array
(
GB_CITY
,
$this
->
openPayCitys
)){
echo
json_encode
(
$data
);
exit
;
}
$this
->
load
->
model
(
"package_model"
);
$curlData
=
array
();
$curlData
[
'serviceCode'
]
=
'pay'
;
$curlData
[
'serviceName'
]
=
'queryOrder'
;
$curlData
[
'actId'
]
=
$this
->
openPayCitysActId
[
GB_CITY
];
$curlData
[
'tradeNo'
]
=
$transactionId
;
$curlData
[
'sign'
]
=
$this
->
package_model
->
makeSign
(
$curlData
);
$url
=
'https://pay.house365.com/house365-pay-web/rest/interface'
;
$result
=
SendDataByCurl
(
$url
,
$curlData
);
$result
=
json_decode
(
$result
,
true
);
if
(
!
empty
(
$result
[
'status'
])){
$result
[
'status'
]
=
iconv
(
'utf-8'
,
'gbk'
,
$result
[
'status'
]);
}
if
(
!
empty
(
$result
)
&&
$result
[
'result'
]
==
'SUCCESS'
&&
$result
[
'status'
]
==
'支付成功'
){
$data
[
'status'
]
=
1
;
//测试环境无法回调的处理
//$orderInfo = $this->package_model->getOrderInfoByTransactionId($transactionId);
//$this->package_model->payFinish($orderInfo);
}
echo
json_encode
(
$data
);
exit
;
}
/**
* 根据订单ID生成微信支付二维码
* @param $orderId 订单ID
* @return array
*/
private
function
getWxPayCodeByHouse365
(
$orderId
){
//加载套餐model类
$data
[
'status'
]
=
0
;
$this
->
load
->
model
(
"package_model"
);
$packageData
=
$this
->
package_model
->
getOrderInfoById
(
$orderId
);
if
(
empty
(
$packageData
)
||
$packageData
[
'order_status'
]
==
0
||
$packageData
[
'pay_status'
]
==
1
){
$msg
=
'订单信息异常'
;
$data
[
'msg'
]
=
$msg
;
return
$data
;
}
$transaction_id
=
$packageData
[
'transaction_id'
];
$price
=
$packageData
[
'price'
];
$notifyUrl
=
'http://user.house365.com/esf_center_api/notify?city='
.
GB_CITY
;
//$price = 0.01;
//$notifyUrl = 'http://esfadmin.house365.com/test.php';
$packageTypeName
=
$this
->
package_model
->
getPackageTypeName
(
$packageData
[
'package_type'
]);
$subject
=
'个人房源增值服务-'
.
$packageTypeName
;
//拼接数组
$curlData
=
array
();
$curlData
[
'serviceCode'
]
=
'pay'
;
$curlData
[
'serviceName'
]
=
'createAPPReceiptOrder'
;
//活动标识
switch
(
GB_CITY
){
case
'nj'
:
$curlData
[
'actId'
]
=
'57'
;
break
;
case
'wh'
:
$curlData
[
'actId'
]
=
'82'
;
break
;
}
$curlData
[
'tradeNo'
]
=
$transaction_id
;
$curlData
[
'version'
]
=
'1.0'
;
$curlData
[
'notifyUrl'
]
=
$notifyUrl
;
$curlData
[
'amount'
]
=
$price
*
100
;
$curlData
[
'city'
]
=
GB_CITY
;
$curlData
[
'wechatTradeType'
]
=
1
;
$curlData
[
'subject'
]
=
iconv
(
'gbk'
,
'utf-8'
,
$subject
);
//订单过期时间为30分钟,考虑到网络延迟加上10S
$curlData
[
'timeExpire'
]
=
date
(
"YmdHis"
,
time
()
+
30
*
60
+
10
);
$IpHostAllow
=
explode
(
'.'
,
get_ip
());
if
(
$IpHostAllow
[
0
]
==
'192'
&&
(
$_COOKIE
[
'is_test_wh'
]
==
'test'
||
(
isset
(
$_COOKIE
[
'esfuserid'
])
&&
$_COOKIE
[
'esfuserid'
]
==
2640088
))){
$orderInfo
=
$this
->
package_model
->
getOrderInfoByTransactionId
(
$transaction_id
);
$this
->
package_model
->
payFinish
(
$orderInfo
);
$data
[
'status'
]
=
1
;
$data
[
'msg'
]
=
"支付完成!"
;
$data
[
'is_test'
]
=
1
;
return
$data
;
}
$curlData
[
'sign'
]
=
$this
->
package_model
->
makeSign
(
$curlData
);
$url
=
'https://pay.house365.com/house365-pay-web/rest/interface'
;
$result
=
SendDataByCurl
(
$url
,
$curlData
);
$result
=
json_decode
(
$result
,
true
);
if
(
!
empty
(
$result
[
'payParams'
])
&&
!
is_array
(
$result
[
'payParams'
])){
$result
[
'payParams'
]
=
json_decode
(
$result
[
'payParams'
],
true
);
}
if
(
empty
(
$result
)
||
$result
[
'result'
]
!=
'SUCCESS'
||
empty
(
$result
[
'payParams'
][
'code_url'
])
){
$msg
=
!
empty
(
$result
[
'payParams'
][
'msg'
])
?
$result
[
'payParams'
][
'msg'
]
:
$result
[
'msg'
];
//若未返回错误信息则返回默认错误信息
$msg
=
!
empty
(
$msg
)
?
iconv
(
'utf-8'
,
'gbk'
,
$msg
)
:
'支付参数有误'
;
$data
[
'msg'
]
=
$msg
;
return
$data
;
}
$data
[
'status'
]
=
1
;
//此处调用微信支付的生成二维码接口,后期如果微信接口不能访问请自行用qrcode生成二维码
// $data['url'] = 'http://paysdk.weixin.qq.com/example/qrcode.php?data='.urlencode($result['payParams']['code_url']);
// $data['url'] = 'http://qr.liantu.com/api.php?text='.urlencode($result['payParams']['code_url']);
$data
[
'url'
]
=
'http://newrent.house365.com/api/common/get-qr-code?size=298&margin=0&url='
.
urlencode
(
$result
[
'payParams'
][
'code_url'
]);
return
$data
;
}
/**
* 根据房源获取该房源可以购买的套餐
* @param int $houseId 房源ID
* @param string $tbl sell/rent
* @param string $type promote:房源推广 refresh:房源刷新
*/
public
function
getPersonalHousePackage
(
$houseId
,
$tbl
=
'sell'
,
$type
=
'promote'
)
{
if
(
GB_CITY
!=
'nj'
&&
GB_CITY
!=
'wh'
){
return
;
}
$this
->
load
->
model
(
'package_model'
);
$packageData
=
$this
->
package_model
->
getPackageByHouseId
(
$houseId
,
$tbl
);
$promoteData
=
array
();
$refreshData
=
array
();
$surveyData
=
array
();
foreach
(
$packageData
as
$key
=>
$value
){
if
(
$value
[
'package_type'
]
==
1
&&
GB_CITY
==
'nj'
){
$promoteData
[]
=
$value
;
}
if
(
$value
[
'package_type'
]
==
2
){
$promoteData
[]
=
$value
;
}
if
(
$value
[
'package_type'
]
==
3
||
$value
[
'package_type'
]
==
4
){
$refreshData
[]
=
$value
;
}
if
(
$value
[
'package_type'
]
==
5
&&
GB_CITY
==
'wh'
){
$surveyData
[]
=
$value
;
}
}
if
(
$type
==
'promote'
){
echo
json_encode
(
$promoteData
);
}
if
(
$type
==
'refresh'
){
echo
json_encode
(
$refreshData
);
}
if
(
$type
==
'survey'
){
echo
json_encode
(
$surveyData
);
}
}
public
function
orderInvoice
(
$orderId
=
'0'
){
if
(
GB_CITY
!=
'nj'
&&
GB_CITY
!=
'wh'
){
return
$this
->
jump
(
USER_CENTER
,
'当前城市暂未开通此功能'
,
3000
,
'warning'
);
}
//获取订单状态
$this
->
load
->
model
(
"package_model"
);
$orderData
=
$this
->
package_model
->
getOrderInfoById
(
$orderId
);
//校验订单状态
if
(
$orderData
[
'user_id'
]
!=
$this
->
user_id
||
$orderData
[
'order_status'
]
!=
1
){
return
$this
->
jump
(
USER_CENTER
,
'订单数据异常'
,
3000
,
'warning'
);
}
//获取发票是否创建
$invoiceData
=
$this
->
package_model
->
getOrderInvoice
(
$orderId
);
if
(
!
empty
(
$invoiceData
)){
return
$this
->
jump
(
USER_CENTER
,
'发票已经创建'
,
3000
,
'warning'
);
}
//获取用户最新的发票信息
$oldInvoice
=
$this
->
package_model
->
getOrderInvoiceByUserId
(
$this
->
user_id
);
$oldInvoice
[
'pic'
]
=
!
empty
(
$oldInvoice
[
'pic'
])
?
explode
(
','
,
$oldInvoice
[
'pic'
])
:
array
();
$data
[
'oldInvoice'
]
=
$oldInvoice
;
$data
[
'orderData'
]
=
$orderData
;
$data
[
'title'
]
=
'发票在线填写'
;
$this
->
load
->
model
(
"tel_model"
);
$data
[
'telno_config'
]
=
$this
->
tel_model
->
getTelInfoByType
(
tel_model
::
TYPE3
);
$data
[
'address_config'
]
=
isset
(
$this
->
address
[
GB_CITY
])
?
$this
->
address
[
GB_CITY
]
:
''
;
$this
->
load
->
view
(
'order_invoice'
,
$data
);
}
public
function
createOrderInvoice
(){
if
(
GB_CITY
!=
'nj'
&&
GB_CITY
!=
'wh'
){
return
;
}
$orderId
=
intval
(
$this
->
input
->
post
(
'order_id'
,
true
));
$userType
=
intval
(
$this
->
input
->
post
(
'user_type'
,
true
));
$type
=
intval
(
$this
->
input
->
post
(
'type'
,
true
));
$username
=
addslashes
(
$this
->
input
->
post
(
'username'
,
true
));
$identityCard
=
addslashes
(
$this
->
input
->
post
(
'identity_card'
,
true
));
$invoiceTitle
=
addslashes
(
$this
->
input
->
post
(
'invoice_title'
,
true
));
$invoiceNumber
=
addslashes
(
$this
->
input
->
post
(
'invoice_number'
,
true
));
$bank
=
addslashes
(
$this
->
input
->
post
(
'bank'
,
true
));
$phone
=
addslashes
(
$this
->
input
->
post
(
'phone'
,
true
));
$address
=
addslashes
(
$this
->
input
->
post
(
'address'
,
true
));
$sendType
=
addslashes
(
$this
->
input
->
post
(
'send_type'
,
true
));
$bankAccount
=
addslashes
(
$this
->
input
->
post
(
'bank_account'
,
true
));
$mailingUsername
=
addslashes
(
$this
->
input
->
post
(
'mailing_username'
,
true
));
$mailingAddress
=
addslashes
(
$this
->
input
->
post
(
'mailing_address'
,
true
));
$mailingPhone
=
addslashes
(
$this
->
input
->
post
(
'mailing_phone'
,
true
));
$picArr
=
$this
->
input
->
post
(
'p_filename'
,
true
);
//参数判断
if
(
empty
(
$orderId
)
||
empty
(
$type
)
||
empty
(
$userType
)
||
empty
(
$sendType
)){
return
$this
->
jump
(
USER_CENTER
,
'参数缺失'
,
3000
,
'warning'
);
}
if
(
$userType
==
1
&&
$type
==
2
){
return
$this
->
jump
(
USER_CENTER
,
'参数错误'
,
3000
,
'warning'
);
}
if
(
$userType
==
1
&&
(
empty
(
$username
)
||
empty
(
$identityCard
))){
return
$this
->
jump
(
USER_CENTER
,
'参数缺失'
,
3000
,
'warning'
);
}
if
(
$userType
==
2
&&
(
empty
(
$invoiceTitle
)
||
empty
(
$invoiceNumber
)
)
){
return
$this
->
jump
(
USER_CENTER
,
'参数缺失'
,
3000
,
'warning'
);
}
if
(
$type
==
2
&&
(
empty
(
$bank
)
||
empty
(
$phone
)
||
empty
(
$address
)
||
empty
(
$bankAccount
)
||
empty
(
$picArr
))
){
return
$this
->
jump
(
USER_CENTER
,
'参数缺失'
,
3000
,
'warning'
);
}
if
(
$sendType
==
1
&&
(
empty
(
$mailingUsername
)
||
empty
(
$mailingAddress
)
||
empty
(
$mailingPhone
)
)
){
return
$this
->
jump
(
USER_CENTER
,
'参数缺失'
,
3000
,
'warning'
);
}
//获取订单状态
$this
->
load
->
model
(
"package_model"
);
$orderData
=
$this
->
package_model
->
getOrderInfoById
(
$orderId
);
//校验订单状态
if
(
$orderData
[
'user_id'
]
!=
$this
->
user_id
||
$orderData
[
'pay_status'
]
!=
1
||
$orderData
[
'order_status'
]
!=
1
){
return
$this
->
jump
(
USER_CENTER
,
'订单数据异常'
,
3000
,
'warning'
);
}
//获取发票是否创建
$invoiceData
=
$this
->
package_model
->
getOrderInvoice
(
$orderId
);
if
(
!
empty
(
$invoiceData
)){
return
$this
->
jump
(
USER_CENTER
,
'发票已经创建'
,
3000
,
'warning'
);
}
$data
=
array
();
$data
[
'order_id'
]
=
$orderId
;
$data
[
'type'
]
=
$type
;
$data
[
'price'
]
=
$orderData
[
'price'
];
$data
[
'send_type'
]
=
$sendType
;
$data
[
'user_type'
]
=
$userType
;
if
(
$userType
==
1
){
$data
[
'username'
]
=
$username
;
$data
[
'identity_card'
]
=
$identityCard
;
}
if
(
$userType
==
2
){
$data
[
'invoice_title'
]
=
$invoiceTitle
;
$data
[
'invoice_number'
]
=
$invoiceNumber
;
$pic
=
addslashes
(
implode
(
','
,
$picArr
)
);
$data
[
'pic'
]
=
$pic
;
}
if
(
$type
==
2
){
$data
[
'bank'
]
=
$bank
;
$data
[
'bank_account'
]
=
$bankAccount
;
$data
[
'phone'
]
=
$phone
;
$data
[
'address'
]
=
$address
;
}
if
(
$sendType
==
1
){
$data
[
'mailing_username'
]
=
$mailingUsername
;
$data
[
'mailing_address'
]
=
$mailingAddress
;
$data
[
'mailing_phone'
]
=
$mailingPhone
;
}
$invoiceId
=
$this
->
package_model
->
createOrderInvoice
(
$data
);
if
(
$invoiceId
<=
0
){
return
$this
->
jump
(
USER_CENTER
,
'发票生成失败'
,
3000
,
'warning'
);
}
//获取推广信息
$promoteData
=
$this
->
package_model
->
getPromoteByOrderId
(
$orderId
);
$promoteId
=
$promoteData
[
'id'
];
$updateData
=
array
();
$updateData
[
'invoice_id'
]
=
$invoiceId
;
$updateData
[
'invoice_status'
]
=
0
;
$where
=
array
();
$where
[
'id'
]
=
$promoteId
;
$this
->
package_model
->
updatePromote
(
$updateData
,
$where
);
return
$this
->
jump
(
USER_CENTER
);
}
/**
* form表单提示信息 2017-12-18
* @param string $url
* @param string $msg
* @param string $time
* @param string $type
*/
private
function
jump
(
$url
=
'user.house365.com'
,
$msg
=
'提交成功'
,
$time
=
'3000'
,
$type
=
'success'
){
$data
[
'msg'
]
=
$msg
;
$data
[
'url'
]
=
$url
;
$data
[
'time'
]
=
$time
;
$data
[
'type'
]
=
$type
;
$this
->
load
->
view
(
'form_alert'
,
$data
);
}
//我的订单
public
function
myorder
(){
$data
[
'conf_where'
]
=
'myorder'
;
$data
[
'title'
]
=
'我的订单'
;
$data
[
'pagesize'
]
=
10
;
//记录每页的条数
$data
[
'page'
]
=
$this
->
uri
->
segment
(
3
)
?
intval
(
$this
->
uri
->
segment
(
3
))
:
1
;
// 获取当前页数
$data
[
'totalsize'
]
=
$this
->
user_model
->
myorder_count
(
$this
->
user_id
);
//记录总数
$data
[
'totalpage'
]
=
ceil
(
$data
[
'totalsize'
]
/
$data
[
'pagesize'
]);
$orderdata
=
$this
->
user_model
->
myorder_list
(
$this
->
user_id
,
$data
[
'page'
],
$data
[
'pagesize'
]);
$data
[
'orders'
]
=
$orderdata
;
$this
->
load
->
view
(
'myorder'
,
$data
);
}
//图形验证码
public
function
imageCode
(){
$this
->
user_model
->
imageCode
();
}
//图形验证码验证
public
function
imageCodeVerify
(){
$re
=
$this
->
user_model
->
imageCodeVerify
();
$re
[
'msg'
]
=
iconv
(
'gbk'
,
'utf-8'
,
$re
[
'msg'
]);
echo
json_encode
(
$re
);
die
;
}
//银行卡实名认证
public
function
bankCertify
(){
$re
=
$this
->
user_model
->
bankCertify
();
$re
[
'msg'
]
=
iconv
(
'gbk'
,
'utf-8'
,
$re
[
'msg'
]);
if
(
!
empty
(
$re
[
'data'
][
'truename'
])){
$re
[
'data'
][
'truename'
]
=
iconv
(
'gbk'
,
'utf-8'
,
$re
[
'data'
][
'truename'
]);
}
echo
json_encode
(
$re
);
die
;
}
}
\ No newline at end of file
center/controllers/user_wang.php
View file @
c30266f4
...
...
@@ -6,7 +6,9 @@ class User_Wang extends MY_Controller
function
__construct
()
{
parent
::
__construct
();
if
(
$_GET
[
'test'
]){
echo
'ddddd'
;
exit
;
}
$this
->
load
->
model
(
"user_model"
);
$this
->
load
->
model
(
"broker_model"
);
...
...
@@ -20,7 +22,9 @@ class User_Wang extends MY_Controller
$this
->
load
->
library
(
"user_class"
);
$this
->
load
->
library
(
"apply_class"
);
$this
->
user_id
=
checklogin
();
if
(
$_GET
[
'test'
]){
echo
'ffff'
;
exit
;
}
if
(
$this
->
user_id
<=
0
)
{
jumpto
(
USER_CENTER
.
'login'
);
...
...
center/views/left.php
View file @
c30266f4
...
...
@@ -70,8 +70,8 @@
<div
class=
"user-nav-mod
<?php
if
(
$conf_where
==
'edit_profile'
)
echo
'on'
;
?>
"
>
<a
href=
"
<?php
echo
USER_CENTER
.
'user/edit_profile'
;
?>
"
class=
"innerLink"
>
修改资料
</a>
</div>
<!-- <div class="user-nav-mod -->
<?php
//if($conf_where=='edit_password') echo 'on';?><!--"> <a href="--><?php //echo USER_CENTER.'user/edit_password';?><!--" class="innerLink">修改密码</a> </div>-->
<!--
<
div
class
="
user
-
nav
-
mod
user
-
nav
-
mod
-
last
--><?
php
//if($conf_where=='edit_telno') echo 'on';?><!--"> <a href="--><?php //echo USER_CENTER.'user/edit_telno';?><!--" class="innerLink">修改手机号码</a> </div>-->
<
div
class
="
user
-
nav
-
mod
<?
php
if
(
$conf_where
==
'edit_password'
)
echo
'on'
;
?>
">
<a
href=
"
<?php
echo
GB_EDIT_P
HONE
_URL
;
?>
"
class=
"innerLink"
>
修改密码
</a>
</div>
<div
class=
"user-nav-mod user-nav-mod-last
<?php
if
(
$conf_where
==
'edit_telno'
)
echo
'on'
;
?>
"
>
<a
href=
"
<?php
echo
GB_EDIT_P
WD
_URL
;
?>
"
class=
"innerLink"
>
修改手机号码
</a>
</div>
<
div
class
="
user
-
nav
-
mod
<?
php
if
(
$conf_where
==
'edit_password'
)
echo
'on'
;
?>
">
<a
href=
"
<?php
echo
GB_EDIT_P
WD
_URL
;
?>
"
class=
"innerLink"
>
修改密码
</a>
</div>
<div
class=
"user-nav-mod user-nav-mod-last
<?php
if
(
$conf_where
==
'edit_telno'
)
echo
'on'
;
?>
"
>
<a
href=
"
<?php
echo
GB_EDIT_P
HONE
_URL
;
?>
"
class=
"innerLink"
>
修改手机号码
</a>
</div>
</div>
</div>
...
...
esf_core/config/constants.php
View file @
c30266f4
...
...
@@ -563,7 +563,8 @@ $conf_house['nj']= array(
//担保所用区属
"dist"
=>
array
(
'玄武区'
=>
'玄武区'
,
'鼓楼区'
=>
'鼓楼区'
,
'白下区'
=>
'白下区'
,
'建邺区'
=>
'建邺区'
,
'秦淮区'
=>
'秦淮区'
,
'下关区'
=>
'下关区'
,
'雨花台区'
=>
'雨花台区'
,
'栖霞区'
=>
'栖霞区'
,
'江宁区'
=>
'江宁区'
,
'浦口区'
=>
'浦口区'
,
'六合区'
=>
'六合区'
,
'大厂区'
=>
'大厂区'
,
'溧水县'
=>
'溧水县'
,
'高淳县'
=>
'高淳县'
),
"price_sell"
=>
array
(
'1'
=>
'40万以下'
,
'2'
=>
'40-60万'
,
'3'
=>
'60-90万'
,
'4'
=>
'90-120万'
,
'5'
=>
'120-150万'
,
'6'
=>
'150-200万'
,
'7'
=>
'200-300万'
,
'8'
=>
'300-500万'
,
'9'
=>
'500万以上'
),
"buildarea"
=>
array
(
'1'
=>
'40㎡以下'
,
'2'
=>
'40-60㎡'
,
'3'
=>
'60-80㎡'
,
'4'
=>
'80-100㎡'
,
'5'
=>
'100-120㎡'
,
'6'
=>
'120-140㎡'
,
'7'
=>
'140-200㎡'
,
'8'
=>
'200-400㎡'
,
'9'
=>
'400㎡以上'
),
"buildarea"
=>
array
(
'1'
=>
'50㎡以下'
,
'2'
=>
'50-80㎡'
,
'3'
=>
'80-100㎡'
,
'4'
=>
'100-120㎡'
,
'5'
=>
'120-150㎡'
,
'6'
=>
'150-200㎡'
,
'7'
=>
'200-300㎡'
,
'8'
=>
'300㎡以上'
),
"rent_buildarea"
=>
array
(
'1'
=>
'50㎡以下'
,
'2'
=>
'50-100㎡'
,
'3'
=>
'100-200㎡'
,
'4'
=>
'200-300㎡'
,
'5'
=>
'300-500㎡'
,
'6'
=>
'500-1000㎡'
,
'7'
=>
'1000㎡以上'
),
"price_rent"
=>
array
(
'1'
=>
'800元以下'
,
'2'
=>
'800-1200元'
,
'3'
=>
'1200-2000元'
,
'4'
=>
'2000-3000元'
,
'5'
=>
'3000-5000元'
,
'6'
=>
'5000-10000元'
,
'7'
=>
'10000元以上'
),
//写字楼价格
"price_office"
=>
array
(
'1'
=>
'1元/平米*天以下'
,
'2'
=>
'1-2元'
,
'3'
=>
' 2-3元'
,
'4'
=>
'3-4元'
,
'5'
=>
' 4-5元'
,
'6'
=>
'5-7元'
,
'7'
=>
'7-9元'
,
'8'
=>
'9-12元'
,
'9'
=>
'12元/平米*天以上'
),
...
...
@@ -575,7 +576,8 @@ $conf_house['nj']= array(
$conf_house
[
'wx'
]
=
array
(
"district"
=>
array
(
'滨湖区'
=>
'滨湖区'
,
'惠山区'
=>
'惠山区'
,
'锡山区'
=>
'锡山区'
,
'梁溪区'
=>
'梁溪区'
,
'新吴区'
=>
'新吴区'
,
'其他'
=>
'其他'
),
"price_sell"
=>
array
(
'1'
=>
'40万以下'
,
'2'
=>
'40-60万'
,
'3'
=>
'60-90万'
,
'4'
=>
'90-120万'
,
'5'
=>
'120-150万'
,
'6'
=>
'150-200万'
,
'7'
=>
'200-300万'
,
'8'
=>
'300-500万'
,
'9'
=>
'500万以上'
),
"buildarea"
=>
array
(
'1'
=>
'50平米以下'
,
'2'
=>
'50-70平米'
,
'3'
=>
'70-90平米'
,
'4'
=>
'90-110平米'
,
'5'
=>
'110-144平米'
,
'6'
=>
'144-200平米'
,
'7'
=>
'200-400平米'
,
'8'
=>
'400平米以上'
),
"buildarea"
=>
array
(
'1'
=>
'50平米以下'
,
'2'
=>
'50-80平米'
,
'3'
=>
'80-100平米'
,
'4'
=>
'100-120平米'
,
'5'
=>
'120-150平米'
,
'6'
=>
'150-200平米'
,
'7'
=>
'200-300平米'
,
'8'
=>
'300平米以上'
),
"rent_buildarea"
=>
array
(
'1'
=>
'50平米以下'
,
'2'
=>
'50-80平米'
,
'3'
=>
'80-100平米'
,
'4'
=>
'100-120平米'
,
'5'
=>
'120-150平米'
,
'6'
=>
'150-200平米'
,
'7'
=>
'200-300平米'
,
'8'
=>
'300平米以上'
),
"price_rent"
=>
array
(
'1'
=>
'800元以下'
,
'2'
=>
'800-1200元'
,
'3'
=>
'1200-2000元'
,
'4'
=>
'2000-3000元'
,
'5'
=>
'3000-5000元'
,
'6'
=>
'5000-10000元'
,
'7'
=>
'10000元以上'
),
//写字楼价格
"price_office"
=>
array
(
'1'
=>
'5000元以下'
,
'2'
=>
'5000-8000元'
,
'3'
=>
'8000-1万元'
,
'4'
=>
'1-1.5万'
,
'5'
=>
'1.5-2万'
,
'6'
=>
'2-5万'
,
'7'
=>
'5万以上'
),
...
...
@@ -597,7 +599,8 @@ $conf_house['cq']= array(
$conf_house
[
'cz'
]
=
array
(
"district"
=>
array
(
'天宁'
=>
'天宁'
,
'钟楼'
=>
'钟楼'
,
'武进'
=>
'武进'
,
'新北'
=>
'新北'
,
'戚墅堰'
=>
'戚墅堰'
,
'金坛'
=>
'金坛'
,
'溧阳'
=>
'溧阳'
,
'常州周边'
=>
'常州周边'
),
"price_sell"
=>
array
(
'1'
=>
'50万以下'
,
'2'
=>
'50-80万'
,
'3'
=>
'80-100万'
,
'4'
=>
'100-120万'
,
'5'
=>
'120-150万'
,
'6'
=>
'150-200万'
,
'7'
=>
'200-300万'
,
'8'
=>
'300万以上'
),
"buildarea"
=>
array
(
'1'
=>
'60平米以下'
,
'2'
=>
'60-80平米'
,
'3'
=>
'80-100平米'
,
'4'
=>
'100-120平米'
,
'5'
=>
'120-150平米'
,
'6'
=>
'150平米以上'
),
"buildarea"
=>
array
(
'1'
=>
'50㎡以下'
,
'2'
=>
'50-80㎡'
,
'3'
=>
'80-100㎡'
,
'4'
=>
'100-120㎡'
,
'5'
=>
'120-150㎡'
,
'6'
=>
'150-200㎡'
,
'7'
=>
'200-300㎡'
,
'8'
=>
'300㎡以上'
),
"rent_buildarea"
=>
array
(
'1'
=>
'50㎡以下'
,
'2'
=>
'50-100㎡'
,
'3'
=>
'100-200㎡'
,
'4'
=>
'200-300㎡'
,
'5'
=>
'300-500㎡'
,
'6'
=>
'500-1000㎡'
,
'7'
=>
'1000㎡以上'
),
"price_rent"
=>
array
(
'1'
=>
'500元以下'
,
'2'
=>
'500-1000元'
,
'3'
=>
'1000-2000元'
,
'4'
=>
'2000-3000元'
,
'5'
=>
'3000-5000元'
,
'6'
=>
'5000元以上'
),
//写字楼价格
"price_office"
=>
array
(
'1'
=>
'5000元以下'
,
'2'
=>
'5000-8000元'
,
'3'
=>
'8000-1万元'
,
'4'
=>
'1-1.5万'
,
'5'
=>
'1.5-2万'
,
'6'
=>
'2-5万'
,
'7'
=>
'5万以上'
),
...
...
@@ -622,7 +625,8 @@ $conf_house['hf']= array(
$conf_house
[
'hz'
]
=
array
(
"district"
=>
array
(
'上城区'
=>
'上城区'
,
'下城区'
=>
'下城区'
,
'江干区'
=>
'江干区'
,
'拱墅区'
=>
'拱墅区'
,
'西湖区'
=>
'西湖区'
,
'滨江区'
=>
'滨江区'
,
'余杭区'
=>
'余杭区'
,
'萧山区'
=>
'萧山区'
,
'富阳市'
=>
'富阳市'
,
'临安市'
=>
'临安市'
,
'建德市'
=>
'建德市'
,
'桐庐县'
=>
'桐庐县'
,
'淳安县'
=>
'淳安县'
,
'其他'
=>
'其他'
),
"price_sell"
=>
array
(
'1'
=>
'40万以下'
,
'2'
=>
'40-60万'
,
'3'
=>
'60-90万'
,
'4'
=>
'90-120万'
,
'5'
=>
'120-150万'
,
'6'
=>
'150-200万'
,
'7'
=>
'200-300万'
,
'8'
=>
'300-500万'
,
'9'
=>
'500万以上'
),
"buildarea"
=>
array
(
'1'
=>
'40平米以下'
,
'2'
=>
'40-60平米'
,
'3'
=>
'60-80平米'
,
'4'
=>
'80-100平米'
,
'5'
=>
'100-120平米'
,
'6'
=>
'120-144平米'
,
'7'
=>
'144-200平米'
,
'8'
=>
'200-400平米'
,
'9'
=>
'400平米以上'
),
"buildarea"
=>
array
(
'1'
=>
'50㎡以下'
,
'2'
=>
'50-80㎡'
,
'3'
=>
'80-100㎡'
,
'4'
=>
'100-120㎡'
,
'5'
=>
'120-150㎡'
,
'6'
=>
'150-200㎡'
,
'7'
=>
'200-300㎡'
,
'8'
=>
'300㎡以上'
),
"rent_buildarea"
=>
array
(
'1'
=>
'50㎡以下'
,
'2'
=>
'50-100㎡'
,
'3'
=>
'100-200㎡'
,
'4'
=>
'200-300㎡'
,
'5'
=>
'300-500㎡'
,
'6'
=>
'500-1000㎡'
,
'7'
=>
'1000㎡以上'
),
"totalf"
=>
array
(
'1'
=>
'多层'
,
'2'
=>
'小高层'
,
'3'
=>
'高层'
,
'4'
=>
'复式'
),
"price_rent"
=>
array
(
'1'
=>
'800元以下'
,
'2'
=>
'800-1200元'
,
'3'
=>
'1200-2000元'
,
'4'
=>
'2000-3000元'
,
'5'
=>
'3000-5000元'
,
'6'
=>
'5000-10000元'
,
'7'
=>
'10000元以上'
),
//写字楼价格
...
...
@@ -645,7 +649,8 @@ $conf_house['ks']= array(
$conf_house
[
'sy'
]
=
array
(
"district"
=>
array
(
'大东'
=>
'大东'
,
'东陵'
=>
'东陵'
,
'和平'
=>
'和平'
,
'皇姑'
=>
'皇姑'
,
'浑南新区'
=>
'浑南新区'
,
'苏家屯'
=>
'苏家屯'
,
'沈北新区'
=>
'沈北新区'
,
'沈河'
=>
'沈河'
,
'铁西'
=>
'铁西'
,
'于洪'
=>
'于洪'
,
'新民'
=>
'新民'
,
'辽中'
=>
'辽中'
,
'其他'
=>
'其他'
),
"price_sell"
=>
array
(
'1'
=>
'30万以下'
,
'2'
=>
'30-50万'
,
'3'
=>
'50-80万'
,
'4'
=>
'80-120万'
,
'5'
=>
'120-150万'
,
'6'
=>
'150-200万'
,
'7'
=>
'200万以上'
),
"buildarea"
=>
array
(
'1'
=>
'50平米以下'
,
'2'
=>
'50-80平米'
,
'3'
=>
'80-120平米'
,
'4'
=>
'120-140平米'
,
'5'
=>
'140-200平米'
,
'6'
=>
'200-300平米'
,
'7'
=>
'300平米以上'
),
"buildarea"
=>
array
(
'1'
=>
'50㎡以下'
,
'2'
=>
'50-80㎡'
,
'3'
=>
'80-100㎡'
,
'4'
=>
'100-120㎡'
,
'5'
=>
'120-150㎡'
,
'6'
=>
'150-200㎡'
,
'7'
=>
'200-300㎡'
,
'8'
=>
'300㎡以上'
),
"rent_buildarea"
=>
array
(
'1'
=>
'50㎡以下'
,
'2'
=>
'50-100㎡'
,
'3'
=>
'100-200㎡'
,
'4'
=>
'200-300㎡'
,
'5'
=>
'300-500㎡'
,
'6'
=>
'500-1000㎡'
,
'7'
=>
'1000㎡以上'
),
"price_rent"
=>
array
(
'1'
=>
'800元以下'
,
'2'
=>
'800-1200元'
,
'3'
=>
'1200-1800元'
,
'4'
=>
'1800-2200元'
,
'5'
=>
'2200-3000元'
,
'6'
=>
'3000-5000元'
,
'7'
=>
'5000元以上'
),
"floortypesell"
=>
array
(
'1'
=>
'任意'
,
'2'
=>
'1层'
,
'3'
=>
'2-5层'
,
'4'
=>
'6-12层'
,
'5'
=>
'13层以上'
)
);
...
...
@@ -653,7 +658,8 @@ $conf_house['sy']= array(
$conf_house
[
'sz'
]
=
array
(
"district"
=>
array
(
'园区'
=>
'园区'
,
'姑苏区'
=>
'姑苏区'
,
'新区'
=>
'新区'
,
'吴中区'
=>
'吴中区'
,
'相城区'
=>
'相城区'
,
'吴江'
=>
'吴江'
,
'昆山'
=>
'昆山'
,
'太仓'
=>
'太仓'
,
'常熟'
=>
'常熟'
,
'张家港'
=>
'张家港'
),
"price_sell"
=>
array
(
'1'
=>
'40万以下'
,
'2'
=>
'40-60万'
,
'3'
=>
'60-90万'
,
'4'
=>
'90-120万'
,
'5'
=>
'120-150万'
,
'6'
=>
'150-200万'
,
'7'
=>
'200-300万'
,
'8'
=>
'300-500万'
,
'9'
=>
'500万以上'
),
"buildarea"
=>
array
(
'1'
=>
'40平米以下'
,
'2'
=>
'40-60平米'
,
'3'
=>
'60-80平米'
,
'4'
=>
'80-100平米'
,
'5'
=>
'100-120平米'
,
'6'
=>
'120-144平米'
,
'7'
=>
'144-200平米'
,
'8'
=>
'200-400平米'
,
'9'
=>
'400平米以上'
),
"buildarea"
=>
array
(
'1'
=>
'50㎡以下'
,
'2'
=>
'50-80㎡'
,
'3'
=>
'80-100㎡'
,
'4'
=>
'100-120㎡'
,
'5'
=>
'120-150㎡'
,
'6'
=>
'150-200㎡'
,
'7'
=>
'200-300㎡'
,
'8'
=>
'300㎡以上'
),
"rent_buildarea"
=>
array
(
'1'
=>
'50㎡以下'
,
'2'
=>
'50-100㎡'
,
'3'
=>
'100-200㎡'
,
'4'
=>
'200-300㎡'
,
'5'
=>
'300-500㎡'
,
'6'
=>
'500-1000㎡'
,
'7'
=>
'1000㎡以上'
),
"price_rent"
=>
array
(
'1'
=>
'800元以下'
,
'2'
=>
'800-1400元'
,
'3'
=>
'1400-2000元'
,
'4'
=>
'2000-3000元'
),
"roomtype"
=>
array
(
'1'
=>
'一室'
,
'2'
=>
'二室'
,
'3'
=>
'三室'
,
'4'
=>
'四室'
,
'5'
=>
'五室'
),
//写字楼价格
...
...
@@ -666,7 +672,8 @@ $conf_house['sz']= array(
$conf_house
[
'wh'
]
=
array
(
"district"
=>
array
(
'镜湖区'
=>
'镜湖区'
,
'鸠江区'
=>
'鸠江区'
,
'弋江区'
=>
'弋江区'
,
'三山区'
=>
'三山区'
,
'开发区'
=>
'开发区'
,
'芜湖县'
=>
'芜湖县'
,
'繁昌县'
=>
'繁昌县'
,
'南陵县'
=>
'南陵县'
,
'无为县'
=>
'无为县'
),
"price_sell"
=>
array
(
'1'
=>
'30万以下'
,
'2'
=>
'30-50万'
,
'3'
=>
'50-60万'
,
'4'
=>
'60-70万'
,
'5'
=>
'70-80万'
,
'6'
=>
'80-100万'
,
'7'
=>
'100-120万'
,
'8'
=>
'120-150万'
,
'9'
=>
'150万以上'
),
"buildarea"
=>
array
(
'1'
=>
'60平米以下'
,
'2'
=>
'60-80平米'
,
'3'
=>
'80-100平米'
,
'4'
=>
'100-120平米'
,
'5'
=>
'120-150平米'
,
'6'
=>
'150平米以上'
),
"buildarea"
=>
array
(
'1'
=>
'50㎡以下'
,
'2'
=>
'50-80㎡'
,
'3'
=>
'80-100㎡'
,
'4'
=>
'100-120㎡'
,
'5'
=>
'120-150㎡'
,
'6'
=>
'150-200㎡'
,
'7'
=>
'200-300㎡'
,
'8'
=>
'300㎡以上'
),
"rent_buildarea"
=>
array
(
'1'
=>
'50㎡以下'
,
'2'
=>
'50-100㎡'
,
'3'
=>
'100-200㎡'
,
'4'
=>
'200-300㎡'
,
'5'
=>
'300-500㎡'
,
'6'
=>
'500-1000㎡'
,
'7'
=>
'1000㎡以上'
),
"price_rent"
=>
array
(
'1'
=>
'500元以下'
,
'2'
=>
'500-800元'
,
'3'
=>
'800-1500元'
,
'4'
=>
'1500-2500元'
,
'5'
=>
'2500-4000元'
,
'6'
=>
'4000元以上'
),
//写字楼价格
"price_office"
=>
array
(
'1'
=>
'5000元以下'
,
'2'
=>
'5000-8000元'
,
'3'
=>
'8000-1万元'
,
'4'
=>
'1-1.5万'
,
'5'
=>
'1.5-2万'
,
'6'
=>
'2-5万'
,
'7'
=>
'5万以上'
),
...
...
@@ -676,7 +683,8 @@ $conf_house['wh']= array(
$conf_house
[
'xa'
]
=
array
(
"district"
=>
array
(
'高新'
=>
'高新'
,
'城南'
=>
'城南'
,
'长安'
=>
'长安'
,
'城北'
=>
'城北'
,
'城西'
=>
'城西'
,
'城东'
=>
'城东'
,
'城内'
=>
'城内'
,
'西安周边'
=>
'西安周边'
,
'临潼'
=>
'临潼'
,
'阎良'
=>
'阎良'
,
'蓝田'
=>
'蓝田'
),
"price_sell"
=>
array
(
'1'
=>
'30万以下'
,
'2'
=>
'30-50万'
,
'3'
=>
'50-80万'
,
'4'
=>
'80-120万'
,
'5'
=>
'120-150万'
,
'6'
=>
'150-200万'
,
'7'
=>
'200万以上'
),
"buildarea"
=>
array
(
'1'
=>
'40㎡以下'
,
'2'
=>
'40-60㎡'
,
'3'
=>
'60-80㎡'
,
'4'
=>
'80-100㎡'
,
'5'
=>
'100-120㎡'
,
'6'
=>
'120-150㎡'
,
'7'
=>
'150-200㎡'
,
'8'
=>
'200-400㎡'
,
'9'
=>
'400㎡以上'
),
"buildarea"
=>
array
(
'1'
=>
'50㎡以下'
,
'2'
=>
'50-80㎡'
,
'3'
=>
'80-100㎡'
,
'4'
=>
'100-120㎡'
,
'5'
=>
'120-150㎡'
,
'6'
=>
'150-200㎡'
,
'7'
=>
'200-300㎡'
,
'8'
=>
'300㎡以上'
),
"rent_buildarea"
=>
array
(
'1'
=>
'50㎡以下'
,
'2'
=>
'50-100㎡'
,
'3'
=>
'100-200㎡'
,
'4'
=>
'200-300㎡'
,
'5'
=>
'300-500㎡'
,
'6'
=>
'500-1000㎡'
,
'7'
=>
'1000㎡以上'
),
"price_rent"
=>
array
(
'1'
=>
'400元以下'
,
'2'
=>
'400-800元'
,
'3'
=>
'800-1200元'
,
'4'
=>
'1200-1800元'
,
'5'
=>
'1800-2200元'
,
'6'
=>
'2200-4000元'
,
'7'
=>
'4000元以上'
),
//写字楼价格
"price_office"
=>
array
(
'1'
=>
'5000元以下'
,
'2'
=>
'5000-8000元'
,
'3'
=>
'8000-1万元'
,
'4'
=>
'1-1.5万'
,
'5'
=>
'1.5-2万'
,
'6'
=>
'2-5万'
,
'7'
=>
'5万以上'
),
...
...
@@ -738,7 +746,7 @@ $conf_house['tx']= array(
$conf_house
[
'jx'
]
=
array
(
"district"
=>
array
(
'嘉善'
=>
'嘉善'
,
'平湖'
=>
'平湖'
,
'海盐'
=>
'海盐'
,
'海宁'
=>
'海宁'
,
'桐乡'
=>
'桐乡'
,
'秀洲新区'
=>
'秀洲新区'
,
'南湖新区'
=>
'南湖新区'
,
'中心城区'
=>
'中心城区'
,
'城西区'
=>
'城西区'
,
'城北区'
=>
'城北区'
,
'西南区'
=>
'西南区'
,
'国际商务区'
=>
'国际商务区'
,
'城南区'
=>
'城南区'
,
'湘家荡度假区'
=>
'湘家荡度假区'
,
'其他'
=>
'其他'
),
"price_sell"
=>
array
(
'1'
=>
'40万以下'
,
'2'
=>
'40-60万'
,
'3'
=>
'60-90万'
,
'4'
=>
'90-120万'
,
'5'
=>
'120-150万'
,
'6'
=>
'150-200万'
,
'7'
=>
'200-300万'
,
'8'
=>
'300-500万'
,
'9'
=>
'500万以上'
),
"buildarea"
=>
array
(
'1'
=>
'
40㎡以下'
,
'2'
=>
'40-60㎡'
,
'3'
=>
'60-80㎡'
,
'4'
=>
'80-100㎡'
,
'5'
=>
'100-120㎡'
,
'6'
=>
'120-150㎡'
,
'7'
=>
'150-200㎡'
,
'8'
=>
'200-400㎡'
,
'9'
=>
'4
00㎡以上'
),
"buildarea"
=>
array
(
'1'
=>
'
100㎡以下'
,
'2'
=>
'100-120㎡'
,
'3'
=>
'120-150㎡'
,
'4'
=>
'150-200㎡'
,
'5'
=>
'200-300㎡'
,
'6'
=>
'3
00㎡以上'
),
"price_rent"
=>
array
(
'1'
=>
'500元以下'
,
'2'
=>
'500-800元'
,
'3'
=>
'800-1500元'
,
'4'
=>
'1500-2500元'
,
'5'
=>
'2500-4000元'
,
'6'
=>
'4000元以上'
),
//写字楼价格
"price_office"
=>
array
(
'1'
=>
'5000元以下'
,
'2'
=>
'5000-8000元'
,
'3'
=>
'8000-1万元'
,
'4'
=>
'1-1.5万'
,
'5'
=>
'1.5-2万'
,
'6'
=>
'2-5万'
,
'7'
=>
'5万以上'
),
...
...
@@ -758,7 +766,8 @@ $conf_house['bb']= array(
$conf_house
[
'gy'
]
=
array
(
"district"
=>
array
(
'云岩'
=>
'云岩'
,
'南明'
=>
'南明'
,
'观山湖'
=>
'观山湖'
,
'小河'
=>
'小河'
,
'乌当'
=>
'乌当'
,
'花溪'
=>
'花溪'
,
'白云'
=>
'白云'
,
'清镇'
=>
'清镇'
,
'开阳'
=>
'开阳'
,
'修文'
=>
'修文'
,
'息烽'
=>
'息烽'
,
'其他'
=>
'其他'
),
"price_sell"
=>
array
(
'1'
=>
'40万以下'
,
'2'
=>
'40-60万'
,
'3'
=>
'60-90万'
,
'4'
=>
'90-120万'
,
'5'
=>
'120-150万'
,
'6'
=>
'150-200万'
,
'7'
=>
'200-300万'
,
'8'
=>
'300-500万'
,
'9'
=>
'500万以上'
),
"buildarea"
=>
array
(
'1'
=>
'40㎡以下'
,
'2'
=>
'40-60㎡'
,
'3'
=>
'60-80㎡'
,
'4'
=>
'80-100㎡'
,
'5'
=>
'100-120㎡'
,
'6'
=>
'120-150㎡'
,
'7'
=>
'150-200㎡'
,
'8'
=>
'200-400㎡'
,
'9'
=>
'400㎡以上'
),
"buildarea"
=>
array
(
'1'
=>
'50㎡以下'
,
'2'
=>
'50-80㎡'
,
'3'
=>
'80-100㎡'
,
'4'
=>
'100-120㎡'
,
'5'
=>
'120-150㎡'
,
'6'
=>
'150-200㎡'
,
'7'
=>
'200-300㎡'
,
'8'
=>
'300㎡以上'
),
"rent_buildarea"
=>
array
(
'1'
=>
'50㎡以下'
,
'2'
=>
'50-100㎡'
,
'3'
=>
'100-200㎡'
,
'4'
=>
'200-300㎡'
,
'5'
=>
'300-500㎡'
,
'6'
=>
'500-1000㎡'
,
'7'
=>
'1000㎡以上'
),
"price_rent"
=>
array
(
'1'
=>
'500元以下'
,
'2'
=>
'500-800元'
,
'3'
=>
'800-1500元'
,
'4'
=>
'1500-2500元'
,
'5'
=>
'2500-4000元'
,
'6'
=>
'4000元以上'
),
//写字楼价格
"price_office"
=>
array
(
'1'
=>
'5000元以下'
,
'2'
=>
'5000-8000元'
,
'3'
=>
'8000-1万元'
,
'4'
=>
'1-1.5万'
,
'5'
=>
'1.5-2万'
,
'6'
=>
'2-5万'
,
'7'
=>
'5万以上'
),
...
...
@@ -768,7 +777,8 @@ $conf_house['gy']= array(
$conf_house
[
'sh'
]
=
array
(
"district"
=>
array
(
'浦东'
=>
'浦东'
,
'闵行'
=>
'闵行'
,
'徐汇'
=>
'徐汇'
,
'宝山'
=>
'宝山'
,
'普陀'
=>
'普陀'
,
'长宁'
=>
'长宁'
,
'杨浦'
=>
'杨浦'
,
'松江'
=>
'松江'
,
'嘉定'
=>
'嘉定'
,
'虹口'
=>
'虹口'
,
'闸北'
=>
'闸北'
,
'静安'
=>
'静安'
,
'黄浦'
=>
'黄浦'
,
'卢湾'
=>
'卢湾'
,
'青浦'
=>
'青浦'
,
'奉贤'
=>
'奉贤'
,
'金山'
=>
'金山'
,
'崇明'
=>
'崇明'
,
'上海周边'
=>
'上海周边'
),
"price_sell"
=>
array
(
'1'
=>
'40万以下'
,
'2'
=>
'40-60万'
,
'3'
=>
'60-90万'
,
'4'
=>
'90-120万'
,
'5'
=>
'120-150万'
,
'6'
=>
'150-200万'
,
'7'
=>
'200-300万'
,
'8'
=>
'300-500万'
,
'9'
=>
'500万以上'
),
"buildarea"
=>
array
(
'1'
=>
'40㎡以下'
,
'2'
=>
'40-60㎡'
,
'3'
=>
'60-80㎡'
,
'4'
=>
'80-100㎡'
,
'5'
=>
'100-120㎡'
,
'6'
=>
'120-150㎡'
,
'7'
=>
'150-200㎡'
,
'8'
=>
'200-400㎡'
,
'9'
=>
'400㎡以上'
),
"buildarea"
=>
array
(
'1'
=>
'50㎡以下'
,
'2'
=>
'50-80㎡'
,
'3'
=>
'80-100㎡'
,
'4'
=>
'100-120㎡'
,
'5'
=>
'120-150㎡'
,
'6'
=>
'150-200㎡'
,
'7'
=>
'200-300㎡'
,
'8'
=>
'300㎡以上'
),
"rent_buildarea"
=>
array
(
'1'
=>
'50㎡以下'
,
'2'
=>
'50-100㎡'
,
'3'
=>
'100-200㎡'
,
'4'
=>
'200-300㎡'
,
'5'
=>
'300-500㎡'
,
'6'
=>
'500-1000㎡'
,
'7'
=>
'1000㎡以上'
),
"price_rent"
=>
array
(
'1'
=>
'500元以下'
,
'2'
=>
'500-800元'
,
'3'
=>
'800-1500元'
,
'4'
=>
'1500-2500元'
,
'5'
=>
'2500-4000元'
,
'6'
=>
'4000元以上'
),
//写字楼价格
"price_office"
=>
array
(
'1'
=>
'5000元以下'
,
'2'
=>
'5000-8000元'
,
'3'
=>
'8000-1万元'
,
'4'
=>
'1-1.5万'
,
'5'
=>
'1.5-2万'
,
'6'
=>
'2-5万'
,
'7'
=>
'5万以上'
),
...
...
@@ -778,7 +788,8 @@ $conf_house['sh']= array(
$conf_house
[
'bh'
]
=
array
(
"district"
=>
array
(
'海城区'
=>
'海城区'
,
'银海区'
=>
'银海区'
,
'铁山港'
=>
'铁山港'
,
'合浦县'
=>
'合浦县'
,
'其他区县'
=>
'其他区县'
),
"price_sell"
=>
array
(
'1'
=>
'40万以下'
,
'2'
=>
'40-60万'
,
'3'
=>
'60-90万'
,
'4'
=>
'90-120万'
,
'5'
=>
'120-150万'
,
'6'
=>
'150-200万'
,
'7'
=>
'200-300万'
,
'8'
=>
'300-500万'
,
'9'
=>
'500万以上'
),
"buildarea"
=>
array
(
'1'
=>
'40㎡以下'
,
'2'
=>
'40-60㎡'
,
'3'
=>
'60-80㎡'
,
'4'
=>
'80-100㎡'
,
'5'
=>
'100-120㎡'
,
'6'
=>
'120-150㎡'
,
'7'
=>
'150-200㎡'
,
'8'
=>
'200-400㎡'
,
'9'
=>
'400㎡以上'
),
"buildarea"
=>
array
(
'1'
=>
'50㎡以下'
,
'2'
=>
'50-80㎡'
,
'3'
=>
'80-100㎡'
,
'4'
=>
'100-120㎡'
,
'5'
=>
'120-150㎡'
,
'6'
=>
'150-200㎡'
,
'7'
=>
'200-300㎡'
,
'8'
=>
'300㎡以上'
),
"rent_buildarea"
=>
array
(
'1'
=>
'50㎡以下'
,
'2'
=>
'50-100㎡'
,
'3'
=>
'100-200㎡'
,
'4'
=>
'200-300㎡'
,
'5'
=>
'300-500㎡'
,
'6'
=>
'500-1000㎡'
,
'7'
=>
'1000㎡以上'
),
"price_rent"
=>
array
(
'1'
=>
'500元以下'
,
'2'
=>
'500-800元'
,
'3'
=>
'800-1500元'
,
'4'
=>
'1500-2500元'
,
'5'
=>
'2500-4000元'
,
'6'
=>
'4000元以上'
),
//写字楼价格
"price_office"
=>
array
(
'1'
=>
'5000元以下'
,
'2'
=>
'5000-8000元'
,
'3'
=>
'8000-1万元'
,
'4'
=>
'1-1.5万'
,
'5'
=>
'1.5-2万'
,
'6'
=>
'2-5万'
,
'7'
=>
'5万以上'
),
...
...
@@ -799,7 +810,8 @@ $conf_house['nc']= array(
$conf_house
[
'lyg'
]
=
array
(
"district"
=>
array
(
'新浦'
=>
'新浦'
,
'海州'
=>
'海州'
,
'连云'
=>
'连云'
,
'开发'
=>
'开发'
,
'灌南'
=>
'灌南'
,
'灌云'
=>
'灌云'
,
'东海'
=>
'东海'
,
'赣榆'
=>
'赣榆'
),
"price_sell"
=>
array
(
'1'
=>
'40万以下'
,
'2'
=>
'40-60万'
,
'3'
=>
'60-90万'
,
'4'
=>
'90-120万'
,
'5'
=>
'120-150万'
,
'6'
=>
'150-200万'
,
'7'
=>
'200-300万'
,
'8'
=>
'300-500万'
,
'9'
=>
'500万以上'
),
"buildarea"
=>
array
(
'1'
=>
'40㎡以下'
,
'2'
=>
'40-60㎡'
,
'3'
=>
'60-80㎡'
,
'4'
=>
'80-100㎡'
,
'5'
=>
'100-120㎡'
,
'6'
=>
'120-150㎡'
,
'7'
=>
'150-200㎡'
,
'8'
=>
'200-400㎡'
,
'9'
=>
'400㎡以上'
),
"buildarea"
=>
array
(
'1'
=>
'50㎡以下'
,
'2'
=>
'50-80㎡'
,
'3'
=>
'80-100㎡'
,
'4'
=>
'100-120㎡'
,
'5'
=>
'120-150㎡'
,
'6'
=>
'150-200㎡'
,
'7'
=>
'200-300㎡'
,
'8'
=>
'300㎡以上'
),
"rent_buildarea"
=>
array
(
'1'
=>
'50㎡以下'
,
'2'
=>
'50-100㎡'
,
'3'
=>
'100-200㎡'
,
'4'
=>
'200-300㎡'
,
'5'
=>
'300-500㎡'
,
'6'
=>
'500-1000㎡'
,
'7'
=>
'1000㎡以上'
),
"price_rent"
=>
array
(
'1'
=>
'500元以下'
,
'2'
=>
'500-800元'
,
'3'
=>
'800-1500元'
,
'4'
=>
'1500-2500元'
,
'5'
=>
'2500-4000元'
,
'6'
=>
'4000元以上'
),
//写字楼价格
"price_office"
=>
array
(
'1'
=>
'5000元以下'
,
'2'
=>
'5000-8000元'
,
'3'
=>
'8000-1万元'
,
'4'
=>
'1-1.5万'
,
'5'
=>
'1.5-2万'
,
'6'
=>
'2-5万'
,
'7'
=>
'5万以上'
),
...
...
@@ -841,7 +853,8 @@ $conf_house['ty']= array(
$conf_house
[
'aq'
]
=
array
(
"district"
=>
array
(
'迎江区'
=>
'迎江区'
,
'大观区'
=>
'大观区'
,
'宜秀区'
=>
'宜秀区'
,
'怀宁县'
=>
'怀宁县'
,
'枞阳县'
=>
'枞阳县'
,
'潜山县'
=>
'潜山县'
,
'太湖县'
=>
'太湖县'
,
'宿松县'
=>
'宿松县'
,
'望江县'
=>
'望江县'
,
'岳西县'
=>
'岳西县'
,
'桐城市'
=>
'桐城市'
),
"price_sell"
=>
array
(
'1'
=>
'40万以下'
,
'2'
=>
'40-60万'
,
'3'
=>
'60-90万'
,
'4'
=>
'90-120万'
,
'5'
=>
'120-150万'
,
'6'
=>
'150-200万'
,
'7'
=>
'200-300万'
,
'8'
=>
'300-500万'
,
'9'
=>
'500万以上'
),
"buildarea"
=>
array
(
'1'
=>
'40㎡以下'
,
'2'
=>
'40-60㎡'
,
'3'
=>
'60-80㎡'
,
'4'
=>
'80-100㎡'
,
'5'
=>
'100-120㎡'
,
'6'
=>
'120-150㎡'
,
'7'
=>
'150-200㎡'
,
'8'
=>
'200-400㎡'
,
'9'
=>
'400㎡以上'
),
"buildarea"
=>
array
(
'1'
=>
'50㎡以下'
,
'2'
=>
'50-80㎡'
,
'3'
=>
'80-100㎡'
,
'4'
=>
'100-120㎡'
,
'5'
=>
'120-150㎡'
,
'6'
=>
'150-200㎡'
,
'7'
=>
'200-300㎡'
,
'8'
=>
'300㎡以上'
),
"rent_buildarea"
=>
array
(
'1'
=>
'50㎡以下'
,
'2'
=>
'50-100㎡'
,
'3'
=>
'100-200㎡'
,
'4'
=>
'200-300㎡'
,
'5'
=>
'300-500㎡'
,
'6'
=>
'500-1000㎡'
,
'7'
=>
'1000㎡以上'
),
"price_rent"
=>
array
(
'1'
=>
'500元以下'
,
'2'
=>
'500-800元'
,
'3'
=>
'800-1500元'
,
'4'
=>
'1500-2500元'
,
'5'
=>
'2500-4000元'
,
'6'
=>
'4000元以上'
),
//写字楼价格
"price_office"
=>
array
(
'1'
=>
'5000元以下'
,
'2'
=>
'5000-8000元'
,
'3'
=>
'8000-1万元'
,
'4'
=>
'1-1.5万'
,
'5'
=>
'1.5-2万'
,
'6'
=>
'2-5万'
,
'7'
=>
'5万以上'
),
...
...
@@ -878,7 +891,8 @@ $conf_house['bd']= array(
$conf_house
[
'nn'
]
=
array
(
"district"
=>
array
(
'兴宁区'
=>
'兴宁区'
,
'青秀区'
=>
'青秀区'
,
'江南区'
=>
'江南区'
,
'西乡塘区'
=>
'西乡塘区'
,
'良庆区'
=>
'良庆区'
,
'邕宁区'
=>
'邕宁区'
,
'武鸣区'
=>
'武鸣区'
),
"price_sell"
=>
array
(
'1'
=>
'20万以下'
,
'2'
=>
'20-30万'
,
'3'
=>
'30-40万'
,
'4'
=>
'40-50万'
,
'5'
=>
'50-60万'
,
'6'
=>
'60-70万'
,
'7'
=>
'70-100万'
,
'8'
=>
'100万以上'
),
"buildarea"
=>
array
(
'1'
=>
'40㎡以下'
,
'2'
=>
'40-60㎡'
,
'3'
=>
'60-80㎡'
,
'4'
=>
'80-100㎡'
,
'5'
=>
'100-120㎡'
,
'6'
=>
'120-150㎡'
,
'7'
=>
'150-200㎡'
,
'8'
=>
'200-400㎡'
,
'9'
=>
'400㎡以上'
),
"buildarea"
=>
array
(
'1'
=>
'50㎡以下'
,
'2'
=>
'50-80㎡'
,
'3'
=>
'80-100㎡'
,
'4'
=>
'100-120㎡'
,
'5'
=>
'120-150㎡'
,
'6'
=>
'150-200㎡'
,
'7'
=>
'200-300㎡'
,
'8'
=>
'300㎡以上'
),
"rent_buildarea"
=>
array
(
'1'
=>
'50㎡以下'
,
'2'
=>
'50-100㎡'
,
'3'
=>
'100-200㎡'
,
'4'
=>
'200-300㎡'
,
'5'
=>
'300-500㎡'
,
'6'
=>
'500-1000㎡'
,
'7'
=>
'1000㎡以上'
),
"price_rent"
=>
array
(
'1'
=>
'500元以下'
,
'2'
=>
'500-800元'
,
'3'
=>
'800-1500元'
,
'4'
=>
'1500-2500元'
,
'5'
=>
'2500-4000元'
,
'6'
=>
'4000元以上'
),
//写字楼价格
"price_office"
=>
array
(
'1'
=>
'5000元以下'
,
'2'
=>
'5000-8000元'
,
'3'
=>
'8000-1万元'
,
'4'
=>
'1-1.5万'
,
'5'
=>
'1.5-2万'
,
'6'
=>
'2-5万'
,
'7'
=>
'5万以上'
),
...
...
@@ -903,8 +917,11 @@ $conf_house_base = array(
"officetype"
=>
array
(
'1'
=>
'甲级'
,
'2'
=>
'乙级'
,
'3'
=>
'丙级'
),
"floortyperent"
=>
array
(
'1'
=>
'任意'
,
'2'
=>
'1层'
,
'3'
=>
'2-5层'
,
'4'
=>
'6-12层'
,
'5'
=>
'13层以上'
),
"infofrom"
=>
array
(
'1'
=>
'个人'
,
'2'
=>
'中介门店'
,
'5'
=>
'中介'
),
"renttype"
=>
array
(
'整租'
=>
'整租'
,
'转租'
=>
'转租'
,
'合租'
=>
'合租'
,
'日租,短租'
=>
'日租,短租'
),
"renttype_num"
=>
array
(
'1'
=>
'整租'
,
'2'
=>
'转租'
,
'3'
=>
'合租'
,
'4'
=>
'日租,短租'
),
// "renttype" => array ('整租'=>'整租', '转租'=>'转租', '合租'=>'合租','日租,短租'=>'日租,短租'),
// "renttype_num" => array ('1'=>'整租', '2'=>'转租','3'=>'合租','4'=>'日租,短租'),
"renttype"
=>
array
(
'整租'
=>
'整租'
,
'合租'
=>
'合租'
),
// 方式
"renttype_num"
=>
array
(
'1'
=>
'整租'
,
'2'
=>
'合租'
),
"fitment"
=>
array
(
'毛坯'
=>
'毛坯'
,
'简装'
=>
'简装'
,
'精装'
=>
'精装'
,
'豪华装'
=>
'豪华装'
),
"fitment_num"
=>
array
(
'1'
=>
'毛坯'
,
'2'
=>
'简装'
,
'3'
=>
'精装'
,
'4'
=>
'豪华装'
),
"priceunit"
=>
array
(
'1'
=>
'元/月'
,
'2'
=>
'元/天*平方米'
,
'3'
=>
'元/月*平方米'
,
'4'
=>
'元/天'
),
...
...
esf_core/core/MY_Model.php
View file @
c30266f4
...
...
@@ -248,11 +248,11 @@ class MY_Model extends CI_Model
{
if
(
strlen
(
$data
[
'limit'
])
&&
is_numeric
(
$data
[
'limit'
]))
{
(
$data
[
'limit'
]
>
0
)
?
$this
->
db
->
limit
(
$data
[
'offset'
],
$data
[
'limit'
])
:
$this
->
db
->
limit
(
$data
[
'offset'
]
);
(
$data
[
'limit'
]
>
0
)
?
$this
->
db
->
offset
(
$data
[
'offset'
])
->
limit
(
$data
[
'limit'
])
:
$this
->
db
->
offset
(
$data
[
'offset'
])
->
limit
(
20
);
}
else
{
$this
->
db
->
limit
(
$data
[
'offset'
]
);
$this
->
db
->
offset
(
$data
[
'offset'
])
->
limit
(
20
);
}
}
else
...
...
esf_core/helpers/function_helper.php
View file @
c30266f4
...
...
@@ -210,6 +210,17 @@ if ( ! function_exists('get_upload_tblname'))
{
function
get_upload_tblname
(
$tbl
,
$id
){
if
(
GB_CITY
==
'wh'
){
if
(
$tbl
==
'sell'
&&
$id
<
10310000
)
return
'upload'
;
if
(
$tbl
==
'rent'
&&
$id
<
1577000
)
return
'upload'
;
if
(
$tbl
==
'sell'
&&
(
$id
>=
10310000
&&
$id
<
15591000
))
return
'upload1'
;
if
(
$tbl
==
'rent'
&&
(
$id
>=
1577000
&&
$id
<
1809000
))
return
'upload1'
;
return
'upload2'
;
}
if
(
GB_CITY
!=
'nj'
)
return
'upload'
;
if
(
$tbl
==
'sell'
&&
$id
<
23972101
)
return
'upload0'
;
...
...
@@ -349,7 +360,26 @@ if ( ! function_exists('get_upload_tblname'))
if
(
$tbl
==
'rent'
&&
(
$id
>=
63483875
&&
$id
<
84955643
))
return
'upload29'
;
return
'upload30'
;
if
(
$tbl
==
'sell'
&&
(
$id
>=
264744742
&&
$id
<
271465540
))
return
'upload30'
;
if
(
$tbl
==
'rent'
&&
(
$id
>=
84955643
&&
$id
<
86646071
))
return
'upload30'
;
if
(
$tbl
==
'sell'
&&
(
$id
>=
271465540
&&
$id
<
282952050
))
return
'upload31'
;
if
(
$tbl
==
'rent'
&&
(
$id
>=
86646071
&&
$id
<
89874731
))
return
'upload31'
;
if
(
$tbl
==
'sell'
&&
(
$id
>=
282952050
&&
$id
<
288033939
))
return
'upload32'
;
if
(
$tbl
==
'rent'
&&
(
$id
>=
89874731
&&
$id
<
91709557
))
return
'upload32'
;
if
(
$tbl
==
'sell'
&&
(
$id
>=
288033939
&&
$id
<
289572177
))
return
'upload33'
;
if
(
$tbl
==
'rent'
&&
(
$id
>=
91709557
&&
$id
<
92295581
))
return
'upload33'
;
if
(
$tbl
==
'sell'
&&
(
$id
>=
289572177
&&
$id
<
332826911
))
return
'upload34'
;
if
(
$tbl
==
'rent'
&&
(
$id
>=
92295581
&&
$id
<
105588509
))
return
'upload34'
;
return
'upload35'
;
}
}
...
...
esf_core/models/user_model.php
View file @
c30266f4
...
...
@@ -878,6 +878,20 @@ class User_model extends MY_Model
}
}
/**
* 通过base_id查询用户关注房源的房源id
* @param type $base_id
* @return string
*/
function
getCollectHouseIdByBaseID
(
$base_id
,
$kind
,
$city
=
GB_CITY
){
$return
=
$this
->
get_data
(
array
(
'form_name'
=>
'personal_collection'
,
'where_in'
=>
array
(
'base_id'
=>
$base_id
),
'where'
=>
array
(
'kind'
=>
$kind
,
'city_name'
=>
$city
),
'select'
=>
array
(
'collect_id'
)),
'esfbak'
);
if
(
!
empty
(
$return
)){
return
$return
;
}
else
{
return
array
();
}
}
/**
* 查询是否有此用户
...
...
@@ -945,6 +959,26 @@ class User_model extends MY_Model
return
$result
;
}
/**
* 添加关注
* @param string $base_id
* @param string $collect_id
* @return string
*/
function
addcollectByBaseID
(
$base_id
,
$collect_id
,
$kind
,
$collect_value
,
$city
=
GB_CITY
,
$infofrom
=
1
,
$passport_uid
=
0
,
$uid
=
0
)
{
//取base_id字符串中逗号前面的部分作为base_id
$base_id
=
explode
(
','
,
$base_id
);
$base_id
=
$base_id
[
0
];
$arr
=
array
(
'base_id'
=>
$base_id
,
'uid'
=>
$uid
,
'collect_id'
=>
$collect_id
,
'kind'
=>
$kind
,
'collect_value'
=>
$collect_value
,
'collect_time'
=>
time
(),
'city_name'
=>
$city
,
'infofrom'
=>
$infofrom
,
'passport_uid'
=>
$passport_uid
);
//设置表
$this
->
user_model
->
set_table
(
'personal_collection'
);
//过滤表结构
$result
=
$this
->
user_model
->
add
(
$arr
,
'esf'
);
return
$result
;
}
/**
* 推广情况
* @param type $uid
...
...
@@ -1132,9 +1166,10 @@ class User_model extends MY_Model
* getSeachcondStr 转化找房条件
*
* @param array $sarr
* @param string $tab 出租/处说
* @return array
*/
function
getSeachcondStr
(
$sarr
)
function
getSeachcondStr
(
$sarr
,
$tab
=
'sell'
)
{
global
$house
;
...
...
@@ -1276,7 +1311,9 @@ class User_model extends MY_Model
if
(
isset
(
$search
[
'buildarea'
]
)
&&
$search
[
'buildarea'
]
>
0
&&
$search
[
'buildarea'
]
!=
99
)
{
$str
.=
isset
(
$house
[
'buildarea'
][
$search
[
'buildarea'
]])
?
$house
[
'buildarea'
][
$search
[
'buildarea'
]]
.
'<em class="t-line">|</em>'
:
''
;
$buildareaArr
=
$house
[
'buildarea'
];
if
(
$tab
==
'rent'
)
$buildareaArr
=
!
empty
(
$house
[
'rent_buildarea'
])
?
$house
[
'rent_buildarea'
]
:
array
()
;
$str
.=
isset
(
$buildareaArr
[
$search
[
'buildarea'
]])
?
$buildareaArr
[
$search
[
'buildarea'
]]
.
'<em class="t-line">|</em>'
:
''
;
}
else
{
...
...
@@ -1651,7 +1688,7 @@ class User_model extends MY_Model
if
(
empty
(
$housedetail
)
)
{
$wherecond
=
$this
->
getsearchcond
(
$searcharr
);
$wherecond
=
$this
->
getsearchcond
(
$searcharr
,
$tbl
);
if
(
!
empty
(
$datatime
))
{
...
...
@@ -1672,7 +1709,7 @@ class User_model extends MY_Model
if
(
isset
(
$selldetail
[
'Record'
][
0
]))
{
$housedetail
=
$selldetail
[
'Record'
][
0
];
$housedetail
[
'time'
]
=
time_tran
(
$housedetail
[
'UPDATETIME'
])
;
$housedetail
[
'time'
]
=
!
empty
(
$housedetail
[
'UPDATETIME'
]
)
?
mb_convert_encoding
(
time_tran
(
$housedetail
[
'UPDATETIME'
]),
'gbk'
,
'utf-8'
)
:
''
;
$streetname
=
$this
->
block_model
->
getstreetname
(
$housedetail
[
'STREETID'
]);
$housedetail
[
'streetname'
]
=
$streetname
[
'streetname'
];
}
...
...
@@ -1687,9 +1724,10 @@ class User_model extends MY_Model
/**
* 根据搜索条件获得sql
* @param type $searcharr
* @param string $tab
* @return string
*/
function
getsearchcond
(
$searcharr
)
function
getsearchcond
(
$searcharr
,
$tab
=
'sell'
)
{
GLOBAL
$house
;
...
...
@@ -1863,6 +1901,7 @@ class User_model extends MY_Model
{
//搜索面板条件
$where_buildarea_sell
=
empty
(
$house
[
'buildarea'
][
$searcharr
[
'buildarea'
]])
?
''
:
$house
[
'buildarea'
][
$searcharr
[
'buildarea'
]];
if
(
$tab
==
'rent'
)
$where_buildarea_sell
=
empty
(
$house
[
'rent_buildarea'
][
$searcharr
[
'buildarea'
]])
?
''
:
$house
[
'rent_buildarea'
][
$searcharr
[
'buildarea'
]];
if
(
!
empty
(
$where_buildarea_sell
))
{
...
...
@@ -2574,9 +2613,9 @@ if($searcharr['infotype']==4){
function
get_buy_by_uid
(
$uid
,
$offset
=
0
,
$pagesize
=
0
,
$sendtime
=
''
)
{
if
(
!
empty
(
$sendtime
)){
$buy_array
=
$this
->
get_data
(
array
(
'form_name'
=>
'buy'
,
'where'
=>
array
(
'uid'
=>
$uid
,
'esta'
=>
1
,
'creattime >'
=>
$sendtime
),
'limit'
=>
$
offset
,
'offset'
=>
$pagesize
,
'order_by'
=>
'id DESC'
,
'select'
=>
array
(
'matched_num'
,
'id'
,
'infotype'
,
'infofrom'
,
'address'
,
'buildyear'
,
'buildyear1'
,
'buildyear2'
,
'buildarea1'
,
'buildarea2'
,
'room'
,
'price1'
,
'price2'
,
'remark'
,
'allow_match'
,
'creattime'
,
'esta'
,
'telno'
)),
'esfhousebak'
);
$buy_array
=
$this
->
get_data
(
array
(
'form_name'
=>
'buy'
,
'where'
=>
array
(
'uid'
=>
$uid
,
'esta'
=>
1
,
'creattime >'
=>
$sendtime
),
'limit'
=>
$
pagesize
,
'offset'
=>
$offset
,
'order_by'
=>
'id DESC'
,
'select'
=>
array
(
'matched_num'
,
'id'
,
'infotype'
,
'infofrom'
,
'address'
,
'buildyear'
,
'buildyear1'
,
'buildyear2'
,
'buildarea1'
,
'buildarea2'
,
'room'
,
'price1'
,
'price2'
,
'remark'
,
'allow_match'
,
'creattime'
,
'esta'
,
'telno'
)),
'esfhousebak'
);
}
else
{
$buy_array
=
$this
->
get_data
(
array
(
'form_name'
=>
'buy'
,
'where'
=>
array
(
'uid'
=>
$uid
,
'esta'
=>
1
),
'limit'
=>
$
offset
,
'offset'
=>
$pagesize
,
'order_by'
=>
'id DESC'
,
'select'
=>
array
(
'matched_num'
,
'id'
,
'infotype'
,
'infofrom'
,
'address'
,
'buildyear'
,
'buildyear1'
,
'buildyear2'
,
'buildarea1'
,
'buildarea2'
,
'room'
,
'price1'
,
'price2'
,
'remark'
,
'allow_match'
,
'creattime'
,
'esta'
,
'telno'
)),
'esfhousebak'
);
$buy_array
=
$this
->
get_data
(
array
(
'form_name'
=>
'buy'
,
'where'
=>
array
(
'uid'
=>
$uid
,
'esta'
=>
1
),
'limit'
=>
$
pagesize
,
'offset'
=>
$offset
,
'order_by'
=>
'id DESC'
,
'select'
=>
array
(
'matched_num'
,
'id'
,
'infotype'
,
'infofrom'
,
'address'
,
'buildyear'
,
'buildyear1'
,
'buildyear2'
,
'buildarea1'
,
'buildarea2'
,
'room'
,
'price1'
,
'price2'
,
'remark'
,
'allow_match'
,
'creattime'
,
'esta'
,
'telno'
)),
'esfhousebak'
);
}
if
(
is_array
(
$buy_array
)
&&
!
empty
(
$buy_array
)
&&
GB_CITY
==
'nj'
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment