<%@ Page Language="C#" EnableEventValidation="false" AutoEventWireup="True" Title="课程修改" Debug="true" MasterPageFile="~/Admin/MasterPage.master" Inherits="Kesion.NET.WebSite.Course.CourseList" Codebehind="KS.CosList.aspx.cs" %>

<%@ Import Namespace="Kesion.APPCode" %>
<%@ Import Namespace="Kesion.Publics" %>
<%@ Import Namespace="Kesion.Cache" %>
<%@ Import Namespace="Kesion.BLL" %>
<%@ Import Namespace="Kesion.Course" %>

<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" runat="Server">
    <script>
        $(document).ready(function () { free();});
        function GetMyIds() {
            var sid = null;
            for (var i = 0; i < document.getElementsByName("ids").length; i++) {
                var KS = document.getElementsByName("ids")[i];
                if (KS.checked == true) {
                    if (sid == null)
                        sid = KS.value;
                    else
                        sid += "," + KS.value;
                }
            }
            return sid;
        } 
        function GetKeyTags() {
            var text = escape(jQuery('#<%=TxtName.ClientID%>').val());
            if (text != '') {
                jQuery('#<%=TxtKeyTags.ClientID%>').val('请稍等,系统正在自动获取tags...').attr("disabled", true);
                jQuery.get("../../plus/ajaxs.ashx", { a: "GetTags", text: text },
				  function(data) { jQuery('#<%=TxtKeyTags.ClientID%>').val(unescape(data)).attr("disabled", false); });
                } else { KesionJS.Alert('对不起,请先输入课程名称!',"jQuery('#<%=TxtName.ClientID%>').focus();"); }
        } 
        function ContentSetAttribute(){
            var sid = GetMyIds();
            if (sid!=null)  parent.openWin("批量设置点播课程属性","<%=KSCMS.GetInstallDir()+MyCache.GetCacheConfig(4)%>/Course/KS.CosBatch.aspx?ContentID="+sid+"&costype=1",true,880,600);
        }
   
        function showwatermarkarea() {
            var checkrad = jQuery("#<%=this.RadioButtonList1.ClientID %> :radio[checked]").val();
            if (checkrad == "2") {
                jQuery("#<%=this.watermark0.ClientID %>").css("display", "none");
                jQuery("#<%=this.watermark2.ClientID %>").css("display", "");
            }else  if(checkrad=="1"){
                jQuery("#<%=this.watermark0.ClientID %>").css("display", "");  
                jQuery("#<%=this.watermark2.ClientID %>").css("display", "none");
            }
            else 
            {
                jQuery("#<%=this.watermark0.ClientID %>").css("display", "none");
                jQuery("#<%=this.watermark2.ClientID %>").css("display", "none");

            }
    }

    function free() {
        var checkrad = jQuery("#<%=this.RdbIsFree.ClientID %> :radio[checked]").val();
        if (checkrad == "0") {
          
        jQuery("#<%=this.isbuyperiod.ClientID %>").css("display", "none");
         jQuery("#<%=this.Tbody1.ClientID %>").css("display", "");
        jQuery("#<%=this.Tbody2.ClientID %>").css("display", "none");
        jQuery("#<%=this.Tbody8.ClientID %>").css("display", "none");
        jQuery("#<%=this.Tbody5.ClientID %>").css("display", "none");
        jQuery("#<%=this.Tbody6.ClientID %>").css("display", "none");
        jQuery("#<%=this.Tbody7.ClientID %>").css("display", "none");   
        jQuery("#<%=this.Tbody9.ClientID %>").css("display", "none"); 
        jQuery("#<%=this.TbodyPrice.ClientID %>").css("display", "none"); 
        jQuery("#<%=this.TbodyUser.ClientID %>").css("display", "none"); 
        jQuery("#<%=this.TbodyUserVIP.ClientID %>").css("display", "none"); 
        jQuery("#<%=this.TbobyCashBack.ClientID %>").css("display", "none"); 
        jQuery("#<%=this.TbobyUserScore.ClientID %>").css("display", ""); 

    } else if (checkrad == "1") {
       
        jQuery("#<%=this.Tbody1.ClientID %>").css("display", "none");
	    jQuery("#<%=this.Tbody2.ClientID %>").css("display","");
	   jQuery("#<%=this.TbodyUser.ClientID %>").css("display","");
	    jQuery("#<%=this.Tbody9.ClientID %>").css("display", "none");  
	    jQuery("#<%=this.Tbody8.ClientID %>").css("display", "");
        	
	    Promotion();

	} 
    CheckIsShowAllowView();
}

 function CheckIsShowAllowView() {
            var checkrad = jQuery("#<%=this.RdbIsFree.ClientID %> :radio[checked]").val();
    	    if (checkrad == "0") {
                $("#showvalide").hide();
                $("#showallowview").show();
                
            } else {
                $("#showvalide").show();
                $("#showallowview").hide();
              
            }

 }

 function OtherTc() {
     var checkrad = jQuery("#<%=this.IsOtherTc.ClientID %> :radio[checked]").val();
    if (checkrad == "1") {
        jQuery("#<%=this.Tbody4.ClientID %>").css("display", "");
    	    } else {
    	        jQuery("#<%=this.Tbody4.ClientID %>").css("display", "none");
    	    }
        }
        function changeoverdue() {
            var checkrad = jQuery("#<%=this.CosOverdue.ClientID %> :radio[checked]").val();
    	
    if (checkrad == "1") {
        jQuery("#overdue1").css("display", "none");
        jQuery("#overdue2").css("display", "");
        jQuery("#overdue3").css("display", "none");
    } else if(checkrad == "2"){
        jQuery("#overdue2").css("display", "none");
        jQuery("#overdue1").css("display", "none");
        jQuery("#overdue3").css("display", "");
    }
    else
    {
        jQuery("#overdue1").css("display", "");
        jQuery("#overdue2").css("display", "none");
        jQuery("#overdue3").css("display", "none");
    }		
}
function Promotion() {
    var checkrad = jQuery("#<%=this.Promotion.ClientID %> :radio[checked]").val();
    if (checkrad == "1") {
                 jQuery("#<%=this.isbuyperiod.ClientID %>").css("display", "none");
    	        jQuery("#<%=this.Tbody5.ClientID %>").css("display", "");
                jQuery("#<%=this.Tbody6.ClientID %>").css("display", "");
                jQuery("#<%=this.Tbody7.ClientID %>").css("display", "none");
                jQuery("#<%=this.Tbody9.ClientID %>").css("display", "none");  
                jQuery("#<%=this.TbodyPrice.ClientID %>").css("display", "none");
                jQuery("#<%=this.TbobyCashBack.ClientID %>").css("display", "none");
                jQuery("#<%=this.TbodyUserVIP.ClientID %>").css("display", ""); 
                jQuery("#<%=this.TbobyUserScore.ClientID %>").css("display", ""); 
        
    } else if (checkrad == "2") { 
                jQuery("#<%=this.isbuyperiod.ClientID %>").css("display", "none");
                jQuery("#<%=this.Tbody5.ClientID %>").css("display", "none");        
                jQuery("#<%=this.Tbody6.ClientID %>").css("display", "");
                jQuery("#<%=this.Tbody7.ClientID %>").css("display", "none"); 
                jQuery("#<%=this.Tbody9.ClientID %>").css("display", "none");
                jQuery("#<%=this.TbodyPrice.ClientID %>").css("display", "none"); 
                jQuery("#<%=this.TbobyCashBack.ClientID %>").css("display", "none");
                jQuery("#<%=this.TbodyUserVIP.ClientID %>").css("display", ""); 
                jQuery("#<%=this.TbobyUserScore.ClientID %>").css("display", ""); 
    } else if (checkrad == "3") { 
                jQuery("#<%=this.isbuyperiod.ClientID %>").css("display", "none");
                jQuery("#<%=this.Tbody5.ClientID %>").css("display", "none");
                jQuery("#<%=this.Tbody6.ClientID %>").css("display", "none");
                jQuery("#<%=this.Tbody9.ClientID %>").css("display", "none");  
                jQuery("#<%=this.Tbody7.ClientID %>").css("display", ""); 
                jQuery("#<%=this.TbodyPrice.ClientID %>").css("display", "none");  
                jQuery("#<%=this.TbobyCashBack.ClientID %>").css("display", "none");
                jQuery("#<%=this.TbodyUserVIP.ClientID %>").css("display", "none"); 
                jQuery("#<%=this.TbobyUserScore.ClientID %>").css("display", "none"); 
            }else if(checkrad=="4")
           {
                jQuery("#<%=this.isbuyperiod.ClientID %>").css("display", "none");
                jQuery("#<%=this.Tbody5.ClientID %>").css("display", "none");
                jQuery("#<%=this.Tbody6.ClientID %>").css("display", "none");
                jQuery("#<%=this.Tbody7.ClientID %>").css("display", "none");  
                jQuery("#<%=this.Tbody9.ClientID %>").css("display", "");  
                jQuery("#<%=this.TbodyPrice.ClientID %>").css("display", "none"); 
                jQuery("#<%=this.TbobyCashBack.ClientID %>").css("display", "none");
                jQuery("#<%=this.TbodyUserVIP.ClientID %>").css("display", "");
                jQuery("#<%=this.TbobyUserScore.ClientID %>").css("display", ""); 
        }
    else {
            jQuery("#<%=this.isbuyperiod.ClientID %>").css("display", "");
            jQuery("#<%=this.Tbody5.ClientID %>").css("display", "none");
            jQuery("#<%=this.Tbody6.ClientID %>").css("display", "none");
            jQuery("#<%=this.Tbody7.ClientID %>").css("display", "none"); 
            jQuery("#<%=this.Tbody9.ClientID %>").css("display", "none"); 
            jQuery("#<%=this.TbodyPrice.ClientID %>").css("display", ""); 
            jQuery("#<%=this.TbobyCashBack.ClientID %>").css("display", ""); 
            jQuery("#<%=this.TbodyUserVIP.ClientID %>").css("display", ""); 
            jQuery("#<%=this.TbobyUserScore.ClientID %>").css("display", ""); 
        }
}

function searchSJ() {
    var key = jQuery("#<%=this.TxtSJKey.ClientID %>").val();
    if (key == '') {
        KesionJS.Alert("请输入试卷关键字！", "jQuery('#<%=this.TxtSJKey.ClientID %>').focus()");
        return false;
    } else {
        jQuery.ajax({ url: "KS.CosList.aspx?action=GetSJ&Key=" + escape(key), success: function (d) {
            jQuery("#<%=this.LstB2.ClientID %>").empty();
            jQuery("#<%=this.LstB2.ClientID %>").append(d);
        }
        });
    }
}
function addUser() {
    var src = document.getElementById('<%=this.LstB2.ClientID %>');
    var dest = document.getElementById('<%=this.LstB1.ClientID %>');

    for (var i = 0; i < src.options.length; i++) {
        if (src.options[i].selected) {
            var exist = false;
            for (var j = 0; j < dest.options.length; j++) {
                if (dest.options[j].value == src.options[i].value) {
                    exist = true;
                    break;
                }
            }
            if (!exist) {
                var opt = document.createElement('OPTION');
                opt.value = src.options[i].value;
                opt.text = src.options[i].text;
                dest.options.add(opt);
            }
        }
    }
}

