<%@ Page Language="C#" EnableEventValidation="false" AutoEventWireup="True" Title="套餐修改" Debug="true" MasterPageFile="~/Admin/MasterPage.master" Inherits="Kesion.NET.WebSite.Course.Admin_Exam_CourseBinder" Codebehind="KS.CosBinder.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 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+"",true);
        }

		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.RadioButtonList2.ClientID %> :radio[checked]").val();
			if (checkrad == "0") {
				jQuery("#<%=this.Tbody1.ClientID %>").css("display", "");
				jQuery("#<%=this.Tbody2.ClientID %>").css("display", "none");
				jQuery("#<%=this.Tbody3.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");  
			} else if (checkrad == "1") {
				jQuery("#<%=this.Tbody1.ClientID %>").css("display", "none");
					jQuery("#<%=this.Tbody2.ClientID %>").css("display", "");
					jQuery("#<%=this.Tbody3.ClientID %>").css("display", "none");
					jQuery("#<%=this.Tbody9.ClientID %>").css("display", "none");  
					jQuery("#<%=this.Tbody8.ClientID %>").css("display", "");
					Promotion();
		
			} else {
				jQuery("#<%=this.Tbody1.ClientID %>").css("display", "none");
				jQuery("#<%=this.Tbody2.ClientID %>").css("display", "");
				jQuery("#<%=this.Tbody3.ClientID %>").css("display", "");
				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");  
			}
		}

		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", "");
					} else {
						jQuery("#overdue2").css("display", "none");
						jQuery("#overdue1").css("display", "");
					}
				}
		
		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");  
		
			} 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");  
			}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", "");         
			}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", "");  
			}
			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");  
			}
		}
		
		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.CosBinder.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;
				}
			}
		}
		
		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.RadioButtonList2.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 (parseFloat($('#<%=Price_Member.ClientID%>').val()) <=0) {
					KesionJS.Alert("套餐价格不能设置小于0！", "jQuery('#<%=this.Price_Member.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;
				}
			}
			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;
			}
			<%}%>
			return true;
		}
		
		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)
			{
				if(confirm("您确定所有套餐内容页生成静态HTML吗?"))
					return true;
				else
					return false;
			}
		}
	
	
		$(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);
				};
			});
				
		});

    </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){ %>
                <li id="p9"><a href="KS.CsTeacher.aspx"><strong>返回名师</strong></a></li>
               	<%}else 
                { %>
              	<asp:LinkButton ID="delclassbutton" runat="server" OnClientClick="return(GetIDS('del'));" OnClick="delclassbutton_Click" CssClass="button">删除</asp:LinkButton>
                <li id='p10' style="display:none"><asp:LinkButton ID="LinkButton8" runat="server" OnClick="LinkButton8_Click" CssClass="button">同步评价</asp:LinkButton></li>
                <asp:LinkButton ID="LinkButton10" runat="server" OnClick="LinkButton10_Click" OnClientClick="return(GetIDS());" CssClass="button">批量审核</asp:LinkButton>
                <li id='p5' style="display:none"><asp:LinkButton ID="batchset" runat="server" CssClass="button">批量设置</asp:LinkButton></li>
                <li id='p15' style="display:none"><asp:LinkButton ID="LinkButton1" runat="server" OnClientClick="return(setHtml());" OnClick="Button_S" CssClass="button">生成静态HTML</asp:LinkButton></li>
                <%} %>
             </ul>
        </div>

        <!--当前讲师信息-->
        <%if(teacherid!=0){ %>
        <div class="courseInfoTop teacherInfoTop">
           <asp:PlaceHolder ID="PlaceHolder2"  runat="server"></asp:PlaceHolder> 
        </div>
        <%} %>
       <div class="content-area mt20">     
       <%if(teacherid==0){ %>
        <div class="myTitle">
            捆绑套餐
            <%}else{%>
               该教师下的套餐
            <%}%>
            <!--<asp:Label ID="LabNav" runat="server"></asp:Label>-->
        </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:130px;">
                        <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: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="150px" runat="server" onclick="WdatePicker({dateFmt:&#39;yyyy-MM-dd&#39;});" CssClass="textbox Wdate"></asp:TextBox>至
                       <asp:TextBox ID="TxtEndDate" placeholder="格式：YYYY-MM-DD" Width="150px" 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")==""?" class='active'":string.Empty %>><a href="KS.CosBinder.aspx<%=CosType==0?"":"?costype="+CosType %>"><span>所有套餐</span></a></li>
                            <li <%=KSCMS.S("Type")=="6"?" class='active'":string.Empty %>><a href="KS.CosBinder.aspx?Type=6<%=CosType==0?"":"&costype="+CosType %>"><span>未审核</span></a></li>
                            <li <%=KSCMS.S("Type")=="7"?" class='active'":string.Empty %>><a href="KS.CosBinder.aspx?Type=7<%=CosType==0?"":"&costype="+CosType %>"><span>已审核</span></a></li>
                        </ul>
                    </div>
                </div>
            </div>
            <div class="fr longliwrap">
            	<asp:LinkButton ID="addclassbutton" runat="server" OnClick="addclassbutton_Click" CssClass="button button_on">添加套餐</asp:LinkButton>
            </div>
        </div> 
    
        <div class="clear"></div>
       	<asp:Panel ID="Panel1" runat="server" Width="100%">
	    	<%
			stylecos=BaseFun.CheckModulePower("exam")?"":"style='display:none'";
			styleexam=BaseFun.CheckModulePower("edu")?"":"style='display:none'";
			stylemall=BaseFun.CheckModulePower("mall")?"":"style='display:none'";
			%>
        <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">
                    	<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")%>" class="<%# Convert.ToString(Eval("verify"))=="0"?"notext":"yestext" %>" title="<%# Convert.ToString(Eval("verify"))=="0"?"未审核":"已审核" %>"><%# Convert.ToString(Eval("verify"))=="0"?"未审核":"已审核" %></a>
                                <a href="?action=modify&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("bindview",Utils.StrToInt(Eval("courseid").ToString())) %>" title="前台页" target="_blank">预览</a>
                                        <a href="KS.CosPJ.aspx?CosType=1&courseid=<%#Eval("courseid") %>&teacherid=<%#Eval("TCID") %>">评价<i>(</i><%#DataFactory.GetOnlyValue("select count(1) from kS_CoursePJ where  OrderType!=5 and OrderType!=1 and courseid="+Eval("courseid")+" ") %><i>)</i></a>
                                        <a href="KS.CosLearnRecord.aspx?CosType=1&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("bindview",Utils.StrToInt(Eval("courseid").ToString()))%>" title="前台页" target="_blank"><%# Convert.ToString(Eval("name")) %></a>
                                <div <%=showstyle %> 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 <%=showstyle %> class="vip">VIP：<%# GetShoufei(Utils.StrToInt(Eval("ISLoad").ToString()),Utils.StrToFloat(Eval("Loadzhekou").ToString()),Utils.StrToFloat(Eval("FixedPrice").ToString()),Utils.StrToFloat(Eval("price_member").ToString())) %></em></div>
                        </div>
                        <div class="fl">
                            <div class="info"><span>发布者：<em title="<%# Utils.StrToInt(Eval("system"))==0?"系统":Utils.StrToInt(Eval("system"))==1?"企业":"教师"%>"><%#Eval("username")%></em></span><span>时间：<%#Convert.ToDateTime(Eval("addtime").ToString()).ToString("yyyy-MM-dd")%></span><span>分类：<%# MyCache.GetCosClass( Utils.StrToInt( Eval("classid")),"ClassName",0)  %></span>&nbsp;  &nbsp;  <span>评分：<%#Eval("coursepf")%>分</span></div>
                            <div class="buttonBox clearfix">
                             <a <%=stylecos %> href="KS.CosBindList.aspx?action=manage&type=1&courseid=<%#Eval("courseid") %>" class="greenFont btn"><em><%#GetBindNum("0,1,5",Utils.StrToInt(Eval("courseid"))) %>&nbsp;门</em><span>课程</span>&nbsp;>></a>
                             <a <%=styleexam %> href="KS.CosBindList.aspx?action=manage&type=2&courseid=<%#Eval("courseid") %>" class="greenFont btn"><em><%#GetBindNum("2",Utils.StrToInt(Eval("courseid"))) %>&nbsp;份</em><span>试卷</span>&nbsp;>></a>
                             <a <%=stylemall %> href="KS.CosBindList.aspx?action=manage&type=3&courseid=<%#Eval("courseid") %>" class="greenFont btn"><em><%#GetBindNum("3",Utils.StrToInt(Eval("courseid"))) %>&nbsp;件</em><span>商品</span>&nbsp;>></a>
                                <a style="display:none" href="KS.CsZLInfo.aspx?type=0&costype=<%=CosType==2?2:1 %>&CourseId=<%#Eval("courseid") %>&teacherid=<%#Eval("TCID") %>" class="greenFont btn"><em><%#DataFactory.GetOnlyValue("select count(1) from kS_CosZL where courseid="+Eval("courseid")+" ") %>&nbsp;份</em><span>资料</span>&nbsp;>></a>
                                <a style="display:none" href="KS.CosExamlist.aspx?CourseId=<%#Eval("courseid") %>&costype=<%=CosType==2?2:1 %>&teacherid=<%#Eval("TCID") %>" class="greenFont btn"><em><%#Kesion.Course.Course.SjCount(Utils.StrToInt(Eval("IsExam").ToString()), Eval("examPleID").ToString()) %>&nbsp;份</em><span>试卷</span>&nbsp;>></a>
                                <a style="display:none" href="KS.CsTeacher.aspx?CosType=1&CourseId=<%#Eval("courseid") %>&costypes=<%=CosType==2?2:1 %>&teacherid=<%#Eval("TCID") %>" class="greenFont btn"><em><%#Eval("TCID").ToString()==string.Empty?"0":Teacher.GetTeacherCount(Eval("TCID").ToString()).ToString() %>&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>
		  
        </script>
        <script>
            $(function(){
                $(".courseList li:first").css({borderTop:"0px"});
            });
		</script>
        </asp:Panel>

        <KS:Page ID="page1" runat="server" />
           <asp:Panel ID="Panel3" runat="server" Height="30px" Width="100%">
                <script type="text/javascript">
                    showtips('<span class="state"><strong>操作说明：</strong><br /></span>套餐内容：1.课程只能是普通课程，商品只能是普通商品;2.如果您的套餐是收费的话，在设置捆绑课程,商品，试卷的时候尽量要用收费的课程,商品，试卷,如果有捆绑到是机构或教师的课程是不计算相应的分成和代理商佣金。<br /> ');
                </script>
            </asp:Panel>
        </div>
    </asp:Panel>
    <asp:Panel ID="AddPanel" runat="server" Width="100%">

        
	<div class="content-area mt20">  
        <div class="tab-page" id="CourseListPanel1">
            <script type="text/javascript">
                var tabPane1 = new WebFXTabPane(document.getElementById("CourseListPanel1"), 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="0" cellspacing="0" class="CTable no-borderTable">
                     <tr>
                        <td align="right" class="lefttd" height="30"><font color="red">*</font><strong>套餐名称：</strong></td>
                        <td class="righttd" >
                            <asp:TextBox ID="TxtName" CssClass="textbox" runat="server" Style="width: 360px"></asp:TextBox>
                        <span <%=showstyle %>>   <strong>简短标题：</strong> <asp:TextBox ID="TxtShortName" CssClass="textbox" runat="server" Style="width: 150px" MaxLength="100"></asp:TextBox>
                             <span class="msgtips tips">该字段如果为空的话，就去截取”套餐名称“的字数</span>
							 </span>
                        </td>
                    </tr>

                    <tr>
                        <td class="lefttd" height="30" align="right" style="width: 102px"><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>
                             <strong>套餐属性：</strong>  <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" >允许发表心得</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 <%=showstyle %>>
                        <td align="right" class="lefttd" height="30" style="width: 102px"><strong>套餐副分类：</strong></td>
                        <td class="righttd">
                            <asp:ListBox ID="MoreClassList" runat="server" Width="262px" SelectionMode="Multiple" Height="150px"></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: 102px"><font color="red">*</font><strong>套餐教师：</strong></td>
                        <td class="righttd">
                            <table><tr>
                                <td width="380">
                                     <asp:ListBox ID="teacherlist" Width="262px" Height="120px" 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 <%=showstyle %> valign="top">
                                    <strong>其他教师：</strong>
                                   <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>
                                如：王老师
                                 <font color="red">此教师用于在标签调用时显示</font>
                                    </div>
                                </td>
                                   </tr></table>
                        </td>
                    </tr>
                 <tr <%=showstyle %>>
                        <td align="right" class="lefttd" height="30" style="width: 102px">
                            <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 <%=showstyle %>>
                        <td align="right" class="lefttd" height="30" style="width: 102px">
                            <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 style="display:none">
                        <td align="right" class="lefttd" height="30"><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 <%=showstyle %>>
                        <td align="right" class="lefttd" height="30" style="width: 102px">
                            <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">
                                <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">
                                <strong>试卷ID：</strong></td>
                            <td class="righttd" valign="top">
         
                                <table border="0" width='100%'>
                                    <tr>
                                        <td style="width: 300px">
                                        	<div class="Lheight36 md20">
                                                <asp:TextBox ID="TxtSJKey" runat="server" Width="200px" CssClass="textbox grayFont" Text="请输入试卷名称"/>
                                                <input type="button" value="搜索" class="button" onclick="searchSJ();" cssclass="button" />
                                            </div>
                                            <asp:ListBox ID="LstB2" runat="server" Width="300px" Height="200px" SelectionMode="Multiple"></asp:ListBox>
                                        </td>
                                        <td 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>
                                        	<div class="Lheight36 md20">指定试卷如下：</div>
                                            <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"><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">
                            <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 <%=showstyle %>>
                        <td align="right" class="lefttd" height="30"><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 <%=showstyle %>>
                        <td align="right" class="lefttd" height="30"><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"><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 <%=showstyle %>>
                        <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"  Text="100" Width="74px"></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" Text="100" Width="74px"></asp:TextBox>
                            <span class="tips">销售量作弊</span>
                        </td>
                    </tr>

                    <tr style="display: none">
                        <td align="right" class="lefttd" height="30" style="width: 102px">
                            <strong>材料交互次数：</strong></td>
                        <td class="righttd">
                            <asp:TextBox ID="TextBox3" CssClass="textbox" runat="server" Height="23px"></asp:TextBox>
                            (0为不限次数，由教师终结交互)
                        </td>
                    </tr>
                      <tr <%=showstyle %>>
                        <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 tips">选择套餐所在的省份和城市,方便检索。</span>
                        </td>
                    </tr>
					<tr>
                        <td align="right" class="lefttd">
                            <strong>套餐图片：</strong></td>
                        <td class="righttd">
                            <asp:TextBox ID="SpecialPic" CssClass="textbox" runat="server" Width="350px" Height="22px"></asp:TextBox>

                            &nbsp;<input type="button" class="button" onclick="SelectFiles('<%=this.SpecialPic.ClientID%>    ',0);" value="选择图片" /><br /><br />
                            <%=Kesion.APPCode.UploadAPI.EchoUpload("classpic",this.SpecialPic.ClientID) %>
                        </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 /><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>

			 			<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="74px"></asp:TextBox>元
        &nbsp;折扣：<asp:TextBox ID="zhekou" Width="30px" CssClass="textbox" Text="0" runat="server"></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="74px"></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>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:50px" 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:50px" CssClass="textbox" runat="server"></asp:TextBox>元</span>

                                <div class="redFont">"收费"为年费用户购买付折扣费用,"免费"为对年费用户为免费套餐，"固定价格"为年费用户购买的价格</div>
                            </td>
                        </tr>
                   
                </table>
            </div>
           
               <div <%=showstyle%> class="tab-noshowpage" id="noshowtab4">
            <%--    <h2 class="tab">图片选项</h2>--%>
                <script type="text/javascript">
                    function ClickTemplate(){
                        var checkrad1 = jQuery("#<%=this.templateflag.ClientID %> :radio[checked]").val();
                        if(checkrad1=='1')
                        {
                            jQuery("#templatearea").show();
                            
                        }
                        else 
                        {
                            jQuery("#templatearea").hide();
                        }
                    }
                    $(document).ready(function(){
                        ClickTemplate();
 
                    }); 
                </script>

                <table style="width: 100%; margin: 0 auto;" cellpadding="0" cellspacing="0" class="CTable  no-borderTable">
                        
                     <tr style="display:none">
                        <td align="right" class="lefttd" height="30">
                            <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">
                            <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">
                            <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>
                    
                    </table>
                   </div>
             <div class="tab-noshowpage" id="tab10noshow" style="display:none" >
                <h2 class="tab">设置课时</h2>
                <script type="text/javascript">
                  
                    function doPeriod(){
                        var checkrad1 = jQuery("#<%=this.RadioButtonList4.ClientID %> :radio[checked]").val();
                        if(checkrad1=='0')
                        {
                            jQuery("#Tbody10").show();
                        }
                        else 
                        {
                            jQuery("#Tbody10").hide();
                            jQuery("#Tbody11").hide();    
                            jQuery("#Tbody12").hide();	
                            jQuery("#Tbody13").hide();  
                            jQuery("#threencscreen").hide();
                            jQuery("#UploadThreen").hide();
                            jQuery("#UploadThreen1").hide();
                            jQuery("#SetListening").hide();
                        }
                    }
                    $(document).ready(function(){
                        doPeriod();
                    }); 
                      
                </script>
                   <table style="width: 100%;  margin: 0 auto;" cellpadding="2" cellspacing="1" class="CTable">
                        <tr>
                        <td align="right" class="lefttd" height="30" style="width: 102px">
                            <strong>是否开启课时管理：</strong></td>
                        <td class="righttd">
                             <asp:RadioButtonList ID="RadioButtonList4" onclick="doPeriod()" runat="server"  RepeatDirection="Horizontal" Height="24px">
                                <asp:ListItem Value="0" Selected="True">关闭</asp:ListItem>
                                <asp:ListItem Value="1" >开启</asp:ListItem>
                            </asp:RadioButtonList>
                           
                        </td>
                      </tr>
                       <asp:PlaceHolder ID="PeriodPlace"  runat="server"></asp:PlaceHolder> 
                     </table>
                 </div>
            <div <%=showstyle %> class="tab-oshowpagen" id="tab3">
          <%--      <h2 class="tab">价格</h2>--%>
         
                <table style="display:none; width: 100%; margin: 0 auto;" cellpadding="2" cellspacing="1" class="CTable">
                        <tr>
                        <td align="right" class="lefttd" height="30" style="width: 102px">
                            <strong>收费方式：</strong></td>
                        <td class="righttd">
                            <asp:RadioButtonList ID="RadioButtonList2" runat="server" RepeatDirection="Horizontal" onclick="free()" Height="24px">
                                <asp:ListItem Value="0">全部免费</asp:ListItem>
                                <asp:ListItem Value="1" Selected="True">全部付费</asp:ListItem>
                                <asp:ListItem Value="2">指定用户免费</asp:ListItem>
                            </asp:RadioButtonList>
                        </td>
                    </tr>
                    <tbody id="Tbody3" 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>
                        <tr style="display:none">
                            <td align="right" class="lefttd" height="30"><strong>普通会员(免费)：</strong></td>
                            <td class="righttd">
                                <asp:Label ID="Label2" runat="server"></asp:Label>
                            </td>
                        </tr>
                    </tbody>
                   
                    <tbody id="Tbody1" style="display: none" runat="server"></tbody>

                    <tbody id="Tbody2" style="display: none" runat="server">
                       
                        <%if (Kesion.Cache.MyCache.GetCourseCommonConfig(34) == "1")
                          { %>
                        <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="74px"></asp:TextBox>元
                            </td>
                        </tr>
                        <%if (Kesion.Cache.MyCache.GetCourseCommonConfig(35) == "1")
                          { %>
                        <tr>
                            <td align="right" class="lefttd" height="30"><strong>返现有效天数：</strong></td>
                            <td class="righttd">
                                <asp:TextBox ID="TxtDay" Text="0" CssClass="textbox" runat="server" Width="74px"></asp:TextBox>
                                <span class="tips">天（建议1-30天）,如果设置为0是不限制</span>
                            </td>
                        </tr>
                        <%} %>
                        <%} %>
                      

                    </tbody>

                    <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:ListItem Value="100">继续教育套餐</asp:ListItem>
                                </asp:RadioButtonList>
                                <span class="tips">促销属性，促销价格为最终价格</span>
                            </td>
                        </tr>

                        <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="74px"></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="74px" Text="100"></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="50px"></asp:TextBox>分
                         <span class="tips">纯积分兑换</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>&nbsp;价格
						    <asp:TextBox CssClass="textbox" ID="Mixprice" runat="server" Width="50px"></asp:TextBox>
                         <span class="tips">元</span>
                                </td>
								
                            </tr>

                        </tbody>

                    </tbody>
					 <tr>
                            <td align="right" class="lefttd" height="30" style="width: 102px">
                                <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:RadioButtonList>
                            </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>
                        <td align="right" class="lefttd" height="30"><strong>赠送积分：</strong></td>
                        <td class="righttd">
                            <asp:TextBox CssClass="textbox" ID="TxtScore" runat="server" Width="50px" Text="0"></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="50px" Text="0"></asp:TextBox>分 
                            <span class="tips">学员成功购买该套餐后，学员的推荐人获得积分。</span>
                        </td>
                    </tr>
                    <%if(Utils.StrToInt(epa.GetEpAgentConfig("EpAgentStatus"))==1){ %>
                    <tr>
                        <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="50px" Text="6"></asp:TextBox>%
                     <br />
                    省级分配比例:<asp:TextBox ID="TxtProviceRate"  CssClass="textbox" runat="server" Width="50px" Text="3"></asp:TextBox>%
                    <br />
                    市级分配比例:<asp:TextBox ID="TxtCityRate"  CssClass="textbox" runat="server" Width="50px" Text="2"></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:TextBox CssClass="textbox" ID="TxtSpaceTime" runat="server" Width="50px" Text="20"></asp:TextBox>分钟
                            <span class="tips">设置“0”为不限</span>
                            <br />
                            学习课时赠送积分：
                             <asp:TextBox CssClass="textbox" ID="TxtLearnScore" runat="server" Width="50px" Text="10"></asp:TextBox>分
                            <span class="tips">设置“0”为不限</span>
                            <br />
                            学习课时每日上线积分：<asp:TextBox CssClass="textbox" ID="TxtOnlineScore" runat="server" Width="50px" Text="60"></asp:TextBox>分
                            <span class="tips">设置“0”为不限</span>
                        </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="0" cellspacing="0" 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>
           

             <%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>
