<!--#INCLUDE FILE="conn.asp" -->
<!--#include file="Diary_Conn.asp"-->
<!--#INCLUDE FILE="Class_Checkuser.asp" -->
<!--#INCLUDE FILE="Class_Top.asp" -->
<%
locat="风铃日记"

if membername="" Then
  	ErrMsg=ErrMsg+"<br>"+"<li>您还没有<a href=Class_Login.asp><font color=red>登录或注册校友录</font></a>。"
	Call top(1,1)
	Call Error("Information",ErrMsg)
	
	 call footer() 
Else
dim title,content,weather,xinqing,ispub,addtime,sampname,e_id
e_id=clasky_string(request("e_id"))
title=clasky_string(request("title"))
content=clasky_string(request("content"))
weather=clasky_string(request("weather"))
xinqing=clasky_string(request("xinqing"))
sampname=clasky_string(request("sampname"))

ispub=clasky_string(request("ispub"))
if ispub="" then ispub="0"
addtime=clasky_string(request("a_year"))&"-"&clasky_string(request("a_month"))&"-"&clasky_string(request("a_day"))
Response.Write "<script>"
set rs=server.createobject("adodb.recordset")
sql="select * from clasky_diary where (state = 'v' and id="&e_id&" and whois='"&membername&"')"			
    rs.open sql,clasky_cn,1,3
if not rs.eof then

clasky_cn.execute("update clasky_diary set weather='"&weather&"',xinqing='"&xinqing&"',sampname='"&sampname&"',title='"&title&"',content='"&content&"',ispub='"&ispub&"' where id="&e_id)


Response.Write "alert('您的操作已经成功！');"
Response.Write "top.window.close();"

else
Response.Write "alert('错误！您没有权限，或者参数错误！');"
end if
rs.close
Response.Write "</script>"
call Close_clasky_cn
end if
%>
