<?php
@session_start();
include('checkstate.php');
$gradeid=@$_GET['id'];
if($gradeid<>''){
        $sql="select * from grade where gradeid=".$gradeid;
        $result=mysql_query($sql);
        $grade=mysql_fetch_array($result);
        $gradename=$grade[gradename];
		$wheregrade=" where gradeid=".$gradeid;
}else{
        $gradename="所有企业案例";
		$wheregrade='';
}
?>
<!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=utf-8" />
<title>ETW国际案例演示</title>
<link rel="stylesheet" href="media/css.css" type="text/css" media="screen" />
</head>

<body>
<div id="main">
     <div id="top"><a href="loginout.php" title="退出">退出</a></div>
     <div id="menu"><ul>
         <li><a href="index.php">管理首页</a></li><li><a href="allcompany.php">案例企业</a></li><li><a href="keymanage.php">关键字</a></li><li><a href="accountmangage.php">帐户管理</a></li>
     </ul></div>
     
     <div id="center">
        <div id="left">
        <div class="title"><strong>行业分类案例</strong></div>
            <div class="grade"><ul>
              <li><a href="allcompany.php?id=1"><img src="img/grade_img1.jpg" />上市公司</a></li>
              <li><a href="allcompany.php?id=2"><img src="img/grade_img2.jpg" />龙头企业</a></li>
              <li><a href="allcompany.php?id=3"><img src="img/grade_img3.jpg" />中小型企业</a></li>
            </ul></div>
        </div>
        
        <div id="right">
          <div class="location"><strong>当前位置 : 管理首页>> <?php echo $gradename; ?></strong></div>
          <div id="content">
           <div class="name">  <a href="casecompany.php?action=add">添加企业案例</a> | </div>
   <table width="780" border="1" cellpadding="0" cellspacing="0" bordercolor="#666666" class="tables">
  <tr>
    <th width="46" scope="col">序号</th>
    <th width="255" scope="col">公司名称</th>
    <th width="63" scope="col">状态</th>
    <th width="127" scope="col">网站</th>
  </tr>
  <?php $i=1;
        $sql="select * from custom".$wheregrade;
		$result=mysql_query($sql);
		while($row=mysql_fetch_array($result)){?>
  <tr>
    <td><?php echo $i; $i++; ?></td>
    <td><?php echo "<a href='casecompany.php?action=mod&id=".$row[id]."'>".$row[company]."</a>"; ?></td>
    <td><?php if($row[state]==1){ echo "正常 ";}else{ echo "停止" ; } ?></td>
    <td><?php echo "<a href='comweb.php?id=".$row[id]."'>查看修改</a>"; ?></td>
  </tr>
  <?php  } ?>
</table>
  
          </div>
        </div>
     </div>
     
     <div id="foot"><P>copy right &copy; 2008-2009  <font color="#990000">ETW International</font></P></div>
</div>
</body>
</html>
