<!--#include file="../conn.asp" -->
<!--#include file="inc.asp" -->
<%
xinyanlei="book"
if session("username")="" or session("Password")="" Or session("userid")="" Or session("s0huuser")="" Then
response.Redirect("login.asp?action=err")
response.End()
end if
username=request.QueryString("user")
userid=session("userid")
set rs=server.CreateObject("adodb.Recordset")
sql2="select * from diaryuser where userid="&userid&""
Rs.Open Sql2,conn,1,1
gongao=rs("gongao")
IF Not Rs.Eof Then
amount=rs("amount")
rs.close
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>心情日记本·分享你我的心情</title>
<meta name="keywords" content="日记免费,日记,心情日记,网络日记,免费日记,隐私日记,交换日记,粉可爱留言本、日记本申请">
<link href="<%=alltubg%>css.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
function CheckForm()
{
    if (document.WriteForm.title.value.length <1 || document.WriteForm.title.value.length >30) {
    		alert("标题为一到三十位.");
		document.WriteForm.title.focus();
		return false;
	}

	if (document.WriteForm.tq[0].checked == false&&document.WriteForm.tq[1].checked == false&&document.WriteForm.tq[2].checked == false&&document.WriteForm.tq[3].checked == false&&document.WriteForm.tq[4].checked == false&&document.WriteForm.tq[5].checked == false&&document.WriteForm.tq[6].checked == false&&document.WriteForm.tq[7].checked == false&&document.WriteForm.tq[8].checked == false&&document.WriteForm.tq[9].checked == false) {
		alert("请选择天气.");
		return false;
	}

	if (document.WriteForm.Content.value.length == 0) {
		alert("请输入日记内容.");
		document.WriteForm.Content.focus();
		return false;
	}
	return true;
}
</script>
<script language="javascript">
	function SwitchCover(nCover,nBookID,sImageType)
	{
		if(nCover==-1)
			preview.src="<%=alltubg%>"+nBookID+"."+sImageType
		else
			WriteForm.preview.src="<%=alltubg%>"+nCover+""
	}
		function SwitchCovertq(nCover,nBookID,sImageType)
	{
			WriteForm.tqpre.src="<%=alltubg%>"+nCover+""
	}
	function UploadCover(sPath)
	{
		preview.src=sPath
	}
	function SetCurrentCover(nCover)
	{
		bookcover=document.all("bookcover")
		for(var i=0;i<bookcover.options.length;i++)
		{
			if(bookcover(i).value==nCover)
			{
				bookcover(i).selected=true;
				return;
			}
		}
	}
	
</script>
<script charset="utf-8" src="<%=diarydir%>e/kindeditor.js"></script>
<script>
<!--
KE.show({
				id : 'Content',
				resizeMode : 0,
				allowPreviewEmoticons : false,
				allowUpload : false,
				items : [
		 'fullscreen', '|', 'undo', 'redo', 'cut', 'copy', 'paste',
		'justifyleft', 'justifycenter', 'justifyright','plainpaste', 'wordpaste','-',
		 'insertorderedlist', 'insertunorderedlist', 'indent','outdent', 'subscript',
		'superscript','title', 'fontname', 'fontsize', 'textcolor', '-','bgcolor', 'bold','italic', 'underline', 'strikethrough', 'removeformat', 
		'image','flash','media', 'advtable', 'hr', '-','emoticons', 'emoticonshq','emoticonsbz','emoticonsww','emoticonslv','emoticonsle','emoticonsjz','emoticonsjj','link', 'unlink','qimage' ]
			});

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>

</head>
<body background="<%=bgrnd%>" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0">
<form language="javascript" name="WriteForm" method="post" action="ok.asp?action=add" onSubmit="return CheckForm()">