function delUser() {
    var dest = document.getElementById('<%=this.LstB1.ClientID %>');

                for (var i = dest.options.length - 1; i >= 0; i--) {
                    if (dest.options[i].selected) {
                        dest.options[i] = null;
                    }
                }
        }
        var issubmit = false;
            function CheckForm() { 
                if (jQuery('#ctl00_KSContent_TxtName').val() == '') {
                    KesionJS.Alert('课程名称必须输入!', "jQuery('#ctl00_KSContent_TxtName').focus()");
                    return false;
                }
                if (jQuery('#ctl00_KSContent_DrpClassID1').val() == '0') {
                    KesionJS.Alert('请选择课程类型!', "jQuery('#ctl00_KSContent_DrpClassID1').focus()");
                    return false;
                }
                var dest = document.getElementById('ctl00_KSContent_teacherlist').value;

                if (dest == '') {
                    KesionJS.Alert('请选择课程教师!', "jQuery('#ctl00_KSContent_teacherlist').focus()");
                    return false;
                }
                var checkrad = jQuery("#<%=this.RdbIsFree.ClientID %> :radio[checked]").val();
                if (checkrad == "1") {
                    if ($('#<%=Money.ClientID%>').val() == "") {
                        KesionJS.Alert("请设置参考价格！", "jQuery('#<%=this.Money.ClientID %>').focus()");
                        return false;
                    }
                    if ($('#<%=Price_Member.ClientID%>').val() == "") {
                        KesionJS.Alert("请设置课程价格！", "jQuery('#<%=this.Price_Member.ClientID %>').focus()");
                        return false;
                    }
                    if (parseFloat($('#<%=Price_Member.ClientID%>').val()) > parseFloat($('#<%=Money.ClientID%>').val())) {
                        KesionJS.Alert("课程价格不能大于参考价格！", "jQuery('#<%=this.Price_Member.ClientID %>').focus()");
                          return false;
                      }
                  }else if(checkrad == "0"){
                      if(jQuery("#<%=this.IsSendNote.ClientID %> :radio[checked]").val() == "1"){
                        KesionJS.Alert("免费课程不能邮寄资料啦！", "jQuery('#<%=this.NotePrice.ClientID %>').focus()");
                        return false;
                    }
                }
            if (jQuery("#<%=this.IsSendNote.ClientID %> :radio[checked]").val() == "1" && parseFloat(jQuery('#<%=this.NotePrice.ClientID %>').val()) < 0){
                    KesionJS.Alert("资料价格不能小于0，请重新输入！", "jQuery('#<%=this.NotePrice.ClientID %>').focus()");
                    return false;
                }
                var checkrad1= jQuery("#<%=this.Promotion.ClientID %> :radio[checked]").val();

                if(checkrad1=="1")
                {
                    if (jQuery('#<%=this.begintime.ClientID %>').val() == '') {
                        KesionJS.Alert("请输入课程开始时间！", "jQuery('#<%=this.begintime.ClientID %>').focus()");

                        return false;
                    }
                    if (jQuery('#<%=this.endtime.ClientID %>').val() == '') {
                        KesionJS.Alert("请输入课程结束时间！", "jQuery('#<%=this.endtime.ClientID %>').focus()");

                        return false;
                    }
                    var Date1 = new Date(jQuery('#<%=this.begintime.ClientID %>').val());
                    var Date2 = new Date(jQuery('#<%=this.endtime.ClientID %>').val());

                    if (Date2 <= Date1) {
                        KesionJS.Alert("结束时间不能小于开始时间！", "jQuery('#<%=this.endtime.ClientID %>').focus()");

                        return false;
                    }

                    if ($('#<%=PanicMoney.ClientID%>').val() == "") {
                        KesionJS.Alert("请设置抢购价！", "jQuery('#<%=this.PanicMoney.ClientID %>').focus()");
                        return false;
                    }
                }
                else if(checkrad1=="2")
                {
                    
                    if ($('#<%=PanicMoney.ClientID%>').val() == "") {
                        KesionJS.Alert("请设置团购价！", "jQuery('#<%=this.PanicMoney.ClientID %>').focus()");
                        return false;
                    }
                }
                else if(checkrad1=="3")
                {
                    if ($('#<%=jifen.ClientID%>').val() == "") {
                        KesionJS.Alert("请设置兑换积分！", "jQuery('#<%=this.jifen.ClientID %>').focus()");
                        return false;
                    }
                    if (jQuery("#<%=this.IsSendNote.ClientID %> :radio[checked]").val() == "1"){
                        KesionJS.Alert("积分兑换课程不能邮寄资料！", "jQuery('#<%=this.NotePrice.ClientID %>').focus()");
                        return false;
                    }
                }
        var idArr = new Array();
        var dest = document.getElementById('<%=this.LstB1.ClientID %>');
        for (var i = 0; i < dest.options.length; i++) {
            dest.options[i].selected = "true";
            idArr.push(dest.options[i].value);
        }
                //代理商
            <%if (Utils.StrToInt(epa.GetEpAgentConfig("EpAgentStatus")) == 1){%>
                if (jQuery('#<%=this.TxtPingTaiRate.ClientID %>').val() == '') {
                    KesionJS.Alert('平台分配比例必须输入!', "jQuery('#<%=this.TxtPingTaiRate.ClientID %>').focus()");
                    return false;
                }
                if (jQuery('#<%=this.TxtProviceRate.ClientID %>').val() == '') {
                    KesionJS.Alert('省级分配比例必须输入!', "jQuery('#<%=this.TxtProviceRate.ClientID %>').focus()");
                return false;
            }
            if (jQuery('#<%=this.TxtCityRate.ClientID %>').val() == '') {
                    //  KesionJS.Alert('市级分配比例必须输入!', "jQuery('#<%=this.TxtCityRate.ClientID %>').focus()");
               // return false;
           }
           <%}%>
                if (issubmit == false) {
                    issubmit = true;
                    return true;
                } else {
                    return false;
                }
            }

            function zhekou() {
                var money = document.getElementById('<%=this.Money.ClientID %>').value;
                var Price = document.getElementById('<%=this.Price_Member.ClientID %>').value;
                var zhekou = (parseFloat(Price / money) * 10).toFixed(1);

                if (zhekou == "NaN" || zhekou <= 0) {
                    zhekou = 0;
                } else if (zhekou == "Infinity" || zhekou >= 10) {
                    zhekou = 10;
                }
                document.getElementById('<%=this.zhekou.ClientID %>').value = zhekou;
        }
        function iszhekou() {           
            var ISLoad = jQuery("#<%=this.ISLoad.ClientID %> :radio[checked]").val();
            if(ISLoad=="1")
            {
                //折扣价
                jQuery("#<%=this.Iszhekou.ClientID %>").css("display", "");
             jQuery("#<%=this.IsFixedPrice.ClientID %>").css("display", "none");
         }else if(ISLoad=="0") {
             //免费
             jQuery("#<%=this.Iszhekou.ClientID %>").css("display", "none");
            jQuery("#<%=this.IsFixedPrice.ClientID %>").css("display", "none");
        }else {
            //固定价格
            jQuery("#<%=this.Iszhekou.ClientID %>").css("display", "none");
            jQuery("#<%=this.IsFixedPrice.ClientID %>").css("display", "");
        }
}
function SetDate() {
    var today = new Date();
    if ($("#showdate").is(":hidden")) {
        $("#showdate").show();
        $('#<%=TxtBeginDate.ClientID%>').val(today.getFullYear() + '-' + (today.getMonth() + 1) + '-01');
                $('#<%=TxtEndDate.ClientID%>').val(today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate());
            }
            else {
                $("#showdate").hide();
                $('#<%=TxtBeginDate.ClientID%>').val('');
        $('#<%=TxtEndDate.ClientID%>').val('');
            }
        }
        function keyWordFocus() {
            if (jQuery("#<%=this.KeyWord.ClientID %>").val() == '请输入关键字！') {
        jQuery("#<%=this.KeyWord.ClientID %>").val('');
    }
}
function keyWordBlur() {
    if (jQuery("#<%=this.KeyWord.ClientID %>").val() == '') {
                jQuery("#<%=this.KeyWord.ClientID %>").val('请输入关键字！');
            }
        }
        function setHtml()
        {
            var sid = null;
            for (var i = 0; i < document.getElementsByName("ids").length; i++) {
                var KS = document.getElementsByName("ids")[i];
                if (KS.checked == true) {
                    if (sid == null)
                        sid = KS.value;
                    else
                        sid += "," + KS.value;
                }
            }
            if (sid != null) {
                if (confirm("您确定所有点播课程内容页生成静态HTML吗?"))
                    return true;
                else
                    return false;
            } else {
                alert('没有选择要发布的课程!');
                return false;
            }
        }
        function SetIDS()
        {
            var sid = null;
            for (var i = 0; i < document.getElementsByName("ids").length; i++) {
                var KS = document.getElementsByName("ids")[i];
                if (KS.checked == true) {
                    if (sid == null)
                        sid = KS.value;
                    else
                        sid += "," + KS.value;
                }
            } 
            if (sid==null) {
                location.href="KS.CosImport.aspx";
            }
            else
            {
                location.href="KS.CosImport.aspx?cid="+sid;
            }
            return sid;
        }
        $(function(){
            //全选反选
            $("#selectAll").click(function(){
                if($(this).is(":checked")){
                    $(".courseList").find("input[type=checkbox]").attr("checked",true);
                }
                else{
                    $(".courseList").find("input[type=checkbox]").attr("checked",false);
                };
            });
        });

        function upliveRoom(courseid,liveType,accountid,costype)
        {                     

            if (liveType==1)
            {
                jQuery.get("KS.CosLiveList.aspx", { a: "upliveroom", accountid: accountid,liveType:liveType },
                      function (data) {
                              
                          parent.openWin('直播管理', '/plus/course/openliveroom.aspx?costype='+costype+'&CourseId=' + courseid+"&liveType="+liveType+"&accountid="+accountid+"&istop=1" , true, 850, 450);
                                
                      });
            } else if(liveType==0 || liveType>=5 )
            {
                alert("您选择其他服务器系统不能自动分配");
            }else{
                parent.openWin('直播管理', '/plus/course/openliveroom.aspx?costype='+costype+'&CourseId=' + courseid+"&liveType="+liveType+"&accountid="+accountid+"&istop=1" , true, 850, 450);
            }
        }
        function notice(courseid)
        {
            parent.openWin('开播通知', '/plus/course/LiveNotice.aspx?from=admin&CourseId=' + courseid+"&istop=1" , true, 950, 480);
        }
        function DoDelLearn(cosid)
        {
            parent.openWin('清空学习记录', 'course/KS.CosLearnTimeDel.aspx?courseid=' + cosid+"" , true,720, 380);
        }
    </script>

    <asp:Panel ID="ListPanel" runat="server" Width="100%">
        <div class="listedit">
            <%if (teacherid != 0)
              { %>
            <div class="tabButton">
                <a class="on" href="KS.TcZan.aspx?teacherid=<%=teacherid %>">点赞</a>
                <a href="KS.TcCollect.aspx?teacherid=<%=teacherid %>">收藏</a>
                <a href="KS.TcMessage.aspx?teacherid=<%=teacherid %>">留言</a>
                <a href="KS.TcAchieve.aspx?teacherid=<%=teacherid %>">评价</a>
            </div>
            <%} %>

            
            <%if ( teacherid==0)
              { %>
            <div class="floatLeft allCheck">
                <label><input name="" type="checkbox" value="" id="selectAll" />全选</label>
            </div>
            <%} %>
            <ul class="fl">
                <%if (teacherid != 0)
                  { %>
                <a href="KS.CsTeacher.aspx" class="button">返回名师</a>

                <%}
                  else
                  { %>
                    <asp:LinkButton ID="delclassbutton" runat="server" OnClientClick="return(GetIDS('del'));" OnClick="delclassbutton_Click" CssClass="button">删除</asp:LinkButton>
                    <asp:LinkButton ID="LinkButton10" runat="server" OnClick="LinkButton10_Click" OnClientClick="return(GetIDS());" CssClass="button">批量审核</asp:LinkButton>
                    <asp:LinkButton ID="LinkButton4" runat="server" OnClick="LinkButton11_Click" OnClientClick="return(GetIDS());" CssClass="button">批量取消审核</asp:LinkButton>
                    <asp:LinkButton ID="batchset" runat="server" CssClass="button">批量设置</asp:LinkButton>
               
                <%if (MyCache.GetCourseCommonConfig(65) == "1")
                  { %>
                
                    <asp:LinkButton ID="LinkButton1" runat="server" OnClientClick="return(setHtml());" OnClick="Button_S" CssClass="button">生成静态HTML</asp:LinkButton>
               
                <%} %>
                
                <%} %>
                
            </ul>
        </div>
        <div class="h20"></div>

        <!--当前讲师信息-->
        <%if (teacherid != 0)
          { %>
        <div class="courseInfoTop teacherInfoTop">
            <asp:PlaceHolder ID="PlaceHolder2" runat="server"></asp:PlaceHolder>
        </div>
        <%} %>
        <div class="content-area">
            <%if (teacherid == 0)
              { %>
            <div class="myTitle" style="display:none;">  
				<%=CosType==2?"组合":"点播" %>课程
                <%}
                  else
                  {%>
                   该教师下的课程
    
                <%}%>
                
            </div>
            <%if (teacherid == 0)
              { %>
            <div class="tabs_header longTabs">
                <ul class="tabs">
                    <li <%=KSCMS.S("Type")==""?" class='active'":string.Empty %>><a href="KS.CosList.aspx<%=CosType==0?"":"?costype="+CosType %>"><span>点播课程</span></a></li>
                    <li><a href="KS.CosLiveList.aspx<%=CosType==0?"":"?costype="+CosType %>"><span>直播课程</span></a></li>
                    <li><a href="KS.CosFaceList.aspx<%=CosType==0?"":"?costype="+CosType %>"><span>面授课程</span></a></li>
                </ul>
                <div class="fr headOperation longHeadOperat noPictures">
                    <ul>
                       <li id='p18'><a href="KS.CosImport.aspx" class="button">导入课程信息</a></li>
                        <li id='p10'><asp:LinkButton ID="LinkButton8" runat="server" OnClick="LinkButton8_Click" class="button">同步评价</asp:LinkButton></li>
                        <li id='p2'><asp:LinkButton ID="updatebutton" runat="server" OnClick="updatebutton_Click" class="button">一键更新课程信息</asp:LinkButton></li>
                    </ul> 
                </div>

            </div>
            <%} %>
            <div class="clear"></div>
            <div class="quickSearch clearfix">
                <div class="longquickSearch">
					<%if (teacherid == 0)
                      { %>
                        <div class="quickSelect">
                            <asp:DropDownList ID="DrpClassID" runat="server" onchange="location.href='?classid='+this.value;" style="width:150px;">
                                <asp:ListItem Value="0">选择分类</asp:ListItem>
                            </asp:DropDownList>
                        </div>
                    <%} %>
                    
                    <div class="SearchBox fl">
                        <asp:DropDownList ID="Condition" runat="server" Style="margin-right:8px;">
                            <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:ListItem Value="5">课程ID</asp:ListItem>
                        </asp:DropDownList>
                        <asp:TextBox onfocus="keyWordFocus();" onblur="keyWordBlur();" Style="color: #ccc" Text="请输入关键字！" CssClass="textbox" ID="KeyWord" runat="server" Width="180px"></asp:TextBox>
        
                        <span onclick="SetDate()" class="link-color" style="cursor: pointer">日期范围？</span>
                        <span id="showdate" <%if (this.TxtBeginDate.Text == "")
                                              { %>
                            style="display: none" <%} %>>
                            <asp:TextBox ID="TxtBeginDate" placeholder="格式：YYYY-MM-DD" Width="120px" runat="server" onclick="WdatePicker({dateFmt:&#39;yyyy-MM-dd&#39;});" CssClass="textbox Wdate"></asp:TextBox>至
                       <asp:TextBox ID="TxtEndDate" placeholder="格式：YYYY-MM-DD" Width="120px" runat="server" onclick="WdatePicker({dateFmt:&#39;yyyy-MM-dd&#39;});" CssClass="textbox Wdate"></asp:TextBox>
                        </span>
        
                        <asp:Button ID="Button4" runat="server" CssClass="button" Text="开始搜索" OnClick="Button2_Click" />
                    </div>
                    <div class="property">
                        <div class="name button ml15">筛选</div>
                        <div class="propertyBox">
                            <asp:CheckBoxList ID="Attribute" runat="server" RepeatLayout="Flow" RepeatDirection="Horizontal" AutoPostBack="True" OnSelectedIndexChanged="Arrtibute_SelectedIndexChanged">
                                <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:ListItem Value="5">手机</asp:ListItem>
                                <asp:ListItem Value="6">在售</asp:ListItem>
                            </asp:CheckBoxList>
                            
                            <ul class="clearfix">
                                <span class="screen fl">审核状态：</span>
                                <li <%=KSCMS.S("Type")=="6"?" class='active'":string.Empty %>><a href="KS.CosList.aspx?Type=6<%=CosType==0?"":"&costype="+CosType %>"><span>未审核</span></a></li>
                                <li <%=KSCMS.S("Type")=="7"?" class='active'":string.Empty %>><a href="KS.CosList.aspx?Type=7<%=CosType==0?"":"&costype="+CosType %>"><span>已审核</span></a></li>
                            </ul>
                            <ul class="clearfix">
                                <span class="screen fl">收费状态：</span>
                                <li <%=KSCMS.S("Type")=="8"?" class='active'":string.Empty %>><a href="KS.CosList.aspx?Type=8<%=CosType==0?"":"&costype="+CosType %>"><span>免费</span></a></li>
                                <li <%=KSCMS.S("Type")=="5"?" class='active'":string.Empty %>><a href="KS.CosList.aspx?Type=5<%=CosType==0?"":"&costype="+CosType %>"><span>付费</span></a></li>
                            </ul>
                            <ul class="clearfix">
                                <span class="screen fl">促销类型：</span>
                                <li <%=KSCMS.S("Type")=="1"?" class='active'":string.Empty %>><a href="KS.CosList.aspx?Type=1<%=CosType==0?"":"&costype="+CosType %>"><span>限时抢购</span></a></li>
                                <li <%=KSCMS.S("Type")=="2"?" class='active'":string.Empty %>><a href="KS.CosList.aspx?Type=2<%=CosType==0?"":"&costype="+CosType %>"><span>点播团购</span></a></li>
                                <li <%=KSCMS.S("Type")=="3"?" class='active'":string.Empty %>><a href="KS.CosList.aspx?Type=3<%=CosType==0?"":"&costype="+CosType %>"><span>积分兑换</span></a></li>
                                <li <%=KSCMS.S("Type")=="4"?" class='active'":string.Empty %>><a href="KS.CosList.aspx?Type=4<%=CosType==0?"":"&costype="+CosType %>"><span>混合购买</span></a></li>
                                <li <%=KSCMS.S("Type")=="9"?" class='active'":string.Empty %>><a href="KS.CosList.aspx?Type=9<%=CosType==0?"":"&costype="+CosType %>"><span>组合课程</span></a></li>
                                <li <%=KSCMS.S("Type")=="10"?" class='active'":string.Empty %>><a href="KS.CosList.aspx?Type=10<%=CosType==0?"":"&costype="+CosType %>"><span>纯点播</span></a></li>
                            </ul>
                            <%if (KSCMS.S("Type") == "1")
                                    {%>
                              <ul class="clearfix">
                                <span class="screen fl">抢购时间：</span>
                                <li <%=KSCMS.S("flag") == "1" ? " class='active'" : string.Empty %>><a href="KS.CosList.aspx?flag=1<%=CosType == 0 ? "" : "&costype=" + CosType %>&Type=1"><span>未到过期</span></a></li>
                                <li <%=KSCMS.S("flag") == "2" ? " class='active'" : string.Empty %>><a href="KS.CosList.aspx?flag=2<%=CosType == 0 ? "" : "&costype=" + CosType %>&Type=1"><span>已过期</span></a></li>
                            </ul>
                            <%} %>
                        </div>
                    </div>
                </div>
                <div class="fr liwrap longliwrap">
                    <li id='p1'><a href="KS.CosList.aspx?action=add&Type=<%=Utils.StrToInt(KSCMS.S("Type"))%>" class="button button_on">添加课程</a></li>
                </div>
            </div>
            <asp:Panel ID="Panel1" runat="server" Width="100%">
                <div class="courseList">
                    <ul>
                        <asp:Repeater ID="list" runat="server">
                            <ItemTemplate>
                                <li>
                                    <%if (teacherid == 0)
                                      { %>
                                    <div class="input">
                                        <input type="checkbox" name="ids" id="ids" value="<%#Eval("courseid") %>" />
                                    </div>
                                    <%} %>
                                    <div class="courseImg">
                                        <span class="livingState"><%# Kesion.Course.Course.GetCoursePromotionStr(Utils.StrToInt(Eval("Promotion").ToString()),Utils.StrToInt(Eval("teachway").ToString()))%></span>
                                        <img src="<%#Eval("photourl") %>" onerror="this.src='../../admin/images/nopic.png'" />
                                    </div>

                                    <div class="courseInfo clearfix">
                                        <div class="courseTitle clearfix">
                                            <div class="operating">
                                                <a href="?action=verify&courseid=<%#Eval("courseid")%>&vvalue=<%#Eval("verify") %>" class="<%# Convert.ToString(Eval("verify"))=="0"?"notext":"yestext" %>" title="<%# Convert.ToString(Eval("verify"))=="0"?"未审核":"已审核" %>"><%# Convert.ToString(Eval("verify"))=="0"?"未审核":"已审核" %></a>
                                                <span <%# DataFactory.Exists("KS_CosGroupPeriod","courseid="+Eval("courseid")+" and teachway=5")?"":"style='display:none'" %> class="noticeBox">
                                                    <span class="button" onclick="upliveRoom(<%#Eval("courseid") %>,<%#Eval("liveType") %>,<%#Eval("accountID") %>,1)" id='liveC<%#Eval("courseid") %>'>开始直播</span>
                                                    <span class="button" onclick="notice(<%#Eval("courseid") %>)">通知学员</span>
                                                </span>
                                                <a href="?action=modify&p=<%=MyPage.CurrPage %>&costype=<%=CosType %>&courseid=<%#Eval("courseid") %>" class="button">编辑</a>
                                                <div class="operatBoxBtn">
                                                    <a class="button"><i class="iMore"></i></a>
                                                    <div class="operatBoxMore clearfix">
                                                        <a href="<%# BaseFun.GetRewriteUrl("courseview",Utils.StrToInt(Eval("courseid").ToString())) %>" title="前台页" target="_blank">预览</a>
                                                        <a href="KS.CosPJ.aspx?type=0&CosType=<%=CosType==2?2:1 %>&courseid=<%#Eval("courseid") %>&teacherid=<%#Eval("TCID") %>">评价<i>(</i><%#Eval("pjnum") %><i>)</i></a>
                                                        <a href="KS.CosLearnRecord.aspx?type=0&CosType=<%=CosType==2?2:1 %>&courseid=<%#Eval("courseid").ToString() %>&teacherid=<%#Eval("TCID") %>">学员<i>(</i><%#Eval("studentNum") %><i>)</i></a>
                                                        <a href="?action=del&p=<%=MyPage.CurrPage %>&Ids=<%#Eval("courseid") %>" onclick="return(confirm('此操作不可逆，确定删除操作吗?'))">删除</a>
                                                     
                                                        <a onclick="DoDelLearn(<%#Eval("courseid")%>)" titile="清空学习记录">清空</a>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="title clearfix">
                                                <a href="<%# BaseFun.GetRewriteUrl("courseview",Utils.StrToInt(Eval("courseid").ToString()))%>" title="前台页" target="_blank"><%# Convert.ToString(Eval("name")) %></a>
                                                <div class="courseProperty">
                                                    <%#Convert.ToString(Eval("recommend"))=="1"?"<span class='bg1'>荐</span>":"" %>
                                                    <%#Convert.ToString(Eval("popular"))=="1"?"<span class='bg2'>精</span>":"" %>
                                                    <%#Convert.ToString(Eval("istop"))=="1"?"<span class='bg3'>头</span>":"" %>
                                                    <%#Convert.ToString(Eval("huandeng"))=="1"?"<span class='bg4'>幻</span>":"" %>
                                                    <%#Convert.ToString(Eval("IsOff")) == "1" ? "<span class='bg5'>售</span>":""%>
                                                    <%#Convert.ToString(Eval("is3g")) == "1" ? "<span class='bg6'>3g</span>" : ""%>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="fr price">
                                            <%# Utils.StrToInt(Eval("IsFree").ToString())==0?"<font class='greenFont'>免费</font>":Eval("promotion").ToString() == "3" ? Eval("jifen").ToString() + "积分" :Eval("promotion").ToString() == "1"||Eval("promotion").ToString() == "2"?"¥" + Kesion.APPCode.Public.ReturnShopPrice(Utils.StrToDecimal(Eval("PanicMoney").ToString())): Utils.StrToDecimal(Eval("price_member").ToString()) == 0 ? "<font class='greenFont'>免费</font>":"¥" + Kesion.APPCode.Public.ReturnShopPrice(Utils.StrToDecimal(Eval("price_member").ToString()))%><%#Eval("promotion").ToString()=="4"?"+"+Eval("jifen").ToString()+"积分":"" %>
											<div class="vipPrice">
                                                <em class="zhe<%#Utils.StrToFloat(Eval("zhekou").ToString(),0)<=0?"0":Eval("zhekou").ToString() %>"><%# Utils.StrToInt(Eval("IsFree").ToString())==0?"":Utils.StrToFloat(Eval("zhekou").ToString(),0)<=0?"0折":Eval("zhekou").ToString()+"折" %></em>
                                                <em class="vip" <%#Utils.StrToInt(Eval("ISLoad").ToString())==-1||Utils.StrToInt(Eval("IsFree").ToString())==0?"style='display:none'":"" %>>VIP：<%# Kesion.APPCode.Public.GetCourseVipPrice(Utils.StrToInt(Eval("ISLoad").ToString()),Utils.StrToFloat(Eval("Loadzhekou").ToString()),Utils.StrToFloat(Eval("FixedPrice").ToString()),Utils.StrToFloat(Eval("price_member").ToString()),Utils.StrToFloat(Eval("panicMoney")),Utils.StrToInt(Eval("promotion"))) %></em>
                                            </div>
                                        </div>
                                        <div class="fl">
                                            <div class="info"><span><%# BaseFun.CoursePublisher(Utils.StrToInt(Eval("SchoolID").ToString()), Eval("TcID").ToString(), Eval("SchoolName").ToString(),Eval("Teacher").ToString(), Eval("UserName").ToString(),1) %></span><span>时间：<%#Convert.ToDateTime(Eval("addtime").ToString()).ToString("yyyy-MM-dd")%></span><span>分类：<%# MyCache.GetCosClass( Utils.StrToInt( Eval("classid")),"ClassName",0)  %></span><span>有效期：<%#GetVilidDate(Utils.StrToInt(Eval("LimitLearn").ToString()),Utils.StrToInt(Eval("shixian").ToString()),Eval("LearnLimitDate").ToString(),Utils.StrToInt(Eval("limithours").ToString()))%></span><span>评分：<%#Eval("coursepf")%>分</span></div>
                                            <div class="clear"></div>
                                            <div class="buttonBox clearfix">
                                                <%#Course.GetIsPeriod(Utils.StrToInt(Eval("courseid").ToString()))==1?"<a href=\""+(Utils.StrToInt(Eval("teachway").ToString())==2?"KS.CosGroupPeriod.aspx":"KS.CosPeriod.Aspx")+"?CourseId="+Eval("courseid")+"&teacherid="+Eval("TCID")+"\" class=\"greenFont btn\"><em>"+Eval("CountPid")+"</em>&nbsp;<span>课时</span>&nbsp;>></a>  ":"" %>
                                                <a href="KS.CsZLInfo.aspx?type=0&costype=<%=CosType==2?2:1 %>&CourseId=<%#Eval("courseid") %>&teacherid=<%#Eval("TCID") %>" class="greenFont btn">                                        
                                                    <em><%#Eval("zlnum")  %>&nbsp;份</em><span>资料</span>&nbsp;>></a>
                                                <a href="KS.CosExamlist.aspx?type=0&CourseId=<%#Eval("courseid") %>&costype=<%=CosType==2?2:1 %>&teacherid=<%#Eval("TCID") %>" class="greenFont btn">                               
                                                    <em><%#Eval("sjnum") %>&nbsp;份</em><span>试卷</span>&nbsp;>></a>
                                                <a href="KS.CsTeacher.aspx?type=0&CosType=1&CourseId=<%#Eval("courseid") %>&costypes=<%=CosType==2?2:1 %>&teacherid=<%#Eval("TCID") %>" class="greenFont btn">                            
                                                    <em><%#Eval("teachernum") %>&nbsp;名</em><span>讲师</span>&nbsp;>></a>
                                                <%if (SiteKey.VerifyModulePower("cosprop"))
                                                  { %>
                                                <a href="KS.CosProp.aspx?CourseId=<%#Eval("courseid") %>" class="greenFont btn">        
                                                    <em><%#Eval("propnum") %>&nbsp;个</em><span>道具</span>&nbsp;>></a>
                                                <%} %>
                                                <a href="KS.CosChat.aspx?CourseId=<%#Eval("courseid") %>" class="greenFont btn">
                                                    <em><%#Eval("chatnum") %>&nbsp;个</em><span>留言</span>&nbsp;>></a>
                                            </div>
                                        </div>
                                    </div>
                                </li>
                            </ItemTemplate>
                            <FooterTemplate>
                                <div class="empty" style="display: <%# bool.Parse((list.Items.Count==0).ToString())?"":"none"%>">没有添加任何课程</div>
                            </FooterTemplate>
                        </asp:Repeater>
                    </ul>
                </div>
                <script>
                    $(function(){
                        $(".courseList li:first").css({borderTop:"0px"});
                    });
                </script>
            </asp:Panel>

          
            <asp:Label ID="LabPage" runat="server"></asp:Label>
        </div>
    </asp:Panel>
    <asp:Panel ID="AddPanel" runat="server" Width="100%">
        <div class="content-area mt20" >
            <div class="tab-page" id="CourseListPanel">
                <script type="text/javascript">
                    var tabPane1 = new WebFXTabPane(document.getElementById("CourseListPanel"), 1)
                </script>

                <div class="tab-page" id="tab0">
                    <h2 class="tab">基本信息</h2>
                    <script type="text/javascript">
                        tabPane1.addTabPage(document.getElementById("tab0"));
                    </script>

                    <table width="100%" align="center" border="0" cellpadding="1" cellspacing="1" class="CTable no-borderTable" style="table-layout: fixed">
                        <tr>
                            <td align="right" class="lefttd" height="30" style="width:258px;"><font color="red">*</font><strong>课程名称：</strong></td>
                            <td class="righttd">
                                <asp:TextBox ID="TxtName" CssClass="textbox" runat="server" Style="width: 360px"></asp:TextBox>
                                <strong>简短标题：</strong>
                                <asp:TextBox ID="TxtShortName" CssClass="textbox coursename" runat="server" Style="width: 150px" MaxLength="100"></asp:TextBox>
                                <span class="msgtips tips">该字段如果为空的话，就去截取”课程名称“的字数</span>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="lefttd" style="width:258px;">
                                <strong>课程图片：</strong></td>
                            <td class="righttd">
                                <table border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td width="470px">
                                            <asp:TextBox ID="SpecialPic" CssClass="textbox" runat="server" Width="350px"></asp:TextBox>
                                            <input type="button" class="button" onclick="SelectFiles('<%=this.SpecialPic.ClientID%>    ',0);" value="选择图片" />
                                        </td>
                                        <td style="width: 120px; text-align: center;"><div style=" height:34px;overflow:hidden;"><%=Kesion.APPCode.UploadAPI.EchoUpload("classpic",this.SpecialPic.ClientID) %></div></td>
                                    </tr>
                                </table>

                            </td>
                        </tr>
                        <tr>
                            <td class="lefttd" height="30" align="right" style="width:258px;"><b><font color="red">*</font>课程主分类：</b></td>
                            <td class="righttd">
                                <asp:DropDownList ID="DrpClassID1" runat="server" Width="262px">
                                    <asp:ListItem Value="0">--选择课程分类--</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td class="lefttd" height="30" align="right" style="width:258px;"><strong>课程属性：</strong> </td>
                            <td>
                                <asp:CheckBoxList ID="ChBoxAttr" runat="server"
                                    RepeatDirection="Horizontal" RepeatColumns="10" RepeatLayout="Flow">
                                    <asp:ListItem Value="1" Selected>推荐</asp:ListItem>
                                    <asp:ListItem Value="1">精彩</asp:ListItem>
                                    <asp:ListItem Value="1">头条</asp:ListItem>
                                    <asp:ListItem Value="1">幻灯</asp:ListItem>
                                    <asp:ListItem Value="1" Selected>手机同步</asp:ListItem>

                                </asp:CheckBoxList>
                            </td>
                        </tr>
                        <%if (Kesion.Cache.MyCache.GetCourseCommonConfig(37) == "1")
                          { %>
                        <tr>
                            <td align="right" class="lefttd" height="30" style="width:258px;"><strong>课程副分类：</strong></td>
                            <td class="righttd">
                                <asp:ListBox ID="MoreClassList" runat="server" Width="262px" SelectionMode="Multiple" Height="80px"></asp:ListBox>
                                <a class="textarea_min" href="javascript:zoomtextarea(-5,'<%=this.MoreClassList.ClientID %>');"></a>
                                <a class="textarea_max" href="javascript:zoomtextarea(5,'<%=this.MoreClassList.ClientID %>');"></a><span>可不选</span>
                            </td>
                        </tr>
                        <%} %>
                        <tr style="display: none">
                            <td align="right" class="lefttd" height="30"><strong>选择属性：</strong></td>
                            <td class="righttd">
                                <asp:DropDownList ID="SJtypeClass" runat="server">
                                    <asp:ListItem Value="0">--选择类型与版本--</asp:ListItem>
                                </asp:DropDownList>
                                <span class="msgtips"></span>
                            </td>
                        </tr>


                        <tr>
                            <td class="lefttd" align="right" style="width:258px;"><font color="red">*</font><strong>课程主教：</strong></td>
                            <td class="righttd">
                                <table>
                                    <tr>
                                        <td colspan="2">
                                            <asp:TextBox ID="searchtearch" runat="server" CssClass="textbox" placeholder="请输入教师关键字" Text=""></asp:TextBox>
                                            <asp:Button ID="searchbutton" runat="server" Text="搜索" OnClick="searchbutton_Click" CssClass="button" />
                                        </td>
                                    </tr>
                                    <tr><td colspan="2">&nbsp;</td></tr>
                                    <tr>
                                        <td width="380">
                                            <asp:ListBox ID="teacherlist" Width="262px" Height="80px" runat="server" SelectionMode="Multiple"></asp:ListBox>
                                            <span class="msgtips">
                                                <a class="textarea_min" href="javascript:zoomtextarea(-5,'<%=this.teacherlist.ClientID %>');"></a>
                                                <a class="textarea_max" href="javascript:zoomtextarea(5,'<%=this.teacherlist.ClientID %>');"></a>
                                            </span>
                                        </td>
                                        <td valign="top">
                                            <strong>助教：</strong>
                                            <asp:RadioButtonList ID="IsOtherTc" runat="server" RepeatDirection="Horizontal" onclick="OtherTc()" RepeatLayout="Flow">
                                                <asp:ListItem Value="0" Selected="True">无</asp:ListItem>
                                                <asp:ListItem Value="1">有</asp:ListItem>
                                            </asp:RadioButtonList>
                                            <div id="Tbody4" style="display: none" runat="server">
                                                <asp:TextBox ID="techertest" CssClass="textbox" runat="server"></asp:TextBox>
                                                如：王老师
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>


                        <tr>
                            <td align="right" class="lefttd" height="30" style="width:258px;">
                                <strong>关键字Tags：</strong></td>
                            <td class="righttd">
                                <asp:TextBox ID="TxtKeyTags" runat="server" CssClass="textbox" Width="300px" />
                                【<a href='javascript:;' onclick='GetKeyTags()' style='color: green'>根据课程名称自动获取Tags</a>】&nbsp;&nbsp;<font class='tips'>多个tags请用空格隔开</font>
                            </td>
                        </tr>

                        <tr>
                            <td align="right" class="lefttd" height="30" style="width:258px;">
                                <strong>是否有模拟试卷：</strong></td>
                            <td class="righttd">
                                <asp:RadioButtonList ID="RadioButtonList1" onclick="showwatermarkarea()" runat="server"
                                    RepeatDirection="Horizontal" Height="24px">
                                    <asp:ListItem Value="0" Selected="True">无</asp:ListItem>
                                    <asp:ListItem Value="1">指定试卷栏目</asp:ListItem>
                                    <asp:ListItem Value="2">指定试卷ID</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                        <tbody id="watermark0" runat="server" style="display: none">
                            <tr>
                                <td align="right" class="lefttd" style="width:258px;">
                                    <strong>试卷栏目：</strong></td>
                                <td class="righttd">
                                    <asp:ListBox ID="ListSjClass" runat="server" Width="150px" SelectionMode="Multiple" Height="150px"></asp:ListBox>
                                    <a class="textarea_min" href="javascript:zoomtextarea(-5,'<%=this.ListSjClass.ClientID %>');"></a>
                                    <a class="textarea_max" href="javascript:zoomtextarea(5,'<%=this.ListSjClass.ClientID %>');"></a>
                                </td>
                            </tr>
                        </tbody>
                        <tbody id="watermark2" style="display: none" runat="server">
                            <tr>
                                <td align="right" class="lefttd" height="30" style="width:258px;">
                                    <strong>试卷ID：</strong></td>
                                <td class="righttd" valign="top">&nbsp;
         
                                    <table border="0" width='100%'>
                                        <tr>
                                            <td style="width: 200px">搜索试卷：<asp:TextBox ID="TxtSJKey" runat="server" Width="150px" CssClass="textbox" />
                                                <input type="button" value="搜索" class="button" onclick="searchSJ();" />
                                                <br />
                        
                                                <asp:ListBox ID="LstB2" runat="server" Width="300px" Height="200px" SelectionMode="Multiple"></asp:ListBox>
                                            </td>
                                            <td style="width: 60px; text-align: center">
                                                <p>
                                                    <input type="button" value=" > " onclick="addUser()" class="button" />
                                                </p>
                                                <br />
                                                <p>
                                                    <input type="button" value=" < " onclick="delUser()" class="button" />
                                                </p>
                                            </td>
                                            <td>指定试卷如下：
                                         		<br />
                                                <asp:ListBox ID="LstB1" runat="server" Width="300px" Height="200px" SelectionMode="Multiple"></asp:ListBox>
                                            </td>
                        
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" class="lefttd" height="30" style="width:258px;"><strong>考试状态规定：</strong></td>
                                <td class="righttd">
                                    <asp:TextBox ID="regulations" CssClass="textbox" runat="server" Width="40px" Height="23px"></asp:TextBox>%
               						<font color="red">学习达到总课时的多少比例时才能考试，留空或0为不限制</font>
                                </td>
                            </tr>
                        </tbody>
                        <tr style="display: none">
                            <td align="right" class="lefttd" style="width:258px;">
                                <strong>试听课程：</strong></td>
                            <td class="righttd">
                                <asp:TextBox ID="listeningID" CssClass="textbox" runat="server" TextMode="MultiLine" Width="95%" Height="70px"></asp:TextBox>
                                <br />
                                <span class="tips">用脚本执行</span>
                                <input type="hidden" name="listeningID" value="1">
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="lefttd" height="30" style="width:258px;"><strong>课程目标：</strong></td>
                            <td class="righttd">
                                <asp:TextBox ID="TxtTarget" TextMode="MultiLine" Width="100%" Height="200px" runat="server"></asp:TextBox>
                                <% Kesion.APPCode.EditorAPI.EchoEditor("editor", this.TxtTarget.ClientID, "Basic");%>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="lefttd" height="30" style="width:258px;"><strong>课程公告：</strong></td>
                            <td class="righttd">
                                <asp:TextBox ID="TxtNotice" TextMode="MultiLine" Width="100%" Height="200px" runat="server"></asp:TextBox>
                                <% Kesion.APPCode.EditorAPI.EchoEditor("editor", this.TxtNotice.ClientID, "Basic");%>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="lefttd" height="30" style="width:258px;"><strong>课程介绍：</strong></td>
                            <td class="righttd">
                                <asp:TextBox ID="TxtIntro" TextMode="MultiLine" Width="100%" Height="300px" runat="server"></asp:TextBox>
                                <% Kesion.APPCode.EditorAPI.EchoEditor("editor", this.TxtIntro.ClientID, "Common");%>
                            </td>
                        </tr>

                        <tr>
                            <td align="right" class="lefttd" height="30" style="width:258px;">
                                <strong>课程人气：</strong></td>
                            <td class="righttd">
                                <asp:TextBox ID="lookcount" CssClass="textbox" runat="server" Text="100" Width="60px" style="text-align:center"></asp:TextBox>
                                <span class="tips">点击数作弊</span>
                            </td>
                        </tr>

                        <tr>
                            <td align="right" class="lefttd" height="30" style="width:258px;">
                                <strong>购买人数：</strong></td>
                            <td class="righttd">
                                <asp:TextBox ID="buycount" CssClass="textbox" runat="server" Text="100" Width="60px" style="text-align:center"></asp:TextBox>
                                <span class="tips">销售量、在学习人数作弊</span>
                            </td>
                        </tr>

                        <tr style="display: none">
                            <td align="right" class="lefttd" height="30" style="width:258px;">
                                <strong>材料交互次数：</strong></td>
                            <td class="righttd">
                                <asp:TextBox ID="TextBox3" CssClass="textbox" runat="server"></asp:TextBox>
                                (0为不限次数，由教师终结交互)
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="lefttd" height="30" style="width:258px;"><strong>课程省市：</strong></td>
                            <td class="righttd">
                                <script src="../../plus/area.aspx?pid=<%=Provinceid %>&cityid=<%=CityId %>&countyid=<%=CountyId %>"></script>
                                <span class="msgtips tips">选择课程所在的省份和城市,方便检索。</span>
                            </td>
                        </tr>

                    </table>
                </div>

                
            <div class="tab-page" id="tab10">
                <h2 class="tab">设置课时</h2>
                <script type="text/javascript">
                    tabPane1.addTabPage(document.getElementById("tab10"));
                 
                    function doPeriod(){
                        var checkrad1 = jQuery("#<%=this.RdbIsPeriod.ClientID %> :radio[checked]").val();
                        if(checkrad1=='0')
                        {
                            jQuery("#Tbody10").show();
                            $("#showTeachWay").hide();
                            //$("#showallowview").hide();
                        }
                        else 
                        {

                           // $("#showallowview").show();
                            $("#showTeachWay").show();
                            jQuery("#Tbody10").hide();
                            jQuery("#Tbody11").hide();    
                            jQuery("#Tbody12").hide();	
                            jQuery("#Tbody13").hide();  
                            jQuery("#threencscreen").hide();
                            jQuery("#UploadThreen").hide();
                            jQuery("#UploadThreen1").hide();
                            jQuery("#SetListening").hide();
                        }
                        isType();
                    }
                    function showCourseType(){
                        var checkrad1 = jQuery("#<%=this.RdbTeachWay.ClientID %> :radio[checked]").val();
                        if(checkrad1=='1')
                        {
                            $("#showTeachWayLiveServer").hide();
                        }
                        else 
                        {   $("#showTeachWayLiveServer").show();
                        }
                    }
                    $(document).ready(function(){
                        doPeriod();
                        changeoverdue();
                        showCourseType();
                    }); 
                      
                </script>
                <table cellpadding="0" cellspacing="0" class="CTable no-borderTable">
                    <tr>
                        <td align="right" class="lefttd" height="30" style="width: 258px"><strong>是否开启课时管理：</strong></td>
                        <td class="righttd">
                            <asp:RadioButtonList ID="RdbIsPeriod" onclick="doPeriod()" runat="server" RepeatDirection="Horizontal" Height="24px">
                                <asp:ListItem Value="0">关闭</asp:ListItem>
                                <asp:ListItem Value="1" Selected="True">开启</asp:ListItem>
                            </asp:RadioButtonList>
                            <span class="tips">TIPS:当一门课程有多个章节时，请启用课时管理，一旦设置，不允许修改。</span>
                        </td>
                    </tr>

                    <tbody id="showTeachWay" style="display: none">
                        <tr>
                            <td align="right" class="lefttd" height="30" style="width:258px;"><strong>课程类型：</strong></td>
                            <td class="righttd">
                                <asp:RadioButtonList ID="RdbTeachWay" onclick="showCourseType()" runat="server" RepeatDirection="Horizontal" Height="24px">
                                    <asp:ListItem Value="1" Selected="True">纯点播</asp:ListItem>
                                    <asp:ListItem Value="2">组合（点播、直播及面授）</asp:ListItem>
                                </asp:RadioButtonList>
                                <span class="tips">TIPS:课程类型一旦设置，不允许修改。</span>
                            </td>
                        </tr>

                        <tr id="showTeachWayLiveServer" style="display: none">
                            <td align="right" class="lefttd" height="30" style="width:258px;"><strong><span style="background-color: #f0f9fe">直播服务器选择</span>：</strong></td>
                            <td class="righttd">
                                <asp:DropDownList ID="LiveType" runat="server" onchange="getaccountlist(this.value)">
                                </asp:DropDownList>
                                <span id="showaccount" style="display: none"><select name="accountid" id="accountlist"></select></span>
                            </td>
                        </tr>
                    </tbody>
                    <script>
    
                        jQuery(document).ready(function () {

                            getaccountlist(0);
                            
                        });
                        function getaccountlist(cid) {
                       
                            livechecked0();
                            var id = jQuery("#<%=this.LiveType.ClientID%>").val();
                            var pid ='<%=pid%>';                    
                     
                            if (id != '0') {
                                jQuery.get("KS.LiveRoom.aspx", { a: "accountlist", id: id,pid:pid },
                                    function (data) {
                                        //  alert(data);
                                        if (data != null && data != '') {
                                            jQuery("#showaccount").show();
                                            jQuery("#accountlist").empty().append(data);
                                        } else {
                                            jQuery("#showaccount").hide();
                                            jQuery("#accountlist").empty().append("<option value='0'>请选择账号...</option>");
                                        }
                                    });
                            }else{
                                jQuery("#showaccount").hide();

                                jQuery("#accountlist").empty().append("<option value='0'>请选择账号...</option>");
                            }
                        }
                        function livechecked0(){
                          
                            var a = jQuery("#<%=this.LiveType.ClientID%>").val();
                               if (a == 0) {
                                   $("#othervideo").show();
                                   $("#zdylive").hide();
                                   jQuery("input[name=RadioLiveStatus]").attr("disabled",false);
                               } else if (a > 4) {
                                   $("#zdylive").show();
                                   $("#othervideo").hide();
                                   jQuery("input[name=RadioLiveStatus]").attr("disabled",false);
                               } else
                               {
                              
                                   jQuery("input[name=RadioLiveStatus]").attr("disabled",true);
                                   $("#zdylive").hide();
                                   $("#othervideo").hide();
                               }
                           }
                    </script>

                </table>
                <table id="Tbody10" style="table-layout: fixed; width: 100%; margin: 0 auto; display: none" cellpadding="0" cellspacing="0" class="CTable no-borderTable">
                    <asp:PlaceHolder ID="PeriodPlace" runat="server"></asp:PlaceHolder>
                </table>
            </div>
            <div class="tab-page" id="tab3">
                <h2 class="tab">价格</h2>
                <script type="text/javascript">
                    tabPane1.addTabPage(document.getElementById("tab3"));
                </script>
                <table style="width: 100%; margin: 0 auto;" cellpadding="2" cellspacing="1" class="CTable no-borderTable">
                    <tbody>
                        <tr>
                            <td align="right" class="lefttd" height="30" style="width:155px;">
                                <strong>收费设置：</strong></td>
                            <td class="righttd">
                                <div class="message">
                                    <table class="PriceCTable">
                                        <tr id="ShowIsFree" runat="server">
                                            <td align="right" class="lefttd" height="30" style="width: 180px">
                                                <strong>收费方式：</strong></td>
                                            <td class="righttd">
                                                <asp:RadioButtonList ID="RdbIsFree" runat="server" RepeatDirection="Horizontal" onclick="free()" Height="24px">
                                                    <asp:ListItem Value="0" Selected="True">全部免费</asp:ListItem>
                                                    <asp:ListItem Value="1">全部付费</asp:ListItem>
                                                </asp:RadioButtonList>
                                                 <span id="isbuyperiod" runat="server" style="display:none">
                                                    <asp:CheckBox ID="ChargePeriod" runat="server" Text="学员允许单独购买课时" />
                                                </span>
                                                <span class="tips">TIPS:收费方式一旦设置，不允许修改。</span>
                                            </td>
                                        </tr>
                                         <tbody id="Tbody8" runat="server">

                                            <tr>
                                                <td align="right" class="lefttd" height="30" style="width: 102px">
                                                    <strong>促销类型：</strong></td>
                                                <td class="righttd">
                                                    <asp:RadioButtonList ID="Promotion" runat="server" RepeatDirection="Horizontal" onclick="Promotion()" Height="24px">
                                                        <asp:ListItem Value="0" Selected="True">普通课程</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:RadioButtonList>
                                                    <span class="tips">促销属性，促销价格为最终价格</span>
                                                </td>
                                            </tr>
                                             <tbody id="Tbody2" runat="server">
                                            <tr>
                                                <td align="right" class="lefttd" height="30"><font color="red">*</font><strong>参考价格：</strong></td>
                                                <td class="righttd">
                                                    <asp:TextBox ID="Money" onfocus="zhekou();" Text="0" CssClass="textbox" runat="server" Width="75px" style="text-align:center"></asp:TextBox>元
                                                    
                                                </td>
                                            </tr>
                                           </tbody>
                                            <tbody id="Tbody5" style="display: none" runat="server">
                                                <tr>
                                                    <td align="right" class="lefttd" height="30"><font color="red">*</font><strong>抢购时间段：</strong></td>
                                                    <td class="righttd">
                                                        <script>isHour = 1;</script>

                                                        <asp:TextBox CssClass="textbox  Wdate" ID="begintime" runat="server" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'%y-%M-%d'});"></asp:TextBox>
                                                        至
                                                        <asp:TextBox CssClass="textbox  Wdate" ID="endtime" runat="server" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'%y-%M-%d'});"></asp:TextBox>

                                                    </td>
                                                </tr>
                                            </tbody>
                                            <tbody id="Tbody6" style="display: none" runat="server">
                                                <tr>
                                                    <td align="right" class="lefttd" height="30"><font color="red">*</font><strong>抢购价：</strong></td>
                                                    <td class="righttd">
                                                        <asp:TextBox ID="PanicMoney" CssClass="textbox" runat="server" Width="75px" style="text-align:center"></asp:TextBox>元       
                                                    </td>
                                                </tr>

                                                <tr>
                                                    <td align="right" class="lefttd" height="30"><strong>报名人数上限：</strong></td>
                                                    <td class="righttd">
                                                        <asp:TextBox ID="Limited" CssClass="textbox" runat="server" Width="75px" Text="100" style="text-align:center"></asp:TextBox>人（设置“0”为不限）      
                                                    </td>
                                                </tr>
                                            </tbody>

                                            <tbody id="Tbody7" style="display: none" runat="server">
                                                <tr>
                                                    <td align="right" class="lefttd" height="30"><font color="red">*</font><strong>兑换积分：</strong></td>
                                                    <td class="righttd">
                                                        <asp:TextBox CssClass="textbox" ID="jifen" runat="server" Width="75px" style="text-align:center"></asp:TextBox>分
                         								<span style="margin-left: 20px;"><asp:CheckBox ID="VIPCheck" runat="server" Text="是否VIP免费"  Checked="true"/></span>
                                                    </td>
                                                </tr>
                                            </tbody>
                                            <tbody id="Tbody9" style="display: none" runat="server">
                                                <tr>
                                                    <td align="right" class="lefttd" height="30"><font color="red">*</font><strong>混合购买：</strong></td>
                                                    <td class="righttd">积分<asp:TextBox CssClass="textbox" ID="Mixjifen" runat="server" Width="75px" style="text-align:center"></asp:TextBox>
                                                        <span class="tips">分</span>&nbsp;价格
						                          <asp:TextBox CssClass="textbox" ID="Mixprice" runat="server" Width="75px" style="text-align:center"></asp:TextBox>
                                                        <span class="tips">元</span>
                                                    </td>

                                                </tr>
                                            </tbody>

                                        </tbody>

                                        <tbody id="Tbody1" style="display: none" runat="server"></tbody>
                                        <tbody id="TbodyPrice" runat="server" style="display:none">
                                              <tr>
                                                <td align="right" class="lefttd" height="30"><font color="red">*</font><strong>课程价格：</strong></td>
                                                <td class="righttd">
                                                    
                                                    <asp:TextBox ID="Price_Member" onKeyUp="zhekou();" Text="0" onkeydown="zhekou();" CssClass="textbox" runat="server" Width="75px" style="text-align:center"></asp:TextBox>元
                                                   
                                                    <span style="margin-left: 20px;">
                                                       
                                                        <asp:CheckBox ID="IsContainTax" runat="server" />是否含税  </span>
                                                </td>
                                            </tr>
                                            <tr >
                                                <td align="right" class="lefttd" height="30"><strong>折扣：</strong></td>
                                                <td class="righttd">
                                                   <asp:TextBox ID="zhekou" Width="75px" CssClass="textbox" Text="0" runat="server" style="text-align:center"></asp:TextBox>折
                                                </td>
                                            </tr>
                                          
                                           
                                            </tbody>
                                        <tbody id="TbodyUser" runat="server" style="display:none">
                                            <tr>
                                                <td align="right" class="lefttd" height="30"><strong>指定用户组免费：</strong></td>
                                                <td class="righttd">
                                                    <asp:Label ID="Label1" runat="server"></asp:Label>
                                                </td>
                                            </tr>
                                             </tbody>  
                                              <tbody id="TbodyUserVIP" runat="server" style="display:none">
                                              <tr>
                                                <td align="right" class="lefttd" height="30"><strong>VIP用户：</strong></td>
                                                <td class="righttd">
                                                    <asp:RadioButtonList ID="ISLoad" runat="server" RepeatDirection="Horizontal" onclick="iszhekou()">
                                                        <asp:ListItem Value="0" Selected="True">免费</asp:ListItem>
                                                        <asp:ListItem Value="1">收费</asp:ListItem>
                                                        <asp:ListItem Value="2">固定价格</asp:ListItem>
                                                    </asp:RadioButtonList>

                                                    <span id="Iszhekou" runat="server" style="display: none">折扣：<asp:TextBox ID="Loadzhekou" Style="text-align: center; width:75px" CssClass="textbox" runat="server"></asp:TextBox>折（请输入0-10范围之内，例如 8.5 或者 6 ）</span>
                                                    <span id="IsFixedPrice" runat="server" style="display: none">固定价格：<asp:TextBox ID="FixedPrice" Style="text-align: center; width: 75px" CssClass="textbox" runat="server"></asp:TextBox>元</span>
                                                </td>
                                            </tr>  
                                             </tbody>  
                                         <tbody id="TbobyCashBack" runat="server"  style="display:none">
                                             <%if (Kesion.Cache.MyCache.GetCourseCommonConfig(34) == "1" || DataFactory.GetOnlyValue("select count(*) from KS_Enterprise where UserID in(select UserID from KS_Course where CourseID =" + CourseId + ")") == "0")
                                                 { %>
                                             <tr>
                                                 <td align="right" class="lefttd" height="30"><strong>返现：</strong></td>
                                                 <td class="righttd">
                                                  <asp:TextBox ID="TxtCashBack" CssClass="textbox" Text="0" runat="server" Width="75px" style="text-align:center"></asp:TextBox>元
								                   <%if (Kesion.Cache.MyCache.GetCourseCommonConfig(35) == "1")
                                                   { %>
                                                     <span style="margin-left: 20px;">返现：
                                                    <asp:TextBox ID="TxtDay" Text="0" CssClass="textbox" runat="server" Width="75px" style="text-align:center"></asp:TextBox>天有效
                                                     <span class="tips">（建议1-30天）,如果设置为0是不限制</span>
                                                     </span>
                                                     <%} %>
                                                 </td>
                                             </tr>
                                             <%} %>
                                         </tbody>
                                         <tbody id="TbobyUserScore" runat="server"  style="display:none">
                                        <tr>
                                            <td align="right" class="lefttd" height="30"><strong>赠送积分：</strong></td>
                                            <td class="righttd">
                                                <asp:TextBox CssClass="textbox" ID="TxtScore" runat="server" Width="75px" Text="0" style="text-align:center"></asp:TextBox>分 
                            					<span class="tips">成功购买本课程一门可以得到的积分。如这里设置1分,用户购买10件,则可以得10分。</span>
                                            </td>
                                        </tr>

                                        <tr>
                                            <td align="right" class="lefttd" height="30"><strong>推荐人赠送积分：</strong></td>
                                            <td class="righttd">
                                                <asp:TextBox CssClass="textbox" ID="RecScore" runat="server" Width="75px" Text="0" style="text-align:center"></asp:TextBox>分 
                            					<span class="tips">学员成功购买该课程后，学员的推荐人获得积分。</span>
                                            </td>
                                        </tr>
                                        </tbody>
                                        <tr>
                                            <td align="right" class="lefttd" height="30" style="width: 180px"><strong>收费试卷是否重复扣费：</strong></td>
                                            <td class="righttd">
                                                <asp:RadioButtonList ID="IsRechargeSj" runat="server" RepeatDirection="Horizontal"  Height="24px">
                                                    <asp:ListItem Value="0" Selected="True">否</asp:ListItem>
                                                    <asp:ListItem Value="1">是</asp:ListItem>
                                                </asp:RadioButtonList>
                                                <span class="tips">课程绑定的试卷，是否重复收费。</span>
                                            </td>
                                        </tr>
                                        <%if (Utils.StrToInt(epa.GetEpAgentConfig("EpAgentStatus")) == 1)
                                          { %>
                                        <tr style="display: none">
                                            <td align="right" class="lefttd" height="30"><font color="red">*</font><strong>分成比例：</strong></td>
                                            <td class="righttd">平台分配比例:<asp:TextBox ID="TxtPingTaiRate" CssClass="textbox" runat="server" Width="75px" Text="6" style="text-align:center"></asp:TextBox>%
                     <br />
                                                省级分配比例:<asp:TextBox ID="TxtProviceRate" CssClass="textbox" runat="server" Width="75px" Text="3" style="text-align:center"></asp:TextBox>%
                    <br />
                                                市级分配比例:<asp:TextBox ID="TxtCityRate" CssClass="textbox" runat="server" Width="75px" Text="2" style="text-align:center"></asp:TextBox>%
                      <span class="tips">(请输入0~100范围)，如果写0是不参与分成的</span>
                                            </td>
                                        </tr>
                                        <%} %>
                                    </table>
                                </div>
                            </td>
                    </tbody>

                    <tbody >

                        <tr>
                            <td align="right" class="lefttd" height="30" style="width:258px;">
                                <strong>播放权限设置：</strong></td>
                            <td class="righttd">
                                <div class="message">
                                    <table class="PriceCTable">
                                        <tbody id="showallowview">
                                            <tr>
                                                <td align="right" class="lefttd" height="30" style="width: 180px">
                                                    <strong>允许观看课时的用户组：</strong></td>
                                                <td class="righttd">
                                                    <asp:Label ID="Label2" runat="server"></asp:Label>
                                                    <span class="tips">tips：不限制用户组，请不要勾选 。</span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right" class="lefttd" height="30" style="width: 180px">
                                                    <strong>允许观看课时的部门：</strong></td>
                                                <td class="righttd">
                                                    <asp:ListBox ID="LstDepartID" SelectionMode="Multiple" runat="server" Width="250px" Height="140px"></asp:ListBox>
                                                    <br />
                                                    <span class="tips">tips：按Ctrl或Shift可以多选。<a href="javascript:;" onclick="jQuery('#<%=this.LstDepartID.ClientID %> option').attr('selected',false);">取消选中</a></span>
                                                </td>
                                            </tr>

                                        </tbody>
                                        <tbody id="showvalide">
                                            <tr>
                                                <td align="right" class="lefttd" height="30" style="width: 180px">
                                                    <strong>课程失效设置：</strong></td>
                                                <td class="righttd">
                                                    <asp:RadioButtonList ID="CosOverdue" runat="server" RepeatDirection="Horizontal" onclick="changeoverdue()" Height="24px">
                                                        <asp:ListItem Value="0" Selected="True">按天数失效</asp:ListItem>
                                                        <asp:ListItem Value="1">按指定日期失效</asp:ListItem>
                                                        <asp:ListItem Value="2">按小时失效</asp:ListItem>
                                                    </asp:RadioButtonList>
                                                    <span class="tips">TIPS:一旦设置不建议轻易修改，否则可能对已购的用户无效。</span>
                                                </td>
                                            </tr>
                                            <tr id="overdue1">
                                                <td align="right" class="lefttd" height="30"><strong>课程观看有效时限：</strong></td>
                                                <td class="righttd">
                                                    <asp:TextBox CssClass="textbox" ID="shixian" runat="server" Width="50px" Text="0"></asp:TextBox>天 （设置“0”为不限） 
                                                </td>
                                            </tr>
                                            <tr id="overdue2" style="display: none">
                                                <td align="right" class="lefttd" height="30"><strong>课程观看有效时限：</strong></td>
                                                <td class="righttd">
                                                    <asp:TextBox CssClass="textbox  Wdate" ID="LimitDate" runat="server" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'%y-%M-%d'});"></asp:TextBox>
                                                </td>
                                            </tr>
                                            <tr id="overdue3" style="display: none">
                                                <td align="right" class="lefttd" height="30"><strong>课程观看有效时限：</strong></td>
                                                <td class="righttd">
                                                    <asp:TextBox CssClass="textbox" ID="LimitHours" Width="50px" Text="0" runat="server"></asp:TextBox>小时 （设置“0”为不限） 
                                                </td>
                                            </tr>

                                        </tbody>
                                    </table>
                                </div>
                            </td>
                    </tbody>


                </table>
            </div>

                <div class="tab-page" id="tab4">
                    <h2 class="tab">其它选项</h2>
                    <script type="text/javascript">
                        tabPane1.addTabPage(document.getElementById("tab4"));
                        function ClickTemplate(){
                            var checkrad1 = jQuery("#<%=this.templateflag.ClientID %> :radio[checked]").val();
                            if(checkrad1=='1')
                            {
                                jQuery("#templatearea").show();
                            }
                            else 
                            {
                                jQuery("#templatearea").hide();
                            }
                        }
                        function ShowNoteSetting(){
                            var checkrad2 = jQuery("#<%=this.IsSendNote.ClientID %> :radio[checked]").val();
                        if(checkrad2=='1')
                        {
                            jQuery(".note").show();
                        }
                        else 
                        {
                            jQuery(".note").hide();
                        }
                        }

                        function ShowRefund()
                        {
                            var checkrad3 = jQuery("#<%=this.isrefund.ClientID %> :radio[checked]").val();
                            if(checkrad3=='1')
                            {
                                jQuery(".refundday").show();
                            }
                            else 
                            {
                                jQuery(".refundday").hide();
                            }
                        }
                    $(document).ready(function(){
                        ClickTemplate();
                        ShowNoteSetting();
                        //ShowRefund();
                    }); 
                    </script>
                    <table style="width: 100%; margin: 0 auto;" cellpadding="2" cellspacing="1" class="CTable no-borderTable">
                        <tr style="display:none">
                            <td align="right" class="lefttd" height="30" style="width:258px;"><strong>选择发布时间：</strong></td>
                            <td class="righttd">
                                <asp:DropDownList ID="DropDownList1" runat="server">
                                    <asp:ListItem Value="0">--发布年限--</asp:ListItem>

                                </asp:DropDownList>
                                <span class="msgtips"></span>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="lefttd" height="30" style="width:258px;">
                                <strong>相关链接：</strong></td>
                            <td class="righttd">
                                <asp:TextBox ID="faceadd" runat="server" CssClass="textbox" Width="300px" />
                                <font class="tips">[标签为{KS:Field:faceadd}]</font>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="lefttd" height="30" style="width:258px;">发布者：</td>
                            <td class="righttd">
                                <asp:TextBox ID="TxtPublisher" runat="server"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td align="right" class="lefttd" height="30" style="width:258px;">
                                <strong>更新时间：</strong></td>
                            <td class="righttd">
                                <asp:CheckBoxList ID="CBLaddtime" runat="server"
                                    RepeatDirection="Horizontal" RepeatColumns="6" RepeatLayout="Flow">
                                    <asp:ListItem Value="1">更新</asp:ListItem>
                                </asp:CheckBoxList>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="lefttd" height="30" style="width:258px;">
                                <strong>课程状态：</strong></td>
                            <td class="righttd" nowrap="nowrap">
                                <asp:RadioButtonList ID="RdbVerify" runat="server" Width="150px"
                                    RepeatDirection="Horizontal" Height="24px">
                                    <asp:ListItem Value="1" Selected="True">已审核</asp:ListItem>
                                    <asp:ListItem Value="0">未审核</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                        </tr>

                        <tr>
                            <td align="right" class="lefttd" height="30" style="width:258px;">
                                <strong>是否上架销售：</strong></td>
                            <td class="righttd">
                                <asp:RadioButtonList ID="RbIsOff" runat="server" Width="150px"
                                    RepeatDirection="Horizontal" Height="24px">
                                    <asp:ListItem Value="1" Selected="True">是</asp:ListItem>
                                    <asp:ListItem Value="0">否</asp:ListItem>
                                </asp:RadioButtonList>
                                <span class="tips">如果是前台才会显示。</span>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="lefttd" height="30" style="width:258px;">
                                <strong>是否邮寄资料：</strong></td>
                            <td class="righttd">
                                <asp:RadioButtonList ID="IsSendNote" runat="server" Width="150px"
                                    RepeatDirection="Horizontal" Height="24px" onclick="ShowNoteSetting()">
                                    <asp:ListItem Value="1" >是</asp:ListItem>
                                    <asp:ListItem Value="0" Selected="True">否</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                        <tr class="note">
                            <td align="right" class="lefttd" height="30" style="width:258px;">
                                <strong>资料价格：</strong></td>
                            <td class="righttd">
                                <asp:TextBox ID="NotePrice" CssClass="textbox" runat="server" Height="23px" Width="75px"></asp:TextBox>元    
                            <span class="tips">只保留两位小数</span>
                            </td>
                        </tr>
                        <tr class="note">
                            <td align="right" class="lefttd" height="30" style="width:258px;">
                                <strong>资料简介：</strong></td>
                            <td class="righttd">
                                <asp:TextBox ID="NoteContent" CssClass="textbox" TextMode="MultiLine" runat="server" Height="58px" Width="236px"></asp:TextBox>
                            </td>
                        </tr>
   

                        <tr>
                            <td align="right" class="lefttd" height="30" style="width:258px;">
                                <strong>是否开启评价：</strong></td>
                            <td class="righttd">
                                <asp:RadioButtonList ID="CommentFilter" runat="server" Width="150px"
                                    RepeatDirection="Horizontal" Height="24px">
                                    <asp:ListItem Value="1" Selected="True">是</asp:ListItem>
                                    <asp:ListItem Value="0">否</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                        <tr style="display:none">
                            <td align="right" class="lefttd" height="30" style="width:258px;">
                                <strong>是否允许退款：</strong></td>
                            <td class="righttd">
                                <asp:RadioButtonList ID="isrefund" runat="server" Width="150px"
                                    RepeatDirection="Horizontal" Height="24px" onclick="ShowRefund()">
                                    <asp:ListItem Value="1">是</asp:ListItem>
                                    <asp:ListItem Value="0" Selected="True">否</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                        <tr class="refundday" style="display:none">
                            <td align="right" class="lefttd" height="30" style="width:258px;">
                                <strong>付款后：</strong></td>
                            <td class="righttd">
                                <asp:TextBox ID="times" runat="server" Width="40px"></asp:TextBox>
                                天内可以退款</td>
                        </tr>


                        <tr>
                            <td align="right" class="lefttd" height="30" style="width:258px;">
                                <strong>课程标签：</strong></td>
                            <td class="righttd">
                                <asp:ListBox ID="ListTags" SelectionMode="Multiple" runat="server" Width="250px" Height="140px"></asp:ListBox>
                                <br />
                                <span class="tips">tips：按Ctrl或Shift可以多选。<a href="javascript:;" onclick="jQuery('#<%=this.ListTags.ClientID %> option').attr('selected',false);">取消选中</a></span>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="lefttd">
                                <strong>绑定模板：</strong></td>
                            <td class="righttd">
                                <asp:RadioButtonList ID="templateflag" runat="server" RepeatDirection="Horizontal" onclick="ClickTemplate()">
                                    <asp:ListItem Value="2" Selected>继承模板设定</asp:ListItem>
                                    <asp:ListItem Value="1">自定义</asp:ListItem>
                                </asp:RadioButtonList>


                                <div id="templatearea" style="display: none">
                                    WEB模板：<asp:TextBox CssClass="textbox" Width="300px" ID="TemplateFile" runat="server"></asp:TextBox>
                                    <input class="button" onclick="SelectTemplate('<%=this.TemplateFile.ClientID %>    ',0);"
                                        onmouseout="this.className='button';" onmouseover="this.className='button_on';"
                                        type="button" value="选择模板..." />
                                    <br />
                                    <div<%=MyCache.GetCacheConfig(72)=="0"?" style='display:none'":"" %>>3G 模板：<asp:TextBox CssClass="textbox" Width="300px" ID="Template3GFile" runat="server"></asp:TextBox>
                <input class="button" onclick="SelectTemplate('<%=this.Template3GFile.ClientID %>    ',1);" onmouseout="this.className='button';" onmouseover="this.className='button_on';" type="button" value="选择模板..." />
                                </div>
                </div>
                </td>
            </tr>

               </table>
            </div>


            <div class="tab-page" id="tab1">
                <h2 class="tab">SEO选项</h2>
                <script type="text/javascript">
                    tabPane1.addTabPage(document.getElementById("tab1"));
                </script>

                <table style="width: 100%; margin: 0 auto;" cellpadding="2" cellspacing="1" class="CTable no-borderTable">
                    <tr>
                        <td class="lefttd" align="right" style="width:258px;"><strong>页面标题:</strong>

                        </td>
                        <td class="righttd">
                            <asp:TextBox ID="TxtSeoTitle" runat="server" CssClass="textbox textarea" Style="width: 450px;" />
                            <a class="textarea_max" href="javascript:zoomtextarea(5,'<%=this.TxtSeoTitle.ClientID %>');"></a>
                            <a class="textarea_min" href="javascript:zoomtextarea(-5,'<%=this.TxtSeoTitle.ClientID %>');"></a>
                            <span class='tips'>留空则默认显示课程名称,模板里请用标签{KS:Field:SEOTitle}调用。</span>
                        </td>
                    </tr>
                    <tr>
                        <td class="lefttd" align="right" style="width:258px;"><strong>页面关键字:</strong>(meta_keywords)</td>
                        <td class="righttd">
                            <asp:TextBox TextMode="MultiLine" Rows="5" ID="TxtSeoKeyWords" runat="server" CssClass="textbox textarea" Height="100px" Width="450px" />
                            <a class="textarea_max" href="javascript:zoomtextarea(5,'<%=this.TxtSeoKeyWords.ClientID %>');"></a>
                            <a class="textarea_min" href="javascript:zoomtextarea(-5,'<%=this.TxtSeoKeyWords.ClientID %>');"></a>
                            <span class='tips'>留空则默认显示课程里设置的KeyWords,模板里请用标签{KS:Field:SEOKeyWords}调用。</span>
                        </td>
                    </tr>
                    <tr>
                        <td class="lefttd" align="right" style="width:258px;"><strong>页面描述:</strong>(meta_description)</td>
                        <td class="righttd">
                            <asp:TextBox TextMode="MultiLine" Rows="5" ID="TxtSeoDescription" runat="server" Height="100px" Width="450px" CssClass="textbox" />
                            <a class="textarea_max" href="javascript:zoomtextarea(5,'<%=this.TxtSeoDescription.ClientID %>');"></a>
                            <a class="textarea_min" href="javascript:zoomtextarea(-5,'<%=this.TxtSeoDescription.ClientID %>');"></a>
                            <span class='tips'>留空则默认显示课程简介,模板里请用标签{KS:Field:SEODescription}调用。</span>
                        </td>
                    </tr>
                </table>
            </div>

            <%if (DataFactory.Exists("KS_CosField", "FieldModeType=0 and IsDisabled=1"))
              { %>
            <div class="tab-page" id="tab5">
                <h2 class="tab">自定义选项</h2>
                <script type="text/javascript">
                    tabPane1.addTabPage( document.getElementById( "tab5" ) );
                </script>
                <table style="width: 100%; margin: 0 auto;" cellpadding="2" cellspacing="1" class="CTable">

                    <asp:Label ID="Label3" runat="server" Text="Label"></asp:Label>

                </table>
            </div>
            <%} %>
        </div>
        <input type="hidden" name="costype" value="<%=CosType%>" />
        <div style="clear: both; text-align: center">
            <br />
            <KS:Foot ID="Foot1" runat="server" OnSubmit="Foot1_Submit" />
        </div>
    </asp:Panel>
    <script>
        function GetKeyTags() {
            var text = escape(jQuery('#<%=this.TxtName.ClientID %>').val());
            if (text != '') {
                jQuery('#<%=this.TxtKeyTags.ClientID %>').val('请稍等,系统正在自动获取tags...').attr("disabled", true);
                jQuery.get("../../plus/ajaxs.ashx", { a: "GetTags", text: text },
              function (data) { jQuery('#<%=this.TxtKeyTags.ClientID %>').val(unescape(data)).attr("disabled", false); });
                } else { KesionJS.Alert('对不起,请先输入课程名称!', "jQuery('#<%=this.TxtName.ClientID %>').focus();"); }
        }
    </script>
    </div> 
</asp:Content>
