mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-04 01:23:32 +09:00
issue 2740 add member, document status in dashboard
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12372 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
d6566640a6
commit
56110ce3c3
2 changed files with 18 additions and 17 deletions
|
|
@ -221,6 +221,23 @@ class adminAdminView extends admin
|
||||||
*/
|
*/
|
||||||
function dispAdminIndex()
|
function dispAdminIndex()
|
||||||
{
|
{
|
||||||
|
// Get statistics
|
||||||
|
$args->date = date("Ymd000000", time()-60*60*24);
|
||||||
|
$today = date("Ymd");
|
||||||
|
|
||||||
|
// Member Status
|
||||||
|
$oMemberAdminModel = &getAdminModel('member');
|
||||||
|
$status->member->todayCount = $oMemberAdminModel->getMemberCountByDate($today);
|
||||||
|
$status->member->totalCount = $oMemberAdminModel->getMemberCountByDate();
|
||||||
|
|
||||||
|
// Document Status
|
||||||
|
$oDocumentAdminModel = &getAdminModel('document');
|
||||||
|
$statusList = array('PUBLIC', 'SECRET');
|
||||||
|
$status->document->todayCount = $oDocumentAdminModel->getDocumentCountByDate($today, array(), $statusList);
|
||||||
|
$status->document->totalCount = $oDocumentAdminModel->getDocumentCountByDate('', array(), $statusList);
|
||||||
|
|
||||||
|
Context::set('status', $status);
|
||||||
|
|
||||||
// Latest Document
|
// Latest Document
|
||||||
$oDocumentModel = &getModel('document');
|
$oDocumentModel = &getModel('document');
|
||||||
$columnList = array('document_srl', 'module_srl', 'category_srl', 'title', 'nick_name', 'member_srl');
|
$columnList = array('document_srl', 'module_srl', 'category_srl', 'title', 'nick_name', 'member_srl');
|
||||||
|
|
|
||||||
|
|
@ -206,22 +206,6 @@ class memberAdminModel extends member
|
||||||
$this->add('tpl', $tpl);
|
$this->add('tpl', $tpl);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Return member count with date
|
|
||||||
*
|
|
||||||
* @param string $date
|
|
||||||
*
|
|
||||||
* @return int
|
|
||||||
*/
|
|
||||||
public function getMemberAdminCountByDate()
|
|
||||||
{
|
|
||||||
if(Context::get('date'))
|
|
||||||
{
|
|
||||||
$date = date('Ymd', strtotime(Context::get('date')));
|
|
||||||
}
|
|
||||||
$count = $this->_getMemberCountByDate($date);
|
|
||||||
$this->add('count', $count);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return member count with date
|
* Return member count with date
|
||||||
|
|
@ -230,7 +214,7 @@ class memberAdminModel extends member
|
||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
private function _getMemberCountByDate($date = '')
|
public function getMemberCountByDate($date = '')
|
||||||
{
|
{
|
||||||
if($date) $args->regDate = date('Ymd', strtotime($date));
|
if($date) $args->regDate = date('Ymd', strtotime($date));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue