changed git call from https to git readonly
[atutor.git] / mods / plog / index_instructor.php
1 <?php\r
2 /*\r
3 This is the main ATutor webcalendar module page. It allows users to access\r
4 the course and personal calendars through courses that have the calendar enabled\r
5 */\r
6 global $webcalendar_url_db;\r
7 define('AT_INCLUDE_PATH', '../../include/');\r
8 require (AT_INCLUDE_PATH.'vitals.inc.php');\r
9 \r
10 // switch the comments in the two lines to switch between LifeType 1.0.2 and 1.1\r
11 //require ('sync_plog11.php');\r
12 require ('sync_plog.php');\r
13 \r
14 \r
15 //////////\r
16 //Check to see if the url to webcalendar exists in the db \r
17 $sql = 'SELECT * from '.TABLE_PREFIX.'config WHERE name="plog"';\r
18 $result = mysql_query($sql, $db);\r
19 \r
20 while($row = mysql_fetch_array($result)){\r
21         $plog_url_db = $row[1];\r
22 }\r
23 \r
24 require (AT_INCLUDE_PATH.'header.inc.php');\r
25 \r
26 ?>\r
27                 <div class="input-form">\r
28                 <div class="row">\r
29                         <p><?php echo _AT('plog_sync'); ?></p>\r
30                         <p>     <strong><?php echo $plog_sync; ?> </strong>                                                                     </p>\r
31                         <div class="row buttons">\r
32                         <form action="<?php  $_SERVER['PHP_SELF']; ?>" method="post">\r
33                         <input type="hidden" name="plog_sync" value="1">\r
34                         <input type="submit" value="<?php echo _AT('plog_sync_button'); ?>" style="botton">\r
35                         </form>\r
36                         </div>\r
37                 </div>\r
38                 </div>\r
39 \r
40 \r
41 <?php\r
42 // Display the appropriate pLog screen: open in a new window, pLog login, the pLog summary screen, course blog\r
43 // Comment out or remove the summary link below if you want to hide the Public blog from users.\r
44 ?>\r
45 <div id="topnavlistcontainer">\r
46 <ul id="topnavlist">\r
47 <li><a href="<?php echo $_SERVER['PHP_SELF']; ?>" onclick="window.open('<?php echo $plog_url_db; ?>index.php?blogId=<?php echo $_SESSION['course_id']; ?>','plogwin','width=800,height=720,scrollbars=yes, resizable=yes'); return false"><?php echo  _AT('plog_own_window'); ?></a> </li>\r
48 <li><a href="<?php echo $_SERVER['PHP_SELF']; ?>?enter_blog=1;blogId=<?php echo $_SESSION['course_id']; ?>"> <?php echo  _AT('plog_login'); ?></a> </li>\r
49 <li><a href="<?php echo $_SERVER['PHP_SELF']; ?>?summary_blog=1;blogId=<?php echo $_SESSION['course_id']; ?>"> <?php echo  _AT('plog_summary'); ?></a> </li>\r
50 <li><a href="<?php echo $_SERVER['PHP_SELF']; ?>?course_blog=1;blogId=<?php echo $_SESSION['course_id']; ?>"> <?php echo  _AT('plog_course'); ?></a></li>\r
51 </ul>\r
52 </div>\r
53 <?php\r
54 \r
55 if($plog_url_db == ''){\r
56         $msg->addInfo('PLOG_URL_ADD_REQUIRED');\r
57 }elseif ($_GET['enter_blog']){\r
58 ?>\r
59         <iframe name="plog" id="plog" title="pLog" scrolling="yes" src="<?php echo $plog_url_db; ?>admin.php?blogId=<?php echo $_SESSION['course_id']; ?>" height="800" width="90%" align="center" style="border:thin white solid; align:center;"></iframe>\r
60 <?php \r
61 }elseif ($_GET['summary_blog']){\r
62 ?>\r
63         <iframe name="plog" id="plog" title="pLog" scrolling="yes" src="<?php echo $plog_url_db; ?>summary.php?blogId=<?php echo $_SESSION['course_id']; ?>" height="800" width="90%" align="center" style="border:thin white solid; align:center;"></iframe>\r
64 <?php \r
65 }elseif ($_GET['course_blog']){\r
66 ?>\r
67         <iframe name="plog" id="plog" title="pLog" scrolling="yes" src="<?php echo $plog_url_db; ?>index.php?blogId=<?php echo $_SESSION['course_id']; ?>" height="800" width="90%" align="center" style="border:thin white solid; align:center;"></iframe>\r
68 <?php \r
69 }else{ ?>\r
70         <iframe name="plog" id="plog" title="pLog" scrolling="yes" src="<?php echo $plog_url_db; ?>index.php?blogId=<?php echo $_SESSION['course_id']; ?>" height="800" width="90%" align="center" style="border:thin white solid; align:center;"></iframe>\r
71 <?php\r
72 }\r
73 \r
74  require (AT_INCLUDE_PATH.'footer.inc.php'); \r
75 ?>