56770_chandi.asp
上传用户:feitengda
上传日期:2022-07-20
资源大小:73k
文件大小:3k
- <!--#include file="conn.asp"-->
- <%
- call admintop()
- if session("admin_name")="" then
- adminflag()
- else
- dim action, s_id,s_paixu
- s_id=request.QueryString("s_id")
- action=request("action")
- s_paixu=cint(request("s_paixu"))
- select case action
- case "add"
- if trim(request("s_name"))<>"" then
- set rs=server.CreateObject("adodb.recordset")
- rs.Open "select * from 56770_chandi", conn, 1, 3
- rs.AddNew
- rs("c_name")=trim(request("s_name"))
- rs("c_paixu")=trim(request("s_paixu"))
- rs.Update
- rs.Close
- set rs=nothing
- response.Redirect "56770_chandi.asp"
- response.end
- end if
- '----------------------------------------
- case "edit"
- set rs=server.CreateObject("adodb.recordset")
- rs.open "select * from 56770_chandi where c_id=" &s_id, conn, 1, 3
- rs("c_name")=request("s_name")
- rs("c_paixu")=cint(request("s_paixu"))
- rs.update
- rs.close
- response.Redirect "56770_chandi.asp"
- response.end
- set rs=nothing
- '--------------------------------
- case "del"
- conn.execute "delete from 56770_chandi where c_id="&s_id
- response.Redirect "56770_chandi.asp"
- response
- end select
- %>
- <table border="0" cellspacing="1" cellpadding="0" height="0" align=center width="98%" bgcolor="#183789">
- <tr>
- <td>
- <table border="0" cellspacing="1" cellpadding="4" bgcolor="#FFFFFF" align="center" width="100%">
- <tr>
- <td height=15 align=center colspan=17 class=classtop>药品产地管理</td>
- </tr>
- <%set rs=server.CreateObject("adodb.recordset")
- rs.open "select * from 56770_chandi order by c_paixu desc", conn, 1, 1
- dim i
- i=rs.recordcount%>
- <tr class=classtop1>
- <td height="15" align="center">药品产地名</td>
- <td height="15" align="center">排序</td>
- <td height="15" align="center">操作</td>
- </tr>
- <%if rs.eof and rs.bof then
- response.write "还没有数据,请添加!"
- else
- do while not rs.eof%>
- <tr>
- <form name="form1" method="post" action="56770_chandi.asp?action=edit&s_id=<%=rs("c_id")%>">
- <td class="classtd">
- <div align="center">
- <input name="s_name" type="text" id="s_name" value="<%=trim(rs("c_name"))%>" size="25">
- </div>
- </td>
- <td class="classtd">
- <div align="center">
- <input name="s_paixu" type="text" id="s_paixu" value=<%=rs("c_paixu")%> onkeyup="value=value.replace(/[^d.]/g,'');" size="3">
- </div>
- </td>
- <td class="classtd">
- <div align="center">
- <input type="submit" name="Submit" value="修 改">
- <input type="button" name="Submit2" value="删 除" onclick="{if(confirm('确认删除么?')){location.href='56770_chandi.asp?action=del&s_id=<%=rs("c_id")%>';}return false;}">
- </div>
- </td>
- </form>
- </tr>
- <%rs.movenext
- loop
- end if
- rs.close
- set rs=nothing%>
- <form name="form2" method="post" action="56770_chandi.asp?action=add">
- <tr>
- <td height="15" class="classtd">
- <div align="center">
- <input name="s_name" type="text" id="s_name" size="25">
- </div>
- </td>
- <td class="classtd">
- <div align="center">
- <input name="s_paixu" type="text" id="s_paixu" value=0 onkeyup="value=value.replace(/[^d.]/g,'');" size="3">
- </div>
- </td>
- <td class="classtd">
- <div align="center">
- <input type="submit" name="Submit2" value="添 加">
- </div>
- </td>
- </form>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <%end if%>