<!--#include file="../Include/Conno.asp" -->
<!--#include file="../Include/char.asp" -->
<!--#include file="../Include/const.asp" -->
<!--#include file="IsLogin.asp" -->
<%
  m_UserID = Session("CurUserID")
  m_Sql  = "Select top 1 * From RJ_Diary Where F_UserID=" & m_UserID
  Set rs = conn.Execute(m_Sql)
  if not rs.Eof then
    m_DiaryName = rs("F_DiaryName")
	m_DiaryContent = rs("F_DiaryContent")
	m_SmallPic = left(right(rs("F_SmallPic"),7),3)
	m_BgPic = left(right(rs("F_BgPic"),7),3)
  end if  

if Request.ServerVariables("REQUEST_METHOD")="POST" then
  dim m_Sql
  dim m_Name,m_Content,m_SmallPic,m_BgPic
  m_Name = checkStr(Trim(Request.Form("txtName")))
  m_Content = checkStr(Trim(Request.Form("txtContent")))
  m_SmallPic = Request.Form("selSmallPic")
  m_BgPic = Request.Form("selBgPic")
  m_Addtime = now()
  m_IPInfo = Request.ServerVariables("REMOTE_ADDR")
  m_Sql = "update RJ_Diary set "
  m_Sql =  m_Sql + "F_DiaryName='"&m_Name&"',"
  m_Sql =  m_Sql + "F_DiaryContent='"&m_Content&"',"
  m_Sql =  m_Sql + "F_BgPic='"&m_BgPic&"',"
  m_Sql =  m_Sql + "F_SmallPic='"&m_SmallPic&"',"
  m_Sql =  m_Sql + "F_Addtime='"&m_Addtime&"',"
  m_Sql =  m_Sql + "F_IPInfo='"&m_IPInfo&"' where F_UserID="&m_UserID
  conn.Execute(m_Sql)
  CloseDatabase()
  call Msgbox("日记本配置成功","RJ_DiaryList.asp")
end if
%>

<HTML><HEAD><TITLE>会员俱乐部日记本配置</TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<link href="../css/member.css" rel="stylesheet" type="text/css">

</HEAD>
<BODY leftMargin=0 topMargin=0>
<!--#include file="../include/top.asp" -->
<!--#include file="../include/member_top.asp" --><!--#include file="club_top.asp" -->
<!--#include file="Top.asp" -->
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr> 
    <td width="183" height="400" align="center" valign="top"> 
      <!--#include file="left.asp" -->
    </td>
    <td width="597" align="center" valign="top"><table width="96%"  border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="100%" height="40" align="right"><img src="../Images/member/hy_c_6.gif" width="185" height="80"></td>
        </tr>
        <tr> 
          <td height="1" bgcolor="#c7c7c7"></td>
        </tr>
      </table>
      <TABLE width="95%" 
      border=0 align="center" cellPadding=0 cellSpacing=0 
      borderColor=#111111 bgcolor="#FFFFFF" id=AutoNumber7 style="BORDER-COLLAPSE: collapse">
        <TBODY>
          <TR valign="top"> 
            <TD colSpan=2>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <td height="6"></td>
                </tr>
              </table>
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <form name="form1" method="post" action="RJ_Update.asp">
                    <td valign="top"><table width="100%" border="0" align="center" cellpadding="2" cellspacing="4">
                        <tr> 
                          <td width="14%" height="23" align="right" valign="bottom">日记名称：</td>
                          <td width="60%" valign="bottom"><input name="txtName" type="text" class="text" value="<%=m_DiaryName%>" size="33" maxlength="50"></td>
                          <td width="26%" rowspan="6" align="center" valign="top"> 
                            <table width="70%" border="0" cellpadding="2" cellspacing="1" bgcolor="e8e9ee">
                              <tr> 
                                <td bgcolor="e8e9ee"><font class=cha2>日记背景</font></td>
                              </tr>
                              <tr> 
                                <td align="center" bgcolor="#FFFFFF"><img id=BgPic   src="../Diary/BgPic/<%=m_BgPic%>.gif" ></td>
                              </tr>
                            </table>
                            <br> <br> <table width="70%" border="0" cellpadding="2" cellspacing="1" bgcolor="e8e9ee">
                              <tr> 
                                <td bgcolor="e8e9ee">日记图案</td>
                              </tr>
                              <tr> 
                                <td align="center" bgcolor="#FFFFFF"><font class=cha2><img id=SmallPic   src="../Diary/SmallPic/<%=m_SmallPic%>.gif" ></font></td>
                              </tr>
                            </table></td>
                        </tr>
                        <tr> 
                          <td height="21" align="right"><font class=cha2>日记背景：</font></td>
                          <td> <font class=cha2> 
                            <select name=selBgPic class=editbox2  onChange="document.images['BgPic'].src=options[selectedIndex].value;" size=1 >
                              <%
			      Response.Write "<OPTION value=../Diary/BgPic/"&m_BgPic&".gif>"&m_BgPic&"</OPTION>"
				  for i = 0 to 27
				   m_BgPic = Right("00"&cstr(i),3)
				   Response.Write "<OPTION value=../Diary/BgPic/"&m_BgPic&".gif>"&m_BgPic&"</OPTION>"
				  next
				  %>
                            </select>
                            </font></td>
                        </tr>
                        <tr> 
                          <td height="21" align="right">日记图案：</td>
                          <td><font class=cha2> 
                            <select name=selSmallPic class=editbox1  onChange="document.images['SmallPic'].src=options[selectedIndex].value;" size=1 >
                              <%
			      Response.Write "<OPTION value=../Diary/SmallPic/"&m_SmallPic&".gif>"&m_SmallPic&"</OPTION>"
				  for i = 0 to 16
				   m_SmallPic = right("00"&cstr(i),3)
				   Response.Write "<OPTION value=../Diary/SmallPic/"&m_SmallPic&".gif>"&m_SmallPic&"</OPTION>"
				  next
				  %>
                            </select>
                            </font></td>
                        </tr>
                        <tr> 
                          <td height="142" align="right">开篇寄语：</td>
                          <td align="left"> <textarea name="txtContent" cols="44" rows="12" class="text"><%=m_DiaryContent%></textarea> 
                          </td>
                        </tr>
                        <tr> 
                          <td height="22" align="right">&nbsp;</td>
                          <td><input type="submit" name="Submit" class="button" value="提交"> 
                            <input type="reset" name="Submit2" class="button" value="取消"> 
                            <input type="button" name="Submit22" class="button" value="返回" onClick="javascript:Locate.href('RJ_DiaryList.asp')"></td>
                        </tr>
                      </table></td>
                  </form>
                </tr>
              </table>
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <td height="31" align="center">[<a href="RJ_DiaryList.asp">返回日记本</a>]</td>
                </tr>
              </table></TD>
          </TR>
      </TABLE> </td>
  </tr>
</table>
<!--#include file="../include/bottom.asp" -->
</BODY></HTML>
