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

📄 mydayblog.asp

📁 网络办公系统源码
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../../config.asp"-->
<!--#include file="../checklogin.asp"-->
<!--#include file="../../inc/navigate.asp"-->
<%
dim sPageNavigate  '分页表格 
dim iRecordCount,iMaxPageCount,iPageCount,iCurrentPageIndex,i,sTMP  '分页
iMaxPageCount=20 '一页多少行记录
Submit=trim(request.Form("Submit"))
blogid=replace(trim(request.Form("blogid"))," ","")
if Submit="删除日记" then
	if  ChkAdmin("oa_delblog")=False then
   		call message("您没有删除日记的权限","back")
   		call endexit()
	end if

	if blogid="" then
		call message("请至少选择一项删除","back")
		call EndExit()
	end if
	bid=split(blogid,",")
	for i=0 to ubound(bid)
		delsql="delete from oa_blog where id="&bid(i)&" and uid="&session("adminid")
		conn.execute(delsql)
	next
	call message("删除成功","mydayblog.asp")
	call EndExit()

end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link href="../img/css1.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style1 {color: #FFFFFF}
.style3 {color: #FFFFFF; font-weight: bold; }
-->
</style>
</head>
<body>
<form name="form1" method="post" action="mydayblog.asp">
<table width="99%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#F2F2F2" class="tabel1">
  <tr align="right">
    <td width="10%" height="25" align="left" bgcolor="#CC0000"><span class="style3">工作日记 </span></td>
    <td height="25" colspan="4" bgcolor="#CC0000"><input name="Submit" type="button" class="bon" id="Submit" value="发布新日记" onClick="window.location.href='add_newblog.asp'">
      <input name="Submit" type="submit" class="bon" id="Submit" value="删除日记">      </td>
    </tr>
  <tr bgcolor="#F9F9F9">
    <td height="25" colspan="5" align="left" bgcolor="#F2F2F2"><input name="title" type="text" class="tabel1" id="title">
      <input name="Submit" type="submit" class="tabel1" id="Submit" value="按主题搜索">
      <input name="Submit" type="reset" class="tabel1" id="Submit" value="重置"></td>
    </tr>
  <tr bgcolor="#CC6633">
    <td height="25" colspan="2" align="center"><span class="style1"></span> <span class="style3"> 主题</span><span class="style3"> </span></td>
    <td align="center"><span class="style3"> 创建时间 </span></td>
    <td align="center"> <span class="style3"> 回复</span></td>
    <td align="center"><span class="style1"><strong>阅读</strong></span></td>
  </tr>
    <tr >
    <td height="5" colspan="5" bgcolor="#666666"></td>
    </tr>

  <%
  title=trim(request.Form("title"))
  		if title="" then
			Sql="select id,uid,uname,oa_blogtitle,addtime,hits from oa_blog where companyid="&session("companyid")&" order by id desc"
		else
			Sql="select id,uid,uname,oa_blogtitle,addtime,hits from oa_blog where companyid="&session("companyid")&" and oa_blogtitle like '%"&title&"%' order by id desc"
		end if	
			  Call GetCurrentPageIndex()  '取得当前页码
				set my_rs=server.CreateObject("adodb.recordset")
				my_rs.open Sql,conn,1,3
				my_rs.PageSize=iMaxPageCount
				my_rs.CacheSize =iMaxPageCount
				if my_rs.recordCount <>   0   then   my_rs.Absolutepage=iCurrentPageIndex
				iRecordCount=my_rs.RecordCount  '所有查询出来的记录数
				iPageCount=my_rs.PageCount  '最终多少页
				if iCurrentPageIndex>iPageCount then iCurrentPageIndex=iPageCount  '控制当前页不得超出范围
				sPageNavigate=GetNavigate("mydayblog.asp?title="&title&"",iRecordCount,iMaxPageCount,iCurrentPageIndex,true,true,"项")  '取得分页表格
				if Not my_rs.Eof then
				For i = 1 to iMaxPageCount '利用for next 循环依次读出当前页的记录 
			  if my_rs.EOF then  Exit For
					bgColor="#F8F8F8"
				if i mod 2=0 then bgColor="#DFEFFF"
				 rcount=conn.execute("select count(id) from oa_replyblog where blogid="&my_rs("id"))(0)
	%>
  <tr bgcolor="<%=bgColor%>">
    <td height="25" colspan="2" align="left" bgcolor="<%=bgColor%>"><input type="checkbox" name="blogid" value="<%=my_rs(0)%>">      <a href="view_blog.asp?id=<%=my_rs(0)%>"><%=my_rs(3)%></a>&nbsp;[<%=my_rs("uname")%>]</td>
    <td width="19%" align="center"><%=my_rs(4)%></td>
    <td width="13%" align="center"><%=rcount%></td>
    <td width="11%" align="center"><%=my_rs(5)%></td>
  </tr>
              <%
						my_rs.MoveNext()
				       Next
                     End if
                  my_rs.close
                 set my_rs=nothing
				%>
</table>
<table width="99%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="20">&nbsp;</td>
  </tr>
  <tr>
    <td height="20"><%=sPageNavigate%></td>
  </tr>
</table>
</form>
</body>
</html>

⌨️ 快捷键说明

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