📄 client_productspjc_show.asp
字号:
<%
'OA 表单生成器1.0
'功能:查看食品质量检测记录
'参数:request("id")=int #记录ID
%>
<!--#include file="../inc/NoCatch.asp"-->
<!--#include file="../inc/Secure.asp"-->
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/Const.asp"-->
<!--#include file="./Client_menu.asp"-->
<%
'response.buffer=false
'------------------------------------------------设置参数
LoginID=trim(Session("LoginID")) : if LoginID="" then LoginID=0 '当前用户ID
cid=clng(request("cid")) '记录ID
table="tbioaClient_ProductSpJc" '表名
'------------------------------------------------
'------------------------------------------------删除记录
if request("mod")="dele" then
id=request("id") : if id="" then id=0 '删除记录ID
oConn.Execute "delete from "&table&" where id="&id
response.write "<script>alert('记录成功删除!');history.back()</script>"
response.end
end if
'------------------------------------------------
'------------------------------------------------取记录
'取要查看的记录 (返回rs对象)
set rs=Server.CreateObject("ADODB.RecordSet")
sql="select *,(select count(*) from tbioaClient_SpBase where cpmc=tab.spmc and sbbs=tab.ppsb) as smod from " & table & " tab where cid="&cid
rs.open sql,oConn,1,1
'------------------------------------------------
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/main.css" type=text/css>
<title>食品质量检测记录详细信息</title>
</head>
<body topmargin="10" leftmargin="10">
<%call ClientMenu("食品质量检测")%>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td>
<p align="left"><img border="0" src="../images/icon_title.gif" align="left">食品质量检测:</p>
</td>
<td width="90" class="noprint">
<p align="left"><img border="0" src="../images/icon_save.gif" align="left">
<a href="Client_ProductSpJc_edit.asp?cid=<%=cid%>">添加记录</a>
</td>
</tr>
</table>
<%if rs.eof then%>
<center>暂无相关信息!</center>
<%response.end
end if%>
<table width="100%" cellspacing="1" cellpadding="2" class="tab">
<tr>
<td class="td3" align="center" nowrap>食品名称</td>
<td class="td3" align="center" nowrap>注册商标</td>
<td class="td3" align="center" nowrap>生产单位</td>
<td class="td3" align="center" nowrap>合格与否</td>
<td class="td3" align="center" nowrap>不合格指标</td>
<td class="td3" align="center" nowrap>抽检批次</td>
<td class="td3" align="center" nowrap>抽检时间</td>
<td class="td3" align="center" nowrap>处罚情况</td>
<td class="td3" align="center" nowrap>抽检费用</td>
<td class="td3" align="center" nowrap>备注</td>
<td class="tdTop3np" colspan="2" align="center" nowrap>相关操作</td>
</tr>
<%for i = 0 to rs.recordcount-1
If rs.EOF Then Exit For
if i mod 2 = 0 then td_class="td1" else td_class="td2"
if rs("smod")>0 then td_class="td6"
%>
<tr>
<td class="<%=td_class%>"><%=HtmlOut(rs("spmc"))%></td>
<td class="<%=td_class%>">
<%if rs("smod")>0 then
response.write "<a href='Client_SpBase_list.asp?cpmc="&HtmlOut(rs("spmc"))&"&sbbs="&HtmlOut(rs("ppsb"))&"' target='_blank' class='link'>"&HtmlOut(rs("ppsb"))&"</a>"
else
response.write HtmlOut(rs("ppsb"))
end if
%>
</td>
<td class="<%=td_class%>"><%=HtmlOut(rs("scdw"))%></td>
<td class="<%=td_class%>"><%if rs("hgyf")="1" then response.write "不合格" else response.write "合格"%></td>
<td class="<%=td_class%>"><%=HtmlOut(rs("bhgzb"))%></td>
<td class="<%=td_class%>"><%=HtmlOut(rs("cjpc"))%></td>
<td class="<%=td_class%>"><%=HtmlOut(rs("cjsj"))%></td>
<td class="<%=td_class%>"><%=HtmlOut(rs("cfqk"))%></td>
<td class="<%=td_class%>"><%=HtmlOut(rs("cjfy"))%></td>
<td class="<%=td_class%>"><%=HtmlOut(rs("bz"))%></td>
<td class="<%=td_class%>np" width="50" nowrap>
<img border="0" src="../images/icon_edit.gif" align="left">
<a href="Client_ProductSpJc_edit.asp?cid=<%=cid%>&id=<%=rs("ID")%>">编辑</a>
</td>
<td class="<%=td_class%>np" width="50" nowrap>
<img border="0" src="../images/icon_dele.gif" align="left">
<a href="Client_ProductSpJc_show.asp?mod=dele&id=<%=rs("ID")%>" onClick="return confirm('确定要删除该条记录吗?\n该操作不可恢复!')">删除</a>
</td>
</tr>
<%
rs.MoveNext
next
%>
</table>
</body>
</html>
<%'释放对象变量
rs.close
oConn.close
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -