"
ParentID=TypeRS("TypeID")
set ListRS=server.createobject("adodb.recordset")
sqlstr="select * from " & trim(TB_Name) & " Where ParentID=" & ParentID & " order by Sort_NO "
'response.write sqlstr
ListRS.open sqlstr,ConnObj,1
for i =1 to ListRS.recordcount /2 +1
if ListRS.eof then exit for
response.write "
"
for j=1 to L
if ListRs.eof then exit for
response.write "
"
end sub
'检查email
function IsValidEmail1(email)
dim names, name, i, c
IsValidEmail1 = true
names = Split(email, "@")
if UBound(names) <> 1 then
IsValidEmail1 = false
exit function
end if
for each name in names
if Len(name) <= 0 then
IsValidEmail1 = 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
IsValidEmail1 = false
exit function
end if
next
if Left(name, 1) = "." or Right(name, 1) = "." then
IsValidEmail1 = false
exit function
end if
next
if InStr(names(1), ".") <= 0 then
IsValidEmail1 = false
exit function
end if
i = Len(names(1)) - InStrRev(names(1), ".")
if i <> 2 and i <> 3 then
IsValidEmail1 = false
exit function
end if
if InStr(email, "..") > 0 then
IsValidEmail1 = false
end if
end function
function FormatWord_A(word) '格式化文字正常显示方式
word=replace(word,chr(13)," ")
FormatWord_A=word
end function
function FormatWord_C(Word)
if word<>"" then
word=replace(word," "," ")
word=replace(word,chr(13)," ")
FormatWord_C=word
else
FormatWord_C = word
end if
end function
function FormatSmallDate(word) '取日期不需时间
if isdate(word) then
if instr(1,word," ") >0 then '判断如果带有时间,则去掉时间后缀
FormatSmallDate = Cstr(mid(word,1,InStr(1,word," ")-1))
else
FormatSmallDate = Cstr(word)
end if
else
FormatSmallDate=" "
end if
end function
function FormatSmallDateA(word) '将日期转换成[04/12]格式
dim monthStr
if isdate(word) then
monthStr = month(word)
if monthStr < 10 then monthStr = "0" &cstr(monthStr)
monthStr = monthStr &"/" & day(word)
else
monthStr =" "
end if
FormatSmallDateA = Cstr(monthStr)
end function
function FormatSmallDateCN(word) '取日期不需时间
FormatSmallDateCN =FormatSmallDate(word)
if isdate(FormatSmallDateCN) then
a=split(FormatSmallDateCN,"-")
FormatSmallDateCN= a(0)&"年"& a(1) &"月"& a(2)&"日"
else
FormatSmallDateCN=" "
end if
end function
function upload_time(tt)
dim ttt:ttt=tt
ttt=replace(ttt,":","_"):ttt=replace(ttt,"-","_")
ttt=replace(ttt," ","_"):ttt=replace(ttt,"/","_")
ttt=replace(ttt,"PM",""):ttt=replace(ttt,"AM","")
ttt=replace(ttt,"上午",""):ttt=replace(ttt,"下午","")
upload_time=ttt
end function
rem 更新个人用户站内积分
sub Add_Avo(ConnObj,User_Name,Num_Avo)
if Num_Avo="" or not Isnumeric(Num_Avo) then exit sub
if User_Name="" or User_Name="游客" then exit sub
sql="Update Web_TB_User_Statistic set Current_Avo=Current_Avo+"&Num_Avo&" where User_Name='" & replace(User_Name,"'","''") &"'"
ConnObj.execute(sql)
end sub
rem 添加银行业务办理明细记录
rem 调用方法如: call Add_E_Money_List(conn,"luoou","支出","E币取款","银行E币",20,"61.125.123.45")
rem 参数除E_money为数值型外,其它都为字符串型
sub Add_E_Money_List(ConnObj,Operation_User_Name,Operation_Mode,Operation_Type,Operation_Origin,Operation_Tendency,Operation_E_money,Operation_Add_IP)
on error resume next
dim InsertSqlstr
if Operation_User_Name ="" then exit sub
if Operation_Mode = "" then Operation_Mode="不明确"
if Operation_Type = "" then Operation_Type ="不明确"
if Operation_Origin="" then Operation_Origin="不明确"
if Operation_Tendency="" then Operation_Tendency="不明确"
if not isnumeric(Operation_E_money) then Operation_E_money =0
if Operation_Add_IP="" then Operation_Add_IP="不明确"
InsertSqlstr = " insert into WEB_TB_E_Money_List (User_Name,Operation_Mode,Operation_Type,Operation_Origin,Operation_Tendency,E_money,Add_IP ) values "
InsertSqlstr = InsertSqlstr & "('" & replace(Operation_User_Name,"'","''") &"'"
InsertSqlstr = InsertSqlstr & ",'" & replace(Operation_Mode,"'","''") &"'"
InsertSqlstr = InsertSqlstr & ",'" & replace(Operation_Type,"'","''") &"'"
InsertSqlstr = InsertSqlstr & ",'" & replace(Operation_Origin,"'","''") &"'"
InsertSqlstr = InsertSqlstr & ",'" & replace(Operation_Tendency,"'","''") &"'"
InsertSqlstr = InsertSqlstr & "," & Operation_E_money
InsertSqlstr = InsertSqlstr & ",'" & replace(Operation_Add_IP,"'","''") &"')"
ConnObj.execute (InsertSqlstr)
end sub
rem 用与后台管理时删除用户不合法数据时所带的附件,如稿件、照片等
rem 如果传入的文件绝对目录中带有(:)将不删除,直接跳过程序
rem FileAbsoluteName参为格式为:/images/1.jpg 或者 /articles/file/2002_04_01.htm
sub delFile(FileAbsoluteName)
on error resume next
FileAbsoluteName = trim(FileAbsoluteName)
if instr(1,FileAbsoluteName,":") > 0 then exit sub
if FileAbsoluteName="" then exit sub
dim fs
set fs=server.CreateObject("scripting.filesystemObject")
if fs.FileExists(server.MapPath(FileAbsoluteName)) then
fs.DeleteFile(server.MapPath(FileAbsoluteName))
end if
set fs=nothing
end sub
function SendMail(SMTPServer,sender,mailto,subject,content)
dim JMail
on error resume next
Set JMail = Server.CreateObject("JMail.SMTPMail")
JMail.LazySend = true '这个属性是将邮件放入缓冲直至发出为止,的不到任何的错误信息
JMail.Charset = "gb2312" '设定邮件的字符集,默认为"US-ASCII" 一般中文用"gb2312",还有euc-kr
JMail.ContentType = "text/html" '这个邮件的头设置, 默认为 "text/plain" 能设置成你需要的任何情况。
JMail.ServerAddress =SMTPServer 'SERVER的地址。可以有很多的SERVER地址,后可跟端口号
JMail.Sender = sender '邮寄的发送地址
JMail.Subject = subject '邮件的标题。
JMail.AddRecipient mailto '加入一个收件地址者
JMail.Body = content 'UBBCode(htmlencode(content))E-Mail的主体
JMail.Priority = 1 '邮件的优先级,可以范围从1到5。越大的优先级约高,比如,5最高,1最低,一般设置为3
JMail.AddHeader "Originating-IP", Request.ServerVariables("REMOTE_ADDR") 'addheader加入一个头信息
'remote_addr发出请求的机器的IP地址
JMail.Execute '执行邮件发送到SERVER
set jMail=nothing
if err then '检测
SendMail=err.description
err.clear
else
SendMail="OK"
end if
end function
%>
<%
dim rs,sqlstr
set rs=server.CreateObject("adodb.recordset")
sqlstr = " select top 10 "
sqlstr = sqlstr & " A.Meet_ID, "
sqlstr = sqlstr & " A.Meet_Property_NO, "
sqlstr = sqlstr & " B.Type_Name as Meet_Property_Name, "
sqlstr = sqlstr & " A.User_Name, "
sqlstr = sqlstr & " A.Province_NO, "
sqlstr = sqlstr & " C.Type_Name as Province_Name, "
sqlstr = sqlstr & " A.Place_NO, "
sqlstr = sqlstr & " D.Type_Name as Place_Name, "
sqlstr = sqlstr & " A.Sex, "
sqlstr = sqlstr & " A.Start_Age, "
sqlstr = sqlstr & " A.Meet_Place, "
sqlstr = sqlstr & " A.Meet_Date, "
sqlstr = sqlstr & " A.Meet_Mark, "
sqlstr = sqlstr & " A.Meet_Title, "
sqlstr = sqlstr & " A.Meet_Content, "
sqlstr = sqlstr & " A.End_Age, "
sqlstr = sqlstr & " A.End_Flag, "
sqlstr = sqlstr & " A.Read_Count, "
sqlstr = sqlstr & " A.Add_Date, "
sqlstr = sqlstr & " A.Modify_Date, "
sqlstr = sqlstr & " A.Add_IP, "
sqlstr = sqlstr & " A.Modify_IP ,"
sqlstr = sqlstr & " (select count(*) from WEb_TB_Meet_Revert where Meet_ID = A.Meet_ID ) as Revert_count"
sqlstr = sqlstr & " from WEB_TB_Meet A "
sqlstr = sqlstr & " left outer join WEB_TB_Meet_Property_dim B "
sqlstr = sqlstr & " On A.Meet_Property_NO = B.TypeID "
sqlstr = sqlstr & " Left Outer Join WEB_TB_Province_dim C "
sqlstr = sqlstr & " On A.Province_NO = C.TypeID "
sqlstr = sqlstr & " Left Outer Join WEB_TB_Province_dim D "
sqlstr = sqlstr & " On A.Place_NO = D.TypeID "
sqlstr = sqlstr & " Where A.End_Flag = 0 "
sqlstr = sqlstr & " order by A.Add_Date desc"
rs.open sqlstr,conn,1
%>
Untitled Document
<%
if Request.Cookies("517eCookie")("UserName") <> "" then
response.write ""
response.write Request.Cookies("517eCookie")("UserName") &"在线"
end if
%>