From c53987bbb8f07e8a5372a87f4d7f2d693b713672 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Fri, 2 May 2003 00:53:40 +0000 Subject: [PATCH] This file shows all the info gathered before launch the backup process itself. --- backup/check.html | 169 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 backup/check.html diff --git a/backup/check.html b/backup/check.html new file mode 100644 index 0000000000..b8cddde7ea --- /dev/null +++ b/backup/check.html @@ -0,0 +1,169 @@ +name; + $modfile = "$mods_home/$modname/backuplib.php"; + $modbackup = $modname."_backup_mods"; + $modcheckbackup = $modname."_check_backup_mods"; + if (file_exists($modfile)) { + include_once($modfile); + if (function_exists($modbackup) and function_exists($modcheckbackup)) { + $var = "exists_".$modname; + $$var = true; + $count++; + } + } + //Check data + //Check module info + $var = "backup_".$modname; + if (!isset($$var)) { + $$var = 1; + } + //Check include user info + $var = "backup_user_info_".$modname; + if (!isset($$var)) { + $$var = 1; + } + } + } + + //Check other parameters + if (!isset($backup_users)) { + $backup_users = 2; + } + + if (!isset($backup_logs)) { + $backup_logs = 1; + } + + if (!isset($backup_user_files)) { + $backup_user_files = 1; + } + + if (!isset($backup_course_files)) { + $backup_course_files = 2; + } + + if ($count == 0) { + notice("No backupable modules are installed!"); + } + +?> + +
action=""> + +"; + echo ""; + + //Line + echo ""; + + //Now print the To Do list + echo ""; + echo ""; + + if ($allmods = get_records("modules") ) { + foreach ($allmods as $mod) { + $modname = $mod->name; + $modbackup = $modname."_backup_mods"; + //If exists the lib & function + $var = "exists_".$modname; + if ($$var) { + //Add hidden fields + $var = "backup_".$modname; + echo ""; + $var = "backup_user_info_".$modname; + echo ""; + $var = "backup_".$modname; + //Only if selected + if ($$var == 1) { + //Print the full tr + echo ""; + echo ""; + } + } + } + //Line + echo ""; + + //Now print the Users tr + echo ""; + echo ""; + + //Now print the Logs tr + echo ""; + echo ""; + + //Now print the User Files tr + echo ""; + echo ""; + + //Now print the Course Files tr + echo ""; + echo ""; + } +?> +

"; + echo get_string("name").":"; + echo "

"; + $backup_name = userdate(time(),get_string("backupnameformat")).".zip"; + echo $backup_name; + //Add as hidden name + echo ""; + echo "

"; + echo get_string("backupdetails").":"; + echo "

"; + //Print the mod name + echo "

  • ".get_string("include")." ".get_string("modulenameplural",$modname)." "; + //Now look for user-data status + $backup_user_options[0] = get_string("withoutuserdata"); + $backup_user_options[1] = get_string("withuserdata"); + $var = "backup_user_info_".$modname; + //Print the user info + echo $backup_user_options[$$var]."

    "; + //Call the check function to show more info + $modcheckbackup = $modname."_check_backup_mods"; + $table->data = $modcheckbackup($id,$$var); + print_table($table); + echo "


  • "; + echo get_string("users").":"; + echo "

    "; + $user_options[0] = get_string("all"); + $user_options[1] = get_string("course"); + $user_options[2] = get_string("needed"); + choose_from_menu($user_options, "backup_users", $backup_users, ""); + echo "

    "; + echo get_string("logs").":"; + echo "

    "; + $log_options[0] = get_string("no"); + $log_options[1] = get_string("yes"); + choose_from_menu($log_options, "backup_logs", $backup_logs, ""); + echo "

    "; + echo get_string ("userfiles").":"; + echo "

    "; + $user_file_options[0] = get_string("no"); + $user_file_options[1] = get_string("yes"); + choose_from_menu($user_file_options, "backup_user_files", $backup_user_files, ""); + echo "

    "; + echo get_string ("coursefiles").":"; + echo "

    "; + $course_file_options[0] = get_string("no"); + $course_file_options[1] = get_string("yes"); + choose_from_menu($course_file_options, "backup_course_files", $backup_course_files, ""); + echo "
    +
    +
    + + +"> +"> +
    +
    -- 2.39.5