Skip to content
Permalink
Browse files

cleaned up wu forecast ahead alerts

  • Loading branch information...
brian underdown brian underdown
brian underdown authored and brian underdown committed Apr 9, 2019
1 parent c9525cc commit 62f72581c1d304d7c45a4b93edf75bf89c529f61
Showing with 32 additions and 35 deletions.
  1. +29 −33 forecast3wularge.php
  2. +3 −2 shared.php
@@ -157,45 +157,41 @@
else if ($wuskydayUV>2){echo "<yellowwuv>".$wuskydayUV. '</yellowwuv><wuinfo> '.$wuskydayUVdesc;}
else if ($wuskydayUV>0){echo "<greenwuv>".$wuskydayUV. '</greenwuv><wuinfo>'.$wuskydayUVdesc;}
else if ($wuskydayUV==0){echo "<greywuv>".$wuskydayUV. '</greywuv><wuinfo> No Caution';}echo '</div>';
///heatindex wu
///wuheat index F
echo "<div class=wulargeheatindex>";
if ($tempunit=='F' && $wuskyheatindex>=84.2){echo "Heat Index ".$heatindex."&nbsp;<heatindexwu>".number_format($wuskyheatindex,0). '°<wuunits>F</wuunits></heatindexwu>';}
//feels wu
else if ($tempunit=='F' && $wuskywindchill<=41){echo "Wind Chill &nbsp;".$windchillwu."&nbsp;<windchillwu>".number_format($wuskywindchill,0). '°<wuunits>F</wuunits></windchillwu>';}
if ($tempunit=='F' && $wuskyheatindex>=84.2){echo "Heat Index ".$heatindexwu."<heatindexwu>".number_format($wuskyheatindex,0). '°<wuunits>F</wuunits></heatindexwu>';}
//wu heat index C
if ($tempunit=='C' && $wuskyheatindex>=29){echo "Heat Index ".$heatindexwu." <heatindexwu>".number_format($wuskyheatindex,0). '°<wuunits>C</wuunits></heatindexwu>';}
//heat index
if ($tempunit=='C' && $wuskyheatindex>=29){echo "Heat Index ".$heatindex."&nbsp; <heatindexwu>".number_format($wuskyheatindex,0). '°<wuunits>C</wuunits></heatindexwu>';}
//feels wu
else if ($tempunit=='C' && $wuskywindchill<=5){echo "Feels Like ".$feelslikewu."&nbsp; <windchillwu>".number_format($wuskywindchill,0). '°<wuunits>C</wuunits></heatindexwu>';}
//lightning wu
echo '</div><div class=wuthunder>';
if ($wuskythunder>0 ) {echo '<wuthunder2>'.$lightningalert8.' Thunderstorms expected '.$wuskydayTime.' </wuthunder2>';}
else if ($wuskythunder1>0 ) {echo '<wuthunder2>'.$lightningalert8.' Thunderstorms expected '.$wuskydayTime1.' </wuthunder2>';}
else if ($wuskythunder2>0 ) {echo '<wuthunder2>'.$lightningalert8.' Thunderstorms expected '.$wuskydayTime2.' </wuthunder2>';}
else if ($wuskythunder3>0 ) {echo '<wuthunder2>'.$lightningalert8.' Thunderstorms expected '.$wuskydayTime3.' </wuthunder2>';}
else if ($wuskythunder4>0 ) {echo '<wuthunder2>'.$lightningalert8.' Thunderstorms expected '.$wuskydayTime4.' </wuthunder2>';}
else if ($wuskythunder5>0 ) {echo '<wuthunder2>'.$lightningalert8.' Thunderstorms expected '.$wuskydayTime5.' </wuthunder2>';}
else if ($wuskythunder6>0 ) {echo '<wuthunder2>'.$lightningalert8.' Thunderstorms expected '.$wuskydayTime6.' </wuthunder2>';}
else if ($wuskythunder7>0 ) {echo '<wuthunder2>'.$lightningalert8.' Thunderstorms expected '.$wuskydayTime7.' </wuthunder2>';}
echo '</div><div class=wulargeheatindex style="margin-top:27px;width:16em;margin-left:98px">';
if ($wuskythunder>0 ) {echo 'Thunderstorms expected '.$wuskydayTime.' </wuthunder2>';}
else if ($wuskythunder1>0 ) {echo $infowu.'<ored>Thunder</ored> '.$wuskydayTime1. '&nbsp;'.$lightningalert8.'';}
else if ($wuskythunder2>0 ) {echo $infowu.'<ored>Thunder</ored> '.$wuskydayTime2. '&nbsp;'.$lightningalert8.'';}
else if ($wuskythunder3>0 ) {echo $infowu.'<ored>Thunder</ored> '.$wuskydayTime3. '&nbsp;'.$lightningalert8.'';}
else if ($wuskythunder4>0 ) {echo $infowu.'<ored>Thunder</ored> '.$wuskydayTime4. '&nbsp;'.$lightningalert8.'';}
else if ($wuskythunder5>0 ) {echo $infowu.'<ored>Thunder</ored> '.$wuskydayTime5. '&nbsp;'.$lightningalert8.'';}
else if ($wuskythunder6>0 ) {echo $infowu.'<ored>Thunder</ored> '.$wuskydayTime6. '&nbsp;'.$lightningalert8.'';}
else if ($wuskythunder7>0 ) {echo $infowu.'<ored>Thunder</ored> '.$wuskydayTime7. '&nbsp;'.$lightningalert8.'';}
//snowfall wu
else if ($wuskysnow>0 ) {echo '<wustormalert>'.$freezing.'</wustormalert><wuthunder2>Snow forecasted '.$wuskydayTime.' </wuthunder2>';}
else if ($wuskysnow1>0 ) {echo '<wustormalert>'.$freezing.'</wustormalert><wuthunder2>Snow forecasted '.$wuskydayTime1.' </wuthunder2>';}
else if ($wuskysnow2>0 ) {echo '<wustormalert>'.$freezing.'</wustormalert><wuthunder2>Snow forecasted '.$wuskydayTime2.' </wuthunder2>';}
else if ($wuskysnow3>0 ) {echo '<wustormalert>'.$freezing.'</wustormalert><wuthunder2>Snow forecasted '.$wuskydayTime3.' </wuthunder2>';}
else if ($wuskysnow4>0 ) {echo '<wustormalert>'.$freezing.'</wustormalert><wuthunder2>Snow forecasted '.$wuskydayTime4.' </wuthunder2>';}
else if ($wuskysnow5>0 ) {echo '<wustormalert>'.$freezing.'</wustormalert><wuthunder2>Snow forecasted '.$wuskydayTime5.' </wuthunder2>';}
else if ($wuskysnow6>0 ) {echo '<wustormalert>'.$freezing.'</wustormalert><wuthunder2>Snow forecasted '.$wuskydayTime6.' </wuthunder2>';}
else if ($wuskysnow7>0 ) {echo '<wustormalert>'.$freezing.'</wustormalert><wuthunder2>Snow forecasted '.$wuskydayTime7.' </wuthunder2>';}
else if ($wuskysnow>0 ) {echo $infowu.'<blue>Snow</blue> '.$wuskydayTime. '&nbsp;'.$freezing.'';}
else if ($wuskysnow1>0 ) {echo $infowu.'<blue>Snow</blue> '.$wuskydayTime1. '&nbsp;'.$freezing.'';}
else if ($wuskysnow2>0 ) {echo $infowu.'<blue>Snow</blue> '.$wuskydayTime2. '&nbsp;'.$freezing.'';}
else if ($wuskysnow3>0 ) {echo $infowu.'<blue>Snow</blue> '.$wuskydayTime3. '&nbsp;'.$freezing.'';}
else if ($wuskysnow4>0 ) {echo $infowu.'<blue>Snow</blue> '.$wuskydayTime4. '&nbsp;'.$freezing.'';}
else if ($wuskysnow5>0 ) {echo $infowu.'<blue>Snow</blue> '.$wuskydayTime5. '&nbsp;'.$freezing.'';}
else if ($wuskysnow6>0 ) {echo $infowu.'<blue>Snow</blue> '.$wuskydayTime6. '&nbsp;'.$freezing.'';}
else if ($wuskysnow7>0 ) {echo $infowu.'<blue>Snow</blue> '.$wuskydayTime7. '&nbsp;'.$freezing.'';}
//rainfall wu
else if ($wuskyrain>0 ) {echo '<wuthunder2>'.$rainfallalert8.' Rain Showers '.$wuskydayTime. ' </wuthunder2>';}
else if ($wuskyrain1>0 ) {echo '<wuthunder2>'.$rainfallalert8.' Rain Showers '.$wuskydayTime1. ' </wuthunder2>';}
else if ($wuskyrain2>0 ) {echo '<wuthunder2>'.$rainfallalert8.' Rain Showers '.$wuskydayTime2. ' </wuthunder2>';}
else if ($wuskyrain3>0 ) {echo '<wuthunder2>'.$rainfallalert8.' Rain Showers '.$wuskydayTime3. ' </wuthunder2>';}
else if ($wuskyrain4>0 ) {echo '<wuthunder2>'.$rainfallalert8.' Rain Showers '.$wuskydayTime4. ' </wuthunder2>';}
else if ($wuskyrain5>0 ) {echo '<wuthunder2>'.$rainfallalert8.' Rain Showers '.$wuskydayTime5. ' </wuthunder2>';}
else if ($wuskyrain6>0 ) {echo '<wuthunder2>'.$rainfallalert8.' Rain Showers '.$wuskydayTime6. ' </wuthunder2>';}
else if ($wuskyrain7>0 ) {echo '<wuthunder2>'.$rainfallalert8.' Rain Showers '.$wuskydayTime7. ' </wuthunder2>';}
else if ($wuskyrain>0 ) {echo $infowu.'<blue>Rain</blue> '.$wuskydayTime. '&nbsp;'.$rainfallalert8.'';}
else if ($wuskyrain1>0 ) {echo $infowu.'<blue>Rain</blue> '.$wuskydayTime1.'&nbsp;'.$rainfallalert8.'';}
else if ($wuskyrain2>0 ) {echo $infowu.'<blue>Rain</blue> '.$wuskydayTime2.'&nbsp;'.$rainfallalert8.'';}
else if ($wuskyrain3>0 ) {echo $infowu.'<blue>Rain</blue> '.$wuskydayTime3. '&nbsp;'.$rainfallalert8.'';}
else if ($wuskyrain4>0 ) {echo $infowu.'<blue>Rain</blue> '.$wuskydayTime4. '&nbsp;'.$rainfallalert8.'';}
else if ($wuskyrain5>0 ) {echo $infowu.'<blue>Rain</blue> '.$wuskydayTime5. '&nbsp;'.$rainfallalert8.'';}
else if ($wuskyrain6>0 ) {echo $infowu.'<blue>Rain</blue> '.$wuskydayTime6. '&nbsp;'.$rainfallalert8.'';}
else if ($wuskyrain7>0 ) {echo $infowu.'<blue>Rain</blue> '.$wuskydayTime7. '&nbsp;'.$rainfallalert8.'';}
else echo $lightningalert8. "&nbsp;No Cautions";
echo '</div>';?></div></div></div>
@@ -442,6 +442,7 @@ function distance($lat, $lon, $lati, $longi) {
<path fill="#d05f2d" stroke="#d05f2d" stroke-width="0.09375" opacity="1.00" d=" M 94.24 33.23 C 106.10 23.71 121.88 18.18 137.10 20.91 C 150.77 23.09 162.89 30.83 172.86 40.14 C 185.30 51.88 198.09 63.70 213.46 71.52 C 222.73 76.23 233.65 79.13 243.92 76.10 C 245.97 75.67 248.52 74.29 250.00 76.59 L 250.00 77.41 C 243.65 83.99 235.05 88.09 226.37 90.62 C 211.92 94.57 196.20 91.32 183.71 83.32 C 173.86 77.45 166.16 68.84 157.60 61.36 C 148.96 53.84 139.88 46.65 129.66 41.38 C 120.64 36.87 110.14 33.45 100.05 36.12 C 97.82 36.48 95.53 37.70 93.28 36.81 C 92.94 35.46 92.75 33.94 94.24 33.23 Z" /><path fill="#ff832f" stroke="#ff832f" stroke-width="0.09375" opacity="1.00" d=" M 40.96 70.24 C 55.35 59.16 73.48 51.97 91.86 53.82 C 112.91 55.25 131.31 67.49 146.46 81.37 C 160.43 94.60 174.85 107.67 191.64 117.27 C 205.48 125.28 221.84 130.62 237.92 127.34 C 240.94 127.12 244.23 125.18 247.05 127.08 C 247.03 127.74 246.99 129.04 246.97 129.70 C 232.18 142.37 212.89 151.02 193.10 149.31 C 176.62 148.37 161.34 140.68 148.46 130.76 C 141.24 125.29 134.74 118.98 128.15 112.80 C 113.51 99.62 97.87 86.88 79.42 79.47 C 68.23 74.90 55.71 73.38 43.88 76.15 C 41.67 76.37 38.79 77.88 37.14 75.68 C 36.36 73.01 39.31 71.67 40.96 70.24 Z" /><path fill="#e6a141" stroke="#e6a141" stroke-width="0.09375" opacity="1.00" d=" M 3.50 118.53 C 15.56 108.44 30.33 100.94 46.17 99.59 C 64.81 97.72 83.26 104.85 98.11 115.75 C 106.84 121.93 114.50 129.44 122.30 136.71 C 134.76 147.91 147.93 158.61 162.99 166.12 C 173.19 171.17 184.49 174.68 195.98 174.06 C 201.25 173.92 206.34 172.21 211.61 171.97 C 212.00 172.54 212.79 173.68 213.18 174.25 C 211.39 177.16 208.29 178.78 205.59 180.71 C 195.79 187.36 184.84 192.67 173.06 194.55 C 161.43 196.13 149.37 194.93 138.42 190.57 C 122.59 184.47 109.28 173.47 97.23 161.77 C 84.46 149.94 71.03 138.53 55.65 130.21 C 44.46 124.18 31.89 119.80 19.01 120.66 C 14.33 120.76 9.80 122.01 5.19 122.66 C 3.05 123.04 1.43 119.77 3.50 118.53 Z" /><path fill="#90b12a" stroke="#90b12a" stroke-width="0.09375" opacity="1.00" d=" M 26.44 157.60 C 40.14 154.39 54.65 158.24 66.35 165.64 C 77.14 172.14 85.34 181.89 94.99 189.83 C 106.04 199.15 118.02 208.17 132.13 212.13 C 139.32 214.27 147.04 213.87 154.14 211.59 C 156.28 210.49 158.15 213.79 156.18 215.09 C 147.11 222.60 135.83 227.63 124.02 228.51 C 106.54 229.76 90.07 220.91 77.61 209.29 C 63.90 196.42 49.84 183.15 32.41 175.48 C 23.21 171.33 12.55 170.13 2.91 173.51 C 1.29 174.56 -1.18 171.20 0.84 170.21 C 8.51 164.54 17.09 159.79 26.44 157.60 Z" /></svg>';
$windchillwu='<svg "weather34 windchill wu icon" width="10px" height="10px" viewBox="0 0 250 250" version="3.4.2019" >
<path fill="#009bab" stroke="#009bab" stroke-width="0.09375" opacity="1.00" d=" M 94.24 33.23 C 106.10 23.71 121.88 18.18 137.10 20.91 C 150.77 23.09 162.89 30.83 172.86 40.14 C 185.30 51.88 198.09 63.70 213.46 71.52 C 222.73 76.23 233.65 79.13 243.92 76.10 C 245.97 75.67 248.52 74.29 250.00 76.59 L 250.00 77.41 C 243.65 83.99 235.05 88.09 226.37 90.62 C 211.92 94.57 196.20 91.32 183.71 83.32 C 173.86 77.45 166.16 68.84 157.60 61.36 C 148.96 53.84 139.88 46.65 129.66 41.38 C 120.64 36.87 110.14 33.45 100.05 36.12 C 97.82 36.48 95.53 37.70 93.28 36.81 C 92.94 35.46 92.75 33.94 94.24 33.23 Z" /><path fill="#009bab" stroke="#009bab" stroke-width="0.09375" opacity="1.00" d=" M 40.96 70.24 C 55.35 59.16 73.48 51.97 91.86 53.82 C 112.91 55.25 131.31 67.49 146.46 81.37 C 160.43 94.60 174.85 107.67 191.64 117.27 C 205.48 125.28 221.84 130.62 237.92 127.34 C 240.94 127.12 244.23 125.18 247.05 127.08 C 247.03 127.74 246.99 129.04 246.97 129.70 C 232.18 142.37 212.89 151.02 193.10 149.31 C 176.62 148.37 161.34 140.68 148.46 130.76 C 141.24 125.29 134.74 118.98 128.15 112.80 C 113.51 99.62 97.87 86.88 79.42 79.47 C 68.23 74.90 55.71 73.38 43.88 76.15 C 41.67 76.37 38.79 77.88 37.14 75.68 C 36.36 73.01 39.31 71.67 40.96 70.24 Z" /><path fill="#009bab" stroke="#009bab" stroke-width="0.09375" opacity="1.00" d=" M 3.50 118.53 C 15.56 108.44 30.33 100.94 46.17 99.59 C 64.81 97.72 83.26 104.85 98.11 115.75 C 106.84 121.93 114.50 129.44 122.30 136.71 C 134.76 147.91 147.93 158.61 162.99 166.12 C 173.19 171.17 184.49 174.68 195.98 174.06 C 201.25 173.92 206.34 172.21 211.61 171.97 C 212.00 172.54 212.79 173.68 213.18 174.25 C 211.39 177.16 208.29 178.78 205.59 180.71 C 195.79 187.36 184.84 192.67 173.06 194.55 C 161.43 196.13 149.37 194.93 138.42 190.57 C 122.59 184.47 109.28 173.47 97.23 161.77 C 84.46 149.94 71.03 138.53 55.65 130.21 C 44.46 124.18 31.89 119.80 19.01 120.66 C 14.33 120.76 9.80 122.01 5.19 122.66 C 3.05 123.04 1.43 119.77 3.50 118.53 Z" /><path fill="#009bab" stroke="#009bab" stroke-width="0.09375" opacity="1.00" d=" M 26.44 157.60 C 40.14 154.39 54.65 158.24 66.35 165.64 C 77.14 172.14 85.34 181.89 94.99 189.83 C 106.04 199.15 118.02 208.17 132.13 212.13 C 139.32 214.27 147.04 213.87 154.14 211.59 C 156.28 210.49 158.15 213.79 156.18 215.09 C 147.11 222.60 135.83 227.63 124.02 228.51 C 106.54 229.76 90.07 220.91 77.61 209.29 C 63.90 196.42 49.84 183.15 32.41 175.48 C 23.21 171.33 12.55 170.13 2.91 173.51 C 1.29 174.56 -1.18 171.20 0.84 170.21 C 8.51 164.54 17.09 159.79 26.44 157.60 Z" /></svg>';
$lightningalert8='<svg id="weather34 wu lightning alert large" width="24pt" height="24pt" fill="#ff552e" viewBox="0 0 20 20"><path d="M19.64 16.36L11.53 2.3A1.85 1.85 0 0 0 10 1.21 1.85 1.85 0 0 0 8.48 2.3L.36 16.36C-.48 17.81.21 19 1.88 19h16.24c1.67 0 2.36-1.19 1.52-2.64zM11 16H9v-2h2zm0-4H9V6h2z"/></svg>';
$rainfallalert8='<svg id="weather34 wu rainfall alert" width="22px" height="22px" fill="#009bab" viewBox="0 0 20 20"><path d="M19.64 16.36L11.53 2.3A1.85 1.85 0 0 0 10 1.21 1.85 1.85 0 0 0 8.48 2.3L.36 16.36C-.48 17.81.21 19 1.88 19h16.24c1.67 0 2.36-1.19 1.52-2.64zM11 16H9v-2h2zm0-4H9V6h2z"/></svg>';
$lightningalert8='<svg id="weather34 wu lightning alert large" width="8pt" height="8pt" fill="#ff552e" viewBox="0 0 20 20"><path d="M19.64 16.36L11.53 2.3A1.85 1.85 0 0 0 10 1.21 1.85 1.85 0 0 0 8.48 2.3L.36 16.36C-.48 17.81.21 19 1.88 19h16.24c1.67 0 2.36-1.19 1.52-2.64zM11 16H9v-2h2zm0-4H9V6h2z"/></svg>';
$rainfallalert8='<svg id="weather34 wu rainfall alert" width="8pt" height="8pt" fill="#009bab" viewBox="0 0 20 20"><path d="M19.64 16.36L11.53 2.3A1.85 1.85 0 0 0 10 1.21 1.85 1.85 0 0 0 8.48 2.3L.36 16.36C-.48 17.81.21 19 1.88 19h16.24c1.67 0 2.36-1.19 1.52-2.64zM11 16H9v-2h2zm0-4H9V6h2z"/></svg>';
$infowu='<svg id=wu-info viewBox="0 0 32 32" width="9px" height="9px" fill=none stroke=currentcolor stroke-linecap=round stroke-linejoin=round stroke-width=6.25%><path d="M16 14 L16 23 M16 8 L16 10" /><circle cx=16 cy=16 r=14 /></svg> ';
?>

0 comments on commit 62f7258

Please sign in to comment.
You can’t perform that action at this time.