list.php 718 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. //文章列表
  3. require_once "../config.php";
  4. require_once "../public/_pdo.php";
  5. require_once '../public/function.php';
  6. require_once '../ucenter/function.php';
  7. PDO_Connect(""._FILE_DB_USER_ARTICLE_);
  8. if(isset($_GET["userid"])){
  9. $userid=$_GET["userid"];
  10. $query = "SELECT * from article where owner = ? and status <> 0 order by modify_time DESC";
  11. $Fetch = PDO_FetchAll($query,array($userid));
  12. if($Fetch){
  13. /*
  14. $userinfo = new UserInfo();
  15. $user = $userinfo->getName($Fetch["owner"]);
  16. $Fetch["username"] = $user;
  17. */
  18. echo json_encode($Fetch, JSON_UNESCAPED_UNICODE);
  19. exit;
  20. }
  21. }
  22. else{
  23. }
  24. echo json_encode(array(), JSON_UNESCAPED_UNICODE);
  25. ?>