Beispiel #1
0
$content = $POD->getContents(array(), 'date desc', 10);
$stats['content_total'] = $content->totalCount();
$active_content = $POD->getContents(array(), 'commentDate DESC', 10);
$comments = $POD->getComments(array('date:gte' => date('Y-m-d') . ' 00:00:00'));
$stats['comments_today'] = $comments->totalCount();
$comments = $POD->getComments(array('date:gte' => date('Y-m-d', strtotime('-7 days'))));
$stats['comments_week'] = $comments->totalCount();
$comments = $POD->getComments(array(), 'date desc', 10);
$stats['comments_total'] = $comments->totalCount();
$files = $POD->getFiles(array('date:gte' => date('Y-m-d') . ' 00:00:00'));
$stats['files_today'] = $files->totalCount();
$files = $POD->getFiles(array('date:gte' => date('Y-m-d', strtotime('-7 days'))));
$stats['files_week'] = $files->totalCount();
$files = $POD->getFiles(array(), 'date desc', 10);
$stats['files_total'] = $files->totalCount();
$groups = $POD->getGroups(array('date:gte' => date('Y-m-d') . ' 00:00:00'));
$stats['groups_today'] = $groups->totalCount();
$groups = $POD->getGroups(array('date:gte' => date('Y-m-d', strtotime('-7 days'))));
$stats['groups_week'] = $groups->totalCount();
$groups = $POD->getGroups(array(), 'date desc', 10);
$stats['groups_total'] = $groups->totalCount();
?>
			<script type="text/javascript">	
				function doSearch() { 
				
					window.location="<?php 
$POD->podRoot();
?>
/admin/" + $('#search_type').val()+ "/search.php?q=" + escape($('#search_q').val());
					return false;
				}
Beispiel #2
0
}
if ($_POST) {
    $group = $POD->getGroup();
    $group->set('groupname', $_POST['groupname']);
    $group->set('description', $_POST['description']);
    $group->set('type', $_POST['type']);
    $group->save();
    if (!$group->success()) {
        $POD->addMessage("Your group was not created! " . $group->error());
    } else {
        $POD->addMessage("Your new group, " . $group->permalink('groupname', true) . " is ready! ");
    }
}
if (isset($_GET['q'])) {
    $header = "Group Search";
    $groups = $POD->getGroups(array('or' => array('groupname:like' => '%' . $_GET['q'] . '%', 'description:like' => '%' . $_GET['q'] . '%')), 'g.date DESC', $max, $offset);
} else {
    if ($POD->isAuthenticated()) {
        $header = "My Groups";
        $groups = $POD->getGroups(array('mem.userId' => $POD->currentUser()->get('id')), 'mem.date DESC', $max, $offset);
        if ($groups->totalCount() == 0) {
            $header = "Newish Groups";
            $groups = $POD->getGroups(array('type' => 'public'), 'g.date DESC', $max, $offset);
        }
    } else {
        $header = "Newish Groups";
        $groups = $POD->getGroups(array('type' => 'public'), 'g.date DESC', $max, $offset);
    }
}
if (!$groups->success()) {
    $POD->addMessage($groups->error());
Beispiel #3
0
include_once "../../PeoplePods.php";
$POD = new PeoplePod(array('lockdown' => 'adminUser', 'authSecret' => @$_COOKIE['pp_auth']));
$POD->changeTheme('admin');
$conditions = array();
if (isset($_GET['q']) && $_GET['q'] != 'Search') {
    $conditions['groupname:like'] = '%' . $_GET['q'] . '%';
}
if (isset($_GET['type'])) {
    $conditions['type'] = $_GET['type'];
}
if (isset($_GET['userId'])) {
    $conditions['userId'] = $_GET['userId'];
}
$offset = isset($_GET['offset']) ? $_GET['offset'] : 0;
if (sizeof($conditions) > 0) {
    $groups = $POD->getGroups($conditions, 'date DESC', 20, $offset);
} else {
    $groups = $POD->getGroups(array('1' => 1), 'date DESC', 20, $offset);
}
$message = isset($_GET['msg']) ? $_GET['msg'] : null;
$POD->header();
include_once "tools.php";
if (isset($message)) {
    ?>
		
			<div class="info">
				<?php 
    echo $message;
    ?>
			</div>