Esempio n. 1
0
include_once "../../PeoplePods.php";
$POD = new PeoplePod(array('lockdown' => 'adminUser', 'authSecret' => @$_COOKIE['pp_auth']));
if (@$_POST) {
    $POD->setLibOptions('peopleImageResize', $_POST['peopleImageResize']);
    $POD->setLibOptions('peopleImageMaxWidth', $_POST['peopleImageMaxWidth']);
    $POD->setLibOptions('peopleIconSquare', $_POST['peopleIconSquare']);
    $POD->setLibOptions('peopleIconMaxWidth', $_POST['peopleIconMaxWidth']);
    $POD->setLibOptions('documentImageResize', $_POST['documentImageResize']);
    $POD->setLibOptions('documentImageMaxWidth', $_POST['documentImageMaxWidth']);
    $POD->setLibOptions('documentIconSquare', $_POST['documentIconSquare']);
    $POD->setLibOptions('documentIconMaxWidth', $_POST['documentIconMaxWidth']);
    $POD->saveLibOptions();
    if ($POD->success()) {
        $message = "Config updated.";
    } else {
        $message = $POD->error();
    }
}
$POD->changeTheme('admin');
$POD->header();
$current_tab = "images";
?>
	<?php 
include_once "option_nav.php";
?>

	<?php 
if (isset($message)) {
    ?>
		<div class="info">
		
Esempio n. 2
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
Esempio n. 3
0
* Documentation for this pod can be found here:
* http://peoplepods.net/readme
/**********************************************/
include_once "../../lib/Core.php";
$POD = new PeoplePod(array('authSecret' => @$_COOKIE['pp_auth']));
if (!$POD->libOptions('enable_core_authentication_login')) {
    header("Location: " . $POD->siteRoot(false));
    exit;
}
$redirect_after_login = false;
if ($_POST) {
    // if we have a form being submitted, handle the login
    if (@$_POST['email'] && @$_POST['password']) {
        $POD = new PeoplePod(array('authSecret' => md5($_POST['email'] . $_POST['password'])));
        if (!$POD->success()) {
            $POD->addMessage($POD->error());
        }
        if (!$POD->isAuthenticated()) {
            $POD->addMessage("Oops!  We could not log you in using that email address and password.");
        } else {
            $days = 15;
            if ($_POST['remember_me']) {
                $days = 100;
            }
            setcookie('pp_auth', $POD->currentUser()->get('authSecret'), time() + 86400 * $days, "/");
            $redirect_after_login = true;
        }
    }
}
if ($redirect_after_login) {
    // if we logged in correctly, we redirect to the homepage of the site, or to any url passed in as a parameter
Esempio n. 4
0
				<form method="post">
					<p>Name: <input name="nick"class="text" value="admin" /></p>
					<p>Your Email: <input name="email"class="text" value="" /></p>
					<p>Password: <input name="password"class="text" value="" /></p>
					<p><input type="submit" value="Create" /></p>
				</form>		
	
			<?php 
                    }
                } else {
                    echo '<p>Uncaught Configuration Error!</p>';
                    echo "<P>POD: ";
                    if ($POD->success()) {
                        echo "Success";
                    } else {
                        echo "Fail " . $POD->error();
                    }
                    echo "</p>";
                    if ($POD->success()) {
                        echo "<p>Has Super User: "******"Yes";
                        } else {
                            echo "No";
                        }
                        echo "</p>";
                        echo "<P>Authentication: ";
                        if ($POD->isAuthenticated()) {
                            echo "Success";
                        } else {
                            echo "Fail";
Esempio n. 5
0
<?php

include_once "../../PeoplePods.php";
$POD = new PeoplePod(array('lockdown' => 'adminUser', 'authSecret' => $_COOKIE['pp_auth']));
$this_database_update = 0.9;
$last_version = $POD->libOptions('last_database_update');
if (!$last_version) {
    $last_version = 0;
}
if (isset($_GET['confirm'])) {
    echo "<ul>";
    if ($last_version < 0.7) {
        echo "<li>Checking permissions...</li>";
        $POD->saveLibOptions();
        if (!$POD->success()) {
            echo "<li><strong>" . $POD->error() . "</strong></li>";
        } else {
            echo "<li>Creating table meta_tmp...</li>";
            $sql = "CREATE TABLE meta_tmp(type enum('group','content','user'),itemId bigint(12), name varchar(100),value text,id bigint(12) NOT NULL UNIQUE auto_increment, unique index u (type,itemId,name));";
            $res = mysql_query($sql, $POD->DATABASE);
            if (!$res) {
                echo "<li><strong>SQL Error: " . mysql_error() . "</strong></li>";
            } else {
                echo "<li>Copying meta values into meta_tmp...</li>";
                $sql = "REPLACE INTO meta_tmp (type,itemId,name,value) SELECT type,itemId,name,value FROM meta;";
                $res = mysql_query($sql, $POD->DATABASE);
                if (!$res) {
                    echo "<li><strong>SQL Error: " . mysql_error() . "</strong></li>";
                } else {
                    echo "<li>Deleting values from meta... (If this errors, you may have to restore your db from backup)</li>";
                    $sql = "DELETE FROM meta";
Esempio n. 6
0
    ksort($POD->PODS);
    // iterate through each pod we know about.
    foreach ($POD->PODS as $name => $podling) {
        // if it was checked, enable it.  if not, disable it.
        if ($form[$name]) {
            $message .= $POD->enablePOD($name);
        } else {
            if ($POD->isEnabled($name)) {
                $message .= $POD->disablePOD($name);
            }
        }
    }
    // save everything to lib/etc/options.php
    $POD->saveLibOptions();
    if (!$POD->success()) {
        $message .= $POD->error();
    } else {
        $POD->processIncludes();
        $message .= $POD->writeHTACCESS($htaccessPath);
    }
}
$POD->changeTheme('admin');
$POD->header();
$current_tab = "pods";
?>
	
	<?php 
include_once "option_nav.php";
?>
	<?php 
if ($message != '') {