3 This is the ATutor CCNet admin module page. It allows an admin user
\r
4 to set or edit the URL for the CCNet installation for ATutor, and
\r
5 it includes the launcher, which opens CCNet in a new window
\r
8 define('AT_INCLUDE_PATH', '../../include/');
\r
9 require (AT_INCLUDE_PATH.'vitals.inc.php');
\r
12 if (isset($_POST['submit'])) {
\r
13 $_POST['uri'] = trim($_POST['uri']);
\r
15 if (!$_POST['uri']){
\r
16 $msg->addError('CCNETURL_ADD_EMPTY');
\r
19 if (!$msg->containsErrors()) {
\r
20 $_POST['uri'] = $addslashes($_POST['uri']);
\r
21 $sql = "REPLACE INTO ".TABLE_PREFIX."config VALUES ('ccnet', '$_POST[uri]')";
\r
22 mysql_query($sql, $db);
\r
23 $msg->addFeedback('CCNETURL_ADD_SAVED');
\r
25 header('Location: '.$_SERVER['PHP_SELF']);
\r
30 require (AT_INCLUDE_PATH.'header.inc.php');
\r
34 <?php if ($_config['ccnet']): ?>
\r
35 <div class="input-form">
\r
37 <p><?php echo _AT('ccnet_text'); ?></p>
\r
39 <div class="row buttons">
\r
40 <form action="" method="get">
\r
41 <input type="submit" value="<?php echo _AT('ccnet_open'); ?>" onclick="window.open('<?php echo $_config['ccnet']; ?>','mywindow','width=800,height=600,scrollbars=yes, resizable=yes', 'false'); return false;" />
\r
46 <div class="input-form">
\r
48 <p><?php echo _AT('ccnet_missing_url'); ?></p>
\r
53 <form action="<?php $_SERVER['PHP_SELF']; ?>" method="post">
\r
54 <div class="input-form">
\r
56 <p><label for="uri"><?php echo _AT('ccnet_location'); ?></label></p>
\r
58 <input type="text" name="uri" value="<?php echo $_config['ccnet']; ?>" id="uri" size="80" style="min-width: 95%;" />
\r
61 <div class="row buttons">
\r
62 <input type="submit" name="submit" value="<?php echo _AT('save'); ?>" />
\r
67 <?php require (AT_INCLUDE_PATH.'footer.inc.php'); ?>