checkright.asp
来自「投资管理系统, asp+ mssql server」· ASP 代码 · 共 1,233 行 · 第 1/4 页
ASP
1,233 行
sql="select gongwenzhongleiid as id,mingcheng from gongwenzhonglei where doctype=" & intdoctype
end if
set rs= conn.execute(sql)
if not rs.eof then
while not rs.eof
if wz <> "" then
if cint(wz) = cint(rs("id")) then
response.write("<option value="& rs("id") &" selected>"&trim(rs("mingcheng"))&"</option>")
else
response.write("<option value="& rs("id") &">"&trim(rs("mingcheng"))&"</option>")
end if
else
response.write("<option value="& rs("id") &">"&trim(rs("mingcheng"))&"</option>")
end if
rs.movenext
wend
end if
Response.Write("</select></td><td>文件序号:<input class=noborder name=xh value='"&xh&"'></td></tr>")
Response.Write("<tr><td>文 件 字:<INPUT class=noborder name=wjz value='"& wjz &"' size=10></td><td>文 件 号:<input class=noborder name=wjh size=10 value='"&wjh&"'></td></tr>")
Response.Write("<tr><td>文件标题:<INPUT class=noborder name=bt value='"& bt &"' size=10></td><td>主 题 词:<input class=noborder name=ztc size=10 value='"&ztc&"'></td></tr>")
'response.write "<tr><td colspan=2>归档种类:<select name=""doctype""><option value="""">不限</option><option value=""0"""
'if cint(doctype)=0 then
' response.write " selected"
'end if
'response.write ">收文</option><option value=""1"""
'if cint(doctype)=1 then
' response.write " selected"
'end if
'response.write ">发文</option></select><td></tr>"
Response.Write("<tr><td align=center colspan=2><input class=buttoncss name=subfrm type=submit value=查询公文><input type=reset value=取消重填 class=buttoncss><td></tr>")
Response.Write("</table>")
end sub
'=============================================================================================
' s
'=============================================================================================
sub Searchkw(intTableWidth,intTableheight,intdoctype)
bt = request("bt")
ztc = request("ztc")
wz = request("wz")
doctype=request.form("doctype")
if doctype="" then
doctype=100
end if
'response.write wz
Response.Write("<table border=0 cellspacing=0 cellpadding=3 height="& intTableheight &" width="& intTableWidth &" align=center>")
Response.Write("<tr><td align=center colspan=2>刊物查询</td></tr>")
Response.Write("<tr><td>刊物种类:<select name=wz><option value=-1>不限</option>")
if intdoctype =-1 then
sql="select gongwenzhongleiid as id,mingcheng from gongwenzhonglei"
else
sql="select gongwenzhongleiid as id,mingcheng from gongwenzhonglei where doctype=" & intdoctype
end if
set rs= conn.execute(sql)
if not rs.eof then
while not rs.eof
if wz <> "" then
if cint(wz) = cint(rs("id")) then
response.write("<option value="& rs("id") &" selected>"&trim(rs("mingcheng"))&"</option>")
else
response.write("<option value="& rs("id") &">"&trim(rs("mingcheng"))&"</option>")
end if
else
response.write("<option value="& rs("id") &">"&trim(rs("mingcheng"))&"</option>")
end if
rs.movenext
wend
end if
Response.Write("</select></td><td>出刊单位:<input type=text name='ckdw' size=10 class=noborder></td></tr>")
Response.Write("<tr></tr>")
Response.Write("<tr><td>刊物标题:<INPUT class=noborder name=bt value='"& bt &"' size=10></td><td>主 题 词:<input class=noborder name=ztc size=10 value='"&ztc&"'></td></tr>")
Response.Write("<tr><td align=center colspan=2><input class=buttoncss name=subfrm type=submit value=查询公文><input type=reset value=取消重填 class=buttoncss><td></tr>")
Response.Write("</table>")
end sub
'=============================================================================================
' s
'=============================================================================================
sub Searchdcgz(intTableWidth,intTableheight,intdoctype)
bt = request("bt")
ztc = request("ztc")
wz = request("wz")
doctype=request.form("doctype")
if doctype="" then
doctype=100
end if
'response.write wz
Response.Write("<table border=0 cellspacing=0 cellpadding=3 height="& intTableheight &" width="& intTableWidth &" align=center>")
Response.Write("<tr><td align=center colspan=2>督察工作查询</td></tr>")
Response.Write("<td>出 版 单 位 :<input type=text name='ckdw' size=10 class=noborder></td></tr>")
Response.Write("<tr></tr>")
Response.Write("<tr><td>督察工作标题:<INPUT class=noborder name=bt value='"& bt &"' size=10></td><td>主 题 词:<input class=noborder name=ztc size=10 value='"&ztc&"'></td></tr>")
Response.Write("<tr><td align=center colspan=2><input class=buttoncss name=subfrm type=submit value=查询公文><input type=reset value=取消重填 class=buttoncss><td></tr>")
Response.Write("</table>")
end sub
'=============================================================================================
' s
'=============================================================================================
sub Searchzwzb(intTableWidth,intTableheight,intdoctype)
bt = request("bt")
ztc = request("ztc")
wz = -2
doctype=request.form("doctype")
if doctype="" then
doctype=100
end if
'response.write wz
Response.Write("<table border=0 cellspacing=0 cellpadding=3 height="& intTableheight &" width="& intTableWidth &" align=center>")
Response.Write("<tr><td align=center colspan=2>政务值班查询</td></tr>")
Response.Write("<td>出 版 单 位 :<input type=text name='ckdw' size=10 class=noborder></td></tr>")
Response.Write("<tr></tr>")
Response.Write("<tr><td>政务值班标题:<INPUT class=noborder name=bt value='"& bt &"' size=10></td><td>主 题 词:<input class=noborder name=ztc size=10 value='"&ztc&"'></td></tr>")
Response.Write("<tr><td align=center colspan=2><input class=buttoncss name=subfrm type=submit value=查询公文><input type=reset value=取消重填 class=buttoncss><td></tr>")
Response.Write("</table>")
end sub
'=============================================================================================
' s
'=============================================================================================
sub Searchxfgz(intTableWidth,intTableheight,intdoctype)
bt = request("bt")
ztc = request("ztc")
wz = -2
doctype=request.form("doctype")
if doctype="" then
doctype=100
end if
'response.write wz
Response.Write("<table border=0 cellspacing=0 cellpadding=3 height="& intTableheight &" width="& intTableWidth &" align=center>")
Response.Write("<tr><td align=center colspan=2>信访工作查询</td></tr>")
Response.Write("<td>出 版 单 位 :<input type=text name='ckdw' size=10 class=noborder></td></tr>")
Response.Write("<tr></tr>")
Response.Write("<tr><td>信访工作标题:<INPUT class=noborder name=bt value='"& bt &"' size=10></td><td>主 题 词:<input class=noborder name=ztc size=10 value='"&ztc&"'></td></tr>")
Response.Write("<tr><td align=center colspan=2><input class=buttoncss name=subfrm type=submit value=查询公文><input type=reset value=取消重填 class=buttoncss><td></tr>")
Response.Write("</table>")
end sub
'=============================================================================================
' s
'=============================================================================================
sub cleartempright()
sql = "delete tmpright"
conn.execute(sql)
end sub
'funcion check the current user's right
'parameters
'strModule is the name of module
'intRightType is right type
'0 represents read right
'1 represents write right
'2 represents edit right
'3 represents delete right
'=============================================================================================
' s
'=============================================================================================
sub chkright(strModule,intRightType)
select case intRightType
case 0
sql = "select * from [user] a ,personalright b,module c where a.userid=" & Session("CurrentUserID") & " and a.userid = b.userid and c.moduleid =b.moduleid and c.name='"& strModule &"' and b.readright=1"
case 1
sql = "select * from [user] a ,personalright b,module c where a.userid=" & Session("CurrentUserID") & " and a.userid = b.userid and c.moduleid =b.moduleid and c.name='"& strModule &"' and b.writeright=1"
case 2
sql = "select * from [user] a ,personalright b,module c where a.userid=" & Session("CurrentUserID") & " and a.userid = b.userid and c.moduleid =b.moduleid and c.name='"& strModule &"' and b.editright=1"
case 3
sql = "select * from [user] a ,personalright b,module c where a.userid=" & Session("CurrentUserID") & " and a.userid = b.userid and c.moduleid =b.moduleid and c.name='"& strModule &"' and b.deleteright=1"
end select
'response.write sql
set rs = conn.execute(sql)
if rs.eof then
'Response.write("<SCRIPT LANGUAGE=""JavaScript"">")
select case intRightType
case 0
Response.write("<p align=center><font color=red size=2>你没有访问"& strModule &"的查询权限!!<br><a href='javascript:history.back()'>返回</a></font></p>")
case 1
Response.write("<p align=center><font color=red size=2>你没有访问"& strModule &"的录入权限!!<br><a href='javascript:history.back()'>返回</a></font></p>")
case 2
Response.write("<p align=center><font color=red size=2>你没有访问"& strModule &"的修改权限!!<br><a href='javascript:history.back()'>返回</a></font></p>")
case 3
Response.write("<p align=center><font color=red size=2>你没有访问"& strModule &"的删除权限!!<br><a href='javascript:history.back()'>返回</a></font></p>")
end select
'Response.write("<SCRIPT>")
Response.end
end if
set rs =nothing
end sub
'=============================================================================================
' s
'=============================================================================================
sub FollowSelection0(strSelLiuCheng)
response.write ("<table width='600' border='0' cellspacing='0' cellpadding='5'>")
response.write("<tr><td>选择下一步处理流程")
PutSelectObject "lcid","",request.form("lcid"),"",strSelLiuCheng,conn
response.write("</td>")
response.write("<td>选择下一步处理人员")
WriteSelPeople ""
response.write("</td></tr>")
response.write("<table>")
end sub
sub FollowSelection(objUP,strSelLiuCheng)
response.write ("<table width='600' border='0' cellspacing='0' cellpadding='5'>")
response.write("<tr><td>选择下一步处理流程")
PutSelectObject "lcid","",objUP.form("lcid"),"",strSelLiuCheng,conn
response.write("</td>")
response.write("<td>选择下一步处理人员")
WriteSelPeople ""
response.write("</td></tr>")
response.write("<table>")
end sub
'=============================================================================================
' s
'=============================================================================================
sub HavenFollowedControl(wjid)
sql = "select a.mingcheng,b.BanLiRen,banliqingkuangid as id,b.wenjianid,XiaYiChuLiRenID from liucheng a, banliqingkuang b where b.BanLiBuZhouId =a.LiuChengID and b.wenjianid=" & wjid & " and b.status=0 order by BanLiQingKuangID"
'Response.Write sql
set rs =conn.execute(sql)
while not rs.eof
mc = mc &"<a href='#'title='单击可以设置该条公文的处理意见' onclick=""OpenNewWin('gw_yj.asp?wjid="& rs("wenjianid") &"&renid="& rs("XiaYiChuLiRenID")& "&ren="& trim(rs("banliren")) &"&bz="& trim(rs("mingcheng")) &"','searfilewin1','left=200,top=200,width=400,height=300,resizable=yes,scrollbars=1,titlebar=0,status=0')"">" & trim(rs("mingcheng")) &"("& trim(rs("banliren")) & ")" & "</a>->"
rs.movenext
wend
set rs = nothing
if mc <> "" then
mc = left(mc,len(mc)-2)
Response.Write "已经历的流程:" & mc & "<br>"
end if
end sub
'=============================================================================================
' s
'=============================================================================================
sub yushi(wenjianid)
if request("b_yueshi")<> "" then
sql ="insert into yueshi(wenjianid,YueShiren,shijian) values("& Request("wjid") &",'"& getuser &"',' " & now() &" ')"
'Response.Write (sql)
conn.execute(sql)
end if
if wenjianid <> "" then
sql = "select * from yueshi where wenjianid=" & wenjianid & " and YueShiren='"& getuser &"'"
set rs = conn.execute(sql)
if not rs.eof then
else
Response.Write ("<input type=hidden name='wjid' value='"& wenjianid &"'><p align=center><input type=submit name='b_yueshi' value='我阅示了' class=buttoncss></p>")
end if
set rs = nothing
end if
end sub
'=============================================================================================
' s
'=============================================================================================
sub SelOneItem(strSql,strConn)
set rs = strConn.execute(strSql)
if not rs.eof then
Response.Write rs(0)
end if
set rs = nothing
end sub
'=============================================================================================
'=============================================================================================
SUB PutTypeSelectObject(PersonType,CompareValue)
dim TempString
TempString="select DataTypeID,DataTypeName from PersonDataType where UserID=" & Session("CurrentUserID") & " and IsPublish='Y' and dtStatus='E' and ParentData='" & PersonType & "'"
if CompareValue = "" then
PutSelectObject "DataTypeID","---请选择类别---",Request.Form("datatypeid"),"",TempString,conn
else
PutSelectObject "DataTypeID","---请选择类别---",CompareValue,"",TempString,conn
end if
END SUB
'===========================================================
'======================================================================================================
function GetInsertValue(ObjIDValue,HaveYing)
if CSTR(ObjIDValue) = "" or isempty(ObjIDValue) or isnull(ObjIDValue) then
GetInsertValue = ",null"
else
if (HaveYing) then
GetInsertValue = ",'" + ObjIDValue + "'"
else
GetInsertValue = "," + ObjIDValue
end if
end if
end function
'========================================================
'======================================================================================================
function GetUpdateValue(HaveDou,ObjID,ObjIDValue,HaveYing)
TempUpdateValue=""
if HaveDou then
TempUpdateValue = TempUpdateValue + ","
end if
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?