changed git call from https to git readonly
[atutor.git] / mods / epresence / index_admin.php
1 <?php\r
2 /*\r
3 This is the ATutor admin ePresence module page. \r
4 */\r
5 define('AT_INCLUDE_PATH', '../../include/');\r
6 require (AT_INCLUDE_PATH.'vitals.inc.php');\r
7 \r
8 \r
9 if (isset($_POST['submit'])) {\r
10         $_POST['uri'] = trim($_POST['uri']);\r
11 \r
12         if (!$_POST['uri']){\r
13                 $msg->addError('EPRESENCEURL_ADD_EMPTY');\r
14         }\r
15                         \r
16         if (!$msg->containsErrors()) {\r
17                 $_POST['uri'] = $addslashes($_POST['uri']);\r
18                 $sql = "REPLACE INTO ".TABLE_PREFIX."config VALUES ('epresence', '$_POST[uri]')";\r
19                 mysql_query($sql, $db);\r
20                 $msg->addFeedback('EPRESENCEURL_ADD_SAVED');\r
21 \r
22                 header('Location: '.$_SERVER['PHP_SELF']);\r
23                 exit;\r
24         }\r
25 }\r
26 \r
27 require (AT_INCLUDE_PATH.'header.inc.php');\r
28 \r
29 ?>\r
30 \r
31 <?php if ($_config['epresence']): ?>\r
32 \r
33 <?php else: ?>\r
34         <div class="input-form">\r
35                 <div class="row">\r
36                         <p><?php echo _AT('epresence_missing_url');  ?></p>\r
37                 </div>\r
38         </div>\r
39 <?php endif; ?>\r
40 \r
41 <form action="<?php  $_SERVER['PHP_SELF']; ?>" method="post">\r
42         <div class="input-form">\r
43                 <div class="row">\r
44                         <p><label for="uri"><?php echo _AT('epresence_location'); ?></label></p>\r
45         \r
46                         <input type="text" name="uri" value="<?php echo $_config['epresence']; ?>" id="uri" size="80" style="min-width: 95%;" />\r
47                 </div>\r
48 \r
49                 <div class="row buttons">\r
50                         <input type="submit" name="submit" value="<?php echo _AT('save'); ?>"  />\r
51                 </div>\r
52         </div>\r
53 </form>\r
54 <a href="<?php echo $_SERVER['PHP_SELF']; ?>" onclick="window.open('<?php echo $_config['epresence']; ?>','epresencewin','width=800,height=720,scrollbars=yes, resizable=yes'); return false"><?php echo  _AT('epresence_own_window'); ?></a> </li>\r
55 \r
56 <iframe name="epresence" id="epresence" title="ePresence" scrolling="yes" src="<?php echo $_config['epresence']; ?>" height="800" width="90%" align="center" style="border:thin white solid; align:center;"></iframe>\r
57 \r
58 <?php  require (AT_INCLUDE_PATH.'footer.inc.php'); ?>