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

📄 default.asp

📁 ASP+SQL Server动态网站开发从基础到实践教程
💻 ASP
📖 第 1 页 / 共 3 页
字号:
              <img src="grafx/icon5.gif" width="15" height="15"> 
              <input type="radio" name="Icon" value="6">
              <img src="grafx/icon6.gif" width="15" height="15"> 
              <input type="radio" name="Icon" value="7">
              <img src="grafx/icon7.gif" width="15" height="15"> <br>
              <input type="radio" name="Icon" value="8">
              <img src="grafx/icon8.gif" width="15" height="15"> 
              <input type="radio" name="Icon" value="9">
              <img src="grafx/icon9.gif" width="15" height="15"> 
              <input type="radio" name="Icon" value="10">
              <b><img src="grafx/icon10.gif" width="15" height="15"></b> 
              <input type="radio" name="Icon" value="11">
              <img src="grafx/icon11.gif" width="15" height="15"> 
              <input type="radio" name="Icon" value="12">
              <img src="grafx/icon12.gif" width="15" height="15"> 
              <input type="radio" name="Icon" value="13">
              <img src="grafx/icon13.gif" width="15" height="15"> 
              <input type="radio" name="Icon" value="14">
              <img src="grafx/icon14.gif" width="15" height="15"> <br>
              <input type="radio" name="Icon" value="15">
              <img src="grafx/icon15.gif" width="15" height="15"> 
              <input type="radio" name="Icon" value="16">
              <img src="grafx/icon16.gif" width="15" height="15"> 
              <input type="radio" name="Icon" value="17">
              <img src="grafx/icon17.gif" width="15" height="15"> 
              <input type="radio" name="Icon" value="18">
              <img src="grafx/icon18.gif" width="15" height="15"> 
              <input type="radio" name="Icon" value="19">
              <img src="grafx/icon19.gif" width="15" height="15"> 
              <input type="radio" name="Icon" value="20">
              <img src="grafx/icon20.gif" width="15" height="15"> 
              <input type="radio" name="Icon" value="21">
              <img src="grafx/icon21.gif" width="15" height="15"> <br>
              <input type="radio" name="Icon" value="22">
              <img src="grafx/icon22.gif" width="15" height="15"> 
              <input type="radio" name="Icon" value="23">
              <img src="grafx/icon23.gif" width="15" height="15"> 
              <input type="radio" name="Icon" value="24">
              <img src="grafx/icon24.gif" width="15" height="15"> 
              <input type="radio" name="Icon" value="25">
              <img src="grafx/icon25.gif" width="15" height="15"> 
              <input type="radio" name="Icon" value="26">
              <img src="grafx/icon26.gif" width="15" height="15"> 
              <input type="radio" name="Icon" value="27">
              <img src="grafx/icon27.gif" width="15" height="15"> 
              <input type="radio" name="Icon" value="28">
              <img src="grafx/icon28.gif" width="15" height="15"> 
          </font> 
          </td>
        </tr>
      </table>
      <font  size="1">内容:</font><font > 
      <br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#CCCCCC">.</font> 
      <textarea name="text" cols="60" rows="10"> </textarea>
      <br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      <input type="submit" name="Submit" value="&#21457;&#24067;">
      </form>
      </font>
      </td>
  </tr>
</table>
<font >
<% End IF %>
<% If Request.Querystring("action") = "postit" then %>
<% 
datum = Now()
if Session("Username") <> "" then username = Session("Username")
If session("Username") = "" then username = request.form("username")
text = request.form("text")
password = request.form("password")
subject = request.form("subject")
ip = Request.ServerVariables("REMOTE_ADDR")
icon = request.form("icon")

text = Replace(text, "'", "''")
if Session("Username") = "" then username = replace(username, "[", "")
If Session("Username") = "" then username = replace(username, "]", "")

If Session("Username") <> "" then 
	


    SQLstmt = "INSERT INTO messageDB (poster,subject,message, ip, icon, forumid)"
	SQLstmt = SQLstmt & " VALUES (" 
	SQLstmt = SQLstmt & "'" & username & "',"
	SQLstmt = SQLstmt & "'" & subject & "',"
	SQLstmt = SQLstmt & "'" & text & "',"
	SQLstmt = SQLstmt & "'" & ip & "',"
	SQLstmt = SQLstmt & "'" & icon & "',"
	SQLstmt = SQLstmt & "'" & request.querystring("forum") & "'"
	SQLstmt = SQLstmt & ")"

	Set RS = con.execute(SQLstmt)
	
