예제 #1
0
<?php

// vim:set ts=4 sw=4 sts=4 et:
require_once "config.php";
require_once "html.php";
require_once "db-func.php";
require_once "utils.php";
// Redirect to the login page, if not logged in
isLoggedIn();
// Start HTML
head("people");
$people = getPeople();
if (!$people) {
    echo "<strong>No people to list!</strong>";
}
foreach ($people as $p) {
    printPerson($p);
}
// End HTML
foot();
<?php

include '../header.php';
include '../includes/prettyprint.php';
// First we make a request to the API for the current user's person and save the response
$response = $client->familytree()->readPersonForCurrentUser();
// Check for errors
if ($response->hasError()) {
    handleErrors($response);
} else {
    // Then we get the person from the response
    $person = $response->getPerson();
    // Display the person's information
    printPerson($person);
}
include '../footer.php';
예제 #3
0
        echo '<div class="errormsg">Incorrect Old Password</div>';
    } else {
        if ($passwd == 'invalid') {
            echo '<div class="errormsg">Invalid New Password</div>';
        } else {
            if ($passwd == 'short') {
                echo '<div class="errormsg">Password Must Be At Least 6 Characters</div>';
            } else {
                if ($passwd == 'error') {
                    echo '<div class="errormsg">An Error Occurred While Changing Password</div>';
                }
            }
        }
    }
}
printPerson(getPerson($uid));
?>
    <p class="pad-bottom"><a href="<?php 
echo URL;
?>
/edit-account.php">Edit your information</a></p>
    <script type="text/javascript">
    //<![CDATA[
    function validate(f) {
        if (f.oldpass.value == "") {
            alert("You must enter your password.");
            return false;
        } else if (f.pass1.value == "") {
            alert("You must enter a new password.");
            return false;
        } else if (f.pass2.value == "") {