changed git call from https to git readonly
[atutor.git] / mods / openmeetings / index.php
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: index.php 7575 2008-06-02 18:17:14Z hwong $
14
15 define('AT_INCLUDE_PATH', '../../include/');
16 require (AT_INCLUDE_PATH.'vitals.inc.php');
17 require ('lib/openmeetings.class.php');
18 require ('lib/openmeetings.inc.php');
19
20 //css
21 $_custom_css = $_base_path . 'mods/openmeetings/module.css'; // use a custom stylesheet
22
23 //local variables
24 $course_id = $_SESSION['course_id'];
25
26 // Check access
27 checkAccess($course_id);
28
29 //Header begins here
30 require (AT_INCLUDE_PATH.'header.inc.php');
31
32 //Initiate Openmeeting
33 $om_obj = new Openmeetings($course_id, $_SESSION['member_id']);
34
35 //Login
36 $om_obj->om_login();
37
38 //Handles form actions
39 if (isset($_GET['delete']) && isset($_GET['room_id'])){
40         //have to makesure the user really do have permission over the paramater room id
41         $_GET['room_id'] = intval($_GET['room_id']);
42         if ($om_obj->isMine($_GET['room_id'])){
43                 $om_obj->om_deleteRoom($_GET['room_id']);
44                 $msg->addFeedback('OPENMEETINGS_DELETE_SUCEEDED');
45         } else {
46                 $msg->addError('OPENMEETINGS_DELETE_FAILED');
47         }
48 }
49
50 //Course meetings
51 include_once('html/course_meeting.inc.php');
52
53 //Group meetings
54 include_once('html/group_meeting.inc.php');
55
56 require (AT_INCLUDE_PATH.'footer.inc.php');
57 ?>