embed.php 734 B

1234567891011121314151617181920212223242526
  1. <?php
  2. require_once '../inc/global.inc.php';
  3. $type = $_REQUEST['type'];
  4. $src = Security::remove_XSS($_REQUEST['src']);
  5. if ($type == 'youtube') {
  6. $src = 'http://www.youtube.com/embed/'.$src;
  7. ?>
  8. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  9. <html>
  10. <head>
  11. <title></title>
  12. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  13. </head>
  14. <body>
  15. <div id="content" style="width: 700px ;margin-left:auto; margin-right:auto;">
  16. <br />
  17. <iframe class="youtube-player" type="text/html" width="640" height="385" src="<?php echo $src; ?>" frameborder="0">
  18. </iframe>
  19. </div>
  20. </body>
  21. </html>
  22. <?php
  23. } else {
  24. api_not_allowed();
  25. }