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

📄 xinxi_editchk.asp

📁 二手程序,可是实现会员的等级功能管理,会员可以有上船图片,给信息标题加颜色功能!
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="../err.asp"-->
<!--#include file=cookies.asp-->
<%
function chkijob(char) 
if instr(char,"'") then 
response.write "错误字符!"
response.end 
end if
if instr(char,"|") then
response.write "错误字符!"
response.end 
end if
if instr(char,"<") then
response.write "错误字符!"
response.end 
end if
if instr(char,">") then
response.write "错误字符!"
response.end 
end if
if instr(char,"&") then
response.write "错误字符!"
response.end 
end if
if instr(char,"%") then
response.write "错误字符!"
response.end 
end if
if instr(char,";") then
response.write "错误字符!"
response.end 
end if
if instr(char,"$") then
response.write "错误字符!"
response.end 
end if
end function
function IsValidEmail(email)
dim names, name,i,c
IsValidEmail = true
names = Split(email, "@")
if UBound(names) <> 1 then
   IsValidEmail = false
   exit function
end if
for each name in names
   if Len(name) <= 0 then
     IsValidEmail = false
     exit function
   end if
   for i = 1 to Len(name)
     c = Lcase(Mid(name, i, 1))
     if InStr("abcdefghijklmnopqrstuvwxyz_-.", c) <= 0 and not IsNumeric(c) then
       IsValidEmail = false
       exit function
     end if
   next
   if Left(name, 1) = "." or Right(name, 1) = "." then
      IsValidEmail = false
      exit function
   end if
next
if InStr(names(1), ".") <= 0 then
   IsValidEmail = false
   exit function
end if
i = Len(names(1)) - InStrRev(names(1), ".")
if i <> 2 and i <> 3 then
   IsValidEmail = false
   exit function
end if
if InStr(email, "..") > 0 then
   IsValidEmail = false
end if
end function
dim rs,sql,class1,class2,biaoti,jiage,diqu,memo,username,userip,id
username=request.cookies("ijob")("username")
class1=trim(request("class1"))
class2=trim(request("class2"))
biaoti=trim(request("biaoti"))
jiage=trim(request("jiage"))
diqu=trim(request("diqu"))
memo=trim(request("memo"))
if class1="0" or class1="" then
errijob(10)
response.end
end if
if class2="0" or class2="" then
errijob(11)
response.end
end if
if biaoti="" then
errijob(12)
response.end
end if
chkijob(biaoti)
if len(biaoti)>40 then
errijob(21)
response.end
end if
if jiage="" or not isnumeric(jiage) then
errijob(14)
response.end
end if
if len(diqu)<1 or len(diqu)>10 then
errijob(15)
response.end
end if
if memo="" then
errijob(16)
response.end
end if
if trim(request("name"))="" then
errijob(17)
response.end
end if
if trim(request("email"))="" then
errijob(18)
response.end
end if
if IsValidEmail(trim(request("email")))=false then
errijob(19)
response.end
end if
if trim(request("dianhua"))="" then
errijob(20)
response.end
end if
id=trim(request("id"))
set rs=server.createobject("adodb.recordset")
sql = "select class1,class2,biaoti,leixing,jiage,diqu,memo,name,email,dianhua,fbsj from xinxi where id="&cstr(id)
rs.open sql,conn,1,3
if rs.eof then
errijob(0)
response.end
end if
rs("class1")=class1
rs("class2")=class2
rs("biaoti")=biaoti
rs("leixing")=request("leixing")
rs("jiage")=jiage
rs("diqu")=diqu
rs("memo")=memo
rs("name")=trim(request("name"))
rs("email")=trim(request("email"))
rs("dianhua")=trim(request("dianhua"))
rs("fbsj")=now()
rs.update
rs.close
set rs=nothing
closedb
response.write "<p align=""center"">修改<font color=ff0000>"&biaoti&"</font>成功!</p>"
response.write "<meta http-equiv=refresh content=""1;URL=xinxi.asp"">"
%>

⌨️ 快捷键说明

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