public function show($statType = null)
 {
     $this->view->title = 'Перегляд статистики';
     if ($statType == null) {
         $this->view->countByDay = $this->model->getCountByDay();
         $this->view->getCountMainPageUpdate = $this->model->getCountMainPageUpdate();
         $this->view->data = Statistics::getStatistics();
     } else {
         $this->view->countByDay = $this->model->getCountByDay();
         $this->view->getCountMainPageUpdate = $this->model->getCountMainPageUpdate();
         $this->view->data = Statistics::getStatistics($statType);
     }
     $this->view->render('statistics/show');
 }
示例#2
0
 /**
  * Return a freshly built block.
  *
  * By default, stats are computed for the preceding month. See how to swap
  * the default interpretation by changing which block is commented out.
  *
  * @return array
  *   A subject/content hash.
  */
 public function viewUncached()
 {
     $count = $this->getCount();
     $display = variable_get(static::VARDISPLAY, static::DEFDISPLAY);
     $separator = variable_get(static::VARSEP, static::DEFSEP);
     // Return Zeitgeist for the previous month.
     $ar_date = getdate();
     // Mktime() wraps months cleanly, no worry.
     $start = mktime(0, 0, 0, $ar_date['mon'] - 1, 1, $ar_date['year']);
     unset($ar_date);
     // Return Zeitgeist for the current month.
     $start = NULL;
     $statistics = Statistics::getStatistics(Span::MONTH, $start, 'node', $count);
     $ret = array('subject' => t('Top @count searches', array('@count' => $this->count)), 'content' => array('#theme' => 'zeitgeist_block_top', '#count' => $this->count, '#items' => $statistics->scores, '#nofollow' => static::isNoFollowEnabled(), '#display' => $display, '#separator' => $separator));
     return $ret;
 }
