<%@ Page Language="C#" AutoEventWireup="true" Inherits="Kesion.NET.WebSite.Plus.Course.LiveNotice" Codebehind="LiveNotice.aspx.cs" %>
<!DOCTYPE HTML>

    <% if (Request.Url.ToString().ToLower().IndexOf("exam/") == -1)
           Kesion.APPCode.EditorAPI.EchoHead();
       else
           Kesion.APPCode.EditorAPI.EchoExamHead();
    %>

<html>
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<link href="/admin/images/style.css" rel="stylesheet" type="text/css" />
<script src="/KS_Inc/Jquery.js" type="text/javascript"></script>
<script src="/KS_Inc/Kesion.Common.js" type="text/javascript"></script>
<script src="/KS_Inc/DatePicker/WdatePicker.js"></script>
<style>
.CTableBox{border: #E8ECED solid 1px;border-radius: 5px !important; overflow:hidden;margin-bottom: 15px;}
.CTableBox .CTable td{border-top:0;}
.main-button {bottom: 0;}
</style>
</head>
<body>
    <form id="form1" runat="server">
    <div class="content-area footBlank" style="border:0;">

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

       
    <div id="list3" class="CTableBox">

 <table width="99%"  border="0" cellpadding="1" cellspacing="1" class="CTable" style="table-layout:fixed"> 
        <tr >
              <td  align="right" class="lefttd" height="30" style="width:128px">
                  <strong>课程：</strong>
			  </td>
              <td class="righttd">
                  <asp:Label ID="txtTitle" runat="server" Text=""></asp:Label> --
                  报名人数:
                  <asp:Label ID="learnS" runat="server" Text=""></asp:Label> 人
              </td>
          </tr>
     <%if (teachWay == 5)
            { %>
          <tr>
              <td class="lefttd" height="30" align="right" style="width: 102px"><b><font color="red">*</font>选择将要直播课时：</b></td>
              <td class="righttd">
                 <select name="pid" id="live" >
                   <%=sb.ToString() %>
                 </select>
              </td>
          </tr>
     <%} %>
          <tr>
              <td align="right" class="lefttd" height="30" style="width:128px"><strong>邮件通知选项：</strong></td>
              <td class="righttd">
                  <asp:CheckBox ID="CKB1" runat="server" onclick="show(1)" Text="发送Email邮件通知" />
                  <br />
                  <asp:CheckBox ID="CKB2" runat="server" onclick="show(2)" Text="发送站内短消息通知" />
                  <br />
                  <asp:CheckBox ID="CKB5" runat="server" onclick="show(5)" Text="发送手机短消息通知" />
                  <br />
                  <asp:CheckBox ID="CKB6" runat="server" onclick="show(6)" Text="发送微信信息通知" />
                  <br />
              </td>
          </tr>
          <tr>
              <td align="right" class="lefttd" height="30" style="width:128px"><strong>上课时间：</strong></td>
              <td class="righttd">
                  <asp:TextBox ID="NotieDate" runat="server"  onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',minDate:'%y-%M-%d'});" style=" padding-left:10px;">2017-7-30:14:00</asp:TextBox>
              </td>
          </tr>
        <%if (teachWay == 0)
            { %>
        <tr>
              <td align="right" class="lefttd" height="30" style="width:128px"><strong>上课地点：</strong></td>
              <td class="righttd">
                  <asp:TextBox ID="TxtAddress" runat="server" style=" padding-left:10px;"></asp:TextBox>
              </td>
          </tr>
       <%} %>
          <tr id="title">
              <td  align="right" class="lefttd" height="30" style="width:128px">
                  <strong>微信消息模板：</strong>
			  </td>
              <td class="righttd">
                  <asp:TextBox ID="TextBox1" runat="server" Columns="60" CssClass="textbox textarea" Height="60" Rows="6" TextMode="MultiLine" Width="550"></asp:TextBox>
              </td>
            
          </tr>
          <tr>
          <tr id="sendemail" style="display:none">
               <td align="right" class="lefttd" height="30" style="width:128px">
                  <div>
                      <strong>发放成功发送一封邮件给用户：</strong>
                      <div class="tips">
                          
                      </div>
                  </div>
              </td>
              <td class="righttd">
                  <asp:TextBox ID="TxtRegSuccMail" runat="server" Height="120" TextMode="MultiLine" Width="650">
                     
                  </asp:TextBox>
                  <% Kesion.APPCode.EditorAPI.EchoEditor("editor1", this.TxtRegSuccMail.ClientID, "Basic");%>
                  <br />
                  Tips:内容留空将不发送！！！ </td>
          </tr>
          <tr id="sendsite" style="display:none">
              <td align="right" class="lefttd" height="30" style="width:128px">
                  <div>
                      <strong>发放成功发送一条站内给用户：</strong>
                      <div class="tips">
                    
                      </div>
                  </div>
              </td>
              <td class="righttd">
                  <asp:TextBox ID="TxtSendSite" runat="server" Height="120" TextMode="MultiLine" Width="650">
                         
                  </asp:TextBox>
                  <% Kesion.APPCode.EditorAPI.EchoEditor("editor2", this.TxtSendSite.ClientID, "Basic");%>
                  <br />
                  Tips:内容留空将不发送！！！ </td>
          </tr>
          <tr id="sendmobile" style="display:none">
              <td align="right" class="lefttd" height="30" style="width:128px">
                  <div>
                      <strong>发放成功发送一条短信给用户：</strong>
                      <div class="tips">
                        
                      </div>
                  </div>
              </td>
              <td class="righttd">
                  <asp:TextBox ID="TxtSendMobile" runat="server" Columns="60" CssClass="textbox textarea" Height="120" Rows="6" TextMode="MultiLine" Width="650">
                        
                  </asp:TextBox>
                  <a class="textarea_min" href="javascript:zoomtextarea(-5,'<%=this.TxtSendMobile.ClientID %>');"></a><a class="textarea_max" href="javascript:zoomtextarea(5,'<%=this.TxtSendMobile.ClientID %>');"></a>
                  <br />
                  Tips:内容留空将不发送！！！ </td>
          </tr>
          <tr>
           <td class="lefttd" colspan="2" style="text-align:center">
           	  <div class="main-button"><asp:Button ID="Button2" runat="server" OnClick="Button2_Click" CssClass="button" Text="确定通知" OnClientClick="return(check())"/></div>
           </td>
          </tr>
         </table>
        
        </div>
		<script type="text/javascript">
            showtips('<span class="state"><strong>操作说明：</strong><br /></span>1.可以以邮件、站内、手机短息，微信四种方式进行短息通知已购买该课程的学员<br />2.标签： {$GetSiteName}：网站名称 {$CourseName}:课程名称  {$UserName}：用户名 {$Time} 开课时间  {$Address}面授课的上课地点!');
		</script>
        </asp:Panel>
      
  </div> 
<script>
    jQuery(document).ready(function () {
        $("#sendmobile").hide();
        $("#sendemail").hide();
        $("#sendsite").hide();


        $("#sendnmobile").hide();
        $("#sendnemail").hide();
        $("#sendnsite").hide();
        $("#title").hide();
    });

    function show(id) {

        if (id == 1) {
            if (document.getElementById("<%=CKB1.ClientID%>").checked) {
                $("#sendemail").show();
             
            }
            else {
                if (document.getElementById("<%= CKB2.ClientID%>").checked == false) {
                    $("#sendemail").hide();
                
                }
                $("#sendemail").hide();
            }
        }
        else if (id == 2) {
            if (document.getElementById("<%= CKB2.ClientID%>").checked) {
                $("#sendsite").show();
              
            }
            else {
                if (document.getElementById("<%= CKB1.ClientID%>").checked == false) {
                    $("#sendsite").hide();                 

                }
                $("#sendsite").hide();

            }
        }
        else if (id == 5) {


            if (document.getElementById("<%= CKB5.ClientID%>").checked) {
                $("#sendmobile").show();
             
            }
            else {
                $("#sendmobile").hide();
            
            }

        }
        else if (id == 6) {
            if (document.getElementById("<%= CKB6.ClientID%>").checked) {
                $("#title").show();
            } else {
                $("#title").hide();
            }
        }
    }
    function check() {
        var str = jQuery("#live").val()
        if (str == "0") {
            alert("请选择课时");
            return false;
        }

    }
</script>
   
    </form>
</body>
</html>
