www.pudn.com > WiiProduct.rar > aboutSite.asp, change:2009-02-24,size:3510b


<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> 
<%Response.CodePage=65001%> 
<%Response.Charset="UTF-8"%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<!--#include file="admin_check.asp"--> 
<!--#include file="../inc/db_conn_admin.asp"--> 
<!--#include file="../inc/func.asp"--> 
<base target="mainFrame"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<link href="style/admin_style.css" rel="stylesheet" type="text/css" /> 
<link href="style/main.css" rel="stylesheet" type="text/css" /> 
<title> 网站设置 -- WiiProduct后台管理(电脑版) </title> 
</head> 
<% 
	action=request.queryString("action") 
	If action="update" Then 
		name=checkNull(Trim(request.form("name")),"网站名称") 
		pic=Trim(request.form("pic")) 
		a_width=Trim(request.form("width")) 
 
		isProductSort=Trim(request.form("isProductSort")) 
 
		sqlStr="update WP_about set about_name='"&name&"',about_logo='"&pic&"',about_width='"&a_width&"',about_productSort='"&isProductSort&"'" 
		conn.execute(sqlStr) 
 
		response.write "<SCRIPT language='javascript'>" 
		response.write "alert('保存成功!管理界面将重新载入!');top.location.href='admin_index.html';" 
		response.write "</SCRIPT>" 
	End if 
%> 
 <% 
	sqlStr="select top 1 * from WP_about" 
	set rs = server.createobject("ADODB.RecordSet") 
	rs.open sqlStr,conn,1,1 
 
	If rs.eof Then 
		AlertInfo "数据库初始化失败!",,0 
	Else 
		logo=rs("about_logo") 
		name=rs("about_name") 
		a_width=rs("about_width") 
	End If 
	 
	rs.close 
	Set rs=Nothing 
	Set conn=nothing 
 %> 
<body> 
<div class="main"> 
	<h3>网站设置</h3>	 
	<div class="main-content"> 
	  <form id="form2" name="addForm" method="post" action="aboutSite.asp?action=update"> 
			<p class="underline">网站名称:<input name="name" type="text" value="<%=name%>"/></p> 
			<p class="underline">网站Logo:<input name="pic" type="text" value="<%=logo%>"/> <a href="javascript:void(0);" onclick="javascript:window.open('aboutPicUp.asp','upfile','height=200,width=360,status=yes,toolbar=no,menubar=no,location=no')"><img src="images/Upload.gif" alt="上传"/>点击上传图片</a></p> 
			<p class="underline">网站宽度:<input type="radio" name="width" value="0" <%If a_width="0" Then response.write "checked"%>/> 标准(240px)  <input type="radio" name="width" value="1" <%If a_width="1" Then response.write "checked"%>/> 自适应手机屏幕</p> 
			<p class="underline">产品分类:<input type="radio" name="isProductSort" value="1" <%If isProductSort="1" Then response.write "checked"%>/> 是  <input type="radio" name="isProductSort" value="0" <%If isProductSort="0" Then response.write "checked"%>/> 否</p> 
			 
			<p><input type="submit" name="Submit" value="保存" onclick="return checkIn();"/></p> 
				<script language="javascript"> 
					function checkspace(checkstr) { 
					  var str = ''; 
					  for(i = 0; i < checkstr.length; i++) { 
						str = str + ' '; 
					  } 
					  return (str == checkstr); 
					} 
					function checkIn(){ 
						if(checkspace(document.addForm.name.value)) { 
							alert("网站名称不能为空"); 
							return false; 
						} 
					} 
				</script> 
		</form> 
		<div class="note"> 
			<p>提示:网站设置一般在网站启用时做一次性设置,不要做频繁改动,以免出现数据冗余或丢失!</p> 
		</div> 
	</div> 
</div> 
</body> 
</html>