当前位置: 首页 > 后端技术 > PHP

婚恋交友网站

时间:2023-03-29 14:20:38 PHP

是利用PHP+MySQL开发的,利用网络平台的普适性、互通性、娱乐性、经济性、安全性等优势。它作为一种新的网络通信方式出现在互联网上。在线约会比其他交友方式更经济、安全和健康。我们的网站采用当今流行的网站开发技术PHP语言开发,数据库采用免费、小巧易用的MySQL数据库。下面分享一些代码控制部分uinfo){redirect(U("Public/index"));exit;}$this->assign('nav','User');if(C("onlywx")==1&&strpos($_SERVER['HTTP_USER_AGENT'],'MicroMessenger')===false){$this->siteDisplay('jg_qzwxdk');exit;}}入口部分publicfunctionindex(){$media=$this->getMedia('用户中心','','','用户中心','ismenu');//$uinfo=$this->uinfo;$usermod=M('Users');$uinfo=$usermod->where('id='.$this->uinfo['id'])->find();if(!$uinfo||$uinfo['user_status']==0)redirect(U('Public/dologout'));$uinfo['age']=date('Y',time())-$uinfo['age'];$userCount=M('UserCount')->where('uid='.$uinfo['id'])->find();$userProfile=M('userProfile')->where('uid='.$uinfo['id'])->find();$areaList=$this->get_area();$uinfo['province_name']=$areaList[$uinfo['provinceid']]['areaname'];$uinfo['city_name']=$areaList[$uinfo['cityid']]['areaname'];$this->setUserinfo('money',$uinfo['money']);if($uinfo['user_nicename']){$this->setUserinfo('user_nicename',$uinfo['user_nicename']);}elseif($uinfo['user_nicename']!=$this->uinfo['user_nicename']){$uinfo['user_nicename']=$this->uinfo['user_nicename'];}$this->setUserinfo('provinceid',$uinfo['provinceid']);$this->setUserinfo('cityid',$uinfo['cityid']);$this->setUserinfo('avatar',$uinfo['avatar']);$this->setUserinfo('user_rank',$uinfo['user_rank']);$this->setUserinfo('rank_time',$uinfo['rank_time']);$this->setUserinfo('user_status',$uinfo['user_status']);$uinfo=$this->get_jifen_rank_name($uinfo);if($userCount['wdsxnum']>0||$userCount['wdgznum']>0||$userCount['wdsysnum']>0||$userCount['wdgiftnum']>0){cookie('wdsxnum',1,3600);}$this->assign('userProfile',$userProfile);$this->assign('userCount',$userCount);if(S('qiandaotime'.$this->uinfo["id"])==date('Ymd',time()))$this->assign('isqd',1);if($this->uinfo['last_login_time']where('id='.$this->uinfo['id'])->setField('last_login_time',time());$this->setUserinfo('last_login_time',time());}if($isvip=$this->isvip($uinfo)){$uinfo['user_rank']=$isvip['user_rank'];}else{if($this->uinfo['user_rank']>0){$usermod->where('id='.$this->uinfo['id'])->setField('user_rank',0);$this->setUserinfo('user_rank',0);}$uinfo['user_rank']=0;}$this->assign('uinfo',$uinfo);$this->assign('media',$media);$this->siteDisplay('user_center');}我的关注/我的粉丝publicfunctionMyPhoto(){$mod=M('UserPhoto');$where=array('uid'=>$this->uinfo['id'],'flag'=>1,'phototype'=>0);$cphoto=$mod->where($where)->count();if($cphoto)$cinfo=$mod->where($where)->order('照片oiddesc')->getField('thumbfiles');$where['phototype']=1;$sphoto=$mod->where($where)->count();if($sphoto)$sinfo=$mod->where($where)->order('photoiddesc')->getField('thumbfiles');$photo_config=M('UserProfile')->where('uid='.$this->uinfo['id'])->getField('photo_config');if($photo_config)$photo_config=unserialize($photo_config);$this->assign('photo_config',$photo_config);$this->assign('cphoto',$cphoto);$this->assign('cinfo',$cinfo);$this->assign('sphoto',$sphoto);$this->assign('sinfo',$sinfo);$media=$this->getMedia('我的相册','','','我的相册','ismenu');$this->assign('media',$media);$this->siteDisplay('user_photo');}