?? addgametype.asp
字號:
<!--#include file="conn.asp"-->
<%
if session("loginpass")<>true then Response.Redirect "notlogin.htm"
if session("IsAdmin")<>true then Response.Redirect "notlogin1.htm"
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>添加游戲類型</title>
<link href="css.css" rel="stylesheet" type="text/css">
</head>
<body leftmargin="0" topmargin="0">
<table width="103%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="22" align="center" bgcolor="#F7F7F7"><strong>修改、增加游戲類型與點卡類型</strong></td>
</tr>
<tr>
<td>
<form action="AddGameType.asp" name="idform" method="post"><input type="hidden" name="typeid" value=""></form>
<hr width="98%"> <div align="left">
<%
dim add,rs,rs2,sql,sql2,typeid
typeid=request("typeid")
if typeid="" then typeid=1 else typeid=cint(typeid)
sql="select GameType,CardType,Game,CardTime from Type where ID=" & typeid
set rs=conn.execute(sql)
sql2="select ID from Type"
set rs2=server.CreateObject("adodb.recordset")
rs2.open sql2,conn,1,1
add=request("add")
select case add
case 1:call addGameType
case else:ShowHtml
end select
%>
<%
sub ShowHtml()
%>
<form name="form1" method="post" action="<%=Request.ServerVariables("URL")%>">
<br>
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#A5C6F1">
<tr>
<td><table width="100%" border="0" cellpadding="3" cellspacing="1">
<tr align="center" bgcolor="#FFFDF4">
<td colspan="2">添加游戲類型 </td>
</tr>
<tr>
<td width="40%" align="right" bgcolor="#F7F7F7">游戲類型:</td>
<td bgcolor="#FFFFFF"> <input name="GameType" type="text" id="GameType3" size="20" maxlength="20"></td>
</tr>
<tr>
<td align="right" bgcolor="#F7F7F7">卡的類型:</td>
<td bgcolor="#FFFFFF"> <input name="CardType" type="text" id="CardType3" size="3" maxlength="3"></td>
</tr>
<tr>
<td width="40%" align="right" bgcolor="#F7F7F7">所屬游戲:</td>
<td bgcolor="#FFFFFF"> <input name="Game" type="text" size="20"></td>
</tr>
<tr>
<td width="40%" align="right" bgcolor="#F7F7F7">游戲卡類型:</td>
<td bgcolor="#FFFFFF"> <input type="text" name="yuenian" size="20"></td>
</tr>
<tr align="center" bgcolor="#FFFDF4">
<td colspan="2"> <input name="add" type="hidden" id="add3" value="1">
<input type="submit" name="Submit" value="添 加"> </td>
</tr>
</table></td>
</tr>
</table>
<br>
</form>
<form name="mform" method="post" action="modtype.asp">
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#A5C6F1">
<tr>
<td><table width="100%" border="0" cellpadding="3" cellspacing="1">
<tr align="center" bgcolor="#FFFDF4">
<td colspan="2">修改游戲類型 </td>
</tr>
<tr>
<td align="right" bgcolor="#F7F7F7">游戲類型ID:</td>
<td bgcolor="#FFFFFF"> <select name="tid" onChange="javascript:jumptoid(options[selectedIndex].value)">
<%
while not(rs2.eof)
if (typeid=rs2(0)) then
response.Write "<option value="&rs2(0)&" selected>"&rs2(0)
else
response.Write "<option value="&rs2(0)&">"&rs2(0)
end if
rs2.movenext
wend
rs2.close()
set rs2=nothing
%>
</select> <font color="#ff0000">(選擇要修改的游戲類型)</font></td>
</tr>
<tr>
<td width="40%" align="right" bgcolor="#F7F7F7">游戲類型:</td>
<td bgcolor="#FFFFFF"> <input name="GameType" type="text" size="20" maxlength="20" value="<%=rs(0)%>"></td>
</tr>
<tr>
<td width="40%" align="right" bgcolor="#F7F7F7">卡的類型:</td>
<td bgcolor="#FFFFFF"> <input name="CardType" type="text" size="3" maxlength="3" value="<%=rs(1)%>">
是否要刪除
<input name="del" type="checkbox" id="del" value="1"></td>
</tr>
<tr>
<td align="right" bgcolor="#F7F7F7">所屬游戲:</td>
<td bgcolor="#FFFFFF"> <input name="Game" type="text" size="20" value="<%=rs(2)%>"></td>
</tr>
<tr>
<td align="right" bgcolor="#F7F7F7">游戲卡類型:</td>
<td bgcolor="#FFFFFF"> <input type="text" name="yuenian" size="20" value="<%=rs(3)%>"></td>
</tr>
<tr align="center" bgcolor="#FFFDF4">
<td colspan="2"> <input type="submit" name="Submit2" value="修 改">
</td>
</tr>
</table></td>
</tr>
</table>
</form>
<p> </p>
</div>
<hr width="98%">
注:游戲類型與點卡類型是對應的,請兩者都填寫。<br>
修改游戲類型如果要刪除該ID的請打上鉤。</td>
</tr>
</table>
<%
end sub
%>
<script language="JavaScript">
function jumptoid(jid){
if (jid>0){
idform.typeid.value=jid;
idform.submit()
}
}
</script>
</body>
</html>
<%
sub addGameType()
dim GameType,CardType,Game,yuenian,sql
GameType=Request("GameType")
CardType=Request("CardType")
Game=Request("Game")
yuenian=request("yuenian")
if GameType="" or CardType="" then response.Redirect("AddGameType.asp")
sql="insert into Type (GameType,CardType,Game,CardTime) values('"&GameType&"','"&CardType&"','"&Game&"','"&yuenian&"')"
conn.ExeCute(sql)
CloseDatabase
Response.Write "游戲類型:"&GameType&" 卡類型:"&CardType&" 已經(jīng)成功添加":Response.End
end sub
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -