<!--#include file="conn.asp"-->
<!--#include file="inc/md5.asp"-->
<!--#include file="inc/htmlencode2.asp"-->
<!--#include file="bbsuser.asp"-->
<!--#include file="inc/ubbcode.asp"-->
<%
id=request("id")
userid=request.cookies("clubuser_id")
if request("act")="y" then
title=Checkstr(request("title"))
content=Checkstr(htmlencode2(request("content")))
content=RegExReplace(content,"\b(script)\b"," $1 ")
content=RegExReplace(content,"\b(iframe)\b"," $1 ")
sql="update sms set title='"&title&"',content='"&htmlencode2(content)&"' where id="&id&""
conn.execute sql
response.redirect "blogsms.asp"
end if
%>
<!--#include file="memberinfo.asp"-->
<html><head><meta http-equiv=content-type content="text/html; charset=gb2312">
</head>
<script language="javascript">
<!--
	function check(form)
	{
    if (form.title.value=="")
    	{
    		alert("请填写标题！");
    		form.title.focus();
    		return false;
  	}
    if (form.content.value=="")
    	{
    		alert("请填写内容！");
    		form.content.focus();
    		return false;
  	}
return true;
	}
//-->
</script>
<body>
<center>
<title><%=username%>的日志管理中心</title>
<link rel="stylesheet" type="text/css" href="<%=cssfile%>">
<!--#include file="usernav.asp" -->
<!--#include file="bokerhead.asp" -->
<div class="stage">
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="layout">
<tr>
<td valign="top" class="c2t3">
<div id="mod_profile" class="mod" rel="drag">
<!--#include file="usercalog.asp" -->
</div>
</td>
<td valign="top" class="c2t1">
<div id="m_blog" class="modbox">
              <table width="95%"  border="0" align="center" cellpadding="0" cellspacing="0">
                <tr valign="middle"> 
                  <td height="40" colspan="2" align="left" class="f14"><div class="opt"> 
                      <div align="center"><strong>编辑短信</strong></div>
                    </div></td>
                </tr>
                <tr> 
                  <td height="1" colspan="2" bgcolor="#336699" class=new14><spacer height="1" type="block"></td>
                </tr>
                <%
sql="select * from sms where id="&id&""
set rsblog=server.createobject("adodb.recordset")
rsblog.open sql,conn,1,1		  
%>
                <form name="form2" method="post" action="" style="MARGIN-BOTTOM: 0px" onsubmit="return check(this)">
                  <tr> 
                    <td width="10%" height="35"> <div align="left">标题：</div></td>
                    <td width="90%"><input name="title" type="text" id="title" value="<%=rsblog("title")%>" size="35"></td>
                  </tr>
                  <tr> 
                    <td height="15" valign="top">内容: </td>
                    <td height="15" valign="top"><textarea name="content" cols="50" rows="20" id="content"><%=unhtmlencode2(rsblog("content"))%></textarea></td>
                  </tr>
                  <tr>
                    <td height="35" valign="top">&nbsp;</td>
                    <td height="15" valign="middle">
                    <input name="act" type="hidden" id="act" value="y">
                    <input name="id" type="hidden" id="id" value="<%=id%>">
					<input type="submit" name="Submit" value="确认修改"></td>
                  </tr>
                </form>
              </table>
              <br>
            </div>

</td>
</tr></table>
</div>
</div>
<br><center>
    <!--#include file="tail.asp" -->
  </center>
</center>
</body>
</html>
<%closedb%>