The tag for ATutor 2.0.3 release.
[atutor.git] / mods / _standard / support_tools / scaffolds.php
1 <?php
2 /************************************************************************/
3 /* ATutor                                                                                                                               */
4 /************************************************************************/
5 /* Copyright (c) 2002-2010                                              */
6 /* Inclusive Design Institute                                           */
7 /* http://atutor.ca                                                     */
8 /* This program is free software. You can redistribute it and/or        */
9 /* modify it under the terms of the GNU General Public License          */
10 /* as published by the Free Software Foundation.                        */
11 /************************************************************************/
12 // $Id$ $
13
14 define('AT_INCLUDE_PATH', '../../../include/');
15 require(AT_INCLUDE_PATH.'vitals.inc.php');
16
17 admin_authenticate(AT_ADMIN_PRIV_ADMIN);
18
19
20 if (isset($_POST['cancel'])) {
21         $msg->addFeedback('CANCELLED');
22         header('Location: '.$_base_href.'mods/_core/courses/admin/courses.php');
23         exit;
24 }
25
26 $_POST['encyclopedia'] == $addslashes($_POST['encyclopedia']);
27 $_POST['dictionary'] == $addslashes($_POST['dictionary']);
28 $_POST['thesaurus'] == $addslashes($_POST['thesaurus']);
29 $_POST['atlas'] == $addslashes($_POST['atlas']);
30 $_POST['calculator'] == $addslashes($_POST['calculator']);
31 $_POST['abacus'] == $addslashes($_POST['abacas']);
32 $_POST['note_taking'] == $addslashes($_POST['note_taking']);
33
34 if (isset($_POST['submit'])) {
35         foreach ($_POST as $key => $value){
36                 if($key != "submit"){
37                 $sql    = "REPLACE INTO ".TABLE_PREFIX."config VALUES('$key', '$value')";
38                 $result = mysql_query($sql, $db);
39                 };
40         }
41                 
42         $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
43         header('Location:'. $_SERVER[PHP_SELF]);
44         exit;
45
46 }
47 require(AT_INCLUDE_PATH.'header.inc.php');
48
49 ?>
50 <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="scaffolds">
51 <div class="input-form">
52  <fieldset class="group_form"> <legend class="group_form"><strong><?php echo _AT("support_tools"); ?></strong>  </legend>  
53         <div class="row">
54                 <p><?php echo _AT('scaffold_text'); ?></p>
55         </div>
56         <div class="row">
57
58                 <label for="encyclopedia"><?php echo _AT('encyclopedia'); ?></label><br /><input type="text" id="encyclopedia"  name="encyclopedia" value="<?php echo $_config['encyclopedia']; ?>"  size="60"/><br />
59                 <label for="dictionary"><?php echo _AT('dictionary'); ?></label><br /><input type="text" id="dictionary"  name="dictionary" value="<?php echo $_config['dictionary']; ?>"  size="60"/><br />
60                 <label for="thesaurus"><?php echo _AT('thesaurus'); ?></label><br /><input type="text" id="thesaurus"  name="thesaurus" value="<?php echo $_config['thesaurus']; ?>" size="60"/><br />
61                 <label for="atlas"><?php echo _AT('atlas'); ?></label><br /><input type="text" id="atlas"  name="atlas" value="<?php echo $_config['atlas']; ?>"  size="60"/><br />
62                 <label for="calculator"><?php echo _AT('calculator'); ?></label><br /><input type="text" id="calculator"  name="calculator" value="<?php echo $_config['calculator']; ?>"  size="60"/><br />
63                 <label for=""><?php echo _AT('note_taking'); ?></label><br /><input type="text" id="note_taking"  name="note_taking" value="<?php echo $_config['note_taking']; ?>"  size="60"/>        <br />
64                 <label for="abacas"><?php echo _AT('abacus'); ?></label><br /><input type="text" id="abacas"  name="abacas" value="<?php echo $_config['abacas']; ?>"  size="60"/><br />
65         </div>
66         <div class="buttons">
67                 <input type="submit" name="submit" value="<?php echo _AT('save'); ?>" accesskey="s" />
68                 <input type="submit" name="cancel" value="<?php echo _AT('cancel'); ?>"  />
69         </div>
70 </fieldset>
71 </div>
72 </form>
73
74 <?php require(AT_INCLUDE_PATH.'footer.inc.php'); ?>