<%@ Page Language="C#" Title="资料修改" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="True" Inherits="Kesion.NET.WebSite.Course.Admin_Course_KS_CsZlInfo" Codebehind="KS.CsZlInfo.aspx.cs" %>

<%@ Import Namespace="Kesion.Publics" %>
<%@ Import Namespace="Kesion.Cache" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="Kesion.Course" %>
<%@ Import Namespace="Kesion.BLL" %>
<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" Runat="Server">

 <asp:Panel ID="ListPanel" runat="server" Width="100%">

            <%if(istop==0){ %>
         <div class="listedit">
               <ul>
                     <a href="?action=add&type=<%=KSCMS.S("type") %>&courseid=<%=KSCMS.S("courseid") %>" class="button button_on">添加</a>               
                     <asp:LinkButton ID="delclassbutton" runat="server" OnClientClick="return(GetIDS('del'));" OnClick="delclassbutton_Click" CssClass="button">删除</asp:LinkButton>
                     <a href="<%=KSCMS.S("type")=="5"?"KS.CosLiveList.aspx":KSCMS.S("type").ToString()=="1"?"KS.CosFaceList.aspx":"KS.CosList.aspx?costype="+KSCMS.S("costype") %>" class="button">返回课程列表</a>
                     
               </ul>
         </div>


      		<!--<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>-->




     <!--当前课程信息-->
     <asp:PlaceHolder ID="PlaceHolder1"  runat="server"></asp:PlaceHolder>
    


    <div class="content-area">

        <div class="myTitle">
            <div class="tabButton">
                  <%if(Course.GetIsPeriod(CourseId)==1){ %>
				  <%if (Utils.StrToInt(KSCMS.S("type")) != 1)
        { %>
                 <%if (Utils.StrToInt(KSCMS.S("type")) == 0)
                   { %>
              
                    <a href="KS.CosPeriod.Aspx?CourseId=<%=CourseId %>&teacherid=<%=teacherid%>">课时</a>
              
                  <%}else 
                    {%>
                    
                  <a href="KS.CosLivePeriod.Aspx?CourseId=<%=CourseId %>&teacherid=<%=teacherid%>">课时</a>
             
                 <%} %>
                 <%} %>
                <%} %>
                   
                  <%if (Utils.StrToInt(KSCMS.S("type")) != 1)
        { %>
                 <%if (Utils.StrToInt(KSCMS.S("type")) == 0)
                   { %>
              
                   
                <a  href="KS.CsTeacher.aspx?CourseId=<%=CourseId %>&teacherid=<%=teacherid%>&CosType=<%=Utils.StrToInt(KSCMS.S("type"))==0?"1":Utils.StrToInt(KSCMS.S("type"))==5?"3":"2" %>">教师</a>
                  <%}else 
                    {%>
                    
       
                 <a  href="KS.CsTeacher.aspx?CourseId=<%=CourseId %>&teacherid=<%=teacherid%>&CosType=<%=Utils.StrToInt(KSCMS.S("type"))==0?"1":Utils.StrToInt(KSCMS.S("type"))==5?"3":"2" %>">教师</a>
    
                 <%} %>
                 <%} %>

                <%if (type == 1)
                  { %>

                <a  href="KS.FaceSignUp.aspx?CourseId=<%=CourseId %>&teacherid=<%=teacherid%>&CosType=2&type=<%=Utils.StrToInt(KSCMS.S("type")) %>">已报名</a>
                 <a  href="KS.CosFaceExamlist.aspx?courseid=<%=CourseId %>&teacherid=<%=teacherid%>&CosType=2&type=<%=Utils.StrToInt(KSCMS.S("type"))%>">试卷</a>
              
                <a  href="KS.CsTeacher.aspx?CourseId=<%=CourseId %>&teacherid=<%=teacherid%>&CosType=<%=Utils.StrToInt(KSCMS.S("type"))==0?"1":Utils.StrToInt(KSCMS.S("type"))==5?"3":"2" %>&type=<%=Utils.StrToInt(KSCMS.S("type"))%>">教师</a>

                <%} %>
                    <a class="on" href="KS.CsZLInfo.aspx?type=<%=Utils.StrToInt(KSCMS.S("type")) %>&CourseId=<%=CourseId %>&teacherid=<%=teacherid%>&CosType=<%=Utils.StrToInt(KSCMS.S("costype"))%>">资料</a>
                 <%if (Utils.StrToInt(KSCMS.S("type")) == 0)
                   { %>
                   <a href="KS.CosExamlist.aspx?CourseId=<%=CourseId %>&teacherid=<%=teacherid%>">试卷</a>
                 <%} %>
                   <%if (type != 1)
                     { %>
                     <a href="KS.CosLearnRecord.aspx?courseid=<%=CourseId %>&teacherid=<%=teacherid%>&CosType=<%=Utils.StrToInt(KSCMS.S("type"))==0?"1":Utils.StrToInt(KSCMS.S("type"))==5?"3":"2" %>">学员</a>
                 <%} %>
                     <a href="KS.CosPJ.aspx?courseid=<%=CourseId %>&teacherid=<%=teacherid%>&CosType=<%=Utils.StrToInt(KSCMS.S("type"))==0?"1":Utils.StrToInt(KSCMS.S("type"))==5?"3":"2" %>&type=<%=Utils.StrToInt(KSCMS.S("type"))%>">评价</a>

         </div>
        
        	资料管理
        </div>

        <%} %>

      <asp:Repeater ID="Repeater1" runat="server"  onitemcommand="Repeater1_ItemCommand" >
          <HeaderTemplate>
         
          <table width="98%"  border="0" cellpadding="1" cellspacing="1" class="CTable mytable">
              <tr class="CTitle topbar">
                <%if(istop==0){ %><td height="25" width="30" align="center"><input type="checkbox" class="checkbtn" name="chkall" id="chkall" onclick="CheckAll(this.form);" /></td>
              <%} %>
                <td height="25" width="30" align="center"><b>序号</b></td>
                <td height="25" width="70" align="center"><b>状态</b></td>
                <td style="text-align:left">&nbsp;&nbsp;<b>资料名称</b></td>
              
                   <td width="70">&nbsp;&nbsp;<b>文件大小</b></td>
                 
                   <td width="70">&nbsp;&nbsp;<b>权限</b></td>
                 
                <td width="70">&nbsp;&nbsp;<b>上传者</b></td>
                <td  width="120">&nbsp;&nbsp;<b>添加时间</b></td>
                <%if(istop==0){ %>
               <td  width="35"><b>编辑</b>
               <td  width="35"><b>删除</b>
                <%} %>
               </td>
              </tr>
          </HeaderTemplate>
         <ItemTemplate>
             <TR class="tdbg sort bar">
                 <td height="38" align="center" nowrap>
               		<input type="checkbox"  name="ids" id="ids" value="<%#Eval("zlid") %>" class="checkbtn" />              
                 </td>
                 <td  align="center">
               <%#(Repeater1.Items.Count + 1)%>
                 </td>
                <td class="Ctd" align="center">
				<a href="?action=IsPublic&id=<%#Eval("zlid")%>&type=<%#type %>&teacherid=<%#teacherid%>" <%# Utils.StrToInt(Eval("verify"))==1?"class='ok' title='审核'":"class='no' title='未审核'" %>></a>
				</td>
				 <td class="pLeft10 size14">
				 
				  <%# Eval("ZLName")%>&nbsp;
                 
				</td>
           
              <td  align="center">
				 <strong>
				 <%# Eval("size")%>KB
				</strong>
				</td>
           
                 <td  align="center">
				
				<%# Eval("ispublic").ToString()=="1"?"免费":"购课后下载"%>
				
				</td>               
                <td  align="center">
				 
				 <%# Eval("username")%>
				
				</td>

                 <td width="135">
				 <%# Eval("adddate")%>

                </td>
                  <%if(istop==0){ %>
                <td class="Ctd" align="center" >
               
                  <asp:LinkButton ID="LinkButton2"  ToolTip="编辑"  runat="server" commandargument=<%#Eval("zlid") %> commandname="modify" CssClass="edit">编辑</asp:LinkButton>
                
				</td>
			   <td class="Ctd" align="center">
                  <asp:LinkButton  ToolTip="删除"  runat="server" id="LinkButton3"  commandargument=<%#Eval("zlid") %>  OnClientClick="return(confirm('确定删除吗?'));" commandname="del" CssClass="delete">删除</asp:LinkButton>
                </td>
                 <%} %>
			 </TR>
		
         </ItemTemplate>
          <FooterTemplate>
           <tr class="tdbg" style="display:<%# bool.Parse((Repeater1.Items.Count==0).ToString())?"":"none"%>">
                <td class="Ctd" colspan="10">
                 <div class="empty">您还没有添加任何资料</div>
                </td>
               </tr> 
           </table>
          </FooterTemplate>
        </asp:Repeater>


     <KS:Page ID="page1" runat="server" />
       <br />
         <script type="text/javascript">
             showtips('<span class="state"><strong>操作说明：</strong><br /></span>1.资料如果需要预览只能是pdf格式；2.课程是收费<的话，那么该资料可以设置是否购课后方可下载，如果这门课程是免费的，那么该资料只能是免费下载。');
		</script>
        </div>
