日期:2014-05-17 浏览次数:20616 次
.menu{
background:#9CF;
display:block;
}
.menu ul{
list-style-type:none;}
.menu li{
float:left;
margin:0 3px;
}
.menu li a:hover{
background-color:#91f491;
color:white;
border-bottom:solid 1px #91f491;
}
.menu li a#current{
background-color:#0ce;
color:white;
border-bottom:none;
}
.one{
margin-top:20px;
overflow-x:scroll;
}
.one a{
color:#00F;
text-decoration:underline;}
<div class="menu"><a href="main.php?o=price">数据维护</a></div>
<div class="one">
<?php
$q=$m->query('select * from whole where date=(select max(date) from whole) group by pol');while($r=$q->fetch_array(MYSQLI_USE_RESULT)){$op.='<option value="'.$r[id].'">'.$r[pol].'</option>';}
$q2=$m->query('select * from whole where date=(select max(date) from whole) group by province');while($r2=$q2->fetch_array(MYSQLI_USE_RESULT)){$op2.='<option value="t.php?i='.$r2[id].'">'.$r2[province].'</option>';}
?>
<form name="123" method="post" action="">
<table border="1" class="tb">
<tr><td>起运地</td><td colspan="2"><select name="pol"><option value="">-请选择-</option><?php echo $op;?></select></td></tr>
<tr><td width="10%">终到地</td><td width="15%"><select name="dest" onChange="chk(this,'pod')"><option value="">-请选择-</option><?php echo $op2;?></select></td><td id="pod" width="75%"></td></tr>
<tr><td><input type="submit" name="ok" value="提交/ok"></td><td></td><td></td></tr>
</table>
</form>
<?php
if($_POST[pod]){
$p=0;
$q3=$m->query("select * from whole where pod=(select pod from whole where id='".$_POST[pod]."') and pol=(select pol from whole where id='".$_POST[pol]."') and date=(select max(date) from whole)");$i=1;
while($r3=$q3->fetch_array(MYSQLI_USE_RESULT)){
$p=count($r3)?1:0;
$tb.='<tr><td>'.$i.'</td><td>'.$r3[store].'</td><td>'.$r3[pol].'</td><td>'.$r3[province].'</td><td>'.$r3[pod].'</td><td>'.$r3[kgs].'</td><td>'.$r3[cbm].'</td><td>'.$r3[tons].'</td><td>'.$r3[ctns].'</td><td>'.$r3[ctnsmore].'</td><td>'.$r3[ctns5].'</td><td>'.$r3[ctns50].'</td><td>'.$r3[pallet].'</td><td>'.$r3[tons3].'</td><td>'.$r3[tons5].'</td><td>'.$r3[tons8].'</td><td>'.$r3[ft20].'</td><td>'.$r3[ft40].'</td><td>'.$r3[min].'</td><td>'.$r3[time].'</td><td>'.$r3[agent].'</td><td>'.$r3[door].'</td><td>'.$r3[currency].'</td><td>'.$r3[mincbm].'</td><td>'.$r3[remark].'</td><td>'.$r3[remark2].'</td></tr>';$i++;
}
if($p){
echo '<table border="1">';
echo '<tr&g