Модуль Погода v1.26.01
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

49 lines
1.0 KiB

<?php
/**
* AVE.cms - module Weather
*
* @package AVE.cms
* @author N.Popova, npop@abv.bg
* @subpackage mod_weather
* @filesource
*/
if (!defined('BASE_DIR')) exit;
function mod_weather()
{
require_once(BASE_DIR . "/modules/weather/class/weather.php");
$weather = new Weather();
$tpl_dir = BASE_DIR . '/modules/weather/templates/';
$lang_file = BASE_DIR . "/modules/weather/lang/" . $_SESSION['user_language'] . ".txt";
if (! is_file(BASE_DIR . '/cache/')) {@mkdir(BASE_DIR . '/cache/', 0777);}
$weather->ShowWeather($tpl_dir, $lang_file);
}
if (defined('ACP') && ! empty($_REQUEST['moduleaction']))
{
require_once(BASE_DIR . "/modules/weather/class/weather.php");
$tpl_dir = BASE_DIR . '/modules/weather/templates/';
$lang_file = BASE_DIR . "/modules/weather/lang/" . $_SESSION['user_language'] . ".txt";
$weather = new Weather();
$AVE_Template->config_load($lang_file, "admin");
switch($_REQUEST['moduleaction'])
{
case '1':
$weather->weatherSettingsEdit($tpl_dir, $lang_file);
break;
}
}
?>