<?php include("conn/conn.php");?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>continue语句的应用</title>
<style type="text/css">
<!--
.STYLE1 {
	font-size: 12px;
	color: #F98532;
}
.STYLE6 {font-size: 13px; font-weight: bold; color: #F8842D; }
.STYLE7 {
	font-size: 13px;
	font-weight: bold;
	color: #FFFFFF;
}
-->
</style>
</head>

<body>
<table width="523" height="100" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td><img src="images/bg.jpg" width="523" height="100"></td>
  </tr>
</table>
<table width="523" border="1" cellpadding="1" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#F98532">
  <form name="form1" method="post" action="index.php">
  <tr>
    <td align="center"><span class="STYLE7">获取数据表中除第
        <input name="counts" type="text" id="counts" size="5">
    条记录外的所有记录
    <input type="submit" name="Submit" value="提交">
    </span>
          
    </td>
  </tr>
</form>
</table>
<?php if(is_numeric($counts)==true){  //判断输入的数据是否是数字
?>   
<table width="523" border="1" cellpadding="1" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#F6842C">
  
  <tr>
    <td align="center" bgcolor="#FFFFFF" class="STYLE6">ID</td>
    <td height="35" align="center" bgcolor="#FFFFFF"><span class="STYLE6">文件名</span></td>
    <td align="center" bgcolor="#FFFFFF" class="STYLE6">存储路径</td>
    <td align="center" bgcolor="#FFFFFF"><span class="STYLE6">时间</span></td>
  </tr>
<?php $query="select * from tb_up_file ";   //读取数据库中的数据
$result=mysql_query($query);         
while($myrow=mysql_fetch_array($result)){  //应用while循环控制语句输出数据库中的数据
if($myrow[id]==$counts){                 //判断当id=$counts时,跳出while循环
continue;
}
?>
  <tr>
    <td align="center" bgcolor="#FFFFFF" class="STYLE6"><?php echo $myrow[id];?></td>
    <td height="25" align="center" bgcolor="#FFFFFF"><span class="STYLE6"><?php echo $myrow[file_name];?></span></td>
    <td align="center" bgcolor="#FFFFFF"><span class="STYLE6"><?php echo $myrow[file_text];?></span></td>
    <td align="center" bgcolor="#FFFFFF"><span class="STYLE6"><?php echo $myrow[data];?></span></td>
  </tr>
<?php }?>
  <tr>
    <td height="20" colspan="4" align="center" bgcolor="#FFFFFF"><span class="STYLE1">吉林省明日科技有限公司</span></td>
  </tr>
</table>
<?php }else{?>
<table width="523" border="1" cellpadding="1" cellspacing="1" bordercolor="#FFFFFF" bgcolor="#F6842C">
  
  <tr>
    <td align="center" bgcolor="#FFFFFF" class="STYLE6">ID</td>
    <td height="35" align="center" bgcolor="#FFFFFF"><span class="STYLE6">文件名</span></td>
    <td align="center" bgcolor="#FFFFFF" class="STYLE6">存储路径</td>
    <td align="center" bgcolor="#FFFFFF"><span class="STYLE6">时间</span></td>
  </tr>
<?php $query="select * from tb_up_file "; 
$result=mysql_query($query);         
while($myrow=mysql_fetch_array($result)){ 
?>
  <tr>
    <td align="center" bgcolor="#FFFFFF" class="STYLE6"><?php echo $myrow[id];?></td>
    <td height="25" align="center" bgcolor="#FFFFFF"><span class="STYLE6"><?php echo $myrow[file_name];?></span></td>
    <td align="center" bgcolor="#FFFFFF"><span class="STYLE6"><?php echo $myrow[file_text];?></span></td>
    <td align="center" bgcolor="#FFFFFF"><span class="STYLE6"><?php echo $myrow[data];?></span></td>
  </tr>
<?php }?>
  <tr>
    <td height="20" colspan="4" align="center" bgcolor="#FFFFFF"><span class="STYLE1">吉林省明日科技有限公司</span></td>
  </tr>
</table>

<?php }?>
</body>
</html>
