index.php 821B

123456789101112131415161718192021222324252627
  1. <?php
  2. require_once("lib/limonade.php");
  3. dispatch_get("/", "login");
  4. dispatch_get("/data", "data");
  5. dispatch_get("/data/extract", "data_extract");
  6. dispatch_get("/document", "document");
  7. dispatch_get("/promo", "promo");
  8. dispatch_post("/", "check_login");
  9. dispatch_post("/document", "add_document");
  10. dispatch_post("/promo", "add_promo");
  11. dispatch_put("/data/:dataid", "alter_data");
  12. dispatch_put("/document/:documentid", "alter_document");
  13. dispatch_put("/promo/:promoid", "alter_promo");
  14. dispatch_delete("/document/:fileid", "delete_document");
  15. dispatch_delete("/promo/:promoid", "delete_promo");
  16. try {
  17. run();
  18. }
  19. catch (Exception $e) {
  20. error_log($e);
  21. }