FaceController.class.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. namespace Home\Controller;
  3. use Think\Controller;
  4. class FaceController extends ComController {
  5. public $owner_name;
  6. public function index()
  7. {
  8. $company=$_GET['companyid'];
  9. $device=M("face")->where("company=".$company)->select();
  10. $this->assign('device',$device);
  11. $this->display('Face/index');
  12. }
  13. public function dev_list()
  14. {
  15. $face_id=$_GET['id'];
  16. $device=M("video")->where("face_id=".$face_id)->select();
  17. $this->assign('device',$device);
  18. $this->display('Face/list');
  19. }
  20. public function video()
  21. {
  22. $id=$_GET['id'];
  23. $video=M("video")->where("id=".$id)->find();
  24. switch ($video['maliu']) {
  25. case 01:
  26. $video['malius']="主码流";
  27. break;
  28. case 02:
  29. $video['malius']="子码流";
  30. break;
  31. case 03:
  32. $video['malius']="第三码流";
  33. break;
  34. }
  35. $this->assign('video',$video);
  36. $this->display('Face/video');
  37. }
  38. }