?? note.asp
字號:
<!--#include file="conn.asp" -->
<HTML>
<HEAD>
<TITLE></TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #FFffff;
}
-->
</style>
<link href="style.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY bgcolor="#FF0000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<div align="center">
<table width="100%" border="0" cellspacing="5" cellpadding="5">
<tr>
<td> <div align="right">
<% If session("admin")<>"yes" Then
response.write("系統超時,您需要<font color=red><b>重新登陸</font></b>。 ")
response.end
Else %>
您現在處于管理狀態。
<%end if%>
<strong><a href="javascript:self.location.reload();"><font color="#FF0000">刷新</font></a></strong>
</div></td>
</tr>
<tr>
<td> <strong>財務筆記:</strong><br>
<br>
<%set rs=server.createobject("adodb.recordset")
sql="select * from not "
rs.open sql,conn,3,2
if request("tit")<>"" and request("note")<>"" and request("act")<>"" then
rs.addnew
rs("name")=session("name")
rs("tit")=request("tit")
rs("note")=request("note")
rs.movenext
ms=" <b>添加成功</b>"
end if
rs.close%>
<%if request("del")="yes" then
set rs=server.createobject("adodb.recordset")
id=request("id")
sql="select * from not where id like '"&id&"' "
rs.open sql,conn,1,3
if rs.eof or rs.bof then
else%>
<script language=VBScript>
msgbox "刪除了!"
</script>
<%
rs.delete
end if
rs.close
end if%>
<%set rs=server.createobject("adodb.recordset")
sql="select * from not order by id desc"
rs.open sql,conn,3,2
if rs.eof or rs.bof then%>
<table width="100%" border="0" cellpadding="2" cellspacing="2" class="front">
<tr>
<td><div align="center">目前還沒有。</div></td>
</tr>
</table>
<%else
pgsize=8
page=request.querystring("page")
rs.pagesize=pgsize
pgnm=rs.pagecount
if page=""or clng(page)<1 then page=1
if clng(page)>pgnm then page=pgnm
if pgnm>0 then rs.absolutepage=page
count=0%>
<table width="100%" border="0" cellpadding="1" cellspacing="1" class="front">
<tr>
<td bgcolor="#F2EADF" ><div align="left" class="gb4">現有記錄:<font color="#FF0000"><%=rs.recordcount %></font>共<font color="#FF0000">
<%= pgnm %></font> 頁,當前頁:<font color="#0033FF"><%= page %> </font><a href=?page=1>第一頁</a> <a href=?page=<%=pgnm%>>最后一頁</a>
<a href=?page=<%=page+1%>>下一頁</a>
<a href=?page=<%=page-1%>>上一頁</a>
<strong><a href="#add"><font color="#FF0000">添加筆記</font></a></strong>
</div></td>
</tr>
</table><br>
<% do while not rs.eof and count<rs.pagesize %>
<table width="100%" border="0" cellpadding="2" cellspacing="2" class="front">
<tr>
<td width="9%">標題:</td>
<td colspan="2"><%= rs("tit") %></td>
<td width="34%">日期:<%= rs("time") %></td>
</tr>
<tr>
<td>內容:</td>
<td colspan="3"><%= rs("note") %></td>
</tr>
<tr>
<td colspan="4"><div align="left">編號:<%=rs("id")%> <a href="?del=yes&id=<%=rs("id")%>"><font color="#FF0000">刪除</font></a>
</div>
<div align="center"></div></td>
</tr>
<tr>
<td colspan="4"><hr size="1" noshade></td>
</tr>
</table>
<%
if not rs.eof or not rs.bof then rs.movenext
count=count+1
loop
%>
<%
end if
rs.close
%>
<p class="style1"></p>
<br>
<table width="98%" border="0" cellpadding="2" cellspacing="2" class="input">
<tr>
<td>
<form name="form1" method="post" action="">
<br>
標題:
<input name="tit" type="text" id="tit" value="請填寫"" size="50" maxlength="50">
<br>
<br>
內容:
<textarea name="note" cols="50" rows="6" wrap="VIRTUAL" id="textarea"></textarea>
<input name="act" type="submit" id="act2" value="添 加">
<%= ms %> <a name="add"></a>
<input name="del" type="hidden" id="del" value="no">
<br>
</form></td>
</tr>
</table>
<br>
<br>
</td>
</tr>
</table>
</div>
</BODY>
</HTML> <%
conn.close%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -