<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ClubTemplateList_EditSource.aspx.cs" Inherits="Admin_Template_ClubTemplateList_EditSource" %>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>无标题页</title>
    <link rel="Stylesheet" href="../Images/Admin.css" type="text/css" />
    <script type="text/javascript" src="../Images/Admin.js"></script>
    <script type="text/javascript">
     function storeCaret (textEl) {
       if (textEl.createTextRange) 
         textEl.caretPos = document.selection.createRange().duplicate();
     }
     function setText (text) {
       sfbj=true;
       var textEl=document.getElementById("DaiMa");
       if (textEl.createTextRange && textEl.caretPos) {
         var caretPos = textEl.caretPos;
         caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == 

' ' ? text + ' ' : text;
       }
        else
         textEl.value  += text;
     }
     var sfbj=false;
     function setURL(DiZhi)
     {
        document.getElementById("BiaoQianShuoMing").src=DiZhi;
     }
    </script>
</head>
<body onload="setTimeout('document.getElementById(\'DaiMa\').value=document.getElementById(\'HDM\').value',500)" style="margin:2px">
    <form id="form1" runat="server" onkeydown="if(event.ctrlKey&&event.keyCode==13){document.getElementById('Button1').click();}">
    <div>
    <table class="tab1" border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td>
        <table class="tab2" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td class="tab2_bt">
            修改文件
            </td>
        </tr>
        <tr>
            <td>
            <table class="tab3" border="0" cellpadding="0" cellspacing="1">
            
        <tr>
            <td style="width:20%;background:#f3f8ff">内容预览</td>
            <td style="width:40%;background:#f3f8ff">
                编辑文件：<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label><a href="#" title="(快捷键：Ctrl+Enter[提交]，Tab[输出Tab字符]，Shift+Enter[输出&lt;br/&gt;])">快捷键</a></td>
            <td style="width:20%;background:#f3f8ff">标签说明及示例</td>
            <td style="width:20%;background:#f3f8ff">标签</td>
        </tr>
        <tr>
            <td style="width:20%;height:460px">
                <iframe style="width:200px;height:100%" scrolling="yes" frameborder="1" src="<%=预览地址 %>"></iframe>
            </td>
            <td style="width:40%">
                <asp:TextBox ID="DaiMa" style="width:100%;height:100%;font-size:12px;font-family:宋体;" TextMode="MultiLine" runat="server" Wrap="true"
               ONSELECT="storeCaret(this);"
               ONCLICK="storeCaret(this);"
               ONKEYUP="storeCaret(this);sfbj=true;" onkeydown="if(event.keyCode==9){setText('\t');return false;}else if(event.shiftKey&&event.keyCode==13){setText('&lt;br/&gt;\r\n');return false;}"></asp:TextBox></td>
            <td style="width:20%">
                <iframe name="BianQianShuoMing" id="BiaoQianShuoMing" style="width:100%;height:100%" scrolling="auto" frameborder="0" src="<%=Server.HtmlEncode(DZ.Value) %>"></iframe>
            </td>
            <td style="width:20%">
                <iframe name="BianQianLieBiao" style="width:100%;height:100%" scrolling="auto" frameborder="0" src="../BiaoQianLieBiao.aspx?bq=<%=Server.UrlEncode("UBB标签,高级标签,公共标签,网站应用,内容链接,动态文件链接,内容调用,社区调用,其它调用,模板变量,社区模板/"+模板类型) %>"></iframe>
                </td>
        </tr>
        <tr>
            <td></td>
            <td style="text-align:center">
                <asp:Button ID="Button2" runat="server" Text="保存代码" OnClick="Button2_Click" />
                <asp:Button ID="Button1" runat="server" Text="应用代码" OnClick="Button1_Click" />
        <input type="button" value="取消编辑" onclick="location.href='<%=Server.HtmlEncode("ClubTemplateList.aspx?ttype="+Server.UrlEncode(模板类型)) %>'" />
                </td>
            <td></td>
            <td></td>
        </tr>
            </table>
            </td>
        </tr>
        </table>
        </td>
    </tr>
    </table>
    </div>
        <asp:HiddenField ID="HDM" runat="server" />
        <asp:HiddenField ID="DZ" runat="server" />
    </form>
</body>
</html>
