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

📄 index.asp

📁 一个极好的学生日记管理程序
💻 ASP
字号:
<%
user=request("user")
p=request("page")
session("adminuser")=""
%>
<html>
<!-- #include file="ubbcode.asp" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Language" content="zh-cn">
<%
session("root")="http://classsky.com/"
set conn=server.createobject("ADODB.CONNECTION")
conn.open "DBQ="+server.mappath("classsky.asp")+";DRIVER={Microsoft Access Driver (*.mdb)};"
set rs1=server.createobject("adodb.recordset")
sql1="SELECT * from admin"
rs1.open sql1,conn,1,1
if user="" then user=rs1("name")
see=-1
set rs2=server.createobject("adodb.recordset")
sql2="SELECT * from user where user='"&user&"'"
rs2.open sql2,conn,1,1
if not rs2.eof then
	url=rs2("url")
	mail=rs2("mail")
	see=rs2("see")
	logo=rs2("logo")
end if
	if logo="" or isnull(logo) then logo="back/01.jpg"

if session("user")<>user then
	sql2="update user set see=see+1 WHERE user='"&user&"'"
	conn.execute(sql2)
	session("user")=user
end if

set rs=server.createobject("adodb.recordset")
sql="SELECT * from txt where 用户='"&user&"' order by 年*10000+月*100+日 desc"
rs.open sql,conn,1,1
%>
<title><%=user%>的日记本</title>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<script src="alt.js"></script>
<style>
BODY {BACKGROUND-ATTACHMENT: fixed; BACKGROUND-IMAGE: url(<%=logo%>); BACKGROUND-POSITION:center center;  BACKGROUND-REPEAT: no-repeat;scrollbar-track-color:#eeeeee; SCROLLBAR-FACE-COLOR: #ffffff; FONT-SIZE: 9pt; SCROLLBAR-HIGHLIGHT-COLOR: #ffffff; SCROLLBAR-SHADOW-COLOR: #ffffff;  SCROLLBAR-3DLIGHT-COLOR: #ffffff; SCROLLBAR-ARROW-COLOR: #ffffff; FONT-FAMILY: "Verdana"; SCROLLBAR-DARKSHADOW-COLOR: #ffffff;CURSOR: url('images/c.cur')}
select,input{font-size:8pt; color:#666666;}
textarea{font-size:14; color:#666666}
A {COLOR: #000000; TEXT-DECORATION: none }
A:visited {COLOR: #000000; TEXT-DECORATION: none}
A:active {COLOR: #ffffff; TEXT-DECORATION: none}
A:hover {COLOR: #000000; background-color: #E8FCD0}
td {FONT-SIZE: 9pt;  FONT-FAMILY: "Verdana"; color:#3333333;letter-spacing : 1pt ;line-height :14pt;WORD-BREAK: break-all;}
</style>
</head>

<body topmargin="3" leftmargin="0" bgcolor="#FFFFFF">
<div align="center">
  <center>
    <table width="70%" border="0" cellspacing="0" cellpadding="0">
      <tr> 
        <td width="36%"><img src="images/title.gif" width="197" height="58"></td>
        <td width="64%">
          <table style="FILTER: glow(color=#E8FCD0,direction=2)" align="center" bordercolor="#99CC99">
            <br>
            <font face=verdana color=#000000 size=2>&nbsp; 班 级 天 空 - 美 丽 回 忆 &nbsp;</font><br>
            <br>
          </table>
        </td>
      </tr>
    </table>
    <table width="50%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="5"></td>
      </tr>
    </table>
    <table border="0" width="49%" cellspacing="0" cellpadding="0">
      <tr> 
        <td nowrap><img border="0" src="images/ic1.gif" width="9" height="9"> 
          <%=user%>的日记本</td>
        <td align="right" nowrap>&nbsp;&nbsp;&nbsp;|<a href="calendar.asp?user=<%=user%>" title=按日历选择查看日记内容 target="_blank">&nbsp;日历&nbsp;</a>|<a href="pass.asp?user=<%=user%>" title=日记的修改、增加、删除、配置>&nbsp;管理&nbsp;</a>|<a href="<%=url%>" title=返回主页<%=url%> target="_blank">&nbsp;主页&nbsp;</a>|<a href="mailto:<%=mail%>" title=写信给我<%=mail%>>&nbsp;邮箱&nbsp;</a>|<a href="pass.asp?user=<%=user%>" title=日记的修改、增加、删除、配置></a><a href="list.asp?user=<%=user%>" title=看看其他人的日记>&nbsp;列表&nbsp;</a>|<a href="reg.asp" title=申请你自己的日记本>&nbsp;申请&nbsp;</a>|</td>
      </tr>
    </table>                                                
    <br>
    <table width="33%" border="0" cellspacing="0" cellpadding="0">
      <tr> 
        <td>&nbsp;</td>
      </tr>
    </table>
    </center>                                                
</div>                                                
<center>
  <%if see<0 then
	response.write "<p><a href=reg.asp>还没有申请不能使用,您可以点这里立刻申请日记本!</a></p>"
end if%>
  <%if rs.eof and rs.bof then
	response.write "<p>还 没 有 一 则 日 记</p>"
else%>
  <%                                                 
cc=1                                                 
	if not isempty(request("page")) then                                                 
		pagecount=cint(request("page"))                                                 
	else                                                 
		pagecount=1                                                 
	end if                                                 
	rs.PageSize=rs1("page")
	rs.AbsolutePage=pagecount                                                 
For iPage = 1 To rs.PageSize                                                 
If rs.EOF Then Exit For                                                 
%>
  <table style="FILTER: alpha(opacity=72)" width="60%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
    <tr> 
      <td width="4%"><img src="ta/t-ha8.gif" width="30" height="30"></td>
      <td width="91%" height="30" background="ta/t-ha9.gif">&nbsp;</td>
      <td width="5%"><img src="ta/t-ha17.gif" width="30" height="30"></td>
    </tr>
    <tr> 
      <td background="ta/t-ha35.gif">&nbsp;</td>
      <td>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" height="81">
          <tr> 
            <td width="60%"><img src="ta/ic2.gif" width="16" height="16"><%=rs("timu")%> 
              <%if DateDiff("d",rs("addtime"),date())<1 then%>
              <%end if%>
              | <%=rs("天气")%>&nbsp;&nbsp;&nbsp;&nbsp;</td>
            <td width="40%"> <%=rs("年")%>年<%=rs("月")%>月<%=rs("日")%>日 <img src='<%=rs("心情")%>'  border=0></td>
          </tr>
          <tr>
            <td colspan="2">
              <table width="100%" border="0" cellspacing="0" height="10" cellpadding="0">
                <tr> 
                  <td background="images/mainline.gif" height="15">&nbsp;</td>
                </tr>
              </table>
            </td>
          </tr>
          <tr> 
            <td colspan="2"><img src=images/ic1.gif height=9 width=9 border=0 hspace=0> 
              <%if rs("保密")<>"y" then%>
<%
Message=UBBCode(rs("日记内容"))
response.Write(Message)
%> 
              <%else%>
              本则日记保密....... 
              <%end if%>
            </td>
          </tr>
        </table>
      </td>
      <td background="ta/t-ha18.gif"></td>
    </tr>
    <tr> 
      <td><img src="ta/t-ha34.gif" width="30" height="30"></td>
      <td height="30" background="ta/t-ha27.gif">&nbsp;</td>
      <td><img src="ta/t-ha26.gif" width="30" height="30"></td>
    </tr>
  </table>
  <br>
  <%                                              
cc=cc+1                                              
rs.movenext                                              
Next                                              
Response.Write "<p>共"&rs.recordcount&"则日记,每页"
Response.Write rs1("page")
Response.Write "则,共"
Response.Write int(rs.recordcount/rs1("page")+.999999)
Response.Write "页,这是第"
Response.Write PageCount
Response.Write "页 "


if rs.PageCount>1 Then                                              
 If pagecount<>1 Then                                              
   Response.Write "<A HREF=index.asp?user="&rs2("user")&">首页</A>    "                       
   Response.Write "<A HREF=index.asp?Page="&(pagecount-1)&"&user="&rs2("user")&">前页</A> "                                              
 End If                                              
 If pagecount<>rs.PageCount Then                                              
   Response.Write "<A HREF=index.asp?Page="&(pagecount+1)&"&user="&rs2("user")&">后页</A>    "                                              
   Response.Write "<A HREF=index.asp?Page="&rs.PageCount&"&user="&rs2("user")&">尾页</A>"                                              
 End If                                              
End If                                              
end if                                              
%>
  <font color="888888" face="Arial">[访问<%=see%>次]</font><br>
  <br>
  <table class=td2 width="50%" border="0" cellspacing="0" cellpadding="0" align="center">
    <tr> 
      <td nowrap align="center">免费服务由<a href="http://classsky.com/">|班级天空|</a>提供<font size="1">/ 
        Skin By <a href="http://blueyr.com">Blueyr.Com</a></font><font size="1"><br>
        <a href="http://classsky.com/" target="_blank"><img src="images/copy.gif" width="305" height="5" border="0"></a> 
        </font></td>
    </tr>
  </table>
  </center>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%><br>
<NOSCRIPT><IFRAME SRC=index.asp></IFRAME></NOSCRIPT>
</body>                                              
                                              
                 
                 
                 
                 





⌨️ 快捷键说明

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