remove old readme
[atutor.git] / mods / _core / users / admins / reset_log.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: ./log.php');\r
23         exit;\r
24 } else if (isset($_POST['submit_yes'])) {\r
25         //clean up the db\r
26         $sql    = "DELETE FROM ".TABLE_PREFIX."admin_log";\r
27         $result = mysql_query($sql, $db);\r
28 \r
29         write_to_log(AT_ADMIN_LOG_DELETE, 'admin_log', mysql_affected_rows($db), $sql);\r
30 \r
31         $msg->addFeedback('ADMIN_LOG_RESET');\r
32         header('Location: ./log.php');\r
33         exit;\r
34 }\r
35 \r
36 require(AT_INCLUDE_PATH.'header.inc.php');\r
37 \r
38 //print confirmation\r
39 $hidden_vars['all'] = TRUE;\r
40 \r
41 $confirm = array('RESET_ADMIN_LOG', $_SERVER['PHP_SELF']);\r
42 $msg->addConfirm($confirm, $hidden_vars);\r
43 $msg->printConfirm();\r
44 \r
45 require(AT_INCLUDE_PATH.'footer.inc.php');\r
46 ?>