user_board_imageupload.aspx
上传用户:scene123
上传日期:2010-02-19
资源大小:3311k
文件大小:6k
源码类别:

.net编程

开发平台:

C#

  1. <%@ Page language="c#" Codebehind="user_board_imageupload.aspx.cs" AutoEventWireup="false" Inherits="kuangren.user_board_imageupload" %>
  2. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
  3. <HTML>
  4. <HEAD>
  5. <title>狂人论坛-用户头像上传</title>
  6. <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
  7. <meta name="CODE_LANGUAGE" Content="C#">
  8. <meta name="vs_defaultClientScript" content="JavaScript">
  9. <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
  10. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  11. <LINK href="skin/dvbbs/style.css" type="text/css" rel="stylesheet">
  12. </HEAD>
  13. <body leftmargin="0" topmargin="0">
  14. <!--#include file="sitehead.aspx" -->
  15. <div align="center">
  16. <table cellSpacing="1" cellPadding="3" width="97%" align="center" bgColor="#6595d6" border="0">
  17. <tr>
  18.       <td bgColor="#f0f0f0" height="25"><IMG height="9" hspace="3" src="skin/dvbbs/images/nav_position.gif" width="9" align="absMiddle"> 
  19.         <uc1:jianinclude2 id="Jianinclude21" runat="server"></uc1:jianinclude2></UC1:JIANINCLUDE2></UC1:JIANINCLUDE2> 
  20.         → <a href="user_board.aspx"> <%=usercookies%>的控制面板</a> → 用户收藏管理</td>
  21. </tr>
  22. </table>
  23. <br>
  24. <table width="97%" border="1" align="center" cellpadding="4" cellspacing="0" bordercolor="#6595d6"
  25. style="BORDER-COLLAPSE: collapse">
  26. <tr class="title_link">
  27. <td class="title"><div align="center">
  28. <strong><a href="user_board.aspx">控制面板首页</a></strong>
  29. </div>
  30. </td>
  31. <td class="title"><div align="center">
  32. <strong><a href="user_board_inforup.aspx">基本资料修改</a></strong>
  33. </div>
  34. </td>
  35. <td class="title"><div align="center">
  36. <strong><a href="user_board_passup.aspx">用户密码修改</a></strong>
  37. </div>
  38. </td>
  39. <td class="title"><div align="center">
  40. <strong><a href="modifyadd.asp"></a><a href="user_board_message.aspx">用户短信服务</a></strong>
  41. </div>
  42. </td>
  43. <td class="title"><div align="center">
  44. <strong><a href="user_board_upload.aspx">我的附件箱</a></strong>
  45. </div>
  46. </td>
  47. <td class="title"><div align="center">
  48. <strong><a href="user_board_favord.aspx">用户收藏管理</a></strong>
  49. </div>
  50. </td>
  51. <td class="title">
  52. <div align="center"><a href="user_board_post.aspx"><strong>我所发表的文章</strong></a>
  53. </div>
  54. </td>
  55. </tr>
  56. </table>
  57. <br>
  58. <table cellSpacing="1" cellPadding="4" width="97%" align="center" bgColor="#6595d6" border="0">
  59. <tr bgColor="#ffffff">
  60. <td width="62%" height="13" class="title"><div align="center"><strong>&gt;&gt; 您的收藏夹 
  61. &lt;&lt;</strong></div>
  62. </td>
  63. </tr>
  64. <tr bgColor="#ffffff">
  65. <td height="14"><form id="uploderform" method="post" action="upload.aspx" enctype="multipart/form-data"
  66. runat="server">
  67. <table border="0" cellspacing="0" cellpadding="0">
  68. <tr>
  69. <td width="396">请选择图片路径
  70. </td>
  71. <td width="396" rowspan="4">
  72.                 <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
  73.                   <tr>
  74.                     <td><div align="center"><img src="webdesign/userupload/<%=passshow%>"></div></td>
  75.                   </tr>
  76.                 </table></td>
  77. </tr>
  78. <tr><%if(myFile.PostedFile==null){%>
  79. <td>
  80. <input type="file" id="myFile" onchange="imagePreview.innerHTML = '<img style='display: none' src='' + this.value + ''>'"  runat="server" NAME="myFile">
  81. </td>
  82. </tr>
  83. <tr>
  84. <td>
  85. <input type="button" value="确认提交" runat="server" ID="Upload" NAME="Upload">
  86. </td><%}%>
  87. </tr>
  88. <tr>
  89. <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
  90. <tr>
  91. <td><asp:label ID="Label1" style="Z-INDEX: 101; LEFT: 46px; POSITION: absolute; TOP: 290px" runat="server"></asp:label>
  92.                      </td>
  93. </tr>
  94. </table>
  95. <br>
  96. <br>
  97.                 1、使用日期作为上传文件名。<br>
  98.                 2、为页面美观,您最好选择适当大小的图片上传。<br>
  99.                 3、上传支持格式:GIF,JPG,JPEG 
  100.                 <table width="50%" border="0" cellspacing="0" cellpadding="0">
  101.                   <tr>
  102.                     <td id=imagePreview> <div align="left">
  103.                         <script>
  104. previewPic()
  105. function previewPic()
  106. {
  107. try
  108.     {
  109.     for (i = 0; i < document.images.length; i++)
  110.         {
  111.         if (document.images[i].style.display == "none")
  112.             {
  113.             document.images[i].style.display = ""
  114.             width = document.images[i].width
  115.             height = document.images[i].height
  116.             if (width > 350)
  117.                 {
  118.                 n = width / 350
  119.                 document.images[i].width = 350
  120.                 document.images[i].height = height / n
  121.                 }
  122.             document.images[i].insertAdjacentHTML("AfterEnd", "<table border=0 width=100% cellspacing=0 cellpadding=0><tr><td style='padding-top: 4'>" + width + " × " + height + "</td></tr></table>")
  123.             }
  124.         }
  125.     window.setTimeout("previewPic()", 500)
  126.     }
  127. catch(e)
  128.     {
  129.     window.setTimeout("previewPic()", 500)
  130.     }
  131. }
  132. </script>
  133.                       </div></td>
  134.                   </tr>
  135.                 </table></td>
  136. </tr>
  137. </table>
  138. <table width="50%" border="0" cellspacing="1" cellpadding="0">
  139. <tr>
  140. <td></td>
  141. </tr>
  142. </table>
  143. </form>
  144. </td>
  145. </tr>
  146. </table>
  147. </div>
  148. <!--#include file="sitefloor.aspx" -->
  149. </body>
  150. </HTML>