move code up one directory
[atutor.git] / mods / _standard / social / index_admin.php
1 <?php\r
2 /****************************************************************/\r
3 /* ATutor                                                                                                               */\r
4 /****************************************************************/\r
5 /* Copyright (c) 2002-2009                                                                              */\r
6 /* Inclusive Design Institute                                   */\r
7 /* http://atutor.ca                                                                                             */\r
8 /*                                                              */\r
9 /* This program is free software. You can redistribute it and/or*/\r
10 /* modify it under the terms of the GNU General Public License  */\r
11 /* as published by the Free Software Foundation.                                */\r
12 /****************************************************************/\r
13 // $Id$\r
14 \r
15 define('AT_INCLUDE_PATH', '../../../include/');\r
16 require (AT_INCLUDE_PATH.'vitals.inc.php');\r
17 admin_authenticate(AT_ADMIN_PRIV_SOCIAL);\r
18 $_custom_css = $_base_path . AT_SOCIAL_BASENAME . 'module.css'; // use a custom stylesheet\r
19 \r
20 if($_POST['save']){\r
21         $shindig_url = $addslashes($_POST['shindig_url']);\r
22         $sql = "REPLACE into ".TABLE_PREFIX."config (name,value) VALUES('shindig_url','$shindig_url')";\r
23         if($result = mysql_query($sql, $db)){\r
24                  $msg->addFeedback('SOCIAL_SETTINGS_SAVED');\r
25         }else{\r
26                 $msg->addError('SOCIAL_SETTINGS_NOT_SAVED');\r
27         }\r
28         header("Location: ".$_SERVER['PHP_SELF']);\r
29         exit;\r
30 }\r
31 \r
32 require (AT_INCLUDE_PATH.'header.inc.php');\r
33 \r
34 $savant->display('admin/system_preferences/index_admin.tmpl.php');\r
35 require (AT_INCLUDE_PATH.'footer.inc.php'); ?>