日期:2014-05-17 浏览次数:20504 次
<?php include('conn.php'); $officename=$_POST['officename']; $date=$_POST['riqi']; $sql1="select * from record where officename='$officename' and searchtime like '%$riqi%' order by name"; $result1=mysql_query($sql1); if(mysql_num_rows($result1)!=0){ $row=mysql_fetch_assoc($result1) ; $officecode=$row['officecode']; } else{ echo "没有这样的记录,正在返回确认页面"; echo "<meta http-equiv='refresh' content='2;url=confirm.php'>"; } ?> 日期:<?php echo $date; ?>——待机点NO:<?php echo $officecode; ?>——待机点名称:<?php echo $officename; ?> <form name="form3"> <div align="center"> <table width="1230" height="103" border="0" align="left" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"> <tr> <!-- 将要列出的内容--> <th width="50" height="38" bgcolor="#E3E3E3" scope="col">员工编号</th> <th width="90" bgcolor="#E3E3E3" scope="col">姓名</th> <th width="70" bgcolor="#E3E3E3" scope="col">NO.</th> <th width="40" bgcolor="#E3E3E3" scope="col">物件名称</th> <th width="80" bgcolor="#E3E3E3" scope="col">行驶距离</th> <th width="80" bgcolor="#E3E3E3" scope="col">行驶时间</th> <th width="80" bgcolor="#E3E3E3" scope="col">作业时间</th> <th width="100" bgcolor="#E3E3E3" scope="col">行驶速度</th> <th width="60" bgcolor="#E3E3E3" scope="col">到达时间</th> <th width="60" bgcolor="#E3E3E3" scope="col">出发时间</th> </tr> <?php $link=mysql_connect('localhost','root','mysql'); //数据库用户名及数据库密码 mysql_select_db('berecord'); //数据库名称 mysql_query('set names utf8'); $Page_size=10; //设置每页显示个数 $result=mysql_query("select * from record where officecode='$officecode' and searchtime like '%$riqi%' order by name"); //record为表名 $count = mysql_num_rows($result); $page_count = ceil($count/$Page_size); $init = 1; $page_len = 7; $max_p=$page_count; $pages=$page_count; //判断当前页码 if(empty($_GET['page'])||$_GET['page']<0){ $page=1; } else{ $page=$_GET['page']; } $offset=$Page_size*($page-1); $sql="select * from record where officecode='$officecode' and searchtime like '%$riqi%' order by name limit $offset,$Page_size" ; $result=mysql_query($sql,$link); //$row=mysql_fetch_array($result); while($row=mysql_fetch_array($result)){ ?> <tr> <td bgcolor="#E0EEE0" height="25px"><div align="center"> <?php echo $row['mencode'] ?> </div></td> <td bgcolor="#E0EEE"><div align="center"> <?php echo $row['name']?> </div></td> <td bgcolor="#E0EEE"><div align="center"> <?php echo $row['record']?> </div></