3 This is the ATutor Elluminate module page. It allows an admin user
\r
4 to set or edit the URL for the Elluminate installation for ATutor, and define an optional guest password.
\r
7 define('AT_INCLUDE_PATH', '../../include/');
\r
8 require (AT_INCLUDE_PATH.'vitals.inc.php');
\r
9 admin_authenticate(AT_ADMIN_PRIV_ELLUMINATE);
\r
11 if (isset($_POST['submit'])) {
\r
12 $_POST['uri'] = trim($_POST['uri']);
\r
14 if (!$_POST['uri']){
\r
15 $msg->addError('ELLUMINATEURL_ADD_EMPTY');
\r
18 if (!$msg->containsErrors()) {
\r
19 $_POST['uri'] = $addslashes($_POST['uri']);
\r
20 $sql = "REPLACE INTO ".TABLE_PREFIX."config VALUES ('elluminate', '$_POST[uri]')";
\r
21 mysql_query($sql, $db);
\r
22 $_POST['pw'] = $addslashes($_POST['pw']);
\r
23 $sql = "REPLACE INTO ".TABLE_PREFIX."config VALUES ('elluminate_pw', '$_POST[pw]')";
\r
24 mysql_query($sql, $db);
\r
25 $msg->addFeedback('ELLUMINATEURL_ADD_SAVED');
\r
27 header('Location: '.$_SERVER['PHP_SELF']);
\r
32 require (AT_INCLUDE_PATH.'header.inc.php');
\r
36 <?php if ($_config['elluminate']): ?>
\r
37 <div class="input-form">
\r
39 <p><?php echo _AT('elluminate_text'); ?></p>
\r
41 <div class="row buttons">
\r
42 <form action="<?php echo $_config['elluminate']; ?>" method="get">
\r
43 <input type="submit" value="<?php echo _AT('elluminate_open'); ?>" onclick="window.open('<?php echo $_config['elluminate']; ?>','mywindow','width=800,height=600,scrollbars=yes, resizable=yes', 'false');true;" />
\r
44 <input type="hidden" name="username" value="admin">
\r
45 <input type="hidden" name="password" value="<?php echo $_config['elluminate_pw']; ?>">
\r
50 <div class="input-form">
\r
52 <p><?php echo _AT('elluminate_missing_url'); ?></p>
\r
57 <form action="<?php $_SERVER['PHP_SELF']; ?>" method="post">
\r
58 <div class="input-form">
\r
60 <p><label for="uri"><?php echo _AT('elluminate_location'); ?></label></p>
\r
62 <input type="text" name="uri" value="<?php echo $_config['elluminate']; ?>" id="uri" size="80" style="min-width: 95%;" />
\r
65 <p><label for="pw"><?php echo _AT('elluminate_pw'); ?></label></p>
\r
67 <input type="text" name="pw" value="<?php echo $_config['elluminate_pw']; ?>" id="pw" size="20" style="min-width: 55%;" />
\r
69 <div class="row buttons">
\r
70 <input type="submit" name="submit" value="<?php echo _AT('save'); ?>" />
\r
75 <?php require (AT_INCLUDE_PATH.'footer.inc.php'); ?>