uploadTemplate.aspx
上传用户:lanchensha
上传日期:2022-02-27
资源大小:7530k
文件大小:10k
源码类别:

编辑器/阅读器

开发平台:

C#

  1. <%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" Inherits="DotNetTextBox.UpLoad"%>
  2. <%@ Import Namespace="DotNetTextBox" %>
  3. <html>
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  6. <base target="_self" />
  7. <script language="javascript" type="text/javascript">
  8. var userAgent = navigator.userAgent.toLowerCase();
  9. var is_ie = (userAgent.indexOf('msie') != -1);
  10. function loading(showmessage)
  11. {
  12. document.getElementById("loading").style.visibility="visible";
  13. document.getElementById("statusmessage").innerHTML=showmessage;
  14. return true;
  15. }
  16. function insertTemplate()
  17. {
  18. if(document.getElementById("file_path").value!="")
  19. {
  20. if(is_ie)
  21. {
  22. window.returnValue = document.getElementById("templateContent").value;
  23. }
  24. else
  25. {
  26. window.opener.inserObject(null,'template',document.getElementById("templateContent").value);
  27. }
  28. }
  29. window.close();
  30. }
  31. function add(name)
  32. {
  33. if(is_ie)
  34. {
  35. var path=document.getElementById("path").innerText;
  36. }
  37. else
  38. {
  39. var path=document.getElementById("path").textContent;
  40. }
  41. document.getElementById("file_path").value=path+name;
  42. document.getElementById("file_path").focus();
  43. }
  44. var sTitle='<%=ResourceManager.GetString("uploadtemplate")%>';
  45. window.focus();
  46. document.write("<TITLE>" + sTitle + "</TITLE>");
  47. </script>
  48. <link href="stylesheet.css" rel="stylesheet" type="text/css" />
  49. </head>
  50. <body topmargin="0">
  51. <form id="uploadFace" runat="server">
  52. <table border="0" align=center style="word-break:break-all" width="100%">
  53. <tr>
  54. <td colspan="3" rowspan="3">
  55. <fieldset><legend><span style="color: darkgray"><span style="color: gray"><%=ResourceManager.GetString("uploadface")%></span>&nbsp;
  56. </span></legend>
  57. <%=ResourceManager.GetString("uploadpath")%>:<asp:Label ID="path" runat="server" ForeColor="Black"></asp:Label>&nbsp;&nbsp;&nbsp;<asp:ImageButton ID="returndir" OnClick="returndir_Click" ImageUrl="img/parentfolder.gif" runat=server/>..<br />
  58. <%=ResourceManager.GetString("uploadfiles")%>:<asp:FileUpload ID="FileUpload1" runat="server" Width="388px" Height="21px" TabIndex="2" Font-Size="10pt" />
  59. <asp:Button ID="uploadBtn" runat="server" OnClick="UploadBtn_Click"/><br />
  60. <%=ResourceManager.GetString("filepath")%>:<asp:TextBox ID="file_path" runat="server" Width="316px" TabIndex="1"></asp:TextBox>
  61. <asp:Button ID="insertTemplate" runat="server" OnClick="insertTemplate_Click" /><br />
  62. [ <%=ResourceManager.GetString("uploaduse")%>:<asp:label ID="useSpace" ForeColor="Red" runat=server />,<%=ResourceManager.GetString("have")%>:<asp:label ID="space" ForeColor="Red" runat=server /><%=ResourceManager.GetString("singlesize")%>:<asp:Label ID="maxSingleUploadSize" runat="server" ForeColor="Red"></asp:Label>
  63. ]</fieldset>
  64. <br /><fieldset style="text-align: center"><legend><span style="color: darkgray"><span style="color: gray"><%=ResourceManager.GetString("filelist")%></span>&nbsp;
  65. </span></legend>
  66. <div id="fileshow" style="border-right: 1.5pt inset; border-top: 1.5pt inset; vertical-align: middle;
  67. overflow: auto; border-left: 1.5pt inset; width: 100%; border-bottom: 1.5pt inset;
  68. height: 240px; background-color: white">
  69. <asp:GridView runat="server" id="File_List" HeaderStyle-HorizontalAlign=Center AutoGenerateColumns="False" HeaderStyle-BackColor="buttonface" HeaderStyle-ForeColor=windowtext HeaderStyle-Font-Bold="True" Width="100%" BorderWidth="1px" OnRowCancelingEdit="File_List_RowCancelingEdit" OnRowUpdating="File_List_RowUpdating">
  70. <Columns>
  71. <asp:TemplateField>
  72. <HeaderTemplate>
  73. <asp:CheckBox ID="checkall" runat="server" Text=<%#ResourceManager.GetString("selectall")%> AutoPostBack="true" OnCheckedChanged="checkAll" />
  74. </HeaderTemplate>
  75. <ItemTemplate>
  76. <asp:CheckBox ID="check" runat="server" />
  77. </ItemTemplate>
  78. <ItemStyle HorizontalAlign="Center" Width="45px" />
  79. </asp:TemplateField>
  80. <asp:TemplateField>
  81. <EditItemTemplate>
  82. <asp:TextBox ID="editName" Text=<%#DataBinder.Eval(Container.DataItem,"Attributes").ToString().ToLower()=="directory"?DataBinder.Eval(Container.DataItem,"Name"):DataBinder.Eval(Container.DataItem,"Name").ToString().Replace(DataBinder.Eval(Container.DataItem,"Extension").ToString(),string.Empty)%> Width="100px" runat=server></asp:TextBox> <asp:Button ID="editBtn" CommandName="Update" CommandArgument=<%#DataBinder.Eval(Container.DataItem,"Name")%> runat=server Text=<%#ResourceManager.GetString("edit")%> /> <asp:Button ID="Cancel" runat=server Text=<%#ResourceManager.GetString("cancel")%> CommandArgument=<%#DataBinder.Eval(Container.DataItem,"Attributes").ToString().ToLower()%> CommandName="Cancel" />
  83. </EditItemTemplate>
  84. <ItemTemplate>
  85. <img src="img/filetype/<%#DataBinder.Eval(Container.DataItem,"Attributes").ToString().ToLower()=="directory"?"folder":((string)DataBinder.Eval(Container.DataItem,"Extension")).Replace(".","")%>.gif" /><asp:LinkButton ID="ListID" Text=<%#DataBinder.Eval(Container.DataItem,"Name")%> style="cursor:pointer; word-break:break-all" ForeColor="#000000" Font-Underline=false onmouseout="this.style.textDecoration='none'" onmouseover="this.style.textDecoration='underline'" CommandArgument=<%#DataBinder.Eval(Container.DataItem,"Name").ToString()%> OnCommand="SetServerCookie" OnClientClick=<%#DataBinder.Eval(Container.DataItem,"Attributes").ToString().ToLower()!="directory"?DataBinder.Eval(Container.DataItem,"Name","javascript:add("{0}");return false;"):""%> runat="server"/>
  86. </ItemTemplate>
  87. </asp:TemplateField>
  88. <asp:BoundField DataField="LastWriteTime" ReadOnly="True" HtmlEncode=False DataFormatString="{0:D}" >
  89. <ItemStyle HorizontalAlign="Center" Width="25%" />
  90. </asp:BoundField>
  91. <asp:TemplateField>
  92. <ItemTemplate>
  93. <asp:Label ID="LengthCont" Text=<%#DataBinder.Eval(Container.DataItem,"Attributes").ToString().ToLower()=="directory"?"":DataBinder.Eval(Container.DataItem,"Length","{0:#,### Bytes}")%> runat=server />
  94. </ItemTemplate>
  95. <ItemStyle HorizontalAlign=Center Width="25%" />
  96. </asp:TemplateField>
  97. </Columns>
  98. <HeaderStyle Font-Bold="True" ForeColor="WindowText" BackColor="Control" BorderWidth="1px" HorizontalAlign="Center" />
  99. </asp:GridView></div><table width="100%" border="0px"><tr><td valign="baseline" style="height: 23px">
  100. [<%=ResourceManager.GetString("controlmenu")%>]:<asp:ImageButton id="selectAllBtn" runat="server" onMouseOver="this.className='overcolor'" onMouseOut="this.className=''" ImageUrl="img/selectall.gif" onclick="selectAllBtn_Click" />&nbsp;
  101. <asp:ImageButton ID="deleteBtn" runat="server" onMouseOver="this.className='overcolor'" onMouseOut="this.className=''" ImageUrl="img/delete.gif" OnClick="deleteBtn_Click" />&nbsp;&nbsp;<asp:ImageButton id="editBtn" ImageUrl="img/rename.gif" onMouseOver="this.className='overcolor'" onMouseOut="this.className=''" runat="server" onclick="editBtn_Click" />&nbsp;&nbsp;<asp:ImageButton ID="newfolderBtn" onMouseOver="this.className='overcolor'" onMouseOut="this.className=''" runat="server" ImageUrl="img/newfolder.gif" OnClick="newfolderBtn_Click" />&nbsp;&nbsp;<asp:ImageButton ID="returndir2" OnClick="returndir_Click" ImageUrl="img/parentfolder.gif" onMouseOver="this.className='overcolor'" onMouseOut="this.className=''" runat=server/>&nbsp;&nbsp;<input language="javascript" onmouseup="if(is_ie){showModalDialog('find.aspx',this,'dialogWidth:320px;dialogHeight:130px;status:0;scroll:no');}else{window.find();}"
  102. type=image src="img/search.gif" onMouseOver="this.className='overcolor'" onMouseOut="this.className=''" title='<%=ResourceManager.GetString("findfile")%>' />&nbsp;
  103. <input language="javascript" onclick="window.close();" type="image" onMouseOver="this.className='overcolor'" onMouseOut="this.className=''" src="img/close.gif" title="<%=ResourceManager.GetString("close")%>" /></td>
  104. <td align="right" style="height: 23px">
  105. <img border=0px src="img/logo_S.png" /></td>
  106. </tr></table>
  107. </fieldset>
  108. <asp:HiddenField ID="config_watermark" runat="server" />
  109. <asp:HiddenField ID="config_watermarkText" runat="server" />
  110. <asp:HiddenField ID="config_watermarkImages" runat="server" />
  111. <asp:HiddenField ID="config_watermarkImages_path" runat="server" />
  112. <asp:HiddenField ID="config_smallImages" runat="server" />
  113. <asp:HiddenField ID="config_smallImagesName" runat="server" />
  114. <asp:HiddenField ID="config_maxAllUploadSize" runat="server" />
  115. <asp:HiddenField ID="config_autoname" runat="server" />
  116. <asp:HiddenField ID="config_allowUpload" runat="server" />
  117. <asp:HiddenField ID="config_fileFilters" runat="server" />
  118. <asp:HiddenField ID="config_maxSingleUploadSize" runat="server" />
  119. <asp:HiddenField ID="config_fileListBox" runat="server" />
  120. <asp:HiddenField ID="config_watermarkImagesName" runat="server" />
  121. <asp:HiddenField ID="config_watermarkName" runat="server" />
  122. <asp:HiddenField ID="config_smallImagesType" runat="server" />
  123. <asp:HiddenField ID="config_smallImagesW" runat="server" />
  124. <asp:HiddenField ID="config_smallImagesH" runat="server" />
  125. <asp:HiddenField ID="config_type" Value="Template"  runat="server" />
  126. <asp:HiddenField ID="templateContent" runat="server" />
  127. </td>
  128. </tr>
  129. </table>
  130. <div id="loading" style="border-right: #333333 1px dashed; border-top: #333333 1px dashed;
  131. font-size: 9pt; visibility: hidden; border-left: #333333 1px dashed;
  132. width: 270px; color: #000000; border-bottom: #333333 1px dashed; position: absolute; height: 120px; background-color: #ffffff">
  133. <center>
  134. <br />
  135. <br />
  136. <span id="statusmessage"></span></center>
  137. <br />
  138. <center>
  139. <asp:Button ID="canceloading" runat="server" Style="border-top-style: dashed; border-right-style: dashed;
  140. border-left-style: dashed; border-bottom-style: dashed" />&nbsp;</center>
  141. <br />
  142. </div>
  143. <script type="text/javascript">
  144. var load=document.getElementById('loading');
  145. window.onload=function(){resizeLoad()};
  146. function resizeLoad()
  147. {
  148. load.style.top = parseInt((document.body.clientHeight-load.offsetHeight)/2+document.body.scrollTop);
  149. load.style.left = parseInt((document.body.clientWidth-load.offsetWidth)/2+document.body.scrollLeft);
  150. }
  151. if(is_ie)
  152. {
  153. document.body.bgColor="ButtonFace";
  154. }
  155. else
  156. {
  157. document.body.bgColor="#E0E0E0";
  158. }
  159. </script>
  160. </form>
  161. </body>
  162. </html>