index.php 916 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. if (cfr('ACL')) {
  3. $acl = new ACL(true);
  4. //new ACL creation
  5. if (ubRouting::checkPost(array($acl::PROUTE_NEWLOGIN, $acl::PROUTE_NEWCAMID))) {
  6. $creationResult = $acl->create(ubRouting::post($acl::PROUTE_NEWLOGIN), ubRouting::post($acl::PROUTE_NEWCAMID));
  7. if ($creationResult) {
  8. show_error($creationResult);
  9. } else {
  10. ubRouting::nav($acl::URL_ME);
  11. }
  12. }
  13. //ACL deletion
  14. if (ubRouting::checkGet($acl::ROUTE_DEL)) {
  15. $deletionResult = $acl->delete(ubRouting::get($acl::ROUTE_DEL));
  16. if ($deletionResult) {
  17. show_error($deletionResult);
  18. } else {
  19. ubRouting::nav($acl::URL_ME);
  20. }
  21. }
  22. show_window(__('Create new rule'), $acl->renderCreateForm());
  23. show_window(__('Cameras access') . ' (' . __('ACL') . ')', $acl->renderAclList());
  24. } else {
  25. show_error(__('Access denied'));
  26. }