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

📄 addok.asp

📁 该学校网站内容界面清新
💻 ASP
字号:
<!--#include file="conn.asp"-->
<%
Function checkPermission()
	If Session("admin")<>"" then 
		checkPermission=TRUE
	Else
		checkPermission=FALSE
	End if
End Function

tmp=checkPermission()
If tmp=TRUE then
%>

<%   
function encodestr(str)
	dim i
	str=trim(str)
	str=replace(str,"<","&lt;")
	str=replace(str,">","&gt;")
	str=replace(str,"'","""")
	str=replace(str,vbCrLf&vbCrlf,"</p><p>")
	str=replace(str,vbCrLf,"<br>")
	encodestr=replace(str,"  "," ")
end function
 
	title=encodestr(request.form("title"))
	news_content=replace(trim(request.form("news_content")),"'","''")
	guestcontent=encodestr(request.form("guestcontent"))
	classname=Request.Form("classname")
	sql="insert into imgbook (title,guestcontent,news_content,classname) values ('"&title&"','"&guestcontent&"','"&news_content&"','"&classname&"')"
	conn.execute(sql)
    conn.close
    set conn=nothing      %>
<html>
<head>
<title>图片加入数据库成功!</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="refresh" content="1;URL=add.asp">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<div align="center"><br>
  <br>
  <br>
  <br>
  <br>
  <br>
  <font size="2">您的图片已经成功的加入到数据库了。<a href="javascript:history.back()">请返回继续管理</a>! 
  </font></div>
</body>
</html>

<%
Else
	response.redirect "../../login.asp?postion=2"
End if
%>

⌨️ 快捷键说明

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