</asp:Panel>

    <asp:Panel ID="AddPanel" runat="server" Width="100%">
    <!--<KS:TopNav ID="TopNav1" runat="server" Text="添加资料" />-->
       
     <div class="content-area mt20">
	 	<div class="myTitle">添加资料</div>
        <input type="hidden" value="<%=KSCMS.S("costype") %>" name="costype" />
        <div style="display:none">
     	<asp:Label ID="LabTips" runat="server"></asp:Label>
			<asp:TextBox ID="coursetype" style="display:block" runat="server"></asp:TextBox>
        </div>
        <%--<div class="myTitle">添加<i class="pl_pr2">/</i>编辑</div>--%>
        <table width="99%"  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" Width="300px"></asp:TextBox>
          
         </td>
     </tr>
        <tr>
        <td align="right" class="lefttd" height="30" ><strong>演讲名字：</strong></td>
         <td class="righttd"><asp:TextBox ID="TcName" CssClass="textbox" runat="server" Width="100px"></asp:TextBox>
        
         </td>
     </tr>
    <tr>
        <td align="right" class="lefttd" height="30" ><strong>封面图片：</strong></td>
         <td class="righttd"><asp:TextBox ID="photourl" CssClass="textbox" runat="server" Width="300px"></asp:TextBox>
             &nbsp;<input type="button" class="button" onclick="SelectFiles('<%=this.photourl.ClientID%>',0);" value="选择图片" />
             <div class="blank10"></div>
             <%=Kesion.APPCode.UploadAPI.EchoUpload("coursePic",this.photourl.ClientID) %>
         </td>
     </tr>


       <tr>
        <td align="right" class="lefttd" height="30" > <font color ="red">*</font><strong>上传资料：</strong></td>
         <td class="righttd"><asp:TextBox ID="TextBox2" CssClass="textbox" runat="server" Width="300px"></asp:TextBox>
          	&nbsp;<input type="button" class="button" onclick="SelectFiles('<%=this.TextBox2.ClientID %>',-10);" value="选择资料" /> 
          	<div class="blank10"></div>
       		<%=Kesion.APPCode.UploadAPI.EchoUpload("coursepptFile",this.TextBox2.ClientID) %>
        	上传PDF格式文件支持在线图文浏览,若有ppt格式只能下载，不支持在线预览。
         </td>
     </tr>
         <tr>
            <td align="right" class="lefttd" height="30" style="width: 102px">
                <strong>是否购课后下载：</strong></td>
            <td class="righttd">
             <asp:RadioButtonList ID="RadioPrices" runat="server" Width="207px" RepeatDirection="Horizontal" Height="24px" onclick="free()" >
              <asp:ListItem Value="1" Selected="True">否</asp:ListItem>
              <asp:ListItem Value="0">是</asp:ListItem>
             </asp:RadioButtonList>
             </td>
        </tr>
