Advertisement
keysle

index.php for my video modal

Sep 18th, 2012
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. <?php
  2. /*
  3. final product here
  4. http://k8r.us/test4
  5. */
  6. class Video{
  7. var $mp4Video;
  8. var $ogvVideo;
  9.  
  10. function setMp4Video($str){$this->mp4Video = $str;}
  11.  
  12. function setOgvVideo($str){$this->ogvVideo = $str;}
  13.  
  14. function getMp4Video(){return $this->mp4Video;}
  15.  
  16. function getOgvVideo(){return $this->ogvVideo;}
  17. }
  18.  
  19. $video1 = new Video;
  20. $video1->setMp4Video("test-video.mp4");
  21. $video1->setOgvVideo("test-video.ogv");
  22.  
  23. $video2 = new Video;
  24. $video2->setMp4Video("test2-video.mp4");
  25. $video2->setOgvVideo("test2-video.ogv");
  26.  
  27. $video3 = new Video;
  28. $video3->setMp4Video("test3-video.mp4");
  29. $video3->setOgvVideo("test3-video.ogv");
  30.  
  31. $videos = array($video1,$video2,$video3);
  32.  
  33. ?>
  34. <!DOCTYPE html>
  35. <html>
  36. <head>
  37. <script type="text/javascript" src="http://code.jquery.com/jquery-1.8.1.min.js"></script>
  38. <?php include('plugins/k8r-modal/pack.html'); ?>
  39. <script src="plugins/flowplayer/flowplayer-3.2.11.min.js"></script>
  40. </head>
  41. <body>
  42. <?php
  43.  
  44. $limit = count($videos);
  45. foreach($videos as $key => $video){
  46. ?><span class="k8r_modalCaller" mpx="<?= $video->getMp4Video(); ?>" ogv="<?= $video->getOgvVideo(); ?>">Video Bringer <?= $key ?></span><br/><?php
  47. }
  48.  
  49. ?>
  50. </body>
  51. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement