list.php 732 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. //查询term字典
  3. require_once "../path.php";
  4. require_once "../public/_pdo.php";
  5. require_once '../public/function.php';
  6. require_once '../ucenter/function.php';
  7. if(isset($_GET["userid"])){
  8. PDO_Connect("sqlite:"._FILE_DB_USER_ARTICLE_);
  9. $userid=$_GET["userid"];
  10. $query = "SELECT * from article where owner = ".$PDO->quote($userid)." and status <> 0 order by modify_time DESC";
  11. $Fetch = PDO_FetchAll($query);
  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. echo json_encode(array(), JSON_UNESCAPED_UNICODE);
  23. ?>