/view_meetings.php

https://github.com/atutor/openmeetings · PHP · 60 lines · 28 code · 11 blank · 21 comment · 7 complexity · 097f3a9797075d9c78fdc2d798b88187 MD5 · raw file

  1. <?php
  2. /************************************************************************/
  3. /* ATutor */
  4. /************************************************************************/
  5. /* Copyright (c) 2002-2008 by Greg Gay, Cindy Qi Li, Harris Wong */
  6. /* Adaptive Technology Resource Centre / University of Toronto */
  7. /* http://atutor.ca */
  8. /* */
  9. /* This program is free software. You can redistribute it and/or */
  10. /* modify it under the terms of the GNU General Public License */
  11. /* as published by the Free Software Foundation. */
  12. /************************************************************************/
  13. // $Id: view_meetings.php 7575 2008-06-02 18:17:14Z hwong $
  14. define('AT_INCLUDE_PATH', '../../include/');
  15. require (AT_INCLUDE_PATH.'vitals.inc.php');
  16. //require ('openmeetings.class.php');
  17. //$_custom_css = $_base_path . 'mods/openmeetings/module.css'; // use a custom stylesheet
  18. //local variables
  19. $course_id = $_SESSION['course_id'];
  20. /*
  21. * Check access
  22. * Disallowing improper accesses from a GET request
  23. */
  24. $sql = "SELECT `access` FROM ".TABLE_PREFIX."courses WHERE course_id=$course_id";
  25. $result = mysql_query($sql, $db);
  26. $course_info = mysql_fetch_assoc($result);
  27. if ($course_info['access']!='public' && ($_SESSION['enroll'] == AT_ENROLL_NO || $_SESSION['enroll'] == AT_ENROLL_ALUMNUS)) {
  28. require(AT_INCLUDE_PATH.'header.inc.php');
  29. $msg->printInfos('NOT_ENROLLED');
  30. require(AT_INCLUDE_PATH.'footer.inc.php');
  31. exit;
  32. }
  33. if (!isset($_config['openmeetings_username']) || !isset($_config['openmeetings_userpass'])){
  34. require(AT_INCLUDE_PATH.'header.inc.php');
  35. echo 'Contact admin plz';
  36. //Please contact your administrator, om needs to be setup.
  37. require(AT_INCLUDE_PATH.'footer.inc.php');
  38. exit;
  39. }
  40. //Header begins here
  41. require (AT_INCLUDE_PATH.'header.inc.php');
  42. $_GET['room_id'] = abs($_GET['room_id']);
  43. $_GET['sid'] = addslashes($_GET['sid']);
  44. ?>
  45. <div>
  46. <a href="<?php echo $_SERVER['PHP_SELF']; ?>" onclick="window.open('<?php echo $_config['openmeetings_location']; ?>/main.lzx.lzr=swf8.swf?roomid=<?php echo $_GET['room_id']; ?>&sid=<?php echo $_GET['sid'];?>','marratechwin','width=800,height=720,scrollbars=yes, resizable=yes'); return false"><?php echo _AT('openmeetings_own_window'); ?></a> </li>
  47. <iframe name="openmeetings" id="openmeetings" title="Openmeetings" frameborder="1" scrolling="auto" src="<?php echo $_config['openmeetings_location']; ?>/main.lzx.lzr=swf8.swf?roomid=<?php echo $_GET['room_id']; ?>&sid=<?php echo $_GET['sid'];?>" height="700" width="90%" align="center" style="border:thin white solid; align:center;" allowautotransparency="true"></iframe>
  48. </div>
  49. <?php require (AT_INCLUDE_PATH.'footer.inc.php'); ?>