<table width="985" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td> <!--#include file="head.asp" -->
      <table width="985" border="0" cellspacing="0" cellpadding="0" height="452">
        <tr> 
          <td width="20">&nbsp;</td>
          <td height="452" background="<%=alltubg%>bg1.gif" width="703"> 
            <table width="703" border="0" cellspacing="0" cellpadding="0" height="452">
              <tr> 
                <td height="5" width="56"></td>
                <td width="288"></td>
                <td rowspan="3" width="21"></td>
                <td width="284"></td>
                <td width="57"></td>
              </tr>
              <tr> 
                <td height="380" width="56">&nbsp;</td>
                
          <td width="288" valign="top"> 
            <table border="0" width="288" id="table6" cellspacing="0" cellpadding="0" height="100%">
              <tr> 
                <td height="55" width="288" colspan="2"> <img border="0" src="<%=alltubg%>ADDNEW.gif" width="250" height="55"></td>
              </tr>
              <tr> 
                <td height="65" width="288" colspan="2" align="center"> <img id="preview" src="<%=alltubg%>play/bg/01.jpg"  height="69"></td>
              </tr>
              <tr> 
                <td width="288" height="4" colspan="2"> <img border="0" src="<%=alltubg%>linebg.gif" width="4" height="1"></td>
              </tr>
              <tr> 
                <td width="86" height="19"> &nbsp; <img border="0" src="<%=alltubg%>bt.gif" width="60" height="13"></td>
                <td width="208" height="19"> 
                  <input name="title" type="text" id="title" size="20" maxlength="19">
                </td>
              </tr>
              <tr> 
                <td width="86" height="19"> &nbsp; <img border="0" src="<%=alltubg%>fl.gif" width="60" height="13"></td>
                <td width="208" height="19"> 
                  <select name="list" style="width:120px" size="1">
                    <%
set rs=server.CreateObject("adodb.Recordset")
sql2="select * from diarytype where userid="&userid&" order by id"
Rs.Open Sql2,conn,1,1
do while not rs.eof
%>
                    <option value="<%=rs("id")%>$<%=rs("type")%>"><%=rs("type")%></option>
                    <%
rs.movenext
loop
rs.close
set rs=nothing
set sql2=nothing
%>
                  </select>
                </td>
              </tr>
              <tr> 
                <td width="86" height="19"> &nbsp; <img border="0" src="<%=alltubg%>display.gif" width="60" height="13"></td>
                <td width="208" height="19">公开 
                  <input name="display" type="radio" value="1" checked>
                  保密 
                  <input type="radio" name="display" value="0">
                </td>
              </tr>
              <tr> 
                <td width="86" height="19"> &nbsp; <img border="0" src="<%=alltubg%>xq.gif" width="60" height="12"></td>
                <td width="208" height="19"> 
                  <select name="xq" class="input" id="xq" style="width:120px" size="1">
 <%
set rs=server.CreateObject("adodb.Recordset")
sql2="select * from xqlist order by xqorder"
Rs.Open Sql2,conn,1,1
do while not rs.eof
%>
<option value="<%=rs("xqorder")%>"><%=rs("xqname")%></option>
<%
rs.movenext
loop
rs.close
set rs=nothing
set sql2=nothing
%>
                  </select>
                </td>
              </tr>
              <tr> 
                <td width="86" height="19"> </td>
                <td width="208" height="19"> 
                  <input name="mtype" type="radio" value="1"  onClick="InitPeitu(1);SwitchCover('play/bg/01.jpg',6913,'jpg')" checked>
                  精致型&nbsp; 
                  <input type="radio" name="mtype" value="2"  onClick="InitPeitu(2);SwitchCover('play/bg/01.jpg',6913,'jpg')">
                  宽阔型 </td>
              </tr>
              <tr> 
                <td width="86" height="19" align="center"><img border="0" src="<%=alltubg%>mb.gif"></td>
                <td width="208" height="19"> 
                  <input type="radio" name="mtype" value="3" onClick="InitPeitu(3);SwitchCover('play/lr/01.jpg',6913,'jpg')">
                  左图型&nbsp; 
                  <input type="radio" name="mtype" value="4" onClick="InitPeitu(4);SwitchCover('play/lr/01.jpg',6913,'jpg')">
                  右图型</td>
              </tr>
              <tr> 
                <td width="86" height="19">&nbsp;</td>
                <td width="208" height="19"> 
                  <input type="radio" name="mtype" value="5" onClick="InitPeitu(5)">
                  经典型</td>
              </tr>
              <tr> 
                <td width="86" height="19"> &nbsp; <img border="0" src="<%=alltubg%>bg.gif" width="60" height="13"></td>
                <td width="208" height="19"> 
                  <select name="bg" class="input" id="bg" style="width:120px" onChange="SwitchCover(this.value,6913,'jpg')">
                    <option value="play/bg/01.jpg">夕阳桥梁</option>
                    <option value="play/bg/02.jpg">沙滩少女</option>
                    <option value="play/bg/03.jpg">心灵翘动</option>
                    <option value="play/bg/04.jpg">甜蜜一刻</option>
                    <option value="play/bg/05.jpg">心灵孤独</option>
                    <option value="play/bg/06.jpg">海边小车</option>
                    <option value="play/bg/07.jpg">月色清照</option>
                    <option value="play/bg/08.jpg">候鸟飞翔</option>
                    <option value="play/bg/09.jpg">美好童年</option>
                    <option value="play/bg/10.jpg">心灵相伴</option>
                    <option value="play/bg/11.jpg">童真年代</option>
                    <option value="play/bg/12.jpg">树林小路</option>
                    <option value="play/bg/13.jpg">飘进心灵</option>
                    <option value="play/bg/14.jpg">勇往直前</option>
                    <option value="play/bg/15.jpg">黄色情结</option>
                    <option value="play/bg/16.jpg">花言巧语</option>
                    <option value="play/bg/17.jpg">古堡河畔</option>
                    <option value="play/bg/18.jpg">思念淡淡</option>
                    <option value="play/bg/19.jpg">快乐飞起</option>
                    <option value="play/bg/20.jpg">爱的疑惑</option>
                    <option value="play/bg/21.jpg">车站情怀</option>
                    <option value="play/bg/22.jpg">放飞快乐</option>
                    <option value="play/bg/23.jpg">流星物语</option>
                    <option value="play/bg/24.jpg">星空夜城</option>
                    <option value="play/bg/25.jpg">迷失方向</option>
                    <option value="play/bg/26.jpg">水果滋味</option>
                    <option value="play/bg/27.jpg">一生一世</option>
                    <option value="play/bg/28.jpg">花中寄语</option>
                    <option value="play/bg/29.jpg">黄金海岸</option>
                    <option value="play/bg/30.jpg">栈桥黄昏</option>
                    <option value="play/bg/31.jpg">独依窗台</option>
                    <option value="play/bg/32.jpg">心爱宝宝</option>
                    <option value="play/bg/33.jpg">秋千之恋</option>
                  </select>
                  <script type="text/javascript">
