<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Admin/AdminMain.Master" Inherits="System.Web.Mvc.ViewPage<MvcEnterprise.Services.Setting>" %>

<asp:Content ID="Content0" ContentPlaceHolderID="HeadContent" runat="server">
	<script src="../../Scripts/MicrosoftAjax.js" type="text/javascript"></script>
	<script src="../../Scripts/MicrosoftMvcAjax.js" type="text/javascript"></script>
	<script src="../../Scripts/MicrosoftMvcValidation.js" type="text/javascript"></script>
	<script src="../../Scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
	<script src="../../Scripts/Admin.js" type="text/javascript"></script>
	<script src="../../Scripts/jquery.loading.js" type="text/javascript"></script>
	<script src="<%=Url.Content("~/Content/fckeditor/fckeditor.js")%>" type="text/javascript"></script>
	<script src="../../Scripts/AjaxSubmitForm.js" type="text/javascript"></script>
	<% Html.EnableClientValidation(); %>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	网站设置
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
	<%
		using (Html.BeginForm("Setting", "Admin"))
		{%>
	<fieldset>
		<legend>全局设置</legend>
		<div>
			<span class="editor-label"><%= Html.LabelFor(m => m.SiteName)%>：</span>
			<span class="editor-field"><%= Html.TextBoxFor(m => m.SiteName)%> <%=Html.ValidationMessageFor(m => m.SiteName)%></span>
		</div>
		<div>
			<span class="editor-label"><%= Html.LabelFor(m => m.SiteLogo)%>：</span>
			<span class="editor-field"><%= Html.TextBoxFileUrlFor(m => m.SiteLogo)%> <%=Html.ValidationMessageFor(m => m.SiteLogo)%></span>
		</div>
		<div style="display: none">
			<span class="editor-label"><%= Html.LabelFor(m => m.SiteBanner)%>：</span>
			<span class="editor-field"><%= Html.TextBoxFileUrlFor(m => m.SiteBanner)%> <%=Html.ValidationMessageFor(m => m.SiteBanner)%></span>
		</div>
		<div>
			<span class="editor-label"><%= Html.LabelFor(m => m.Skin)%>：</span>
			<%
				var skins = System.IO.Directory.GetDirectories(Server.MapPath("~/Content/Skin"));
				for (int i = 0; i < skins.Count(); i++)
				{
					var pos = skins[i].LastIndexOf('\\');
					skins[i] = skins[i].Substring(pos + 1);
				}
			%>
			<span class="editor-field"><%= Html.DropDownListFor(m => m.Skin, new SelectList(skins))%></span>
		</div>
		<div>
			<span class="editor-label"><%= Html.LabelFor(m => m.SiteKeywords)%>：</span>
			<span class="editor-field"><%= Html.TextAreaFor(m => m.SiteKeywords)%> <%=Html.DisplayToolTipFor(m => m.SiteKeywords)%>
				<%=Html.ValidationMessageFor(m => m.SiteKeywords)%></span>
		</div>
		<div>
			<span class="editor-label"><%= Html.LabelFor(m => m.SiteDescription)%>：</span>
			<span class="editor-field"><%= Html.TextAreaFor(m => m.SiteDescription)%> <%=Html.DisplayToolTipFor(m => m.SiteDescription)%>
				<%=Html.ValidationMessageFor(m => m.SiteDescription)%></span>
		</div>
		<div>
			<span class="editor-label"><%= Html.LabelFor(model => model.PageSize)%>：</span>
			<span class="editor-field"><%= Html.TextBoxFor(model => model.PageSize)%> <%= Html.ValidationMessageFor(model => model.PageSize)%>
			</span>
		</div>
	</fieldset>
	<fieldset>
		<legend>产品参数</legend>
		<div>
			<span class="editor-label"><%= Html.LabelFor(m=>m.ProductThumbWidth) %>：</span>
			<span class="editor-field"><%= Html.TextBoxFor(m => m.ProductThumbWidth)%> <%= Html.ValidationMessageFor(m => m.ProductThumbWidth)%>
				<%= Html.DisplayToolTipFor(m => m.ProductThumbWidth)%></span>
		</div>
		<div>
			<span class="editor-label"><%= Html.LabelFor(m=>m.ProductThumbHeight) %>：</span>
			<span class="editor-field"><%= Html.TextBoxFor(m => m.ProductThumbHeight)%> <%= Html.ValidationMessageFor(m => m.ProductThumbHeight)%>
				<%= Html.DisplayToolTipFor(m => m.ProductThumbHeight)%></span>
		</div>
		<div>
			<span class="editor-label"><%= Html.LabelFor(m=>m.ProductBrowsingHistoryMaxCount) %>：</span>
			<span class="editor-field"><%= Html.TextBoxFor(m => m.ProductBrowsingHistoryMaxCount)%>
				<%= Html.DisplayToolTipFor(m => m.ProductBrowsingHistoryMaxCount)%> <%= Html.ValidationMessageFor(m => m.ProductBrowsingHistoryMaxCount)%></span>
		</div>
	</fieldset>
	<fieldset>
		<legend>新闻参数</legend>
		<div>
			<span class="editor-label"><%= Html.LabelFor(m=>m.ArticleBrowsingHistoryMaxCount) %>：</span>
			<span class="editor-field"><%= Html.TextBoxFor(m => m.ArticleBrowsingHistoryMaxCount)%>
				<%= Html.DisplayToolTipFor(m => m.ArticleBrowsingHistoryMaxCount)%> <%= Html.ValidationMessageFor(m => m.ArticleBrowsingHistoryMaxCount)%></span>
		</div>
	</fieldset>
	<fieldset>
		<legend>下载参数</legend>
		<div>
			<span class="editor-label"><%= Html.LabelFor(m=>m.DownloadBrowsingHistoryMaxCount) %>：</span>
			<span class="editor-field"><%= Html.TextBoxFor(m => m.DownloadBrowsingHistoryMaxCount)%>
				<%= Html.DisplayToolTipFor(m => m.DownloadBrowsingHistoryMaxCount)%> <%= Html.ValidationMessageFor(m => m.DownloadBrowsingHistoryMaxCount)%></span>
		</div>
	</fieldset>
	<fieldset>
		<legend>发信设置</legend>
		<div>
			<span class="editor-label"><%= Html.LabelFor(model => model.SmtpUserName)%>： </span>
			<span class="editor-field"><%= Html.TextBoxFor(model => model.SmtpUserName)%> <%= Html.DisplayToolTipFor(m => m.SmtpUserName)%>
				<%= Html.ValidationMessageFor(model => model.SmtpUserName)%> </span>
		</div>
		<div>
			<span class="editor-label"><%= Html.LabelFor(model => model.SmtpPassword)%>： </span>
			<span class="editor-field"><%= Html.PasswordFor(model => model.SmtpPassword, new { value = Model.SmtpPassword })%>
				<%=Html.DisplayToolTipFor(m => m.SmtpPassword)%> <%= Html.ValidationMessageFor(model => model.SmtpPassword)%>
			</span>
		</div>
		<div>
			<span class="editor-label"><%= Html.LabelFor(model => model.SmtpAddress)%>： </span>
			<span class="editor-field"><%= Html.TextBoxFor(model => model.SmtpAddress)%> <%=Html.DisplayToolTipFor(m => m.SmtpAddress)%>
				<%= Html.ValidationMessageFor(model => model.SmtpAddress)%> </span>
		</div>
		<div>
			<span class="editor-label"><%= Html.LabelFor(model => model.SmtpDisplayName)%>：
			</span>
			<span class="editor-field"><%= Html.TextBoxFor(model => model.SmtpDisplayName)%> <%=Html.DisplayToolTipFor(m => m.SmtpDisplayName)%>
				<%= Html.ValidationMessageFor(model => model.SmtpDisplayName)%> </span>
		</div>
		<div>
			<span class="editor-label"><%= Html.LabelFor(model => model.SmtpReplyTo)%>： </span>
			<span class="editor-field"><%= Html.TextBoxFor(model => model.SmtpReplyTo)%> <%=Html.DisplayToolTipFor(m => m.SmtpReplyTo)%>
				<%= Html.ValidationMessageFor(model => model.SmtpReplyTo)%> </span>
		</div>
	</fieldset>
	<fieldset>
		<legend><%= Html.LabelFor(m=>m.SiteCopyright) %></legend>
		<%= Html.FckEditorFor(m => m.SiteCopyright)%><%= Html.ValidationMessageFor(m => m.SiteCopyright)%>
	</fieldset>
	<fieldset>
		<legend><%= Html.LabelFor(m => m.SiteCounterCode)%> <%=Html.DisplayToolTipFor(m => m.SiteCounterCode)%></legend>
		<%= Html.TextAreaFor(m => m.SiteCounterCode, new { style = "width:100%;height:100px;" }) %> <%= Html.ValidationMessageFor(model => model.SiteCounterCode)%>
	</fieldset>
	<p><input type="submit" value="保 存" /> </p>
	<% } %>
</asp:Content>

