Ejemplo n.º 1
0
		<div class="container-fluid">
			<div class="navbar-header">
				<span class="navbar-title">Skip To Section</span>
				<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#sections-menu">
					<span class="sr-only">Toggle navigation</span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
			</div>
			<div class="collapse navbar-collapse" id="sections-menu">
					<ul class="nav navbar-nav">

					</ul>
				<?php 
$weather = get_weather_data();
?>
				<?php 
if ($weather) {
    ?>
				<div class="weather navbar-right">
					<?php 
    if ($weather->icon) {
        ?>
						<span class="icon" title="<?php 
        echo $weather->condition;
        ?>
">
							<span class="<?php 
        echo $weather->icon;
        ?>
Ejemplo n.º 2
0
function display_weather()
{
    $weather = get_weather_data();
    ob_start();
    ?>
	<?php 
    if ($weather) {
        ?>
		<div class="weather">
			<?php 
        if ($weather->icon) {
            ?>
				<span class="icon" title="<?php 
            echo $weather->condition;
            ?>
">
					<span class="<?php 
            echo $weather->icon;
            ?>
"></span>
				</span>
			<?php 
        }
        ?>
			<span class="location">Orlando, FL</span>
			<span class="vertical-rule"></span>
			<span class="temp"><?php 
        echo $weather->tempN;
        ?>
&deg;F</span>
		</div>
	<?php 
    }
    return ob_get_clean();
}
Ejemplo n.º 3
0
function get_weather()
{
    global $weather_provider;
    echo json_encode($weather_provider == "yahoo" ? get_weather_data() : get_wunderground_weather_data());
}