时间:2021-07-21人气:-
/*HEJIE_MODIFY文章作者信息 @www.68cpu.com*/$query = "SELECT * FROM jcode_member WHERE `mid` = ".$this->Fields['mid'];$authorInfo = $this->dsql->GetOne($query);$this->Fields['authoranme']=$authorInfo['uname'];$this->Fields['authorface']=$authorInfo['face'];if(empty($this->Fields['authorface'])){$this->Fields['authorface']=($this->authorInfo['sex']=='女')? '../member/templets/images/dfgirl.png' : '../member/templets/images/dfboy.png';}$this->Fields['authorface']="<a href='".$GLOBALS['cfg_basehost']."/member/index.php?uid=".$authorInfo['userid']."'><img width='32' height='32' src='".$this->Fields['authorface']."' /></a>";$this->Fields['authoremail']=$authorInfo['email'];这段代码的作用就是根据文章的作者id查询作者信息,其中当然包括头像。
{dede:field.authorface/}