Esempio n. 1
0
<?php

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)) {
    ?>
Esempio n. 2
0
                    echo '<p><input type="submit" value="Continue &#187;" /></p>';
                    echo '</form>';
                }
            } else {
                if (!$POD->hasAdminUser()) {
                    // create first user
                    if ($_POST['nick'] && $_POST['email'] && $_POST['password']) {
                        $NEWUSER = $POD->getPerson(array('nick' => $_POST['nick'], 'email' => $_POST['email'], 'password' => $_POST['password']));
                        $NEWUSER->save(true);
                        if ($NEWUSER->success()) {
                            $NEWUSER->verify($NEWUSER->get('verificationKey'));
                            $NEWUSER->addMeta('adminUser', 1);
                            $POD = new PeoplePod(array('debug' => 0, 'authSecret' => $NEWUSER->get('authSecret')));
                            // set the from address for site emails
                            $POD->setLibOptions('fromAddress', $NEWUSER->get('nick') . "<" . $NEWUSER->get('email') . ">");
                            $POD->saveLibOptions(true);
                        } else {
                            $error_msg = $NEWUSER->error();
                        }
                    }
                    if ($POD->isAuthenticated()) {
                        ?>
				
					<script type="text/javascript">
						setCookie('<?php 
                        $NEWUSER->write('authSecret');
                        ?>
');
					</script>
					<p><b>You have been upgraded to SUPER USER!</b></p>
					<p><a href="index.php">Continue &#187;</a></p>