index.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. if (cfr('ARCHIVE')) {
  3. $archive = new Archive();
  4. //neura search ajax background
  5. if ($ubillingConfig->getAlterParam('NEURAL_ENABLED')) {
  6. if (ubRouting::checkGet(NeuralObjSearch::ROUTE_CHAN_DETECT)) {
  7. $acl = new ACL();
  8. if ($acl->isMyChannel(ubRouting::get(NeuralObjSearch::ROUTE_CHAN_DETECT))) {
  9. $neuraObj = new NeuralObjSearch();
  10. $neuraObj->renderObjectDetector(ubRouting::get(NeuralObjSearch::ROUTE_CHAN_DETECT), ubRouting::get(NeuralObjSearch::ROUTE_DATE));
  11. } else {
  12. $messages = new UbillingMessageHelper();
  13. die($messages->getStyledMessage(__('Access denied'), 'error') . wf_delimiter());
  14. }
  15. }
  16. }
  17. //archive lookup by channel ID
  18. if (ubRouting::checkGet($archive::ROUTE_VIEW)) {
  19. $channelId = ubRouting::get($archive::ROUTE_VIEW, 'gigasafe');
  20. $acl = new ACL();
  21. if ($acl->isMyChannel($channelId)) {
  22. $channelName = $archive->getCameraComment($channelId);
  23. show_window(__('View') . ': ' . $channelName, $archive->renderLookup($channelId));
  24. } else {
  25. show_error(__('Access denied'));
  26. }
  27. }
  28. //cameras list
  29. if (!ubRouting::checkGet($archive::ROUTE_VIEW)) {
  30. show_window(__('Video from cameras'), $archive->renderCamerasList());
  31. wr_Stats();
  32. }
  33. } else {
  34. show_error(__('Access denied'));
  35. }