End If

If Session("Username") = "" then
'set Con = server.createobject("adodb.connection")
	
   ' DSNtemp="Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=board"

   ' Con.Open DSNtemp


    SQLstmt = "INSERT INTO messageDB (poster,subject,message, ip, icon, forumid)"
	SQLstmt = SQLstmt & " VALUES (" 
	SQLstmt = SQLstmt & "'" & username & "',"
	SQLstmt = SQLstmt & "'" & subject & "',"
	SQLstmt = SQLstmt & "'" & text & "',"
	SQLstmt = SQLstmt & "'" & ip & "',"
	SQLstmt = SQLstmt & "'" & icon & "',"
	SQLstmt = SQLstmt & "'" & request.querystring("forum") & "'"
	SQLstmt = SQLstmt & ")"

	Set RS = Con.execute(SQLstmt)
	
End If
 
	set rsQuery = Con.Execute("SELECT * FROM  FORUMDB WHERE ID=" & Request.Querystring("forum"))
	temp = rsQuery("Threads")
	temp = temp + 1
	
Con.Execute "UPDATE ForumDB SET [Threads]=" & temp & " WHERE ID =" & Request.Querystring("forum")
'Con.Execute "UPDATE UserDB SET [Name]='" & strName & "', [Password]='" & strPassword & "', Email='" & strEmail & "', Signature='" & strSR") & "' WHERE [Username]='" & Mid(Session("Username"),2,Len(Session("Username")) -2) & "'"						
%>
<br>
<br>
<br>
</font>
<table width="600" border="1" cellspacing="0" cellpadding="1" bordercolor="#000000" bgcolor="#CCCCCC">
  <tr>
    <td align="center"><font  size="1">文章发表成功. 单击 <a href="default.asp?forum=<% Response.Write Request.Querystring("forum") %>&thread=&action=view">
	proceed</a> 
      继续.</font></td>
  </tr>
</table>
  <font >
  <% End If %>


<% If Request.Querystring("action") = "info" then %>
<br>
</font>
<table width="600" border="1" cellspacing="0" cellpadding="1" bordercolor="#000000" bgcolor="#999999">
  <tr> 
    <td colspan="3"><font  size="1">个人信息</font></td>
  </tr>
  <tr> 
    <td bgcolor="#CCCCCC" valign="top" width="146" rowspan="2">
	<font  size="1">姓名: 
      <%
		  Set rsQuery = Con.Execute("SELECT * FROM UserDB WHERE ID=" & Request.Querystring("what"))
		  Response.Write rsQuery("name")
		  %>
      <br>
      用户名:: 
      <% Response.Write rsQuery("username") %>
      <br>
      生日: 
      <% Response.Write rsQuery("age") %>
      <br>
      Email: 
      <% Response.WRite "<a href=mailto:" & rsQuery("email") & ">" & rsQuery("email") & "</a>" %>
      <br>
      OICQ: 
      <% Response.Write rsQuery("icq") %>
      <br>
      <br>
      <br>
      <br>
      </font></td>
    <td bgcolor="#CCCCCC" align="left" width="122" valign="top" rowspan="2">
	<font ><img src="<% 
	If rsQuery("Photo") = "." then Response.Write "grafx/none.gif"
	If rsQuery("Photo") <> "." then Response.Write rsQuery("Photo") %>" border="0" width="124" height="145"></font></td>
    <td bgcolor="#CCCCCC" align="left" width="318" valign="top" height="75">
	<font  size="1">国家: 
      <% Response.Write rsQuery("country") %>
      <br>
      兴趣爱好: 
      <% Response.Write rsQuery("Hobby") %>
      <br>
      </font></td>
  </tr>
  <tr>
    <td bgcolor="#CCCCCC" align="center" width="318" valign="middle">
	<font  size="1">
	<a href="default.asp?forum=<% Response.Write Request.Querystring("forum") & "&thread=" & Request.Querystring("thread")  & "&action=view" %>">
	返回</a></font></td>
  </tr>
</table>
<font face="&#23435;&#20307;">
<% End IF %>
<% If Request.Querystring("action") = "read" then %>
<%
	  Set rsQuery = Con.Execute("SELECT * FROM messageDB WHERE ID=" & Request.Querystring("Thread"))
	  %>
