2 /****************************************************************************/
\r
4 /****************************************************************************/
\r
5 /* Copyright (c) 2002-2010 */
\r
6 /* Inclusive Design Institute */
\r
7 /* http://atutor.ca */
\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
15 define('AT_INCLUDE_PATH', '../../../include/');
\r
16 require(AT_INCLUDE_PATH.'vitals.inc.php');
\r
18 authenticate(AT_PRIV_ADMIN);
\r
20 if (isset($_POST['submit_yes'])) {
\r
21 require(AT_INCLUDE_PATH.'../mods/_core/backups/classes/Backup.class.php');
\r
22 $Backup = new Backup($db, $_SESSION['course_id']);
\r
23 $Backup->delete($_POST['backup_id']);
\r
24 $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
\r
25 header('Location: index.php');
\r
29 else if (isset($_POST['submit_no'])) {
\r
30 $msg->addFeedback('CANCELLED');
\r
31 header('Location: index.php');
\r
35 require(AT_INCLUDE_PATH.'header.inc.php');
\r
37 $delete_backup = intval($_REQUEST['backup_id']);
\r
38 $sql = "SELECT * from ".TABLE_PREFIX."backups WHERE backup_id = '$delete_backup'";
\r
39 $result = mysql_query($sql, $db);
\r
42 while ($row = mysql_fetch_assoc($result)){
\r
43 $title = $row['file_name'];
\r
45 $index['backup_id'] = $_GET['backup_id'];
\r
46 $msg->addConfirm(array('DELETE', $title), $index);
\r
47 $msg->printConfirm();
\r
49 require (AT_INCLUDE_PATH.'footer.inc.php');
\r