<?php
require_once('besocial/besocial.php');
session_start();
#$socialize = new Socialize("http://chadok.info/~oschwand/");
$socialize = new Socialize("http://oschwand.myopenid.com");

?>
<!DOCTYPE html>
<html>
  <head>
    <title>Socialized web page</title>
  </head>
  <body>
  <h1>Your name</h1>
<?php $socialize->loginbox() ?>
<?php $socialize->logoutbox() ?>
<?php $socialize->messages() ?>

<?php
if ($socialize->visitor()) {
  $visitor = $socialize->visitor();
?>
  <p>You are succesfully authenticated with the following informations:</p>
    Identity: <?php print $visitor['identity'] ?><br />
    Email:    <?php print $visitor['email'] ?><br />
    Nickname: <?php print $visitor['nickname'] ?><br />
    Fullname: <?php print $visitor['fullname'] ?><br />
<?php
    }
?>

<?php $socialize->friends() ?>
<?php $socialize->addfriendbox() ?>

<?php if ($socialize->owner()) { ?>
  <p>This a private information, only for the owner of this site.</p>
<?php } ?>

<?php if ($socialize->friend()) { ?>
  <p>This a semi-public information, only for the friends of the owner of this site.</p>
<?php } ?>

<?php $socialize->log() ?>

  </body>
</html>

