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');
17 authenticate(AT_PRIV_ADMIN);
19 $_SESSION['done'] = 0;
21 require(AT_INCLUDE_PATH.'../mods/_core/backups/classes/Backup.class.php');
22 $Backup = new Backup($db, $_SESSION['course_id']);
24 if (isset($_POST['cancel'])) {
25 $msg->addFeedback('CANCELLED');
26 header('Location: index.php');
28 } else if (isset($_POST['upload']) && ($Backup->getNumAvailable() < AT_COURSE_BACKUPS)) {
29 $Backup->upload($_FILES, $_POST['description']);
31 $_SESSION['done'] = 1;
33 if($msg->containsErrors()) {
34 header('Location: upload.php');
37 $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
38 header('Location: index.php');
43 require(AT_INCLUDE_PATH.'header.inc.php');
49 <script language="javascript" type="text/javascript">
50 function openWindow(page) {
51 newWindow = window.open(page, "progWin", "width=400,height=200,toolbar=no,location=no");
57 $savant->assign('Backup', $Backup);
58 $savant->display('instructor/backups/upload.tmpl.php');
59 require (AT_INCLUDE_PATH.'footer.inc.php'); ?>