当前位置: 首页>>代码示例>>PHP>>正文


PHP Statistics::getWeeklyStatistics方法代码示例

本文整理汇总了PHP中Statistics::getWeeklyStatistics方法的典型用法代码示例。如果您正苦于以下问题:PHP Statistics::getWeeklyStatistics方法的具体用法?PHP Statistics::getWeeklyStatistics怎么用?PHP Statistics::getWeeklyStatistics使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Statistics的用法示例。


在下文中一共展示了Statistics::getWeeklyStatistics方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: CT_BlogVisitStatistics

function CT_BlogVisitStatistics($target)
{
    global $database, $blogid, $defaultURL, $blogURL, $pluginURL, $pluginMenuURL, $configVal;
    requireComponent('Textcube.Model.Statistics');
    $weekly = Statistics::getWeeklyStatistics();
    asort($weekly);
    $i = 0;
    $getData = array();
    $getTags = array();
    foreach ($weekly as $day) {
        if ($i > 0) {
            array_push($getData, $day['visits']);
            $labelFormat = sprintf("%s.%s", substr($day['date'], 4, 2), substr($day['date'], 6, 8));
            array_push($getTags, $labelFormat);
        }
        $i++;
    }
    $getData = implode("|", $getData);
    $getTags = implode("|", $getTags);
    $getTotal = getStatisticsTotalDB(date("Ym"), "visit", 0);
    unset($weekly);
    ob_start();
    ?>
		<div class="flash-Line">
			<div id="getBlogVisitLine">
				<?php 
    echo open_flash_chart_object(299, 130, $blogURL . "/plugin/BlogStatisticsProcess/?grpStyle=line&grpTypeName=&grpData=" . $getData . "&grpTotal=" . $getTotal . "&grpLabel=" . $getTags . (empty($getData) ? "&grpNoData_bar" : ""));
    ?>
			</div>
		</div>
	<?php 
    $target = ob_get_contents();
    ob_end_clean();
    return $target;
}
开发者ID:hinablue,项目名称:TextCube,代码行数:35,代码来源:index.php

示例2: getDefaultCenterPanel


//.........这里部分代码省略.........
        ?>
</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>
开发者ID:webhacking,项目名称:Textcube,代码行数:67,代码来源:index.php

示例3: intval

    $db['password'] = $context->getProperty('password');
    $context->useNamespace();
    if (POD::bind($db) === false) {
        Respond::MessagePage('Problem with connecting database.<br /><br />Please re-visit later.');
        exit;
    }
}
$database['utf8'] = POD::charset() == 'utf8' ? true : false;
include "src/jpgraph.php";
include "src/jpgraph_scatter.php";
include "src/jpgraph_line.php";
if (isset($_REQUEST['blogid']) && is_numeric($_REQUEST['blogid'])) {
    $blogid = intval($_REQUEST['blogid']);
}
requireComponent('Textcube.Model.Statistics');
$row = Statistics::getWeeklyStatistics();
$row = array_reverse($row);
// Y축 배열
$pos = 0;
for ($i = 7; $i >= 0; $i--) {
    $week = strtotime("-" . $i . " day");
    $xdata[] = date('d', $week);
    if (!isset($row[$pos]) || date('d', $week) != substr($row[$pos]["datemark"], -2)) {
        $ydata[] = 0;
    } else {
        $ydata[] = $row[$pos++]["visits"];
    }
}
// Create the graph. These two calls are always required
$graph = new Graph(175, 120, "auto");
//그래프의 크기를 지정
开发者ID:ragi79,项目名称:Textcube,代码行数:31,代码来源:count.php


注:本文中的Statistics::getWeeklyStatistics方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。