table_article.php 786 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. //header('Content-type: application/json; charset=utf8');
  3. require_once "../config.php";
  4. require_once "../sync/function.php";
  5. $input = (object) [
  6. "database" => _FILE_DB_USER_ARTICLE_,
  7. "table" => "article",
  8. "uuid" => "id",
  9. "sync_id" => ["id"],
  10. "where"=>"",
  11. "modify_time" => "modify_time",
  12. "receive_time" => "receive_time",
  13. "insert" => [
  14. 'id',
  15. 'title',
  16. 'subtitle',
  17. 'summary',
  18. 'content',
  19. 'tag',
  20. 'owner',
  21. 'setting',
  22. 'status',
  23. 'create_time',
  24. 'modify_time',
  25. 'receive_time'
  26. ],
  27. "update" => [
  28. 'title',
  29. 'subtitle',
  30. 'summary',
  31. 'content',
  32. 'tag',
  33. 'owner',
  34. 'setting',
  35. 'status',
  36. 'modify_time',
  37. 'receive_time'
  38. ]
  39. ];
  40. $result = do_sync($input);
  41. echo json_encode($result, JSON_UNESCAPED_UNICODE);
  42. ?>