3 This is the ATutor CMAP module page. It allows an admin user
\r
4 to set or edit the URL for the CMAP installation for ATutor.
\r
7 define('AT_INCLUDE_PATH', '../../include/');
\r
8 require (AT_INCLUDE_PATH.'vitals.inc.php');
\r
11 if (isset($_POST['submit'])) {
\r
12 $_POST['uri'] = trim($_POST['uri']);
\r
14 if (!$_POST['uri']){
\r
15 $msg->addError('CMAPURL_ADD_EMPTY');
\r
18 if (!$msg->containsErrors()) {
\r
19 $_POST['uri'] = $addslashes($_POST['uri']);
\r
20 $sql = "REPLACE INTO ".TABLE_PREFIX."config VALUES ('cmap', '$_POST[uri]')";
\r
21 mysql_query($sql, $db);
\r
22 $msg->addFeedback('CMAPURL_ADD_SAVED');
\r
24 header('Location: '.$_SERVER['PHP_SELF']);
\r
29 require (AT_INCLUDE_PATH.'header.inc.php');
\r
33 <?php if ($_config['cmap']): ?>
\r
34 <div class="input-form">
\r
36 <p><?php echo _AT('cmap_admin_text'); ?></p>
\r
41 <div class="input-form">
\r
43 <p><?php echo _AT('cmap_missing_url'); ?></p>
\r
48 <form action="<?php $_SERVER['PHP_SELF']; ?>" method="post">
\r
49 <div class="input-form">
\r
51 <p><label for="uri"><?php echo _AT('cmap_location'); ?></label></p>
\r
53 <input type="text" name="uri" value="<?php echo $_config['cmap']; ?>" id="uri" size="80" style="min-width: 95%;" />
\r
56 <div class="row buttons">
\r
57 <input type="submit" name="submit" value="<?php echo _AT('save'); ?>" />
\r
61 <?php if ($_config['cmap']): ?>
\r
63 <div class="input-form">
\r
64 | <a href="<?php echo $_SERVER['PHP_SELF']; ?>" onclick="window.open('<?php echo $_config['cmap']; ?>','cmapwin','width=800,height=720,scrollbars=yes, resizable=yes'); return false"><?php echo _AT('cmap_own_window'); ?></a>
\r
65 | <a href="<?php echo $_SERVER['PHP_SELF']; ?>" onclick="window.open('http://cmap.ihmc.us/Support/Help/','cmapwin','width=800,height=720,scrollbars=yes, resizable=yes'); return false"><?php echo _AT('cmap_help_window'); ?></a>
\r
68 <iframe name="cmap" id="cmap" title="ePresence" scrolling="yes" src="<?php echo $_config['cmap']; ?>" height="800" width="90%" align="center" style="border:thin white solid; align:center;"></iframe>
\r
71 <p><?php echo _AT('cmap_missing_url'); ?></p>
\r
76 <?php require (AT_INCLUDE_PATH.'footer.inc.php'); ?>