82 lines
3.3 KiB
Plaintext
82 lines
3.3 KiB
Plaintext
|
|
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Photo_upload2.aspx.cs" Inherits="Mtxfw.shop._admin.Photo_upload2" %>
|
|||
|
|
<!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" />
|
|||
|
|
<link href="css/Burgundy.css" rel="stylesheet" type="text/css" />
|
|||
|
|
<script src="/scripts/jquery-1.7.2.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:10px auto; }
|
|||
|
|
#uploadForm{ position: relative;
|
|||
|
|
display: inline-block;width:100px; height:32px;
|
|||
|
|
text-align:left;
|
|||
|
|
line-height:32px;
|
|||
|
|
border:1px solid #10780a;
|
|||
|
|
background-color:#13b60b;
|
|||
|
|
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;
|
|||
|
|
text-indent:25px;
|
|||
|
|
cursor:pointer;background:#13b60b url(/static/img/iconfont.png) 3px -136px no-repeat;}
|
|||
|
|
#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='/static/img/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("#showimage1");
|
|||
|
|
var IFUpload = d.find("#IFUpload2");
|
|||
|
|
if (imgurl == "0") {
|
|||
|
|
alert("上传格式不正确,只能上传图片文件");
|
|||
|
|
tips.find("#ajaxLoaderpic").hide(300);
|
|||
|
|
}
|
|||
|
|
else if (imgurl == "1") {
|
|||
|
|
alert("上传文件太大,只能上传小于2M的文件!");
|
|||
|
|
tips.find("#ajaxLoaderpic").hide(300);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
else {
|
|||
|
|
|
|||
|
|
var apic = imgurl.split("|");
|
|||
|
|
tips.html(tips.html().replace("<li id='ajaxLoaderpic'><img src='/static/img/ajaxLoader.gif' /></li>", ""));
|
|||
|
|
var strimgurl = tips.html();
|
|||
|
|
var UploadNum = d.find("#UploadNum");
|
|||
|
|
UploadNum.val(parseInt(UploadNum.val()) + 1);
|
|||
|
|
strimgurl += "<li onclick=\"selectimage('image" + UploadNum.val() + "')\" id='image" + UploadNum.val() + "' pic='" + apic[0] + "'><img src='/GetFiles.ashx?image=" + apic[0] + "&itsize=100x100&itmode=cut' width='100' /><em></em></li>";
|
|||
|
|
tips.html(strimgurl);
|
|||
|
|
tips.find("#ajaxLoaderpic").hide(300);
|
|||
|
|
}
|
|||
|
|
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_upload2.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>
|