<% dim totaldiary,adperpage,Currentpage,totalpages,i adperpage=15 set rs=server.createobject("adodb.recordset") sql="select * from jjh_record order by record_id DESC" rs.open sql,conn,1,1 %> <%if not rs.eof then rs.Movefirst rs.pagesize=adperpage if trim(request("page"))<>"" then currentpage=clng(request("page")) if currentpage>rs.pagecount then currentpage=rs.pagecount end if else currentpage=1 end if totaldiary=rs.recordcount if currentpage<>1 then if(currentpage-1)*adperpage <%i=i+1 rs.movenext loop else If rs.EOF And rs.BOF Then%> <%end if end if%>
学生会工作指南管理 添加新工作记录
组织者
工作记录标题
时间
管理
<%=rs("record_author")%> <%=rs("record_title")%> <%=rs("record_time")%> ">修改 ">删除
当前还没有工作记录!
<%=currentpage%>/<%=totalpages%>页,<%=totaldiary%>条记录/<%=adperpage%>篇每页. <% i=1 dy10=false showye=totalpages if showye>10 then dy10=true showye=10 end if for i=1 to showye if i=currentpage then %> <%=i%> <%else%> <%=i%> <%end if next if totalpages>currentpage then if request("page")="" then page=1 else page=request("page")+1 end if%> >> <%end if%>
<% if request("type")="new" then%>
添加新工作记录
工作记录标题 *必须填写
工作时间
组织者姓名
<% End If %> <% dim rs1,rs2 dim sql1,sql2 If Request.Form("ok")="确定新增" Then record_title=request("record_title") record_time=request("record_time") record_author=request("record_author") End If If request("action")="add" Then set rs1=server.CreatObject("adodb.recordset") rs1.Open "jjh_record",conn,3,3 rs1.addnew rs1("record_title")=record_title rs1("record_time")=record_time rs1("record_author")=record_author rs1.update rs1.close response.Redirect("record.asp") end if %> <% if request("type")="edit" then if request.querystring("record_id")="" then errmsg=errmsg+"
"+"
  • 请指定操作的对象!" call diserror() response.end else if not isinteger(request.querystring("record_id")) then errmsg=errmsg+"
    "+"
  • 非法的公告ID参数!" call diserror() response.end end if end if sql2="select * from jjh_record where record_id="&cint(request.querystring("record_id")) set rs2=server.createobject("adodb.recordset") rs2.open sql2,conn,1,1 %>
    ">
    修改工作记录
    工作记录标题 "> *必须填写
    工作时间 ">
    组织者姓名 ">
    <% rs2.close set rs2=nothing End If %> <% dim rs3,rs4,rs5 dim sql3,sql4,sql5 if request.form("okla")="确定修改" then record_title=request("record_title") record_time=request("record_time") record_author=request("record_author") End If If request("action")="edit" Then set rs3=server.CreateObject("adodb.recordset") sql3="select * from jjh_record where record_id="&cint(request.querystring("record_id")) rs3.open sql3,conn,3,3 rs3("record_title")=record_title rs3("record_time")=record_time rs3("record_author")=record_author rs3.update rs3.close response.Redirect("record.asp") end if %> <% If request("type")="del" Then if request.querystring("record_id")="" then errmsg=errmsg+"
    "+"
  • 请指定操作的对象!" call diserror() response.end else if not isinteger(request.querystring("record_id")) then errmsg=errmsg+"
    "+"
  • 非法的公告ID参数!" call diserror() response.end end if end if sql4="select * from jjh_record where record_id="&cint(request.querystring("record_id")) set rs4=server.createobject("adodb.recordset") rs4.open sql4,conn,1,1 %>
    ">
    删除工作记录
    工作记录标题 <%=rs4("record_title")%>
    工作时间 <%=rs4("record_time")%>
    组织者姓名 <%=rs4("record_author")%>
    <% End If %> <% dim rs6 dim sql6 if request.Form("oklala")="确定删除" then if request.Form("record_id")="" then founderr=true errmsg=errmsg+"
    "+"
  • 你必须指定操作的对象!" else if not isInteger(request.form("record_id")) then founderr=true errmsg=errmsg+"
    "+"
  • 非法的公告id参数。" end if end if if request("action")="del" then set rs6=server.createobject("adodb.recordset") sql6="select * from jjh_record where record_id="&cint(request.querystring("record_id")) rs6.open sql6,conn,1,3 rs6.delete rs6.close set rs6=nothing response.Redirect("record.asp") end if end if %>