Example #1
0
function Sidebar_Show($parameters)
{
    global $configVal;
    requireComponent('Textcube.Function.Setting');
    $datas = setting::fetchConfigVal($configVal);
    $cityname = $datas['city1'];
    $weather = 'http://www.google.co.kr/ig/api?&weather=' . $cityname . '&hl=ko&oe=utf-8';
    $img = "http://www.google.co.kr";
    $xml = simplexml_load_file($weather)->weather->forecast_information;
    $xml1 = simplexml_load_file($weather)->weather->current_conditions;
    $xml2 = simplexml_load_file($weather)->weather->forecast_conditions;
    $city = $xml->city;
    $date = $xml->forecast_date;
    $condition = $xml1->condition;
    $temp_min = $xml2->low;
    $temp_max = $xml2->high;
    $humidity = $xml1->humidity;
    $imgdata = $xml1->icon;
    $wind = $xml1->wind_condition;
    //인터페이스 부분//
    $code = "<br>";
    $code .= "<b>지역명 : </b>";
    $code .= $cityname;
    $code .= "<br>";
    $code .= "<b>날짜</b> : ";
    $code .= $date[data];
    $code .= "<br><br><center>";
    $code .= "<b>기상상태</b>";
    $code .= "<br>";
    $code .= "<img src=" . $img . $imgdata[data] . ">";
    $code .= "<br>";
    $code .= $condition[data];
    $code .= "</center><br>";
    $code .= "<b>최저 ~ 최고온도</b> : ";
    $code .= $temp_min[data] . "℃ ~ ";
    $code .= $temp_max[data] . "℃";
    $code .= "<br>";
    $code .= $humidity[data];
    $code .= "<br>";
    $code .= $wind[data];
    return $code;
}
Example #2
0
function KeywordLink_setConfig($data)
{
    requireComponent('Textcube.Function.Setting');
    $cfg = setting::fetchConfigVal($data);
    return true;
}
Example #3
0
function keywordDataSet($DATA)
{
    requireComponent('Textcube.Function.Setting');
    $cfg = setting::fetchConfigVal($DATA);
    return true;
}