global_templatetree.aspx
上传用户:wenllgg125
上传日期:2020-04-09
资源大小:7277k
文件大小:5k
源码类别:

SCSI/ASPI

开发平台:

Others

  1. <%@ Page language="c#" Inherits="Discuz.Web.Admin.templatetree" Codebehind="global_templatetree.aspx.cs" %>
  2. <%@ Register TagPrefix="cc3" Namespace="Discuz.Control" Assembly="Discuz.Control" %>
  3. <%@ Register TagPrefix="cc2" Namespace="Discuz.Control" Assembly="Discuz.Control" %>
  4. <%@ Register Src="../UserControls/PageInfo.ascx" TagName="PageInfo" TagPrefix="uc1" %>
  5. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  6. <html>
  7. <head id="Head1">
  8. <title>生成模板</title>
  9. <link rev="stylesheet" media="all" href="../styles/default.css" type="text/css" rel="stylesheet" />
  10. <link href="../styles/dntmanager.css" type="text/css" rel="stylesheet" />
  11. <link href="../styles/tab.css" type="text/css" rel="stylesheet" />
  12. <script type="text/javascript" src="../js/common.js"></script>
  13. <script type="text/javascript">
  14. /*function getCookie(name)//取cookies函数        
  15. {
  16. var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
  17. if(arr != null) 
  18. return unescape(arr[2]); 
  19. return null;
  20. }*/
  21. function nodeCheckChanged(node)
  22. {
  23. var status = "未选取"; 
  24. if (node.Checked) status = "选取"; 
  25. }  
  26. function checkedEnabledButton1()
  27. {
  28. for (var i = 0; i < arguments[0].elements.length; i++)
  29. {
  30. var e = arguments[0].elements[i];
  31. if (e.type == "checkbox" && e.checked)
  32. {
  33. for(var j = 1; j < arguments.length; j++)
  34. {
  35. document.getElementById(arguments[j]).disabled = false;
  36. }
  37. return;
  38. }
  39. }
  40. for(var j = 1; j < arguments.length; j++)
  41. {
  42. document.getElementById(arguments[j]).disabled = true;
  43. }
  44. }
  45. function Check(form)
  46. {
  47. CheckAll(form);
  48. checkedEnabledButton1(form,'TabControl1:tabPage22:CreateTemplate','TabControl1:tabPage22:DeleteTemplateFile')
  49. }
  50. /*function getTemplateList()
  51. {
  52. var commontemplate = getCookie("commontemplate");
  53. if(commontemplate == null) return;
  54. var tempstr = "";
  55. var filelist = commontemplate.split(",");
  56. for(var i = 0 ; i < filelist.length ; i++)
  57. {
  58. if(filelist[i].indexOf(".config") != -1)
  59. {
  60. tempstr += "<img src='../images/config.gif' />" + filelist[i] + "&nbsp;";
  61. }
  62. else
  63. {
  64. tempstr += "<img src='../images/htm.gif' />" + filelist[i] + "&nbsp;";
  65. }
  66. }
  67. return tempstr;
  68. }*/
  69. </script>
  70. <meta http-equiv="X-UA-Compatible" content="IE=7" />
  71. </head>
  72. <body>
  73. <form id="Form1" runat="server">
  74. <%if(Request.Params["templateid"]=="1"){%>
  75. <uc1:PageInfo ID="info1" runat="server" Icon="information" Text="<ul><li>您正在修改默认模板,为了扩充其他模板的方便,强烈建议您不要对默认模板的内容进行修改. </li></ul><ul><li>点击相应的模板文件进行编辑</li></ul>" />
  76. <%}else{%>
  77. <uc1:PageInfo ID="PageInfo1" runat="server" Icon="information" Text="点击相应的模板文件进行编辑" />
  78. <%}%>
  79. &nbsp;&nbsp; <b>当前模板: <%=Request.Params["templatename"]%></b><br /><br />
  80. <table class="table1" cellspacing="0" cellpadding="4" width="100%" border="0">
  81. <tr>
  82. <td width="3"></td>
  83. <td>
  84. <!--常生成的模板:<span id="templatelist"></span>-->
  85. <cc3:TabControl id="TabControl1" SelectionMode="Client" runat="server" TabScriptPath="../js/tabstrip.js" width="760" height="100%">
  86. <cc3:TabPage Caption="模板文件" ID="tabPage22">
  87. <div style="OVERFLOW: auto;HEIGHT: 400px">
  88. <cc2:CheckBoxList id="TreeView1" runat="server" RepeatColumns="3"></cc2:CheckBoxList>
  89. </div>
  90. <br />
  91. <p style="text-align:right;">
  92. <input type="checkbox" id="chkall" name="chkall" onclick="Check(this.form);" />选择全部 &nbsp;&nbsp;
  93. <cc2:Button id="CreateTemplate" runat="server" Text=" 按选中的模板文件生成页面 " OnClick="CreateTemplate_Click"></cc2:Button>&nbsp;&nbsp;
  94. <cc2:Button id="DeleteTemplateFile" runat="server" Text="删除指定的模板文件" ButtonImgUrl="../images/del.gif" OnClick="DeleteTemplateFile_Click" OnClientClick="if(!confirm('你确认要删除所选模板文件吗?n删除后将不能恢复!')) return false;"></cc2:Button>&nbsp;&nbsp;
  95. <button type="button" class="ManagerButton" onclick="window.location.href='global_templatevariable.aspx?templateid=<%=Request.Params["templateid"]%>&templatename=<%=Request.Params["templatename"]%>&path=<%=Request.Params["path"]%>'">模板变量列表</button>&nbsp;&nbsp;
  96. <button type="button" class="ManagerButton" id="Button3" onclick="window.location='global_templatesgrid.aspx';"><img src="../images/arrow_undo.gif"/> 返 回 </button>
  97. </p>
  98. </cc3:TabPage>
  99. <cc3:TabPage Caption="其它文件" ID="tabPage33">
  100. <div style="OVERFLOW: auto;HEIGHT: 400px" align="left">
  101. <asp:Repeater id="TreeView2" runat="server">
  102. <ItemTemplate>
  103. <%# DataBinder.Eval(Container.DataItem,"filename").ToString()%><br />
  104. </ItemTemplate>
  105. </asp:Repeater>                    
  106. </div>
  107. </cc3:TabPage>
  108. </cc3:TabControl>
  109. </td>
  110. </tr>
  111. </table>
  112. <br />
  113. <asp:label id="lblClientSideCheck" runat="server" CssClass="hint">&nbsp;</asp:label>
  114. <asp:label id="lblCheckedNodes" runat="server" CssClass="hint">&nbsp;</asp:label>
  115. <asp:label id="lblServerSideCheck" runat="server" CssClass="hint">&nbsp;</asp:label>
  116. <script type="text/javascript">
  117.   document.getElementById("lblClientSideCheck").innerText = document.getElementById("lblServerSideCheck").innerText;
  118.   //document.getElementById("templatelist").innerHTML = getTemplateList();
  119. </script>
  120. <br />
  121. </form>
  122. <%=footer%>
  123. </body>
  124. </html>