<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" Inherits="Kesion.NET.WebSite.Course.Admin.Course.KS_TeacherCourse" Codebehind="KS.TcCourse.aspx.cs" %>
<%@ Import Namespace="Kesion.Publics" %>
<%@ Import Namespace="Kesion.Cache" %>
<%@ Import Namespace="Kesion.BLL" %>
<%@ Import Namespace="Kesion.Course" %>
<%@ Import Namespace="Kesion.APPCode" %>
<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" runat="server">
<style>
.courseList li .courseImg{ left:0;}
.courseList li{ padding-left:0;}
</style>
<div class="listedit">
    <%if(teacherid!=0){ %>
    <ul>
        <a href="KS.CsTeacher.aspx" class="button">返回名师</a>
    </ul>
    <%} %>
</div>
<div class="footer_page"></div>
<!--当前讲师信息-->
<%if(teacherid!=0){ %>
<div class="courseInfoTop teacherInfoTop">
   <asp:PlaceHolder ID="PlaceHolder2"  runat="server"></asp:PlaceHolder> 
</div>
<div class="blank20"></div>
<%} %>
<div class="content-area pageBlank">
    <div class="tabs_header">
		<%if(teacherid!=0){ %>
            <div class="tabButton">
               <a class="on" href="KS.TcCourse.aspx?teacherid=<%=teacherid %>&from=<%=from %>">课程</a>
                <a  href="KS.TcZan.aspx?teacherid=<%=teacherid %>&from=<%=from %>">点赞</a>
                <a href="KS.TcCollect.aspx?teacherid=<%=teacherid %>&from=<%=from %>">收藏</a>
                <a href="KS.TcMessage.aspx?teacherid=<%=teacherid %>&from=<%=from %>">留言</a>
                <a href="KS.TcAchieve.aspx?teacherid=<%=teacherid %>&from=<%=from %>">评价</a>
                <a href="KS.TcDegreeCertificate.aspx?teacherid=<%=teacherid%>&from=<%=from %>"  >学历证书</a>
                <a href="KS.TcProfessionCertificate.aspx?teacherid=<%=teacherid%>&from=<%=from %>" >职业资格证书</a>
            </div>
        <%} %>
        <ul class="tabs">
            <li <%=KSCMS.S("CosType")==""?" class='active'":string.Empty %>><a href="KS.TcCourse.aspx?teacherid=<%=teacherid %>&from=<%=from %>"><span>点播课程</span></a></li>
            <li <%=KSCMS.S("CosType")=="1"?" class='active'":string.Empty %>><a href="KS.TcCourse.aspx?CosType=1&teacherid=<%=teacherid %>&from=<%=from %>"><span>直播课程</span></a></li>
            <li <%=KSCMS.S("CosType")=="2"?" class='active'":string.Empty %>><a href="KS.TcCourse.aspx?CosType=2&teacherid=<%=teacherid %>&from=<%=from %>"><span>面授课程</span></a></li>
        </ul>
   </div> 
  <div class="clear"></div>
  <div class="courseList">
        	<ul>
			 <asp:Repeater ID="list" runat="server"  >
			 <ItemTemplate>
            	<li>
                    
                    <div class="courseImg">
                    	<img src="<%#Eval("photourl") %>" onerror="this.src='../../admin/images/nopic.png'"/>
                    </div>

                    <div class="courseInfo">
                    	<div class="courseTitle clearfix">
                            <div class="operating">
                                <div class="operatBoxBtn" style="margin-right:40px;">
                                    <a class="button"><i class="iMore"></i></a>
                                    <div class="operatBoxMore clearfix">
                                        <%if(CosType==0){ %>
                                        <a href="javascript:void(0)" onclick="top.openWin('评价','Course/KS.CosPJ.aspx?istop=1&CosType=1&courseid=<%#Eval("courseid") %>&teacherid=<%#Eval("TCID") %>',false,850,550)">评论<i>(</i><%#Eval("pjnum") %><i>)</i></a>
                                        <a href="javascript:void(0)" onclick="top.openWin('学员','Course/KS.CosLearnRecord.aspx?istop=1&CosType=1&courseid=<%#Eval("courseid").ToString() %>&teacherid=<%#Eval("TCID") %>',false,850,550)">学员<i>(</i><%#Eval("studentnum") %><i>)</i></a>
                                        <%}else if(CosType==1){ %>
                                        <a  href="javascript:void(0)" onclick="top.openWin('评价','Course/KS.CosPJ.aspx?istop=1&CosType=3&CourseId=<%#Eval("courseid") %>&teacherid=<%#Eval("tcid") %>',false,850,550)">评论<i>(</i><%#Eval("pjnum")  %><i>)</i></a>
                                    <a href="javascript:void(0)" onclick="top.openWin('学员','Course/KS.CosLearnRecord.aspx?istop=1&CosType=3&courseid=<%#Eval("courseid").ToString() %>&teacherid=<%#Eval("tcid") %>',false,850,550)">学员<i>(</i><%#Eval("studentnum")  %><i>)</i></a>
                                        <%}else{ %>
                                         <a href="javascript:void(0)" onclick="top.openWin('评价','Course/KS.CosPJ.aspx?istop=1&CosType=2&CourseId=<%#Eval("courseid") %>&teacherid=<%#Eval("TCID") %>',false,850,550)">评论<i>(</i><%#Eval("pjnum") %><i>)</i></a>
                                        <%} %>
                                    </div>
                                </div>
                            </div>
                            <div class="title clearfix">
                                <%if(KSCMS.S("CosType")=="1"){ %>
                                <a href="<%# Kesion.HtmlTags.BasicField.GetRewriteUrl("liveview", Utils.StrToInt(Eval("courseid").ToString()))%>" title="前台页" target="_blank"><%# Convert.ToString(Eval("name")) %></a>
                                <%}else if(KSCMS.S("CosType")=="2"){ %>
                                <a href="<%# Kesion.HtmlTags.BasicField.GetRewriteUrl("faceview", Utils.StrToInt(Eval("courseid").ToString()))%>" title="前台页" target="_blank"><%# Convert.ToString(Eval("name")) %></a>
                                <%}else { %>
                                <a href="<%# Kesion.HtmlTags.BasicField.GetRewriteUrl("courseview", Utils.StrToInt(Eval("courseid").ToString()))%>" title="前台页" target="_blank"><%# Convert.ToString(Eval("name")) %></a>
                                <%} %>
                            </div>
                        </div>
                        <div class="fr price">
							<%if(CosType!=2){ %>
                            <%# Utils.StrToInt(Eval("IsFree").ToString())==0?"<font class='green'>免费</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='green'>免费</font>":"¥" + Kesion.APPCode.Public.ReturnShopPrice(Utils.StrToDecimal(Eval("price_member").ToString()))%><%#Eval("promotion").ToString()=="4"?"+"+Eval("jifen").ToString()+"积分":"" %>
                            
                            <%}else{ %>
                            <%# Eval("promotion").ToString() == "3" ? Eval("jifen").ToString() + "积分" : Utils.StrToDecimal(Eval("price_member").ToString()) == 0 ? "<font color='#30b96a'>免费</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>
                            </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>
                                <%if(CosType!=2){ %>
                                <span>有效期： <%#Utils.StrToInt(Eval("shixian").ToString())==0?"无限期":Utils.StrToInt(Eval("shixian").ToString())+"天"%></span>
                                  <%} %>
                                <span>评分：<%#Eval("coursepf")%>分</span>
                            </div>
                            <div class="clear"></div>
                            <div class="buttonBox">
								<%if(CosType==0){ %>
                                
                                <%#Course.GetIsPeriod(Utils.StrToInt(Eval("courseid").ToString()))==1?"<a href=\"javascript:void(0)\" onclick=\"top.openWin('课时','Course/KS.CosPeriod.Aspx?CourseId="+Eval("courseid")+"&teacherid="+Eval("TCID")+"&istop=1',true,800,500)\" class=\"greenFont btn\"><em>"+Eval("CountPid")+"</em>&nbsp;<span>课时</span>&nbsp;>></a>  ":"" %>
                                <a href="javascript:void(0)" onclick="top.openWin('资料','Course/KS.CsZLInfo.aspx?istop=1&type=0&CourseId=<%#Eval("courseid") %>&teacherid=<%#Eval("TCID") %>',false,850,550)" class="greenFont btn"><em><%#Eval("zlnum")  %></em>&nbsp;<span>份资料</span>&nbsp;>></a>
                                <a href="javascript:void(0)" onclick="top.openWin('试卷','Course/KS.CosExamlist.aspx?istop=1&CourseId=<%#Eval("courseid") %>&teacherid=<%#Eval("TCID") %>',false,850,550)" class="greenFont btn"><em><%#Eval("sjnum") %></em>&nbsp;<span>份试卷</span>&nbsp;>></a>
                              	<%}else if(CosType==1){ %>
    
                               	<a href="javascript:void(0)" onclick="top.openWin('课时','Course/KS.CosLivePeriod.Aspx?istop=1&CourseId=<%#Eval("courseid") %>&teacherid=<%#Eval("TCID") %>',false,850,550)" class="greenFont btn"><em><%#Eval("CountPid")%></em>&nbsp;<span>课时</span>&nbsp;>></a>
                              	<a href="javascript:void(0)" onclick="top.openWin('资料','Course/KS.CsZLInfo.aspx?istop=1&type=5&CourseId=<%#Eval("courseid") %>&teacherid=<%#Eval("TCID") %>',false,850,550)" class="greenFont btn"><em><%#Eval("zlnum")  %></em>&nbsp;<span>份资料</span>&nbsp;>></a>
    
                                <%}else { %>
                                <a href="javascript:void(0)" onclick="top.openWin('已报学员','Course/KS.FaceSignUp.aspx?istop=1&teacherid=<%#Eval("TCID") %>&CourseId=<%#Eval("courseid") %>',false,850,550)" class="greenFont btn"><em><%#Eval("studentnum") %></em>&nbsp;<span>位已报学员</span>&nbsp;>></a>
                                <a href="javascript:void(0)" onclick="top.openWin('试卷','Course/KS.CosFaceExamlist.aspx?CosType=2&istop=1&CourseId=<%#Eval("courseid") %>&teacherid=<%#Eval("TCID") %>',false,850,550)" class="greenFont btn"><em><%#Eval("sjnum") %></em>&nbsp;<span>份试卷</span>&nbsp;>></a>
                                <a  href="javascript:void(0)" onclick="top.openWin('资料','Course/KS.CsZLInfo.aspx?istop=1&type=1&CourseId=<%#Eval("courseid") %>&teacherid=<%#Eval("TCID") %>',false,850,550)" class="greenFont btn"><em><%#Eval("zlnum")%></em>&nbsp;<span>份资料</span>&nbsp;>></a>
                                <%} %>
                            </div>
                        </div>
                        
                    </div>
                    
                </li>
            	</ItemTemplate>
				 <FooterTemplate>
                  <div class="empty" style="display:<%# bool.Parse((list.Items.Count==0).ToString())?"":"none"%>">没有添加任何课程</div>
                   </FooterTemplate>
				</asp:Repeater>
            </ul>
        </div>
        <script>
            $(function () {
                $(".courseList li:first").css({ borderTop: "0px" });
            });
		</script>
</div>

</asp:Content>
