Files
g.hnyhua.cn/Mtxfw.VipSite/Photo_upload.aspx
2026-02-07 15:48:27 +08:00

77 lines
2.8 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Photo_upload.aspx.cs" Inherits="Mtxfw.shop._admin.Photo_upload" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="/css/style.css" rel="stylesheet" type="text/css" />
<script src="/Scripts/jquery-1.9.1.min.js" type="text/javascript"></script>
<style type="text/css">*{ margin:0;padding:0;}body{ background-color:#fff;}
body .uploadbox{ background-color:#fff;width:100px; height:32px; margin:0 auto; }
#uploadForm{ position: relative;
display: inline-block;width:96px; height:32px;
text-align:center;
line-height:32px;
border:1px solid #b69706;
background-color:#c49a0b;
text-indent:0px;
-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px 3px 3px 3px;
color:#fff;
font-size:16px;
font-weight:bold;
z-index:2;
cursor:pointer;background:#c49a0b url(/static/img/iconfont.png) 3px -136px no-repeat;}
#uploadForm:hover{background-color:#ffc603; text-decoration:none;color:#fff;}
#uploadForm input{position: absolute;width:100px; height:32px; left: 0; top: 0; opacity: 0; filter: alpha(opacity=0);}
</style>
<script type="text/javascript">
function imgUploading() {
var d = $(window.parent.document);
var tips = d.find("#showimage1");
tips.html(tips.html() + "<li id='ajaxLoaderpic'><img src='/images/ajaxLoader.gif' /></li>");
d.find("#IFUpload2").val(1);
document.getElementsByTagName("form")[0].submit();
}
var imgurl = "<%=imgurl %>";
if (imgurl != "") {
var d = $(window.parent.document);
var tips = d.find("#Labelimg img");
var hid_Pic = d.find("#hid_Pic");
var IFUpload = d.find("#IFUpload");
if (imgurl == "0") {
alert("上传格式不正确,只能上传图片文件");
tips.find("#ajaxLoaderpic").hide(300);
}
else if (imgurl == "1") {
alert("上传文件太大,只能上传小于2M的图片");
tips.find("#ajaxLoaderpic").hide(300);
}
else {
var img = imgurl.split("|");
tips.attr("src", img[1]);
hid_Pic.val(img[0]);
}
IFUpload.val(0);
}
</script>
</head>
<body>
<p>
<div class="uploadbox">
<div id="uploadForm"><form method="post" enctype="multipart/form-data" id="Form1" target="_self" action='Photo_upload.aspx'>
上传头像<input name="Photo" id="Photo" onChange="imgUploading();" type="file" accept="image/*" /><input name="hidyanse" id="hidyanse" type="hidden" value="" />
<input name="hidphotos" id="hidphotos" type="hidden" value="" />
</form></div>
</div>
</body>
</html>