<!--#include file="../utf-8.asp" -->
<!--#include file="../js/Function.asp" -->
<!--#include file="../CheckAdmin.asp" -->
<!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 NAME="copyright" CONTENT="Copyright 2010-2012 - yidacms.com" />
<META NAME="Author" CONTENT="世纪伟成  yidacms.com" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../js/admin.css" rel="stylesheet" type="text/css">
<title>FLASH配置！</title>
<link rel="stylesheet" href="../js/reveal.css">	
<script type="text/javascript" src="../js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="../js/jquery.reveal.js"></script>
</head>

<body>
<%
'版权：世纪伟成(http://yidacms.com)
'本信息不会影响您网站的正常访问，无论免费用户或是收费用户请保留这里的信息.
'如果您删除了这里的版权信息,将追究法律责任.

        if request("t")="flash" Then
			if len(trim(request.Form("shuaiweb_flashname")))<1 then
				response.write ("<script language=javascript> alert('FLASH标题必填且不能少于1个字符！');history.back(-1);</script>")
				response.end
			end if
		  
			if len(trim(request.Form("shuaiweb_pic")))<1 then
				response.write ("<script language=javascript> alert('图片地址不能为空，且不少于1个字符！');history.back(-1);</script>")
				response.end
			end if 
		  
		dim rs,sql
		set rs=server.createobject("adodb.recordset")
		sql="select * from shuaiweb_flash" 
		rs.open sql,dbok,3,2
		rs.addnew 
			rs("shuaiweb_flashname")=trim(request.form("shuaiweb_flashname"))
			rs("shuaiweb_pic")=trim(request.form("shuaiweb_pic"))
			rs("shuaiweb_picurl")=trim(request.form("shuaiweb_picurl"))
		rs.update
		rs.close
		set rs=nothing
		response.write "<script language=javascript> alert('成功添加！');location.replace('admin_flash.asp');</script>"
		response.end
		End If 
		
		set rs = server.createobject("adodb.recordset")
		sql="select * from shuaiweb_flash ORDER BY id DESC"
		rs.open sql,dbok,1,1
%>
		  <table width="98%" border="1" cellpadding="6" cellspacing="0" bordercolor="#cccccc" style="border-collapse:collapse;" bgcolor="#FFFFFF" align="center">
            <tr>
              <td colspan="3"><a href="#" class="big-link" data-reveal-id="myModal">+ 创建</a>
               </td>
             </tr>
			<tr>
			  <td width="162" bgcolor="#CCCCCC">图片名称</td>
			  <td width="240" bgcolor="#CCCCCC">图片展示</td>
			  <td width="114" bgcolor="#CCCCCC">操作！</td>
			</tr>
<%
				if rs.bof and rs.eof then
					No_record = "暂无记录!"
						Else
				do while not rs.eof 
%>
			<tr onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc">
			  <td width="162"><%=rs("shuaiweb_flashname")%></td>
			  <td width="220"><img src="../../<%=rs("shuaiweb_pic")%>" width="220" height="80"  /></td>
			  <td width="134"><a href="admin_flashedit.asp?id=<%=rs("id")%>"><img src="../images/023.jpg" alt="修改"/></a>  <a href="admin_flash.asp?t=flasheditdel&id=<%=rs("id")%>"><img src="../images/015.gif" alt="删除" onclick="{if(confirm('确定删除它吗?')){return true;}return false;}"/></a> </td>
			</tr>
<%
				rs.MoveNext 
				loop   
				End If 
		rs.Close
		set rs=nothing
%>
<tr>
                <td colspan="3"><%=No_record%></td>
</tr>
		  </table>
		<div id="myModal" class="reveal-modal">
		  <table width="98%" height="100%" border="0"cellpadding="6" cellspacing="0" bordercolor="#cccccc" style="border-collapse:collapse" bgcolor="#FFFFFF" align="center">
		  <form action="admin_flash.asp?t=flash" method="post" name="form1" id="form1" onsubmit="return numericCheck()">
			<tr>
			  <td class="infont"></td>
			  <td onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc">图片名称<br /><input name="shuaiweb_flashname" type="text" id="shuaiweb_flashname" size="15"  class="win"/></td>
			</tr>
			<tr>
			  <td class="infont"></td>
			   <td onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc"><div class="uppic">图片地址<br /><input type="text" name="shuaiweb_pic" id="shuaiweb_productsminpic" class="win"/></div><div class="uppic2"><iframe width="305" height="34" marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no src="../../uploadclass/min/upfile.htm" allowtransparency="true" ></iframe></div>
			  </td>
			</tr>
			<tr>
			  <td class="infont"></td>
			  <td onMouseOver="this.id='aa'" onMouseOut="this.id='bb'" class="cc">链接地址<br /><input name="shuaiweb_picurl" type="text" id="shuaiweb_picurl" size="15"  class="win"/></td>
			</tr>
			<tr>
			  <td>&nbsp;</td>
			  <td><label>
				<input type="submit" name="Submit" value="添 加" class="inanniu"/>
			  </label></td>
			</tr>
			</form>
		  </table>
<a class="close-reveal-modal">&#215;</a>
		</div>
<%
		yidacms_id = cint(Request("id"))
		if request("t")="flasheditdel" Then
			set rs=server.createobject("adodb.recordset")
			sql="select * from shuaiweb_flash WHERE id= "&yidacms_id&""
			rs.open sql,dbok,1,1
			htm = "../../"&rs("shuaiweb_pic")&""
			set fso = server.createobject("scripting.FileSystemObject")
			arrFile = split(htm,",")		
			for i = 0 to ubound(arrFile)
			   if fso.FileExists(server.mappath(arrFile(i)))then
			   		fso.DeleteFile(server.mappath(arrFile(i)))
			   end if
			next
		
			set rs=server.createobject("adodb.recordset")
			sql="DELETE * from shuaiweb_flash WHERE id= "&yidacms_id&""
			rs.open sql,dbok,3,2
			response.write "<script language=javascript> alert('成功删除！');location.replace('admin_flash.asp');</script>"
			response.end
		End If
%>
</body>
</html>
