📄 admin_type.asp
字号:
<!--#include file="../inc/config.asp"-->
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/code.asp"-->
<!--#include file="../inc/SqlIn.Asp"-->
<!--#include file="../inc/check.asp"-->
<%
if request.QueryString("╲、衡少゛")="edit" then
dim rs,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=htmlencode(trim(request.Form("game")))
orderid=htmlencode(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(htmlencode(trim(request.form("id"))))
game=htmlencode(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(htmlencode(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
%>
<html>
<head>
<meta HTTP-EQUIV="Content-Type" content="text/html; charset=gb2312">
<LINK href="admin_style.css" rel=stylesheet>
<title><%=webname%></title>
<script language=javascript>
function ConfirmDel()
{
if(confirm("确定要删除此分类吗?\n相关的家族信息都会被删除哦!"))
return true;
else
return false;
}
</script>
</head>
<body leftMargin=0 bgcolor="#EFEFEF" topMargin=15>
<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=3 align=center>当前没有游戏类型,请添加后再操作。</td></tr>"
else
do while not rs.eof
%>
<form action=admin_type.asp?╲、衡少゛=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 name="edittype" type="submit" id="edittype" value=" 修 改 " onclick="form.options.value='edit'">
<input 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?╲、衡少゛=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 name="newtype" type="submit" id="newtype" value="添加类型" onclick="form.options.value='add'"><input type="hidden" name="options"></td>
</tr>
</form>
</table>
<table width=98% align="center" border="0" cellspacing="0" cellpadding="0">
<tr align="middle">
<td height="30" valign="bottom">Copyright (c) 2004-2006 <a target="_blank" href="http://www.xuncms.cn"><b><font color="#708796">XunCms</font><font color="#cc0000">.Cn</font></b></font></a>. All Rights Reserved .</td>
</tr>
<tr align="middle">
<td>Powered by:<a href="http://www.xuncms.cn" target="_blank"><b><font color="#708796">讯图</font><font color="#cc0000">设计</font></b></font> XunCms <%=Version%></a></td>
</tr>
</table>
<%call CloseConn()%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -