<!--#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
call plus_main()
 end if
dim ismast,content
Sub plus_main()
%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="Diary_Diarymain.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">

function chk_form()
{
if(document.all["title"].value==""){
	alert("请输入事件标题！");
	return false;
}

}
function txt_focus()
{
	var src = event.srcElement;
	if (null != src)
		src.className = "Border";
	src.select();
}
function txt_blur(sid)
{
	var src=event.srcElement;
	src.className="BotLine";
}

function set_alert()
{
if(	document.all["con_setalert"].checked==true)
{
document.all["setalert1"].style.display="";
}
else
{
document.all["setalert1"].style.display="none";
}
}

function set_weather(){
var w=document.all["weather"].value;

switch(w)
{

	case "晴天":document.all["weatherimg"].src="images/clasky_diary/image/shine.gif";break;
	case "阴天":document.all["weatherimg"].src="images/clasky_diary/image/cloud.gif";break;
	case "雨":document.all["weatherimg"].src="images/clasky_diary/image/rain.gif";break;
	case "雪":document.all["weatherimg"].src="images/clasky_diary/image/xue.gif";break;
	case "雾":document.all["weatherimg"].src="images/clasky_diary/image/wu.gif";break;
	default :
	break;
}
}

function set_xinqing(){
var w=document.all["xinqing"].value;
document.all["xinqingimg"].src="images/clasky_diary/image/xq/"+w+".gif";
}
function set_showsamp(){

if(document.all["issamp"].checked=true){
document.all["samp"].background="";
}

}

function setsamp(w){
document.all["samp"].background="images/clasky_diary/image/back/"+w+".gif";
}

var tietunum;
tietunum=0;
function tietuup()
{
if(tietunum==12){
tietunum=0;
}
else{
tietunum=tietunum+1;
}
for(i=1;i<9;i++){
document.all["tietu"+i].src="images/clasky_diary/image/xq/tietu/"+(i+8*tietunum)+".gif";
document.all["tietu"+i].title="[tt"+(i+8*tietunum)+"]";
}
}
function tietusub()
{
if(tietunum==0){
tietunum=12;
}
else{
tietunum=tietunum-1;
}
for(i=1;i<9;i++){
document.all["tietu"+i].src="images/clasky_diary/image/xq/tietu/"+(i+8*tietunum)+".gif";
document.all["tietu"+i].title="[tt"+(i+8*tietunum)+"]";
}
}
function tietu(obj){
document.all["content"].value=document.all["content"].value+obj.title;
}

</script>

<script language="VBScript" type="text/VBScript">
Function checkdate()
y=year(Now)
m=month(Now)
d=day(Now)
theDate=document.all("a_year").value&"-"&document.all("a_month").value&"-"&document.all("a_day").value
if DateDiff("d", Now, theDate)>0 then
alert("那天还没有到呢！")
document.all("a_year").value=y
document.all("a_month").value=m
document.all("a_day").value=d
end if
End Function
</script>

</head>


