7cdcad15a656d554d7fdcc0f0a7847d5df6d4da3
[atutor.git] / docs / mods / _core / themes / delete.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 $_user_location = 'admin';\r
16 \r
17 define('AT_INCLUDE_PATH', '../../../include/');\r
18 require(AT_INCLUDE_PATH.'vitals.inc.php');\r
19 admin_authenticate(AT_ADMIN_PRIV_THEMES);\r
20 \r
21 if (isset($_POST['submit_no'])) {\r
22         $msg->addFeedback('CANCELLED');\r
23         header('Location: index.php');\r
24         exit;\r
25 } else if (isset($_POST['submit_yes'])) {\r
26         require_once(AT_INCLUDE_PATH.'../mods/_core/themes/lib/themes.inc.php');\r
27         delete_theme($_POST['tc']);\r
28         header('Location: index.php');\r
29         exit;\r
30 }\r
31 \r
32 require(AT_INCLUDE_PATH.'header.inc.php'); \r
33 \r
34 $hidden_vars['tc'] = $_GET['theme_code'];\r
35 \r
36 $msg->addConfirm(array('DELETE_THEME', $_GET['theme_code']), $hidden_vars);\r
37 $msg->printConfirm();\r
38 \r
39 require(AT_INCLUDE_PATH.'footer.inc.php');\r
40 ?>