diff --git a/classes/file/FileHandler.class.php b/classes/file/FileHandler.class.php index eea3d219b..e8c05713b 100644 --- a/classes/file/FileHandler.class.php +++ b/classes/file/FileHandler.class.php @@ -138,7 +138,7 @@ if(!$fp) return; $url_info['path'] = str_replace(' ','%20',$url_info['path']); - $header = sprintf("GET %s HTTP/1.0\r\nHost: %s\r\nReferer: %s://%s\r\n\r\n", $url_info['path'], $url_info['host'], $url_info['scheme'], $url_info['host']); + $header = sprintf("GET %s HTTP/1.0\r\nHost: %s\r\nReferer: %s://%s\r\nRequestUrl: %s\r\n\r\n", $url_info['path'], $url_info['host'], $url_info['scheme'], $url_info['host'], Context::getRequestUri()); @fwrite($fp, $header); $ft = @fopen($target_filename, 'w'); diff --git a/modules/admin/admin.admin.view.php b/modules/admin/admin.admin.view.php index 1df183946..aada1d653 100644 --- a/modules/admin/admin.admin.view.php +++ b/modules/admin/admin.admin.view.php @@ -46,6 +46,33 @@ * @brief 관리자 메인 페이지 출력 **/ function dispAdminIndex() { + // 공식사이트에서 최신 뉴스를 가져옴 + $newest_news_url = sprintf("http://news.zeroboard.com/%s/news.php", Context::getLangType()); + $cache_file = sprintf("./files/cache/newest_news.%s.cache.php", Context::getLangType()); + + // 1시간 단위로 캐싱 체크 + if(!file_exists($cache_file) || filectime($cache_file)+ 60*60 < time()) { + FileHandler::getRemoteFile($newest_news_url, $cache_file); + } + if(file_exists($cache_file)) { + $oXml = new XmlParser(); + $buff = $oXml->parse(FileHandler::readFile($cache_file)); + + $item = $buff->zbxe_news->item; + if($item) { + if(!is_array($item)) $item = array($item); + + foreach($item as $key => $val) { + $obj = null; + $obj->title = $val->body; + $obj->date = $val->attrs->date; + $obj->url = $val->attrs->url; + $news[] = $obj; + } + Context::set('news', $news); + } + } + $this->setTemplateFile('index'); } diff --git a/modules/admin/lang/ko.lang.php b/modules/admin/lang/ko.lang.php index 612a35a49..2ed90c0a2 100644 --- a/modules/admin/lang/ko.lang.php +++ b/modules/admin/lang/ko.lang.php @@ -5,6 +5,10 @@ * @brief 한국어 언어팩 (기본적인 내용만 수록) **/ + $lang->newest_news = "최신 소식"; + + $lang->env_setup = "환경 설정"; + $lang->item_module = "모듈 목록"; $lang->item_addon = "애드온 목록"; $lang->item_widget = "위젯 목록"; diff --git a/modules/admin/tpl/css/admin.css b/modules/admin/tpl/css/admin.css index 42f295a19..5b1a1179f 100644 --- a/modules/admin/tpl/css/admin.css +++ b/modules/admin/tpl/css/admin.css @@ -77,7 +77,9 @@ select.time_zone { width:70%; position:relative; top:4px; } .gap1 { margin-top:.8em; } .tableSummaryType1 { font:bold .8em Tahoma; color:#a0a0a0; margin-bottom:10px;} .tableSummaryType1 strong { font:bold 1em Tahoma; color:#ff1a00;} + .tableType1 { width:100%; border-bottom:2px solid #c1c0bd;} +.tableType1 caption { padding:2em 0 .5em 1.5em; font-weight:bold; text-align:left; background:url(../images/iconH3.gif) no-repeat .5em 2em;} .tableType1 th { font-weight:normal; color:#ffffff; background:url(../images/tableType1Header.gif) repeat-x; height:28px;} .tableType1 th select { vertical-align:middle; } .tableType1 td { text-align:center; color:#636363; height:30px; border-top:1px solid #ededed;} @@ -92,6 +94,7 @@ select.time_zone { width:70%; position:relative; top:4px; } .tableType1 td .red { color:#c95b53;} .tableType2 { border:2px solid #c1c0bd; border-left:none; border-right:none; width:100%;} +.tableType2 caption { padding:2em 0 .5em 1.5em; font-weight:bold; text-align:left; background:url(../images/iconH3.gif) no-repeat .5em 2em;} .tableType2 th { border-top:1px solid #fbfbfb; border-bottom:1px solid #e4e4e4; background:#f5f5f5; padding:10px 10px 10px 2em; font-weight:normal; text-align:left; color:#606060;} .tableType2 td { border-bottom:1px solid #ededed; padding:10px 10px 7px 10px; font-size:.9em; color:#7b7972;} .tableType2 td input, @@ -105,6 +108,7 @@ select.time_zone { width:70%; position:relative; top:4px; } .tableType2 td a.red { color:#c95b53;} .tableType3 { width:100%; border-bottom:2px solid #c1c0bd;} +.tableType3 caption { padding:2em 0 .5em 1.5em; font-weight:bold; text-align:left; background:url(../images/iconH3.gif) no-repeat .5em 2em;} .tableType3 th.bold { font-weight:bold; } .tableType3 th, .tableType3 td { border-top:1px solid #bfbfbf;} @@ -209,3 +213,6 @@ select.time_zone { width:70%; position:relative; top:4px; } ul.extra_vars li { margin-bottom:.5em;} li.type_key { float:left; width:10em; } li.type_value { clear:right; } + +.admin_news { width:49%; float:left; margin-right:10px; } +.admin_link { width:49%; float:right; } diff --git a/modules/admin/tpl/index.html b/modules/admin/tpl/index.html index e56a5756a..9e33d1a54 100644 --- a/modules/admin/tpl/index.html +++ b/modules/admin/tpl/index.html @@ -7,6 +7,7 @@ + - - -
{$lang->env_setup}
Lang @@ -38,38 +39,58 @@

{$lang->about_time_zone}

-
- -
-
+
+ +
- - --- - - - - - - - - +
+ +
{$lang->zeroboard_xe_user_links}
{$key}{$val}
+ + + + + + + + + + + + + + + +
{$lang->newest_news}
{$lang->title}{$lang->regdate}
{$val->title}{zdate($val->date,"Y-m-d H:i")}
+ + - - - {$lang->zeroboard_xe_developer_links} - - - - {$key} - {$val} - - - + diff --git a/modules/board/skins/xe_list/list.html b/modules/board/skins/xe_list/list.html index db6a8e4be..0f6f87b7a 100644 --- a/modules/board/skins/xe_list/list.html +++ b/modules/board/skins/xe_list/list.html @@ -109,7 +109,7 @@ {$document->get('readed_count')} {$document->get('voted_count')} {$document->getRegdate('Y-m-d')} - {zdate($document->get('last_update'),'Y-m-d H:m')} + {zdate($document->get('last_update'),'Y-m-d H:i')}