<body bgcolor="#93a0e2" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" scroll="no">
<table width="99%" height="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td height="25" class="ttitle1"><font face="Wingdings">(</font> 个人日记</td>
  </tr>
  <tr> 
    <td height="25"> <DIV class=pannelInner><IMG src="images/clasky_diary/plus.gif" align=absMiddle>&nbsp;撰写日记 
        <font color="#9999FF">注意：每人每天只能写一篇日记</font></DIV></td>
  </tr>
  <tr> 
    <td valign="top" class="clsSubTabOn" id="samp">
	<form action="Diary_upsql.asp" method="post" name="form_addevent"  id="form_addevent" target="upform" onSubmit="return chk_form()">
        <table width="620" border="0" align="center" cellpadding="6" cellspacing="0">
          <tr> 
            <td width="74"><div align="center">日记主题：</div></td>
            <td colspan="3"><input name="title" type="text" id="title" size="74" maxlength="80"  onfocus="return txt_focus();" onBlur="return txt_blur();"> 
              <input name="ispub" type="checkbox"  class="NoBorder" id="ispub2" value="0">
              加密 </td>
          </tr>
          <tr> 
            <td><div align="center">内容：</div></td>
            <td colspan="3"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <td width="86%"><textarea name="content" cols="72" rows="12" wrap="VIRTUAL" class="BotLine" id="content" ><%= content%></textarea></td>
                  <td width="14%" valign="bottom"><div align="center"> 
                      <input name="issamp" type="checkbox" class="NoBorder" id="issamp" onClick="set_showsamp()" value="1" checked>
                      隐藏<br>
                      <br>
                      <input name="sampname" type="radio" class="NoBorder" onClick="setsamp(this.value)" value="1" checked>
                      式 一<br>
                      <input name="sampname" type="radio" class="NoBorder" value="2" onClick="setsamp(this.value)">
                      式 二<br>
                      <input name="sampname" type="radio" class="NoBorder" value="3" onClick="setsamp(this.value)">
                      式 三<br>
                      <input name="sampname" type="radio" class="NoBorder" value="4" onClick="setsamp(this.value)">
                      式 四<br>
					  <input name="sampname" type="radio" class="NoBorder" value="5" onClick="setsamp(this.value)">
                      式 五<br>
					  <input name="sampname" type="radio" class="NoBorder" value="6" onClick="setsamp(this.value)">
                      式 六<br>
					  <input name="sampname" type="radio" class="NoBorder" value="7" onClick="setsamp(this.value)">
                      式 七<br>
                      <input name="sampname" type="radio" class="NoBorder" value="8" onClick="setsamp(this.value)">
                      式 八</div></td>
                </tr>
              </table></td>
          </tr>
          <tr> 
            <td width="74"><div align="center">设置：</div></td>
            <td width="94"> <select name="weather" id="weather" onChange="set_weather()">
                <option value="晴天" selected>晴天</option>
                <option value="阴天">阴天</option>
                <option value="雨">雨</option>
                <option value="雪">雪</option>
                <option value="雾">雾</option>
              </select> <img id="weatherimg" src="images/clasky_diary/image/shine.gif" width="17" height="17"></td>
            <td width="141"> 
              <table width="100%" border="0" align="right" cellpadding="0" cellspacing="0">
                <tr> 
                  <td><select name="xinqing" id="select5" onChange="set_xinqing()">
                      <option value="0" selected>心情 0</option>
                      <option value="1">心情 1</option>
                      <option value="2">心情 2</option>
                      <option value="3">心情 3</option>
                      <option value="4">心情 4</option>
                      <option value="5">心情 5</option>
                      <option value="6">心情 6</option>
                      <option value="7">心情 7</option>
                      <option value="8">心情 8</option>
                      <option value="9">心情 9</option>
                      <option value="10">心情 10</option>
                      <option value="11">心情 11</option>
                      <option value="12">心情 12</option>
                      <option value="13">心情 13</option>
                      <option value="14">心情 14</option>
                      <option value="15">心情 15</option>
                    </select>
                  </td>
                  <td><img src="images/clasky_diary/image/xq/0.gif" name="xinqingimg" width="50" height="53" id="xinqingimg"></td>
                </tr>
              </table> </td>
            <td width="263" valign="middle"><select name="a_year" onChange="checkdate()">
                <% for i=2002 to 2050 %>
                <option value="<%= i %>" <% if i=year(now) then%>selected<% end if %>><%= i %></option>
                <% next %>
              </select>
              年 
              <select name="a_month" onChange="checkdate()">
                <% for i=1 to 12 %>
                <option value="<%= i %>" <% if i=month(now) then%>selected<% end if %>><%= i %></option>
                <% next %>
              </select>
              月 
              <select name="a_day" id="select2" onChange="checkdate()">
                <% for i=1 to 31 %>
                <option value="<%= i %>" <% if i=day(now) then%>selected<% end if %>><%= i %></option>
                <% next %>
              </select>
              日              </td>
          </tr>
          <tr id="setalert1" style="display:"> 
            <td height="40" colspan="4"><div align="center"></div>
              <div align="center"></div>
              <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr> 
                  <td width="50"><p><strong><a href="#" onClick="tietusub()">－</a></strong></p>
                    <p><strong><a href="#" onClick="tietuup()">＋</a></strong></p></td>
                  <td><div align="center"><img name="tietu1" src="images/clasky_diary/image/xq/tietu/1.gif" width="40" height="40" title="[tt1]" style="cursor:hand" onClick="tietu(this)"></div></td>
                  <td><div align="center"><img name="tietu2" src="images/clasky_diary/image/xq/tietu/2.gif" width="40" height="40" title="[tt2]" style="cursor:hand" onClick="tietu(this)"></div></td>
                  <td><div align="center"><img name="tietu3" src="images/clasky_diary/image/xq/tietu/3.gif" width="40" height="40" title="[tt3]" style="cursor:hand" onClick="tietu(this)"></div></td>
                  <td><div align="center"><img name="tietu4" src="images/clasky_diary/image/xq/tietu/4.gif" width="40" height="40" title="[tt4]" style="cursor:hand" onClick="tietu(this)"></div></td>
                  <td><div align="center"><img name="tietu5" src="images/clasky_diary/image/xq/tietu/5.gif" width="40" height="40" title="[tt5]" style="cursor:hand" onClick="tietu(this)"></div></td>
                  <td><div align="center"><img name="tietu6" src="images/clasky_diary/image/xq/tietu/6.gif" width="40" height="40" title="[tt6]" style="cursor:hand" onClick="tietu(this)"></div></td>
                  <td><div align="center"><img name="tietu7" src="images/clasky_diary/image/xq/tietu/7.gif" width="40" height="40" title="[tt7]" style="cursor:hand" onClick="tietu(this)"></div></td>
                  <td><div align="center"><img name="tietu8" src="images/clasky_diary/image/xq/tietu/8.gif" width="40" height="40" title="[tt8]" style="cursor:hand" onClick="tietu(this)"></div></td>
                  <td width="50"><p align="right"><strong><a href="#" onClick="tietusub()">－</a></strong></p>
                    <p align="right"><strong><a href="#" onClick="tietuup()">＋</a></strong></p></td>
                </tr>
              </table></td>
          </tr>
          <tr> 
            <td height="40"><div align="center"></div></td>
            <td colspan="3"><input name="Submit" type="submit" class="clsPart" value=" 我写好了 "> 
              <input name="Submit2" type="button" class="clsPart" value="重新写" onClick="CheckForm();"></td>
          </tr>
        </table>

      </form><iframe name=upform width="0" height="0"></iframe></td>
  </tr>
  <tr> 
    <td height="20" class="clsSubTabOn"><div align="center"><a href="#" onClick="window.close()">关 闭</a></div></td>
  </tr>
</table>
<% 
dim a_id,a_y,a_m,a_d
	a_id=clasky_string(request("a_id"))


	if a_id<>"" then
a_id=dateadd("d",a_id,"2003-1-1")

a_y=datepart("yyyy",a_id)
a_m=datepart("m",a_id)
a_d=datepart("d",a_id)
Response.Write(a_m)
Response.Write("<script>")
Response.Write("document.all[""a_year""].value="&a_y&";")
Response.Write("document.all[""a_month""].value="&a_m&";")
Response.Write("document.all[""a_day""].value="&a_d&";")

Response.Write("</script>")
	end if

 %>





</body>
<%
End Sub
%>