<%@ page autoeventwireup="true" enableeventvalidation="false" inherits="_admin_N25_Student_Rec_Modify, App_Web_m37mpoil" language="C#" validaterequest="false" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>

    <script src="../My97DatePicker/WdatePicker.js" type="text/javascript">
    </script>

    <script src="../jquery-1.5.js" type="text/javascript">
    </script>

    <script src="../js/dell_fujian.js" type="text/javascript"></script>
    <link href="../css/main1.css" rel="stylesheet" type="text/css" />
    <link href="../alert/jquery.alert.css" rel="stylesheet" type="text/css" />

    <script src="../alert/jquery.easydrag.js" type="text/javascript"></script>

    <script src="../alert/jquery.alert.js" type="text/javascript"></script>
  

    <script type="text/javascript" >
var picPath;
var image;
// preview picture
function preview1()
{

document.getElementById('preview').style.display = 'none';
// 下面代码用来获得图片尺寸，这样才能在IE下正常显示图片
document.getElementById('box').innerHTML= "<img width='"+image.width+"' height='"+image.height+"' id='aPic' src='"+picPath+"'>";
}
// show view button
function buttonShow()
{
/*
这里用来解决图片加载延时造成的预览失败.
简单说明一下，当image对象的src属性发生改变时JavaScript会重新给image装载图片内容，
这通常是需要一些时间的，如果在加载完成之前想将图片显示出来就会造成错误，所以我们
通过图片的宽度和高度来判断图片是否已经被成功加载，加载完毕才会显示预览按钮.
这里我仍然有一个困惑，在IE7下预览效果偶尔会失效.
*/
if ( image.width == 0 || image.height == 0 ) {
setTimeout(buttonShow, 1000);
} else {
//document.getElementById('preview').style.display = 'block';
}
}
function loadImage(ele) {
picPath   = getPath(ele);
image     = new Image();
image.src = picPath;
setTimeout(buttonShow, 0000);
}
function getPath(obj)
{
if(obj)
{
//ie
if (window.navigator.userAgent.indexOf("MSIE")>=1)
{
obj.select();
// IE下取得图片的本地路径
return document.selection.createRange().text;

}
//firefox
else if(window.navigator.userAgent.indexOf("Firefox")>=1)
{
if(obj.files)
{
// Firefox下取得的是图片的数据
return obj.files.item(0).getAsDataURL();
}
return obj.value;
}
return obj.value;
}
}
    </script>

    <script language="javascript" type="text/javascript">
   function select_open1(formname,fieldname,showfieldname) {
     var tt= document.getElementById ("DropDownList1").value;
  if (tt!="00")
  {
    window.open('../file/N25_file_add.aspx?updatetype=' + tt + '&fieldname=' + fieldname + '&showfieldname=' + showfieldname,"windowXml","height=350, width=450,top=250, left=350,alwaysRaised =yes,scrollbars=no");
  }
  else
  {
  
   alert('请选择上传类型');
  }
  
}

