remove old readme
[atutor.git] / admin / error_logging_reset.php
1 <?php\r
2 /****************************************************************/\r
3 /* ATutor                                                                                                               */\r
4 /****************************************************************/\r
5 /* Copyright (c) 2002-2010                                      */\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 \r
18 admin_authenticate(AT_ADMIN_PRIV_ADMIN);\r
19 \r
20 if (isset($_POST['submit_no'])) {\r
21         $msg->addFeedback('CANCELLED');\r
22         header('Location: ./error_logging.php');\r
23         exit;\r
24 } else if (isset($_POST['submit_yes'])) {\r
25         \r
26         //clean up the db\r
27         require_once(AT_INCLUDE_PATH.'../mods/_core/file_manager/filemanager.inc.php');\r
28         \r
29         if (($result = clr_dir(AT_CONTENT_DIR . 'logs/'))) {\r
30                 $msg->addFeedback('ERROR_LOG_RESET');\r
31         } else {\r
32                 $msg->addError('ERROR_LOG_NOT_RESET');\r
33         }\r
34 \r
35         header('Location: ./error_logging.php');\r
36         exit;\r
37 }\r
38 \r
39 require(AT_INCLUDE_PATH.'header.inc.php');\r
40 \r
41 //print confirmation\r
42 $hidden_vars['all'] = TRUE;\r
43 \r
44 $confirm = array('RESET_ERROR_LOG', $_SERVER['PHP_SELF']);\r
45 $msg->addConfirm($confirm, $hidden_vars);\r
46 $msg->printConfirm();\r
47 \r
48 require(AT_INCLUDE_PATH.'footer.inc.php');\r
49 ?>