56770_jinhuoshang.asp
上传用户:feitengda
上传日期:2022-07-20
资源大小:73k
文件大小:5k
- <!--#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_jinhuoshang", conn, 1, 3
- rs.AddNew
- rs("j_name")=trim(request("s_name"))
- rs("j_paixu")=trim(request("s_paixu"))
- rs.Update
- rs.Close
- set rs=nothing
- response.Redirect "56770_jinhuoshang.asp"
- response.end
- end if
- '----------------------------------------
- case "edit"
- set rs=server.CreateObject("adodb.recordset")
- rs.open "select * from 56770_jinhuoshang where j_id=" &s_id, conn, 1, 3
- rs("j_name")=request("s_name")
- rs("j_paixu")=cint(request("s_paixu"))
- rs.update
- rs.close
- response.Redirect "56770_jinhuoshang.asp"
- response.end
- set rs=nothing
- '--------------------------------
- case "del"
- conn.execute "delete from 56770_jinhuoshang where j_id="&s_id
- response.Redirect "56770_jinhuoshang.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>
- <form name=form2 method=post action=56770_jinhuoshang.asp>
- <tr >
- <td class="classtd" colspan="15" align=right>检索关键词:
- <input name="gjc" size="25" class=form>
-
- <input type=submit name=tiaojian value=" 查 询 " class=button> </td>
- </tr></form>
- </table>
- <table border="0" cellspacing="1" cellpadding="4" bgcolor="#FFFFFF" align="center" width="100%">
- <%
- gjc=replace(request("gjc"),"'","’")
- set rs=server.CreateObject("adodb.recordset")
- sql="select * from [56770_jinhuoshang] where j_name<>''"
- If gjc<>"" Then sql=sql&" and j_name like '%"&gjc&"%'"
- sql=sql&" order by j_id desc"
- rs.open sql,conn, 1, 1
- %>
- <tr class=classtop1>
- <td height="15" align="center">进货商名</td>
- <td height="15" align="center">排序</td>
- <td height="15" align="center">操作</td>
- </tr>
- <form name="form2" method="post" action="56770_jinhuoshang.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>
- <%if rs.eof and rs.bof then
- response.write "还没有数据!"
- Else
- if not isempty(request("page")) then
- pagecount=cint(request("page"))
- else
- pagecount=1
- end if
- rs.pagesize=20
- rs.AbsolutePage=pagecount
- do while not rs.eof%>
- <tr>
- <form name="form1" method="post" action="56770_jinhuoshang.asp?action=edit&s_id=<%=rs("j_id")%>">
- <td class="classtd">
- <div align="center">
- <input name="s_name" type="text" id="s_name" value="<%=trim(rs("j_name"))%>" size="25">
- </div>
- </td>
- <td class="classtd">
- <div align="center">
- <input name="s_paixu" type="text" id="s_paixu" value=<%=rs("j_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_jinhuoshang.asp?action=del&s_id=<%=rs("j_id")%>';}return false;}">
- </div>
- </td>
- </form>
- </tr>
- <%
- rs.movenext
- i=i+1
- if i>=rs.pagesize then exit do
- loop
- %>
- <form action="56770_jinhuoshang.asp" method="post">
- <tr class=classfooter><td height="25" align="center" colspan=15>
- <div align="center"> 共有数据 <b><%=rs.recordcount%></b> 条, 页次: <b><font color=red><%=pagecount%></font>/<%=rs.pagecount%></b>,
- 当前从第
- <%
- if pagecount<=1 then
- response.write "<font color=red>1</font>"
- else
- response.write "<font color=red>" & pagecount*rs.pagesize-rs.pagesize+1 & "</font>"
- end if
- %>
- 条开始。
- <% if pagecount=1 and rs.pagecount<>pagecount and rs.pagecount<>0 then%>
- <a href="?page=<%=cstr(pagecount+1)%>">下一页</a>
- <% end if %>
- <% if rs.pagecount>1 and rs.pagecount=pagecount then %>
- <a href="?page=<%=cstr(pagecount-1)%>">上一页</a>
- <%end if%>
- <% if pagecount<>1 and rs.pagecount<>pagecount then%>
- <a href="?page=<%=cstr(pagecount-1)%>">上一页</a> <a href="?page=<%=cstr(pagecount+1)%>">下一页</a>
- <% end if%>
- 直接到第
- <select name="page">
- <%for i=1 to rs.pagecount%>
- <option value="<%=i%>"><%=i%></option>
- <%next%>
- </select>页
- <input type="submit" name="go" value="跳转" class=button>
- </div>
- </td>
- </form>
- </tr>
- <%
- End If
- rs.close
- set rs=Nothing
- %>
- </table>
- </td>
- </tr>
- </table>
- <%end if%>