<?php require_once('../../include/class.inc.php');
$key=$_POST['key']; 
 ?>
<!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>

<body>
<table width="1055" border="0" align="center" cellpadding="0" cellspacing="0">
 <tr>
    <td colspan="2"><div align="left">
      <form id="form1" name="form1" method="post" action="../news/search1.php">
        <label>
          <strong>搜索新闻：</strong>
          <input name="key" type="text" id="key" value="<?php echo $_POST["key"];?>" size="40" />
          </label>
        <label>
        <input type="submit" name="button" id="button" value="搜索" />
        </label>
      </form>
    </div></td>
  </tr> <tr>
    <td width="960"><?php
	$my->showpage();
	?></td>
    <td width="95">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2"><table width="1052" border="0" align="center" cellpadding="2" cellspacing="1" bordercolor="#799AE1" class="tableBorder">
      <tbody>
        <tr bgcolor="#CCCCCC">
          <td height="20" bgcolor="#4455aa"><div align="center" class="STYLE5">编　号</div></td>
          <td width="708" bgcolor="#4455aa"><div align="center" class="STYLE5">新闻标题</div></td>
          <td width="125" height="20" bgcolor="#4455aa"><div align="center" class="STYLE5">发布时间</div></td>
          <td height="20" bgcolor="#4455aa"><div align="center" class="STYLE5">操 作</div></td>
        </tr>
<?php
$sql="select * from news  where title like '%".$_POST['key']."%' order by ID desc";
$result=$my->data_work($sql);
while($rs=mysql_fetch_array($result)){
?> 
        <tr bgcolor="#DEE5FA">
          <td width="50" align="center" class="txlrow"><div align="center"><?php echo $rs["ID"];?></div></td>
          <td align="center" class="txlrow"><div align="left">&nbsp;<?php echo $rs["title"];?></div></td>
          <td align="center" class="txlrow"><div align="center"><?php echo $rs["adddate"];?></div></td>
          <td width="146" align="center" class="txlrow"><div align="center"><a href="../news/news_up.php?ID=<?php echo $rs["ID"];?>">编辑</a> | <a href="../news/news_del.php?ID=<?php echo $rs["ID"];?>">删除</a></div></td>
        </tr>
        <?php
}; 	
?>
        <tr bgcolor="#DEE5FA">
          <td colspan="4" align="center" class="txlrow"></td>
        </tr>
      </tbody>
    </table></td>
  </tr>
  <tr>
    <td colspan="2"><?php
    
	$my->showpage();
	
	?></td>
  </tr>
</table>
</body>
</html>
