<?php require_once('../../include/class.inc.php'); ?>
<!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=gb2312" />
<link rel="stylesheet" href="../inc/css.css" type="text/css" />
<title>无标题文档</title>
<style type="text/css">
<!--
.STYLE5 {color: #FFFFFF; font-weight: bold; }
-->
</style>
</head>
	<script type="text/javascript">
function checkAll(e,itemName)
{
	var aa = document.getElementsByName(itemName);
	for (var i=0; i<aa.length; i++){
	   aa[i].checked = e.checked;
	}
}
 </script>
<body>
<form id="form1" name="form1" method="post" action="p_del.php">
  <table width="1055" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td colspan="2"><div align="center">查看产品</div></td>
    </tr>
    <tr>
      <td width="960"><?php
	$my->showpage();
	?></td>
      <td width="95"><a href="../product/p_add.php">添加产品</a></td>
    </tr>
    <tr>
      <td colspan="2"><table width="954" border="0" align="center" cellpadding="2" cellspacing="1" bordercolor="#799AE1" class="tableBorder">
          <tbody>
            <tr bgcolor="#CCCCCC">
              <td height="20" align="center"  bgcolor="#4455aa"><input type="checkbox" name="checkbox1" onclick="checkAll(this,'checkbox[]')" id="checkbox" /></td>
              <td bgcolor="#4455aa" align="center"><span class="STYLE5">编　号</span></td>
              <td bgcolor="#4455aa" align="center"><div class="STYLE5">产品分类</div></td>
              <td bgcolor="#4455aa" align="center"><span class="STYLE5">展示图片</span></td>
              <td bgcolor="#4455aa" align="center" class="STYLE5">产品名称</td>
              <td width="113" height="20" bgcolor="#4455aa"><div align="center" class="STYLE5"> 首页推荐</div></td>
              <td width="95" height="20" bgcolor="#4455aa"><div align="center" class="STYLE5"> 首页幻灯片</div></td>
              <td width="130" bgcolor="#4455aa" class="STYLE5"><div align="center">发布时间</div></td>
              <td height="20" bgcolor="#4455aa"><div align="center" class="STYLE5">操 作</div></td>
            </tr>
            <?php
$result=$my->data_select("product","","id desc","","10","");

while($rs=mysql_fetch_array($result)){
?>
            <tr bgcolor="#DEE5FA">
              <td width="46" align="center" class="txlrow"><input type="checkbox" name="checkbox[]" id="checkbox2" value="<?php echo $rs["id"];?>" /></td>
              <td width="49" align="center" class="txlrow"><?php echo $rs["id"];?></td>
              <td width="76" align="center" class="txlrow">                <?php
			  $sql2="select * from bigclass_nav";
				$result2=$my->data_work($sql2);
				while($rs2=mysql_fetch_array($result2)){
			
			   if($rs2["id"]==$rs["typeid"]){
				  echo $rs2["cname"];  
					}
			 }  ;  
			  ?>              </td>
              <td width="101" align="center" class="txlrow"><div align="center"><img src="../<?php echo $rs["img"];?>" alt="" width="70"height="50" /></div></td>
              <td width="120" align="center" class="txlrow"><div align="left">&nbsp;<?php echo $rs["title"];?></div></td>
              <td align="center" class="txlrow"><div align="center">
                  <?php if($rs["Home_t"]=="首页推荐"){?>
                  <a href="../product/p_jihuo.php?id=<?php echo $rs["id"]?>&amp;Home=Homeno">是</a>
                  <?php }else{?>
                  <a href="../product/p_jihuo.php?id=<?php echo $rs["id"]?>&amp;Home=Homeok"> <font color="#FF0000">否</font></a>
                  <?php }?>
              </div></td>
              <td align="center" class="txlrow"><div align="center">
                  <?php if($rs["ppt"]==1){?>
                  <a href="../product/p_jihuo.php?id=<?php echo $rs["id"]?>&amp;Home=Homeno">是</a>
                  <?php }else{?>
                  <a href="../product/p_jihuo.php?id=<?php echo $rs["id"]?>&amp;Home=Homeok"> <font color="#FF0000">否</font></a>
                  <?php }?>
              </div></td>
              <td align="center" class="txlrow"><div align="center"><?php echo $rs["adddate"];?></div></td>
              <td width="190" align="center" class="txlrow"><div align="center"><a href="../product/p_up.php?id=<?php echo $rs["id"];?>">编辑</a> | <a href="../product/p_del.php?id=<?php echo $rs["id"];?>" onclick="return window.confirm('确定删除？');">删除</a></div></td>
            </tr>
            <?php
}; 	
?>
            <tr bgcolor="#DEE5FA">
              <td colspan="9" align="center" class="txlrow"></td>
            </tr>
          </tbody>
      </table></td>
    </tr>
    <tr>
      <td colspan="2"><?php
    
	$my->showpage();
	
	?>
      <input name="input" type="submit" value="批量删除" /></td>
    </tr>
  </table>
</form>
</body>
</html>
