// Require login require_once 'plc_login.php'; // Get session and API handles require_once 'plc_session.php'; global $plc, $api; // Common functions require_once 'plc_functions.php'; // find person roles $_person= $plc->person; $_roles= $_person['role_ids']; $is_submitted= isset($_POST['submitted']) ? $_POST['submitted'] : 0; // show details for the current user. if( isset($_GET['id']) && is_numeric($_GET['id']) ) { $person_id= intval($_GET['id']); } else { plc_redirect (l_sites()); } $errors= array(); if( $is_submitted ) { } else { // get details for the user $person_details= $api->GetPersons( array( intval( $person_id ) ), array( "person_id", "first_name", "last_name", "title", "email", "phone", "url", "bio" ) ); if ( $person_details === NULL ) { $errors[] = $api->error(); } else { $person_detail= $person_details[0]; $first_name= $person_detail['first_name']; $last_name= $person_detail['last_name']; $title= $person_detail['title']; $email= $person_detail['email']; $phone= $person_detail['phone']; $url= $person_detail['url']; $bio= $person_detail['bio']; } } // Print header require_once 'plc_drupal.php'; drupal_set_title('Update Person'); include 'plc_header.php'; ?>
The following errors occured:" );
print( "\n" );
foreach( $errors as $err )
{
print( "
\n" );
}
?>