InitPeitu(1);
</script>
                </td>
              </tr>
              <tr> 
                <td width="86" height="19"> &nbsp; <img border="0" src="<%=alltubg%>tq.gif" width="60" height="12"></td>
                <td width="208" height="19"> 
                  <select name="tq" class="input" id="tq" style="width:120px" onChange="SwitchCovertq(this.value,6913,'jpg')">
                    <option value="tq/1.gif">晴天</option>
                    <option value="tq/2.gif">阴晴</option>
                    <option value="tq/3.gif">多云</option>
                    <option value="tq/4.gif">下雨</option>
                    <option value="tq/5.gif">闪电</option>
                    <option value="tq/6.gif">有风</option>
                    <option value="tq/7.gif">冰雹</option>
                    <option value="tq/8.gif">彩虹</option>
                    <option value="tq/9.gif">下雪</option>
                    <option value="tq/10.gif">雪晴</option>
                  </select>
                  &nbsp;<img id="tqpre" name="tqpre" src="<%=alltubg%>tq/1.gif" alt="今天天气晴" width="13" height="13" align="absmiddle">	
              </tr>
              <tr> 
                <td width="86">&nbsp;</td>
                <td width="208">&nbsp;
              </tr>
              <tr> 
                <td width="288" colspan="2" align="center"> </td>
              </tr>
            </table>
                
          </td>
                <td align="center">
                  <table border="0" width="284" id="table7" cellspacing="0" cellpadding="0" height="100%">
                    <tr> 
                      <td width="284" height="15"></td>
                    </tr>
                    <tr> 
                      <td width="284" height="300" align="center">
                          <textarea id="Content"  name="Content" style="width:280px;height:300px;"></textarea>
                          <input name="user" type="hidden" id="userid" value="<%=user%>">

                      </td>
                    </tr>
                    <tr> 
                      <td width="284" valign="bottom" height="15"> 
                        <p align="center">
                          <span id="MakeBtn"></span><span id="msg"></span><SCRIPT LANGUAGE="JavaScript" src="<%=diarydir%>p/Autosave/AutoSaver.js"></SCRIPT>
<script language="JavaScript" defer type="text/javascript">
var SetParament = "title,Content"
init();
</script>
                      </td>
                    </tr>
                    <tr> 
                      <td width="284" height="20"></td>
                    </tr>
                  </table>
                </td>
                <td>&nbsp;</td>
              </tr>
              <tr> 
                <td height="67">&nbsp;
</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
            </table>
          </td>
          <td width="272"> 
            <!--#include file="right1.asp" -->
          </td>
        </tr>
      </table>
      <!--#include file="bottom.asp" -->
    </td>
  </tr>
  <tr> 
    <td></td>
  </tr>
</table>
</form>
</body>
</html>



