Exemplo n.º 1
0
<?php

require_once "../PeoplePods.php";
$POD = new PeoplePod(array('debug' => 0, 'lockdown' => 'adminUser', 'authSecret' => @$_COOKIE['pp_auth']));
$POD->changeTheme('admin');
if (!$POD->success()) {
    error_log($POD->error());
}
if (isset($_GET['flushcache'])) {
    $POD->cacheflush();
    $message = "Cache Flushed!";
}
$POD->header();
// lets generate some stats!
$today = date("Y-m-d");
/*
  	$totalMembers = $POD->getPeople(array('memberSince:lte'=>$today));  
	$membersToday = $POD->getPeople(array('lastVisit:gt'=>$today),'lastVisit desc',10);
	$membersJoined = $POD->getPeople(array('memberSince:gt'=>$today));
	$docsCreated = $POD->getContents(array('date:gt'=>$today));
	$newComments = $POD->getComments(array('date:gt'=>$today),'date desc',5);
	$total = $membersJoined->totalCount()  + $totalMembers->totalCount();
*/
$this_database_update = 0.9;
$last_version = $POD->libOptions('last_database_update');
if (!$last_version) {
    $last_version = 0;
}
// load each type of thing
// get total, total for today, total for the last week
// members, content, comments, files, groups