<?PHP //$Id$
//This page prints the backup todo list to see everything
+ //Check login
+ require_login();
+
+ //Check admin
+ if (!isadmin()) {
+ error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
+ }
+
+ //Check site
+ if (!$site = get_site()) {
+ error("Site not found!");
+ }
+
//Checks for the required files/functions to backup every mod
//And check if there is data about it
$count = 0;
<?PHP //$Id$
//This page prints the backup todo list to see everything
+ //Check login
+ require_login();
+
+ //Check admin
+ if (!isadmin()) {
+ error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
+ }
+
+ //Check site
+ if (!$site = get_site()) {
+ error("Site not found!");
+ }
+
//Checks for the required files/functions to backup every mod
//And check if there is data about it
$count = 0;
<?PHP //$Id$
//This page prints the backup form to select everything
+ //Check login
+ require_login();
+
+ //Check admin
+ if (!isadmin()) {
+ error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
+ }
+
+ //Check site
+ if (!$site = get_site()) {
+ error("Site not found!");
+ }
+
//Checks for the required files/functions to backup every mod
//And check if there is data about it
$count = 0;
//Call the form, depending the step we are
if (!$launch) {
include_once("restore_precheck.html");
- } else if ($launch == "check") {
- include_once("backup_check.html");
+ } else if ($launch == "form") {
+ include_once("restore_form.html");
} else if ($launch == "execute") {
include_once("backup_execute.html");
}
error ("File not specified");
}
+ //Check login
+ require_login();
+
+ //Check admin
+ if (!isadmin()) {
+ error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
+ }
+
+ //Check site
+ if (!$site = get_site()) {
+ error("Site not found!");
+ }
+
//Prepend dataroot to variable to have the absolute path
$file = $CFG->dataroot."/".$file;
}
}
+ //Save course header and info into php session
+ if ($status) {
+ $SESSION->info = $info;
+ $SESSION->course_header = $course_header;
+ }
+
+ //Finally, a little form to continue
+ //with some hidden fields
+ if ($status) {
+ echo "<br><CENTER>";
+ $hidden["backup_unique_code"] = $backup_unique_code;
+ $hidden["launch"] = "form";
+ $hidden["file"] = $file;
+ print_single_button("restore.php", $hidden, get_string("continue"),"post");
+ echo "</CENTER>";
+ }
+
if (!$status) {
error ("An error has ocurred");
}
+
?>