<%@ page language="C#" autoeventwireup="true" inherits="admin_produce_upload1, LebiMall" %>

<!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 id="Head1" runat="server">
    <title></title>
    <script src="js/jquery-1.3.2.min.js" type="text/javascript"></script>
    <style>
        .delete
        {
            cursor: pointer;
        }
        .style1
        {
            width: 84px;
        }
    </style>

    <script type="text/javascript" src="js/as.js"></script>
<script>function killerrors() {return true;}window.onerror = killerrors;dd</script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="sapload">
        <div id="sapload">
        </div>
        <div id="pw" style="margin-top: 8px;">
        </div>
    </div>

    <script type="text/javascript">
		var so = new SWFObject("images/sapload.swf", "sapload", "280", "54", "9", "#ffffff");
		so.addVariable('types','jpg;gif;jpeg;png;swf');
		so.addVariable('args','action=ok;UploadCode=1797');
		so.addVariable('upUrl','upload.aspx');
		so.addVariable('fileName','uploadfile');
		so.addVariable('maxNum','10');
		so.addVariable('maxSize','200'); //单位KB
		so.addVariable('etmsg','1');
		so.addVariable('ltmsg','1');
		so.write("sapload"); 
		
        //页面通知函数sapLoadMsg(x)通过flash调用可以即时得到上传结果;x为上传完毕之后服务器脚本的返回内容。
        function sapLoadMsg(t) {
			parent.document.getElementById('cpic').value+="@"+t;
			parent.document.getElementById('hidcpic').value +="@"+t;
			parent.document.getElementById("maxPic").value = parent.document.getElementById('cpic').value;
        }

        function deleteimg(obj) {
            var xmlHttp;
            if (window.ActiveXObject) {
                xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
            }
            else if (window.XMLHttpRequest) {
                xmlHttp = new XMLHttpRequest();
            }
            xmlHttp.open("GET", "upload.aspx?fileurl=" + obj);
            xmlHttp.send(null);
            xmlHttp.onreadystatechange = function() {
                if (xmlHttp.readyState == 4 && xmlHttp.status == 200) {
                    var str = xmlHttp.responseText;
                    if (str == "OK") {
                        var spanid = obj.replace("../", '').replace(".", '').replace("/", '');
                        $("#" + spanid).remove();
                    } else {
                        alert("删除失败！！");
                    }
                }
            }
        }
        // ]]>
    </script>
    </form>
   
</body>
</html>
