日期:2014-05-17 浏览次数:20755 次
<?php $sql="select C.id,C.number from cargo1 C left join cargo2 C2 on C.number = C2.number left join cargo3 C3 on C.number = C3.number"; if($_SESSION['filter']){ if(ereg("^[a-zA-Z]*$",$_SESSION['auth'])){ $sql.=" where C.shipper like '%".$_SESSION['filter']."%' or C.cnee like '%".$_SESSION['filter']."%'"; }else{ $sql.=" where ucase(C.pol)='".$_SESSION['filter']."'"; }//if ereg }//if $sql.=" order by C.id desc"; $q=$m->query($sql); $tb=""; while ($r=$q->fetch_array(MYSQLI_USE_RESULT)){ $tb.="<tr style='white-space:nowrap;'><td><a href='javascript:void(0);' onClick='ajaxDo(\"showInput\",\"ajaxDo.php?t=display&number=".$r[number]."\",\"showMain\")' title='View details/查看更多...'>".$r[number]."</a></td><td>".$r[shipper]."</td><td>".$r[cnee]."</td><td>".$r[po]."</td><td>".$r[invoice]."</td><td>".$r[pol]."</td><td>".$r[pod]."</td> <td>".$r[dest]."</td><td>".$r[vessel]."</td><td>".$r[bookingDate]."</td><td>".$r[receivedBooking]."</td><td>".$r[confirmSpace]."</td></tr>"; } ?> <div class="show"> <table cellpadding="0" cellspacing="0" border="0" class="display" id="example" width="100%"> <thead> <tr style="white-space:nowrap;"> <th>編號</th> <th>出貨人</th> </tr> </thead> <tbody> <?php echo $tb;?> </tbody> <tfoot> <tr style="white-space:nowrap;"> <th>編號</th> <th>出貨人</th> </tr> </tfoot> </table>