<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Exam_PersonalData.aspx.cs"
    Inherits="RM.Web.Training.Exam.Exam_PersonalData" %>

<%@ Register Src="~/UserControl/PageControl.ascx" TagName="PageControl" TagPrefix="uc1" %>
<%@ Register Src="~/UserControl/LoadButton.ascx" TagName="LoadButton" TagPrefix="uc2" %>
<!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></title>
 <%-- <link href="/Themes/Styles/Site.css" rel="stylesheet" type="text/css" />--%>
    <link href="/Themes/Scripts/artDialog/skins/opera.css" rel="stylesheet" type="text/css" />
    <script src="/Themes/Scripts/jquery-1.8.2.min.js" type="text/javascript"></script>
    <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 src="/Themes/Scripts/highcharts/highcharts.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/jQuery.path2html.js" type="text/javascript"></script>
    <style type="text/css">
     * { font-size: 9pt; }
body { margin: 0px; padding: 0px; font-family: 微软雅黑, 宋体, Arial, Helvetica, Verdana, sans-serif; color: #000000; }
#loading { position: absolute; z-index: 3000; left: 45%; top: 45%; border: 1px solid #ccc; width: auto; padding: 6px 5px 6px 40px; background: #fff url('../images/loading.gif') no-repeat scroll 7px 2px; display: none; cursor: pointer; }
#Toploading { position: absolute; z-index: 3000; top: 0%; border: 1px solid #f0c36d; margin-top: 1px; color: #222; width: auto; padding: 4px; background: rgb(249, 237, 190); display: none; cursor: pointer; }
a:link { color: #222; text-decoration: none; }
a:visited { color: #222; text-decoration: none; }
a:hover { color: #222; text-decoration: none; }
a:active { color: #222; text-decoration: none; }
        /**表格 begin**/
.grid { width: 100%; margin: 0px; border-collapse: collapse; }
.grid thead th, .grid thead td { border-top: 1px solid #ccc; border-bottom: 1px solid #ccc; border-right: 1px dotted #ccc; background: url(../Images/datagrid_header_bg.gif); background-color: #f0f1f4; text-align:left;  padding: 5px 1px; padding-left:5px;font-weight: normal; text-overflow: ellipsis; word-break: keep-all; white-space: nowrap; overflow: hidden; }
.grid tbody td {text-align:left;;border-bottom: 1px dotted #ccc; border-right: 1px dotted #ccc; padding: 1px 1px; height: 20px; overflow: hidden;  padding-left:5px}
.grid tbody .alt { background: #F7F7F7; }
.grid tbody .selected { background2: #D0E5F5; background1: #FBEC88; background: #e0eccc; }
/*当鼠标放在行上时的颜色*/
.grid tbody .trhover { background2: #D0E5F5; background1: #FBEC88; background: #e0eccc; }
        .ExamTit { }
        .ExamName { height: 25px; line-height: 25px; margin: 0 auto; text-align: center; font-size: 16px; font-style: italic; }
        .ExamContent { height: 25px; line-height: 25px; margin: 0 auto; text-align: center; }
        .ExamContent span { margin: 0 15px; }
        .ExamHis { max-width:650px;} 
        #table1{ width:650px!important;}     
        .div-body{max-width:650px; height:auto!important;}
    </style>
</head>
<body style="overflow: auto;">
    <object id='WebBrowser' width="0" height="0" classid='CLSID:8856F961-340A-11D0-A96B-00C04FD705A2'>
    </object>
    <form id="form1" runat="server">
    <div class="btnbarcontetn">
        <div style="text-align: right">
        <input id="btnda" type="button" value="<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Detail_DaYin")%>"
                onclick="pintque();" />          
        <input id="Button1" type="button" value="<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Detail_DaYincj")%>"
                onclick="pintque1();" />  
            
        </div>
    </div>
    <div>
    <!--startprint1-->
    <div class="ExamTit" >
        <div class="ExamName">
            <%=ExamName%></div>
        <div class="ExamContent">
<span><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Student_No")%>:<%=UserCode%></span> 
            <span><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Plan_useraccount")%>:<%=UserName%></span> <span><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Report_def")%>:<%=UserScroe %>
                /
                <%=ExamAllScroe%></span> <span><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("RandomQue_Num")%>:<%=RightCount %>
                    /<%=QueCount %></span> <span><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("ChapterList_dqzql")%>:<%=Result_Accuracy%>%</span>
        </div>
    <div width="100%" align="center">
    
    <div class="ExamHis">
        <div id="container">
        </div>
        <div id="ExamDataHistory">
        </div>
    </div>
    <!--endprint1-->
     
 
 <!--startprint2-->
  <div style=" overflow:auto;">
        <%=TableHtml %>
        </div>
    <!--startprint2-->
    
     
     </div>
      </div>
    </form>
    <script type="text/javascript">
        $(function () {
            //把分页定位到屏幕下面
            divresize(90);
            FixedTableHeader("#table1", $(window).height() - 121);            
            $("#table1 tr th:eq(1)").hide();
            $("#table1 tr td:nth-child(2)").hide();
            His();
           //CaCheload();         
        });

        function His() {         
            var score = <%=ExamAllScroe %>;          
            var one4, two4, three4, four4, five4, six4, seven4, eight4, nine4, ten4;
            var one3, two3, three3, four3, five3, six3, seven3, eight3, nine3, ten3;
            var one2, two2, three2, four2, five2, six2, seven2, eight2, nine2, ten2; 
            var one1, two1, three1, four1, five1, six1, seven1, eight1, nine1, ten1; 
            if (score >= 0 && score < 11){ one1 = '0-10'; one2 = <%=one %>;  }                       
            if (score >= 11 && score < 21){ one1 = '0-10'; one2 = <%=one %>; two1 = '11-20';two2 = <%=two %>;}                       
            if (score >= 21 && score < 31){ one1 = '0-10'; one2 = <%=one %>;two1 = '11-20';two2 = <%=two %>;three1 = '21-30';three2 = <%=three %>;  }                      
            if (score >= 31 && score < 41){ one1 = '0-10'; one2 = <%=one %>;two1 = '11-20';two2 = <%=two %>;three1 = '21-30';three2 = <%=three %>;four1 = '31-40';four2 = <%=four %>;   }                     
            if (score >= 41 && score < 51){one1 = '0-10'; one2 = <%=one %>;two1 = '11-20';two2 = <%=two %>;three1 = '21-30';three2 = <%=three %>;four1 = '31-40';four2 = <%=four %>;five1 = '41-50';five2 = <%=five %>;      }                     
            if (score >= 51 && score < 61){one1 = '0-10'; one2 = <%=one %>;two1 = '11-20';two2 = <%=two %>;three1 = '21-30';three2 = <%=three %>;four1 = '31-40';four2 = <%=four %>;five1 = '41-50';five2 = <%=five %>;six1= '51-60';six2 = <%=six %>;      }                    
            if (score >= 61 && score < 71){one1 = '0-10'; one2 = <%=one %>;two1 = '11-20';two2 = <%=two %>;three1 = '21-30';three2 = <%=three %>;four1 = '31-40';four2 = <%=four %>;five1 = '41-50';five2 = <%=five %>;six1= '51-60';six2 = <%=six %>;seven1 = '61-70';seven2 = <%=seven %>;      }                    
            if (score >= 71 && score < 81){ one1 = '0-10'; one2 = <%=one %>;two1 = '11-20';two2 = <%=two %>;three1 = '21-30';three2 = <%=three %>;four1 = '31-40';four2 = <%=four %>;five1 = '41-50';five2 = <%=five %>;six1= '51-60';six2 = <%=six %>;seven1 = '61-70';seven2 = <%=seven %>;eight1 = '71-80';eight2 = <%=eight %>;    }                      
            if (score >= 81 && score < 91){one1 = '0-10'; one2 = <%=one %>;two1 = '11-20';two2 = <%=two %>;three1 = '21-30';three2 = <%=three %>;four1 = '31-40';four2 = <%=four %>;five1 = '41-50';five2 = <%=five %>;six1= '51-60';six2 = <%=six %>;seven1 = '61-70';seven2 = <%=seven %>;eight1 = '71-80';eight2 = <%=eight %>;nine1 = '81-90';nine2 = <%=nine %>; }            
            if (score >= 91 && score < 101){             
                    one1 = '0-10'; one2 = <%=one %>;two1 = '11-20';two2 = <%=two %>;three1 = '21-30';three2 = <%=three %>;four1 = '31-40';four2 = <%=four %>;five1 = '41-50';five2 = <%=five %>;six1= '51-60';six2 = <%=six %>;seven1 = '61-70';seven2 = <%=seven %>;eight1 = '71-80';eight2 = <%=eight %>;nine1 = '81-90';nine2 = <%=nine %>;ten1 = '91-100';ten2 = <%=ten %>;     
            }     
            var avgr = cf(<%=scorestr %>);       
            
            if (avgr == 1){ one3 = 2;}else{ if(one1!=undefined && one2!=undefined){ one3 = "";}}
            if (avgr == 2){ two3= 2;}else{if(two1!=undefined && two2!=undefined){two3 ="";}}
            if (avgr == 3){ three3 = 2;}else{if(three1!=undefined && three2!=undefined){three3 = "";}}
            if (avgr == 4){ four3 = 2;}else{if(four1!=undefined && four2!=undefined){four3 = "";}}
            if (avgr == 5){ five3 = 2;}else{if(five1!=undefined && five2!=undefined){five3 = "";}}
            if (avgr == 6){ six3= 2;}else{if(six1!=undefined && six2!=undefined){six3 = "";}}
            if (avgr == 7){ seven3 = 2;}else{if(seven1!=undefined && seven2!=undefined){seven3 = "";}}
            if (avgr == 8){ eight3 = 2 ; }else{if(eight1!=undefined && eight2!=undefined){eight3 = "";}}
            if (avgr == 9){ nine3 = 2;}else{if(nine1!=undefined && nine2!=undefined){nine3 = "";}}
            if (avgr == 10){ ten3 = 2;}else{if(ten1!=undefined && ten2!=undefined){ten3 = "";}}
            
            var avgr = cf(<%=avgstr %>); 
            //var avgr = cf([null,null,null,null,null,null,null,null,null,null]);                    
            if (avgr == 1){ one4 = 2;}else{ if(one1!=undefined && one2!=undefined){one4 = "";}}
            if (avgr == 2){ two4= 2;}else{if(two1!=undefined && two2!=undefined){two4 = "";}}
            if (avgr == 3){ three4 = 2;}else{if(three1!=undefined && three2!=undefined){three4 = "";}}
            if (avgr == 4){ four4 = 2;}else{if(four1!=undefined && four2!=undefined){four4 = "";}}
            if (avgr == 5){ five4 = 2;}else{if(five1!=undefined && five2!=undefined){five4 = "";}}
            if (avgr == 6){ six4= 2;}else{if(six1!=undefined && six2!=undefined){six4 = "";}}
            if (avgr == 7){ seven4 = 2;}else{if(seven1!=undefined && seven2!=undefined){seven4 = "";}}
            if (avgr == 8){ eight4 = 2 ; }else{if(eight1!=undefined && eight2!=undefined){eight4 = "";}}
            if (avgr == 9){ nine4 = 2;}else{if(nine1!=undefined && nine2!=undefined){nine4 = "";}}
            if (avgr == 10){ ten4 = 2;}else{if(ten1!=undefined && ten2!=undefined){ten4 = "";}}
            
            
            /*
            alert( one1+"_"+two1+"_"+three1+"_"+four1+"_"+five1+"_"+six1+"_"+ seven1+"_"+ eight1+"_"+ nine1+"_"+ten1);
            alert(one2+"_"+two2+"_"+three2+"_"+four2+"_"+five2+"_"+six2+"_"+seven2+"_"+eight2+"_"+nine2+"_"+ten2);
            
            alert(one3+"_"+two3+"_"+three3+"_"+four3+"_"+five3+"_"+six3+"_"+seven3+"_"+eight3+"_"+nine3+"_"+ten3);
            alert(one4+"_"+two4+"_"+three4+"_"+four4+"_"+five4+"_"+six4+"_"+seven4+"_"+eight4+"_"+nine4+"_"+ten4);
            */
            
              /*   */                                                                                         
            $('#container').highcharts({
                credits: {enabled:false},
                chart: {width:650, height:450},
                title: {
                    text: lgPicture
                },
                yAxis: {
                    title: {
                        text: lgnum
                    }
                },
                 xAxis: { categories: [one1,two1,three1,four1,five1,six1, seven1, eight1, nine1, ten1]},
                    
                series: [{
                  enabled: false,
                    type: 'column',
                    name: lgnum,
                    data:[one2,two2,three2,four2,five2,six2,seven2,eight2,nine2,ten2],                           //                         //,<%=four %>,<%=five %>,<%=six %>,<%=seven %>,<%=eight %>,<%=nine %>,<%=ten %>
                  }, {
                    type: 'scatter',
                    name: lgMyScore,
                    data: [one3,two3,three3,four3,five3,six3,seven3,eight3,nine3,ten3],
                  
                    marker: {
                        lineWidth: 3,
                        lineColor: Highcharts.getOptions().colors[1],
                        fillColor: 'white'
                    }
                }, {
                    type: 'scatter',
                    name: lgAvgScore,
                    data: [one4,two4,three4,four4,five4,six4,seven4,eight4,nine4,ten4],
                    marker: {
                        lineWidth: 3,
                        lineColor: Highcharts.getOptions().colors[4],
                        fillColor: 'white'
                    }
                }]
            });   
            
                         $('#ExamDataHistory').highcharts({
              chart: { type: 'bar', width:650, height:450 }, 
              title: { text: lghigtitle },
               subtitle: { text: lgsubtitle },
                xAxis: { categories: [<%=typename %>],
                 title: { text: null } },
                  yAxis: { min: 0, title: { text:lgdanwei, align: 'high' },
                   labels: { overflow: 'justify' } },
                    tooltip: { valueSuffix: lgmillions }, 
                     plotOptions: { bar: { dataLabels: { enabled: true } } },
                      legend: { layout: 'vertical', align: 'right', verticalAlign: 'top', x: 0, y: 20, floating: true, borderWidth: 1, backgroundColor: '#FFFFFF', shadow: true },
                       credits: { enabled: false }, 
                       series: [
                        { name: lgtmlszql, data:[<%=oldtypeaccout%>] },
                         { name: lgbsjgrzql, data:[<%=newtypecount%>] }] 
                         });
        }     
        
        //截取取总分            
        function cf(cfstr)
        {
            var cfstr = cfstr+'';
            var a = cfstr.split(',');
            var len =num(a);                                             
            return len+1;
        }
        function num(v)
        {                    
            for(var i = v.length-1; i >= 0; i--)
            {
                if(v[i]=='' || v[i]==undefined || v[i]==null)
                {
                    
                }     
                else
                {
                    return i;
                }
            }
        }       
        //打印图表
        function pintque() {     
//            if(window.top.location.toString().indexOf("MemberCenter.aspx")> 0)
//            {
//                window.open(window.location.href);                        
//            }                           
            var bdhtml = window.document.body.innerHTML; //获取当前页的html代码            
            var sprnstr = "<!--startprint1-->"; //设置打印开始区域dsfsadfdsd
            var eprnstr = "<!--endprint1-->"; //设置打印结束区域
            var prnhtml = bdhtml.substring(bdhtml.indexOf(sprnstr)+18); //从开始代码向后取html                
            prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr)); //从结束代码向前取html            
            window.document.body.innerHTML = prnhtml;              
//            var bdhtml = window.document.body.innerHTML; //获取当前页的html代码            
            window.print();
            window.document.body.innerHTML = bdhtml;
         }
           //打印成绩
        function pintque1() {     
//            if(window.top.location.toString().indexOf("MemberCenter.aspx")> 0)
//            {
//                window.open(window.location.href);                        
//            }                           
            var bdhtml = window.document.body.innerHTML; //获取当前页的html代码            
            var sprnstr = "<!--startprint2-->"; //设置打印开始区域dsfsadfdsd
            var eprnstr = "<!--endprint2-->"; //设置打印结束区域
            var prnhtml = bdhtml.substring(bdhtml.indexOf(sprnstr)+18); //从开始代码向后取html                
            prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr)); //从结束代码向前取html            
            window.document.body.innerHTML = prnhtml;          
            window.document.body.style.overflow="auto";    
//            var bdhtml = window.document.body.innerHTML; //获取当前页的html代码            
            window.print();
            window.document.body.innerHTML = bdhtml;
         }
//         function CaCheload()
//         {
//        getAjax("/Training/DataStatistics/DataCaCheHtml.ashx","action=Exam_Per&Param=<%=resultkey%>",function(rs){
//        if (rs==0) {
//    
//}
//        });
         //}
            var Mywindows = 'Exam_PersonalData';
    </script>

      <script type="text/javascript">
          var i = 0;
          $("annex").each(function () {
              $(this).attr("id", "aa" + i);
              var fileUrl = $(this).text();
              window.path2html("aa" + i, fileUrl);
              i++;
          });   
    </script>
</body>
</html>