列表调用发布人信息是否显示标签

日期: 2021-11-29 22:08:53 人气: -

<?

    $page=intval(getstr("page","1"));

  $pagesize=18;

  if(isset($TEMP_SET[19])){ $pagesize=intval($TEMP_SET[19]["value"]); }

  

$query=$db->page($LG->table("article")." a",$page,"id","title,she,aid,uid,pic,addtime,descriptions,tourl,content ",$pagesize,"class like '".$CN."%' ");  

  $i=0;

  while($rs=mysql_fetch_array($query))

   {

$id = $rs['uid'];


                $us = $db->query("select * from ".$LG->table("user")." where id='".$id ."'");

$user = $db->fetchrow($us);

$i++;

 

  ?>


   <div class="user_wrapper">

      <div class="user_face">  <a href="/blog-<? echo $user['id']?>.html" class="face_img" > <img  src="<? echo $user['img']?>" onerror="this.src='https://t1.jyimg.com/72/5a/dfc5622c2a247b28fcb198bc6423/date_72dfc5622c2a247b28fcb198bc64235a_a_1a.jpg'" style="width: 70px;height: 70px;"/></a> <? echo $user["name"] ? $user["name"] : '官网提供';?>  </div>

      <div class="user_detail">

        <h3 class="user_title"><a href="<? echo getarurl($rs["aid"]);?>" class="face_img" ><? echo $rs["title"];?></a></h3>

        <div class="user_data"><? echo date("Y-m-d",$rs["addtime"]);?></div>

        <div class="user_info"><?php echo mb_substr($rs['descriptions'],0,252);?></div>

      </div>

    </div>

<? }?>