📄 class.asp
字号:
<!--#include file="sysconfig.asp"-->
<%
'黄华于2008年3月
%>
<%
dim sql,rsguikou,rsdanwei,rsxiangmu,ErrMsg
set rsguikou=server.CreateObject("adodb.recordset")
rsguikou.open "Select * from guikou where cost_delete=0",conn,1,3
%>
<script language="JavaScript" type="text/JavaScript">
function checkBig()
{
if (document.form1.guikouName.value=="")
{
alert("归口名称不能为空!");
document.form1.guikouName.focus();
return false;
}
}
function checkSmall()
{
if (document.form2.guikouName.value=="")
{
alert("请先添加归口名称!");
document.form1.guikouName.focus();
return false;
}
if (document.form2.danweiName.value=="")
{
alert("单位名称不能为空!");
document.form2.danweiName.focus();
return false;
}
}
function checkSmallsub()
{
if (document.form2.xiangmuName.value=="")
{
alert("请先添加单位名称!");
document.form1.danweiName.focus();
return false;
}
if (document.form2.xiangmuName.value=="")
{
alert("项目名称不能为空!");
document.form2.xiangmuName.focus();
return false;
}
}
function ConfirmDelBig()
{
if(confirm("确定要删除此归口吗?删除此归口同时将删除所包含的单位,并且不能恢复!"))
return true;
else
return false;
}
function ConfirmDelSmall()
{
if(confirm("确定要删除此单位吗?一旦删除将不能恢复!"))
return true;
else
return false;
}
function ConfirmDelSmallsub()
{
if(confirm("确定要删除此项目吗?一旦删除将不能恢复!"))
return true;
else
return false;
}
</script>
<!-- #include file="Inc/Head.asp" -->
<BR>
<table cellpadding="2" cellspacing="1" border="0" width="510" align="center" class="a2">
<tr>
<td class="a1" height="25" align="center"><strong>预 算 类 别 设 置</strong></td>
</tr>
<%'系统管理员开始
if admin_quanli=1 then%>
<tr class="a4">
<td align="center">
<br>
<span class="t1">管理选项:<a href="guikou_Add.asp">添加业务科室</a><br>
</span><br>
<table width="500" border="0" cellpadding="0" cellspacing="2" class="border">
<tr bgcolor="#999999" class="t1">
<td width="290" height="25" align="center"><strong>业务科室-单位-项目列表</strong></td>
<td width="210" height="25" align="center"><strong>操作选项</strong></td>
</tr>
<%
do while not rsguikou.eof
%>
<tr bgcolor="#E3E3E3" class="t1">
<td width="290" height="22" bgcolor="#C0C0C0"><img src="Images/tree_folder.gif" width="15" height="15">业务科室:<%=rsguikou("guikou_Name")%></td>
<td align="center" bgcolor="#C0C0C0"><a href="danwei_Add.asp?guikou_id=<%=rsguikou("id")%>">添加单位</a>
| <a href="guikou_edit.asp?id=<%=rsguikou("id")%>">修改</a> | <a href="guikou_del.asp?id=<%=rsguikou("id")%>" onClick="return ConfirmDelBig();">删除</a></td>
</tr>
<%
set rsdanwei=server.CreateObject("adodb.recordset")
rsdanwei.open "Select * from danwei Where cost_delete=0 and guikou_id='" & rsguikou("id") & "'",conn,1,3
if not(rsdanwei.bof and rsdanwei.eof) then
do while not rsdanwei.eof
%>
<tr bgcolor="#E3E3E3" class="t1">
<td width="290" height="22" bgcolor="#E3E3E3"> <img src="Images/tree_folder.gif" width="15" height="15">单位:<%=rsdanwei("danwei_name")%></td>
<td align="center" bgcolor="#E3E3E3"> <a href="xiangmu_Add.asp?guikou_id=<%=rsguikou("id")%>&danwei_id=<%=rsdanwei("id")%>">加项目</a>
| <a href="guikou_edit.asp?id=<%=rsguikou("id")%>"></a><a href="danwei_edit.asp?id=<%=rsdanwei("id")%>">修改</a>
| <a href="danwei_Del.asp?id=<%=rsdanwei("id")%>" onClick="return ConfirmDelSmall();">删除</a></td>
</tr>
<%'项目%>
<%
set rsxiangmu=server.CreateObject("adodb.recordset")
rsxiangmu.open "Select * from xiangmu Where cost_delete=0 and danwei_id='" & rsdanwei("id") & "'",conn,1,3
if not(rsxiangmu.bof and rsxiangmu.eof) then
do while not rsxiangmu.eof
%>
<tr bgcolor="#E3E3E3" class="t1">
<td width="290" height="22" bgcolor="#EEEEEEE"> <img src="Images/tree_folder_sub.gif" width="15" height="15">项目:<%=rsxiangmu("xiangmu_name")%></td>
<td align="center" bgcolor="#EEEEEEE">
<a href="xiangmu_edit.asp?id=<%=rsxiangmu("id")%>">修改</a> | <a href="xiangmu_Del.asp?id=<%=rsxiangmu("id")%>" onClick="return ConfirmDelSmallsub();">删除</a></td>
</tr>
<%
rsxiangmu.movenext
loop
end if
rsxiangmu.close
set rsxiangmu=nothing
rsdanwei.movenext
loop
end if
rsdanwei.close
set rsdanwei=nothing
rsguikou.movenext
loop
%>
</table><BR>
</td>
</tr>
<%'管理员开始
else
if admin_quanli=2 then%>
<tr class="a4">
<td align="center">
<table width="500" border="0" cellpadding="0" cellspacing="2" class="border">
<tr bgcolor="#999999" class="t1">
<td width="290" height="25" align="center"><strong>业务科室-单位-项目列表</strong></td>
<td width="210" height="25" align="center"><strong>操作选项</strong></td>
</tr>
<%
do while not rsguikou.eof
%>
<tr bgcolor="#E3E3E3" class="t1">
<td width="290" height="22" bgcolor="#C0C0C0"><img src="Images/tree_folder.gif" width="15" height="15">业务科室:<%=rsguikou("guikou_Name")%></td>
<td align="center" bgcolor="#C0C0C0">
<%if rsguikou("id")=admin_guikou_id then%><a href="danwei_Add.asp?guikou_id=<%=rsguikou("id")%>">添加单位</a>
| <a href="guikou_edit.asp?id=<%=rsguikou("id")%>">修改</a>
<%end if%>
</td>
</tr>
<%
set rsdanwei=server.CreateObject("adodb.recordset")
rsdanwei.open "Select * from danwei Where cost_delete=0 and guikou_id='" & rsguikou("id") & "'",conn,1,3
if not(rsdanwei.bof and rsdanwei.eof) then
do while not rsdanwei.eof
%>
<tr bgcolor="#E3E3E3" class="t1">
<td width="290" height="22" bgcolor="#E3E3E3"> <img src="Images/tree_folder.gif" width="15" height="15">单位:<%=rsdanwei("danwei_name")%></td>
<td align="center" bgcolor="#E3E3E3">
<%if rsguikou("id")=admin_guikou_id then%>
<a href="xiangmu_Add.asp?guikou_id=<%=rsguikou("id")%>&danwei_id=<%=rsdanwei("id")%>">加项目</a>
| <a href="guikou_edit.asp?id=<%=rsguikou("id")%>"></a><a href="danwei_edit.asp?id=<%=rsdanwei("id")%>">修改</a>
<%end if%>
</td>
</tr>
<%'项目%>
<%
set rsxiangmu=server.CreateObject("adodb.recordset")
rsxiangmu.open "Select * from xiangmu Where cost_delete=0 and danwei_id='" & rsdanwei("id") & "'",conn,1,3
if not(rsxiangmu.bof and rsxiangmu.eof) then
do while not rsxiangmu.eof
%>
<tr bgcolor="#E3E3E3" class="t1">
<td width="290" height="22" bgcolor="#EEEEEEE"> <img src="Images/tree_folder_sub.gif" width="15" height="15">项目:<%=rsxiangmu("xiangmu_name")%></td>
<td align="center" bgcolor="#EEEEEEE">
<%if rsguikou("id")=admin_guikou_id then%>
<a href="xiangmu_edit.asp?id=<%=rsxiangmu("id")%>">修改</a>
<%end if%>
</td>
</tr>
<%
rsxiangmu.movenext
loop
end if
rsxiangmu.close
set rsxiangmu=nothing
rsdanwei.movenext
loop
end if
rsdanwei.close
set rsdanwei=nothing
rsguikou.movenext
loop
%>
</table><BR>
</td>
</tr>
<%'查询者开始
else
if admin_quanli=3 then%>
<tr class="a4">
<td align="center">
<table width="100%" border="0" cellpadding="0" cellspacing="2" class="border">
<tr bgcolor="#999999" class="title">
<td width="290" height="25" align="center" class="t1"><strong>业务科室-单位-项目列表</strong></td>
</tr>
<%
do while not rsguikou.eof
%>
<tr bgcolor="#E3E3E3" class="tdbg">
<td width="290" height="22" bgcolor="#C0C0C0" class="t1"><img src="Images/tree_folder.gif" width="15" height="15">业务科室:<%=rsguikou("guikou_Name")%></td>
</tr>
<%
set rsdanwei=server.CreateObject("adodb.recordset")
rsdanwei.open "Select * from danwei Where cost_delete=0 and guikou_id='" & rsguikou("id") & "'",conn,1,3
if not(rsdanwei.bof and rsdanwei.eof) then
do while not rsdanwei.eof
%>
<tr bgcolor="#E3E3E3" class="tdbg">
<td width="290" height="22" bgcolor="#E3E3E3" class="t1"> <img src="Images/tree_folder.gif" width="15" height="15">单位:<%=rsdanwei("danwei_name")%></td>
</tr>
<%'项目%>
<%
set rsxiangmu=server.CreateObject("adodb.recordset")
rsxiangmu.open "Select * from xiangmu Where cost_delete=0 and danwei_id='" & rsdanwei("id") & "'",conn,1,3
if not(rsxiangmu.bof and rsxiangmu.eof) then
do while not rsxiangmu.eof
%>
<tr bgcolor="#E3E3E3" class="tdbg">
<td width="290" height="22" bgcolor="#EEEEEEE" class="t1"> <img src="Images/tree_folder_sub.gif" width="15" height="15">项目:<%=rsxiangmu("xiangmu_name")%></td>
</tr>
<%
rsxiangmu.movenext
loop
end if
rsxiangmu.close
set rsxiangmu=nothing
rsdanwei.movenext
loop
end if
rsdanwei.close
set rsdanwei=nothing
rsguikou.movenext
loop
%>
</table>
<BR>
</td>
</tr>
<%end if
end if
end if%>
</table>
<BR>
<%htmlend%>
<%
rsguikou.close
set rsguikou=nothing
call CloseConn()
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -