<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="True" Inherits="Kesion.NET.WebSite.Course.Admin_Course_KS_CsLiveList" Codebehind="KS.CosLiveList.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>
        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 ContentSetAttribute() {
            var sid = GetMyIds();
            if (sid != null) parent.openWin("批量设置直播课程属性", "<%=KSCMS.GetInstallDir()+MyCache.GetCacheConfig(4)%>/Course/KS.CosBatch.aspx?costype=5&ContentID=" + sid + "&costype=2", true,880,600);
        }

        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 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;
            }
        }
	//价格相关脚本
        $(document).ready(function () {
            free();
            iszhekou();
            
        })
    
        function free() {
            var checkrad = jQuery("#<%=this.RdbIsFree.ClientID %> :radio[checked]").val();
            if (checkrad == "0") {
                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.TbobyCashBack.ClientID %>").css("display", "none");
                jQuery("#<%=this.TbodyUserVIP.ClientID %>").css("display", "none"); 
               jQuery("#<%=this.TbobyUserScore.ClientID %>").css("display", ""); 
              jQuery("#<%=this.isbuyperiod.ClientID %>").css("display", "none");
               
            } 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 Promotion() {
            var checkrad = jQuery("#<%=this.Promotion.ClientID %> :radio[checked]").val();
            if (checkrad == "1") {
                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", ""); 
                jQuery("#<%=this.isbuyperiod.ClientID %>").css("display", "none");
            } else if (checkrad == "2") {
                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", ""); 
                jQuery("#<%=this.isbuyperiod.ClientID %>").css("display", "none");
            } else if (checkrad == "3") {
                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"); 
                jQuery("#<%=this.isbuyperiod.ClientID %>").css("display", "none");

            } else if (checkrad == "4") {
                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", ""); 
                jQuery("#<%=this.isbuyperiod.ClientID %>").css("display", "none");
            }
            else {
                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", ""); 
                jQuery("#<%=this.isbuyperiod.ClientID %>").css("display", "");
            }
        }
        function CheckIsShowAllowView() {
            var checkrad = jQuery("#<%=this.RdbIsFree.ClientID %> :radio[checked]").val();
    	    if (checkrad == "0") {
                $("#showvalide").hide();
                $("#showallowview").show();
                
            } else {
                $("#showallowview").hide();
                $("#showvalide").show();
              
            }

      }
        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 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 showLiveServer() {
            var courseType = jQuery("#<%=this.RdbCourseType.ClientID %> :radio[checked]").val();
            if (courseType == "0") {
                $("#showLiveServer").show();
            } else {
                $("#showLiveServer").hide();
            }
        }
        $(function () {
            //控制是否显示第三方直播服务器
            showLiveServer();
			//全选反选
			$("#selectAll").click(function(){
				if($(this).is(":checked")){
					$(".courseList").find("input[type=checkbox]").attr("checked",true);
				}
				else{
					$(".courseList").find("input[type=checkbox]").attr("checked",false);
				};
			});
				
		});
	</script>
	<asp:Panel ID="ListPanel" runat="server" Width="100%">
		<div class="listedit">
			<%if(Style==0){ %>
                <div class="floatLeft allCheck">
                    <label><input name="" type="checkbox" value="" id="selectAll" />全选</label>
                </div>
            <%} %>
			<ul class="fl">
				<asp:LinkButton ID="delclassbutton" runat="server" OnClientClick="return(GetIDS('del'));" OnClick="delclassbutton_Click" CssClass="button">删除</asp:LinkButton>
				<asp:LinkButton ID="LinkButton8" runat="server" OnClick="LinkButton8_Click" OnClientClick="return(GetIDS());" 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>
		<style>
			.categorynav {
				line-height: 25px;
				width: 97%;
				margin: 0 auto;
				margin-bottom: 10px;
				border: 1px solid #DEEFFA;
				background-color: #F7FBFE;
				padding: 5px 0px 5px 10px;
				height: 100%;
				overflow: hidden;
			}

			ul, li {
				padding: 0px;
				margin: 0px;
			}

			.categorynav li {
				width: 160px;
				float: left;
            }
            #uploader{
                position: relative;
                top: 8px
            }
		</style>
		
		<div class="content-area mt20 pageBlank">
			<div class="tabs_header longTabs">
				<ul class="tabs">
					<li><a href="KS.CosList.Aspx"><span>点播课程</span></a></li>
					<li class='active'><a href="KS.CosLiveList.aspx"><span>直播课程</span></a></li>
					<li><a href="KS.CosFaceList.Aspx"><span>面授课程</span></a></li>
				</ul>
				
				<div class="fr headOperation longHeadOperat <%=Style==1?"noPictures":"" %>" >
					<ul>
                        <li id='p18'><a href="KS.CosImport.aspx?costype=5" class="button">导入课程信息</a></li>
                        <li id='p2'><asp:LinkButton ID="updatebutton" runat="server" OnClick="updatebutton_Click" class="button">一键更新课程信息</asp:LinkButton></li>
					</ul>
				</div>
			</div>
			<div class="quickSearch clearfix">
                <div class="longquickSearch">
                    <div class="quickSelect">
                        <asp:DropDownList ID="DrpClassID" runat="server" onchange="location.href='?classid='+this.value;" style="width:100px;">
                            <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 class="link-color" onclick="SetDate()">日期范围？</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="Button2" 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("showType")==""?" class='active'":string.Empty %>><a href="KS.CosLiveList.aspx?Type=<%=cosType %>"><span>所有</span></a></li>
                                <li <%=KSCMS.S("showType")=="1"?" class='active'":string.Empty %>><a href="KS.CosLiveList.aspx?showType=1&Type=<%=cosType %>"><span>未审核</span></a></li>
                                <li <%=KSCMS.S("showType")=="2"?" class='active'":string.Empty %>><a href="KS.CosLiveList.aspx?showType=2&Type=<%=cosType %>"><span>已审核</span></a></li>
                            </ul>
                            <ul class="clearfix">
                                <span class="screen fl">直播状态：</span>
                                <li <%=KSCMS.S("showType")=="3"?" class='active'":string.Empty %>><a href="KS.CosLiveList.aspx?showType=3&Type=<%=cosType %>"><span>直播中</span></a></li>
                            </ul>
                              <ul class="clearfix">
                                <span class="screen fl">收费状态：</span>
                                 <li <%=KSCMS.S("showType")==""?" class='active'":string.Empty %>><a href="KS.CosLiveList.aspx?Type=<%=cosType %>"><span>所有</span></a></li>
                                <li <%=KSCMS.S("showType")=="4"?" class='active'":string.Empty %>><a href="KS.CosLiveList.aspx?showType=4&Type=<%=cosType %>"><span>免费</span></a></li>
                                <li <%=KSCMS.S("showType")=="5"?" class='active'":string.Empty %>><a href="KS.CosLiveList.aspx?showType=5&Type=<%=cosType %>"><span>付费</span></a></li>
                            </ul>
                            <ul class="clearfix">
                                <span class="screen fl">促销类型：</span>
                                 <li <%=KSCMS.S("Type")==""?" class='active'":string.Empty %>><a href="KS.CosLiveList.aspx?showType=<%=showType %>"><span>所有</span></a></li>
                                <li <%=KSCMS.S("Type")=="1"?" class='active'":string.Empty %>><a href="KS.CosLiveList.aspx?Type=1&showType=<%=showType %>"><span>限时抢购</span></a></li>
                                <li <%=KSCMS.S("Type")=="2"?" class='active'":string.Empty %>><a href="KS.CosLiveList.aspx?Type=2&showType=<%=showType %>"><span>团购</span></a></li>
                                <li <%=KSCMS.S("Type")=="3"?" class='active'":string.Empty %>><a href="KS.CosLiveList.aspx?Type=3&showType=<%=showType %>"><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.CosLiveList.aspx?flag=1&Type=1&showType=<%=showType %>"><span>未到过期</span></a></li>
                                <li <%=KSCMS.S("flag") == "2" ? " class='active'" : string.Empty %>><a href="KS.CosLiveList.aspx?flag=2&Type=1&showType=<%=showType %>"><span>已过期</span></a></li>
                            </ul>
                            <%} %>
                        </div>
                    </div>
                </div>
                <div class="fr liwrap longliwrap">
                   	<li id='p1'><a href="KS.CosLiveList.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">
							<HeaderTemplate>
							</HeaderTemplate>
							<ItemTemplate>
								<li>
									<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()))%> <%#Eval("livestate").ToString()=="1"?"直播中":Eval("livestate").ToString()=="2"?"已结束":"未开始" %></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&id=<%#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 class="noticeBox">
                                                    <span class="button" onclick="upliveRoom(<%#Eval("courseid") %>,<%#Eval("liveType") %>,<%#Eval("accountID") %>)" id="liveC<%#Eval("courseid") %>">开始直播</span>
                                                    <span class="button" onclick="notice(<%#Eval("courseid") %>)">通知学员</span>
                                                </span>
                                                <a href="?action=modify&p=<%=MyPage.CurrPage %>&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("liveview", Utils.StrToInt(Eval("courseid").ToString())) %>" title="前台页" target="_blank">预览</a>
                                                        <a href="KS.CosPJ.aspx?CosType=3&CourseId=<%#Eval("courseid") %>&teacherid=<%#Eval("tcid") %>">评价<i>(</i><%#Eval("pjnum") %><i>)</i></a>
                                                        <a href="KS.CosLearnRecord.aspx?CosType=3&courseid=<%#Eval("courseid").ToString() %>&teacherid=<%#Eval("tcid") %>">学员<i>(</i><%#Eval("studentnum") %><i>)</i></a>
                                                        <a href="?action=del&Ids=<%#Eval("courseid") %>" onclick="return(confirm('此操作不可逆，确定删除操作吗?'))">删除</a>
                                                        
                                                    </div>
                                                </div>
											</div>
											<div class="title clearfix">
                                            	<a href="<%#BaseFun.GetRewriteUrl("liveview", 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='bg3'>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<%#Eval("zhekou") %>"><%#Eval("zhekou") %>折</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>有效期：<%#Utils.StrToInt(Eval("shixian").ToString())==0?"无限期":Utils.StrToInt(Eval("shixian").ToString())+"天"%></span><span>评分：<%#Eval("coursepf")%></span>
                                            </div>
                                            
                                            <div class="clear"></div>
                                            
                                            <div class="buttonBox">
                                                <%#Course.GetIsPeriod(Utils.StrToInt(Eval("courseid").ToString()))==1?"<a href=\"KS.CosLivePeriod.Aspx?CourseId="+Eval("courseid")+"&teacherid="+Eval("TCID")+"\" class=\"greenFont btn\"><em>"+Eval("CountPid")+"&nbsp;个</em><span>课时</span>&nbsp;>></a>  ":"" %>
                                                <%#Course.GetIsPeriod(Utils.StrToInt(Eval("courseid").ToString()))==0?YunliveType(Utils.StrToInt(Eval("Courseid").ToString())):""%>
                                                <a href="KS.CsZLInfo.aspx?type=5&CourseId=<%#Eval("courseid") %>&teacherid=<%#Eval("TCID") %>" class="greenFont btn">
                                                    <em><%#Eval("zlnum") %>&nbsp;份</em><span>资料</span>&nbsp;>>
                                                </a>
                                                <a href="KS.CsTeacher.aspx?CosType=3&teacherid=<%#Eval("TCID") %>&CourseId=<%#Eval("courseid") %>" class="greenFont btn">
                                                    <em><%#Eval("teachernum").ToString() %>&nbsp;个</em><span>名师</span>&nbsp;>>
                                                </a>
                                                <a href="KS.CosChat.aspx?costype=5&CourseId=<%#Eval("courseid") %>" class="greenFont btn">
                                                	<em><%#Eval("chatnum") %>&nbsp;个</em><span>留言</span>&nbsp;>>
                                                </a>
                                                <a href="KS.CosProp.aspx?CourseId=<%#Eval("courseid") %>&a=live" class="greenFont btn">
                                                	<em><%#Eval("propnum") %>&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 notice(courseid) {
                        parent.openWin('开播通知', '/plus/course/LiveNotice.aspx?CourseId=' + courseid + "&istop=1&teachway=5", false, 950, 480);
                    }

                    function upliveRoom(courseid, liveType, accountid) {
                        if (liveType == 1) {
                            jQuery.get("KS.CosLiveList.aspx", { a: "upliveroom", accountid: accountid, liveType: liveType },
                                function (data) {
                                    parent.openWin('直播管理', '/plus/course/openliveroom.aspx?CourseId=' + courseid + "&liveType=" + liveType + "&accountid=" + accountid + "&istop=1", false, 880, 520);
                                });
                        } else if (liveType == 0 || liveType > 6) {
                            alert("您选择其他服务器系统不能自动分配");
                        } else {
                            parent.openWin('直播管理', '/plus/course/openliveroom.aspx?CourseId=' + courseid + "&liveType=" + liveType + "&accountid=" + accountid + "&istop=1", false, 880, 520);
                        }
                    }

                    $(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%">
		<style>
        #upframe {height: 34px !important;vertical-align: middle;}
        </style>
        <div class="content-area mt20">
			<div class="tab-page" id="CsLiveListPanel">
				<script type="text/javascript">
                    var tabPane1 = new WebFXTabPane(document.getElementById("CsLiveListPanel"), 1)
				</script>

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

					<table width="100%" align="center" border="0" cellpadding="1" cellspacing="1" class="CTable no-borderTable">
                        <tr>
							<td align="right" class="lefttd" height="30"><font color="red">*</font><strong>开课类型：</strong></td>
							<td class="righttd">
                                <table border="0" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td>
                                            <asp:Label ID="LabTypeModify" runat="server"></asp:Label>
                                            <asp:Label ID="LabTypeAdd" runat="server">
                                          <asp:RadioButtonList ID="RdbCourseType" runat="server" RepeatLayout="Flow">
                                            <asp:ListItem Value="0" Selected="True">默认直播(可选择第三方的直播系统）</asp:ListItem>
                                            <asp:ListItem Value="1">课堂街（1对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="msgtips">温馨提示：选择课堂街直播服务，请先对接<a href="../YUN/KS.YunKeTangJieApi.Aspx">开通</a>。</span>
                                        </asp:Label>
                                        </td>
                                    </tr>
                                </table>
								
								
							</td>
						</tr>
						<tr>
							<td align="right" class="lefttd" height="30"><font color="red">*</font><strong>课程名称：</strong></td>
							<td class="righttd">
								<asp:TextBox ID="TxtCourseName" CssClass="textbox" runat="server" Width="400px"></asp:TextBox>
								简短标题：
								<asp:TextBox ID="TxtShortName" CssClass="textbox" runat="server" Style="width: 250px" MaxLength="100"></asp:TextBox>
								<span class="msgtips">该字段的字数是100，该字段如果为空的话，就去截取”课程名称“的字数</span>
							</td>
						</tr>
						<tr>
							<td align="right" class="lefttd">
								<strong>课程图片：</strong></td>
							<td class="righttd">
								<table border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td width="450px">
											<input id="DefaultPic" name="DefaultPic" class="textbox" type="text" value="<%=DefaultPic%>">
											<input type="button" class="button" onclick="SelectFiles('DefaultPic',0);" value="选择图片" />
										</td>
										<td style="width: 280px;">
											<%=Kesion.APPCode.UploadAPI.EchoUpload("coursePic","DefaultPic") %>
										</td>
									</tr>
								</table>
							</td>
						</tr>
						<tr>
							<td class="lefttd" height="30" align="right" style="width: 40px"><font color="red">*</font><strong>课程类型：</strong></td>
							<td class="righttd">
								<asp:DropDownList ID="DrpClassID1" runat="server" Width="262px">
									<asp:ListItem Value="0">--选择课程分类--</asp:ListItem>
								</asp:DropDownList>

							</td>
						</tr>
						

                        <tr style="display:none;">
                            <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>
							<td class="lefttd" align="right" style="width: 102px"><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 class="lefttd" height="10" align="right" colspan="2"> </td>
                                    </tr>
									<tr>
										<td width="380">
											<asp:ListBox ID="teacherlist" Width="262px" Height="80px" runat="server" SelectionMode="Multiple"></asp:ListBox>
											<a class="textarea_min" href="javascript:zoomtextarea(-5,'<%=this.teacherlist.ClientID %>');"></a>
											<a class="textarea_max" href="javascript:zoomtextarea(5,'<%=this.teacherlist.ClientID %>');"></a>
										</td>
										<td valign="top">
											<strong>助教：</strong>
											<br />
											<asp:RadioButtonList ID="IsOtherTc" runat="server" RepeatDirection="Horizontal" onclick="OtherTc()">
												<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: 102px">
								<font color="red">*</font><strong>报名上限人数：</strong></td>
							<td class="righttd">
								<asp:TextBox ID="buylimit" CssClass="textbox" runat="server" Height="23px" Width="60px" Text="50" Style="text-align: center"></asp:TextBox>人
                                <span class="tips">（设置“0”为不限）</span>
							</td>
						</tr>
						<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="TxtBmBegintime" runat="server" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'%y-%M-%d'});"></asp:TextBox>
								至
                                <asp:TextBox CssClass="textbox  Wdate" ID="TxtBmEndtime" runat="server" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',minDate:'%y-%M-%d'});"></asp:TextBox>
							</td>
						</tr>


						<tr>
							<td align="right" class="lefttd" height="30" style="width: 102px">
								<strong>课程属性：</strong></td>
							<td class="righttd">
								<asp:CheckBoxList ID="ChBoxAttr" runat="server"
									RepeatDirection="Horizontal" RepeatColumns="5" 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:ListItem Value="1" Selected>允许发表考后心得</asp:ListItem>
                     <asp:ListItem Value="1" >试用</asp:ListItem>--%>
								</asp:CheckBoxList>
							</td>
						</tr>


						<tr>
							<td align="right" class="lefttd" height="30"><strong>课程目标：</strong></td>
							<td class="righttd">
								<asp:TextBox ID="TxtTarget" TextMode="MultiLine" Height="200px" runat="server" Width="100%"></asp:TextBox></td>
							<% Kesion.APPCode.EditorAPI.EchoEditor("editor", this.TxtTarget.ClientID, "Basic");%>
						</tr>
						<tr>
							<td align="right" class="lefttd" height="30"><strong>课程公告：</strong></td>
							<td class="righttd">
								<asp:TextBox ID="TxtNotice" TextMode="MultiLine" Height="200px" runat="server" Width="100%"></asp:TextBox></td>
							<% Kesion.APPCode.EditorAPI.EchoEditor("editor", this.TxtNotice.ClientID, "Basic");%>
						</tr>

						<tr>
							<td align="right" class="lefttd" height="30"><strong>课程介绍：</strong></td>
							<td class="righttd">
								<asp:TextBox ID="TxtIntro" TextMode="MultiLine" Width="100%" Height="200px" runat="server"></asp:TextBox>
								<% Kesion.APPCode.EditorAPI.EchoEditor("editor", this.TxtIntro.ClientID, "Basic");%>
							</td>
						</tr>


						<tr>
							<td align="right" class="lefttd" height="30" style="width: 102px">
								<strong>课程人气：</strong></td>
							<td class="righttd">
								<asp:TextBox ID="lookcount" CssClass="textbox" runat="server" Height="23px" Width="60px" Text="100" style="text-align:center"></asp:TextBox>
                                  <span class="tips">点击数作弊</span>
							</td>
						</tr>
						<tr>
							<td align="right" class="lefttd" height="30" style="width: 102px">
								<strong>课程报名人数：</strong></td>
							<td class="righttd">
								<asp:TextBox ID="buycount" CssClass="textbox" runat="server" Height="23px" Width="60px" Text="100" style="text-align:center"></asp:TextBox>
                                 <span class="tips">销售量、在学习人数作弊</span>
							</td>
						</tr>

						<tr>
							<td align="right" class="lefttd" height="30"><strong>课程省市：</strong></td>
							<td class="righttd">
								<script src="../../plus/area.aspx?pid=<%=Provinceid %>&cityid=<%=CityId %>&countyid=<%=CountyId %>"></script>
								<span class="msgtips">选择课程所在的省份和城市,方便检索。</span>
							</td>
						</tr>


					</table>
				</div>


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

                        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 && a != 6) {
                                $("#zdylive").show();
                                $("#othervideo").hide();
                                //jQuery("input[name=RadioLiveStatus]").attr("disabled",false);
                            } else
                            {
                              
                                //jQuery("input[name=RadioLiveStatus]").attr("disabled",true);
                                $("#zdylive").hide();
                                $("#othervideo").hide();
                            }
                        }

                        
               
  
                $(document).ready(function(){
              
               doPeriod();
	         
                });  
				</script>

				<table width="100%" align="center" border="0" cellpadding="1" cellspacing="1" class="CTable no-borderTable">
					<tr id="showLiveServer">
						<td align="right" class="lefttd" height="30">
							<strong>服务器选择：</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>

					<tr>
						<td align="right" class="lefttd" height="30">
							<strong>是否开启课时管理：</strong></td>
						<td class="righttd">
							<asp:RadioButtonList ID="RadioButtonList4" runat="server"
								RepeatDirection="Horizontal" Height="24px" onclick="doPeriod()">
								<asp:ListItem Value="0" >关闭</asp:ListItem>
								<asp:ListItem Value="1" Selected="True">开启</asp:ListItem>
							</asp:RadioButtonList>
                              <span class="tips">TIPS:当一门课程有多个章节时，请启用课时管理，一旦设置，不允许修改。</span>
						</td>
					</tr>
				</table>
				<table id="Tbody10" style="display: none" width="100%" align="center" border="0" cellpadding="1" cellspacing="1" class="CTable no-borderTable">

					<asp:PlaceHolder ID="PeriodPlace" runat="server"></asp:PlaceHolder>
				</table>
				<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) {

                                             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>");
                                 }
                             }
                </script>
			</div>

			<div class="tab-page" id="tab2">
				<h2 class="tab">价格</h2>
				<script type="text/javascript">
                        tabPane1.addTabPage(document.getElementById("tab2"));
				</script>

				<table style="width: 100%; margin: 0 auto;" cellpadding="2" cellspacing="1" class="CTable PriceCTable">
					  <tbody>  

				   <tr>
                        <td align="right" class="lefttd" height="30" style="width: 180px">
                            <strong>收费设置：</strong></td>
                        <td class="righttd">
                            <div class="message">
                     <table>
                        <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="50px"></asp:TextBox>
									<span class="tips">积分</span>
									<asp:TextBox CssClass="textbox" ID="Mixprice" runat="server" Width="50px"></asp:TextBox>
									<span class="tips">金额</span>
								</td>

							</tr>
						</tbody>

					</tbody>
					<tbody id="Tbody1" style="display: none" runat="server"></tbody>

					
                         <tbody id="TbodyPrice"  style="display:none" runat="server">
                              <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>
                         
                       
                        <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>
                        </tbody>
                      <tbody id="TbodyUser" style="display:none" runat="server">
                        <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>

                                
                                 <span><font color="red">"收费"为年费用户购买付折扣费用,"免费"为对年费用户为免费课程，"固定价格"为年费用户购买的价格</font></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 =" + Id + ")") == "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>  
					<%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>
					<%} %>

                

					
                    <tr >
                        <td align="right" class="lefttd" height="30"><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>
					</table>
					</div>
					</tbody>
                    <tbody >

                        <tr>
                            <td align="right" class="lefttd" height="30" style="width: 102px">
                                <strong>播放权限设置：</strong></td>
                            <td class="righttd">
                                <div class="message">
                                    <table>
                                           <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:TextBox CssClass="textbox" ID="shixian" runat="server" Width="75px" Text="0" style="text-align:center"></asp:TextBox>天 （设置“0”为不限） 
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </td>
                    </tbody>
					


				</table>
			</div>

                <div class="tab-page" id="tab1">
					<h2 class="tab">其它选项</h2>
					<script type="text/javascript">
                        tabPane1.addTabPage(document.getElementById("tab1"), 1);
                        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();
                            }
                        }
                        $(document).ready(function(){
                       
                            ClickTemplate();
                            ShowNoteSetting();
 
                        }); 
					</script>

					<table width="100%" align="center" border="0" cellpadding="1" cellspacing="1" class="CTable no-borderTable">
                        
                      <tr>
                          <td align="right" class="lefttd" height="30" style="width: 102px">发布者：</td>
                          <td class="righttd">
                              <asp:TextBox ID="TxtPublisher" runat="server"></asp:TextBox></td>
                      </tr>
						<tr>
							<td align="right" class="lefttd" height="30" style="width: 102px">
								<strong>课程状态：</strong></td>
							<td class="righttd">
								<asp:RadioButtonList ID="RdbVerify" runat="server" 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: 102px">
								<strong>是否发布课程：</strong></td>
							<td class="righttd">
								<asp:RadioButtonList ID="RbIsOff" runat="server" 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: 102px">
                            <strong>是否邮寄资料：</strong></td>
                        <td class="righttd">
                            <asp:RadioButtonList ID="IsSendNote" runat="server"  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: 102px">
                            <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: 102px">
                            <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: 102px">
                  <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="tabSeo">
				<h2 class="tab">SEO选项</h2>
				<script type="text/javascript">
                    tabPane1.addTabPage(document.getElementById("tabSeo"));
				</script>

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

						</td>
						<td class="righttd">
							<asp:TextBox ID="TxtSeoTitle" runat="server" Width="300px" 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"><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"><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>
		</div>
		<%if(DataFactory.Exists("KS_CosField","FieldModeType=2 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 no-borderTable">
				<asp:Label ID="Label3" runat="server" Text="Label"></asp:Label>

			</table>
		</div>
		<%} %>
	<script>
      function CheckForm() {
          if (jQuery('#<%=this.TxtCourseName.ClientID %>').val() == '') {
              KesionJS.Alert('课程名称必须输入!', "jQuery('#<%=this.TxtCourseName.ClientID %>').focus()");
              return false;
          }
          if (jQuery('#<%=this.DrpClassID1.ClientID %>').val() == '0') {
              KesionJS.Alert('请选择课程类型!', "jQuery('#<%=this.DrpClassID1.ClientID %>').focus()");
              return false;
          }
          var dest = document.getElementById('ctl00_KSContent_teacherlist').value;
          if (dest == '') {
              KesionJS.Alert('请选择课程教师!', "jQuery('#ctl00_KSContent_teacherlist').focus()");
              return false;
          }
          if (jQuery('#<%=this.buylimit.ClientID %>').val() == '') {
              KesionJS.Alert("请输入限报人数！", "jQuery('#<%=this.buylimit.ClientID %>').focus()");

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

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

              return false;
          }
          var Date1 = new Date(jQuery('#<%=this.TxtBmBegintime.ClientID %>').val());
          var Date2 = new Date(jQuery('#<%=this.TxtBmEndtime.ClientID %>').val());
          if (Date2 <= Date1) {
              KesionJS.Alert("结束时间不能小于开始时间！", "jQuery('#<%=this.TxtBmEndtime.ClientID %>').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;
              }
              if (jQuery("#<%=this.Promotion.ClientID %> :radio[checked]").val() == "3") {
                  if (jQuery("#<%=this.IsSendNote.ClientID %> :radio[checked]").val() == "1") {
                      KesionJS.Alert("积分兑换课程不能邮寄资料！", "jQuery('#<%=this.NotePrice.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 promotiontype = jQuery("#<%=this.Promotion.ClientID %> :radio[checked]").val();
          if (promotiontype == "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 (promotiontype == "2") {

                    if ($('#<%=PanicMoney.ClientID%>').val() == "") {
                        KesionJS.Alert("请设置团购价！", "jQuery('#<%=this.PanicMoney.ClientID %>').focus()");
                        return false;
                    }
                }
                else if (promotiontype == "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;
                    }
                }
                return true;
            }
        </script>
		</div>

            <KS:Foot ID="Foot1" runat="server" OnSubmit="Foot1_Submit" />
		</div>
	</asp:Panel>



	</div>

</asp:Content>
