2 /****************************************************************************/
\r
4 /****************************************************************************/
\r
5 /* Copyright (c) 2002-2008 by Greg Gay, Joel Kronenberg & Heidi Hazelton */
\r
6 /* Adaptive Technology Resource Centre / University of Toronto */
\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 $_section[0][0] = _AT('tools');
\r
21 $_section[0][1] = 'tools/';
\r
22 $_section[1][0] = _AT('backup_manager');
\r
23 $_section[1][1] = 'tools/backup/index.php';
\r
24 $_section[2][0] = _AT('delete');
\r
27 if (isset($_POST['submit_yes'])) {
\r
28 require(AT_INCLUDE_PATH.'classes/Backup/Backup.class.php');
\r
29 $Backup = new Backup($db, $_SESSION['course_id']);
\r
30 $Backup->delete($_POST['backup_id']);
\r
31 $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
\r
32 header('Location: index.php');
\r
36 else if (isset($_POST['submit_no'])) {
\r
37 $msg->addFeedback('CANCELLED');
\r
38 header('Location: index.php');
\r
42 require(AT_INCLUDE_PATH.'header.inc.php');
\r
44 $delete_backup = intval($_REQUEST['backup_id']);
\r
45 $sql = "SELECT * from ".TABLE_PREFIX."backups WHERE backup_id = '$delete_backup'";
\r
46 $result = mysql_query($sql, $db);
\r
49 while ($row = mysql_fetch_assoc($result)){
\r
50 $title = $row['file_name'];
\r
52 $index['backup_id'] = $_GET['backup_id'];
\r
53 $msg->addConfirm(array('DELETE', $title ), $index);
\r
54 $msg->printConfirm();
\r
56 require (AT_INCLUDE_PATH.'footer.inc.php');
\r