/// <summary> /// 方法: JumpToResponseCookiePage /// 功能: 在主站判断已经存在登录信息,跳转到向分站请求Cookie的页面。 /// 要求必须有JumpPage、NeedLogin的URL参数。 /// 作者: 齐玮 /// 修改: /// 时间: 2007-2-2 16:09 /// </summary> /// <param name="intUserID">Cookie中的UserID</param> /// <param name="intReportParameter">错误报告所需要的参数</param> public static void JumpToResponseCookiePage(int intUserID, int intReportParameter) { string strJumpURL = ((string)SessionItem.GetRequest("JumpPage", 1)).ToLower(); //获得页面的来路并且将来路变为小写 int intNeedLogin = (int)SessionItem.GetRequest("NeedLogin", 0); //?:! ^:& .:= strJumpURL = strJumpURL.Replace("http://", "").Replace("?", "!").Replace("&", "^").Replace("=", "."); Cuter cuter = new Cuter(strJumpURL, "/"); string strDomain; if (DBConnection.IsOnline) { strDomain = cuter.GetCuter(0); } else { strDomain = cuter.GetCuter(0);// +"/" + cuter.GetCuter(1); //两个GetCuter是因为这是在本地,如果传入服务器,只需要1个GetCuter了。 } string strJumpPage = strJumpURL.Replace(strDomain, ""); if (intUserID > 0) { string strUserID = StringItem.MD5Encrypt(intUserID.ToString().Trim(), "x1~baK07").ToString().Trim(); strJumpURL = "http://" + strDomain + "/ResponseCookiePage.aspx?CheckCookie=true&UserID=" + strUserID + "&JumpPage=" + strJumpPage; } else { if (intNeedLogin == 0) { strJumpURL = "http://" + strDomain + "/ResponseCookiePage.aspx?CheckCookie=false&JumpPage=" + strJumpPage; } else { strJumpURL = "Report.aspx?Parameter=" + intReportParameter; } } HttpContext hc = HttpContext.Current; hc.Response.Redirect(strJumpURL); }