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
17 authenticate(AT_PRIV_ADMIN);
\r
19 require(AT_INCLUDE_PATH.'classes/Backup/Backup.class.php');
\r
21 if (isset($_POST['cancel']) || !isset($_REQUEST['backup_id'])) {
\r
22 $msg->addFeedback('CANCELLED');
\r
23 header('Location: index.php');
\r
27 $Backup =& new Backup($db, $_SESSION['course_id']);
\r
29 if (isset($_POST['edit'])) {
\r
30 $Backup->edit($_POST['backup_id'], $_POST['new_description']);
\r
31 $msg->addFeedback('ACTION_COMPLETED_SUCCESSFULLY');
\r
32 header('Location: index.php');
\r
36 require(AT_INCLUDE_PATH.'header.inc.php');
\r
38 $row = $Backup->getRow($_REQUEST['backup_id']);
\r
43 <form name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
\r
44 <input type="hidden" name="backup_id" value="<?php echo $_GET['backup_id']; ?>" />
\r
45 <div class="input-form">
\r
46 <fieldset class="group_form"><legend class="group_form"><?php echo _AT('edit'); ?></legend>
\r
48 <label for="description"><?php echo _AT('optional_description'); ?></label>
\r
49 <textarea cols="30" rows="2" id="description" name="new_description"><?php echo $row['description']; ?></textarea>
\r
52 <div class="row buttons">
\r
53 <input type="submit" name="edit" value="<?php echo _AT('save'); ?>" accesskey="s" />
\r
54 <input type="submit" name="cancel" value="<?php echo _AT('cancel'); ?>" />
\r
59 <?php require (AT_INCLUDE_PATH.'footer.inc.php'); ?>