Commit c30266f4 authored by fangliyan's avatar fangliyan

Merge branch 'refs/heads/subscribe2.0' into release_dev_107

# Conflicts:
#	esf_core/config/database.php
parents f06fd4ff 08ba82ed
# Created by .ignore support plugin (hsz.mobi)
.idea
\ No newline at end of file
......@@ -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);
}
......
......@@ -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'){
......
......@@ -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::TYPE3);
$data['telno_config'] = $this->tel_model->getTelInfoByType(tel_model::TYPE2);
$data['address_config'] = isset($this->address[GB_CITY]) ? $this->address[GB_CITY] : '';
$this->load->view('order_invoice',$data);
......
This diff is collapsed.
......@@ -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');
......
......@@ -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_PHONE_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_PWD_URL;?>" class="innerLink">修改手机号码</a> </div>
<div class="user-nav-mod <?php if($conf_where=='edit_password') echo 'on';?>"> <a href="<?php echo GB_EDIT_PWD_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_PHONE_URL;?>" class="innerLink">修改手机号码</a> </div>
</div>
</div>
......
This diff is collapsed.
......@@ -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
......
......@@ -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';
}
}
......
......@@ -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')
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment