<!--#include file="CNCASPPageManager_ResourceCreate.inc" -->

<%
' *****************************************************************************
' File:		/NR/System/WBC/Internals/WBCFuncPages/Cross-Browser/
'			ResourceBrowser/Management/ResourceCreate.asp
' Author:	Microsoft Corporation.
' Purpose:
'	Pop up the uploading screen for the user to upload a resource into a gallery.
'	Entry screen will be ResourceGalleries.asp and exit pt will be
'	ResourceCreateAcceptor.asp
'
' Query String Parameters:
'   IDS_QPARAM_GALLERY_GUID: Resource Gallery Guid
' *****************************************************************************

' ---- Initialize the ASPPageManager
Dim g_pASPPageManager
Set g_pASPPageManager = New CNCASPPageManager_ResourceCreate
Call g_pASPPageManager.InitManager()

Dim pASPUtils
Set pASPUtils = g_pASPPageManager.ASPUtils
%>

<!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="Display selection of local resource and its properties">
	<meta name="robots" content="NOINDEX,NOFOLLOW">
	<meta http-equiv="Content-Type" content="text/html;charset=<%= g_pASPPageManager.Charset %>">
	<title><%= IDS_UI_BROWSER_TITLE %></title>
	<% Call EmbedWBCHeadSection %>

	<script language="JavaScript"
			src="/NR/System/WBC/Internals/WBCFuncPages/Cross-Browser/ResourceBrowser/Common/ResourceBrowserCommon.js"
			type="text/javascript"></script>
	<script language="JavaScript"
			src="/NR/System/WBC/Internals/WBCFuncPages/Cross-Browser/ResourceBrowser/Management/ResourceProperties.js"
			type="text/javascript"></script>
	<script language="JavaScript"
			type="text/javascript">
	<!--
		function WBC_onPreview(strResType)
		{
			WBC_previewLocalResource(strResType);
			return false;
		}

		function WBC_onCancel()
		{
			window.close();
			return false;
		}
	//-->
	</script>
	</head>

<body <%= IDS_BODYSETTING %>>

<%	If (g_pASPPageManager.Error <> "") Then %>

<form name="NC_LocalForm" method="post" enctype="multipart/form-data">

<%	Else %>

<!-- WBC_validateResource will validate the resource directory on the desktop and the display name -->
<form name="NC_LocalForm" method="post"
		action="<%= g_pASPPageManager.URLFormPostAction %>"
		enctype="multipart/form-data"
		onsubmit='return WBC_validateResource(false)'>

<%	End If %>

<table width="100%" border="0" cellspacing="0" cellpadding="0">

	<!-- Show the Top Title -->
	<tr class="WBC_styclsBackground1">
		<td align=right><img border=0 src="<%=IDS_PATH_IMAGE_LOGO %>"></td>
		<td width=100% valign="middle"  class="WBC_styclsHeaderText">
			<%= IDS_UI_RESOURCE_MANAGER %>
		</td>
		<td><img src="<%=IDS_TRANSPARENT_GIF%>"
					width="<%= C_INT_MAIN_MARGIN %>" height="<%=C_INT_HEADER_HEIGHT%>" border="0"></td>
	</tr>

	<!-- Show the breadcrumb trail -->
	<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">
			<%= IDS_UI_ADD_RESOURCE %>
		</td>
		<td><img src="<%=IDS_TRANSPARENT_GIF%>"
			width="<%= C_INT_MAIN_MARGIN %>" height="<%=C_INT_SUBHEAD_HEIGHT%>" border="0"></td>
	</tr>

	<!-- 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_MAIN_SPACING %>" border="0"></td>
	</tr>

<%	If (g_pASPPageManager.Error = IDS_ERR_GALLERY_NOT_FOUND) Then %>

	<!-- Display the fact that ResourceGallery Is Nothing -->
	<tr>
		<td class="WBC_styclsBackground1">
			<table width="100%" border="0" cellspacing="<%= C_INT_THICK_BORDER %>" cellpadding="5">
				<tr class="WBC_styclsBackground2">
					<td>
						<span class="WBC_styclsHeavyTextColor1"><%= IDS_UI_RESOURCE_GALLERY %>:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<span class="WBC_styclsFuncPageContextValueText"><%= IDS_UI_GALLERY_NOT_FOUND %></span>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td colspan=3><img src="<%=IDS_TRANSPARENT_GIF%>"
			width="15" height="<%= C_INT_MAIN_SPACING %>" border="0"></td>
	</tr>

