<!-- #include virtual="/NR/System/WBC/Internals/Main/WBCApp.inc" -->

<!-- #include virtual="/NR/System/WBC/Customizable/WBCFuncPagesConfig/UIStringConstants/PageRevisionUIStrings.inc" -->
<!-- #include virtual="/NR/System/WBC/Internals/WBCFuncPages/Cross-Browser/RevisionBrowser/Page/Common/ProgrammingConstants.inc"-->

<%
' ********************************************************************
' Copyright (C) 2001 Microsoft Corporation. All rights reserved.
'
'	IMPORTANT.  Please read the legal.txt file, located in the
'	"<CMS Install Directory>\Server\httpexec\WBC\Internals"
'	directory, governing the use of this internal file."
' ********************************************************************

' ********************************************************************
' File:		/NR/System/WBC/Internals/WBCFuncPages/Cross-Browser/RevisionBrowser/Page/
'			RevisionHistory/PageRevisionPreview.asp
' Version:	Microsoft Content Management Server
' Author:	Microsoft Corporation.
' Purpose:	Responsible for Preview the Revision Page by a specified date and time
'
' Query String Parameters:
'	[API-Generated-Query-Params]: This set of parameters is generated by
'								  invoking the API method Posting.QueryString
'								  in the previous ASP page. It contains all the
'								  necessary information to be interpreted by the
'								  API to set the AutoSession.This object in this
'								  ASP page.
' ********************************************************************


' --- get the current Posting Object
Dim g_pCurrentPage
Set g_pCurrentPage = AutoSession.ThisPosting

Dim pFormReader
Set pFormReader = GetInitializedFormReaderSafe( false )

' --- construct the date
Dim g_dSelectedDate, lYear, lMonth, lDay, lHour, lMinute
lYear = CLng( pFormReader.Form(IDS_PREVIEW_DATE_YEAR) )
lMonth = CLng( pFormReader.Form(IDS_PREVIEW_DATE_MONTH) )
lDay = CLng( pFormReader.Form(IDS_PREVIEW_DATE_DAY) )
lHour = CLng( pFormReader.Form(IDS_PREVIEW_DATE_HOUR) )
lMinute = CLng( pFormReader.Form(IDS_PREVIEW_DATE_MINUTE) )
g_dSelectedDate = DateSerial( lYear, lMonth, lDay ) + TimeSerial( lHour, lMinute ,0 )

' --- get the revision Posting Object
Dim g_pRevisionPage
Set g_pRevisionPage = g_pCurrentPage.RevisionForDate( CDate( g_dSelectedDate ) )

If (g_pRevisionPage is Nothing) Then
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="expires" content="-1">
	<meta name="Author" content="Microsoft Corporation.">
	<meta name="Description" content="Preview Revision Page by a specified date and time">
	<meta name="robots" content="NOINDEX,NOFOLLOW">
	<script language="JavaScript" src="PageRevisionPreview.js" type="text/javascript"></script>
	<% Call EmbedWBCHeadSection %>
	<title><%= IDS_UI_BROWSER_TITLE %></title>
</head>

<body <%= IDS_BODYSETTING %> onload="return false;">

	<form>
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<!-- Show the Top Title -->
			<tr class="WBC_styclsBackground1">
				<td><img border=0 src="<%=IDS_PATH_IMAGE_LOGO %>"></td>
				<td width=100% valign="middle"  class="WBC_styclsHeaderText">
					<%= IDS_UI_LABEL_VIEW_REVISIONS_BY_DATE %>
				</td>
				<td><img src="<%= IDS_TRANSPARENT_GIF %>"
							width="<%= C_INT_MAIN_MARGIN %>" height="<%= C_INT_HEADER_HEIGHT %>" border="0"></td>
			</tr>
			<!-- Show the Sub Header -->
			<tr class="WBC_styclsBackground2">
				<td><img src="<%= IDS_TRANSPARENT_GIF %>"
					width="<%= C_INT_MAIN_MARGIN %>" height="<%= C_INT_SUBHEAD_HEIGHT %>" border="0"></td>
				<td class="WBC_styclsSubheadText">
					<a href="#" onclick="WBC_openViewRevisionByDateDlg(); return false;"><%= IDS_UI_LABEL_SELECT_DATE %></a> > <%= IDS_UI_LABEL_NO_REVISION_EXIST %>
				</td>
				<td><img src="<%= IDS_TRANSPARENT_GIF %>"
					width="<%= C_INT_MAIN_MARGIN %>" height="<%= C_INT_SUBHEAD_HEIGHT %>" border="0"></td>
			</tr>
			<tr>
				<td><img src="<%= IDS_TRANSPARENT_GIF %>"
						width="15" height="<%= C_INT_MINOR_SPACING %>" border="0"></td>
			</tr>
		</table>

		<table width="80%" border="0" cellspacing="0" cellpadding="0">
			<!-- Set the margin width for the rest of the page -->
			<tr>
				<td rowspan="999"><img src="<%= IDS_TRANSPARENT_GIF %>"
							width="<%= C_INT_MAIN_MARGIN %>" height="1" border="0"></td>
				<td><img src="<%= IDS_TRANSPARENT_GIF %>"
							width="100%" height="1" border="0"></td>
				<td rowspan="999"><img src="<%= IDS_TRANSPARENT_GIF %>"
							width="<%= C_INT_MAIN_MARGIN %>" height="1" border="0"></td>
			</tr>
			<tr>
				<td><img src="<%= IDS_TRANSPARENT_GIF %>"
						width="15" height="<%= C_INT_MINOR_SPACING %>" border="0"></td>
			</tr>

			<tr>
				<td width="100%" align="right">
					<table class="WBC_styclsBackground1" width="100%" border="0" cellspacing="0" cellpadding="2">
						<td>
							<table class="WBC_styclsBackground2" width="100%" border="0" cellspacing="0" cellpadding="10">
								<tr class="WBC_styclsBackground2">
									<td><img src="<%= IDS_PATH_IMAGES_COMMON & IDS_IMG_ICON_ALERT_GIF %>" border=0></td>
									<td class="WBC_styclsTextColor1" valign="middle">
										<%= IDS_UI_LABEL_NO_REVISION_DECRIPTION %>
										<script language="JavaScript" type="text/javascript">
										<!--
											WBC_writeUTC2Local( "<%= FormatDate(g_dSelectedDate) %>" )
										// -->
										</script>
										<%= ". " & IDS_UI_LABEL_SELECT_ANOTHER_DATE %>
									</td>
								</tr>
								<tr class="WBC_styclsBackground2">
									<td colspan="2"><img src="<%=IDS_TRANSPARENT_GIF%>"
										width="<%= C_INT_MAIN_MARGIN %>" height="<%= C_INT_XSMALL_SPACING %>" border="0"></td>
								</tr>
							</table>
						</td>
					</table>

					<table border="0" cellspacing="0" cellpadding="2">
						<tr>
							<td><img src="<%=IDS_TRANSPARENT_GIF%>"
								width="<%= C_INT_MAIN_MARGIN %>" height="<%= C_INT_MINOR_SPACING %>" border="0"></td>
						</tr>
						<tr valign="bottom">
							<td align="right" valign="bottom" colspan="2">
								<a href="#" onclick="WBC_openViewRevisionByDateDlg(); return false;">
									<img name="WBC_imgOkay" src="<%= IDS_PATH_IMAGES_COMMON & IDS_IMG_BTN_OKAY_GIF %>" border="0" alt=""></a>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	</form>
</body>
</html>


<%
Else
	ServerSideRedirect( g_pRevisionPage.Url )
End If
%>