function ffx()
    {
    
    var tt=document.getElementById ("TextBox2");
   var wk= document.getElementById ("xq");
   var strDate=tt.value;
   strDate =strDate.replace(/-/g,"/");

var mydate=new Date(strDate)

var myday=mydate.getDay()//注:0-6对应为星期日到星期六 

var xingqi 

switch(myday) 
{ 
case 0:xingqi="星期日";break; 
case 1:xingqi="星期一";break; 
case 2:xingqi="星期二";break; 
case 3:xingqi="星期三";break; 
case 4:xingqi="星期四";break; 
case 5:xingqi="星期五";break; 
case 6:xingqi="星期六";break; 
default:xingqi="系统错误！" 
} 

   wk.innerHTML=xingqi;
    
    }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1"  EnableScriptGlobalization="true"   EnableScriptLocalization="true" runat="server">
        </asp:ScriptManager>
   <div class="title">
   
   学生成长记录
   </div>
   <table     border="0" class="table" cellpadding="0" cellspacing="0" width="800">
       <tr>
           <td align="right" class="line" style="width: 150px">
               学期：
           </td>
           <td align="left">
               <asp:DropDownList ID="xueqi" runat="server">
               </asp:DropDownList>
           </td>
       </tr>
       <tr>
           <td align="right" style="width: 150px">
               班级
           </td>
           <td align="left">
               <asp:DropDownList ID="banji" runat="server" AutoPostBack="true" OnSelectedIndexChanged="banji_SelectedIndexChanged">
               </asp:DropDownList>
           </td>
       </tr>
       <tr>
           <td align="right" class="line">
               学生：
           </td>
           <td align="left" class="line">
               <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                   <ContentTemplate>
                       <asp:DropDownList ID="Stu" runat="server">
                       </asp:DropDownList>
                   </ContentTemplate>
                   <Triggers>
                       <asp:AsyncPostBackTrigger ControlID="banji" />
                       <asp:AsyncPostBackTrigger ControlID="Button2" />
                   </Triggers>
               </asp:UpdatePanel>
           </td>
       </tr>
   <tr>
   <td align="right" >
   标题：
   </td>
   <td align="left" >
   
       <asp:TextBox ID="TextBox1" Width="288" runat="server"></asp:TextBox>
   </td>
   
   </tr>
  <tr>
  <td align="right" class="line">类型</td>
  <td align="left" class="line">
  
      <asp:DropDownList ID="record_type" runat="server">
      </asp:DropDownList>
  </td>
  
  </tr> 
  <tr>
  <td align="right" style="height: 24px">发布时间</td>
  <td  align="left" style="height: 24px" >
  
      <asp:TextBox ID="TextBox2" runat="server" CssClass="Wdate" onchange="ffx()" ></asp:TextBox>
      <cc1:CalendarExtender ID="CalendarExtender1" runat="server" Format="yyyy-MM-dd" PopupButtonID="TextBox2"
          TargetControlID="TextBox2">
      </cc1:CalendarExtender>
      
      <span id="xq" runat="server" ></span>
  </td>
  
  
  </tr>
   <tr>
   <td align="right" class="line">内容</td>
   <td align="left" class="line">
       <fckeditorv2:fckeditor id="FCKeditor1" runat="server" height="500px" Width="100%">
                        </fckeditorv2:fckeditor>
   
   </td>
   </tr>
       <tr>
           <td align="right" >
               上传</td>
           <td  align="left" >
      <%--         <div id="box">
               </div>
               <asp:FileUpload ID="FileUpload1" runat="server" onpropertychange="loadImage(this); preview1();" />
               <input id='preview' onclick="preview1();" style='display: none;' type='button' value='预览'>
               <asp:Button ID="Button1" runat="server" Text="上传" OnClick="Button1_Click" />
               <br />
               <asp:Label ID="Label1" runat="server" Text=""></asp:Label>
               <asp:HiddenField ID="HiddenField1" runat="server" />--%>
               <asp:DropDownList ID="DropDownList1" runat="server">
                   <asp:ListItem Value="00">请选择上传类型</asp:ListItem>
                   <asp:ListItem Value="1">音乐</asp:ListItem>
                   <asp:ListItem Value="2">视频</asp:ListItem>
                   <asp:ListItem Value="3">文件</asp:ListItem>
                   <asp:ListItem Value="4">图片</asp:ListItem>
               </asp:DropDownList>
               <asp:HiddenField ID="hf" runat="server" />
               <a href="javascript:#" onclick="select_open1(1,1,1)">添加附件</a>
               <div id="dd1" runat="server">
               </div>
               </td>
       </tr>
   
   <tr>
   
   <td></td>
   <td>
       <asp:Button ID="Button2" runat="server" Text="提交" OnClick="Button2_Click" />
       <asp:Button ID="Button3" runat="server" Text="返回" OnClick="Button3_Click" />
   
   </td>
   </tr>
   </table>
        <div id="message" class="window_message" style="position: absolute; left: 42%; top: 35%;
            display: none">
            <img alt="正在处理请稍等...." src="../images/loading.gif">正在处理请稍等....
        </div>
   
    </form>
</body>
</html>
