yj.inc.php 831 B

12345678910111213141516171819202122
  1. <?php
  2. global $_GPC, $_W;
  3. $GLOBALS['frames'] = $this->getMainMenu();
  4. $sql="select a.* ,b.name,b.img from " . tablename("zhtc_fxuser") . " a" . " left join " . tablename("zhtc_user") . " b on b.id=a.fx_user WHERE a.user_id=:user_id order by id DESC";
  5. $res=pdo_fetchall($sql,array(':user_id'=>$_GPC['user_id']));
  6. $res2=array();
  7. for($i=0;$i<count($res);$i++){
  8. $sql2="select a.* ,b.name,b.img from " . tablename("zhtc_fxuser") . " a" . " left join " . tablename("zhtc_user") . " b on b.id=a.fx_user WHERE a.user_id=:user_id order by id DESC";
  9. $res3=pdo_fetchall($sql2,array(':user_id'=>$res[$i]['fx_user']));
  10. $res2[]=$res3;
  11. }
  12. $res4=array();
  13. for($k=0;$k<count($res2);$k++){
  14. for($j=0;$j<count($res2[$k]);$j++){
  15. $res4[]=$res2[$k][$j];
  16. }
  17. }
  18. $data['one']=$res;
  19. $data['two']=$res4;
  20. include $this->template('web/yj');