<?php

{
    global $weather_user, $weather_admin, $g_image_type;
    global $strings,
           $wind_dir_text_short_array, $wind_dir_text_array,
           $cloud_condition_array, $weather_array;
    
    $d1 = strtolower(substr($phpgw_info["server"]["app_inc"],0,3));
    if($d1 == "htt" || $d1 == "ftp" )
    {
        echo "Failed attempt to break in via an old Security Hole!<br>\n";
        $phpgw->common->phpgw_exit();
    } unset($d1);

    $tmp_inc_dir = $phpgw_info["server"]["app_inc"];
    $tmp_root_dir = $phpgw_info["server"]["app_root"];
    
    $phpgw_info["server"]["app_inc"]  = $phpgw->common->get_inc_dir('weather');
    $phpgw_info["server"]["app_root"] = $phpgw->common->get_app_dir('weather');
    
    include($phpgw_info["server"]["app_inc"].'/functions.inc.php');

    weather_get_admin_data();
    
    weather_get_user_data();

    if ($weather_user["frontpage_enabled"] == 1)
    {
        weather_display_frontpage();
    }
    
    $phpgw_info["server"]["app_inc"]  = $tmp_app_dir;
    $phpgw_info["server"]["app_root"] = $tmp_root_dir;
}

?>
