线网分布
当前位置:首页>>乘车指南 >> 线网分布
'瓦房店汽车分'"; break; case 2: $querystr = " where fengongsi='瓦房店汽车分'"; break; default: echo ""; exit(); break; } } else{ $querystr=""; $line=""; }*/ if(isset($_GET['line'])){ $line=intval($_GET['line']); if($line==2){$querystr = " where fengongsi='瓦房店汽车分'";} else{$querystr = " where fengongsi<>'瓦房店汽车分'";} } else{ $querystr = " where fengongsi<>'瓦房店汽车分'"; $line = ""; } $sql = "select count(distinct id,lubie,shifazhan,zhongdianzhan,fengongsi,shishouche,shimoche) as amount from fdbz_xianlu $querystr order by id"; $sql="select count(*) as amount from (select distinct * from fdbz_xianlu $querystr order by id) as LNMU"; $result = mysql_query($sql); $row = mysql_fetch_array($result); //计算总页数 $amount = $row['amount']; if($amount) { if($amount < $page_size){$page_count = 1;} if($amount % $page_size){$page_count = (int)($amount / $page_size) + 1; } else{$page_count = $amount / $page_size;} } else { $page_count = 0; } //翻页链接 $page_string = ""; $page_string .="共".$amount."条线路 "; if($page == 1) { $page_string .= "首页 上一页 "; } else { $page_string .= "首页上一页"; } if($page == $page_count) { $page_string .= " 下一页 尾页"; } else { $page_string .= "下一页尾页"; } $jumpurl = ""; $jumpurl .=" "; $page_string .= " $page/$page_count"; $page_string .=$jumpurl; //$sql="select * from fdbz_xianlu group by lubie,shifazhan,zhongdianzhan,fengongsi,shishouche,shimoche order by convert(lubie,SIGNED) limit ". ($page-1)*$page_size .", $page_size"; //$sql = "select distinct lubie,shifazhan,zhongdianzhan,fengongsi,shishouche,shimoche from fdbz_xianlu order by convert(lubie,SIGNED) limit ". ($page-1)*$page_size .", $page_size"; if($line){ if($line==1){ $sql = "select distinct id,lubie,shifazhan,zhongdianzhan,fengongsi,shishouche,shimoche from fdbz_xianlu where fengongsi <> '瓦房店汽车分' order by (CASE convert(replace(lubie,'+',''),SIGNED) when 0 then 99999 else convert(replace(lubie,'+',''),SIGNED) END) ,id limit ". ($page-1)*$page_size .", $page_size"; //$sql = "select distinct lubie,shifazhan,zhongdianzhan,fengongsi,shishouche,shimoche from fdbz_xianlu where fengongsi <> '瓦房店汽车分' order by convert(lubie,SIGNED) LIMIT ". ($page-1)*$page_size .", $page_size"; } if($line==2){ $sql = "select distinct id,lubie,shifazhan,zhongdianzhan,fengongsi,shishouche,shimoche from fdbz_xianlu where fengongsi = '瓦房店汽车分' order by (CASE convert(replace(lubie,'+',''),SIGNED) when 0 then 99999 else convert(replace(lubie,'+',''),SIGNED) END) ,id limit ". ($page-1)*$page_size .", $page_size"; //$sql = "select distinct lubie,shifazhan,zhongdianzhan,fengongsi,shishouche,shimoche from fdbz_xianlu where fengongsi = '瓦房店汽车分' order by convert(lubie,SIGNED) LIMIT ". ($page-1)*$page_size .", $page_size"; } } else{ $sql = "select distinct id,lubie,shifazhan,zhongdianzhan,fengongsi,shishouche,shimoche from fdbz_xianlu where fengongsi <> '瓦房店汽车分' order by (CASE convert(replace(lubie,'+',''),SIGNED) when 0 then 99999 else convert(replace(lubie,'+',''),SIGNED) END) ,id limit ". ($page-1)*$page_size .", $page_size"; //$sql = "select distinct lubie,shifazhan,zhongdianzhan,fengongsi,shishouche,shimoche from fdbz_xianlu where fengongsi <> '瓦房店汽车分' order by convert(lubie,SIGNED) LIMIT ". ($page-1)*$page_size .", $page_size"; //$sql = "SELECT * from(select distinct lubie,shifazhan,zhongdianzhan,fengongsi,shishouche,shimoche from (select distinct lubie,shifazhan,zhongdianzhan,fengongsi,shishouche,shimoche from fdbz_xianlu where fengongsi <> '瓦房店汽车分' order by convert(lubie,SIGNED)) as aaa union select distinct lubie,shifazhan,zhongdianzhan,fengongsi,shishouche,shimoche from (select distinct lubie,shifazhan,zhongdianzhan,fengongsi,shishouche,shimoche from fdbz_xianlu where fengongsi = '瓦房店汽车分' order by convert(lubie,SIGNED)) as bbb) as ccc LIMIT ". ($page-1)*$page_size .", $page_size"; } $result = mysql_query($sql); while ( $row = mysql_fetch_array($result) ){ $mbsql = "select * from fdbz_xianlu where fengongsi='".$row['fengongsi']."' and lubie='".$row['lubie']."' order by id"; $mbresult = mysql_query($mbsql); $zhanName = ""; $zhanName = substr($zhanName,0,-3); echo ""; echo ""; echo ""; $shishouche=strtotime($row['shishouche']); $shimoche=strtotime($row['shimoche']); echo ""; echo ""; echo "\n"; } ?>
线路 始发站—终点站 始车时间—末车时间 详情
".$row['lubie'].""; $zhanName = $row['shifazhan']." - ".$row['zhongdianzhan']; echo $zhanName; echo "".date('H:i',$shishouche)."-".date('H:i',$shimoche)."详情