<?php
session_start();
require_once("inc.php");
require_once("db.php");
$tpl->caching = 0;
if(!isset($_SESSION['address']))
die("You should be signed in to continue... Click to <a href=\"{$home_url}/signin.php\">sign in");
if(isset($_GET['page'])&&$_GET['page']!=$_SESSION['address']) {
die("Sorry, this is not your page. <a href=\"dashboard.php\">Click</a> to continue editing your own page or <a href=\"{$home_url}/{$_GET['page']}\">go back</a>.");
}
$addr = mysql_real_escape_string($_SESSION['address']);
$sql = "SELECT `namesurname` FROM login WHERE `addr`='".$addr."';";
$namesurname= $db->getOne($sql);
if(PEAR::isError($namesurname)) {
die("Error!");
}
/**
* Get the visits info
*/
$sql = "SELECT COUNT(DISTINCT ip) FROM iplog WHERE addr='{$addr}';";
$visits = $db->getOne($sql);
ob_start();
?>
<div id="updates" align="center">
<a href="http://openhuman.org/<?=$addr?>"><img src="http://openhuman.org/img_imoh_off.php?p=<?=$addr?>" width="104" height="148" alt="OpenHuman" border="0" onmouseover="this.src='http://openhuman.org/img_imoh_on.php?p=<?=$addr?>'" onmouseout="this.src='http://openhuman.org/img_imoh_off.php?p=<?=$addr?>'" /></a>
<br />
<small>Add this to ur Blog, MySpace; just <u><b>copy/paste code below</b></u></small>
<br />
<textarea style="width:180px;height:45px;">
<a href="http://openhuman.org/<?=$addr?>"><img src="http://openhuman.org/img_imoh_off.php?p=<?=$addr?>" width="104" height="148" alt="OpenHuman" border="0" onmouseover="this.src='http://openhuman.org/img_imoh_on.php?p=<?=$addr?>'" onmouseout="this.src='http://openhuman.org/img_imoh_off.php?p=<?=$addr?>'" /></a>
</textarea>
</div>
<p><font face="Arial Black" size="4">Welcome back <?=$namesurname?>,</font></p>
<p>Number of unique visitors: <?=$visits?></p>
<p>
<ul>
<li><a href="<?= $home_url; ?>/<?=$_SESSION['address']?>">Visit your page</a></li>
<li><a href="changename.php">Change Your Visible Name</a></li>
<li><a href="editfacts.php">Edit Your Facts</a><!-- (<a href="addfact.php">Add Fact</a> · <a href="removefacts.php">Remove Facts</a> · <a href="updatefactweights.php">Set Fact Listing Order</a>)--></li>
<li><a href="factshistory.php">Facts History</a></li>
<li>Edit Your Pictures (<a href="addpicture.php">Add Picture</a> · <a href="removepictures.php">Remove Pictures</a> · <a href="updatepictureweights.php">Set Picture Listing Order</a>)</li>
<li><a href="setopenness.php">Set Your Openness Level</a></li>
<li><a href="looknfeel.php">Change Look'n Feel</a></li>
<li><a href="messagebox.php"><b>Message Box</b></a></li>
<li><a href="spreadtheword.php"><b>Spread the Word</b></a></li>
<li><a href="signout.php">Sign Out</a></li>
</ul>
</p>
<?php
$content = ob_get_contents();
ob_end_clean();
$tpl->assign("content", $content);
//$tpl->display("static.tpl", "{$_SESSION['address']}|dashboard");
$tpl->display("static.tpl");
?>