本文整理匯總了PHP中wbUtil::getMonthNames方法的典型用法代碼示例。如果您正苦於以下問題:PHP wbUtil::getMonthNames方法的具體用法?PHP wbUtil::getMonthNames怎麽用?PHP wbUtil::getMonthNames使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類wbUtil
的用法示例。
在下文中一共展示了wbUtil::getMonthNames方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: angin
public static function angin()
{
$tahun = wbRequest::getVarClean('tahun', 'int', 0);
$jenis = wbRequest::getVarClean('jenis', 'int', 0);
try {
$ws_client = self::getNusoap();
$params = array('search' => '', 'getParams' => json_encode($_GET), 'controller' => json_encode(array('module' => 'bds', 'class' => 'statistik_cuaca', 'method' => 'angin', 'type' => '')), 'postParams' => json_encode($_POST), 'jsonItems' => '', 'start' => $start, 'limit' => $limit);
$ws_data = self::getResultData($ws_client, $params);
$data['items'] = $ws_data['data'];
$data['total'] = $ws_data['total'];
$data['message'] = $ws_data['message'];
$data['success'] = $ws_data['success'];
} catch (Exception $e) {
$data['message'] = $e->getMessage();
}
$items = $data['items'];
$print = wbRequest::getVarClean('print', 'int', 0);
if (!empty($print)) {
wbUtil::startExcel('cuaca_udara.xls');
}
echo '<div class="body-wrap">';
echo '<div align="center"><h3>CUACA MENURUT BULAN DAN KECEPATAN ANGIN (KNOT) DI KOTA BANDUNG PADA TAHUN ' . $tahun . '</h3></div><br>';
if (!empty($print)) {
echo '<table border="1" width ="100%">';
} else {
echo '<table border="0" width ="100%">';
}
$output = "<tr>";
$output .= "<th rowspan=2 style='text-align:center;background-color: rgb(224, 224, 224);border-bottom: 1px solid black;border-top: 1px solid black;'>No</th>";
$output .= "<th rowspan=2 style='text-align:center;background-color: rgb(224, 224, 224);border-bottom: 1px solid black;border-top: 1px solid black;'>Bulan</br><div style='font-style: italic;'>Month</div></th>";
$output .= "<th colspan=4 style='text-align:center;background-color: rgb(224, 224, 224);border-bottom: 1px solid black;border-top: 1px solid black;'>Angin(Knot)</th>";
$output .= "</tr>";
$output .= "<tr>";
$output .= "<th style='text-align:center;background-color: rgb(224, 224, 224);border-bottom: 1px solid black;border-top: 1px solid black;'>Kecepatan Rata-Rata</br><div style='font-style: italic;'>Speed Average</div>(mb)</th>";
$output .= "<th style='text-align:center;background-color: rgb(224, 224, 224);border-bottom: 1px solid black;border-top: 1px solid black;'>Arah Terbanyak</br><div style='font-style: italic;'>Mostly Directional</div>(mb)</th>";
$output .= "<th style='text-align:center;background-color: rgb(224, 224, 224);border-bottom: 1px solid black;border-top: 1px solid black;'>Kecepatan Terbesar</br><div style='font-style: italic;'>Mostly Velocity</div>(%)</th>";
$output .= "<th style='text-align:center;background-color: rgb(224, 224, 224);border-bottom: 1px solid black;border-top: 1px solid black;'>Arah</br><div style='font-style: italic;'>Direction</div>(mb)</th>";
$output .= "</tr>";
$title = "";
$no = 1;
foreach ($items as $item) {
$output .= "<tr>";
$output .= "<td align='center'>" . $no . "</td>";
$output .= "<td>" . wbUtil::getMonthNames($item['bulan']) . " / <div style='display:inline;font-style: italic;'>" . wbUtil::getMonthFull($item['bulan']) . "</div></td>";
$output .= "<td align='center'>" . number_format($item['angin_rata2'], 2, ',', '.') . "</td>";
$output .= "<td align='center'>" . number_format($item['arah_rata2'], 2, ',', '.') . "</td>";
$output .= "<td align='center'>" . number_format($item['angin_max'], 2, ',', '.') . "</td>";
$output .= "<td align='center'>" . number_format($item['arah_max'], 2, ',', '.') . "</td>";
$output .= "</tr>";
$no++;
}
$output .= "</table>";
echo $output;
exit;
}