⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 work.asp

📁 一个漂亮的网络工作室源码 后台地址:/admin 用户名:admin 密码:admin888
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="config.asp"-->
<!--#include file="top.asp"-->
<table border="0" align="center" cellpadding="0" cellspacing="1" class="tablecolor">
  <tr class="banner"> 
    <td height="25" align="center" >作品管理</td>
    <form name="form2" method="post" action="?">
	<td width="20%" align="center" >
      <select name="px" size="1" onchange="javascript:submit()">
	  <option value="Id">请选择排列顺序</option>
        <option value="pj" <%if request("px")="srice" then%>selected<%end if%>>按金额</option>
        <option value="WNum" <%if request("px")="stime" then%>selected<%end if%>>按购买日期</option>
        <option value="WNum" <%if request("px")="etime" then%>selected<%end if%>>按到期日期</option>
        <option value="WNum" <%if request("px")="states" then%>selected<%end if%>>按状态</option>
      </select>
    </td>
    </form>
  </tr>
</table>
<% 
select case request("action")
case "edit"
call edit()
case else
call normal()
end select
sub normal()
dim strFileName,px,Uid,userid
dim rs,sql
pageno=15
px=trim(Request("px"))
Uid=trim(Request("wuid"))
if px="" then
px="Id"
end if
strFileName="work.asp?px=" & px & "&wuid=" & Userid
sql="select * from cust,Users where cust.Userid=Users.userId"
if Uid<>"" then
sql=sql&" and  Users.userId='"&request("wuid")&"'"
end if
sql=sql & " order by cust."&px&" desc"
'response.Write(sql)
'response.End()
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1
rscount=rs.recordcount
if  rscount>=1 then
	%>
<table border="0" align="center" cellpadding="3" cellspacing="1" class="tablecolor">
  <%
   if  rscount<1 then
  %>
  <tr>
    <td height="25" colspan="10" align="center" class="tablebody">该栏目还没有数据</td>
  </tr>
  <%
else
%>
  <tr>
    <td width="5%" align="center" class="tablebody">ID</td>
    <td width="12%" align="center" class="tablebody">客户ID</td>
    <td align="center" class="tablebody">服务名称</td>
    <td width="10%" align="center" class="tablebody">服务金额</td>
    <td width="10%" align="center" class="tablebody">到期日期</td>
    <td width="10%" align="center" class="tablebody">服务状态</td>
    <td width="15%" align="center" class="tablebody">加入时间</td>
    <td width="5%" align="center" class="tablebody">审核</td>
    <td width="5%" align="center" class="tablebody">修改</td>
    <td width="6%" align="center" class="tablebody">删除</td>
  </tr>
  <form name="form2" method="post" action="?action=edit" onSubmit="return checkf(form2)">
    <%
call showsql(pageno)
rs.move(rsno)
for i=1 to loopno
  %>
    <tr>
      <td align="center" class="tablebody"><%=rs("cust.id")%></td>
      <td align="center" class="tablebody"><a href="showuser1.asp?userid=<%=rs("cust.userid")%>"><%=rs("cust.userid")%></a></td>
      <td align="center" class="tablebody"><%=rs("sname")%></td>
      <td align="center" class="tablebody">¥<%=rs("srice")%></td>
      <td align="center" class="tablebody"><%=rs("etime")%></td>
      <td align="center" class="tablebody"><font color=<%if rs("states")="开启" then%>#ff3300<%end if%><%if rs("states")="暂停" then%>#009900<%end if%><%if rs("states")="关闭" then%>#999999<%end if%>><%=rs("states")%></font></td>
      <td align="center" class="tablebody"><%=rs("cust.RegTime")%></td>
      <td align="center" class="tablebody"><%if rs("cust.isagree")=1 then response.Write("<font color=red>荐</a>") else response.Write("否") end if%></td>
      <td align="center" class="tablebody"><a href="addsv.asp?id=<%=rs("cust.id")%>&usid=<%=rs("uid")%>">修改</a></td>
      <td align="center" class="tablebody"><input name="id" type="checkbox" id="id" value="<%=rs("cust.id")%>">
    </tr>
    <%
  rs.movenext
  next
  %>
    <tr>
      <td height="25" colspan="10" align="right"  class="tablebody"><INPUT onclick=CheckAll(this.form) type=checkbox value=on name=chkall>
        全选
          <input name="Submit" type="submit" id="Submit" value="隐藏">
          <input name="Submit" type="submit" id="Submit" value="显示">
          <input name="Submit" type="submit" id="Submit" value="取消推荐">
          <input name="Submit" type="submit" id="Submit" value="推荐">
          <input name="Submit" type="submit" id="Submit" value="删除" onclick="SetSubmitImgId('realdel');">
&nbsp;</td>
    </tr>
  </form>
  <tr>
    <td colspan="10" align="right"  class="tablebody"><%call showpage(strFileName,rscount,pageno,false,true,"条记录")%></td>
  </tr>
  <% end if%>
</table>
<%end if%>
<%end sub
sub edit()
dim id,sql
if request.form("id")="" then
response.Write("<script>alert('参数错误!');history.back()</script>")
response.End()
end if
select case request("submit")
case "隐藏"
sql="update cust set elite=0 where id="
case "显示"
sql="update cust set elite=1 where id="
case "取消推荐"
sql="update cust set isagree=0 where id="
case "推荐"
sql="update cust set isagree=1 where id="
case "删除"
sql="delete from cust where id="
case else
response.Write("<script>alert('参数错误!');history.back()</script>")
response.End()
end select
for each id in request("id")
conn.execute(sql&id)
next
dim ip
ip=Request.ServerVariables("HTTP_REFERER")
response.Write("<script>alert('操作成功!');location='"&ip&"'</script>")
response.End()
end sub
%>
<%CloseConn%>
<!--#include file="end.asp"-->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -