本文整理汇总了PHP中Statistics::getMonthlyStatistics方法的典型用法代码示例。如果您正苦于以下问题:PHP Statistics::getMonthlyStatistics方法的具体用法?PHP Statistics::getMonthlyStatistics怎么用?PHP Statistics::getMonthlyStatistics使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Statistics
的用法示例。
在下文中一共展示了Statistics::getMonthlyStatistics方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PN_Visitor_Default
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++) {
//.........这里部分代码省略.........
示例2: getMonthlyStatistics
function getMonthlyStatistics($blogid)
{
return Statistics::getMonthlyStatistics($blogid);
}