function myChill($array = '')
{
    global $SITE;
    if (!is_array($array)) {
        return '<td>' . langtransstr('Feels like') . '</td>';
    }
    $temp = $array['temp'];
    if (!isset($array['chill'])) {
        $chill = $temp;
    } else {
        $chill = $array['chill'];
    }
    if (!isset($array['heat'])) {
        $heat = $temp;
    } else {
        $heat = $array['heat'];
    }
    list($value, $word) = wsFeelslikeTemp($temp, $chill, $heat, $SITE['uomTemp']);
    $tip = '<td style="text-align: right;">' . langtransstr('Feels like') . ':&nbsp;</td><td>' . $value . $SITE['uomTemp'] . '</td>';
    return array('<td>' . $word . '</td>', $tip);
}
示例#2
0
    $highTemp = $ws['tempMaxToday'];
} else {
    $highTemp = $ws['tempMaxYday'];
}
if ($ws['tempMinToday'] <= $ws['tempMinYday']) {
    $lowTemp = $ws['tempMinToday'];
} else {
    $lowTemp = $ws['tempMinYday'];
}
if ($SITE['uomTemp'] == '&deg;C') {
    $uom = 'C';
} else {
    $uom = 'F';
}
$string1 .= "\r\najaxVars['ajaxthermometer']     = '<img class=\"colImgThermo\" src=\"" . $SITE['imgDir'] . "thermometer.php?t=" . $ws['tempAct'] . "&amp;tmin=" . $lowTemp . "&amp;tmax=" . $highTemp . "&amp;uom=" . $uom . "\"  alt=\"" . $txt . "\" title=\"" . $txt . "\"/>';";
list($feelslike, $heatcolourword) = wsFeelslikeTemp($ws['tempAct'], $ws['chilAct'], $ws['heatAct'], $uomTemp);
$string1 .= "\r\najaxVars['ajaxheatcolorword']   = '" . $heatcolourword . "';\r\najaxVars['ajaxfeelslike']       = '" . $feelslike . $uomTemp . "';\r\najaxVars['ajaxfeelslikeNoU']    = '" . $feelslike . "';\t\t\r\najaxVars['ajaxtempmax']         = '" . wsNumber($ws['tempMaxToday'], $decTemp) . $uomTemp . "';\r\najaxVars['ajaxtempmin']         = '" . wsNumber($ws['tempMinToday'], $decTemp) . $uomTemp . "';\r\najaxVars['ajaxtempmaxTime']     = '" . string_date($ws['tempMaxTodayTime'], $SITE['timeOnlyFormat']) . "';\r\najaxVars['ajaxtempminTime']     = '" . string_date($ws['tempMinTodayTime'], $SITE['timeOnlyFormat']) . "';";
#   Dewpoint  items
$textUP = langtransstr("Increased by") . ':  %s ' . $uomTemp . ' ' . langtransstr("the last hour") . ".";
$textDN = langtransstr("Decreased by") . ':  %s ' . $uomTemp . ' ' . langtransstr("the last hour") . ".";
$text = wsGenArrow($ws['dewpAct'], $ws['dewpDelta'], $textUP, $textDN, $decTemp);
$string1 .= "\r\najaxVars['ajaxdew']             = '" . wsNumber($ws['dewpAct'], $decTemp) . $uomTemp . "';\r\najaxVars['ajaxdewNoU']          = '" . wsNumber($ws['dewpAct'], $decTemp) . "';\r\najaxVars['ajaxdewarrow']        = '" . $text . "';";
#  ---------------------------  Current condition items
$condDescAlt = str_replace('<br />', '-', $condDesc);
$conditionicon = '<img class="colImgCCN" src="' . $ccnIconUrl . '" alt="' . $condDescAlt . '" title="' . $condDescAlt . '"/>';
$conditioniconM = '<img class="colimg"    src="' . $ccnIconUrl . '" alt="' . $condDescAlt . '" title="' . $condDescAlt . '" style ="width: 26px; height: 26px;"/>';
$string1 .= "\r\najaxVars['ajaxconditionicon']   = '" . $conditionicon . "';\r\najaxVars['ajaxconditioniconMobi'] = '" . $conditioniconM . "';\r\najaxVars['ajaxcurrentcond']     = '" . $condDesc . "';\r\najaxVars['ajaxcurrentcondalt']  = '" . $condDescAlt . "';";
#  ---------------------------  Rain items
$unit = ' ' . langtransstr(trim($uomRain));
$decPrecip = $SITE['decPrecip'];
$string1 .= "\r\najaxVars['ajaxrain']            = '" . wsNumber($ws['rainToday'], $decPrecip) . $unit . "';\r\najaxVars['ajaxrainNoU']         = '" . wsNumber($ws['rainToday'], $decPrecip) . "';\r\najaxVars['ajaxrainrateNoU']     = '" . wsNumber($ws['rainRateAct'], $decPrecip) . "';";