username=$username; $this->password=$password; $this->usermail=$usermail; error_reporting('E_ALL ^ E_NOTICE'); } function register(){ return uc_user_register($this->username,md5($this->password),$this->usermail); } function get_user($userid='',$type=0){ return uc_user_get($userid,$type); } function checkename(){ $checkuser =uc_check_username($this->username); if($checkuser==1){ return 1; }elseif($checkuser==-1){ return -1; }else{ return -3; } } function checkemail(){ $emailcount=uc_check_email($this->usermail); if($emailcount>0){ return 1; }elseif($emailcount==-3){ return -4; }else{ return -6; } } function logout(){ return uc_user_synlogout(); } function user_login(){ $userarr =uc_user_get($this->username,0); return uc_user_check($userarr['uid'],md5(UC_KEY.md5($this->password))); } function login($userid){ $user_login=uc_user_login($userid,md5($this->password),1); return $user_login['synlogin']; } function getavatar($userid,$type){ $userarr =uc_user_get($userid,1); $usericonarr=explode('|',$userarr['avatar']); if($usericonarr[0]=='none.gif' || empty($usericonarr[0]) || $usericonarr[1]==1){ if($type){ $avatar=''; }else{ $avatar=''; } }else{ if($usericonarr[1]==2){ $avatar=''; }else{ if($type){ $avatar=''; }else{ $avatar=''; } } } return $avatar; } function avatar($userid){ return '

[点击同步修改头像]

'; } function send_sms($fromuid=0,$msgto=0,$subject='',$message=''){ $user=$this->GetMysqlOne('username'," ".$this->GetTable('member')." WHERE uid='$fromuid'"); return uc_msg_send($fromuid,$user['username'],$msgto,$subject,$message); } function credit_add($uid,$point){ $credit=array("$uid"=> array('credit'=>$point)); return uc_credit_add($credit); } function user_edit($newpassword='',$ignoreoldpw=0){ $userarr=uc_user_get($this->username,0); $checkedit=uc_user_edit($userarr['uid'],$this->username,md5($newpassword),$this->usermail); if($checkedit==1){ return 1; }else{ return -1; } } function get_creditsettings(){ return false; } function feed_add($feed){ return false; } } ?>