index.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * @author Open Mind
  4. * @date 09/04/2018
  5. * @time 11:33
  6. */
  7. //error_reporting(E_ALL);
  8. require 'vendor/autoload.php';
  9. $f3 = \Base::instance();
  10. $config = gzuncompress(base64_decode(file_get_contents("config.bin")));
  11. $f3->config('config.ini', true);
  12. $f3->config('labels.ini', true);
  13. $f3->set('DB',
  14. new \DB\SQL(
  15. $f3->get('DB'),
  16. $f3->get('dbuser'),
  17. $f3->get('dbpass'),
  18. array(\PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION, \PDO::ATTR_PERSISTENT => TRUE))
  19. );
  20. // Pages
  21. $f3->route('GET /', "Modules\Pages->Login", $f3->get('CACHE_TTL'));
  22. $f3->route('GET /homemenu', "Modules\Pages->HomeMenu", $f3->get('CACHE_TTL'));
  23. $f3->route('GET|POST /pick2light/@step', "Modules\Pages->Pick2Light", $f3->get('CACHE_TTL'));
  24. $f3->route("GET|POST /bind/@step", 'Modules\Pages->Bind', $f3->get('CACHE_TTL'));
  25. $f3->route('GET /elencodistinta', "Modules\Pages->ElencoDistinta", $f3->get('CACHE_TTL'));
  26. // Services
  27. $f3->route("POST /login", 'Modules\BaseController->Login');
  28. $f3->route("GET /logout", 'Modules\BaseController->Logout');
  29. $f3->run();