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

SCSI/ASPI

开发平台:

Others

  1. <%@ Page Language="c#" Inherits="Discuz.Web.Admin.templatesedit" Codebehind="global_templatesedit.aspx.cs" %>
  2. <%@ Register TagPrefix="uc1" TagName="TextareaResize" Src="../UserControls/TextareaResize.ascx" %>
  3. <%@ Register TagPrefix="cc1" Namespace="Discuz.Control" Assembly="Discuz.Control" %>
  4. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
  5. <html>
  6. <head>
  7. <title>templatesedit</title>
  8. <link href="../styles/dntmanager.css" type="text/css" rel="stylesheet" />
  9. <link href="../styles/colorpicker.css" type="text/css" rel="stylesheet" />
  10. <style type="text/css">
  11. .img
  12. {
  13. border:0px;
  14. align:bottom;
  15. position:relative;
  16. top:0.5%;
  17. }
  18. </style>
  19. <script type="text/javascript">
  20. var n = 0;
  21. function displayHTML(obj) {
  22. window.open(obj, 'popup', 'toolbar = no, status = no, scrollbars=yes');
  23. }
  24. function HighlightAll(obj) {
  25. obj.focus();
  26. obj.select();
  27. if (document.getElementById("templatenew_posttextarea")) {
  28. obj.createTextRange().execCommand("Copy");
  29. window.status = '将模板内容复制到剪贴板';
  30. setTimeout("window.status=''", 1800);
  31. }
  32. }
  33. function findInPage(obj, str) {
  34. try
  35. {
  36. var txt, i, found;
  37. if (str == "") {
  38. return false;
  39. }
  40. if (document.layers) {
  41. if (!obj.find(str)) {
  42. while(obj.find(str, false, true)) {
  43. n++;
  44. }
  45. } else {
  46. n++;
  47. }
  48. if (n == 0) {
  49. alert("未找到指定字串. ");
  50. }
  51. }
  52. if (document.getElementById("templatenew_posttextarea")) {
  53. txt = obj.createTextRange();
  54. for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) {
  55. txt.moveStart('character', 1);
  56. txt.moveEnd('textedit');
  57. }
  58. if (found) {
  59. txt.moveStart('character', -1);
  60. txt.findText(str);
  61. txt.select();
  62. txt.scrollIntoView();
  63. n++;
  64. } else {
  65. if (n > 0) {
  66. n = 0;
  67. findInPage(str);
  68. } else {
  69. alert("未找到指定字串. ");
  70. }
  71. }
  72. }
  73. return false;
  74. }
  75. catch(error)
  76. {
  77. alert("已经到达文件尾!");
  78. }
  79. }
  80. </script>
  81. <script type="text/javascript" src="../js/common.js"></script>
  82. <meta http-equiv="X-UA-Compatible" content="IE=7" />
  83. </head>
  84. <body>
  85. <div class="ManagerForm">
  86. <form id="Form1" method="post" runat="server">
  87. <table width="100%">
  88. <tr><td class="item_title" colspan="2">编辑文件</td></tr>
  89. <tr>
  90. <td class="vtop rowform">
  91.  <b><%=filename%></b>
  92. </td>
  93. <td class="vtop"></td>
  94. </tr>
  95. <tr><td class="item_title" colspan="2">获取颜色</td></tr>
  96. <tr>
  97. <td class="vtop rowform">
  98. <cc1:ColorPicker ID="ColorPicker1" runat="server" ReadOnly="True"></cc1:ColorPicker>
  99. <uc1:TextareaResize ID="templatenew" runat="server" controlname="templatenew" is_replace="false" rows="20" cols="120"></uc1:TextareaResize>
  100. </td>
  101. <td class="vtop"></td>
  102. </tr>
  103. <tr>
  104. <td class="vtop rowform">
  105. <input name="search" type="text" accesskey="t" size="20" onchange="n=0;" />&nbsp;
  106. <button type="button" class="ManagerButton" accesskey="f" onclick="findInPage(this.form.templatenew_posttextarea, this.form.search.value)">
  107. <img src="../images/search.gif" />搜索
  108. </button>&nbsp;&nbsp;
  109. <button type="button" class="ManagerButton" accesskey="c" onclick="HighlightAll(this.form.templatenew_posttextarea,'')">
  110. <img src="../images/topictype.gif" />复制
  111. </button>&nbsp;&nbsp;
  112. <%if(filename.IndexOf(".config") == -1){ %>
  113. <button type="button" class="ManagerButton" accesskey="p" onclick="displayHTML('<%=filenamefullpath%>')">
  114. <img src="../images/cache_resetall.gif" />预览
  115. </button>
  116. <%} %>
  117. </td>
  118. <td class="vtop"></td>
  119. </tr>
  120. </table>
  121. <p style="text-align:right;width:80%;">
  122. <cc1:Button ID="SavaTemplateInfo" runat="server" Text=" 提 交 "></cc1:Button>&nbsp;&nbsp;
  123. <button class="ManagerButton" type="button" onclick="javascript:window.location.href='global_templatetree.aspx?templateid=<%=Request.Params["templageid"]%>&path=<%=Request.Params["path"].Split('\')[0]%>&templatename=<%=Request.Params["templatename"]%>';">
  124. <img src="../images/arrow_undo.gif" /> 返 回 
  125. </button>
  126. </p>
  127. </form>
  128. </div>
  129. <%=footer%>
  130. </body>
  131. </html>