move code up one directory
[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
51 <?php 
52 $savant->display('admin/courses/scaffolds.tmpl.php');
53 require(AT_INCLUDE_PATH.'footer.inc.php'); ?>