本文整理汇总了PHP中DbUtil::getStopLine方法的典型用法代码示例。如果您正苦于以下问题:PHP DbUtil::getStopLine方法的具体用法?PHP DbUtil::getStopLine怎么用?PHP DbUtil::getStopLine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DbUtil
的用法示例。
在下文中一共展示了DbUtil::getStopLine方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dsin
}
function dsin($arg)
{
return sin(deg2rad($arg));
}
for ($i = 0; $i < count($myStopList); $i++) {
if ($myStopList[$i]->lat != 0) {
$r = 6378.137;
$distant = $r * acos(dsin($lat) * dsin($myStopList[$i]->lat) + dcos($lat) * dcos($myStopList[$i]->lat) * dcos($myStopList[$i]->long - $long));
$distant = round($distant, 2) . ' km';
} else {
$distant = 'N/A';
}
echo "<h3>" . $myStopList[$i]->stopName . " <small>{$distant}</small></h3>";
echo "<hr>";
$lineList = $Database->getStopLine($myStopList[$i]->stopId);
for ($j = 0; $j < count($lineList); $j++) {
$lineName = $Database->getLineName($lineList[$j], $userName);
echo "<h4>行き先: {$lineName}</h4>";
echo "<table class=table>";
echo "<thead><th>時刻</th><th>残り時間</th></thead>";
$timeData = $Database->getTimeTableEx($myStopList[$i]->stopId, $lineList[$j], get4Time() - 5, 3);
for ($k = 0; $k < count($timeData); $k++) {
if ($timeData[$k]->type != getTodayType()) {
continue;
}
$classText = '';
$stopTime = formatTime($timeData[$k]->time);
if (getRemainUnixTime($stopTime) < 600) {
$classText = 'class=warning';
}
示例2: DbUtil
<!DOCTYPE html>
<?php
require_once '../nav.php';
require_once '../db.php';
require_once 'sidemenu.php';
$Database = new DbUtil();
$userName = $Database->getUserName();
$sideMenu = getSideMenu('ttbl');
$NAV = nav($userName);
if ($userName == null) {
header('Location: ../login.php', true, 303);
exit;
}
$ID = $_GET['id'];
$stopData = $Database->getStop($ID, $userName);
$lineData = $Database->getStopLine($ID);
?>
<html lang="ja">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>バス停 <?php
echo "{$stopData->stopName}";
?>
</title>
<!-- Bootstrap -->
<link href="/bst/css/bootstrap.min.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->