<?php
	//include("function.php");
	include("connect.php");
	include_once("admin.config.inc.php");
	include("resize.php");
	include("security.php");
//	include("category_function.php");
	include("config_setting.php");
	$type1 = "1";
	$type3 = "3";
	include("pagepermission.php");
/********************************************************************
     Get how many products  are to be displayed according to the  Events
********************************************************************/
/***********************************************
display search results
***********************************************/
 /*********************************************

  Display all Products

  *********************************************/
	//$prodID=$_GET['prodID'];
if($_GET['id']){
	$query="DELETE from `flash` where id=$_GET[id]";
	$result=mysql_query($query) or die (mysql_error());
	echo "<script>alert('删除成功')</script>";
 	echo "<script>javascript:window.location.href='manageflash.php';</script>";
}else{
	$query="select * from `flash`";
	$result=mysql_query($query) or die (mysql_error());
}
 ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=<?=$lng_characset;?>" />
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<link rel="stylesheet" href="main.css" type="text/css">
<script language="javascript" src="popupimage.js"></script>
<script language="JavaScript">
	//function gotocategory(cat)
//	{
//		if(trim(cat)!="")
//		{
//			window.location.href="manageproducts.php?catID="+cat;
//		}
//	}
	function delconfirm(loc)
	{
		if(confirm("你确定要删除?"))
		{
			window.location.href=loc;
		}
		return false;
	}
</script>
<script language="javascript" type="text/javascript">
	function OnDeleteAction(id)
	{
		if(confirm("你确定要删除它?"))
		{
			locat = 'manageflash.php?id='+id;
			window.location.href=locat;
		}
	}
</script>
</HEAD>
<BODY bgcolor="#ffffff" style="padding-left:10px">
<TABLE width="100%" cellPadding="0" cellSpacing="10">
  <!--DWLayoutTable-->
  <TR>
    <TD><!--content-->

			  <br>
	  	<table cellpadding="0" cellspacing="0" width="100%" border="0">
		    <tr>
				<td>
		
          <TABLE width="100%"  cellSpacing="0" class="t-a" border="1">
            <!--DWLayoutTable-->
            <TBODY>
				<TR>
					<TD colspan="6">
				<!--END DISPLAY CATEGORIES-->	
				  <TR class="th-a"> 
					<TD  width="6%" align="center">序号</TD>
					<TD  width="22%" align="center">图片</TD>
					<TD  width="23%">名称</TD>
					<TD width="33%">链接</TD>
					<!--<TD  width="10%">InStock</TD>-->
					<TD  width="16%" align="center">操作</TD>
				  </TR>
			  
              <?php
			  while($row = mysql_fetch_array($result)){
				$id=$row['id'];
				$imgname=$row['imgname'];
				$image = $row['imgurl'];	
				$imglink=$row['arcurl'];
				?>
			  	<TR>
			  	
				<TD  height="37" width="6%" align="center">
				<?=$id;?></TD>	
				<TD   height="37" width="22%" align="center">
				<? if($image!=""){ echo "<img src='../".$image."' width=100 heigh=100>";}else{ echo "&nbsp;";} ?>				</TD>
				
				<TD    height="37" width="23%">
					<? if($imgname!=""){ echo $imgname; }else{ echo "&nbsp;"; }?>				</TD>
				
				<TD    height="37">
				<? if($imglink!=""){ echo $imglink; }else{echo "&nbsp;";} ?></a>				</TD>
				
				<TD  width="16%" align="center"><input name="button" type="button" class="bttn-s" value="删除" onClick="javascript:OnDeleteAction('<?=$id;?>');"></TD>
              </TR>
			  <?php };?>
          </TABLE>
	</td>
	</tr>
</table>	
		<!--/content--></TD></TR></TBODY></TABLE></BODY></HTML>