changed git call from https to git readonly
[atutor.git] / mods / job_board / admin / preferences.php
1 <?php
2 /***********************************************************************/
3 /* ATutor                                                                                                                          */
4 /***********************************************************************/
5 /* Copyright (c) 2002-2009                                                                                         */
6 /* Adaptive Technology Resource Centre / Inclusive Design Institute        */
7 /* http://atutor.ca                                                                                                        */
8 /*                                                                                                                                         */
9 /* This program is free software. You can redistribute it and/or           */
10 /* modify it under the terms of the GNU General Public License             */
11 /* as published by the Free Software Foundation.                                           */
12 /***********************************************************************/
13 // $Id$
14
15 define('AT_INCLUDE_PATH', '../../../include/');
16 require (AT_INCLUDE_PATH.'vitals.inc.php');
17
18 admin_authenticate(AT_ADMIN_PRIV_JOB_BOARD); 
19
20 //handle submit
21 if(isset($_POST['submit'])){
22         $posting_approval = intval($_POST['jb_posting_approval']);
23         if ($posting_approval > 1){
24                 $posting_approval = 1;
25         } 
26         $sql = 'REPLACE INTO '.TABLE_PREFIX."config SET value='$posting_approval', name='jb_posting_approval'";
27         $result = mysql_query($sql, $db);
28         if ($reuslt===false){
29                 $msg->addError('DB_NOT_UPDATED');
30         } else {
31                 $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
32                 header('Location: preferences.php');
33                 exit;
34         }
35 }
36
37 include(AT_INCLUDE_PATH.'header.inc.php');
38 $savant->display('admin/jb_preferences.tmpl.php');
39 include(AT_INCLUDE_PATH.'footer.inc.php'); 
40 ?>