<?php
define('__KIMS__', true);
error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING);
$widget = isset($_GET['widget']) ? preg_replace('/[^a-zA-Z0-9_\/-]/', '', $_GET['widget']) : '_acc/weather';
$today = isset($_GET['today']) ? preg_replace('/[^0-9]/', '', $_GET['today']) : date('Ymd');
$path = str_replace('widgets/'.$widget.'/'.basename($_SERVER['SCRIPT_FILENAME']), '', $_SERVER['SCRIPT_FILENAME']);
include_once $path.'_core/function/sys.func.php';
include_once __DIR__.'/_weather.lib.php';
jusqWeatherUpdate(__DIR__.'/data/'.$today.'.txt');
header('Content-Type: text/html; charset=utf-8');
?>
<!doctype html><html><body><script>if(parent&&parent!==window){parent.location.reload();}</script></body></html>
