当前位置: 首页>>代码示例>>PHP>>正文


PHP ws_message函数代码示例

本文整理汇总了PHP中ws_message函数的典型用法代码示例。如果您正苦于以下问题:PHP ws_message函数的具体用法?PHP ws_message怎么用?PHP ws_message使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ws_message函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: strpos

        $pos_index = strpos($string_url, 'index');
        if ($pos_index > 0) {
            $last_pos = $pos_end;
            continue;
        }
        // skip urls to other parts, we only need urls to areas
        $string_url = str_replace('<a class="" href="', '', $string_url);
        list($url, $name) = explode('">', $string_url);
        # echo '<pre> $url= '.$url.' $name= '.$name."</pre> \n ";
        $arrLocation[] = array('location' => $name, 'url' => $url);
        $last_pos = $pos_end;
    }
    if (!file_put_contents($cacheFileName, serialize($arrLocation))) {
        exit('ERROR FATAL module ec_print_aqhi.php (' . __LINE__ . '): Could not save ' . $cacheFileName . '. Please make your cache directory writable.<br />Program ended.');
    } else {
        ws_message('<!-- module ec_print_aqhi.php (' . __LINE__ . '): ' . $cacheFileName . ' saved to cache-->');
    }
}
$url = '';
for ($n = 0; $n < count($arrLocation); $n++) {
    $location = $arrLocation[$n]['location'];
    $compare = mb_strtolower($location, 'UTF-8');
    if ($aqhiArea == $compare || $aqhiArea_f == $compare) {
        $page = 'http://weather.gc.ca' . $arrLocation[$n]['url'];
        break;
    }
}
/*
echo '<pre>
$location       = '.$location.'
$compare        = '.$compare.'
开发者ID:shakaran,项目名称:weatherpro,代码行数:31,代码来源:ec_print_aqhi.php

示例2: foreach

        $string2 = '';
        // the immages
        foreach ($sideArrHwSw as $key => $arr) {
            $string1 .= '<td ' . $styleTd . '><p>' . $arr['name'] . '<br />' . $arr['alt'] . '</p></td>' . PHP_EOL;
            $string2 .= '<td ' . $styleTd . '><p>
  <a href="' . $arr['link'] . '" target="_blank">';
            if ($doIcons == 'yes') {
                if ($arr['icon'] != '') {
                    $string2 .= '
   <img ' . $styleImg . ' src="' . $arr['icon'] . '" title="' . $arr['alt'] . '" alt="' . $arr['alt'] . '"/>';
                }
            }
            $string2 .= '
  </a>
</p></td>' . PHP_EOL;
        }
        // eo for
        echo '<h3 class="blockHead">' . $headString . '</h3>
<table class="genericTable">
<tr>' . PHP_EOL . $string1 . '</tr>
<tr>' . PHP_EOL . $string2 . '</tr>
</table>' . PHP_EOL;
        unset($sideArrHwSw);
        echo '</div>' . PHP_EOL;
    } else {
        ws_message('<!-- module wsBottom.php (' . __LINE__ . '): no equipment found to display -->');
    }
}
// end equipment
# ----------------------  version history
# 3.20 2015-09-12 release 2.8 version
开发者ID:shakaran,项目名称:weatherpro,代码行数:31,代码来源:wsBottom.php

示例3: langtransstr

<script type="text/javascript" src="javaScripts/swfobject.js"></script>
<div class="blockDiv" style="overflow:hidden; ">
<h3 class="blockHead"><?php 
echo langtransstr('Live Data') . ' ' . langtransstr('from Weather-Underground') . '. ' . $link;
?>
</h3>
<div style= "width: <?php 
echo $wulWidth;
?>
; padding: 5px; margin: 0px auto;">
  <div id="wulContent">
<?php 
if (!isset($flash_replaced) && !isset($conflictSteel)) {
    $flash_replaced = true;
    $script = 'gauges/gauge_no_flash.php';
    ws_message('<!-- module WU_Live.php (' . __LINE__ . '): loading ' . $script . ' -->');
    include $script;
    echo '</br />
<p style="text-align: center;"><small>No FLASH-support found in your browser.   Weather-Underground-live display is replaced with Steelseries</small></p>
';
} else {
    echo '<b>Weather-Underground</b><br />can not be run, no Flash support available';
}
?>
  </div>
</div>
   <script type="text/javascript">
    swfobject.embedSWF("<?php 
echo $myUrl;
?>
", "wulContent", "<?php 
开发者ID:shakaran,项目名称:weatherpro,代码行数:31,代码来源:WU_Live.php

示例4: foreach

# generate the td's to output later.
$max_cities = 1;
foreach ($my_metars as $key => $arr) {
    $line1 .= '<th class="blockHead" style="width:' . $width . '; "><small>' . $my_metars[$key]['name'] . '</small> ';
    if ($link_forecast != false) {
        $line1 .= '
<a href="' . $link_forecast . '&amp;lang=' . $lang . '&amp;city=' . $my_metars[$key]['key'] . $skiptopText . '">
<span style="float: right;"><img src="./img/submit.png" style="margin:1px; vertical-align: middle;" alt="more information" title="more information">&nbsp;</span></a> ';
    }
    $line1 .= '</th>' . PHP_EOL;
    $line2 .= '<td style="text-align: center;">' . ws_commontemp_color($my_metars[$key]['temp']) . '&nbsp;&nbsp;<img src="./' . $my_metars[$key]['iconurl'] . '" alt=" " style="width: 28px; vertical-align: bottom;"/></td>' . PHP_EOL;
    $line3 .= '<td style="text-align: center;">' . $my_metars[$key]['desc'] . '</td>' . PHP_EOL;
    $max_cities++;
    if ($max_cities > $number_cities) {
        break;
    }
}
# echo all data now
echo '<!-- dash_metar.php -->
<div class="blockDiv">
<h3 class="blockHead">', langtransstr('The weather in interesting cities nearby') . '</h3>' . PHP_EOL;
ws_message('<!-- module dash_metar.php (' . __LINE__ . '): loaded ' . $number_cities . ' ccn using METAR in ' . $seconds_metar . ' seconds -->', true);
echo '<table class="" style="width: 100%;">
<tr>' . PHP_EOL . $line2 . '</tr>
<tr style="">' . PHP_EOL . $line3 . '</tr>
<tr style="height: 16px;">' . PHP_EOL . $line1 . '</tr>
</table>
</div>
<!-- end of dash_metar.php -->' . PHP_EOL;
# ----------------------  version history
# 3.20 2015-08-26 release 2.8 version
开发者ID:shakaran,项目名称:weatherpro,代码行数:31,代码来源:dash_metar.php

示例5: array

$uomBackup = array();
$uomBackup['uomTemp'] = $SITE['uomTemp'];
$uomBackup['uomBaro'] = $SITE['uomBaro'];
$uomBackup['uomWind'] = $SITE['uomWind'];
$uomBackup['uomRain'] = $SITE['uomRain'];
$uomBackup['uomSnow'] = $SITE['uomSnow'];
$uomBackup['uomDistance'] = $SITE['uomDistance'];
$uomBackup['uomPerHour'] = $SITE['uomPerHour'];
$uomBackup['uomHeight'] = $SITE['uomHeight'];
if (!isset($SITE['fctOrg'])) {
    $SITE['fctOrg'] = 'yahoo';
}
$SITE['fctOrgBackup'] = $SITE['fctOrg'];
#
if ($SITE['cookieSupport'] == true) {
    ws_message('<!-- module wsLoadSettings.php (' . __LINE__ . '): loading wsCookie.php   -->', false, $pathString);
    include 'wsCookie.php';
}
$uomTemp = $SITE['uomTemp'];
$uomBaro = $SITE['uomBaro'];
$uomRain = $SITE['uomRain'];
$uomSnow = $SITE['uomSnow'];
$uomDistance = $SITE['uomDistance'];
$uomWind = $SITE['uomWind'];
$uomPerHour = $SITE['uomPerHour'];
$uomHeight = $SITE['uomHeight'];
# set the Timezone abbreviation automatically based on $SITE['tz'];
if (!function_exists('date_default_timezone_set')) {
    putenv("TZ=" . $SITE['tz']);
} else {
    date_default_timezone_set($SITE['tz']);
开发者ID:shakaran,项目名称:weatherpro,代码行数:31,代码来源:wsLoadSettings.php

示例6: print_r

$ecForecast = $weather->getWeatherData($SITE['caProvince'], $SITE['caCityCode']);
#
# echo '<pre>'; print_r($ecForecast); echo '</pre>'; exit;
#
if (!isset($ecForecast['warnings']['maxType'])) {
    ws_message('<!-- module ' . $warnScriptName . ' (' . __LINE__ . '): no warnings  retrieved -->');
    return;
}
if ($ecForecast['warnings']['maxType'] == -1) {
    $warnings = false;
} else {
    $warnings = true;
}
if (!$warnings && !$SITE['warningGreen']) {
    // there are no warnings more severe than green and we do not display them either
    ws_message('<!-- module ' . $warnScriptName . ' (' . __LINE__ . '): no warnings in order and no green box needed  -->');
    return;
}
if (!$warnings && $SITE['warningGreen']) {
    // there are no warnings more severe than green but we need to display them
    $wrnStrings .= '<!-- module ' . $warnScriptName . ' (' . __LINE__ . '): no warnings in order -->
<div class="warnBox" style="background-color:  ' . $wrn_green_color . '">			
	<p style="font-weight: bold; margin: 2px 0px 2px 0px; min-height: 0px;">' . langtransstr('There are no warnings in order') . '</p>
</div>
<!-- end warnings -->' . PHP_EOL;
    return;
}
if (!isset($SITE['pages']['ec_print_warn'])) {
    $warn_link = '<a href="' . $ecForecast['warnings']['url'] . '" target="_blank">';
} else {
    if (!isset($skiptopText)) {
开发者ID:shakaran,项目名称:weatherpro,代码行数:31,代码来源:ec_warning.php

示例7: ws_message

# load the settings
$script = 'ec_settings.php';
ws_message('<!-- module ec_fct_generate_html.php (' . __LINE__ . '): loading ' . $script . ' -->');
include $script;
# get the data from the weather class
if (!isset($ecForecast)) {
    // check first if the script is already loaded (for warnings) so the class = OK
    $script = 'ec_fct_create_arr.php';
    ws_message('<!-- module ec_fct_generate_html.php (' . __LINE__ . '): loading ' . $script . ' -->');
    include_once $script;
    $weather = new ecPlainWeather();
}
$ecForecast = $weather->getWeatherData($caProvince, $caCityCode);
if (!is_array($ecForecast)) {
    ws_message('<!-- module ec_fct_generate_html.php (' . __LINE__ . '): no good data returned, script ends -->', true);
    ws_message('Module ec_fct_generate_html.php (' . __LINE__ . '): No good data - ending script');
    return false;
}
#echo '<pre>'; print_r ($ecForecast); echo '</pre>';
#-------------------------------------------------------------------------------
# now we generate the html to be used for output to the screen
#
$fileTime = $ecForecast['information']['fileTimeStamp'];
$line1 = 'Environment Canada ' . langtransstr('forecast for') . ':&nbsp;' . $yourArea;
$line2 = '&nbsp;&nbsp;' . langtransstr('Updated') . ':&nbsp;' . ecLongDate($fileTime) . ' - ' . date($timeFormat, $fileTime);
# These are the first  line(s) on the one page city forecast
$stringTop = '<div style="text-align: center;">' . $line1 . $line2 . '</div>';
#
# the icons
$tdWidth = floor(100 / $topCount) . '%';
$daypart = $icon = $PoP = $desc = $tempLow = $tempHigh = '    <tr>' . PHP_EOL;
开发者ID:shakaran,项目名称:weatherpro,代码行数:31,代码来源:ec_fct_generate_html.php

示例8: ws_message

            echo $echo . '</div>';
            return;
            // back to index.php as there is a fatal error
        }
        if ($count_errors == 0) {
            $this_grp = $next_grp;
            // display next step as there are no errors
        } else {
            $already_loaded = true;
            // because of errors display same step again
        }
    }
}
if ($already_loaded != true) {
    // load settings  for this step
    ws_message('<!-- module configure_page.php (' . __LINE__ . '): loading ' . $configure_load . ' -->');
    $result = (include $configure_load);
    if ($result == false) {
        echo $echo . '</div>';
        return;
        // back to index.php as there is a fatal error
    }
}
#
if ($generate == false) {
    # print a group of questions
    if ($conf_debug) {
        echo '<pre>' . print_r($form, true) . '</pre>';
    }
    #
    $footer = 'Settings for' . ':&nbsp;' . $organ . '&nbsp;&nbsp;(region: ' . $region . ' -  program: ' . $wp . ') Questions: ' . $process;
开发者ID:shakaran,项目名称:weatherpro,代码行数:31,代码来源:configure_page.php

示例9: langtransstr

$this_datasource = $SITE['meteowareFile'] . '?lang=' . $lang . '&wp=' . $SITE['WXsoftware'] . '&refresh=' . $this_time . '&key=nokey';
# ---------------------------------------------------------------------------------------
?>
<div class="blockDiv">
<h3 class="blockHead"><?php 
echo langtransstr('Live weatherdata from');
?>
 Meteoware</h3> 
<div style="background-color: #FAFAFA; height: 500px; overflow: hidden;"> 
	<div id="mwlwidget" style="">
<?php 
if (!isset($flash_replaced) && !isset($conflictSteel)) {
    $flash_replaced = true;
    echo '<br />' . PHP_EOL;
    $script = 'gauges/gauge_no_flash.php';
    ws_message('<!-- module wsMWlive_v3.php (' . __LINE__ . '): loading ' . $script . ' -->');
    include $script;
    echo '</br /></br />
<p style="text-align: center;"><small>No FLASH-support found in your browser.  Meteoware display is replaced with Steelseries</small></p>
';
} else {
    echo '<b>Meteoware</b><br />can not be run, no Flash support available';
}
?>
	</div>
</div>
</div>
<script type="text/javascript" src="javaScripts/swfobject.js"></script>
<script type="text/javascript">
        var flashVars = {  
        	datasource:  "<?php 
开发者ID:shakaran,项目名称:weatherpro,代码行数:31,代码来源:wsMWlive_v3.php

示例10: makeRequest

 private function makeRequest()
 {
     global $SITE;
     $test = false;
     if ($test) {
         ws_message('<!-- module ec_fct_create_arr.php (' . __LINE__ . '): test file ./canada/test2.xml loaded ', true);
         $this->rawData = file_get_contents('./canada/test2.xml');
         return;
     }
     ws_message('<!-- module ec_fct_create_arr.php (' . __LINE__ . '):  CURL will be executed for: ' . $this->weatherApiUrl . ' -->');
     $ch = curl_init();
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
     curl_setopt($ch, CURLOPT_URL, $this->weatherApiUrl);
     curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
     curl_setopt($ch, CURLOPT_TIMEOUT, 60);
     #		curl_setopt($ch, CURLOPT_FOLLOWLOCATION, $SITE['curlFollow']);
     $this->rawData = curl_exec($ch);
     curl_close($ch);
     #		echo '<!-- '.$this->weatherApiUrl .' -->'.PHP_EOL;
     #		echo '<!-- '.$this->rawData .' -->'.PHP_EOL; exit;
     if (empty($this->rawData)) {
         return false;
     }
     $search = array('Service Unavailable', 'Error 504', 'Error 503', 'HTTP Error 404', 'Page Not Found');
     $error = false;
     for ($i = 0; $i < count($search); $i++) {
         $int = strpos($this->rawData, $search[$i]);
         if ($int > 0) {
             $error = $search[$i];
             break;
         }
     }
     if ($error === false) {
         return true;
     } else {
         ws_message('<h3> module ec_fct_create_arr.php (' . __LINE__ . '): ERROR ' . $error . '  when loading forecast from url: ' . $this->weatherApiUrl . '</h3>', true);
         return false;
     }
 }
开发者ID:shakaran,项目名称:weatherpro,代码行数:39,代码来源:ec_fct_create_arr.php

示例11: langtransstr

                $long_text .= langtransstr('Calm') . ' ';
                $dirlabel = 'calm';
            }
            // eo wind_speed
            if (isset($mtr['gust_speed'])) {
                $speed = round(wsConvertWindspeed($mtr['wind_speed_kt'], 'kts', $SITE["uomWind"]), $SITE["decWind"]);
                $long_text .= '<br />' . langtransstr('Gust to') . ' ' . $speed . $SITE["uomWind"];
            }
            // eo gust
            $mtr['wind_text'] = $long_text;
            ws_message('<!-- module metarDisplay.php (' . __LINE__ . '):' . ' ' . $key . '  = ' . $long_text . ' -->');
        }
        // eo wind
    }
    // end clean up, translate etc
    ws_message('<!-- module metarDisplay.php (' . __LINE__ . '):' . print_r($mtr, true) . '  -->');
    // time to format the output for display
    if ($thisCol >= $maxCols) {
        echo '</tr>' . PHP_EOL;
        echo '<tr><td colspan="' . $maxCols . '"></td></tr>' . PHP_EOL;
        echo '<tr>' . PHP_EOL;
        $thisCol = 0;
    }
    echo '<td style="vertical-align:top; text-align: center; ">
<table  class="genericTable">
  <tr class="row-dark"><th colspan="2" class="blockHead">' . $mtrICAO . ' - ' . $mtrName;
    if ($mtrDistanceM != '' and $mtrDistanceK != '') {
        echo '<br/>' . langtransstr('Distance from station') . ': ';
        if ($direction != '') {
            echo ' ' . langtransstr($direction) . ' ';
        }
开发者ID:shakaran,项目名称:weatherpro,代码行数:31,代码来源:metarDisplay.php

示例12: file_get_contents

    // file with userdata
    if (file_exists($file)) {
        // if file was found
        $filestring = file_get_contents($file);
        ws_message('<!-- module wsFooter.php (' . __LINE__ . '): visited pages (' . $file . ') loaded -->');
        $arrVisits = unserialize($filestring);
    }
    $page = $SITE['pageRequest'];
    if (!isset($arrVisits[$page])) {
        $arrVisits[$page] = 0;
    }
    $arrVisits[$page]++;
    $filestring = serialize($arrVisits);
    file_put_contents($file, $filestring, LOCK_EX);
    ws_message('<!-- module wsFooter.php (' . __LINE__ . '): visited pages (' . $file . ') saved -->');
    ws_message('<!-- module wsFooter.php (' . __LINE__ . '): ' . print_r($arrVisits, true) . ' -->');
}
// eo pages visited
#---------------------------------------------------------------------------
$credit = langtransstr('Scripts from') . ': <a href="http://leuven-template.eu/index.php?lang=' . $lang . '" target="_blank">Leuven-Template</a>  (' . $versionFooter . ') | ' . PHP_EOL;
$program = langtransstr('Weather program') . ': <a href="' . $SITE['WXsoftwareURL'] . '" target="_blank">' . $SITE['WXsoftwareLongName'] . '</a>' . PHP_EOL;
# now we generate the foorter html as a string
#
$strFooter = '<div id="footer" class="blockDiv" >
<div style="float: left;" >
  <a href="#' . $back_top . '" title="Goto Top of Page"><img src="ajaxImages/toparrow.gif" alt=" " style="border: 0px;"></a>
</div>
<!--  copyright - links to software used    -->
&copy; ' . gmdate("Y", time()) . ' ' . $SITE['organ'] . ' | ' . $credit . $program;
#
if (isset($ws['wsVersion']) && $ws['wsVersion'] != '' && $ws['wsVersion'] != '--' && $ws['wsVersion'] != '---' && trim($ws['wsVersion']) != '') {
开发者ID:shakaran,项目名称:weatherpro,代码行数:31,代码来源:wsFooter.php

示例13: basename

# 3.20 2015-07-19 release 2.8 version
#-------------------------------------------------------------------------------
if (!isset($SITE)) {
    echo "<h3>invalid call to script {$pageName}</h3>";
    exit;
}
$SITE['wsModules'][$pageName] = 'version: ' . $pageVersion;
$pageFile = basename(__FILE__);
// check to see this is the real script
if ($pageFile != $pageName) {
    $SITE['wsModules'][$pageFile] = 'this file loaded instead of ' . $pageName;
}
ws_message('<!-- module ' . $pageFile . ' ==== ' . $SITE['wsModules'][$pageFile] . ' -->');
#-----------------------------------------------------------------------
$arrFct = array();
$arrFct['metno'] = 'ws_metno_page';
$arrFct['yahoo'] = 'yahooForecast2';
$arrFct['wu'] = 'wu_fct_page';
$arrFct['wxsim'] = 'wsWxsimPrintFull';
$arrFct['yrno'] = 'ws_yrno_page';
$arrFct['noaa'] = 'noaa_full_page';
$arrFct['ec'] = 'ec_print_fct';
$arrFct['hwa'] = 'hwaFullPage';
# yowindow
$fct_org = $SITE['fctOrg'];
$fct_page = $arrFct[$fct_org];
$fct_link = $menuArray[$fct_page]['link'];
ws_message('<!-- module wsForecast.php (' . __LINE__ . '): loading ' . $fct_link . ' -->');
include $fct_link;
# ----------------------  version history
# 3.20 2015-07-19 release 2.8 version
开发者ID:shakaran,项目名称:weatherpro,代码行数:31,代码来源:wsForecast.php

示例14: ceil

}
$graphHumMin = $graphHumMax - $graphNrLines * $graphhumStep;
$humMax = $humMax + $graphhumStep;
$humMin = $humMin - $graphhumStep;
$stringY .= 'hum max: ' . $graphHumMax . ' hum min: ' . $graphHumMin . PHP_EOL;
#
if ($graphWindMax < $graphNrLines) {
    $graphWindMax = $graphNrLines;
}
$graphWindStep = ceil($graphWindMax / $graphNrLines);
$graphWindMax = $graphNrLines * $graphWindStep;
$windMax = $graphWindMax;
$graphWindMax = $graphWindMax * 2;
$graphWindStep = $graphWindStep * 2;
$stringY .= 'wind max: ' . $graphWindMax . ' wind step: ' . $graphWindStep . PHP_EOL;
ws_message('<!-- module wuforecast3.php (' . __LINE__ . '): ' . PHP_EOL . $stringY . '-->');
#
$graphDaysString = '{';
$daysShort = array('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');
$daysLong = array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');
for ($i = 0; $i < count($daysShort); $i++) {
    $graphDaysString .= "'{$daysShort[$i]}':'" . wswufcttransstr($trans . $daysLong[$i]) . "',";
}
$graphDaysString = substr($graphDaysString, 0, strlen($graphDaysString) - 1);
$graphDaysString .= '}';
$graphsStart = 1000 * ($graphsStart + 6 * 3600 + $utcDiff);
$graphsStop = 1000 * ($graphsStop + 18 * 3600 + $utcDiff);
$n = $end - 1;
$ddays = '';
#
for ($i = 0; $i < count($graphsDays); $i++) {
开发者ID:shakaran,项目名称:weatherpro,代码行数:31,代码来源:wuforecast3.php

示例15: yrnobeaufort

function yrnobeaufort($wind, $usedunit = '')
{
    global $wsDebug;
    $beaufort = array();
    // return array with nr - color - text
    $colors = array("transparent", "transparent", "transparent", "transparent", "transparent", "transparent", "#FFFF53", "#F46E07", "#F00008", "#F36A6A", "#6D6F04", "#640071", "#650003");
    $texts = array("Calm", "Light air", "Light breeze", "Gentle breeze", "Moderate breeze", "Fresh breeze", "Strong breeze", "Near gale", "Gale", "Strong gale", "Storm", "Violent storm", "Hurricane");
    if ($usedunit != '' && $usedunit != 'kts') {
        // convert windspeed
        $wind = yrnoconvertwind($wind, $usedunit, 'kts');
    }
    $windkts = $wind * 1.0;
    #
    switch (TRUE) {
        // return a number for the beaufort scale based on wind in knots
        case $windkts < 1:
            $beuafortnr = 0;
            break;
        case $windkts < 4:
            $beuafortnr = 1;
            break;
        case $windkts < 7:
            $beuafortnr = 2;
            break;
        case $windkts < 11:
            $beuafortnr = 3;
            break;
        case $windkts < 17:
            $beuafortnr = 4;
            break;
        case $windkts < 22:
            $beuafortnr = 5;
            break;
        case $windkts < 28:
            $beuafortnr = 6;
            break;
        case $windkts < 34:
            $beuafortnr = 7;
            break;
        case $windkts < 41:
            $beuafortnr = 8;
            break;
        case $windkts < 48:
            $beuafortnr = 9;
            break;
        case $windkts < 56:
            $beuafortnr = 10;
            break;
        case $windkts < 64:
            $beuafortnr = 11;
            break;
        default:
            $beuafortnr = 12;
            break;
    }
    // eo switch
    $beaufort[] = $beuafortnr;
    $beaufort[] = $colors[$beuafortnr];
    $beaufort[] = $texts[$beuafortnr];
    ws_message('<!-- module yrnosettings.php (' . __LINE__ . '): yrnobeaufort in = windspeed: ' . $wind . ' , unitFrom: ' . $usedunit . ',  nr = ' . $beaufort[0] . ' color =' . $beaufort[1] . ', text = ' . $beaufort[2] . ' -->');
    return $beaufort;
}
开发者ID:shakaran,项目名称:weatherpro,代码行数:62,代码来源:yrnosettings.php


注:本文中的ws_message函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。