%@ Assembly Name="Microsoft.SharePoint.ApplicationPages, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"%> <%@ Page Language="C#" DynamicMasterPageFile="~masterurl/default.master" Inherits="Microsoft.SharePoint.ApplicationPages.HtmlTrVerify" %> <%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="wssawc" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%
string strCookieName = Microsoft.SharePoint.ApplicationPages.HtmlTrVerify.strCookiePrefix +
System.Web.HttpUtility.UrlEncode(strDocRequest);
bool fCookieExists = Request.Cookies[strCookieName] != null;
bool fRedir = false;
try
{
fRedir = (fCookieExists && bool.Parse(Request.Cookies[strCookieName].Value));
}
catch { }
Response.Cache.SetCacheability(HttpCacheability.NoCache);
if(fRedir)
{
string strHtmlTrVerifyPageServerAndPath = null;
{
const string strHtmlTrVerifyPageName = "htmltrverify.aspx";
const string strHtmlTrRedirPageName = "htmltrredir.aspx";
int iHtmlRedirInUrl =
SPUtility.OriginalServerRelativeRequestUrl.ToLower().IndexOf(strHtmlTrRedirPageName);
try
{
if(iHtmlRedirInUrl > 0)
{
strHtmlTrVerifyPageServerAndPath =
Request.Url.GetLeftPart(System.UriPartial.Authority) +
SPUtility.OriginalServerRelativeRequestUrl.Substring(0, iHtmlRedirInUrl) +
strHtmlTrVerifyPageName;
System.Uri uri = new System.Uri(strHtmlTrVerifyPageServerAndPath);
}
else
strHtmlTrVerifyPageServerAndPath = strHtmlTrVerifyPageName;
}
catch
{
strHtmlTrVerifyPageServerAndPath = strHtmlTrVerifyPageName;
}
}
SPUtility.Redirect(strHtmlTrVerifyPageServerAndPath + "?doc=" +
System.Web.HttpUtility.UrlEncode(strDocRequest) +
"&Source=" +
System.Web.HttpUtility.UrlEncode(Request.Params.Get("Source")),
SPRedirectFlags.Static | SPRedirectFlags.DoNotEndResponse,
Context);
}
else
{
try
{
System.Web.HttpCookie cookie = new System.Web.HttpCookie(strCookieName);
cookie.Value = "true";
if(fCookieExists)
Response.Cookies.Add(cookie);
else
Response.Cookies.Set(cookie);
}
catch { }
}
%>
<%@ Register TagPrefix="wssuc" TagName="TopNavBar" src="~/_controltemplates/TopNavBar.ascx" %>