ask.asp

来自「采用ASP。NET做的网上游戏交易平台」· ASP 代码 · 共 269 行

ASP
269
字号
<%
if session("userID")="" then
%>
<!--#include file="top.asp"-->
<%
else
%>
<!--#include file="top1.asp"-->
<%
end if
%>
<style>
<!--
a:link.nav {COLOR: #ffffff;TEXT-DECORATION: none}
.navbg {filter : progid:DXImageTransform.Microsoft.DropShadow(color=#ffffff,offX=1,offY=1,positives=true);}
.navbg1 {filter : progid:DXImageTransform.Microsoft.DropShadow(color=#6C2C00,offX=1,offY=1,positives=true);}
a:link.nav1 {COLOR: #434343;TEXT-DECORATION: none}
.toptext {color: #555555;filter:dropshadow(color=#ffffff,offx=1,offy=1,positive=1);}
-->
</style>
<%
if request.form("btnguest")<>"" then
dim myt1,myt2,myt3
myt3=trim(request.form("txtquestion"))
if session("userID")=""  then
myt1=trim(request.form("t1"))
myt2=trim(request.form("t2"))
set rs=server.CreateObject("adodb.recordset")
sql="select * from userinfo where username='"&myt1&"' and password='"&myt2&"'"
rs.open sql,conn,1,3
if rs.recordcount>0 then
session("username")=myuser
session("userID")=rs("ID")
rs.close
else
rs.close
Response.Write "<script language=javascript>" &vbCrLf&_
"alert('对不起,你输入的帐号或密码不正确!\n不能发表提问!!!');" &vbCrLf&_
"history.go(-1);"&vbCrLf&_
"</script>"
response.End
end if
end if
sql="insert into guest(question,sendtime,answer) values ('"&myt3&"','"&now()&"','暂无')"
conn.execute(sql)
Response.Write "<script language=javascript>" &vbCrLf&_
"alert('问题提交成功!\n点确定返回首页!!!');" &vbCrLf&_
"window.location='index.asp';"&vbCrLf&_
"</script>"
end if
%>

<body style="text-align: center">

<table border="0" width="100%" cellspacing="0" cellpadding="0" background="images/bg1.jpg" height="100%">
	<tr>
		<td valign=top>
		<table border="0" width="900" cellspacing="0" cellpadding="0">
			<tr>
				<td width="900" colspan="3" height="7"></td>
			</tr>
			<tr>
				<td width="65"> </td>
				<td width="778" height="50">
				<table border="0" width="778" cellspacing="0" cellpadding="0">
					<tr>
						<td width="9">
						<img border="0" src="images/2vv2_r7_c2.gif" width="9" height="50"></td>
						<td width="759" background="images/2vv2_r7_c4.gif">						
						<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
          <%
		  call getGameName2
		  for i=0 to 20
		  if i=0 then response.write "<tr height=21>"
		  
		  response.write "<td align='center'valign=bottom class=top><a href='search.asp?key="&tmpArr1(i)&"'>"&formatGameName(tmpArr2(i))&"</a> &nbsp;|</td>"
		  if i mod 11 =10 and i>0 then response.write "</tr><tr height=22>"
		  next
		  response.write "<td align='center' valign=bottom class=top><a href='search.asp?key=all'>全 部...</a></td>"
		  %>
        </table>
	</td>
						<td width="10">
						<img border="0" src="images/2vv2_r7_c31.gif" width="10" height="50"></td>
					</tr>
				</table>
				</td>
				<td width="57"> </td>
			</tr>
			<tr>
				<td width="65"></td>
				<td width="778" height="7"></td>
				<td width="57"></td>
			</tr>
			<tr>
				<td width="65"> </td>
				<td width="778">
				
<div align="center">
	<table border="0" width="770" cellspacing="0" cellpadding="0">
		<tr>
			<td background="images/2_r1_c2.gif" width="22">
			<img border="0" src="images/2_r1_c1.gif" width="22" height="33"></td>
			<td background="images/2_r1_c2.gif" width="724" valign=bottom>
			<table border="0" cellspacing="0" cellpadding="0" height="28">
				<tr>
					<td class=navbg>艾维游戏交易平台---新手帮助系统</td>
				</tr>
			</table>
			</td>
			<td background="images/2_r1_c2.gif" width="24">
			<img border="0" src="images/2_r1_c3.gif" width="24" height="33"></td>
		</tr>
		<tr>
			<td background="images/2_r2_c1.gif" width="770" colspan="3" height="30">
			<div align="center">
				<table border="0" width="96%" cellspacing="0" cellpadding="0">
							<tr >
								<td width="748" class=top>


			<b>请注意:</b> 提交帮助问题/您必需注册为本站会员才可以使用! </td>
							</tr>
						</table>
			</div>
</td>
		</tr>
		<tr>
			<td width="770" colspan="3" valign=top>
			<table border="0" width="770" cellspacing="0" cellpadding="0">
				<tr>
					<td width="13" bgcolor="#69B4FE" valign=top>
					<img border="0" src="images/2_r3_c1.gif" width="13" height="185"></td>
					<td width="744" bgcolor="#FFFFFF" valign=top><table border="1" width="100%" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#1965CD" height="300">
						<tr><td valign=top>
						<%
			set rs=server.CreateObject("adodb.recordset")
			sql="select * from guest order by id"
			rs.open sql,conn,3,1
			if rs.eof then
			response.write "sorry ,the question list is empty..."
			else
			while not rs.eof
			%>

<table class="unnamed3" cellSpacing="1" cellPadding="3" width="100%" border="0">
				<tr>
					<td height="24" width="46">
					<p align="center"><font color="#990000"><b>问题: </b> </font> </td>
					<td height="24" width="591"><font color=990000><%=rs("question")%></font></td>
					<td height="24" width="38">
					 </td>
					<td height="24" width="38">
					 </td>
				</tr>
				<tr>
					<td width="46" valign=top>
					<p align="center"><strong>回答:</strong></td>
					
            <td width="681" colspan="3"><%=rs("answer")%>....</td>
				</tr>
				<tr>
					<td width="766" colspan="4"> </td>
				</tr>
				</table>
				<%
				rs.movenext
				wend
				end if
				%>
        <table class="unnamed3" cellSpacing="3" cellPadding="3" width="100%" border="0">
				<form action="ask.asp" method="post" name="frmguest"><tr>
					<td height="24" width="759" colspan="5" id=askey><b>
					<font color="#FF0000">如果您还有什么其它问题,请在下方提交!</font></b></td>
				</tr>
				
				<tr>
					<td width="48">用户名:</td>
					<td width="105">
					<%
					if session("userID")="" then
					%>
				<input maxLength="15"  name="t1" size="13">
				<%
				else
				response.write session("username")
				end if
				%>
				</td>
					<td width="37">密码:</td>
					<td width="103">
					<%
					if session("userID")="" then
					%>
				<input type="password" maxLength="15"  name="t2" size="13">
				<%
				else
				response.write "*********"
				end if
				%>			
					</td>
					<td width="401"><u><font color="#FF0000">
					<a href="reg.asp"><font color="#FF0000"><u>注册会员</u></font></a></font></u></td>
				</tr>
				<tr>
					<td width="759" colspan="5">
						<textarea style="width: 386; height: 56" name="txtquestion" rows="6" onchange="showalert()" cols="20"></textarea></td>
				</tr>
				<tr>
					<td width="766" colspan="5">
						<input class="M"  type="submit" value="确认提交" name="btnguest"> <input class="M"  type="reset" value="清空重写" name="Next0"></td>
				</tr></form>
				</table>							</td>
						</tr>
					</table>
					</td>
					<td width="13" bgcolor="#69B4FE" valign=top>
					<img border="0" src="images/2_r3_c1.gif" width="13" height="185"></td>
				</tr>
				<tr>
					<td width="13" height="10">
					<img border="0" src="images/2_r4_c1.gif" width="13" height="10"></td>
					<td width="744" bgcolor="#69B4FE"></td>
					<td width="13" bgcolor="#69B4FE">
					<img border="0" src="images/2_r4_c11.gif" width="13" height="10"></td>
				</tr>
			</table>
			</td>
		</tr>
	</table>
</div>
				
</td>
				<td width="57"> </td>
			</tr>
			<tr>
				<td width="65"></td>
				<td width="778" height="7"></td>
				<td width="57"></td>
			</tr>
			<tr>
				<td width="65"> </td>
				<td width="778">
				<table border="0" width="778" cellspacing="0" cellpadding="0">
					<tr>
						<td width="778" height=7></td>
					</tr>
					<tr>
						<td width="778"><!--#include file="bottom.asp"-->
						 </td>
					</tr>
					<tr>
						<td width="778">
					
								
								</td>
								</tr>
							</table>
						</div>
						</td>
					</tr>
				</table>
				</td>
				<td width="57"> </td>
			</tr>
		</table>
		</td>
	</tr>
</table>

⌨️ 快捷键说明

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