www.gusucode.com > 枫的记忆个人主页程序源码程序 > downcode.com\fengdejiyizh\admin\change_diary.asp

    <link href="admin.css" rel="stylesheet" type="text/css">
<%
	if session("level")<>"1" then
		Response.Write("你无权访问此页面!")
		Response.End
	end if	
%>
<!--#INCLUDE FILE="conn.asp"-->
<%
  hidden=trim(request("hidden"))
  id=trim(request("id"))
 
  if hidden="ok" then
  d_type=trim(request("d_type"))
  title=request("title")
  weather=trim(request("weather"))
  add_time=trim(request("add_time"))
  content=request("content")
  who=trim(request("who"))
  
  set rs=server.createobject("adodb.recordset")
  sql="select * from diary where id="&id
  rs.Open sql,conn,1,3
  rs("d_type")=d_type
  rs("title")=title
  rs("weather")=weather
  rs("content")=content
  rs.update
	if err.number<>0 then
	    Response.Write("<script language=javascript>alert('修改失败,请点击返回');history.back();</script>")
	    Response.End
	else
		Response.Redirect "manage_diary.asp"
		Response.End
	end if
  end if
  
  set rs1=server.createobject("adodb.recordset")
  sql="select * from diary where id="&id
  rs1.Open sql,conn,1,3
%>
<script language="JavaScript" src="inc/ubbcode.js"></script>

<body bgcolor="#CDD5DE">
<br><br>
<table width="75%" border="0" cellspacing="1" cellpadding="0" align="center" class="tablebody">
  <tr>
    <td><table width="100%" border="0" cellpadding="5" cellspacing="0">
        <tr>
          <th>作 品 修 改</a></span></th>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF"><table width="100%"  border="0" cellspacing="1" cellpadding="8">
	<form name="form1" method="post" action="change_diary.asp">
      <input type="hidden" name="hidden" value="ok">
      <input type="hidden" name="id" value="<%=id%>">
      <tr bgcolor="#F3F5F8">
        <td width="30%" align="right">日 记 类 型:</td>
        <td width="70%"><select name="d_type">
		  <option value="<%=rs1("d_type")%>"><%=rs1("d_type")%></option>
          <option value="公开日记">公开日记</option>
          <option value="私人日记">私人日记</option>
        </select></td>
      </tr>
      <tr bgcolor="#F3F5F8">
        <td width="30%" align="right">标 题:</td>
        <td width="70%"><input name="title" type="text" id="title" size="50" value="<%=rs1("title")%>"></td>
      </tr>
      <tr bgcolor="#F3F5F8">
        <td align="right">天 气:</td>
        <td><input name="weather" type="text" id="weather" size="30" value="<%=rs1("weather")%>"> (仅限 web 作品)</td>
      </tr>
	<tr bgcolor="#F3F5F8">
	  <td align="right">UBB 标 签:</td>
	  <td><!--#include file="inc/UBBBln.asp"--><%=UBBBln("content")%></td>
	</tr>
      <tr bgcolor="#F3F5F8">
        <td align="right">内 容:</td>
        <td><textarea name="content" cols="60" rows="10"><%=rs1("content")%></textarea></td>
      </tr>
      <tr bgcolor="#F3F5F8">
        <td height="40" colspan="2" align="center"><input type="submit" name="Submit" value="修 改"> 
             
          <input type="reset" name="Submit2" value="重 置"></td>
      </tr>
	  </form>
    </table></td>
</table>
</body>
</html>