Admin_Type.asp
资源名称:haohj.rar [点击查看]
上传用户:angela
上传日期:2022-05-11
资源大小:853k
文件大小:6k
源码类别:
外挂编程
开发平台:
ASP/ASPX
- <!--#include file="setup.asp"-->
- <!--#include file="check.asp"-->
- <%
- If Not CheckAdmin("GameType") Then
- Server.Transfer("showerr.asp")
- Response.End
- End If
- '=====================================================================
- ' 作者声明:转载请保留版权信息,鄙视不要脸的人
- '=====================================================================
- ' 程序名称:蓝宇网络发布系统
- ' 程序作者:蓝宇 QQ:18159079 ╲、随心゛ QQ:6821845
- ' 文件名称:Admin_Type.asp
- ' 更新日期:2007-6-5
- '=====================================================================
- ' 联系方式:Tel:13203117383,QQ:18159079,hi.baidu.com/hezeyu
- ' 程序开发:蓝宇,╲、随心゛
- ' 官方网站:蓝宇网络(http://hi.baidu.com/hezeyu)
- '=====================================================================
- ' Copyright 2004-2007 蓝宇 - All Rights Reserved.
- '=====================================================================
- Dim paixu
- titlename="分类管理"
- Admin_header
- if request.QueryString("guiqi")="edit" then
- dim options
- set rs = server.CreateObject("adodb.recordset")
- select case request.form("options")
- case "add"
- call add()
- case "edit"
- call edit()
- case "del"
- call del()
- call CloseConn()
- end select
- sub add()
- dim game,orderid
- game=tee5.CheckStr(trim(request.Form("game")))
- orderid=tee5.CheckStr(trim(request.Form("orderid")))
- if game="" then
- response.write "<script>alert('名称不能为空,请重新填写');history.back()</script>"
- call CloseConn()
- response.end
- end if
- sql="select * from Gq_gametype where game='"&game&"'"
- rs.open sql,conn,1,1
- if rs.eof and rs.bof then
- rs.close
- sql="select * from Gq_gametype"
- rs.open sql,conn,1,3
- rs.AddNew
- rs("game") = game
- rs("orderid") = int(orderid)
- rs.Update
- rs.Close
- set rs=nothing
- response.Redirect "Admin_type.asp"
- else
- rs.close
- set rs=nothing
- response.write "<script>alert('当前提交的分类名已经存在n请重新检查后提交,请不要提交重复信息');history.back()</script>"
- end if
- end sub
- sub edit()
- set rs = server.CreateObject("adodb.recordset")
- dim game,orderid,id
- id=cint(tee5.CheckStr(trim(request.form("id"))))
- game=tee5.CheckStr(trim(request.Form("game")))
- orderid=trim(request.form("orderid"))
- if game="" or orderid="" then
- response.write "<script>alert('名称和序号不能为空,请重新填写');history.back()</script>"
- call CloseConn()
- response.end
- end if
- sql="select * from Gq_gametype where id="&id
- rs.open sql,conn,1,1
- if rs.eof and rs.bof then
- rs.close
- response.write "<script>alert('数据非法!');history.back()</script>"
- else
- rs.close
- rs.open sql,conn,1,3
- rs("game") = game
- rs("orderid") = orderid
- rs.Update
- rs.Close
- set rs=nothing
- response.Redirect "Admin_type.asp"
- end if
- end sub
- sub del()
- on error resume next
- dim id,sql
- id=cint(tee5.CheckStr(trim(request.form("id"))))
- sql="delete from Gq_gametype where id="&id
- conn.execute sql
- sql="delete from Gq_Jzdata where gameid="&id
- conn.execute sql
- sql="delete from Gq_Sfdata where gameid="&id
- conn.execute sql
- if err.Number<>0 then
- err.clear
- call closeconn()
- response.write "<script>alert('数据库操作失败! ');history.back()"
- else
- finished
- call closeconn()
- response.Redirect "Admin_type.asp"
- end if
- end sub
- end if
- %>
- <script language=javascript>
- function ConfirmDel()
- {
- if(confirm("确定要删除此分类吗?n相关的家族信息都会被删除哦!"))
- return true;
- else
- return false;
- }
- </script>
- <table width=98% align="center" border="0" cellspacing="1" cellpadding="2" class="tableBorder">
- <tr>
- <th colspan="2">游戏类型设置</th>
- </tr>
- <tr>
- <td class=tablerow1><b>设置说明:</b><br>
- 1、排序栏一定不能填写相同的序号!<br>
- 2、执行分类“删除”操作时,所有相关的私服、家族也将被删除,请慎重执行!<br>
- 3、目前游戏类型只对家族,私服有效!<br>
- 4、分类私服调用方法more.asp?menu=ID 如诛仙ID为1,那么地址就是:您的网站地址/more.asp?menu=1</FONT></td>
- </tr>
- </table>
- <table width=98% align="center" border="0" cellspacing="1" cellpadding="2" class="tableBorder">
- <tr>
- <th width="10%">分类ID</th>
- <th width="30%">分类名称</th>
- <th width="30%">分类顺序</th>
- <th width="30%" colspan="2">操作</th>
- </tr>
- <%
- set rs = server.CreateObject("adodb.recordset")
- sql="select * from Gq_gametype order by orderid"
- rs.open sql,conn,1,1
- if rs.eof and rs.bof then
- response.write "<tr bgColor=#FFFFFF><td colspan=5 align=center>当前没有游戏类型,请添加后再操作。</td></tr>"
- else
- do while not rs.eof
- %>
- <form action=admin_type.asp?guiqi=edit method=post language="javascript">
- <tr>
- <td align="center" class="TableRow2"><b><%=rs("id")%></b></td>
- <td align="center" class="TableRow2"><input name="game" type="text" class="textarea" id="game" value="<%=rs("game")%>"></td>
- <td align="center" class="TableRow2"><input name="orderid" type="text" id="orderid" class="textarea" value="<%=rs("orderid")%>" size="5" maxlength="5"></td>
- <td align="center" class="TableRow2"><input type="hidden" name="options">
- <input name="id" type="hidden" id="id" value="<%=rs("id")%>">
- <input class=Button name="edittype" type="submit" id="edittype" value=" 修 改 " onclick="form.options.value='edit'">
- <input class=Button name="deltype" type="submit" id="deltype" value=" 删 除 " onclick="form.options.value='del';return ConfirmDel();"></td>
- </tr>
- </form>
- <%
- rs.movenext
- loop
- paixu=rs.RecordCount
- rs.close
- end if
- %>
- <form action=admin_type.asp?guiqi=edit method=post>
- <tr>
- <td align="center" class="TableRow2"><b>未知</b></td>
- <td align="center" class="TableRow2"><input name="game" type="text" id="game" maxlength="14"></td>
- <td align="center" class="TableRow2"><input name="orderid" type="text" id="orderid" value="<%=paixu+1%>" size="5" maxlength="5"></td>
- <td align="center" class="TableRow2"><input class=Button name="newtype" type="submit" id="newtype" value="添加类型" onclick="form.options.value='add'"><input type="hidden" name="options"></td>
- </tr>
- </form>
- </table>
- <%
- Admin_footer
- CloseConn
- %>