<br>
<br>
</font>
<table width="600" border="1" cellspacing="0" cellpadding="1" bordercolor="#000000" bgcolor="#999999" height="2">
  <tr> 
    <td width="138" valign="top"><font  size="1">主题 
      <% Response.Write rsQuery("Subject") %>&nbsp;&nbsp; </font></td>
    <td width="159" valign="top"><font size="1">发表者 
      <% 
	  Response.Write "<a href=default.asp?forum=" & Request.Querystring("forum") & "&thread=" & Request.Querystring("thread") & "&action=info&what=" & Session("USERID") & ">" & rsQuery("Poster") & "</a>" %>&nbsp;&nbsp;
	</font></td>
    <td width="119" valign="top"><font  size="1">日期 
      <% Response.Write Left(rsQuery("Time"), 10) %>&nbsp;&nbsp; </font></td>
    <td width="166" valign="top"><font  size="1" color="#999999">d</font><font  size=1> 
      <%
		  If Session("Admin") <> 0 OR FALSE then
		  	Response.Write "<a href=default.asp?forum=" & Request.Querystring("forum") & "&thread=" & Request.Querystring("thread") & "&action=kill&what=" &Request.Querystring("thread") & "&threads=true>Delete</a><br>"
		  End If
		  %>
      </font></td>
  </tr>
  <tr bgcolor="#CCCCCC"> 
    <td valign="top" colspan="4"><font  size=1> 
      <%
		  Konvertieren(rsQuery("Message"))
		  %>
      </font></td>
  </tr>
</table>
<font >
<% Set rsQuery = Con.Execute("SELECT * FROM MessageDB WHERE ReplyID=" & Request.Querystring("Thread"))
	  While Not rsQuery.EOF
	  %>
<br>
</font>
<table width="600" border="1" cellspacing="0" cellpadding="1" bordercolor="#000000" bgcolor="#999999" height="2">
  <tr> 
    <td width="137" valign="top"><font size="1">主题 
      <% Response.Write rsQuery("Subject") %>&nbsp;&nbsp; </font></td>
    <td width="161" valign="top"><font  size="1">发表者 
      <% Response.Write "<a href=default.asp?forum=" & Request.Querystring("forum") & "&thread=" & Request.Querystring("thread") & "&action=info&what=" & Session("ID") & ">" & rsQuery("Poster") & "</a>" %>&nbsp;&nbsp; </font></td>
    <td width="120" valign="top"><font  size="1">日期 
      <% Response.Write Left(rsQuery("Time"), 10) %>&nbsp;&nbsp; </font></td>
    <td width="164" valign="top"><font  size="1" color="#999999">d</font><font  size=1> 
      <%
		  If Session("Admin") <> 0 OR FALSE then
		  	Response.Write "<a href=default.asp?forum=" & Request.Querystring("forum") & "&thread=" & Request.Querystring("thread") & "&action=kill&what=" & rsQuery("ID") & "&threads=true>Delete</a><br>"
		  End If
		  %>
      </font></td>
  </tr>
  <tr bgcolor="#CCCCCC"> 
    <td valign="top" colspan="4"><font  size=1> 
      <%
		  Konvertieren(rsQuery("Message"))
		  %>
      </font></td>
  </tr>
</table>
<font >
<% rsQuery.MoveNext %>
<% WEND %>
<% End If %>
<% If Request.Querystring("action") = "reply" Then %>
<br>
</font>
<table width="600" border="1" cellspacing="0" cellpadding="1" bordercolor="#000000" bgcolor="#999999">
  <tr> 
    <td><font size="1">回复文章</font></td>
  </tr>
  <tr>
    <td bgcolor="#CCCCCC" height="425"> 
      <font > 
      <% Response.Write ("<form name=form1 method=post action=default.asp?forum=" & Request.Querystring("forum") & "&action=replyit&thread=" & Request.Querystring("thread") & ">") %>
      <font size="1">用户名</font></font><font  size="1">:</font><font > </font> 
      <font  size="1"> 
      <%
		If Session("Username") <> "" then
		Response.Write "<font face=Verdana Size=1>" & Session("Username") & "</font>"
		End If
		If Session("Username") = "" then 
		Response.Write "<input type=text name=username>" 
		End If
		%>
      <br>
      </font> <font > <br>
      </font>
      <table width="400" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="66" valign="top"><font size="1">表情: 
            <br>

⌨️ 快捷键说明

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