<?xml version="1.0"?>
<coursetemplate>
  <mscourse>
    <![CDATA[	

				<div class="flbox"><a href="{KS:Field:Url(courseview,courseid)}" target="_blank"><img src="{KS:photo}" onerror="replaceDefaultImg(this)" /></a></div>
				<div class="frbox">
						<div class="litit"><a href="{KS:Field:Url(courseview,courseid)}" target="_blank">{KS:Name}</a></div>
						<div class="intro">{KS:Target}</div>
						<div class="coursenum"><span {KS:Style}>{KS:Money}</span><strong>{&KS:countpid}</strong>课时 &nbsp; {&KS:ClassName}</div>
						<div class="info"><img src="/images/bg22.png" align="texttop" />{KS:lookcount} <img src="/images/bg23.png" align="texttop" />{KS:Buycount}</div>
				</div>
				<div class="clear"></div>
	]]>
  </mscourse>
  
   <mscourse1>
    <![CDATA[	
   <li>
				<div class="flbox"><a href="{KS:Field:Url(courseview,courseid)}" target="_blank"><img src="{KS:photo}" onerror="replaceDefaultImg(this)" /></a></div>
				<div class="frbox">
						<div class="litit"><a href="{KS:Field:Url(courseview,courseid)}" target="_blank">{KS:Name}</a></div>
						<div class="intro">{KS:Target}</div>
						<div class="coursenum"><span {KS:Style}>{KS:Money}</span><strong>{&KS:countpid}</strong>课时 &nbsp; {&KS:ClassName}</div>
						<div class="info"><img src="/images/bg22.png" align="texttop" />{KS:lookcount} <img src="/images/bg23.png" align="texttop" />{KS:Buycount}</div>
				</div>
				<div class="clear"></div> 
	</li>
	]]>
   </mscourse1>