示例#3
0
function CT_Statistics_Default($target)
{
    $blogid = getBlogId();
    $stats = Statistics::getStatistics($blogid);
    $target .= '<ul class="CT_Statistics_Default">';
    $target .= '<li class="TotalCount"><h4>Total Counts</h4><div style="text-align:right; width:100%">';
    $target .= '<span style="font-size:200%">';
    $target .= number_format($stats['total']);
    $target .= '</span>';
    $target .= '</div></li>';
    $target .= '<li class="TodayCount"><h4>Today</h4><div style="text-align:right; width:100%">';
    $target .= '<span style="font-size:200%">';
    $target .= number_format($stats['today']);
    $target .= '</span>';
    $target .= '</div></li>';
    $target .= '<li class="YesterdayCount"><h4>Yesterday</h4><div style="text-align:right; width:100%">';
    $target .= '<span style="font-size:200%">';
    $target .= number_format($stats['yesterday']);
    $target .= '</span>';
    $target .= '</div></li>';
    $target .= '</ul>';
    return $target;
}
示例#4
0
require ROOT . '/library/preprocessor.php';
$tabsClass['cover'] = true;
importlib('blogskin');
importlib("model.blog.sidebar");
importlib("model.blog.coverpage");
importlib("model.blog.entry");
importlib("model.blog.archive");
importlib("model.blog.tag");
importlib("model.blog.notice");
importlib("model.blog.comment");
importlib("model.blog.remoteresponse");
importlib("model.blog.link");
require ROOT . '/interface/common/owner/header.php';
$service['pagecache'] = false;
// For plugin setting update.
$stats = Statistics::getStatistics($blogid);
function correctCoverpageImage($subject)
{
    $pattern_with_src = '/(?:\\ssrc\\s*=\\s*["\']?)([^\\s^"^>^\']+)(?:[\\s">\'])/i';
    $pattern_with_background = '/(?:\\sbackground\\s*=\\s*["\']??)([^\\s^"^>^\']+)(?:[\\s">\'])/i';
    $pattern_with_url_func = '/(?:url\\s*\\(\\s*\'?)([^)]+)(?:\'?\\s*\\))/i';
    $return_val = preg_replace_callback($pattern_with_src, 'correctImagePath', $subject);
    $return_val = preg_replace_callback($pattern_with_background, 'correctImagePath', $return_val);
    $return_val = preg_replace_callback($pattern_with_url_func, 'correctImagePath', $return_val);
    return $return_val;
}
function correctImagePath($match)
{
    $context = Model_Context::getInstance();
    $pathArr = explode("/", $match[1]);
    if (false === $pathArr) {
示例#5
0
function PN_Blog_Statistics_Default()
{
    global $database, $blogid, $defaultURL, $blogURL, $pluginURL, $pluginMenuURL, $configVal;
    requireComponent('Textcube.Model.Statistics');
    requireComponent('Textcube.Function.misc');
    $data = misc::fetchConfigVal($configVal);
    if (is_null($data)) {
        $data['privateChk'] = 2;
    }
    $getVisibility = $data['privateChk'] == 2 ? " AND visibility > 0 " : "";
    $stats = Statistics::getStatistics($blogid);
    $getDate = isset($_GET['date']) ? $_GET['date'] : date('Y', strtotime("now"));
    $getMenu = isset($_GET['menu']) ? $_GET['menu'] : "entry";
    $getYear = substr($getDate, 0, 4);
    $getMonth = substr($getDate, 4);
    $yearRow = POD::queryAll("SELECT EXTRACT(YEAR FROM FROM_UNIXTIME(published)) period, COUNT(*) count FROM {$database['prefix']}Entries WHERE blogid = {$blogid} AND draft = 0 {$getVisibility} AND category >= 0 GROUP BY period ORDER BY period DESC");
    $yearCell = POD::queryCell("SELECT COUNT(*) FROM {$database['prefix']}Entries WHERE blogid = {$blogid} AND draft = 0 {$getVisibility} AND category >= 0 AND EXTRACT(YEAR FROM FROM_UNIXTIME(published)) = '" . date('Y', strtotime("now")) . "'");
    $yearAll = POD::queryCell("SELECT COUNT(*) FROM {$database['prefix']}Entries WHERE blogid = {$blogid} AND draft = 0 {$getVisibility} AND category >= 0");
    $yearSelect = "<select id=\"yearSelect\" onchange=\"execDate(this);\">\n";
    $yearSelect .= "<option value=\"\">" . _t('&nbsp;- 년 도 -') . "</option>\n";
    $selected = $getYear == 9999 ? " selected" : "";
    $yearSelect .= "<option value=\"9999\" style=\"font-weight:bold;\" {$selected}>" . _t('#전체') . "({$yearAll})</option>\n";
    if (!$yearCell) {
        $selected = $getYear == date('Y', strtotime("now")) ? " selected" : "";
        $yearSelect .= "<option value=\"" . date('Y', strtotime("now")) . "\" {$selected}>" . date('Y', strtotime("now")) . _t('년') . "(0)</option>\n";
    }
    foreach ($yearRow as $items) {
        $selected = $getYear == $items['period'] ? " selected" : "";
        $yearSelect .= "<option value=\"{$items['period']}\" {$selected}>{$items['period']}" . _t('년') . "({$items['count']})</option>\n";
    }
    $yearSelect .= "</select>\n";
    $monthSelect = "<select id=\"monthSelect\" onchange=\"execDate(this);\">\n";
    $monthSelect .= "<option value=\"\">- " . _t('월') . " -</option>\n";
    $monthSelect .= "<option value=\"{$getYear}\" " . (strlen($getDate) == 4 ? " selected" : "") . ">" . _t('#전체') . "</option>\n";
    for ($i = 1; $i <= 12; $i++) {
        $gMonth = strlen($i) == 1 ? "0" . $i : $i;
        $gValue = $getYear . $gMonth;
        $selected = $getMonth == $gMonth ? " selected" : "";
        $monthSelect .= "<option value=\"{$gValue}\" {$selected}>" . $gMonth . _t('월') . "</option>\n";
    }
    $monthSelect .= "</select>\n";
    $noticeRow = POD::queryCell("SELECT COUNT(*) FROM {$database['prefix']}Entries WHERE blogid = {$blogid} AND draft = 0 {$getVisibility} AND category = -2");
    //공지
    $keywordRow = POD::queryCell("SELECT COUNT(*) FROM {$database['prefix']}Entries WHERE blogid = {$blogid} AND draft = 0 {$getVisibility} AND category = -1");
    //키워드
    ?>
<script type="text/javascript">
//<![CDATA[
	function execLoadFunction() {
		tempDiv = document.createElement("DIV");
		tempDiv.style.clear = "both";
		document.getElementById("part-statistics-blog").appendChild(tempDiv);
	}

	function execDate(selectObject){
		if(selectObject.options[selectObject.selectedIndex].value){
			location.href="<?php 
    echo $pluginMenuURL;
    ?>
&date="+selectObject.options[selectObject.selectedIndex].value+"&menu=<?php 
    echo $getMenu;
    ?>
";
		}
	}

	window.addEventListener("load", execLoadFunction, false);
//]]>
</script>
					 		
<div id="part-statistics-blog" class="part">
	<h2 class="caption"><span class="main-text"><?php 
    echo _t('블로그 통계정보를 보여줍니다');
    ?>
</span></h2>
	<div id="statistics-main">
		<div id="statistics-counter-inbox">
			<div class="title"><h3><?php 
    echo _t('종 합 정 보');
    ?>
</h3></div>
			<table width="100%">
				<tbody>
					<tr class="tr">
						<td colspan="2"><?php 
    echo _t('년/월별 선택');
    ?>
<br />
						<?php 
    echo $yearSelect;
    ?>
 <?php 
    echo $monthSelect;
    ?>
</td>
					</tr>
					<tr height="5"><td colspan="2"></td></tr>
					<tr height="1" bgcolor="#dddddd"><td colspan="2"></td></tr>
					<tr class="tr">
						<td><?php 
    echo _t('오늘 방문자');
    ?>
</td>
						<th><?php 
    echo number_format($stats['today']);
    ?>
</th>
					</tr>
					<tr class="tr">
						<td><?php 
    echo _t('어제 방문자');
    ?>
</td>
						<th><?php 
    echo number_format($stats['yesterday']);
    ?>
</th>
					</tr>
					<tr class="tr">
						<td><?php 
    echo _t('총 방문자');
    ?>
</td>
						<th><?php 
    echo number_format($stats['total']);
    ?>
</th>
					</tr>
					<tr height="1" bgcolor="#dddddd"><td colspan="2"></td></tr>
					<tr class="tr">
						<td><?php 
    echo _t('글 개수');
    ?>
</td>
						<th><?php 
    echo number_format(getEntriesTotalCountDB($blogid));
    ?>
</th>
					</tr>
					<tr class="tr">
						<td><?php 
    echo _t('공지 개수');
    ?>
</td>
						<th><?php 
    echo number_format($noticeRow);
    ?>
</th>
					</tr>
					<tr class="tr">
						<td><?php 
    echo _t('키워드 개수');
    ?>
</td>
						<th><?php 
    echo number_format($keywordRow);
    ?>
</th>
					</tr>
					<tr class="tr">
						<td><?php 
    echo _t('댓글 개수');
    ?>
</td>
						<th><?php 
    echo number_format(getCommentCountDB($blogid));
    ?>
</th>
					</tr>
					<tr class="tr">
						<td><?php 
    echo _t('방명록 개수');
    ?>
</td>
						<th><?php 
    echo number_format(getGuestbookCountDB($blogid));
    ?>
</th>
					</tr>
					<tr class="tr">
						<td><?php 
    echo _t('트랙백 개수');
    ?>
</td>
						<th><?php 
    echo number_format(getTrackbackCountDB($blogid));
    ?>
</th>
					</tr>
					<tr height="10"><td colspan="2"></td></tr>
				</tbody>
			</table>
			<div class="title"><h3><?php 
    echo _t('세 부 메 뉴');
    ?>
</h3></div>
			<table width="100%">
				<tbody>
					<tr class="tr">
						<td>&nbsp;&raquo; <a href="<?php 
    echo $pluginMenuURL;
    ?>
&amp;date=<?php 
    echo $getDate;
    ?>
&amp;menu=entry"><?php 
    echo _get_t(_t('글(포스트) 통계'), 'entry');
    ?>
</a></td>
					</tr>
					<tr class="tr">
						<td>&nbsp;&raquo; <a href="<?php 
    echo $pluginMenuURL;
    ?>
&amp;date=<?php 
    echo $getDate;
    ?>
&amp;menu=comment"><?php 
    echo _get_t(_t('댓글 통계'), 'comment');
    ?>
</a></td>
					</tr>
					<tr class="tr">
						<td>&nbsp;&nbsp;&nbsp;&nbsp; - <a href="<?php 
    echo $pluginMenuURL;
    ?>
&amp;date=<?php 
    echo $getDate;
    ?>
&amp;menu=commenter"><?php 
    echo _get_t(_t('작성자 목록'), 'commenter');
    ?>
</a></td>
					</tr>
					<tr class="tr">
						<td>&nbsp;&raquo; <a href="<?php 
    echo $pluginMenuURL;
    ?>
&amp;date=<?php 
    echo $getDate;
    ?>
&amp;menu=trackback"><?php 
    echo _get_t(_t('트랙백 통계'), 'trackback');
    ?>
</a></td>
					</tr>
					<tr class="tr">
						<td>&nbsp;&raquo; <a href="<?php 
    echo $pluginMenuURL;
    ?>
&amp;date=<?php 
    echo $getDate;
    ?>
&amp;menu=guestbook"><?php 
    echo _get_t(_t('방명록 통계'), 'guestbook');
    ?>
</a></td>
					</tr>
					<tr class="tr">
						<td>&nbsp;&nbsp;&nbsp;&nbsp; - <a href="<?php 
    echo $pluginMenuURL;
    ?>
&amp;date=<?php 
    echo $getDate;
    ?>
&amp;menu=guestbookcommenter"><?php 
    echo _get_t(_t('작성자 목록'), 'guestbookcommenter');
    ?>
</a></td>
					</tr>
					<tr class="tr">
						<td>&nbsp;&raquo; <a href="<?php 
    echo $pluginMenuURL;
    ?>
&amp;date=<?php 
    echo $getDate;
    ?>
&amp;menu=tag"><?php 
    echo _get_t(_t('태그 통계'), 'tag');
    ?>
</a></td>
					</tr>
					<tr class="tr">
						<td>&nbsp;&raquo; <a href="<?php 
    echo $pluginMenuURL;
    ?>
&amp;date=<?php 
    echo $getDate;
    ?>
&amp;menu=visit"><?php 
    echo _get_t(_t('방문자 통계'), 'visit');
    ?>
</a></td>
					</tr>
					<tr class="tr">
						<td>&nbsp;&raquo; <a href="<?php 
    echo $pluginMenuURL;
    ?>
&amp;date=<?php 
    echo $getDate;
    ?>
&amp;menu=referer"><?php 
    echo _get_t(_t('리퍼러 통계'), 'referer');
    ?>
</a></td>
					</tr>
				</tbody>
			</table>
		</div>
		<div id="statistics-inbox">
<?php 
    //##############################
    // 글(포스트) 통계 #########
    //##############################
    if ($getMenu == "entry") {
        if ($getYear == 9999 && !$getMonth) {
            $getData = array();
            $getTags = array();
            $getDateTitle = _t('전체 년도별');
            $tempData = getStatisticsDB('years', '', $getMenu);
            foreach ($tempData as $item) {
                array_push($getData, $item['count']);
                array_push($getTags, rawurlencode($item['period'] . _t('년')));
            }
            $getData = implode("|", $getData);
            $getTags = implode("|", $getTags);
            $getTotal = getStatisticsTotalDB($getDate, $getMenu, 1);
            ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
            echo $getDateTitle;
            ?>
 <?php 
            echo _t('글(포스트) 통계');
            ?>
(<?php 
            echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
            echo _t('개');
            ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
            echo $getMenu;
            ?>
YearStic">
									<?php 
            echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
            ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
            echo $getMenu;
            ?>
YearPizza">
									<?php 
            echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=archiveYear&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
            ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
        }
        $getData = array();
        $getTags = array();
        if ($getYear == 9999) {
            $getDateTitle = !$getMonth ? _t('전체') : _t('전체') . '&nbsp' . $getMonth . _t('월');
        } else {
            $getDateTitle = !$getMonth ? $getYear . _t('년도') : $getYear . _t('년도') . $getMonth . _t('월');
        }
        if (!$getMonth) {
            $lastCount = 12;
            $textValue = _t('월');
        } else {
            $lastCount = $getYear == 9999 ? 31 : date('t', mktime(0, 0, 0, $getMonth, 1, $getYear));
            $textValue = "";
        }
        for ($i = 1; $i <= $lastCount; $i++) {
            $tempData = getStatisticsDB($getDate, $i, $getMenu);
            if ($tempData) {
                array_push($getData, $tempData['count']);
                array_push($getTags, rawurlencode($i . $textValue));
            }
        }
        $getData = implode("|", $getData);
        $getTags = implode("|", $getTags);
        $getTotal = getStatisticsTotalDB($getDate, $getMenu, 1);
        ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
        echo $getDateTitle;
        ?>
 <?php 
        echo _t('글(포스트) 통계');
        ?>
(<?php 
        echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
        echo _t('개');
        ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
        echo $getMenu;
        ?>
Stic">
									<?php 
        echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
        ?>
								</div>
							</div>
						</td>
						<td align="right">
							<div class="flash-pizza">
								<div id="get<?php 
        echo $getMenu;
        ?>
Pizza">
									<?php 
        echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=archiveMonth&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
        ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
        if (!$getMonth) {
            $getData = array();
            $getTags = array();
            for ($i = 1; $i <= 4; $i++) {
                $tempData = getQuartersStatistics($getDate, $i, $getMenu);
                if ($tempData) {
                    array_push($getData, $tempData);
                    array_push($getTags, rawurlencode($i . "/4 " . _t('분기')));
                }
            }
            $getData = implode("|", $getData);
            $getTags = implode("|", $getTags);
            $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
            ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
            echo $getDateTitle;
            ?>
 <?php 
            echo _t('분기별') . _t('글(포스트) 통계');
            ?>
(<?php 
            echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
            echo _t('개');
            ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
            echo $getMenu;
            ?>
QuartersStic">
									<?php 
            echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
            ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
            echo $getMenu;
            ?>
QuartersPizza">
									<?php 
            echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
            ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
        }
        $getData = array();
        $getTags = array();
        $tempData = getCategoryStatistics();
        $itemCnt = getCategoryStatisticsTotal(0, $getDate);
        if ($itemCnt) {
            array_push($getData, $itemCnt);
            array_push($getTags, $item['id']);
        }
        foreach ($tempData as $item) {
            $itemCnt = getCategoryStatisticsTotal($item['id'], $getDate);
            if ($itemCnt) {
                array_push($getData, $itemCnt);
                array_push($getTags, $item['id']);
            }
        }
        $getData = implode("|", $getData);
        $getTags = implode("|", $getTags);
        $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
        ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
        echo $getDateTitle;
        ?>
 <?php 
        echo _t('카테고리별') . _t('글(포스트) 통계');
        ?>
(<?php 
        echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
        echo _t('개');
        ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
        echo $getMenu;
        ?>
CategoryStic">
									<?php 
        echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=category&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
        ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
        echo $getMenu;
        ?>
CategoryPizza">
									<?php 
        echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=category&grpYear=" . $getYear . "&grpTypeName=category&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
        ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
        $query = "SELECT * FROM {$database['prefix']}Entries_hits";
        if (POD::queryRow($query)) {
            $getData = array();
            $getTags = array();
            $tempData = getEntryHitsStatistics($getDate);
            foreach ($tempData as $item) {
                array_push($getData, $item['hits']);
                array_push($getTags, $item['id']);
            }
            $getData = implode("|", $getData);
            $getTags = implode("|", $getTags);
            $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
            ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
            echo $getDateTitle;
            ?>
 <?php 
            echo _t('조회수 TOP 10') . _t('글(포스트) 통계');
            ?>
(<?php 
            echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
            echo _t('개');
            ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
            echo $getMenu;
            ?>
HitsStic">
									<?php 
            echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=hits&grpXLabelType=2&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
            ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
            echo $getMenu;
            ?>
HitsPizza">
									<?php 
            echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=entry&grpYear=" . $getYear . "&grpTypeName=hits&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
            ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
        }
        $getData = array();
        $getTags = array();
        for ($i = 0; $i <= 23; $i++) {
            $tempData = getTimeStatistics($getDate, $i, $getMenu);
            if ($tempData) {
                if ($tempData['period'] == "00") {
                    $tempData['period'] = str_replace("00", "0", $tempData['period']);
                } else {
                    if (substr($tempData['period'], 0, 1) == "0") {
                        $tempData['period'] = str_replace("0", "", $tempData['period']);
                    }
                }
                array_push($getData, $tempData['count']);
                array_push($getTags, $tempData['period']);
            }
        }
        $getData = implode("|", $getData);
        $getTags = implode("|", $getTags);
        $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
        ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
        echo $getDateTitle;
        ?>
 <?php 
        echo _t('시간대별') . _t('글(포스트) 통계');
        ?>
(<?php 
        echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
        echo _t('개');
        ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
        echo $getMenu;
        ?>
TimeStic">
									<?php 
        echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=time&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
        ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
        echo $getMenu;
        ?>
TimePizza">
									<?php 
        echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=time&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
        ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
			<hr class="hidden" />
<?php 
    } else {
        if ($getMenu == "comment") {
            //##############################
            // 댓글 통계 ###################
            //##############################
            if ($getYear == 9999 && !$getMonth) {
                $getData = array();
                $getTags = array();
                $getDateTitle = _t('전체 년도별');
                $tempData = getStatisticsDB('years', '', $getMenu);
                foreach ($tempData as $item) {
                    array_push($getData, $item['count']);
                    array_push($getTags, rawurlencode($item['period'] . _t('년')));
                }
                $getData = implode("|", $getData);
                $getTags = implode("|", $getTags);
                $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                echo $getDateTitle;
                ?>
 <?php 
                echo _t('댓글 통계');
                ?>
(<?php 
                echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                echo _t('개');
                ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                echo $getMenu;
                ?>
YearStic">
									<?php 
                echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                echo $getMenu;
                ?>
YearPizza">
									<?php 
                echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
            }
            $getData = array();
            $getTags = array();
            if ($getYear == 9999) {
                $getDateTitle = !$getMonth ? _t('전체') : _t('전체') . '&nbsp' . $getMonth . _t('월');
            } else {
                $getDateTitle = !$getMonth ? $getYear . _t('년도') : $getYear . _t('년도') . $getMonth . _t('월');
            }
            if (!$getMonth) {
                $lastCount = 12;
                $textValue = _t('월');
            } else {
                $lastCount = $getYear == 9999 ? 31 : date('t', mktime(0, 0, 0, $getMonth, 1, $getYear));
                $textValue = "";
            }
            for ($i = 1; $i <= $lastCount; $i++) {
                $tempData = getStatisticsDB($getDate, $i, $getMenu);
                if ($tempData) {
                    array_push($getData, $tempData['count']);
                    array_push($getTags, rawurlencode($i . $textValue));
                }
            }
            $getData = implode("|", $getData);
            $getTags = implode("|", $getTags);
            $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
            ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
            echo $getDateTitle;
            ?>
 <?php 
            echo _t('댓글 통계');
            ?>
(<?php 
            echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
            echo _t('개');
            ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
            echo $getMenu;
            ?>
Stic">
									<?php 
            echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
            ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
            echo $getMenu;
            ?>
Pizza">
									<?php 
            echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
            ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
            if (!$getMonth) {
                $getData = array();
                $getTags = array();
                for ($i = 1; $i <= 4; $i++) {
                    $tempData = getQuartersStatistics($getYear, $i, $getMenu);
                    if ($tempData) {
                        array_push($getData, $tempData);
                        array_push($getTags, rawurlencode($i . "/4 " . _t('분기')));
                    }
                }
                $getData = implode("|", $getData);
                $getTags = implode("|", $getTags);
                $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                echo $getDateTitle;
                ?>
 <?php 
                echo _t('분기별') . _t('댓글 통계');
                ?>
(<?php 
                echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                echo _t('개');
                ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                echo $getMenu;
                ?>
QuartersStic">
									<?php 
                echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                echo $getMenu;
                ?>
QuartersPizza">
									<?php 
                echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
            }
            $getData = array();
            $getTags = array();
            $tempData = getCommentEntryMaxCount($getDate);
            foreach ($tempData as $item) {
                array_push($getData, $item['comments']);
                array_push($getTags, $item['id']);
            }
            $getData = implode("|", $getData);
            $getTags = implode("|", $getTags);
            $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
            ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
            echo $getDateTitle;
            ?>
 <?php 
            echo _t('댓글 TOP 10') . _t('글 통계');
            ?>
(<?php 
            echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
            echo _t('개');
            ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
            echo $getMenu;
            ?>
EntryMaxStic">
									<?php 
            echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=cmmax&grpXLabelType=2&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
            ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
            echo $getMenu;
            ?>
EntryMaxPizza">
									<?php 
            echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=entry&grpYear=" . $getYear . "&grpTypeName=cmmax&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
            ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
            $getData = array();
            $getTags = array();
            $tempData = getCommenterMaxCount($getDate, $getMenu);
            foreach ($tempData as $item) {
                array_push($getData, $item['namecnt']);
                array_push($getTags, rawurlencode($item['name']));
            }
            $getData = implode("|", $getData);
            $getTags = implode("|", $getTags);
            $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
            ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
            echo $getDateTitle;
            ?>
 <?php 
            echo _t('댓글자 TOP 10') . _t('통계');
            ?>
(<?php 
            echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
            echo _t('개');
            ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
            echo $getMenu;
            ?>
erMaxStic">
									<?php 
            echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=commenter&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
            ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
            echo $getMenu;
            ?>
erMaxPizza">
									<?php 
            echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
            ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
            $getData = array();
            $getTags = array();
            for ($i = 0; $i <= 23; $i++) {
                $tempData = getTimeStatistics($getDate, $i, $getMenu);
                if ($tempData) {
                    if ($tempData['period'] == "00") {
                        $tempData['period'] = str_replace("00", "0", $tempData['period']);
                    } else {
                        if (substr($tempData['period'], 0, 1) == "0") {
                            $tempData['period'] = str_replace("0", "", $tempData['period']);
                        }
                    }
                    array_push($getData, $tempData['count']);
                    array_push($getTags, $tempData['period']);
                }
            }
            $getData = implode("|", $getData);
            $getTags = implode("|", $getTags);
            $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
            ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
            echo $getDateTitle;
            ?>
 <?php 
            echo _t('시간대별') . _t('댓글 통계');
            ?>
(<?php 
            echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
            echo _t('개');
            ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
            echo $getMenu;
            ?>
TimeStic">
									<?php 
            echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=time&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
            ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
            echo $getMenu;
            ?>
TimePizza">
									<?php 
            echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=time&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
            ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
			<hr class="hidden" />
<?php 
        } else {
            if ($getMenu == "commenter") {
                //##############################
                // 댓글 작성자 목록 ############
                //##############################
                if ($getYear == 9999) {
                    $getDateTitle = !$getMonth ? _t('전체') : _t('전체') . '&nbsp' . $getMonth . _t('월');
                } else {
                    $getDateTitle = !$getMonth ? $getYear . _t('년도') : $getYear . _t('년도') . $getMonth . _t('월');
                }
                $tempData = getCommenterMaxCount($getDate, $getMenu);
                $tempAllCount = getCommenterMaxCount(9999, $getMenu);
                ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                echo $getDateTitle;
                ?>
 <?php 
                echo _t('댓글') . _t('작성자') . _t('목록');
                ?>
(<?php 
                echo number_format(count($tempData)) . "/" . number_format(count($tempAllCount));
                echo _t('명');
                ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
						<div id="commenterList">
<?php 
                $i = 0;
                foreach ($tempData as $item) {
                    $guestname = htmlspecialchars(UTF8::lessenAsEm($item['name'], 20));
                    if (!empty($item['home'])) {
                        $homepage = ereg('^[[:alnum:]]+:', $item['home']) ? htmlspecialchars($item['home']) : "http://" . htmlspecialchars($item['home']);
                        $guestname = "<a href=\"{$homepage}\" onclick=\"window.open(this.href); return false;\">{$guestname}</a>";
                    }
                    $count = "<span class=\"count\">(" . $item['namecnt'] . ")</span>";
                    ?>
							<div class="userlist"><?php 
                    echo $guestname;
                    ?>
 <?php 
                    echo $count;
                    ?>
</div><?php 
                    if ($i % 4 == 3) {
                        echo "<div class=\"clear\"></div>\n";
                    }
                    $i++;
                }
                ?>
						</div>
						</td>
					</tr>
				</tbody>
			</table>
			<hr class="hidden" />
<?php 
            } else {
                if ($getMenu == "trackback") {
                    //##############################
                    // 역인글 통계 #################
                    //##############################
                    if ($getYear == 9999 && !$getMonth) {
                        $getData = array();
                        $getTags = array();
                        $getDateTitle = _t('전체 년도별');
                        $tempData = getStatisticsDB('years', '', $getMenu);
                        foreach ($tempData as $item) {
                            array_push($getData, $item['count']);
                            array_push($getTags, rawurlencode($item['period'] . _t('년')));
                        }
                        $getData = implode("|", $getData);
                        $getTags = implode("|", $getTags);
                        $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                        ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                        echo $getDateTitle;
                        ?>
 트랙백 통계(<?php 
                        echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                        echo _t('개');
                        ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                        echo $getMenu;
                        ?>
YearStic">
									<?php 
                        echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                        ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                        echo $getMenu;
                        ?>
YearPizza">
									<?php 
                        echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                        ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
                    }
                    $getData = array();
                    $getTags = array();
                    if ($getYear == 9999) {
                        $getDateTitle = !$getMonth ? _t('전체') : _t('전체') . '&nbsp' . $getMonth . _t('월');
                    } else {
                        $getDateTitle = !$getMonth ? $getYear . _t('년도') : $getYear . _t('년도') . $getMonth . _t('월');
                    }
                    if (!$getMonth) {
                        $lastCount = 12;
                        $textValue = _t('월');
                    } else {
                        $lastCount = $getYear == 9999 ? 31 : date('t', mktime(0, 0, 0, $getMonth, 1, $getYear));
                        $textValue = "";
                    }
                    for ($i = 1; $i <= $lastCount; $i++) {
                        $tempData = getStatisticsDB($getDate, $i, $getMenu);
                        if ($tempData) {
                            array_push($getData, $tempData['count']);
                            array_push($getTags, rawurlencode($i . $textValue));
                        }
                    }
                    $getData = implode("|", $getData);
                    $getTags = implode("|", $getTags);
                    $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                    ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                    echo $getDateTitle;
                    ?>
 <?php 
                    echo _t('트랙백') . _t('통계');
                    ?>
(<?php 
                    echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                    echo _t('개');
                    ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                    echo $getMenu;
                    ?>
Stic">
									<?php 
                    echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                    ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                    echo $getMenu;
                    ?>
Pizza">
									<?php 
                    echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                    ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
                    if (!$getMonth) {
                        $getData = array();
                        $getTags = array();
                        for ($i = 1; $i <= 4; $i++) {
                            $tempData = getQuartersStatistics($getYear, $i, $getMenu);
                            if ($tempData) {
                                array_push($getData, $tempData);
                                array_push($getTags, rawurlencode($i . "/4 " . _t('분기')));
                            }
                        }
                        $getData = implode("|", $getData);
                        $getTags = implode("|", $getTags);
                        $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                        ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                        echo $getDateTitle;
                        ?>
 <?php 
                        echo _t('분기별') . _t('트랙백') . _t('통계');
                        ?>
(<?php 
                        echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                        echo _t('개');
                        ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                        echo $getMenu;
                        ?>
QuartersStic">
									<?php 
                        echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                        ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                        echo $getMenu;
                        ?>
QuartersPizza">
									<?php 
                        echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                        ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
                    }
                    $getData = array();
                    $getTags = array();
                    $getLink = array();
                    $tempData = getTrackbackEntryMaxCount($getDate);
                    foreach ($tempData as $item) {
                        array_push($getData, $item['trackbacks']);
                        array_push($getTags, $item['id']);
                    }
                    $getData = implode("|", $getData);
                    $getTags = implode("|", $getTags);
                    $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                    ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                    echo $getDateTitle;
                    ?>
 <?php 
                    echo _t('트랙백') . _t('받은 TOP 10') . _t('글 통계');
                    ?>
(<?php 
                    echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                    echo _t('개');
                    ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                    echo $getMenu;
                    ?>
EntryMaxStic">
									<?php 
                    echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=tbmax&grpXLabelType=2&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                    ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                    echo $getMenu;
                    ?>
EntryMaxPizza">
									<?php 
                    echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=entry&grpYear=" . $getYear . "&grpTypeName=tbmax&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                    ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
                    $getData = array();
                    $getTags = array();
                    $tempData = getTrackbackCallEntryMaxCount($getDate);
                    foreach ($tempData as $item) {
                        array_push($getData, $item['trackbacklogs']);
                        array_push($getTags, $item['id']);
                    }
                    $getData = implode("|", $getData);
                    $getTags = implode("|", $getTags);
                    $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                    ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                    echo $getDateTitle;
                    ?>
 <?php 
                    echo _t('트랙백') . _t('보낸 TOP 10') . _t('글 통계');
                    ?>
(<?php 
                    echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                    echo _t('개');
                    ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                    echo $getMenu;
                    ?>
CallEntryMaxStic">
									<?php 
                    echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=cmmax&grpXLabelType=2&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                    ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                    echo $getMenu;
                    ?>
CallEntryMaxPizza">
									<?php 
                    echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=entry&grpYear=" . $getYear . "&grpTypeName=cmmax&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                    ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
                    $getData = array();
                    $getTags = array();
                    for ($i = 0; $i <= 23; $i++) {
                        $tempData = getTimeStatistics($getDate, $i, $getMenu);
                        if ($tempData) {
                            if ($tempData['period'] == "00") {
                                $tempData['period'] = str_replace("00", "0", $tempData['period']);
                            } else {
                                if (substr($tempData['period'], 0, 1) == "0") {
                                    $tempData['period'] = str_replace("0", "", $tempData['period']);
                                }
                            }
                            array_push($getData, $tempData['count']);
                            array_push($getTags, $tempData['period']);
                        }
                    }
                    $getData = implode("|", $getData);
                    $getTags = implode("|", $getTags);
                    $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                    ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                    echo $getDateTitle;
                    ?>
 <?php 
                    echo _t('시간대별') . _t('트랙백') . _t('통계');
                    ?>
(<?php 
                    echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                    echo _t('개');
                    ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                    echo $getMenu;
                    ?>
TimeStic">
									<?php 
                    echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=time&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                    ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                    echo $getMenu;
                    ?>
TimePizza">
									<?php 
                    echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=time&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                    ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
			<hr class="hidden" />
<?php 
                } else {
                    if ($getMenu == "guestbook") {
                        //##############################
                        // 방명록 통계 #################
                        //##############################
                        if ($getYear == 9999 && !$getMonth) {
                            $getData = array();
                            $getTags = array();
                            $getDateTitle = _t('전체 년도별');
                            $tempData = getStatisticsDB('years', '', $getMenu);
                            foreach ($tempData as $item) {
                                array_push($getData, $item['count']);
                                array_push($getTags, rawurlencode($item['period'] . _t('년')));
                            }
                            $getData = implode("|", $getData);
                            $getTags = implode("|", $getTags);
                            $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                            ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                            echo $getDateTitle;
                            ?>
 <?php 
                            echo _t('방명록') . _t('통계');
                            ?>
(<?php 
                            echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                            echo _t('개');
                            ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                            echo $getMenu;
                            ?>
YearStic">
									<?php 
                            echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                            ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                            echo $getMenu;
                            ?>
YearPizza">
									<?php 
                            echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                            ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
                        }
                        $getData = array();
                        $getTags = array();
                        if ($getYear == 9999) {
                            $getDateTitle = !$getMonth ? _t('전체') : _t('전체') . '&nbsp' . $getMonth . _t('월');
                        } else {
                            $getDateTitle = !$getMonth ? $getYear . _t('년도') : $getYear . _t('년도') . $getMonth . _t('월');
                        }
                        if (!$getMonth) {
                            $lastCount = 12;
                            $textValue = _t('월');
                        } else {
                            $lastCount = $getYear == 9999 ? 31 : date('t', mktime(0, 0, 0, $getMonth, 1, $getYear));
                            $textValue = "";
                        }
                        for ($i = 1; $i <= $lastCount; $i++) {
                            $tempData = getStatisticsDB($getDate, $i, $getMenu);
                            if ($tempData) {
                                array_push($getData, $tempData['count']);
                                array_push($getTags, rawurlencode($i . $textValue));
                            }
                        }
                        $getData = implode("|", $getData);
                        $getTags = implode("|", $getTags);
                        $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                        ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                        echo $getDateTitle;
                        ?>
 <?php 
                        echo _t('방명록') . _t('통계');
                        ?>
(<?php 
                        echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                        echo _t('개');
                        ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                        echo $getMenu;
                        ?>
Stic">
									<?php 
                        echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                        ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                        echo $getMenu;
                        ?>
Pizza">
									<?php 
                        echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                        ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
                        if (!$getMonth) {
                            $getData = array();
                            $getTags = array();
                            for ($i = 1; $i <= 4; $i++) {
                                $tempData = getQuartersStatistics($getYear, $i, $getMenu);
                                if ($tempData) {
                                    array_push($getData, $tempData);
                                    array_push($getTags, rawurlencode($i . "/4 " . _t('분기')));
                                }
                            }
                            $getData = implode("|", $getData);
                            $getTags = implode("|", $getTags);
                            $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                            ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                            echo $getDateTitle;
                            ?>
 <?php 
                            echo _t('분기별') . _t('방명록') . _t('통계');
                            ?>
(<?php 
                            echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                            echo _t('개');
                            ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                            echo $getMenu;
                            ?>
QuartersStic">
									<?php 
                            echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                            ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                            echo $getMenu;
                            ?>
QuartersPizza">
									<?php 
                            echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                            ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
                        }
                        $getData = array();
                        $getTags = array();
                        $tempData = getCommenterMaxCount($getDate, $getMenu);
                        foreach ($tempData as $item) {
                            array_push($getData, $item['namecnt']);
                            array_push($getTags, rawurlencode($item['name']));
                        }
                        $getData = implode("|", $getData);
                        $getTags = implode("|", $getTags);
                        $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                        ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                        echo $getDateTitle;
                        ?>
 <?php 
                        echo _t('방명록') . _t('댓글자 TOP 10') . _t('통계');
                        ?>
(<?php 
                        echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                        echo _t('개');
                        ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                        echo $getMenu;
                        ?>
CommenterMaxStic">
									<?php 
                        echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=commenter&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                        ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                        echo $getMenu;
                        ?>
CommenterMaxPizza">
									<?php 
                        echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                        ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
                        $getData = array();
                        $getTags = array();
                        for ($i = 0; $i <= 23; $i++) {
                            $tempData = getTimeStatistics($getDate, $i, $getMenu);
                            if ($tempData) {
                                if ($tempData['period'] == "00") {
                                    $tempData['period'] = str_replace("00", "0", $tempData['period']);
                                } else {
                                    if (substr($tempData['period'], 0, 1) == "0") {
                                        $tempData['period'] = str_replace("0", "", $tempData['period']);
                                    }
                                }
                                array_push($getData, $tempData['count']);
                                array_push($getTags, $tempData['period']);
                            }
                        }
                        $getData = implode("|", $getData);
                        $getTags = implode("|", $getTags);
                        $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                        ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                        echo $getDateTitle;
                        ?>
 <?php 
                        echo _t('시간대별') . _t('방명록') . _t('통계');
                        ?>
(<?php 
                        echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                        echo _t('개');
                        ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                        echo $getMenu;
                        ?>
TimeStic">
									<?php 
                        echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=time&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                        ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                        echo $getMenu;
                        ?>
TimePizza">
									<?php 
                        echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=time&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                        ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
			<hr class="hidden" />
<?php 
                    } else {
                        if ($getMenu == "guestbookcommenter") {
                            //##############################
                            // 방명록 작성자 목록 ############
                            //##############################
                            if ($getYear == 9999) {
                                $getDateTitle = !$getMonth ? _t('전체') : _t('전체') . '&nbsp' . $getMonth . _t('월');
                            } else {
                                $getDateTitle = !$getMonth ? $getYear . _t('년도') : $getYear . _t('년도') . $getMonth . _t('월');
                            }
                            $tempData = getCommenterMaxCount($getDate, $getMenu);
                            $tempAllCount = getCommenterMaxCount(9999, $getMenu);
                            ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                            echo $getDateTitle;
                            ?>
 <?php 
                            echo _t('방명록') . _t('작성자') . _t('목록');
                            ?>
(<?php 
                            echo number_format(count($tempData)) . "/" . number_format(count($tempAllCount));
                            ?>
명)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
						<div id="commenterList">
<?php 
                            $i = 0;
                            foreach ($tempData as $item) {
                                $guestname = htmlspecialchars(UTF8::lessenAsEm($item['name'], 20));
                                if (!empty($item['home'])) {
                                    $homepage = ereg('^[[:alnum:]]+:', $item['home']) ? htmlspecialchars($item['home']) : "http://" . htmlspecialchars($item['home']);
                                    $guestname = "<a href=\"{$homepage}\" onclick=\"window.open(this.href); return false;\">{$guestname}</a>";
                                }
                                $count = "<span class=\"count\">(" . $item['namecnt'] . ")</span>";
                                ?>
							<div class="userlist"><?php 
                                echo $guestname;
                                ?>
 <?php 
                                echo $count;
                                ?>
</div><?php 
                                if ($i % 4 == 3) {
                                    echo "<div class=\"clear\"></div>\n";
                                }
                                $i++;
                            }
                            ?>
						</div>
						</td>
					</tr>
				</tbody>
			</table>
			<hr class="hidden" />
<?php 
                        } else {
                            if ($getMenu == "tag") {
                                //##############################
                                // 태그 통계 ###################
                                //##############################
                                $getDateTitle = !$getMonth ? $getYear . _t('년도') : $getYear . _t('년도') . $getMonth . _t('월');
                                $getData = array();
                                $getTags = array();
                                $tempData = getTagMaxCount();
                                foreach ($tempData as $item) {
                                    array_push($getData, $item['count']);
                                    array_push($getTags, rawurlencode($item['name']));
                                }
                                $getData = implode("|", $getData);
                                $getTags = implode("|", $getTags);
                                $getTotal = getStatisticsTotalDB($getDate, $getMenu, 1);
                                ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                                echo _t('인기') . _t('태그 TOP 10') . _t('통계');
                                ?>
(<?php 
                                echo number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                                echo _t('개');
                                ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                                echo $getMenu;
                                ?>
MaxStic">
									<?php 
                                echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=tag&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                                ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                                echo $getMenu;
                                ?>
MaxPizza">
									<?php 
                                echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=tag&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                                ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
                                $getData = array();
                                $getTags = array();
                                if ($getYear == 9999) {
                                    $getDateTitle = !$getMonth ? _t('전체') : _t('전체') . '&nbsp' . $getMonth . _t('월');
                                } else {
                                    $getDateTitle = !$getMonth ? $getYear . _t('년도') : $getYear . _t('년도') . $getMonth . _t('월');
                                }
                                $tempData = getTagEntryMaxCount($getDate, 1);
                                foreach ($tempData as $item) {
                                    array_push($getData, $item['count']);
                                    array_push($getTags, $item['id']);
                                }
                                $getData = implode("|", $getData);
                                $getTags = implode("|", $getTags);
                                $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                                ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                                echo $getDateTitle;
                                ?>
 <?php 
                                echo _t('태그') . _t('걸린 TOP 10') . _t('글 통계');
                                ?>
(<?php 
                                echo number_format(getTagEntryMaxCount($getDate, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                                echo _t('개');
                                ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                                echo $getMenu;
                                ?>
EntryMaxStic">
									<?php 
                                echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=tagmax&grpXLabelType=2&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                                ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                                echo $getMenu;
                                ?>
EntryMaxPizza">
									<?php 
                                echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=entry&grpYear=" . $getYear . "&grpTypeName=tagmax&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                                ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
			<hr class="hidden" />
<?php 
                            } else {
                                if ($getMenu == "visit") {
                                    //##############################
                                    // 방문자 통계 #################
                                    //##############################
                                    if ($getYear == 9999 && !$getMonth) {
                                        $getData = array();
                                        $getTags = array();
                                        $getDateTitle = _t('전체 년도별');
                                        $tempData = getStatisticsDB('years', '', $getMenu);
                                        foreach ($tempData as $item) {
                                            array_push($getData, $item['count']);
                                            array_push($getTags, rawurlencode($item['period'] . _t('년')));
                                        }
                                        $getData = implode("|", $getData);
                                        $getTags = implode("|", $getTags);
                                        $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                                        ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                                        echo $getDateTitle;
                                        ?>
 <?php 
                                        echo _t('방문자') . _t('통계');
                                        ?>
(<?php 
                                        echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                                        echo _t('개');
                                        ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                                        echo $getMenu;
                                        ?>
YearStic">
									<?php 
                                        echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                                        ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                                        echo $getMenu;
                                        ?>
YearPizza">
									<?php 
                                        echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                                        ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
                                    }
                                    $getData = array();
                                    $getTags = array();
                                    if ($getYear == 9999) {
                                        $getDateTitle = !$getMonth ? _t('전체') : _t('전체') . '&nbsp' . $getMonth . _t('월');
                                    } else {
                                        $getDateTitle = !$getMonth ? $getYear . _t('년도') : $getYear . _t('년도') . $getMonth . _t('월');
                                    }
                                    if (!$getMonth) {
                                        $lastCount = 12;
                                        $textValue = _t('월');
                                    } else {
                                        $lastCount = $getYear == 9999 ? 31 : date('t', mktime(0, 0, 0, $getMonth, 1, $getYear));
                                        $textValue = "";
                                    }
                                    for ($i = 1; $i <= $lastCount; $i++) {
                                        $tempData = getStatisticsDB($getDate, $i, $getMenu);
                                        if ($tempData) {
                                            array_push($getData, $tempData['count']);
                                            array_push($getTags, rawurlencode($i . $textValue));
                                        }
                                    }
                                    $getData = implode("|", $getData);
                                    $getTags = implode("|", $getTags);
                                    $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                                    ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                                    echo $getDateTitle;
                                    ?>
 <?php 
                                    echo _t('방문자') . _t('통계');
                                    ?>
(<?php 
                                    echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                                    echo _t('개');
                                    ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                                    echo $getMenu;
                                    ?>
Stic">
									<?php 
                                    echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                                    ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                                    echo $getMenu;
                                    ?>
Pizza">
									<?php 
                                    echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                                    ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
                                    if (!$getMonth) {
                                        $getData = array();
                                        $getTags = array();
                                        for ($i = 1; $i <= 4; $i++) {
                                            $tempData = getQuartersStatistics($getYear, $i, $getMenu);
                                            if ($tempData) {
                                                array_push($getData, $tempData);
                                                array_push($getTags, rawurlencode($i . "/4 " . _t('분기')));
                                            }
                                        }
                                        $getData = implode("|", $getData);
                                        $getTags = implode("|", $getTags);
                                        $getTotal = getStatisticsTotalDB($getDate, $getMenu, 0);
                                        ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                                        echo $getDateTitle;
                                        ?>
 <?php 
                                        echo _t('분기별') . _t('방문자') . _t('통계');
                                        ?>
(<?php 
                                        echo number_format(getStatisticsTotalDB($getDate, $getMenu, 0)) . "/" . number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                                        echo _t('개');
                                        ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                                        echo $getMenu;
                                        ?>
QuartersStic">
									<?php 
                                        echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                                        ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                                        echo $getMenu;
                                        ?>
QuartersPizza">
									<?php 
                                        echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                                        ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
			<hr class="hidden" />
			<hr class="hidden" />
<?php 
                                    }
                                } else {
                                    if ($getMenu == "referer") {
                                        //##############################
                                        // 리퍼러 통계 #################
                                        //##############################
                                        $getData = array();
                                        $getTags = array();
                                        $tempData = getRefererMaxCount();
                                        foreach ($tempData as $item) {
                                            array_push($getData, $item['count']);
                                            array_push($getTags, rawurlencode($item['host']));
                                        }
                                        $getData = implode("|", $getData);
                                        $getTags = implode("|", $getTags);
                                        $getTotal = getStatisticsTotalDB($getDate, $getMenu, 1);
                                        ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                                        echo _t('리퍼러') . _t('TOP 10') . _t('통계');
                                        ?>
(<?php 
                                        echo number_format(getStatisticsTotalDB($getDate, $getMenu, 1));
                                        echo _t('개');
                                        ?>
)</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                                        echo $getMenu;
                                        ?>
MaxStic">
									<?php 
                                        echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=refer&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                                        ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                                        echo $getMenu;
                                        ?>
MaxPizza">
									<?php 
                                        echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                                        ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
                                        $getData = array();
                                        $getTags = array();
                                        $getDuplicate = array();
                                        $beforCount = "";
                                        $tempData = getRefererKeywordStatistics();
                                        foreach ($tempData as $item) {
                                            if ($item['count'] != $beforCount) {
                                                $beforCount = $item['count'];
                                            } else {
                                                array_push($getDuplicate, $item['count']);
                                            }
                                        }
                                        $getDuplicate = array_count_values($getDuplicate);
                                        $beforCount = "";
                                        foreach ($tempData as $item) {
                                            if ($item['count'] != $beforCount && $item['rank'] < 11) {
                                                array_push($getData, $item['count']);
                                                $duplicateCount = $getDuplicate[$item['count']] ? _f("(외 %1 개)", $getDuplicate[$item['count']]) : _f("(외 %1 개)", 0);
                                                array_push($getTags, rawurlencode(htmlspecialchars(UTF8::lessenAsEm($item['keyword'], 15)) . $duplicateCount));
                                                $beforCount = $item['count'];
                                            }
                                        }
                                        $getData = implode("|", $getData);
                                        $getTags = implode("|", $getTags);
                                        $getTotal = $tempData[0]['total'];
                                        ?>
			<table class="data-inbox" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<th colspan="2"><h3><?php 
                                        echo _t('리퍼러') . _t('키워드 TOP 10') . _t('통계');
                                        ?>
(<?php 
                                        echo number_format($tempData[0]['total']);
                                        echo _t('개');
                                        ?>
) : <?php 
                                        echo $tempData[0]['dateStart'];
                                        ?>
 ~ <?php 
                                        echo $tempData[0]['dateEnd'];
                                        ?>
</h3></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>
							<div class="flash-stic">
								<div id="get<?php 
                                        echo $getMenu;
                                        ?>
KeywordMaxStic">
									<?php 
                                        echo open_flash_chart_object(470, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=bar&grpTypeName=referkey&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
                                        ?>
								</div>
							</div>
						</td>
						<td>
							<div class="flash-pizza">
								<div id="get<?php 
                                        echo $getMenu;
                                        ?>
KeywordMaxPizza">
									<?php 
                                        echo open_flash_chart_object(265, 250, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=pie&grpLinkType=&grpYear=" . $getYear . "&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_pie" : ""));
                                        ?>
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
<?php 
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    ?>
		</div>
	</div>

</div>
						
<?php 
}
示例#6
0
文件: index.php 项目: ni5am/Textcube
function PN_Visitor_Default()
{
    global $pluginMenuURL, $pluginHandlerURL;
    $blogid = getBlogId();
    $stats = Statistics::getStatistics($blogid);
    $date = isset($_GET['date']) ? $_GET['date'] : date('Ym', strtotime("now"));
    ?>
<!-- This tab space below this line is inserted for the indentation of original admin page -->
						<script type="text/javascript">
							//<![CDATA[
<?php 
    if (Acl::check('group.owners')) {
        ?>
								function setTotalStatistics() {
									if (confirm("방문자의 수를 초기화하면 방문객의 수가 0이 됩니다.\n정말 초기화하시겠습니까?")) {
										var request = new HTTPRequest("GET", "<?php 
        echo $pluginHandlerURL;
        ?>
/PN_Visitor_Default_set&ajaxcall");
										request.onSuccess = function() {
											//document.getElementById("total").innerHTML = 0;
											window.location = '<?php 
        echo $pluginMenuURL;
        ?>
';
											return true;
										}
										request.onError = function() {
											alert("저장하지 못했습니다.");
											return false;
										}
										request.send();
									}
								}
<?php 
    }
    ?>
								
								function addCommas(nStr) {
									nStr += '';
									x = nStr.split('.');
									x1 = x[0];
									x2 = x.length > 1 ? '.' + x[1] : '';
									var rgx = /(\d+)(\d{3})/;
									while (rgx.test(x1)) {
										x1 = x1.replace(rgx, '$1' + ',' + '$2');
									}
									return x1 + x2;
								}
								
								window.addEventListener("load", execLoadFunction, false);
								
								function execLoadFunction() {
									tempDiv = document.createElement("DIV");
									tempDiv.style.clear = "both";
									document.getElementById("part-statistics-visitor").appendChild(tempDiv);
								}
							//]]>
						</script>
					 		
					 	<form method="post" action="<?php 
    echo $pluginHandlerURL;
    ?>
PN_Visitor_Default_set">
					 		<div id="part-statistics-visitor" class="part">
					 			<h2 class="caption"><span class="main-text">방문자 통계정보를 보여줍니다</span></h2>
					 			
						 		<div id="statistics-counter-inbox" class="data-inbox">
									<div class="title">
										<span class="label"><span class="text">현재까지의 방문자 수</span></span>
										<span class="divider"> : </span>
										<span id="total"><?php 
    echo number_format($stats['total']);
    ?>
</span>
									</div>
<?php 
    if (Acl::check('group.owners')) {
        ?>
									<a class="init-button button" href="<?php 
        echo $pluginHandlerURL;
        ?>
/PN_Visitor_Default_set" onclick="setTotalStatistics(); return false;"><span class="text">초기화</span></a>
<?php 
    }
    ?>
								</div>
							
								<hr class="hidden" />
								
								<table id="statistics-month-inbox" class="data-inbox" cellspacing="0" cellpadding="0">
									<thead>
										<tr>
											<th colspan="2"><span class="text">월별 방문자 수</span></th>
										</tr>
									</thead>
									<tbody>
<?php 
    $temp = Statistics::getMonthlyStatistics($blogid);
    for ($i = 0; $i < sizeof($temp); $i++) {
        $record = $temp[$i];
        $className = $i % 2 == 1 ? 'even-line' : 'odd-line';
        $className .= $i == sizeof($temp) - 1 ? ' last-line' : '';
        ?>
										<tr class="<?php 
        echo $className;
        ?>
 inactive-class" onmouseover="rolloverClass(this, 'over')" onmouseout="rolloverClass(this, 'out')" onclick="window.location.href='<?php 
        echo $pluginMenuURL;
        ?>
&amp;date=<?php 
        echo $record['datemark'];
        ?>
'">
											<td class="date"><a href="<?php 
        echo $pluginMenuURL;
        ?>
&amp;date=<?php 
        echo $record['datemark'];
        ?>
"><?php 
        echo Timestamp::formatDate2(Utils_Misc::getTimeFromPeriod($record['datemark']));
        ?>
</a></td>
											<td class="count"><a href="<?php 
        echo $pluginMenuURL;
        ?>
&amp;date=<?php 
        echo $record['datemark'];
        ?>
"><?php 
        echo $record['visits'];
        ?>
</a></td>
										</tr>
<?php 
    }
    ?>
									</tbody>
								</table>
								
								<hr class="hidden" />
								
								<table id="statistics-day-inbox" class="data-inbox" cellspacing="0" cellpadding="0">
									<thead>
										<tr>
											<th colspan="2"><span class="text">일별 방문자 수</span></th>
										</tr>
									</thead>
									<tbody>
<?php 
    if (isset($date)) {
        $temp = Statistics::getDailyStatistics($date);
        for ($i = 0; $i < sizeof($temp); $i++) {
            $record = $temp[$i];
            $className = $i % 2 == 1 ? 'even-line' : 'odd-line';
            $className .= $i == sizeof($temp) - 1 ? ' last-line' : '';
            ?>
										<tr class="<?php 
            echo $className;
            ?>
 inactive-class">
											<td class="date"><?php 
            echo Timestamp::formatDate(Utils_Misc::getTimeFromPeriod($record['datemark']));
            ?>
</td>
											<td class="count"><?php 
            echo $record['visits'];
            ?>
</td>
										</tr>
<?php 
        }
    }
    ?>
									</tbody>
								</table>
								
							</div>
						</form>
						
<?php 
}
示例#7
0
function getDefaultCenterPanel($mapping)
{
    $ctx = Model_Context::getInstance();
    $blogid = $ctx->getProperty('blog.id');
    ?>
									<div id="<?php 
    echo $mapping['plugin'];
    ?>
" class="section">
									<h3 class="caption<?php 
    echo isset($_REQUEST['edit']) ? ' visible' : ' invisible';
    ?>
">
											<span><?php 
    echo _t('알림판');
    if (isset($_REQUEST['edit'])) {
        ?>
											<a id="<?php 
        echo $mapping['plugin'];
        ?>
widgetup" href="<?php 
        echo $ctx->getProperty('uri.blog');
        ?>
/owner/center/dashboard?edit&pos=<?php 
        echo $positionCounter;
        ?>
&amp;rel=-1&edit"><?php 
        echo _t('위로');
        ?>
</a>
											<a id="<?php 
        echo $mapping['plugin'];
        ?>
widgetdown" href="<?php 
        echo $ctx->getProperty('uri.blog');
        ?>
/owner/center/dashboard?edit&pos=<?php 
        echo $positionCounter;
        ?>
&amp;rel=1&edit"><?php 
        echo _t('아래로');
        ?>
</a>
<?php 
    }
    ?>
											</span>
										</h3>
<?php 
    if (isset($_REQUEST['edit'])) {
        ?>
									</div>
<?php 
        return true;
    } else {
        // Get default data
        $stats = Statistics::getStatistics($blogid);
        $latestEntryId = Setting::getBlogSettingGlobal('LatestEditedEntry_user' . getUserId(), 0);
        $comments = getRecentComments($blogid, 10);
        $guestbooks = getRecentGuestbook($blogid, 10);
        list($commentNotifies, $paging) = getCommentsNotifiedWithPagingForOwner($blogid, 0, null, null, null, 1, 10);
        $trackbacks = getRecentTrackbacks($blogid, 10);
        $recents = array();
        // title, date, link, category
        foreach ($comments as $comment) {
            array_push($recents, array('title' => $comment['comment'], 'date' => $comment['written'], 'link' => $ctx->getProperty('uri.blog') . "/" . $comment['entry'] . "#comment" . $comment['id'], 'category' => 'comment'));
        }
        foreach ($commentNotifies as $comment) {
            array_push($recents, array('title' => $comment['comment'], 'date' => $comment['written'], 'link' => $ctx->getProperty('uri.blog') . "/owner/communication/notify", 'category' => 'commentNotify'));
        }
        foreach ($guestbooks as $guestbook) {
            array_push($recents, array('title' => $guestbook['comment'], 'date' => $guestbook['written'], 'link' => $ctx->getProperty('uri.blog') . "/guestbook/" . $guestbook['id'] . "#guestbook" . $guestbook['id'], 'category' => 'guestbook'));
        }
        foreach ($trackbacks as $trackback) {
            array_push($recents, array('title' => $trackback['subject'], 'date' => $trackback['written'], 'link' => $ctx->getProperty('uri.blog') . "/" . $trackback['entry'] . "#trackback" . $trackback['id'], 'category' => 'trackback'));
        }
        $sort_array = array();
        foreach ($recents as $uniqid => $row) {
            // Sorting.
            foreach ($row as $key => $value) {
                if (!array_key_exists($key, $sort_array)) {
                    $sort_array[$key] = array();
                }
                $sort_array[$key][$uniqid] = $value;
            }
        }
        if (!empty($sort_array)) {
            array_multisort($sort_array['date'], SORT_DESC, $recents);
        }
        $recents = array_slice($recents, 0, 14);
        ?>
										<div id="shortcut-collection">
											<h4 class="caption"><span><?php 
        echo _t('바로가기');
        ?>
</span></h4>

											<ul>
												<li class="newPost"><a class="newPost" href="<?php 
        echo $ctx->getProperty('uri.blog');
        ?>
/owner/entry/post"><span><?php 
        echo _t('새 글 쓰기');
        ?>
</span></a></li>
<?php 
        if ($latestEntryId !== 0) {
            $latestEntry = getEntry($blogid, $latestEntryId);
            if (!is_null($latestEntry)) {
                ?>
												<li class="modifyPost"><a href="<?php 
                echo $ctx->getProperty('uri.blog');
                ?>
/owner/entry/edit/<?php 
                echo $latestEntry['id'];
                ?>
"><?php 
                echo _f('최근글(%1) 수정', htmlspecialchars(Utils_Unicode::lessenAsEm($latestEntry['title'], 10)));
                ?>
</a></li>
<?php 
            }
        }
        if ($ctx->getProperty('service.reader') == true) {
            ?>
												<li class="rssReader"><a href="<?php 
            echo $ctx->getProperty('uri.blog');
            ?>
/owner/network/reader"><?php 
            echo _t('RSS로 등록한 이웃 글 보기');
            ?>
</a></li>
<?php 
        }
        if (Acl::check("group.administrators")) {
            ?>
												<li class="deleteCache"><a href="<?php 
            echo $ctx->getProperty('uri.blog');
            ?>
/owner/center/dashboard/cleanup" onclick="cleanupCache();return false;"><?php 
            echo _t('캐시 지우기');
            ?>
</a></li>
<?php 
            if (Acl::check("group.creators")) {
                ?>
												<li class="optimizeStorage"><a href="<?php 
                echo $ctx->getProperty('uri.blog');
                ?>
/owner/data" onclick="optimizeData();return false;"><?php 
                echo _t('저장소 최적화');
                ?>
</a></li>
<?php 
            }
        }
        ?>
												<li class="clear"></li>
											</ul>
										</div>

										<div id="total-information">
											<h4 class="caption"><span><?php 
        echo _t('요약');
        ?>
</span></h4>

											<table class="posts-line">
												<caption><?php 
        echo _t('글');
        ?>
</caption>
												<thead>
													<th>type</th>
													<th>sum</th>
												</thead>
												<tbody>
													<tr>
														<td class="type"><?php 
        echo _t('글');
        ?>
</td>
														<td class="sum"><?php 
        echo number_format(getEntriesTotalCount($blogid));
        ?>
</td>
													</tr>
													<tr>
														<td class="type"><?php 
        echo _t('댓글');
        ?>
</td>
														<td class="sum"><?php 
        echo number_format(getCommentCount($blogid));
        ?>
</td>
													</tr>
													<tr>
														<td class="type"><?php 
        echo _t('방명록');
        ?>
</td>
														<td class="sum"><?php 
        echo number_format(getGuestbookCount($blogid));
        ?>
</td>
													</tr>
													<tr>
														<td class="type"><?php 
        echo _t('걸린 글');
        ?>
</td>
														<td class="sum"><?php 
        echo number_format(getTrackbackCount($blogid));
        ?>
</td>
													</tr>
												</tbody>
											</table>
											<table class="visitors-line">
												<caption><?php 
        echo _t('방문자');
        ?>
</caption>
												<thead>
													<th>type</th>
													<th>sum</th>
												</thead>
												<tbody>
													<tr>
														<td class="type"><?php 
        echo _t('오늘');
        ?>
</td>
														<td class="sum"><?php 
        echo number_format($stats['today']);
        ?>
</td>
													</tr>
													<tr>
														<td class="type"><?php 
        echo _t('어제');
        ?>
</td>
														<td class="sum"><?php 
        echo number_format($stats['yesterday']);
        ?>
</td>
													</tr>
													<tr>
														<td class="type"><?php 
        echo _t('7일 평균');
        ?>
</td>
														<td class="sum"><?php 
        $weekly = Statistics::getWeeklyStatistics();
        $weeklycount = 0;
        foreach ($weekly as $day) {
            $weeklycount += $day['visits'];
        }
        echo number_format($weeklycount / 7);
        unset($weekly);
        unset($weeklycount);
        ?>
</td>
													</tr>
													<tr>
														<td class="type"><?php 
        echo _t('총방문자');
        ?>
</td>
														<td class="sum"><?php 
        echo number_format($stats['total']);
        ?>
</td>
													</tr>
												</tbody>
											</table>
										</div>

										<div id="myBlogInfo">
											<h4 class="caption"><span><a href="<?php 
        echo $ctx->getProperty('uri.blog') . '/owner/communication/comment';
        ?>
"><?php 
        echo _t('알림판');
        ?>
</a></span></h4>
											<table class="recent">
												<caption>asdasd</caption>
												<thead>
													<tr>
														<th scope="col" class="date"><?php 
        echo _t('날짜');
        ?>
</th>
														<th scope="col" class="category"><?php 
        echo _t('종류');
        ?>
</th>
														<th scope="col"><?php 
        echo _t('내용');
        ?>
</th>
													</tr>
												</thead>
												<tbody>
<?php 
        foreach ($recents as $item) {
            ?>
													<tr class="<?php 
            echo $item['category'];
            ?>
">
														<td class="date"><?php 
            echo Timestamp::format('%m/%d', $item['date']);
            ?>
</td>
														<td class="category">
															<?php 
            switch ($item['category']) {
                case 'trackback':
                    echo '<a href="' . $ctx->getProperty('uri.blog') . '/owner/communication/trackback?status=received">' . _t('걸린글') . '</a>';
                    break;
                case 'comment':
                    echo '<a href="' . $ctx->getProperty('uri.blog') . '/owner/communication/comment?status=comment">' . _t('댓글') . '</a>';
                    break;
                case 'commentNotify':
                    echo '<a href="' . $ctx->getProperty('uri.blog') . '/owner/communication/notify">' . _t('알리미') . '</a>';
                    break;
                case 'guestbook':
                    echo '<a href="' . $ctx->getProperty('uri.blog') . '/owner/communication/comment?status=guestbook">' . _t('방명록') . '</a>';
                    break;
            }
            ?>
														</td>
														<td class="title"><a href="<?php 
            echo $item['link'];
            ?>
"><?php 
            echo htmlspecialchars(Utils_Unicode::lessenAsEm($item['title'], 20));
            ?>
</a></td>
													</tr>
<?php 
        }
        ?>
												</tbody>
											</table>
										</div>

<?php 
        $noticeURL = TEXTCUBE_NOTICE_URL;
        $noticeURLRSS = $noticeURL . ($ctx->getProperty('blog.language') ? $ctx->getProperty('blog.language') : "ko") . "/rss";
        $noticeEntries = array();
        if (!is_null(Setting::getServiceSetting('TextcubeNotice' . $ctx->getProperty('blog.language')))) {
            $noticeEntries = unserialize(Setting::getServiceSetting('TextcubeNotice' . $ctx->getProperty('blog.language')));
        } else {
            list($result, $feed, $xml) = getRemoteFeed($noticeURLRSS);
            if ($result == 0) {
                $xmls = new XMLStruct();
                $xmls->setXPathBaseIndex(1);
                $noticeEntries = array();
                if ($xmls->open($xml, $ctx->getProperty('service.encoding'))) {
                    if ($xmls->getAttribute('/rss', 'version')) {
                        for ($i = 1; $link = $xmls->getValue("/rss/channel/item[{$i}]/link"); $i++) {
                            $item = array('permalink' => rawurldecode($link));
                            $item['title'] = $xmls->getValue("/rss/channel/item[{$i}]/title");
                            if ($xmls->getValue("/rss/channel/item[{$i}]/pubDate")) {
                                $item['written'] = parseDate($xmls->getValue("/rss/channel/item[{$i}]/pubDate"));
                            } else {
                                if ($xmls->getValue("/rss/channel/item[{$i}]/dc:date")) {
                                    $item['written'] = parseDate($xmls->getValue("/rss/channel/item[{$i}]/dc:date"));
                                } else {
                                    $item['written'] = 0;
                                }
                            }
                            array_push($noticeEntries, $item);
                        }
                    }
                }
                Setting::setServiceSetting('TextcubeNotice' . $ctx->getProperty('blog.language'), serialize($noticeEntries));
            }
        }
        ?>
										<div id="textcube-notice">
											<h4 class="caption"><span><a href="<?php 
        echo $noticeURL . ($ctx->getProperty('blog.language') ? $ctx->getProperty('blog.language') : "ko");
        ?>
"><?php 
        echo _t('공지사항');
        ?>
</a></span></h4>
<?php 
        if (count($noticeEntries) > 0) {
            array_splice($noticeEntries, 3, count($noticeEntries) - 3);
            ?>
											<table>
												<tbody>
<?php 
            foreach ($noticeEntries as $item) {
                ?>
													<tr>
														<td class="date"><?php 
                echo Timestamp::format2($item['written']);
                ?>
</td>
														<td class="title"><a href="<?php 
                echo $item['permalink'];
                ?>
" onclick="return openLinkInNewWindow(this);" ><?php 
                echo htmlspecialchars(Utils_Unicode::lessenAsEm($item['title'], 35));
                ?>
</a></td>
													</tr>
<?php 
            }
            ?>
												</tbody>
											</table>

<?php 
        } else {
            ?>
											<div id="fail-notice">
												<?php 
            echo _t('공지사항을 가져올 수 없습니다. 잠시 후 다시 시도해 주십시오.');
            ?>
											</div>
<?php 
        }
        ?>
										</div>
<?php 
    }
    ?>
									</div>
<?php 
}
示例#8
0
文件: admin.php 项目: uplight/gallery
$a = explode('.', $get['a']);
$result = 0;
switch (array_shift($a)) {
    case 'log_error':
        $result = new stdClass();
        $result->success = 'success';
        $txt = file_get_contents('php://input');
        error_log($txt, 3, LOG . 'sdmin_error.txt');
        if (mail($admin, 'Error admin directories', $txt)) {
            $result->result = 'emailed';
        }
        break;
    case 'get_statistics':
        include 'cl/Statistics.php';
        $ctr = new Statistics();
        $result = $ctr->getStatistics();
        break;
    case 'get_usage':
        include 'cl/Statistics.php';
        $ctr = new Statistics();
        $result = $ctr->getUsage($get['devices'], $get['from'], $get['to']);
        break;
    case 'get_devices_data':
        $result = utils()->getDevicesData();
        break;
    case 'restart_kiosks':
        $result = utils()->restartKiosks($get);
        break;
    case 'upload_image':
        $result = utils()->uploadImage($_FILES["file"], $get['folder'], $get['prefix']);
        break;
示例#9
0
function getStatistics($blogid)
{
    return Statistics::getStatistics($blogid);
}
示例#10
0
    case "1 Day":
        $date = strtotime("-23 hours");
        break;
    case "1 Week":
        $date = strtotime("-6 days");
        break;
    case "1 Month":
        $date = strtotime("-29 days");
        break;
    case "3 Months":
        $date = strtotime("-89 days");
        break;
    case "1 Year":
        $date = strtotime("-365 days");
        break;
    case "3 Years":
        $date = strtotime("-795 days");
        break;
    default:
        die("Invalid Timeframe");
}
$rows = $stats->getStatistics($date, $country, $apikey, $browser);
$data = "ID,Map Id,Map Name, API Key,View Time,Viewer IP,Host Name,City,Region,Country,Organization,Postal Code,Phone #,Referer URL,Browser Name, Browser Version, Operating System\n";
$i = 1;
foreach ($rows as $row) {
    $data .= $i++ . "," . $row['maps_id'] . "," . $row['maps_name'] . "," . $row['apikey'] . "," . $row['viewed_at'] . "," . $row['ip'] . "," . $row['hostname'] . "," . $row['city'] . "," . $row['region'] . "," . $row['country'] . "," . $row['org'] . "," . $row['postal'] . "," . $row['phone'] . "," . $row['referer_url'] . "," . $row['browser_name'] . "," . $row['browser_version'] . "," . $row['os'] . "\n";
}
header("Content-type: text/csv");
header("Content-Disposition: attachment; filename=" . $timeframe . ".csv");
header("Expires: 0");
echo $data;