📄 note.asp
字号:
<!--#include file="head.asp"-->
<TABLE style="BORDER-RIGHT: #cccccc 1px solid; BORDER-LEFT: #cccccc 1px solid"
cellSpacing=0 cellPadding=0 width=778 align=center bgColor=#ffffff>
<TBODY>
<TR vAlign=top>
<TD bgColor=#cccccc><IMG height=1 alt="" src="image/stu.htm" width=1
name=""></TD>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center
bgColor=#ffffff border=0>
<TBODY>
<TR>
<TD height=8 bgColor=#f4f4f4></TD></TR>
<TD>
<TABLE id=AutoNumber3 style="BORDER-COLLAPSE: collapse"
cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top height=52>
<TABLE id=AutoNumber5 style="BORDER-COLLAPSE: collapse"
borderColor=#111111 cellSpacing=0 cellPadding=3 width="100%"
border=0>
<TBODY>
<TR>
<TD class=6 width=495 background=image/type_bg.gif
height=30><IMG height=12 src="image/type01.gif" width=12
align=absMiddle> <span class="style5">当前位置:</span> <A
href="index.asp">网站首页 - </A><span style="color: #FF99CC">记事本</span></TD>
<TD width=100 background=image/type_bg.gif>
<DIV align=center><IMG
src="image/more.gif"
border=0></DIV></TD></TR><TR>
<TD colSpan=2>
<DIV align=center>
<%If session("wzname")="" Then%><br>
<font color=red>只有会员才能使用!</font>
<%else
dim username,sql,type2,content,rs
username=Session("wzname")
content=request.form("content")
type2=Request.QueryString("type2")
Select Case type2
Case "show":
Call show
Case "edit":
call edit
Case "add":
Call add
Case "add2":
Call add2
Case Else:
call show
End Select
End If
sub show
set rs=Server.CreateObject("Adodb.Recordset")
rs.open "select * from note1 where username='"&session("wzname")&"'",conn,1,3
if rs.eof then
Response.Write("新的来吧?你的记事本还没有使用呢,现在创建个用用?")
Response.Write("<br>")
Response.Write("<a href='?type2=add'><font color=red size=2>创建我的记事本</font></a>")
else
%>
<table width="100%" cellspacing="0">
<form name="form1" method="post" action="?type2=edit"><tr>
<td width="16%" valign="top"> 这里是提供给同学们的一个简单但很实用的记事本, 以前上网时,想记下些精彩的文字,但又没有笔,QQ中的资料也被搞得非常难看,现在你可以将这些文字写在这里了,这是保密的,别人无法看到你的文字,这个暂时没有大小限止。</td>
<td width="84%"><textarea name="content" cols="90" rows="20" id="content"><%=rs("content")%></textarea></td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit" value="重置">
</div></td>
</tr></form>
</table>
<%end if
rs.close
set rs= nothing
end sub
sub add
%>
<table width="100%" cellspacing="0">
<form name="form1" method="post" action="?type2=add2"><tr>
<td width="16%" valign="top"> 这里是提供给同学们的一个简单但很实用的记事本, 以前上网时,想记下些精彩的文字,但又没有笔,QQ中的资料也被搞得非常难看,现在你可以将这些文字写在这里了,这是保密的,别人无法看到你的文字,这个暂时没有大小限止。</td>
<td width="84%"><textarea name="content" cols="90" rows="20" id="content"></textarea></td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit" value="重置">
</div></td>
</tr></form>
</table>
<%end sub
sub add2
if Session("wzname")="" then
responsw.write "你还没有登录或者会话已经结束"
exit sub
end if
set rs=Server.CreateObject("Adodb.Recordset")
rs.open "select * from note1 where username='"&Session("wzname")&"'",conn,1,3
if not rs.eof then
Response.Write("对不起,你数据提交方式有误!")
Response.Write("<br>")
Response.Write("<a href='javascript:history.go(-1)'><font color=red size=2>返回</font></a>")
else
rs.close
rs.open "select * from note1 where 1=2",conn,1,3
rs.addnew()
rs("username")=Session("wzname")
rs("content")=content
rs.update
rs.close
set rs=nothing
end if
end sub
sub edit
if Session("wzname")="" then
responsw.write "你还没有登录或者会话已经结束"
exit sub
end if
set rs=Server.CreateObject("Adodb.Recordset")
rs.open "select * from note1 where username='"&Session("wzname")&"'",conn,1,3
rs("content")=content
rs.update
rs.close
set rs=nothing
Response.Redirect "note.asp"
end sub%></DIV>
</TR></TBODY>
</TABLE>
</TD></TR></TBODY></TABLE></TD></TR></TABLE></TD></TR></TBODY></TABLE>
<!--#include file="bottom.asp"--></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -