4b138d29da919dfd5501676981122344bbe59f7b
[atutor.git] / mods / social / index_admin.php
1 <?php\r
2 /****************************************************************/\r
3 /* ATutor                                                                                                               */\r
4 /****************************************************************/\r
5 /* Copyright (c) 2002-2009                                                                              */\r
6 /* Adaptive Technology Resource Centre / University of Toronto  */\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 \r
35 \r
36 <div class="headingbox"><h3><?php echo _AT('admin_social'); ?></h3></a></div>\r
37 <div class="contentbox">\r
38 <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">\r
39         <p><?php echo _AT('shindig_blurb'); ?></p>\r
40                 <dl id="public-profile">\r
41                         <dt><label for="shindig"><?php echo _AT('shindig_url'); ?></dt>\r
42                         <dl><input type="text" id="shindig" name="shindig_url" size="60" value="<?php echo $_config['shindig_url']; ?>" /></dd>\r
43                 </dl>\r
44         <input type="submit" name="save" value="<?php echo _AT('save'); ?>">\r
45 </form>\r
46 </div>\r
47 <?php \r
48 \r
49 require (AT_INCLUDE_PATH.'footer.inc.php'); ?>