Exemple #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)) {
    ?>
Exemple #2
0
                    echo '<p><label for="mysql_pass">Password:</label><input name="mysql_pass"class="text" value="' . $POD->libOptions('mysql_pass') . '"/></p>';
                    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>
Exemple #3
0
<?php

include_once "../../PeoplePods.php";
$POD = new PeoplePod(array('lockdown' => 'adminUser', 'authSecret' => @$_COOKIE['pp_auth']));
if ($_POST) {
    $POD->setLibOptions('friendEmail', @$_POST['friendEmail']);
    $POD->setLibOptions('friendAlert', @$_POST['friendAlert']);
    $POD->setLibOptions('friendActivity', @$_POST['friendActivity']);
    $POD->setLibOptions('friendActivity', @$_POST['friendActivity']);
    $POD->setLibOptions('friendActivity', @$_POST['friendActivity']);
    $POD->setLibOptions('contentCommentAlert', @$_POST['contentCommentAlert']);
    $POD->setLibOptions('contentCommentActivity', @$_POST['contentCommentActivity']);
    $POD->setLibOptions('profileCommentAlert', @$_POST['profileCommentAlert']);
    $POD->setLibOptions('profileCommentActivity', @$_POST['profileCommentActivity']);
    $POD->setLibOptions('alertEmail', @$_POST['alertEmail']);
    $POD->setLibOptions('contactEmail', @$_POST['contactEmail']);
    $POD->saveLibOptions();
    if ($POD->success()) {
        $message = "Config updated.";
    } else {
        $message = $POD->error();
    }
}
$POD->changeTheme('admin');
$POD->header();
$current_tab = "notifications";
include_once "option_nav.php";
?>

	<?php 
if (isset($message)) {
Exemple #4
0
 $podRoot = preg_replace("/\\/\$/", "", $podRoot);
 $server = preg_replace("/\\/\$/", "", $server);
 if (!preg_match("/^http/", $server)) {
     $server = "http://" . $server;
 }
 // add leading slashes if necessary
 if (!preg_match("/^\\//", $podRoot)) {
     $podRoot = "/{$podRoot}";
 }
 if (!preg_match("/^\\//", $siteRoot) && $siteRoot != '') {
     $siteRoot = "/{$siteRoot}";
 }
 // lets verify this shit before saving it!
 $res = file_exists("{$installDir}/PeoplePods.php");
 if ($res) {
     $POD->setLibOptions('siteName', $siteName);
     $POD->setLibOptions('installDir', $installDir);
     $POD->setLibOptions('server', $server);
     $POD->setLibOptions('podRoot', $podRoot);
     $POD->setLibOptions('siteRoot', $siteRoot);
     $POD->setLibOptions('peoplepods_api', $peoplepods_api);
     // recreate automatically generated values
     $POD->setLibOptions('etcPath', $installDir . "/lib/etc");
     $POD->saveLibOptions();
     if ($POD->success()) {
         $message = "Config updated.";
     } else {
         $message = $POD->error();
     }
 } else {
     $message = "Could not find PeoplePods libraries at {$installDir}/PeoplePods.php!  Config not updated!";
Exemple #5
0
                     if (!$res) {
                         echo "<li><strong>SQL Error: " . mysql_error() . "</strong></li>";
                     } else {
                         echo "<li>Copying values from meta_tmp back into meta... (If this errors, you may have to restore your db from backup)</li>";
                         $sql = "INSERT INTO meta (type,itemId,name,value) SELECT type,itemId,name,value FROM meta_tmp;";
                         $res = mysql_query($sql, $POD->DATABASE);
                         if (!$res) {
                             echo "<li><strong>SQL Error: " . mysql_error() . "</strong></li>";
                         } else {
                             echo "<li>Cleaning up by removing meta_tmp table...</li>";
                             $sql = "DROP TABLE meta_tmp;";
                             $res = mysql_query($sql, $POD->DATABASE);
                             if (!$res) {
                                 echo "<li><strong>SQL Error: " . mysql_error() . "</strong></li>";
                             } else {
                                 $POD->setLibOptions('last_database_update', '0.7');
                                 $POD->saveLibOptions();
                                 if (!$POD->success()) {
                                     echo "<li><strong>" . $POD->error() . "</strong></li>";
                                 } else {
                                     echo "<li>Upgrade to 0.7 complete.</li>";
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 }
 if ($last_version < 0.71) {
Exemple #6
0
<?php

include_once "../../PeoplePods.php";
$POD = new PeoplePod(array('lockdown' => 'adminUser', 'authSecret' => @$_COOKIE['pp_auth']));
if ($_POST) {
    $fromAddress = @$_POST['fromAddress'];
    $friendEmail = @$_POST['friendEmail'];
    $POD->setLibOptions('fromAddress', $fromAddress);
    $POD->setLibOPtions('friendEmail', $friendEmail);
    $POD->setLibOPtions('contactEmail', @$_POST['contactEmail']);
    $POD->saveLibOptions();
    if ($POD->success()) {
        $message = "Config updated.";
    } else {
        $message = $POD->error();
    }
}
$POD->changeTheme('admin');
$POD->header();
$current_tab = "emails";
include_once "option_nav.php";
?>

	<?php 
if (isset($message)) {
    ?>
		<div class="info">
		
			<?php 
    echo $message;
    ?>
Exemple #7
0
        $lines = explode("\n", $themeinfo);
        $info = array();
        $info['theme'] = $theme;
        foreach ($lines as $line) {
            list($key, $value) = explode("=", $line, 2);
            $key = trim($key);
            $value = trim($value);
            $info[$key] = $value;
        }
        if ($info['name'] && $info['theme']) {
            array_push($themes, $info);
        }
    }
}
if ($_GET['activate']) {
    $POD->setLibOptions('currentTheme', $_GET['activate']);
    $POD->saveLibOptions();
    if (!$POD->success()) {
        $message = $POD->error();
    } else {
    }
}
$currentTheme = $POD->currentTheme();
$POD->changeTheme('admin');
$POD->header();
$current_tab = "themes";
?>
	
	<?php 
include_once "option_nav.php";
?>
Exemple #8
0
<?php

include_once "../../PeoplePods.php";
error_reporting(1);
$POD = new PeoplePod(array('lockdown' => 'adminUser', 'authSecret' => @$_COOKIE['pp_auth']));
if ($_POST) {
    // lets verify this shit before saving it!
    $newDb = $POD->connectToDatabase($_POST['mysql_server'], $_POST['mysql_user'], $_POST['mysql_pass'], $_POST['mysql_db']);
    if ($newDb) {
        $POD->setLibOptions('mysql_server', $_POST['mysql_server']);
        $POD->setLibOptions('mysql_user', $_POST['mysql_user']);
        $POD->setLibOptions('mysql_pass', $_POST['mysql_pass']);
        $POD->setLibOptions('mysql_db', $_POST['mysql_db']);
        $POD->saveLibOptions();
        if ($POD->success()) {
            $message = "Config updated.";
        } else {
            $message = $POD->error();
        }
    } else {
        $message = "Could not connect to the database specified!  Config not updated!";
    }
}
$POD->changeTheme('admin');
$POD->header();
$current_tab = "database";
include_once "option_nav.php";
if ($message) {
    ?>
	<div class="info">