diff --git a/churchinfo/Default.php b/churchinfo/Default.php index e00791018d..e126fe00e3 100644 --- a/churchinfo/Default.php +++ b/churchinfo/Default.php @@ -10,7 +10,7 @@ * Updated 2005-03-19 by Everette L Mills: Removed dropdown login box and * added user entered login box * - * + * * LICENSE: * (C) Free Software Foundation, Inc. * @@ -290,7 +290,7 @@ $sSQL = "INSERT INTO mrbs_users (id, level, name, email) VALUES ('$iUserID', '$iMRBSLevel', '$UserName', '$per_Email') ON DUPLICATE KEY UPDATE level='$iMRBSLevel', name='$UserName',email='$per_Email'"; RunQuery($sSQL); } - + if (isset($bEnableWebCalendar) && $bEnableWebCalendar) { $sAdmin = ($usr_Admin ? 'Y' : 'N'); $GLOBALS['login'] = $UserName; @@ -300,13 +300,13 @@ $GLOBALS['email'] = $per_Email; $GLOBALS['fullname'] = "$per_FirstName $per_LastName"; $GLOBALS['enabled'] = 1; - + $_SESSION['webcal_login'] = $UserName; - + $sSQL = "INSERT INTO webcal_user (cal_login, cal_firstname, cal_lastname, cal_is_admin, cal_email) VALUES ('$UserName', '". mysql_real_escape_string ($per_FirstName)." ', '".mysql_real_escape_string ($per_LastName)."', '$sAdmin', '$per_Email') ON DUPLICATE KEY UPDATE cal_login='$UserName', cal_firstname='".mysql_real_escape_string ($per_FirstName)."', cal_lastname='".mysql_real_escape_string ($per_LastName)."',cal_is_admin='$sAdmin', cal_email='$per_Email'"; RunQuery($sSQL); } - + // Redirect to the Menu Redirect('CheckVersion.php'); exit; @@ -332,52 +332,54 @@ // returned by the browser in a query string if (empty($_GET['Proto']) || empty($_GET['Path'])) { - echo ' - -'; + v_index = v_Path.toLowerCase().indexOf("default.php") - 1; + if (v_index < 0) + window.location = error_page2; + + v_Path=v_Path.substring(0, v_index); + v_Path=encodeURIComponent(v_Path); + v_QueryString = "Proto=" + v_Proto + "&Path=" + v_Path; + if (window.location.href.indexOf("?") < 0) + window.location = window.location.href + "?" + v_QueryString; + else + window.location = window.location.href + "&" + v_QueryString; + '') { + if ($sErrorText != '') { $loginPageMsg = $sErrorText; } } - if ($loginPageMsg != "") { ?> -
- -