<mscourse2>
    <![CDATA[	
	
	 <li>
				<div class="lct">
										<div class="default-avatar">
							<div class="images-bg" style="background-image: url('{KS:userphoto}');"></div>
						</div>
				</div>
				<div class="rct">
					  <div class="rname"><span>{$Field(adddata,text,0,...,2,)}</span>{$Field(username,text,0,...,2,)}</div>
					  <div class="rinfo">
						 {$chatcontetn}
					  </div>
					  <div class="replylist" {KS:style}>
							<div class="replybox">
							  <span>
							{$Field(tcname,text,0,...,2,)}
							  </span>
							  <div class="talkinfo">{#replatecontent}</div>
						
							</div>
					   </div>
				</div>
				
			</li>
              
           
	
	]]>
  </mscourse2>
  
  <mscourse3>
    <![CDATA[	
	
		<li>
			  <div class="lct"><img src="{KS:userface}" onerror="replaceDefaultImg(this)" type="uesr"/></div>
			  <div class="rct">
				  <div class="name"><span>{$Field(PJdate,text,0,...,2,)}</span><b>{$Field(username,text,0,...,2,)}</b></div>
				  <div class="star"><div class="star_w" style="width:{$Field(PJstar,text,0,...,2,)}em;"></div><div class="star_img"></div><span>{KS:Level}</span></div>
				  <div class="info">{$Field(PJcontent,text,0,...,2,)}</div>
			  </div>
		 </li>
	
	]]>
  </mscourse3>

  <mscourse4>
    <![CDATA[	
   <li>
                        <div class="flbox"><a href="{KS:Field:Url(courseview,courseid)}" target="_blank"><img src="{$Field(photourl,text,0,...,2,)}" onerror="replaceDefaultImg(this)" /></a></div>
                        <div class="frbox">
                            <div class="litit"><a href="{KS:Field:Url(courseview,courseid)}" target="_blank">{$Field(name,text,0,...,2,)}</a></div>
                            <div class="intro">{$Field(Intro,text,0,...,2,)}</div>
                             <div>{$Field(Target,text,0,...,2,)}</div>
                            <div class="coursenum"><span {KS:Style}>{KS:money}</span></div>
                            <div class="info"><img src="/images/bg22.png" align="texttop" />{$Field(lookcount,text,0,...,2,)} <img src="/images/bg23.png" align="texttop" />{$Field(buycount,text,0,...,2,)}</div>
                        <div>开课时间：{$Field(BeginTime,text,0,...,2,)}</div>
                           <div>面授地点：{$Field(faceadd,text,0,...,2,)}</div>
                           <div onclick="applyface({$Field(CourseID,text,0,...,2,)})">申请面授</div>
                        </div>
                        <div class="clear"></div> 
   </li>
	]]>
  </mscourse4>

  <mscourse5>
    <![CDATA[	
  <li class="discussme clearfix">
 	 <span class="userid">{$UserID}</span>
   	 <div class="discuss_img"><img src="{KS:userface}"onerror="replaceDefaultImg(this)" type="user"/></div>
	 <div class="sendbox clearfix">
	 	 <div class="send">
			 <div class="arrow"></div>
			 <div class="sendinfo">{KS:tcontent}</div>
		 </div>
	 </div> 
</li>
  
  
	]]>
  </mscourse5>
  <mscourse6>
     <![CDATA[	
  <li class="discussme clearfix">
 	 <span class="userid">{$UserID}</span>
   	 <div class="discuss_img"><img src="{KS:userface}"onerror="replaceDefaultImg(this)" type="user" /></div>
	 <div class="sendbox clearfix">
	 	 <div class="send">
			 <div class="arrow"></div>
			 <div class="sendinfo">{KS:tcontent}</div>
		 </div>
	 </div> 
</li>
  	]]>
    </mscourse6>
  <minititle>
    <![CDATA[
      <script>	
$(function(){
	$(".main-nav li a").click(function(){
		 $(this).parents("li").addClass("curr").siblings("li").removeClass("curr");
  if($(this).parents(".main-nav-li").attr("config")=="0")

     	$(this).siblings(".nav-se").show();
      
		 $("#nav-bg").show();
	})
	$(".nav-se").click(function(){
		 $(this).hide();
		 $("#nav-bg").hide();
	});
	$("#nav-bg").click(function(){
		 $("#nav-bg,.nav-se").hide();
	});
})

      $(function(){
      $("#mytitle").find("li").each(function(){
      $(this).click(function(){
      var config=$(this).attr("config");
      var id=$(this).attr("id");
      if(config!=0)
      {
      getcontent(config,id);
      }
      })
      });
      })
      function getcontent(config,id)
      {
        var acid=0;
         acid=id.replace(/row/, '');
      acid=acid.replace(/column/,"");

         jQuery.ajax({
            type: "POST",
            datatype: "text",
            url: "?action=getcontent",
            data: {courseid:courseid,config:config,acid:acid},
            success: function (msg) {
            if(config=="5")
{
location.href=msg;
}
else{
            $("#selectcontent").html(msg);
            }
            }
            });
      }
      </script>
       <ul id='mytitle' class="main-nav-ul clearfix">
       [loop]
    <li name=column id="{KS:id}"  config={KS:config} class="main-nav-li">
	  <a>{KS:name}</a>
	  <div style="display:{KS:display}" class="nav-se">
	     <span class="triangle"><i class="triangle-b"></i><i class="triangle-t"></i></span>
	     <ul  name="{KS:id}" class="nav-se-ul">
       [loop2]
		    <li id="{KS:id}" config={KS:config}><a href="javascript:void(0);">{KS:name}</a></li>
        [/loop2]
		 </ul>
	  </div>
	</li>
[/loop]
  </ul>
      
    ]]>

  </minititle>
  <minimytalk>
    <![CDATA[
      <li name={KS:username} class="clearfix">
       <span style='display:none' class="userid">{$UserID}</span>
		  <div class="fl headimg-b">
			  <img  src="{KS:userface}" onerror="replaceDefaultImg(this)"  class="head-im"/>
			  <!--<i class="iconfont add-v">&#xe622;</i>-->
		  </div>
		  <div class="text">
			 <div class="member-name">
			   <span style="padding-left:100px" class="time-seng fr">{KS:adddate}</span>
         <span name=operation style="display:none"><span style="margin-left:300px; width:80px;" class="time-seng fr"><a href="#" onclick="jy('{KS:username}',1)">禁言此学员</a></span> <span style="margin-left:400px;width:80px;"  class="time-seng fr"><a href="#" onclick="goout('{KS:username}')">踢出课堂</a></span></span>
			   {KS:username}
			 </div>
			 <div class="talk-con">{KS:tcontent}</div>
		  </div>
		 </li>
    
    ]]>
  </minimytalk>

  <minisendHB>
    <![CDATA[
    <script>
  
    </script>
      <li class="clearfix">
      
		  <div class="fl headimg-b">
			  <img  src="{KS:userface}" onerror="replaceDefaultImg(this)" type="user" class="head-im"/>
		  </div>
		  <div class="text">
			 <div class="member-name">
			   <span style="padding-left:100px" class="time-seng fr">{KS:adddate}</span>
			   {KS:username}
			 </div>
			 <div onclick="getHB('{KS:HBid}')" class="talk-con"><img src="{$GetTemplateDir}/courselive/images/redpage.png" style="width:50px ">{KS:HBname}</div>
		  </div>
		 </li>
    ]]>
  </minisendHB>


  <minimygift>
    <![CDATA[
      <li class="clearfix">
       <span style='display:none' class="userid">{$UserID}</span>
		  <div class="fl headimg-b">
			  <img  src="{KS:userface}" onerror="replaceDefaultImg(this)" type="user"  class="head-im"/>
		  </div>
		  <div class="text">
			 <div class="member-name">
			   <span style="padding-left:100px;" class="time-seng fr">{KS:adddate}</span>
			   {KS:username}
			 </div>
			 <div class="talk-con">
		   {KS:username}向老师赠送了{KS:num}{KS:measure}{KS:things}
		   </div>
		  </div>
		 </li>
    
    ]]>
  </minimygift>
  <minitalk>
    <![CDATA[
    <script>
    $(document).ready(function(){
      gettalk();
      $("input[name=sendgift]").click(function(){
      sendgift($(this).attr("eq"),$(this).attr("con"));
      });
    });
  $(function () {
	rz();
	$(window).resize(function () {
		rz();
	});
});
var root='{KS:root}'
function rz() {
	var r = ($(window).width()-$(document.body).width())/2 + 20;
	$(".return-btn").css("right",r+"px");
	
	var i = $(".course-img").width()/1.7;
	$(".course-img").css("height",i+"px");
	
	var l = ($(window).width()-$(document.body).width())/2;
	$(".regband").css("left",l+"px");
	$(".login-box").css("left",l+"px");
	$(".account-box").css("left",l+"px");
	$(".spreadbox").css("left",l+"px");
	$(".gift-box").css("left",l+"px");
	$(".tan").css("left",l+"px");
	
	var h = $(window).height()-($(".head-top").height()+$(".play-box").height()+$(".main-nav").height()+$(".head-h").height());
	$(".main-con").css("height",h+"px");
	
	var g = $(window).height()-($(".head-top").height()+$(".play-box").height());
	$(".regband").css("height",g+"px");
	$(".login-box").css("height",g+"px");
	$(".account-box").css("height",g+"px");
	$(".spreadbox").css("height",g+"px");
	
	var w = $(window).height()-($(".head-top").height()+$(".play-box").height()+$(".main-nav").height());
	$(".gift-box").css("height",w+"px");
	$(".tan").css("height",w+"px");

	var c = $("body").width()/4*0.6;
	$(".user-f-l .icon").attr("style","height:"+c+"px;line-height:"+c+"px;")
	}	
     function subask() { 
        jQuery.ajax({
            type: "POST",
            datatype: "xml",
            url: "/plus/ajaxs.ashx",
            data: "a=checkislogin",
            success: function (xml) {
                var islogin = jQuery(xml).find("login islogin").text();
                if (islogin == 'false') {
                   
                    location='{=GetRewriteUrl(userlogin)}';
         
                    return false;
                }else 
                {
                    var content =jQuery("#content").val();	
                    if (content==''){	
                        alert("请输入问题内容");
                        jQuery("#content").focus();
                    } else {
                  
                        $.ajax({
                            type:'Post',
                            datatype:'text',
                            url:'?action=getuserstatus',
                            data:{courseID:courseid,tcname:tcname,content:content},
                            success:function(msg){	
                        //    alert(msg);
                    
                    if(msg=="notalk"){
                       if(!$('#showuserask').find("li[name=jy]").html()){
                     $('#showuserask').append("<li name=jy>对不起，您已经被禁言</li>");
                     }
                    }
                    else{
                               $("#showuserask").append(msg);	
                                $("#content").val("");
                                }
                                var stcrolltop = document.getElementById('showuserask').scrollHeight;
                                $('.main-con').animate({scrollTop: ""+stcrolltop+"px"}, 500);
                                //return false;
                            
                            }
                        });
                    } 
                    
                }
            }});
    }
    var strmsg=0;
  function sendgift(acid,GX)
  {
  var holdnum=parseInt($("#holdnum"+acid).html());
  var num=parseInt($("#num"+acid).val());
  var buynum=num-holdnum;
  var s=holdnum-num
  var money= $("#totalprice"+acid).html();
     $.ajax({
            type:'Post',
            datatype:'text',
            url:"?action=sendgift",
            data:{courseid:courseid,acid:acid,GX:GX,num:num,buynum:buynum,money:money},
            success:function(msg){	
           // $("#showuserask").html(msg);
           //alert(msg);
           if(msg=="0")
           {
           alert("请登录！");
           }
           else if(msg=="00")
           {
           alert("您的道具数量不足，请充值");
           }
           else if(msg=="000")
           {
           alert("购买失败！");
           location.reload();
           }
           else if(msg=="1"){
           if(s<=0){
      $("#holdnum"+acid).html("0");
      $("#num"+acid).val("1");
     $("#totalprice"+acid).html($("#price"+acid).html());
      }
      else
      {
       $("#holdnum"+acid).html(s);
      }
      	$(".gift-box").slideUp("fast");
        $(".return-box").find("li").click();
           }
           else
           {
            location.href=msg;
           }
            }
            });
  }
     function gettalk(){			
        $.ajax({
            type:'Post',
            datatype:'text',
            url:"?action=gettalk",
            data:{courseID:courseid},
            success:function(msg){	
           // alert(msg);
            if(msg=="")
                        {
                        return;
                        }
        if(msg=="out")
        {
        alert("您已被老师请出课堂");
        location.href="/3g/course/index.aspx";
        }
                    $("#showuserask").append(msg);	
                 
                    var stcrolltop = document.getElementById('showuserask').scrollHeight;
					$('.main-con').animate({scrollTop: ""+stcrolltop+"px"}, 500);
             
            }
        });
        setTimeout("gettalk()",3000);
    }
    function add(id)
    {
    var holdnum=parseInt($("#holdnum"+id).html());
    var num=parseInt($("#num"+id).val());
    num=num+1;
    if(num>holdnum){
    var price=parseFloat($("#price"+id).html());
      $("#totalprice"+id).html(price*(num-holdnum));
      }
     
    $("#num"+id).val(num);
    }
    function sub(id)
    {
     var holdnum=parseInt($("#holdnum"+id).html());
      var num=parseInt($("#num"+id).val());
    if(num>1){
   num=num-1;
   if(num>=holdnum){
     var price=parseFloat($("#price"+id).html());
      $("#totalprice"+id).html((price*(num-holdnum)).toFixed(2));
      }
    $("#num"+id).val(num);}
    }
    function changenum(id)
    {
    if(isNaN($("#num"+id).val()))
    { alert("请输入数字"); }
    else{
     var holdnum=parseInt($("#holdnum"+id).html());
        var num=parseInt($("#num"+id).val());
     var price=parseFloat($("#price"+id).html());
     if(num>=holdnum){
      $("#totalprice"+id).html(price*(num-holdnum));
      }
      else
      {
       $("#totalprice"+id).html("0.00");
      }
    $("#num"+id).val(num); 
    }
    }
    function tg(){
 $.ajax({
            type:'Post',
            datatype:'text',
            url:"?action=tg",
            data:{courseid:courseid,w:300,h:500},
            success:function(msg){
        alert(msg);
        $("#myspreadbox").html(msg);

		$("#myspreadbox").slideDown("fast");
            }
            });   
    }
 function changeHB(obj,i)
{
$("#hbnum").val("");
$("#hbprice").val("");
if(i==0)
{
$(obj).html("改为拼手气红包");
$("#showcontent").html("单个金额");
$(obj).attr("onclick","changeHB(this,1)")
$("#HBtype").val("1");
}
else
{
$(obj).html("改为普通红包");
$("#showcontent").html("总金额");
$(obj).attr("onclick","changeHB(this,0)");
$("#HBtype").val("0");
}
}
function changeprice()
{
var s=parseInt($("#hbnum").val());
var t=parseFloat($("#hbprice").val());
if(isNaN(s))
{return;}
if(isNaN(t))
{return;}

if($("#HBtype").val()=="0"){
$("#showprice").html("￥"+t);

}
else{
$("#showprice").html("￥"+parseFloat(parseInt(s*100)*t)/100);
}

$("#hideprice").val(t);

}
  function sendHB(){
 var s=parseInt($("#hbnum").val());
 var t=parseFloat($("#hbprice").val());
var totalprice=parseFloat($("#hideprice").val());
var hbtype=$("#HBtype").val();
if(isNaN(s))
{alert("请输入红包数量");return}
if(isNaN(t))
{alert("请输入有效金额");return}
if(t<=0)
{
alert("请输入有效金额!");return
}
if(hbtype=="0"){
if(totalprice>10000)
{
alert("红包总金额不能超过1万");
return;
}
}
else
{
if(totalprice*s>10000)
{
alert("红包总金额不能超过1万");
return;
}
}
var name=$("#hbname").val();
$("#hbnum").val("");
$("#hbprice").val("");
$.ajax({
            type:'Post',
            datatype:'text',
            url:"?action=HB",
            data:{courseid:courseid,hbname:name,hbnum:s,totalprice:totalprice,hbtype:hbtype},
            success:function(msg){
         // alert(msg);
            if(msg=="00")
            {
            alert("金额必须大于等于0.01元");
            }
            else
            {
            location.href=msg;
            }
            }
            });   
    }
  
    </script>
   
    <section class="main-con autoy">
  <div class="chat-list">
    <div class="chat-t">
	   <ul id="showuserask" class="chat-tl">
	   </ul>
	</div>
  </div>
  
</section>
<section class="chat-input-b">
	<input type="hidden" id="orderid" value="" class="text" />  
  <div class="clearfix">
    <span class="gift-a fl"><span class="gift">礼物</span></span>
	<span class="gift-t fl"><input type="text" id="content" placeholder="说点什么吧..." class="input-text"></span>
	<span class="gift-b fr"><input type="button" onClick="subask()" value="发送" class="f-send"></span>
  </div>
</section>

<section>
  <div class="gift-box">
	 <div class="g-b-t">
		<div class="g-title">礼物中心</div>
		<div class="g-b-con">
		  <ul class="clearfix">
      [loop]
			<li>
			  <div class="gifbtn">
				  <img src="{KS:img}">
				  <p>{KS:acname}</p>
			  </div>
			  <div class="tan flower-box">
			      <div class="return-box">
				     <div class="fl">
					    持有量：<font color="red">&nbsp;<b><span id="holdnum{KS:acid}">{KS:holdnum}</span></b>&nbsp;</font>&nbsp;&nbsp;
						<!--<a href="" class="go-recharge">去充值</a>-->
					 </div>
				     <i class="iconfont return">&#xe624;</i>
				  </div>
				  <form name="flowerform" action="">
					  <div class="clearfix m3">
						  <div class="fl l-w-img">
							 <img src="{KS:img}" class="flower-img">
						  </div>
						  <div class="flower-text">
							 <p>{KS:acname}</p>
							 <p>单价：<b>￥<span id="price{KS:acid}">{KS:cbmoney1}</span></b></p>
							 <p>
							    数量：
								<span class="num-change">
									<a class="reduce" onclick="sub({KS:acid})" href="javascript:void(0)">-</a>  
									<input type="text" name="qty_item_1" onblur="changenum({KS:acid})" value="1" id="num{KS:acid}"class="text" />  
									<a class="add" onclick="add({KS:acid})" href="javascript:void(0)">+</a> 
								</span> 
							 </p>
						  </div>
					  </div>
					  <div class="select-box">
					     <div class="fr">
						    总价：<font color="red"><b>￥<span id="totalprice{KS:acid}">{KS:cbmoney2}</span></b></font>
						 </div>
						 <label>支付方式</label>
						 <select name="pay-way" class="seledt-css">
							<option>微信支付</option>
				
						 </select>
					  </div>
					  <input type="button" name="sendgift" onclick="" eq={KS:acid} con={KS:con} class="flower-btn" value="{KS:payvalue}">
				  </form>
			  </div>
			</li>
		[/loop]
			<li>
			  <div class="gifbtn">
				  <img src="{$GetTemplateDir}/courselive/images/redpage.png">
				  <p>红包</p>
			  </div>
			  <div class="tan redpage-box">
			      <div class="return-box">
				     <div class="fl">
					    <a href="#" onclick="changeHB(this,0)" class="change-page">改为普通红包</a>
					 </div>
				     <i class="iconfont return">&#xe624;</i>
				  </div>
				  <form name="redpageform" action="">
					  <div class="clearfix m3">
						  <div class="fl l-w-img">
							 <img src="{$GetTemplateDir}/courselive/images/redpage.png" class="redpage-img">
						  </div>
						  <div class="redpage-text">
							 <p>红包数：</p>
							 <p><input type="text" id="hbnum" onblur="changeprice()" class="money-input">&nbsp;个</p>
							 <p id="showcontent">总金额：</p>
<input type="hidden" value="0" id="HBtype">
							 <p><input type="text" id="hbprice" onblur="changeprice()" class="money-input">&nbsp;元</p>
							 <p>红包名称：</p>
							 <p><input type="text" id="hbname" class="money-input" value="恭喜发财"></p>
						  </div>
					  </div>
					  <div class="select-box">
					     <div class="fr">
               <input type="hidden" value="0" id="hideprice">
						    总价：<font color="red"><b id="showprice">￥0</b></font>
						 </div>
						 <label>支付方式</label>
						 <select name="pay-way" class="seledt-css">
							<option>微信支付</option>
						 </select>
					  </div>
					  <input type="button" onclick="sendHB()" class="redpage-btn" value="发送红包">
				  </form>
			  </div>
			</li>
		  </ul>
		</div>
	 </div>
	 <div class="g-b-b">取消</div>
  </div>
</section>
<section class="head-h">
</section>


<script>
/*注册脚本*/
$(function () {
	$(".reg").click(function () {
		$(".regband").slideDown("fast");
	});
	$(".regband .close").click(function(){
		$(".regband").slideUp("fast");
	});
});
/*账户脚本*/
$(function () {
	$(".account").click(function () {
		$(".account-box").slideDown("fast");
	});
	$(".account-box .close").click(function(){
		$(".account-box").slideUp("fast");
	});
});
/*推广脚本*/
$(function () {
	
	$(".spreadbox .close").click(function(){
		$(".spreadbox").slideUp("fast");
	});
  	$(".spreadbox .close").live("click",function(){
		$(".spreadbox").slideUp("fast");
	});
});

/*礼物脚本*/
$(function () {
	$(".gift").click(function () {
		$(".gift-box").slideDown("fast");
	});
	$(".gift-box .g-b-b").click(function(){
		$(".gift-box").slideUp("fast");
	});
});
/*礼物内部选择弹窗脚本*/
$(function () {
	$(".g-b-con li .gifbtn").click(function () {
		$(this).siblings(".tan").slideDown("fast");
	});
	$(".tan .return").click(function(){
		$(this).parents(".tan").slideUp("fast");
	});
});
</script>
<footer>
  <div class="return-btn">
     <!--<a href="javascript:void(0);" class="reg">注册</a>
	 <div class="regband">
	   <div class="close-r">
	      <i class="iconfont close">&#xe613;</i>
	   </div>
	   <label><font color="red">*</font>手机号码：</label><input type="text" placeholder="请输入手机号码" name="phone-number" class="phone-number">
	   <input type="button" class="band" name="band" value="立即绑定">
	 </div>
	 <a href="javascript:void(0);" class="login">登陆</a>
	 <div class="login-box">
	   <div class="close-r">
	      <i class="iconfont close">&#xe613;</i>
	   </div>
	   <ul class="login-box-l">
	      <li class="login-b-l">
		   <label>手机号码：</label><input type="text" placeholder="请输入手机号码" name="phone-number" class="phone-number">
		  </li>
		  <li class="login-b-l">
		   <label>登陆密码：</label><input type="text" placeholder="请输入手机号码" name="phone-number" class="phone-number">
		  </li>
		  <li class="login-b-l">
		   <input type="button" class="band" name="band" value="立即登陆">
		  </li>
	   </ul>
	 </div>-->
	 <a href="javascript:void(0);"  class="account">账户</a>
	 <div class="account-box">
	   <div class="close-r">
	      <h1 class="fl">快捷菜单</h1>
	      <i class="iconfont close">&#xe613;</i>
	   </div>
	   <ul class="user-functions clearfix">
	      <li class="user-f-l">
			  <a href="minilivescene.aspx?courseid={KS:courseid}">
				<div class="icon">
				  <i class="iconfont">&#xe62b;</i>
				</div>
				<p>推广后台</p>
			  </a>
		  </li>
		  <li class="user-f-l">
			  <a href="miniMoney.aspx{=GetUserUrl(basic/logmoney}&courseid={KS:courseid}">
				<div class="icon">
				  <i class="iconfont">&#xe62a;</i>
				</div>
				<p>财务后台</p>
			  </a>
		  </li>
		  <li class="user-f-l">
			  <a href="miniScene.aspx?courseid={KS:courseid}">
				<div class="icon">
				  <i class="iconfont">&#xe62c;</i>
				</div>
				<p>我的场景</p>
			  </a>
		  </li>
		  <li class="user-f-l">
	  <a href="../course/teacherview.aspx?id={KS:tcid}">
				<div class="icon">
				  <i class="iconfont">&#xe629;</i>
				</div>
				<p>讲师名片</p>
			  </a>
		  </li>
		  <li class="user-f-l">
			  <a href="miniLivecard.aspx?courseid={KS:courseid}">
				<div class="icon">
				  <i class="iconfont">&#xe620;</i>
				</div>
				<p>名片二维码</p>
			  </a>
		  </li>
		  <li class="user-f-l">
			  <a href="../shop/shoppingcart.aspx">
				<div class="icon">
				  <i class="iconfont">&#xe501;</i>
				</div>
				<p>我的购物车</p>
			  </a>
		  </li>
       <li class="user-f-l">
			  <a href="../user">
				<div class="icon">
				  <i class="iconfont">&#xe627;</i>
				</div>
				<p>个人中心</p>
			  </a>
		  </li>
		  <li class="user-f-l">
			  <a href="miniLiveplay.aspx?courseid={KS:courseid}">
				<div class="icon">
				  <i class="iconfont">&#xe628;</i>
				</div>
				<p>刷新</p>
			  </a>
		  </li>
		  <!--<li class="user-f-l">
			  <a href="#">
				<div class="icon">
				  <i class="iconfont">&#xe62d;</i>
				</div>
				<p>高级</p>
			  </a>
		  </li>-->
	   </ul>
	  
	 </div>

	 <a href="javascript:void(0);" id="myspread" onclick="tg()" class="spread">推广</a>
	 <div id="myspreadbox" class="spreadbox">
	  
	 </div>
	 <a href="javascript:void(0);" onclick="godianbo(this,1)" class="renturn">点播</a>
  </div>
</footer>
 
    ]]>
  </minitalk>
  <minitg>
    <![CDATA[
       <div class="close-r">
	      <h1 class="fl">【推广】</h1>
	      <i class="iconfont close">&#xe613;</i>
	   </div>
	   <div class="border-b">
	      <p>{KS:title}</p>
		  <p>{KS:link}</p>
	   </div>
	   <div class="personal">
	      <div class="fl p-h-img">
		     <img src="{KS:userphoto}">
		  </div>
		  <div class="p-intro">
		     <p>我是&nbsp;{KS:username}</p>
			 <p>{KS:name}</p>
			 <p>{KS:content}</p>
		  </div>
		  
	   </div>
	   <div class="share-box">
		   <div class="clearfix">
			 <div class="fl code-b">
					<img src="{KS:code}">
			 </div>
			 <div class="fr fingerprint">
				<img src="{KS:finger}">
			 </div>
		   </div>
		   <div class="center-text">
			 长按指纹扫描二维码即可立即进入
		   </div>
	  </div>
	  <h1 class="tisp">保存推广图片到手机相册即可分享</h1>
    
    ]]>
  </minitg>
  <accontent>
    <![CDATA[
	  <div id="ac{KS:acid}" class="f-info" onclick="acsend({KS:acid},1)">
		  <img style="width:100%" src="{KS:acimage}" onerror="replaceDefaultImg(this)"  >
		   <div class="acname">{KS:acname}</div>
		   <div class="acnum">×<span id="acnum{KS:acid}">{KS:acnum}</span></div>
		   <div class="gxz"><span id="GX{KS:acid}">{KS:contribution}</span>贡献值</div>
    </div>
    
	
	<div>
		<ul style="display:none; margin-left:30px;">
			{KS:acselect}
		</ul>
	
		<ul style='color:white; display:none' id='send{KS:acid}'>
			<li onclick='acsend({KS:acid},5)'>5</li>
			 <li onclick='acsend({KS:acid},6)'>6</li>
			<li onclick='acsend({KS:acid},7)'>7</li>
		   <li><input type='text' id='sendnum{KS:acid}' value='0'></li>
		   <li onclick='gosend({KS:acid})'>发送</li>
		</ul>

	</div>
    ]]>
  </accontent>
  <combo>
    <![CDATA[
    <div onclick="saveselect('{KS:money}','{KS:num}','{KS:id}','{KS:acid}')" style="float:left; margin:0 0 0 40px; ">
    <div>{KS:cbname}</div>
    <div><span>{KS:money}元/{KS:num}{KS:measure}<span></div>
    </div>
    ]]>
  </combo>
  <acsend>
    <![CDATA[
   <li style='color: #FF5722;font-size: 0.6rem;'>{KS:tcontent}</li>
   ]]>
  </acsend>
  <GX>
    <![CDATA[
   
	 <li>
		<div class="face"><img src="{$Field(UserFace,text,0,...,2,/Tp/Mobile/skin01/images/common/userface.jpg)}" onerror="replaceDefaultImg(this)" type="user" ></div>
		<div class="info">
			<div class="gxz">
				<strong>{$Field(contribution,text,0,...,2,)}</strong>
				<span>贡献值</span>
			</div>	
			<div class="name"><b>{$Field(username,text,0,...,2,)}</b><span>发送{$Field(sendtime,text,0,...,2,)}次</span></div>
			
		</div>
	 </li>  

    ]]>
  </GX>
  <stuacsend>
    <![CDATA[
	
	【系统】{KS:username}赠送{KS:num}{KS:measure}{KS:things}
    ]]>

  </stuacsend>
  <miniinitialDB>
    <![CDATA[
      <script>  
    function changeDB(link)
    {
  $("#play").html("<iframe src=\"" + link + "\" class=\"course-img\"  quality=\"hight\">");
rz();
    }
    </script>
      <section class="main-con">
  <div class="demand">
     <ul class="demandlist" id='pagelist'>
       <li style="display:{KS:display}" class="clearfix">
          <a href="#" onclick="changeDB('{KS:link}')">
		  <div class="fl demand-imgbox">
		     <img src="{KS:photo}" class="demandimg">
		  </div>
		  <div class="demand-title">
		    
			   {KS:name}
			
		  </div>
       </a>
		</li>
     [loop]
	    <li class="clearfix">
        <a href="#" onclick="changeDB('{KS:link}')">
		  <div class="fl demand-imgbox">
		     <img src="{KS:photo}" class="demandimg">
		  </div>
		  <div class="demand-title">
		    
			   {KS:name}
			
		  </div>
       </a>
		</li>
    [/loop]
	 </ul>
  </div>
  <div class="download">
     <!--<a id='moreDB' href="?action=" class="dl-more">加载更多</a>-->
       <ul id="pagelistend" style="display:block"></ul>
  </div>
</section>
<footer>
  <div class="return-btn">
     <!--<a href="javascript:void(0);" class="renturn">返回</a>-->
  </div>
</footer>
        <script>
               var pageCount = "{#PageCount}";
               var postUrl = "miniliveplay.aspx?action=getDB&courseid={KS:courseid}";
               var postParam = "";
           </script>
             <script src="/ks_inc/loadpage.js"></script>
      ]]>
  </miniinitialDB>
  <miniDB>
    <![CDATA[
    <script>  
    function changeDB(link)
    {
  $("#play").html("<iframe src=\"" + link + "\" class=\"course-img\"  quality=\"hight\">");
rz();
    }
    </script>
      [loop]
	    <li class="clearfix">
      		     <a href="#" onclick="changeDB('{KS:link}')">
		  <div class="fl demand-imgbox">
		     <img src="{KS:photo}" class="demandimg">
		  </div>
		  <div class="demand-title">

			   {KS:name}
		
		  </div>
      	 </a>
		</li>
    [/loop]
    
    ]]>
  </miniDB>
  <miniac>
    <![CDATA[
   <section class="main-con">
	<div class="game">
	   
	   <div class="game-title">
	      <img src="{$GetTemplateDir}/courselive/images/money.png">
		  本次比赛邀约：{KS:atnum} &nbsp;&nbsp;总邀约：{KS:totalnum}
	   </div>
	   <div class="text-bb">
	      
	   </div>
	   <h1>主办单位：{KS:company}</h1>
	   <div class="game-table">
	      <table cellpadding="0" cellspacing="0" border="0" width="100%">
		    <tr>
			  <th>排名</th>
			  <th>头像</th>
			  <th>微信昵称</th>
			  <th>邀约人数</th>
			</tr>
      [loop]
			<tr>
			  <td>{KS:rank}</td>
			  <td><img src="{KS:photo}" class="g-headimg"></td>
			  <td>{KS:username}</td>
			  <td>{KS:acnum}</td>
			</tr>
		[/loop]
		  </table>
	   </div>
	   <div class="solicitation">
	      <div class="soli-top">
		    <h2>{KS:acname}{KS:state}</h2>
			<p>开始时间：{KS:begindate}</p>
			<p>结束时间：{KS:enddate}</p>
		  </div>
		  <div class="soli-bottom">
		     <img src="{KS:acimg}">
		  </div>
	   </div>
	</div>
</section>
    
    ]]>
  </miniac>
  <minippt>
    <![CDATA[
<script> 

    var swiper = new Swiper('.swiper-container', {
        nextButton: '.swiper-button-next',
        prevButton: '.swiper-button-prev',
        pagination: '.swiper-pagination',
        paginationType: 'fraction',
    });
	$(function(){
		//跳转页码
		var i = {KS:nowppt};
		var a = i-1;
		swiper.slideTo(a,0, false);
	});
    $(function(){
  getpptpage(); 
  });
    function getpptpage(){
    $.ajax({
            type:'Post',
            datatype:'text',
            url:"?action=pptpage",
            data:{courseID:courseid},
            success:function(msg){	
            if(msg=="00")
            {
         if($(".main-con").find(".swiper-container").html()){
            getcontent(2,"row0");
}
            }
            else if(msg!="0"){
         
           
        	swiper.slideTo(parseInt(msg)-1,0, false);
            }
            }
            });
               setTimeout("getpptpage()",3000);
            }
  </script>

<section class="main-con">
	<div class="swiper-container">
		<div class="swiper-wrapper">
     [loop]
			<div class="swiper-slide"><img src="{KS:img}"/></div>
		[/loop]
		</div>
		<div class="swiper-pagination"></div>
		<div class="swiper-button-next"></div>
		<div class="swiper-button-prev"></div>
	</div>
 
</section>
]]>
  </minippt>
  <minippt2>
    <![CDATA[
    
     <section class="main-con">
	<div class="swiper-container">
		<div id=myppt class="swiper-wrapper">
        [loop]
			<div id={KS:pptid} style="opacity:1;display:{KS:display}" class="swiper-slide">
			  <img src="{KS:img}">
			</div>
		[/loop]
    
		</div>
		<!-- Add Pagination -->
		<div style="opacity:0.8; width:100px; top:1%; color:white; background-color:black"  class="swiper-pagination"><span id=nowppt>{KS:nowppt}</span>/<span id=totalppt>{KS:totalppt}</span></div>
		<!-- Add Arrows -->
		<div onclick="preppt()" class="swiper-button-next"></div>
		<div onclick="nextppt()" class="swiper-button-prev"></div>
	</div>
	<!-- Swiper JS -->
	<!-- Initialize Swiper -->
	<script>
 
  $(function(){
  getpptpage(); 
  });
  function preppt()
  {
 var num=parseInt($("#nowppt").html());
 var total=parseInt($("#totalppt").html());
 num=num+1;
 if(num<=total){
   $("#myppt").find("div").css("display","none");
      $("#ppt"+num).css("display","");
      $("#nowppt").html(num);
      }
  }
  function nextppt()
  {
   var num=parseInt($("#nowppt").html());
 num=num-1;
 if(num>=1){
   $("#myppt").find("div").css("display","none");
      $("#ppt"+num).css("display","");
       $("#nowppt").html(num);
      }
  }
   function getpptpage(){
    $.ajax({
            type:'Post',
            datatype:'text',
            url:"?action=pptpage",
            data:{courseID:courseid},
            success:function(msg){	
            if(msg=="00")
            {
         if($(".main-con").find(".swiper-container").html()){
            getcontent(2,"row0");
}
            }
            else if(msg!="0"){
           $("#nowppt").html(msg);
        
            }
            }
            });
               setTimeout("getpptpage()",3000);
            }
	</script>
</section>
    ]]>
  </minippt2>
  <miniarticlelist>
    <![CDATA[
  [loop]
       <li class="clearfix">
			  <div class="collebox fl">
			     <a href="miniarticle.aspx?courseid={KS:courseid}&id={KS:id}"><img src="{KS:pic}" class="colleimg"></a>
			  </div>
			  <div>
			     <a href="miniarticle.aspx?courseid={KS:courseid}&id={KS:id}"><h1 class="colle-title">{KS:title}</h1></a>
				 <div class="news-time">{KS:adddate}</div>
			  </div>
			</li>
[/loop]

  <script>
	  	var pageCount = "{#PageCount}";
	  	var postUrl = "miniArticlelist.aspx?action=change&courseid={KS:courseid}";
	  	var postParam = "";
           </script>
    ]]>
  </miniarticlelist>
  <miniarticle>
    <![CDATA[
     <div class="collection">
	    <a href="miniSearch.aspx?courseid={KS:courseid}" class="article-colle">开始采集</a>
	  </div>
	  <div class="collection-l">
	     <ul id="pagelist" class="colle-table">
		  [loop]
       <li class="clearfix">
			  <div class="collebox fl">
			     <a href="miniarticle.aspx?courseid={KS:courseid}&id={KS:id}"><img src="{KS:pic}" class="colleimg"></a>
			  </div>
			  <div>
			     <a href="miniarticle.aspx?courseid={KS:courseid}&id={KS:id}"><h1 class="colle-title">{KS:title}</h1></a>
				 <div class="news-time">{KS:adddate}</div>
          <div style="float:right;" class="edit"><a href="?action=del&courseid={KS:courseid}&id={KS:id}">删除</a></div>
           <div class="edit" style="right:20px"><a href="minieditpage.aspx?courseid={KS:courseid}&id={KS:id}">编辑</a></div>
			  </div>
			</li>
[/loop]
  <script>
	  	var pageCount = "{#PageCount}";
	  	var postUrl = "miniCollect.aspx?action=changea&courseid={KS:courseid}";
	  	var postParam = "";
           </script>
		 </ul>
	  </div>
    ]]>
  </miniarticle>
  <miniinvite>
    <![CDATA[
      <div class="tol-num-people">总人数：<strong>{KS:atnum}</strong></div>
	  <div class="invitation">
	     <table id="pagelist" class="invit-table" cellpadding="0" cellspacing="0" border="0" width="100%">
       [loop]
		    <tr>
         <td>
			      <a href="#" class="">{KS:rank}</a>
			  </td>
			  <td>
			     <img src="{KS:photo}" class="invitimg">
			  </td>
			  <td>
			     {KS:username}
			  </td>
			  <td>
			     {KS:adddate}
			  </td>
			 
			</tr>
			[/loop]
       <script>
	  	var pageCount = "{#PageCount}";
	  	var postUrl = "miniCollect.aspx?action=changei&courseid={KS:courseid}";
	  	var postParam = "";
           </script>
		 </table>
	  </div>
	  <div class="tis">
	  </div>
    ]]>

  </miniinvite>
  <miniinvite2>
    <![CDATA[
    
      <div class="tol-num-people">总人数：<strong>{KS:atnum}</strong></div>
	  <div class="invitation">
	     <table id="pagelist" class="invit-table" cellpadding="0" cellspacing="0" border="0" width="100%">
       [loop]
		    <tr>
         <td>
			     <a href="#" class="">{KS:rank}</a>
			  </td>
			  <td>
			     <img src="{KS:photo}" class="invitimg">
			  </td>
			  <td>
			     {KS:username}
			  </td>
			  <td>
			     {KS:adddate}
			  </td>
			 
			</tr>
			[/loop]
		 </table>
        <script>
	  	var pageCount = "{#PageCount}";
	  	var postUrl = "miniCollect.aspx?action=changei&courseid={KS:courseid}";
	  	var postParam = "";
           </script>
    	 <ul id="pagelistend" style="display:block"></ul>
             <script src="/ks_inc/loadpage.js"></script>
	  </div>

    ]]>

  </miniinvite2>
  <minicardedit>
    <![CDATA[
     <div class="regtitle">编辑名片 <font color="red">*</font><span class="mandatory">为必填项</span></div>
  <form action="" name="regpage">
     <div class="reg-item">
	    <ul>
		   <li class="r-item">
		     <p><strong><font color="red">*</font>姓名：</strong></p>
			 <p><input type="text" name="setname" class="input-item" value="{KS:username}"></p>
        <p><input type="hidden" name="id" class="input-item" value="{KS:id}"></p>
          <input type="hidden" id="courseid" name=courseid value="{KS:courseid}">
		   </li>
		   <li class="r-item">
		     <p><strong>手机号：</strong></p>
			 <p><input type="text" name="mobile" class="input-item graybg" value="{KS:mobile}"></p>
		   </li>
		   <li class="r-item">
		     <p><strong>选择推荐课堂：</strong></p>
           <input type="hidden" name=action value="save">
			 <ul class="course-list clearfix">
       [loop]
			   <li onclick="changecourse({KS:courseid})" class="course-list-l {KS:curr}">
			     <div class="change-course">
				    <div class="ch-c-img">
					   <img src="{KS:photourl}">
					</div>
					<div class="ch-c-title">
					   {KS:name}
					</div>
					<i class="ch-c-i iconfont">&#xe630;</i>
				 </div>
			   </li>
			 [/loop]
        </ul>
		   </li>
		   <li class="r-item">
			 <p><input type="submit"  value="保存" class="submit-css"></p>
		   </li>
		</ul>
	 </div>
  </form>
    
    ]]>

  </minicardedit>
  <showChat name="courselist">
    <![CDATA[ 
	   <div id="list{KS:Id}">
          <div class="lunt-main bd-d">
    	    <div class="lunt-head"><img src="{KS:Face}" onerror="replaceDefaultImg(this)"  /></div>
    	    <div class="lunt-cont">
                <div class="lunt-name">{KS:Username}</div>
                <div class="lunt-cents">
                 {$chatimg} 
                  <div class="clear"></div>
                {KS:Title}</div>
                <div class="lunt-mark">
            	    <div class="lunt-time">{KS:Time}</div>
            	    <div class="lunt-opinion"><span class="ani ani_1" onclick="addzan({KS:Id})" ></span>(<span id="zan{KS:Id}" >{KS:ZanNum}</span>)
                  <span class="info" onclick="showreplay('{KS:Id}')" ></span>(<span id="postnum{KS:Id}">{KS:PostNum}</span>)</div>
                </div>
                
                <div id="replaylist{KS:Id}"> 
                  [replay]
                     <div class="lunt-recivd"  id="replaychat{KS:Field:replayid}" > 
            	          <div class="lunt-main bd-u">
                              <div class="lunt-head"><img src="{KS:Face}" onerror="replaceDefaultImg(this)" /></div>
                              <div class="lunt-cont">
                                  <div class="lunt-name">{KS:Field:Username}</div>
                                  <div class="lunt-cents"> 
                                     {KS:field:ReplayContent}
                                  </div>
                                  <div class="lunt-mark">
                                      <div class="lunt-time">{KS:Time}</div> 
                                  </div>
                              </div>
                          </div>
                      </div>
                 [/replay]
            </div>
             
             <div id="replay{KS:Id}" class="huifu" style="display:none">
                    <div class="pr_20 md_10" style=" position:relative;">
                        <textarea class="lunt-text" rows="4" id="huifu{KS:Id}"    placeholder="回复:{KS:Username}..." ></textarea>
                    </div>
                    <input type="button" class="lunt-pos md_20" value="回复"  onclick="replaycontent({KS:Id})" >
                    <a href="javascript:;" class="f-r ml_10 mr_10 mp_5"   onClick="showemot(this,{KS:Id})">
                       <img src="{$GetTemplateDir}/images/course/imeo.png" width="25px" height="25px">
                    </a> 
                    <div class="clear"></div>
                </div> 
                   </div>
              </div>
     </div> 
     ]]>
  </showChat> 
  <!--播放页显示列表信息-->
  <showChat name="playlist">
    <![CDATA[
	       <li>
            <div class="dibo-cont">
                <div class="dibo-top">
                      <a href="javascript:;"><img  src="{KS:Face}" onerror="replaceDefaultImg(this)" type="user" ></a>                             	
                      <span class="fl user-name">{KS:Username}</span><span class="fl ml_10">{KS:Time}</span>
                      
                      
                  </div>
                <div class="dibo-bot">
                  
                    <p>{KS:Title}</p>
                    {$chatimg} 
                    <div class="dibo-state"  {KS:System}>
                      <span class="zannum" id="zancount{KS:Id}">{KS:ZanNum}</span>
  					          <span id="zan{KS:Id}" onclick="gotozan('{KS:Id}',599,'list')"><i class="ani ani_1"></i></span>
                      <span class="f-l">【{KS:chattype}】-<font color="#34bd74">{KS:chatstatus}</font></span>
  					          <div class="clear"></div>
                    </div>
                  </div> 
                  <div  id="replaylist{KS:Id}">
                  [replay]
                    <div class="lunt-recivd"  id="replaychat{KS:Field:replayid}"> 
            	          <div class="lunt-main bd-u">
                              <div class="lunt-head"><img src="{KS:Face}" onerror="replaceDefaultImg(this)" type="user" /></div>
                              <div class="lunt-cont">
                                  <div class="lunt-name">{KS:Field:Username}</div>
                                  <div class="lunt-cents"> 
                                     {KS:field:ReplayContent}
                                  </div>
                                  <div class="lunt-mark">
                                      <div class="lunt-time">{KS:Time}</div> 
                                  </div>
                              </div>
                          </div>
                      </div>
                  [/replay] 
                  </div>
                  <div style="display:none" id="replay{KS:Id}" >
                    <div class="send-tare clearfix">
							        <textarea name="saytext" id="huifu{KS:Id}"></textarea>

                      <input name="" type="button" value="回 复" style="float:none;" class="sendbtn" onclick="replaycontent({KS:Id})" />
						        </div>
                  </div> 
              </div> 
          </li>
     ]]>
  </showChat>
</coursetemplate>