<%	Else %>

	<!-- Show area displaying info about current object -->
	<tr>
		<td class="WBC_styclsBackground1">
			<table width="100%" border="0" cellspacing="<%= C_INT_THICK_BORDER %>" cellpadding="5">
				<tr class="WBC_styclsBackground2">
					<td>
						<span class="WBC_styclsHeavyTextColor1"><%= IDS_UI_RESOURCE_GALLERY %>:</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<span class="WBC_styclsTextColor1"><%= pASPUtils.MBCSWrite( pASPUtils.HTMLEncode( g_pASPPageManager.ResourceGallery.Path ), g_pASPPageManager.CodePage ) %></span>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td><img src="<%=IDS_TRANSPARENT_GIF%>"
			width="15" height="<%= C_INT_MAIN_SPACING %>" border="0"></td>
	</tr>

	<!-- Show the Content area -->
		<tr>
			<td valign="top" class="WBC_styclsBackground1">
				<table width="100%" border="0" cellspacing="2" cellpadding="5" >
					<tr class="WBC_styclsBackground2">
						<td valign="top" >
							<table width="100%" border="0" cellspacing="0" cellpadding="5" >

								<!-- Show the file upload UI -->
								<tr>
									<td valign="top" class="WBC_styclsHeavyTextColor1"><nobr><%= IDS_UI_RESOURCE_LOCAL %>:</nobr></td>
									<td valign="middle"><a href="#" onclick="return WBC_onPreview('<%= IDS_RESTYPE_ATTACHMENT %>')">
										<img src="<%=IDS_RESOURCEBROWSER_IMG_PATH%><%=IDS_IMG_ICON_PREVIEW%>" ALT="<%=IDS_UI_TOOLTIP_PREVIEW%>" border="0"></a>
									</td>
									<td>
										<input type="file" name="NC_FileData" size="30">
										<br>

									</td>
								</tr>
							<!-- Show the mime type selection list -->
							<tr>
								<td colspan=2 valign=top>
									 <span class="WBC_styclsHeavyTextColor1"><%= IDS_UI_LABEL_TYPE %>:</span>
								</td>
								<td>
									<span class="WBC_styclsTextColor1"><%= IDS_UI_REQUIRED_FILE_TYPE %></span>
								</td>
							</tr>

								<td colspan=2>&nbsp;</td>
								<td class="WBC_styclsTextColor0" colspan="2">
									<% Call ShowMimeTypeSel( IDS_RESTYPE_ATTACHMENT ) %>
								</td>
							</tr>

								<!-- Show the separator for the Properties section -->
								<tr valign="middle">
									<td colspan="3">
										<table width=100% border=0 cellspacing=0 cellpadding=0>
											<tr>
												<td width="250"><hr></td>
												<td width="150" align="Center" valign="top" class="WBC_styclsHeavyTextColor1">
													<nobr><%= IDS_UI_RESOURCE_PROPERTIES %></nobr>
												</td>
												<td width="250"><hr></td>
											</tr>
										</table>
									</td>
								</tr>

								<!-- Render Display name -->
								<tr valign="top">
									<td class="WBC_styclsHeavyTextColor1"><nobr><%= IDS_UI_LABEL_DISPLAYNAME %>:</nobr></td>
									<td valign="top">&nbsp;</td>
									<td class="WBC_styclsTextColor1">
										<% Call WriteResourceDisplayNameDataHTML(True, g_pASPPageManager.ResourceGallery, Nothing) %>
									</td>
								</tr>

								<!-- Render Description -->
								<tr valign="top">
									<td class="WBC_styclsHeavyTextColor1"><nobr><%= IDS_UI_LABEL_DESCRIPTION %>:</nobr></td>
									<td valign="top">&nbsp;</td>
									<td class="WBC_styclsTextColor1">
										<% Call WriteResourceDescriptionDataHTML(True, g_pASPPageManager.ResourceGallery, Nothing) %>
									</td>
								</tr>

								<tr>
									<td colspan="3">&nbsp;</td>
								</tr>

							</table>
						</td>
					</tr>
				</table>
			</td>
		</tr>

	<%	End If %>


		<tr>
			<td><img src="<%=IDS_TRANSPARENT_GIF%>"
				width="15" height="<%= C_INT_MAIN_SPACING %>" border="0"></td>
		</tr>

		<tr>
			<td align="right">
				<input type="Image" alt="<%=IDS_UI_TOOLTIP_ADD_LOCAL_RESOURCE%>" border="0" src="<%=IDS_RESOURCEBROWSER_IMG_PATH%><%=IDS_IMG_BTN_OKAY%>">&nbsp;&nbsp;
				&nbsp;&nbsp;&nbsp;
				<a href="#" onclick="return WBC_onCancel()"><img name="NCRes_Cancel" border="0" alt="<%=IDS_UI_TOOLTIP_CANCEL%>" src="<%=IDS_RESOURCEBROWSER_IMG_PATH%><%=IDS_IMG_BTN_CANCEL%>"></a>
			</td>
		</tr>

	</table>

	</form>


	</body>
</html>