}
}
}
- redirect("$CFG->wwwroot/admin/index.php", get_string("changessaved"), 1);
+ redirect("index.php", get_string("changessaved"), 1);
exit;
} else {
if ($site) {
print_header("$site->shortname: $strconfigvariables", "$site->fullname",
- "<A HREF=\"$CFG->wwwroot/admin/\">$stradmin</A> -> $strconfigvariables", "$focus");
+ "<A HREF=\"index.php\">$stradmin</A> -> $strconfigvariables", "$focus");
print_heading($strconfigvariables);
} else {
print_header();
/// If any new configurations were found then send to the config page to check
if ($configchange) {
- redirect("$CFG->wwwroot/admin/config.php");
+ redirect("config.php");
}
/// Set up the overall site name etc.
if (! $site = get_site()) {
- redirect("$CFG->wwwroot/admin/site.php");
+ redirect("site.php");
}
/// Set up the admin user
+ if (! record_exists_sql("SELECT * FROM user_admins")) { // No admin user yet
+ redirect("user.php");
+ }
+
+/// Check for valid admin user
if (!isadmin()) {
- if (! record_exists_sql("SELECT * FROM user_admins")) { // No admin user yet
- redirect("$CFG->wwwroot/admin/user.php");
- }
error("You need to be an admin user to use this page.", "$CFG->wwwroot/login/index.php");
}
if ($form->id) {
if (update_record("course", $form)) {
- redirect("$CFG->wwwroot/admin/index.php", get_string("changessaved"));
+ redirect("index.php", get_string("changessaved"));
} else {
error("Serious Error! Could not update the site record! (id = $form->id)");
}
if ($newid = insert_record("course", $form)) {
$cat->name = get_string("miscellaneous");
if (insert_record("course_categories", $cat)) {
- redirect("$CFG->wwwroot/admin/index.php", get_string("changessaved"), "1");
+ redirect("index.php", get_string("changessaved"), "1");
} else {
error("Serious Error! Could not set up a default course category!");
}
$strsitesettings = get_string("sitesettings");
print_header("$site->shortname: $strsitesettings", "$site->fullname",
- "<A HREF=\"$CFG->wwwroot/admin/\">$stradmin</A> -> $strsitesettings", "$focus");
+ "<A HREF=\"index.php\">$stradmin</A> -> $strsitesettings", "$focus");
print_heading($strsitesettings);
print_simple_box_start("center", "", "$THEME->cellheading");
$strdeletecheck = get_string("deletecheck");
print_header("$site->shortname: $stredituser", $site->fullname,
- "<A HREF=\"$CFG->wwwroot/admin\">$stradministration</A> -> $stredituser");
+ "<A HREF=\"index.php\">$stradministration</A> -> $stredituser");
if ($delete) { // Delete a selected user, after confirmation
if (!$user = get_record("user", "id", "$delete")) {