mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-30 00:29:58 +09:00
issue 70 site count in dashboard
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8803 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
19e395eb2c
commit
e3bfd18de7
4 changed files with 33 additions and 1 deletions
|
|
@ -171,6 +171,11 @@
|
||||||
$args->date = date("Ymd000000", time()-60*60*24);
|
$args->date = date("Ymd000000", time()-60*60*24);
|
||||||
$today = date("Ymd");
|
$today = date("Ymd");
|
||||||
|
|
||||||
|
// Site Status
|
||||||
|
$oSiteModel = &getModel('site');
|
||||||
|
$status->site->todayCount = $oSiteModel->getSiteCountByDate($today);
|
||||||
|
$status->site->totalCount = $oSiteModel->getSiteCountByDate();
|
||||||
|
|
||||||
// Member Status
|
// Member Status
|
||||||
$oMemberAdminModel = &getAdminModel('member');
|
$oMemberAdminModel = &getAdminModel('member');
|
||||||
$status->member->todayCount = $oMemberAdminModel->getMemberCountByDate($today);
|
$status->member->todayCount = $oMemberAdminModel->getMemberCountByDate($today);
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
<div class="portlet">
|
<div class="portlet">
|
||||||
<h2 class="h2">Current State</h2>
|
<h2 class="h2">Current State</h2>
|
||||||
<ul class="lined">
|
<ul class="lined">
|
||||||
<li><a href="#">Site</a> <span class="side">42(+1)</span></li>
|
<li><a href="#">Site</a> <span class="side">{number_format($status->site->totalCount)}(<!--@if($status->status->todayCount > 0)-->+<!--@end-->{number_format($status->site->todayCount)})</span></li>
|
||||||
<li><a href="#">User</a> <span class="side">{number_format($status->member->totalCount)}(<!--@if($status->member->todayCount > 0)-->+<!--@end-->{number_format($status->member->todayCount)})</span></li>
|
<li><a href="#">User</a> <span class="side">{number_format($status->member->totalCount)}(<!--@if($status->member->todayCount > 0)-->+<!--@end-->{number_format($status->member->todayCount)})</span></li>
|
||||||
<li><a href="#">Document</a> <span class="side">{number_format($status->document->totalCount)}(<!--@if($status->document->todayCount > 0)-->+<!--@end-->{number_format($status->document->todayCount)})</span></li>
|
<li><a href="#">Document</a> <span class="side">{number_format($status->document->totalCount)}(<!--@if($status->document->todayCount > 0)-->+<!--@end-->{number_format($status->document->todayCount)})</span></li>
|
||||||
<li><a href="#">Comment</a> <span class="side">{number_format($status->comment->totalCount)}(<!--@if($status->comment->todayCount > 0)-->+<!--@end-->{$status->comment->todayCount})</span></li>
|
<li><a href="#">Comment</a> <span class="side">{number_format($status->comment->totalCount)}(<!--@if($status->comment->todayCount > 0)-->+<!--@end-->{$status->comment->todayCount})</span></li>
|
||||||
|
|
|
||||||
11
modules/site/queries/getSiteCountByDate.xml
Normal file
11
modules/site/queries/getSiteCountByDate.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
<query id="getSiteCountByDate" action="select">
|
||||||
|
<tables>
|
||||||
|
<table name="sites" />
|
||||||
|
</tables>
|
||||||
|
<columns>
|
||||||
|
<column name="count(*)" alias="count" />
|
||||||
|
</columns>
|
||||||
|
<conditions>
|
||||||
|
<condition operation="like_prefix" column="regdate" var="regDate" />
|
||||||
|
</conditions>
|
||||||
|
</query>
|
||||||
|
|
@ -21,6 +21,9 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Return site list
|
||||||
|
**/
|
||||||
function getSiteAllList()
|
function getSiteAllList()
|
||||||
{
|
{
|
||||||
if(Context::get('domain')) $args->domain = Context::get('domain');
|
if(Context::get('domain')) $args->domain = Context::get('domain');
|
||||||
|
|
@ -33,6 +36,19 @@
|
||||||
$this->add('site_list', $siteList);
|
$this->add('site_list', $siteList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Return site count
|
||||||
|
**/
|
||||||
|
function getSiteCountByDate($date = '')
|
||||||
|
{
|
||||||
|
if($date) $args->regDate = date('Ymd', strtotime($date));
|
||||||
|
|
||||||
|
$output = executeQuery('site.getSiteCountByDate', $args);
|
||||||
|
if(!$output->toBool()) return 0;
|
||||||
|
|
||||||
|
return $output->data->count;
|
||||||
|
}
|
||||||
|
|
||||||
function makeGnbUrl($member_srl)
|
function makeGnbUrl($member_srl)
|
||||||
{
|
{
|
||||||
global $lang;
|
global $lang;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue