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
b6f7b392
Commit
b6f7b392
authored
Feb 23, 2023
by
yanghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
49cca158
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
55 deletions
+57
-55
user_wang.php
center/controllers/user_wang.php
+57
-55
No files found.
center/controllers/user_wang.php
View file @
b6f7b392
...
@@ -6,12 +6,15 @@ class User_Wang extends MY_Controller
...
@@ -6,12 +6,15 @@ class User_Wang extends MY_Controller
function
__construct
()
function
__construct
()
{
{
parent
::
__construct
();
parent
::
__construct
();
if
(
$_GET
[
'test'
]
==
'yh'
){
echo
'yh'
;
exit
;
}
$this
->
load
->
model
(
"user_model"
);
$this
->
load
->
model
(
"user_model"
);
$this
->
load
->
model
(
"broker_model"
);
$this
->
load
->
model
(
"broker_model"
);
$this
->
load
->
model
(
"pic_model"
);
$this
->
load
->
model
(
"pic_model"
);
$this
->
load
->
model
(
"block_model"
);
$this
->
load
->
model
(
"block_model"
);
$this
->
load
->
model
(
"ask_model"
);
$this
->
load
->
model
(
"ask_model"
);
...
@@ -44,7 +47,7 @@ class User_Wang extends MY_Controller
...
@@ -44,7 +47,7 @@ class User_Wang extends MY_Controller
public
function
index
()
public
function
index
()
{
{
global
$house
;
global
$house
;
$data
[
'conf_where'
]
=
'index'
;
$data
[
'conf_where'
]
=
'index'
;
$data
[
'title'
]
=
'会员中心'
;
$data
[
'title'
]
=
'会员中心'
;
$data
[
'priceunit'
]
=
$house
[
'priceunit'
];
$data
[
'priceunit'
]
=
$house
[
'priceunit'
];
...
@@ -56,7 +59,7 @@ class User_Wang extends MY_Controller
...
@@ -56,7 +59,7 @@ class User_Wang extends MY_Controller
//获取最新2条房源
//获取最新2条房源
$newhouse
=
$this
->
user_model
->
newhouse
(
$this
->
user_id
,
2
);
$newhouse
=
$this
->
user_model
->
newhouse
(
$this
->
user_id
,
2
);
$data
[
'newhouse'
]
=
$newhouse
;
$data
[
'newhouse'
]
=
$newhouse
;
$count_newhouse
=
count
(
$newhouse
);
$count_newhouse
=
count
(
$newhouse
);
...
@@ -72,7 +75,7 @@ class User_Wang extends MY_Controller
...
@@ -72,7 +75,7 @@ class User_Wang extends MY_Controller
}
}
$active_num
++
;
$active_num
++
;
}
}
}
}
if
(
isset
(
$_GET
[
'test'
]))
if
(
isset
(
$_GET
[
'test'
]))
{
{
...
@@ -87,22 +90,22 @@ class User_Wang extends MY_Controller
...
@@ -87,22 +90,22 @@ class User_Wang extends MY_Controller
$data
[
'rent_collect_house'
]
=
$rent_collect_house
;
$data
[
'rent_collect_house'
]
=
$rent_collect_house
;
$data
[
'sell_collect_block'
]
=
$sell_collect_block
;
$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
[
'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
[
'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
);
$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
//中奖通知 5.25-8.31
$data
[
'is_win'
]
=
$this
->
_get_is_win
();
$data
[
'is_win'
]
=
$this
->
_get_is_win
();
//BI统计 ----- start----->
//BI统计 ----- start----->
$data
[
'isa_website'
]
=
'2,19,46'
;
$data
[
'isa_website'
]
=
'2,19,46'
;
$data
[
'isa_city'
]
=
GB_CITY
;
$data
[
'isa_city'
]
=
GB_CITY
;
...
@@ -111,7 +114,7 @@ class User_Wang extends MY_Controller
...
@@ -111,7 +114,7 @@ class User_Wang extends MY_Controller
//BI统计 ----- ent----->
//BI统计 ----- ent----->
$this
->
load
->
view
(
'index'
,
$data
);
$this
->
load
->
view
(
'index'
,
$data
);
}
}
/**
/**
* 会员中心切换城市
* 会员中心切换城市
* @author cxf
* @author cxf
...
@@ -152,24 +155,24 @@ class User_Wang extends MY_Controller
...
@@ -152,24 +155,24 @@ class User_Wang extends MY_Controller
$data
[
'collect'
]
=
$this
->
user_model
->
getcollect
(
3
,
$this
->
user_id
,
$data
[
'offset'
],
$data
[
'pagesize'
]);
$data
[
'collect'
]
=
$this
->
user_model
->
getcollect
(
3
,
$this
->
user_id
,
$data
[
'offset'
],
$data
[
'pagesize'
]);
if
(
is_array
(
$data
[
'collect'
])
&&!
empty
(
$data
[
'collect'
])){
if
(
is_array
(
$data
[
'collect'
])
&&!
empty
(
$data
[
'collect'
])){
foreach
(
$data
[
'collect'
]
as
$key
=>
$value
){
foreach
(
$data
[
'collect'
]
as
$key
=>
$value
){
if
(
GB_CITY
==
'nj'
)
if
(
GB_CITY
==
'nj'
)
{
{
$isChoice
=
$this
->
user_model
->
isCheckPriceRemind
(
$this
->
user_id
,
$value
[
'collect_id'
]);
$isChoice
=
$this
->
user_model
->
isCheckPriceRemind
(
$this
->
user_id
,
$value
[
'collect_id'
]);
$infofrom_data
=
$this
->
user_model
->
get_infofrom_by_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
][
'infofrom'
]
=
$infofrom_data
[
0
][
'infofrom'
];
$data
[
'collect'
][
$key
][
'is_remind'
]
=
isset
(
$isChoice
[
0
][
'status'
])
&&
(
$isChoice
[
0
][
'status'
]
==
1
)
?
1
:
0
;
$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
);
$data
[
'likesell'
]
=
$this
->
user_model
->
getlikehouse
(
$this
->
user_id
,
'sell'
,
4
);
//BI统计 ----- start----->
//BI统计 ----- start----->
$data
[
'isa_website'
]
=
'2,19,79'
;
$data
[
'isa_website'
]
=
'2,19,79'
;
$data
[
'isa_city'
]
=
GB_CITY
;
$data
[
'isa_city'
]
=
GB_CITY
;
$data
[
'isa_addones'
]
=
''
;
$data
[
'isa_addones'
]
=
''
;
...
@@ -242,7 +245,7 @@ class User_Wang extends MY_Controller
...
@@ -242,7 +245,7 @@ class User_Wang extends MY_Controller
$data
[
'likeblock'
]
=
$this
->
user_model
->
getlikehouse
(
$this
->
user_id
,
'block'
,
4
);
$data
[
'likeblock'
]
=
$this
->
user_model
->
getlikehouse
(
$this
->
user_id
,
'block'
,
4
);
//BI统计 ----- start----->
//BI统计 ----- start----->
$data
[
'isa_website'
]
=
'2,19,80'
;
$data
[
'isa_website'
]
=
'2,19,80'
;
$data
[
'isa_city'
]
=
GB_CITY
;
$data
[
'isa_city'
]
=
GB_CITY
;
$data
[
'isa_addones'
]
=
''
;
$data
[
'isa_addones'
]
=
''
;
...
@@ -275,11 +278,11 @@ class User_Wang extends MY_Controller
...
@@ -275,11 +278,11 @@ class User_Wang extends MY_Controller
$data
[
'page'
]
=
$this
->
uri
->
segment
(
3
)
?
intval
(
$this
->
uri
->
segment
(
3
))
:
1
;
// 获取当前页数
$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
[
'page'
]
=
(
$data
[
'page'
]
>
$data
[
'pages'
]
&&
$data
[
'pages'
]
!=
0
)
?
$data
[
'pages'
]
:
$data
[
'page'
];
//判断跳转页数
$data
[
'offset'
]
=
$data
[
'pagesize'
]
*
(
$data
[
'page'
]
-
1
);
//计算记录偏移量
$data
[
'offset'
]
=
$data
[
'pagesize'
]
*
(
$data
[
'page'
]
-
1
);
//计算记录偏移量
$data
[
'collect'
]
=
$this
->
user_model
->
getCollectSchoolList
(
7
,
$this
->
user_id
,
$data
[
'offset'
],
$data
[
'pagesize'
]);
$data
[
'collect'
]
=
$this
->
user_model
->
getCollectSchoolList
(
7
,
$this
->
user_id
,
$data
[
'offset'
],
$data
[
'pagesize'
]);
//获取你可能感兴趣的二手房
//获取你可能感兴趣的二手房
$data
[
'likesell'
]
=
$this
->
user_model
->
getLikeSchoolHouse
(
$this
->
user_id
);
$data
[
'likesell'
]
=
$this
->
user_model
->
getLikeSchoolHouse
(
$this
->
user_id
);
//BI统计 ----- start----->
//BI统计 ----- start----->
$data
[
'isa_website'
]
=
'2,19,77'
;
$data
[
'isa_website'
]
=
'2,19,77'
;
$data
[
'isa_city'
]
=
GB_CITY
;
$data
[
'isa_city'
]
=
GB_CITY
;
$data
[
'isa_addones'
]
=
''
;
$data
[
'isa_addones'
]
=
''
;
...
@@ -319,7 +322,7 @@ class User_Wang extends MY_Controller
...
@@ -319,7 +322,7 @@ class User_Wang extends MY_Controller
//获取当前页数
//获取当前页数
$data
[
'page'
]
=
$this
->
uri
->
segment
(
3
)
?
intval
(
$this
->
uri
->
segment
(
3
))
:
1
;
$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
[
'page'
]
=
(
$data
[
'page'
]
>
$data
[
'pages'
]
&&
$data
[
'pages'
]
!=
0
)
?
$data
[
'pages'
]
:
$data
[
'page'
];
//计算记录偏移量
//计算记录偏移量
$data
[
'offset'
]
=
$data
[
'pagesize'
]
*
(
$data
[
'page'
]
-
1
);
$data
[
'offset'
]
=
$data
[
'pagesize'
]
*
(
$data
[
'page'
]
-
1
);
$data
[
'collect'
]
=
$this
->
user_model
->
getcollect
(
1
,
$this
->
user_id
,
$data
[
'offset'
],
$data
[
'pagesize'
]);
$data
[
'collect'
]
=
$this
->
user_model
->
getcollect
(
1
,
$this
->
user_id
,
$data
[
'offset'
],
$data
[
'pagesize'
]);
...
@@ -330,7 +333,7 @@ class User_Wang extends MY_Controller
...
@@ -330,7 +333,7 @@ class User_Wang extends MY_Controller
//BI统计 ----- start----->
//BI统计 ----- start----->
$data
[
'isa_website'
]
=
'2,19,78'
;
$data
[
'isa_website'
]
=
'2,19,78'
;
$data
[
'isa_city'
]
=
GB_CITY
;
$data
[
'isa_city'
]
=
GB_CITY
;
$data
[
'isa_addones'
]
=
''
;
$data
[
'isa_addones'
]
=
''
;
...
@@ -419,7 +422,7 @@ class User_Wang extends MY_Controller
...
@@ -419,7 +422,7 @@ class User_Wang extends MY_Controller
*/
*/
function
edit_profile
()
function
edit_profile
()
{
{
$_SESSION
[
'token'
]
=
md5
(
$this
->
user_id
);
$_SESSION
[
'token'
]
=
md5
(
$this
->
user_id
);
$data
[
'js'
]
=
'<script type="text/javascript" src="'
.
USER_CENTER
.
'js/jquery.Jcrop.min.js"></script>'
;
$data
[
'js'
]
=
'<script type="text/javascript" src="'
.
USER_CENTER
.
'js/jquery.Jcrop.min.js"></script>'
;
$data
[
'conf_where'
]
=
'edit_profile'
;
$data
[
'conf_where'
]
=
'edit_profile'
;
...
@@ -444,7 +447,7 @@ class User_Wang extends MY_Controller
...
@@ -444,7 +447,7 @@ class User_Wang extends MY_Controller
//BI统计 ----- start----->
//BI统计 ----- start----->
$data
[
'isa_website'
]
=
'2,19,83'
;
$data
[
'isa_website'
]
=
'2,19,83'
;
$data
[
'isa_city'
]
=
GB_CITY
;
$data
[
'isa_city'
]
=
GB_CITY
;
$data
[
'isa_addones'
]
=
''
;
$data
[
'isa_addones'
]
=
''
;
...
@@ -460,7 +463,7 @@ class User_Wang extends MY_Controller
...
@@ -460,7 +463,7 @@ class User_Wang extends MY_Controller
*/
*/
function
edit_password
()
function
edit_password
()
{
{
$_SESSION
[
'token'
]
=
md5
(
$this
->
user_id
);
$_SESSION
[
'token'
]
=
md5
(
$this
->
user_id
);
$data
[
'js'
]
=
'<script type="text/javascript" src="'
.
USER_CENTER
.
'js/Validform_v5.3.2_ncr_min.js"></script>'
;
$data
[
'js'
]
=
'<script type="text/javascript" src="'
.
USER_CENTER
.
'js/Validform_v5.3.2_ncr_min.js"></script>'
;
$select
=
array
(
'telno'
);
$select
=
array
(
'telno'
);
$data
[
'user'
]
=
$this
->
user_model
->
get_userdetail
(
$this
->
user_id
,
$select
);
$data
[
'user'
]
=
$this
->
user_model
->
get_userdetail
(
$this
->
user_id
,
$select
);
...
@@ -712,7 +715,7 @@ class User_Wang extends MY_Controller
...
@@ -712,7 +715,7 @@ class User_Wang extends MY_Controller
$data
[
'expertslist'
]
=
$this
->
ask_model
->
getexperts
();
$data
[
'expertslist'
]
=
$this
->
ask_model
->
getexperts
();
//BI统计 ----- start----->
//BI统计 ----- start----->
$data
[
'isa_website'
]
=
'2,19,99'
;
$data
[
'isa_website'
]
=
'2,19,99'
;
$data
[
'isa_city'
]
=
GB_CITY
;
$data
[
'isa_city'
]
=
GB_CITY
;
$data
[
'isa_addones'
]
=
''
;
$data
[
'isa_addones'
]
=
''
;
...
@@ -768,7 +771,7 @@ class User_Wang extends MY_Controller
...
@@ -768,7 +771,7 @@ class User_Wang extends MY_Controller
//BI统计 ----- start----->
//BI统计 ----- start----->
$data
[
'isa_website'
]
=
'2,19,82'
;
$data
[
'isa_website'
]
=
'2,19,82'
;
$data
[
'isa_city'
]
=
GB_CITY
;
$data
[
'isa_city'
]
=
GB_CITY
;
$data
[
'isa_addones'
]
=
''
;
$data
[
'isa_addones'
]
=
''
;
...
@@ -945,12 +948,12 @@ class User_Wang extends MY_Controller
...
@@ -945,12 +948,12 @@ class User_Wang extends MY_Controller
$data
[
'offset'
]
=
$data
[
'pagesize'
]
*
(
$data
[
'page'
]
-
1
);
//计算记录偏移量
$data
[
'offset'
]
=
$data
[
'pagesize'
]
*
(
$data
[
'page'
]
-
1
);
//计算记录偏移量
//获取房源
//获取房源
$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'
]);
$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'
]);
//中奖通知 5.25-8.31
//中奖通知 5.25-8.31
$data
[
'is_win'
]
=
$this
->
_get_is_win
();
$data
[
'is_win'
]
=
$this
->
_get_is_win
();
//BI统计 ----- start----->
//BI统计 ----- start----->
$data
[
'isa_website'
]
=
'2,19,72'
;
$data
[
'isa_website'
]
=
'2,19,72'
;
$data
[
'isa_city'
]
=
GB_CITY
;
$data
[
'isa_city'
]
=
GB_CITY
;
$data
[
'isa_addones'
]
=
''
;
$data
[
'isa_addones'
]
=
''
;
...
@@ -1106,16 +1109,16 @@ class User_Wang extends MY_Controller
...
@@ -1106,16 +1109,16 @@ class User_Wang extends MY_Controller
$this
->
house_statistic_model
->
set_city
(
GB_CITY
);
$this
->
house_statistic_model
->
set_city
(
GB_CITY
);
$result1
=
$this
->
house_statistic_model
->
sub_operate_log
(
'rent'
,
$id
,
5
);
$result1
=
$this
->
house_statistic_model
->
sub_operate_log
(
'rent'
,
$id
,
5
);
if
(
$result
>
0
)
if
(
$result
>
0
)
{
{
//通知爱租哪
//通知爱租哪
if
(
GB_CITY
==
'nj'
||
GB_CITY
==
'hf'
)
if
(
GB_CITY
==
'nj'
||
GB_CITY
==
'hf'
)
{
{
$houseData
=
$this
->
house_model
->
gethousebywhere
(
array
(
'id'
=>
$id
),
'rent'
,
array
(
'iszhizu'
),
1
);
$houseData
=
$this
->
house_model
->
gethousebywhere
(
array
(
'id'
=>
$id
),
'rent'
,
array
(
'iszhizu'
),
1
);
if
(
!
empty
(
$houseData
)
&&
$houseData
[
0
][
'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
;
$url
=
'http://mtapi.house365.com/?method=zhizu.ApiRent_syncEsf2AznStatus&city='
.
GB_CITY
.
'&id='
.
$id
.
'&esta=1&uid='
.
$this
->
user_id
;
curl_get_contents
(
$url
);
curl_get_contents
(
$url
);
}
}
}
}
...
@@ -1149,7 +1152,7 @@ class User_Wang extends MY_Controller
...
@@ -1149,7 +1152,7 @@ class User_Wang extends MY_Controller
$data
[
'is_win'
]
=
$this
->
_get_is_win
();
$data
[
'is_win'
]
=
$this
->
_get_is_win
();
//BI统计 ----- start----->
//BI统计 ----- start----->
$data
[
'isa_website'
]
=
'2,19,73'
;
$data
[
'isa_website'
]
=
'2,19,73'
;
$data
[
'isa_city'
]
=
GB_CITY
;
$data
[
'isa_city'
]
=
GB_CITY
;
$data
[
'isa_addones'
]
=
''
;
$data
[
'isa_addones'
]
=
''
;
...
@@ -1159,8 +1162,8 @@ class User_Wang extends MY_Controller
...
@@ -1159,8 +1162,8 @@ class User_Wang extends MY_Controller
$this
->
load
->
view
(
'myhouserent_wang'
,
$data
);
$this
->
load
->
view
(
'myhouserent_wang'
,
$data
);
}
}
/**
/**
* 获取当前会员是否获取奖品
* 获取当前会员是否获取奖品
*
*
...
@@ -1174,14 +1177,14 @@ class User_Wang extends MY_Controller
...
@@ -1174,14 +1177,14 @@ class User_Wang extends MY_Controller
$time
=
time
();
$time
=
time
();
$start_date
=
mktime
(
0
,
0
,
0
,
5
,
25
,
date
(
'Y'
));
$start_date
=
mktime
(
0
,
0
,
0
,
5
,
25
,
date
(
'Y'
));
$end_date
=
mktime
(
23
,
59
,
59
,
12
,
23
,
date
(
'Y'
));
$end_date
=
mktime
(
23
,
59
,
59
,
12
,
23
,
date
(
'Y'
));
if
(
$start_date
<=
$time
&&
$time
<=
$end_date
)
if
(
$start_date
<=
$time
&&
$time
<=
$end_date
)
{
{
$user_data
=
$this
->
user_model
->
get_user_data
(
$this
->
user_id
);
$user_data
=
$this
->
user_model
->
get_user_data
(
$this
->
user_id
);
if
(
!
empty
(
$user_data
)
&&
!
empty
(
$user_data
[
'telno'
]))
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
);
$result
=
$this
->
user_model
->
check_is_win
(
$this
->
user_id
,
$user_data
[
'telno'
],
$start_date
,
$end_date
);
}
}
}
}
}
}
...
@@ -1189,48 +1192,48 @@ class User_Wang extends MY_Controller
...
@@ -1189,48 +1192,48 @@ class User_Wang extends MY_Controller
return
$result
;
return
$result
;
}
}
//价格提醒处理ajax
//价格提醒处理ajax
function
price_remind_ajax
(){
function
price_remind_ajax
(){
error_reporting
(
7
);
error_reporting
(
7
);
ini_set
(
"display_errors"
,
true
);
ini_set
(
"display_errors"
,
true
);
$this
->
load
->
model
(
"user_model"
);
$this
->
load
->
model
(
"user_model"
);
$houseid
=
$this
->
input
->
post
(
'houseid'
);
$houseid
=
$this
->
input
->
post
(
'houseid'
);
$type
=
$this
->
input
->
post
(
'type'
);
$type
=
$this
->
input
->
post
(
'type'
);
$flag
=
$this
->
input
->
post
(
'flag'
);
$flag
=
$this
->
input
->
post
(
'flag'
);
$priceRemindNum
=
$this
->
user_model
->
getPriceRemindNum
(
$this
->
user_id
);
$priceRemindNum
=
$this
->
user_model
->
getPriceRemindNum
(
$this
->
user_id
);
if
(
$priceRemindNum
>=
5
&&
$flag
==
1
){
//满4条提示
if
(
$priceRemindNum
>=
5
&&
$flag
==
1
){
//满4条提示
$result
=
3
;
$result
=
3
;
}
else
{
}
else
{
$isChoice
=
$this
->
user_model
->
isCheckPriceRemind
(
$this
->
user_id
,
$houseid
);
$isChoice
=
$this
->
user_model
->
isCheckPriceRemind
(
$this
->
user_id
,
$houseid
);
//var_dump($isChoice);exit();
//var_dump($isChoice);exit();
if
(
is_array
(
$isChoice
)){
if
(
is_array
(
$isChoice
)){
if
(
empty
(
$isChoice
)
&&
$flag
==
1
){
if
(
empty
(
$isChoice
)
&&
$flag
==
1
){
$result
=
$this
->
user_model
->
addPriceRemind
(
$houseid
,
$this
->
user_id
);
$result
=
$this
->
user_model
->
addPriceRemind
(
$houseid
,
$this
->
user_id
);
//echo "444";
//echo "444";
}
elseif
(
$isChoice
[
0
][
'status'
]
==
1
&&
$flag
==
0
){
}
elseif
(
$isChoice
[
0
][
'status'
]
==
1
&&
$flag
==
0
){
$result
=
$this
->
user_model
->
updatePrcieRemind
(
$houseid
,
$this
->
user_id
,
0
);
$result
=
$this
->
user_model
->
updatePrcieRemind
(
$houseid
,
$this
->
user_id
,
0
);
}
elseif
(
$isChoice
[
0
][
'status'
]
==
0
&&
$flag
==
1
){
}
elseif
(
$isChoice
[
0
][
'status'
]
==
0
&&
$flag
==
1
){
$result
=
$this
->
user_model
->
updatePrcieRemind
(
$houseid
,
$this
->
user_id
,
1
);
$result
=
$this
->
user_model
->
updatePrcieRemind
(
$houseid
,
$this
->
user_id
,
1
);
}
}
}
}
}
}
echo
$result
=
$result
?
$result
:
0
;
echo
$result
=
$result
?
$result
:
0
;
}
}
function
test
(){
function
test
(){
teste
();
teste
();
}
}
}
}
\ No newline at end of file
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