⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 save_site_admin.asp

📁 个人网站模板
💻 ASP
字号:
<!--#include file="conn_admin.asp" -->
<!--#include file="check_admin.asp"-->
<!--#include file="info.asp" -->
<%

founderr=false
if trim(Request.Form("company_name"))="" then
founderr=true
info=info+"<li>请填写您的公司名称</li>"
end if
if trim(Request.Form("contact_man"))="" then
founderr=true
info=info+"<li>请填写联系人的称呼</li>"
end if
if trim(Request.Form("contact_tel"))="" then
founderr=true
info=info+"<li>请填写公司联系电话</li>"
end if
if trim(Request.Form("contact_fax"))="" then
founderr=true
info=info+"<li>请填写公司联系传真</li>"
end if


REM ------如果数据是有效的则开始存储数据并显示相关信息------

if founderr=false then 

set rs=server.createobject("adodb.recordset")
sql="select * from contact order by id desc" 
rs.open sql,conn,1,3
rs("company_name")=Request.Form("company_name")
rs("contact_man")=Request.Form("contact_man")
rs("contact_tel")=Request.Form("contact_tel")
rs("contact_fax")=Request.Form("contact_fax")
if Request.Form("contact_addr")<>"" then
rs("contact_addr")=Request.Form("contact_addr")
end if
if Request.Form("contact_email")<>"" then
rs("contact_email")=Request.Form("contact_email")
end if
if Request.Form("contact_num")<>"" then
rs("contact_num")=Request.Form("contact_num")
end if
if Request.Form("EditorValue")<>"" then
rs("hello")=Request.Form("EditorValue")
end if
%>
<script language=Javascript>
<!--
alert("修改成功");
window.location="site_admin.asp"
-->
</script>
<%
rs.update
rs.close
set rs=nothing
conn.close
Set conn=Nothing

REM ------如果数据是无效的则开始显示错误信息------

else
call infom()
end if

function HTMLEncode2(fString)
	fString = Replace(fString, CHR(13), "")
	fString = Replace(fString, CHR(10) & CHR(10), "</P><P>")
	fString = Replace(fString, CHR(10), "<BR>")
	HTMLEncode2 = fString
end function
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -