?? functions.asp
字號:
<%
dim k,rs,LeftMenuWidth
dim mBackImage
LeftMenuWidth=160
if instr(Request.Servervariables("HTTP_USER_AGENT"),"MSIE")<=0 then
response.write "非法訪問!"
respoonse.end
end if
Dim temptime,fromYear,fromMonth,fromSecond,fromDay,fromMinute,fromHour,nowdate
'獲得格式化的當前時間
temptime = now()
fromYear = year(temptime)
fromMonth = fmt(month(temptime),2)
fromDay = fmt(day(temptime),2)
fromMinute= fmt(Minute(Time()),2)
fromHour = fmt(Hour(Time()),2)
fromSecond= fmt(Second(Time()),2)
nowdate = "" & fromYear & "-" & fromMonth & "-" & fromDay & " " & fromHour & ":" & fromMinute
function createmailbox(vname)
'以下為分配郵箱代碼
sql="create table recived"
sql=sql+vname+"(iDateTime varchar(50),iaddfile varchar(150), ifrom varchar(50),iinfo memo,ilevel char(1),cent varchar(50),iread char(1))"
Session("conn2").Execute(sql)
sql="create table sendout"
sql=sql+vname+"(iDateTime varchar(50),iaddfile varchar(150), ito varchar(50),iinfo memo,ilevel char(1),cent varchar(50),iread char(1))"
Session("conn2").Execute(sql)
sql="create table del"
sql=sql+vname+"(iDateTime varchar(50),iaddfile varchar(150), ifrom varchar(50),iinfo memo,ilevel char(1),cent varchar(50),iread char(1))"
Session("conn2").Execute(sql)
end function
function fmt(str,width)
fmt=right(string(width,"0") & str ,width)
end function
function fixx(str,width)
dim i,t,getwidth,actlen
str=replace(str,"<","<")
str=replace(str,">",">")
actlen=len(str)
t=0
for i=1 to width
if mid(str,i)<="z" then t=t+1
next
getwidth=(width+t)
str=left(str,getwidth)
str=replace(str,"<","<")
str=replace(str,">",">")
if width+t<=actlen then fixx=str+"<small>...</small>" else fixx=str
end function
sub showerror(msg) 'showerror message and go back
response.write("<script language=javascript>alert('" & msg & "');window.history.back()</script>")
Response.end
end sub
function GetHistory(rs,table,valuefield,textfield,where)
'讀取列表信息
dim stylelist
rs.open "select DISTINCT "&valuefield&" from "&table&where,oconn,1,1
while not rs.eof
stylelist=stylelist & "<option value='" & rs(vaulefield) & "'>" & rs("textfield") & "</option>"
rs.movenext
wend
rs.close
GetHistory=stylelist
end function
sub cout(msg) 'showerror message and go back
response.write(msg)
end sub
function bstr(msg)
bstr="<b>" & msg & "</b>"
end function
function redstr(msg)
redstr="<font color=red>" & msg & "</font>"
end function
function bluestr(msg)
bluestr="<font color=blue>" & msg & "</font>"
end function
sub getvalueto(rs)
dim item
for each item in rs.fields
if request(item.name).count>0 and ucase(item.name) <>"ID" then item.value=request(item.name)
next
end sub
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -