2 /****************************************************************************/
4 /****************************************************************************/
5 /* Copyright (c) 2002-2010 */
6 /* Inclusive Design Institute */
9 /* This program is free software. You can redistribute it and/or */
10 /* modify it under the terms of the GNU General Public License */
11 /* as published by the Free Software Foundation. */
12 /****************************************************************************/
15 define('AT_INCLUDE_PATH', '../../../include/');
16 require(AT_INCLUDE_PATH.'vitals.inc.php');
19 authenticate(AT_PRIV_ADMIN);
21 require(AT_INCLUDE_PATH.'../mods/_core/backups/classes/Backup.class.php');
22 require_once(AT_INCLUDE_PATH.'../mods/_core/file_manager/filemanager.inc.php');
24 if (isset($_POST['restore'], $_POST['backup_id'])) {
25 header('Location: restore.php?backup_id=' . $_POST['backup_id']);
27 } else if (isset($_POST['download'], $_POST['backup_id'])) {
28 $Backup = new Backup($db, $_SESSION['course_id']);
29 $Backup->download($_POST['backup_id']);
30 exit; // never reached
31 } else if (isset($_POST['delete'], $_POST['backup_id'])) {
32 header('Location: delete.php?backup_id=' . $_POST['backup_id']);
34 } else if (isset($_POST['edit'], $_POST['backup_id'])) {
35 header('Location: edit.php?backup_id=' . $_POST['backup_id']);
37 } else if (!empty($_POST)) {
38 $msg->addError('NO_ITEM_SELECTED');
41 require(AT_INCLUDE_PATH.'header.inc.php');
43 $Backup = new Backup($db, $_SESSION['course_id']);
44 $list = $Backup->getAvailableList();
45 $savant->assign('list', $list);
46 $savant->display('instructor/backups/index.tmpl.php');
47 require (AT_INCLUDE_PATH.'footer.inc.php'); ?>