<%@page contentType="text/html; charset=GBK"%><%@include file="../include/Admin.jsp"%><%@include file="../include/DBCon.jsp"%><%String isUpPath=PathStr+UpPathStr,isFilePath=UpPathStr,isFileName="";int isFileStatus=0;if(!StrFormat.isNull(request.getParameter("act"))){if(!StrFormat.isNull(request.getParameter("filedir"))){isUpPath+=request.getParameter("filedir")+"/";isFilePath+=request.getParameter("filedir")+"/";}if(!StrFormat.isNull(request.getParameter("filename"))){isFileName=request.getParameter("filename");}/**/GenUp GenUp=new GenUp();GenUp.setObjectPath(isUpPath);GenUp.setSize(UpSize);GenUp.setSuffix(UpExt);if(!StrFormat.isNull(isFileName)){GenUp.setName(isFileName);GenUp.setSourceFile(request,1);}else{GenUp.setSourceFile(request,0);isFileName=GenUp.getObjectFileName()[0];}isFileStatus=GenUp.getStatus()[0];/**/if(isFileStatus==0){out.print("<script type=\"text/javascript\">alert(\"上传成功！\");self.opener.form.pic.value=\""+isFileName+"\";self.opener.form.pic.disabled=true; window.close();</script>");}else{out.println("<script type=\"text/javascript\">alert(\"上传失败！\");</script>");}}else{%><html><head><meta http-equiv="Content-Type" content="text/html; charset=GBK" /><meta name="keywords" content="向继根,Xiang Jigen,QQ,190582560"><meta name="description" content="Programmer:向继根 QQ:190582560 Email:190582560@qq.com"><meta name="author" content="向继根,Xiang Jigen" /><title><%=TitleStr%>上传动画图片</title><link rel="stylesheet" type="text/css" href="images/Style.css"/><script type="text/javascript" src="../js/min.js"></script><script type="text/javascript" src="../js/common.js"></script><script type="text/javascript" src="../js/css.js"></script><script type="text/javascript">var limit = <%=UpSize%>;	//K	图片大小function changeSrc(Obj){	var vlue = Obj.value;if(!vlue) return false;	var ext = vlue.substr(vlue.lastIndexOf('.')).toLowerCase();if(ext!='.swf' && ext!='.jpg' && ext!='.gif' && ext!='.bmp' && ext!='.png'){alert('请上传格式为 .swf .jpg .gif .bmp .png 的文件...');return false;}else{		document.getElementById('preview').src ='file:///' + vlue.replace('\\', '/');return true;}}function checkSize(Obj, MaxW, MaxH){if(Obj.fileSize > limit){alert('请保持文件在 '+limit+'K 之内...');return false;}	return true;}</script></head><body><form action="?act=do&filedir=<%=request.getParameter("filedir")%>&filename=<%=request.getParameter("filename")%>" method="post" enctype="multipart/form-data" name="form" id="form" ><table cellpadding="0" cellspacing="1" class="table_list">	<caption>上传图片</caption><tr><td>支持格式：【.swf .jpg .gif .bmp .png】<br>建议大小：小于 <%=UpSize%> K</td></tr><tr><td>文件地址：<input id="file" name="file" type="file" class="file_style" size="30" onChange="changeSrc(this);"><img id="preview" src="" onload="checkSize(this, 202, 250);" style="position:absolute; left:0px; top:0px; visibility:hidden;" /></td></tr></table><div id="button"><input type="submit" name="dosubmit" class="button_style" value="上 传" />&nbsp;<input type="reset" name="reset" class="button_style" value="取 消" onClick="window.close();" /></div></form></body></html><%}%><%@include file="../include/DBConClose.jsp"%>