📄 uploadimg.aspx
字号:
<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">
<Columns>
<asp:TemplateField>
<HeaderTemplate>
<asp:CheckBox ID="checkall" runat="server" Text=<%#ResourceManager.GetString("selectall")%> AutoPostBack="true" OnCheckedChanged="checkAll" />
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox ID="check" runat="server" />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" Width="55px" />
</asp:TemplateField>
<asp:TemplateField>
<EditItemTemplate>
<asp:TextBox ID="editName" Text=<%#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")%> CommandName="Cancel" />
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="ListID" Text=<%#DataBinder.Eval(Container.DataItem,"Name")%> style="cursor:pointer; word-break:break-all" onmouseout="this.style.textDecoration='none'" onmouseover="this.style.textDecoration='underline'" onclick=<%#DataBinder.Eval(Container.DataItem,"Name","javascript:preview(\"{0}\")")%> runat=server />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="LastWriteTime" ReadOnly="True" HtmlEncode=False DataFormatString="{0:D}" >
<ItemStyle HorizontalAlign="Center" Width="25%" />
</asp:BoundField>
<asp:BoundField DataField="Length" ReadOnly="True" HtmlEncode=False DataFormatString="{0:#,### Bytes}" >
<ItemStyle HorizontalAlign=Center Width="25%" />
</asp:BoundField>
</Columns>
<HeaderStyle Font-Bold="True" ForeColor="WindowText" BackColor="Control" BorderWidth="1px" HorizontalAlign="Center" />
</asp:GridView></div>
<fieldset><legend><span style="color: dimgray"><span style="color: gray"><%=ResourceManager.GetString("imagepreview")%></span> </span></legend>
<table height="100%" width="100%">
<tr>
<td colspan="3" rowspan="3" style="height: 252px">
<div style="border-right: 1.5pt inset; padding-right: 0px; border-top: 1.5pt inset;
padding-left: 0px; padding-bottom: 0px; vertical-align:middle; overflow: auto;
border-left: 1.5pt inset; width: 320px; padding-top: 2px; border-bottom: 1.5pt inset;
height: 235px; background-color: white">
<div id="previewImg" align="center" style="background-color: white">
</div>
</div></td>
<td colspan="1" rowspan="3" valign="top" style="height: 252px"><%=ResourceManager.GetString("width")%>:<input id="ImgWidth" style="width: 97px" onblur="if(document.getElementById('checkimgsize').checked){checksize(this.value,'wedth');}" type="text" maxlength="10" /><br />
<br />
<%=ResourceManager.GetString("height")%>:<input id="ImgHeight" style="width: 97px" type="text" onblur="if(document.getElementById('checkimgsize').checked){checksize(this.value,'height');}" maxlength="10" /><br /><input id="checkimgsize" type="checkbox" checked="CHECKED" /> <%=ResourceManager.GetString("keepratio")%><br />
<%=ResourceManager.GetString("alt")%>:<input id="ImgAlt" style="width: 97px" type="text" maxlength="100" /><br />
<br />
<%=ResourceManager.GetString("align")%>:<select id="Imgalign" style="width: 97px">
<option selected="selected" value=""><%=ResourceManager.GetString("default")%></option>
<option value="left"><%=ResourceManager.GetString("left")%></option>
<option value="center"><%=ResourceManager.GetString("center")%></option>
<option value="right"><%=ResourceManager.GetString("right")%></option>
</select><br />
<br />
<%=ResourceManager.GetString("watermark")%><input id="watermark" onclick="changeWaterMark('watermark')" type="checkbox" />
X:<asp:TextBox runat=server id="inputx" style="width: 40px" maxlength="4" >0</asp:TextBox> <br />
<br />
<%=ResourceManager.GetString("watermarkText")%><input id="watermarkText" onclick="changeWaterMark('watermarkText')" type="checkbox" />
Y:<asp:TextBox runat=server id="inputy" style="width: 40px" maxlength="4" >0</asp:TextBox><br />
<br /><a href="#" onclick="if(is_ie){showModalDialog('Advanced.aspx',window,'dialogWidth:800px;dialogHeight:600px;status:0;scroll:yes');reload.click();}else{window.open('Advanced.aspx');}">
<%=ResourceManager.GetString("advancedsetting")%></a><a id='reload' href='uploadimg.aspx' style='display:none'></a></td>
</tr>
</table>
</fieldset>
<table width="100%" border="0px"><tr><td height="40">
[<%=ResourceManager.GetString("controlmenu")%>]:<asp:button id="selectAllBtn" runat="server" borderstyle="Dashed" onclick="selectAllBtn_Click" ></asp:button>
<asp:Button ID="deleteBtn" runat="server" BorderStyle="Dashed" OnClick="deleteBtn_Click" /> <asp:button id="editBtn" runat="server" borderstyle="Dashed" onclick="editBtn_Click" ></asp:button>
<input language="javascript" onclick="if(is_ie){showModalDialog('find.aspx',this,'dialogWidth:320px;dialogHeight:130px;status:0;scroll:no');}else{window.find();}"
type="button" value='<%=ResourceManager.GetString("findfile")%>' />
<input language="javascript" onclick="window.close();" type="button" value="<%=ResourceManager.GetString("close")%>" /></td>
<td align="right">
<a href="http://www.aspxcn.com.cn" target=_blank><img border=0px src="img/logo_S.png" /></a></td>
</tr></table>
</fieldset>
<asp:HiddenField ID="config_watermark" runat="server" />
<asp:HiddenField ID="config_watermarkText" runat="server" />
<asp:HiddenField ID="config_watermarkImages" runat="server" />
<asp:HiddenField ID="config_watermakOption" runat="server" />
<asp:HiddenField ID="config_watermarkImages_path" runat="server" />
<asp:HiddenField ID="config_smallImages" runat="server" />
<asp:HiddenField ID="config_smallImagesName" runat="server" />
<asp:HiddenField ID="config_maxAllUploadSize" runat="server" />
<asp:HiddenField ID="config_autoname" runat="server" />
<asp:HiddenField ID="config_allowUpload" runat="server" />
<asp:HiddenField ID="config_fileFilters" runat="server" />
<asp:HiddenField ID="config_maxSingleUploadSize" runat="server" />
<asp:HiddenField ID="config_fileListBox" runat="server" />
<asp:HiddenField ID="config_watermarkImagesName" runat="server" />
<asp:HiddenField ID="config_watermarkName" runat="server" />
<asp:HiddenField ID="config_smallImagesType" runat="server" />
<asp:HiddenField ID="config_smallImagesW" runat="server" />
<asp:HiddenField ID="config_smallImagesH" runat="server" />
<asp:HiddenField ID="config_type" Value="Images" runat="server" />
</td>
</tr>
</table>
<div id="loading" style="border-right: #333333 1px dashed; border-top: #333333 1px dashed;
font-size: 9pt; visibility: hidden; border-left: #333333 1px dashed;
width: 270px; color: #000000; border-bottom: #333333 1px dashed; position: absolute; height: 120px; background-color: #ffffff">
<center>
<br />
<br />
<%=ResourceManager.GetString("loading")%></center>
<br />
<center>
<asp:Button ID="canceloading" runat="server" Style="border-top-style: dashed; border-right-style: dashed;
border-left-style: dashed; border-bottom-style: dashed" /> </center>
<br />
</div>
<script type="text/javascript">
var load=document.getElementById('loading');
resizeLoad();
window.setInterval("resizeLoad()",10);
function resizeLoad()
{
load.style.top = parseInt((document.body.clientHeight-load.offsetHeight)/2+document.body.scrollTop);
load.style.left = parseInt((document.body.clientWidth-load.offsetWidth)/2+document.body.scrollLeft);
}
if(is_ie)
{
document.body.bgColor="ButtonFace";
if (dialogArguments!=null)
{
image = dialogArguments;
document.getElementById("ImgWidth").value=image[0];
w=image[0];
h=image[1];
document.getElementById("ImgHeight").value=image[1];
document.getElementById("ImgAlt").value=image[2];
document.getElementById("file_path").value=image[3];
document.getElementById("Imgalign").value=image[4];
document.getElementById("insertImg").value='<%=ResourceManager.GetString("mof")%>';
document.getElementById("previewImg").innerHTML='<img src='+image[3]+' align="middle" onload="w=this.width;h=this.height;if(this.width>300){this.width=300;this.height=Math.round(this.width*h/w);}if(this.height>225){this.height=225;this.width=Math.round(this.height*w/h);}" />';
}
}
else
{
document.body.bgColor="#E0E0E0";
if(image[0]!=null)
{
document.getElementById("ImgWidth").value=image[0];
document.getElementById("ImgHeight").value=image[1];
document.getElementById("ImgAlt").value=image[2];
document.getElementById("file_path").value=image[3];
document.getElementById("Imgalign").value=image[4];
document.getElementById("insertImg").value='<%=ResourceManager.GetString("mof")%>';
document.getElementById("previewImg").innerHTML='<img src='+image[3]+' align="middle" onload="w=this.width;h=this.height;if(this.width>300){this.width=300;this.height=Math.round(this.width*h/w);}if(this.height>225){this.height=225;this.width=Math.round(this.height*w/h);}" />';
}
}
if(document.getElementById("config_watermarkImages").value.toLowerCase()=="true")
{
document.getElementById("watermark").checked=true;
}
if(document.getElementById("config_watermark").value.toLowerCase()=="true")
{
document.getElementById("watermarkText").checked=true;
}
if(document.getElementById("config_watermakOption").value.toLowerCase()=="off")
{
document.getElementById("watermarkText").disabled=true;
document.getElementById("watermark").disabled=true;
document.getElementById("inputx").disabled=true;
document.getElementById("inputy").disabled=true;
}
</script>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -