<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="student_index.aspx.cs" Inherits="RM.Web.Member.student_index" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("student_index")%></title>
    <script src="/Themes/Scripts/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/jquery.form.js" type="text/javascript"></script>
    <link href="../../Themes/Scripts/artDialog/skins/opera.css" rel="stylesheet" type="text/css" />
    <script src="../../Themes/Scripts/artDialog/artDialog.js" type="text/javascript"></script>
    <script src="../../Themes/Scripts/artDialog/iframeTools.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/FunctionJS.js" type="text/javascript"></script>
    <script type="text/javascript" src="/Training/Learn/m/ckplayer/ckplayer.js" charset="utf-8"></script>
    <script src="/Live/swfobject.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/jQuery.path2html.js" type="text/javascript"></script>
    <link href="../Template/default/css/student_index.css" rel="stylesheet" type="text/css" />   
    <style type="text/css">
    html, body { margin: 0px auto; padding: 0px; height: 100%; overflow: hidden; }
    .jdt{ float:right;margin-right:10px;line-height:30px; }    
    .center_tj{ border:1px solid #e0e0e0; margin-bottom:5px;color:#a3a3a3; cursor:pointer; }
    .center_tj .title{ background:#fefcea; border-bottom:1px solid #d2d2d2; line-height:32px!important;line-height:40px; height:40PX; font-size:14px;}
    .center_tj .title img{ margin-left:10px; margin-top:5px; margin-bottom:-6px;}
    .icon-arrow-right{ background-image:url("../Template/default/Images/man140825153848.png"); background-position:-940px -100px; width:16px; height:16px; margin:10px 10px 0 0;  }
    .icon-other{ background-image:url("../Template/default/Images/man140825153848.png"); background-position:-490px -150px; width:24px; height:24px;}    
    
    /*file样式*/
.shangchuan{ border-left:1px solid #e0e0e0; width:50px; height: 75px;}
#idPicFile {width:25px; height: 25px;margin-top:25px;  overflow: hidden; position: relative; background: url(../Template/default/Images/man140825153848.png) center no-repeat; background-position:-490px -150px; display:block; top: 0px; left: -10px; }
#idPicFile:hover {width:25px; height: 25px;margin-top:25px;  overflow: hidden; position: relative; background: url(../Template/default/Images/man140825153848.png) center no-repeat; background-position:-490px -175px; display:block; top: 0px; left: -10px; }
#idPicFile input { margin-top:25px;margin-left:-15px;  font-size: 20px; cursor: pointer; width: 50px; position: absolute; bottom: 0; filter: alpha(opacity=0); opacity: 0; outline: none;  hide-focus: expression(this.hideFocus=true);}
#ppp{ margin-left:10px; }
.kx_span{color:#3a96fe;}
    </style>
    <script type="text/javascript">
        //获得培训进度
        function Getjindu(userid, rid) {
            $.get("/Training/GrowthPlan/GetJindu.ashx",
                { userid: userid, Planid: rid },
                function (data) {
                    $("#JD_" + rid).html(data);
                }
            )
        }
        //自己发布消息
        function fabu() {
            var imsg = $("#imsg").val();
            if (imsg.length <= 0) {
                showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("student_index1")%>", 2000, 3);
            } else {
            $.get("iMessage.ashx", { action: "msg", imsg: imsg, imgstr: imgstr,r:Math.random() }, function (date) {
                if (date == "100") {
                    GetEvaluation();
                    $("#imsg").val("")
                    showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("student_index2")%>", 2000, 3);
                } else if (date == "102") {
                    showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("student_index3")%>", 2000, 3);
                } else if (date == "103") {
                    showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("student_index4")%>", 2000, 3);
                } else {
                    showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("student_index5")%>", 2000, 3);
                }
            });
            }
        }

        //发表评论
        function pinglu(mid, muname, muid) {
            var pltext = $("#pl" + mid).val();
            if (pltext.length <= 0) {
                showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("student_index1")%>", 2000, 3);
                $("#pl" + mid).focus();
            } else {
            $.get("iMessage.ashx", { action: "pl", pltext: pltext, mid: mid, muname: muname, muid: muid,r:Math.random() }, function (date) {
                if (date == "100") {
                    GetEvaluation();
                    $("#imsg").val("")
                    showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("student_index2")%>", 2000, 3);
                } else if (date == "102") {
                    showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("student_index3")%>", 2000, 3);
                } else if (date == "103") {
                    showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("student_index4")%>", 2000, 3);
                } else {
                    showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("student_index5")%>", 2000, 3);
                }
            });
            }
        }


        //上传文件
        function submitForm() {
            $("#form2").ajaxSubmit({
                type: "post",
                url: "UploadFile.ashx",
                beforeSubmit: checkform,
                datatype: "json",
                success: function (data) { SubmitSucceed(data); },
                error: function (ex) { showTipsMsg('<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("student_index6")%>' + ex.status, 2000, 3); }
            });
        }

        //检查客户端用户输入
        function checkform() {
            var _file = document.getElementById('fillName');
            if (_file.value == "") {
                showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("student_index7")%>", 2000, 3); _file.focus(); return false;
            }
            return true;
        }
        var imgstr = "";
        //提交成功后回调
        function SubmitSucceed(data) {
            if (data == "1") {
                showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("student_index7")%>", 2000, 3);
            } else if (data == "2") {
                showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("student_index8")%>", 2000, 3);
            } else if (data == "3") {
                showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("student_index9")%>", 2000, 3);
            } else if (data == "error") {
                showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("student_index10")%>", 2000, 3);
            } else if (data != "") {
            $("#divfile").show();
                if (data.indexOf(",") >= 0) {
                    var strs = new Array(); //定义一数组 
                    strs = data.split(","); //字符分割 
                    document.getElementById("ppp").innerHTML = strs[1] + strs[2] + "<img style=\"cursor:hand;\" src=\"../Template/default/Images/del.gif\" title=\"<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("student_index11")%>\"  onclick=\"DelFile()\" />";
                    //imgstr = '<annex>' + strs[0] + '</annex>,'+strs[1]+strs[2];
                    imgstr = strs[0] + ','+strs[1]+strs[2];
                } else {
                    document.getElementById("ppp").innerHTML = "<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("student_index5")%>";
                }                
            } else {
                showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("student_index12")%>", 2000, 3);
            } 
        }
                
        //删除文件上传
        function DelFile() {
            $("#ppp").html(""); imgstr = "";
            $("#divfile").hide();
        }


        //placeholder的值显示
        function placeholder2() {
            if (!('placeholder' in document.createElement('input'))) {

                $('input[placeholder],textarea[placeholder]').each(function () {
                    var that = $(this),
      text = that.attr('placeholder');
                    if (that.val() === "") {
                        that.val(text).addClass('placeholder');
                    }
                    that.focus(function () {
                        if (that.val() === text) {
                            that.val("").removeClass('placeholder');
                        }
                    })
      .blur(function () {
          if (that.val() === "") {
              that.val(text).addClass('placeholder');
          }
      })
      .closest('form').submit(function () {
          if (that.val() === text) {
              that.val('');
          }
      });
                });
            } 
        }

       

        
        function getExamLista(key, epk) {
            top.openDialog("/Training/Exam/ExamIntroduce.aspx?ExamKey=" + key + "&EPKey=" + epk, 'Examination_Test', '<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("student_index13")%>', 650, 380, 50, 50);            
            return false;
        }

    </script>

</head>
<body>


<div class="main_mid2">
  <div class="center_mid fl" id="conter" >
  <form id="form2" action="UploadFile.ashx" method="post" enctype="multipart/form-data">
    <div class="center_m1 fl" id="shuoshuo" >
      <textarea id="imsg" placeholder="<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("student_index14")%>" class="fl" ></textarea>
      <div class="fr">
      <%--<a href="javascript:void(0);"onclick="userlist();"  > <div class="icon-other"></div> </a>--%>
      <a class="fr" href="javascript:void(0);" onclick="fabu();" ><img src="/Template/default/images/sm_10.png"/></a>
      <div class="shangchuan fr" >
      <div id="idPicFile" class="fr" >      
      <input id="fillName" name="fillName" type="file" title="<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("student_index15")%>" onchange="submitForm()" />      
      </div>
      </div>
      </div>

      <div id="divfile" style="display:none;"  class="poster fl">
      <div id="ppp" class="fl"></div>
      </div>
      
    </div>    
    <div class="clear"></div>
    </form>
     <%=kaoshiStr %>
      <input type="hidden" value="<%=userid %>" id="userid" />
    <div class="clear"></div>
    <div id="messigehtml"></div>

  </div>
  <div class="right_mid fl">
    <div class="right_egistration" style="display:none;" >
      <div class="fl font_size aW">周四<br />
        9.11</div>
      <div class="font_size1 fl aW">签到</div>
      <div class="font_size fl aW">2<br />
        Count</div>
    </div>
    

    <div class="right_user" style=" margin-bottom:5px; padding-bottom:10px; padding-top:5px; text-align:left; padding-left:10px;">
        <div class="only"><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Affichet_Title")%></div>
        <% if (list_af != null && list_af.Count > 0){%>
           <dt>
           <%foreach (TKS_Base.Models.TKS_Affichet model in list_af){%>
            <dd style="width:220px;overflow: hidden;"><a href="#" class="linkDetail" onclick="showFaceMsg('<%=model.Affichet_Content %>');"><%=model.Affichet_Name%></a></dd>
        <%}%>        
        </dt>
        <%}%>        
    </div>

    <div class="right_user">        
      <div class="only"><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("student_index16")%></div>       
                    
      <div class="main_u"> <img src="<%=userimg %>" class="fl"/>
        <div class="u_font" style="padding-top:10px;"><a href="/Member/User/StudetnUser_Form.aspx" ><%=username %></a></div>
        <div class="u_font" title="<%=UserOrganization%> | <%=UserGroup %>" ><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("student_index17")%>：<%=UserOrganization%> | <%=UserGroup %></div>
        <div class="u_font" title="<%=UserRoles %>"><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Js")%>：<%=UserRoles %></div>
        
      </div>
      <div class="clear"></div>

    </div>
  </div>
</div>

<script src="/Template/<%=RM.Common.DotNetConfig.ConfigHelper.GetAppSettings("Template") %>/Stu_js/Stu.js" type="text/javascript"></script>
<script type="text/javascript">
    function getExamList(key, epk) {
        top.openDialog("/Training/Exam/ExamIntroduce.aspx?ExamKey=" + key + "&EPKey=" + epk, 'Examination_Test', '<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("ChapterIndex_ksxz")%>', 650, 380, 50, 50);
        return false;
    }
    function Golianxi(examId) {
        parent.window.location = "/Training/Exam/Practise.aspx?EKey=" + examId; //进入练习
    }


    $(function () {
        GetEvaluation();
        if (jQuery("#conter").height() > 700) {
            parent.document.all.main.height = jQuery("#conter").height();
        } else {
            parent.document.all.main.height = "700";
        }
    });
    //我的分享
    function MyShare() {
        jQuery(".center_tj").hide();
        jQuery(".center_m2").hide();
        jQuery("#shuoshuo").hide();
    }

</script>

</body>
</html>