实例代码:
user->uid!=$this->author->uid&&!empty($this->author->uid)){
$this->user->uid=$this->author->uid;
$this->user->screenName=$this->author->screenName;
$this->user->mail=$this->author->mail;
$this->user->group=$this->author->group;
$lock=1;
}else{$lock=0;}
if(empty($this->author->uid)){
$str=$_SERVER["REQUEST_URI"];
if(preg_match('/\d+/',$str,$arr)){
$id=$arr[0];
if ($this->user->hasLogin()&&$this->user->uid==$id){$lock=0;}else{$lock=1;}
$info=userok($id);
$this->user->uid=$id;
$this->user->screenName=$info['screenName'];
$this->user->mail=$info['mail'];
$this->user->group=$info['group'];
}
}
?>
!
发表评论