묻고답하기

<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
/**
 * @class counter_status
 * @author NAVER (developers@xpressengine.com)
 * @version 0.1
 * @brief Display counter status by using data in the counter module
 */
class counter_status extends WidgetHandler
{
/**
* @brief Widget execution
* Get extra_vars declared in ./widgets/widget/conf/info.xml as arguments
* After generating the result, do not print but return it.
*/
function proc($args)
{
// Get status of the accumulated, yesterday's, today's counts
$oCounterModel = getModel('counter');

$site_module_info = Context::get('site_module_info');
$output = $oCounterModel->getStatus(array('00000000', date('Ymd', $_SERVER['REQUEST_TIME']-60*60*24), date('Ymd')), $site_module_info->site_srl);
if(count($output))
{
foreach($output as $key => $val) 
{
if(!$key) Context::set('total_counter', $val);
elseif($key == date("Ymd")) Context::set('today_counter', $val);
else Context::set('yesterday_counter', $val);
}
}
// Set a path of the template skin (values of skin, colorset settings)
$tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
Context::set('colorset', $args->colorset);
// Specify a template file
$tpl_file = 'counter_status';
// Compile a template
$oTemplate = &TemplateHandler::getInstance();
return $oTemplate->compile($tpl_path, $tpl_file);
}
}
/* End of file counter_status.class.php */
/* Location: ./widgets/counter_status/counter_status.class.php */

글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
sunnycom 메뉴삭제가 안되는 이유  
만카 안녕하세요 초보 질문 드려요! [1] 2016.11.01 by 만카
Megg PSD로 디자인한걸 CSS로 바꿀 수 있을 정도로 공부하려면요..? 조언부탁드립니다 [2] 2017.06.25 by Megg
마법사 게시물 이동시키면 문서번호가 갱신되게 하는 팁을 찾고있습니다.  
will 다국어 관련 문제(Xedition by 김타조) [5] 2016.11.01 by ehii
장제스 모바일페이지 관련 질문입니다. [1] 2016.10.31 by DoorWeb
시나브로(시조) kcp결제 설정 방법 순서 문의합니다. [1] 2016.10.31 by sejin7940
우리지훈 아이콘샵 깨짐 현상  
DB.class.php on line 633 에러 file  
아짱 로그인 표시가 나오지 않습니다.  
ldy**** XE 설치 [1] file 2016.10.31 by ldy****
영흥도우럭1 XE사이트에 적용된 소셜로그인은 loginXE인가요? [2] 2016.10.31 by 영흥도우럭1
shyduke 언어별 메뉴 선택여부 [2] 2016.10.31 by shyduke
난다여~ 1.8 이상 게시판에서 제목 제한수 해제 [2] 2016.10.31 by 난다여~
baby9999 setTemplateFile를 이용해 페이지 이동시 에러 file  
녹차닢 도와주세요..  
초보자 robots.txt 에 sitemap 위치를 알려줄려고 합니다. [6] 2016.10.30 by 제로캠프
thdwjdtjr 네이버에서 검색 및 노출이 잘 안되고 있습니다.... [1] file 2016.10.29 by 제로캠프
아깡 스케치북5 게시판 스킨 관련 문의 [1] file 2016.10.29 by HowtoXE
jikime 파일첨부가 안되고 슬라이드 이미지 등록시 upload failed 오류 [1] 2016.10.29 by HowtoXE