<tbody id="pricebody" style="display:none">
      <tr  >
          <td align="right" class="lefttd" height="30" style="width: 102px">
                <strong>价格：</strong></td>
          
              <td class="righttd">
           <asp:TextBox ID="TextPrices"  runat="server" CssClass="textbox" Width="50px" /> 元
             </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="TextPage" runat="server" CssClass="textbox" Text="0" Width="50px" />
               0为全部可以看 </td>
    </tbody>
     <tr>
        <td align="right" class="lefttd"  ><strong>资料简介：</strong></td>
         <td class="righttd"><asp:TextBox ID="TxtIntro" TextMode="MultiLine" Width="80%" Height="160px" runat="server"></asp:TextBox>
         <% Kesion.APPCode.EditorAPI.EchoEditor("editor", this.TxtIntro.ClientID, "Basic");%>
        </td>
     </tr>
        <tr>
            <td align="right" class="lefttd" height="30" style="width: 102px">
                <strong>状态：</strong></td>
            <td class="righttd" nowrap="nowrap">
             <asp:RadioButtonList ID="RdbVerify" runat="server" Width="137px" 
                    RepeatDirection="Horizontal" Height="24px">
              <asp:ListItem Value="1" Selected="True">审核</asp:ListItem>
              <asp:ListItem Value="0">未审核</asp:ListItem>
             </asp:RadioButtonList>
             </td>
        </tr>
        
      <tr style="display:none">
            <td align="right" class="lefttd" height="30" style="width: 102px">
                <strong>关键字Tags：</strong></td>
            <td class="righttd">
             <asp:TextBox ID="TxtKeyTags"  runat="server" CssClass="textbox" Width="300px" /> 
             </td>
        </tr>
            <script>
                function free() {
                    return;
                    var checkrad = jQuery("#<%=this.RadioPrices.ClientID %> :radio[checked]").val();
                    if (checkrad == "0") {
                        $("#pricebody").show();
                    }else{
                        $("#pricebody").hide();
                    }
                }
                $(document).ready(function(){
                    free();
                  
                });
				
				

          
</script>

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

</asp:Content>

