<?php if (isset($_SESSION["user_id"]) AND $_GET["profile"]==$_SESSION["user_id"]) { echo "<form action=\"./index.php?profile=".intval($_GET["profile"])."\" method=\"post\" enctype=\"multipart/form-data\">"; } ?>

<div class="ul-border">

<h2><?php echo LANG_REGISTRATION_DATA; ?></h2>

<ul class="forum">

<li><span class="profile-li-left"><strong><?php echo LANG_USERNAME; ?>:</strong></span>
<span class="profile-li-right"><?php if (isset($_SESSION["user_id"]) AND $_GET["profile"]==$_SESSION["user_id"]): ?><input type="text" name="login" style="width: 300px;" value="<?php echo $profile->get("login"); ?>" /><?php else: echo $profile->get("login"); endif; ?></span>
<span class="float-ending"><!-- --></span></li>

<li><span class="profile-li-left"><strong><?php echo LANG_REGISTRATION_DATE; ?>:</strong></span>
<span class="profile-li-right"><?php echo date("j. n. Y", $profile->get("regdate")); ?></span>
<span class="float-ending"><!-- --></span></li>

<li><span class="profile-li-left"><strong><?php echo LANG_MY_TOPICS; ?>:</strong></span>
<span class="profile-li-right"><?php echo $profile->stats("kboard_topics"); ?></span>
<span class="float-ending"><!-- --></span></li>

<li><span class="profile-li-left"><strong><?php echo LANG_MY_POSTS; ?>:</strong></span>
<span class="profile-li-right"><?php echo $profile->stats("kboard_posts"); ?></span>
<span class="float-ending"><!-- --></span></li>

<?php if (isset($_SESSION["user_id"]) AND $_GET["profile"]==$_SESSION["user_id"]): ?><li><span class="profile-li-left"><strong><?php echo LANG_MAIL_MESSAGES; ?>:</strong></span>
<span class="profile-li-right"><input type="radio" name="mail_messages" value="1"<?php if ($profile->get("mail_messages")==1) { echo " checked=\"checked\""; } ?> /> <?php echo LANG_YES; ?> <input type="radio" name="mail_messages" value="0"<?php if ($profile->get("mail_messages")==0) { echo " checked=\"checked\""; } ?> /> <?php echo LANG_NO; ?></span>
<span class="float-ending"><!-- --></span></li><?php endif; ?>

</ul>

</div>

<div class="ul-bottom-corners"><!-- --></div>

<div class="ul-border">

<h2><?php echo LANG_ABOUT_USER; ?></h2>

<ul class="forum">

<li><span class="profile-li-left"><strong><?php echo LANG_LAST_VISIT; ?>:</strong></span>
<span class="profile-li-right"><?php echo date("j. n. Y", $profile->get("lastvisit")); ?></span>
<span class="float-ending"><!-- --></span></li>

<?php if (isset($_SESSION["user_id"]) AND $_GET["profile"]==$_SESSION["user_id"] OR $profile->get("realname")!=""): ?><li><span class="profile-li-left"><strong><?php echo LANG_REAL_NAME; ?>:</strong></span>
<span class="profile-li-right"><?php if (isset($_SESSION["user_id"]) AND $_GET["profile"]==$_SESSION["user_id"]): ?><input type="text" name="realname" style="width: 300px;" value="<?php echo $profile->get("realname"); ?>" /><?php else: echo $profile->get("realname"); endif; ?></span>
<span class="float-ending"><!-- --></span></li><?php endif; ?>

<?php if (isset($_SESSION["user_id"]) AND $_GET["profile"]==$_SESSION["user_id"] OR $profile->get("age")!=""): ?><li><span class="profile-li-left"><strong><?php echo LANG_AGE; ?>:</strong></span>
<span class="profile-li-right"><?php if (isset($_SESSION["user_id"]) AND $_GET["profile"]==$_SESSION["user_id"]): ?><input type="text" name="age" style="width: 50px;" value="<?php echo $profile->get("age"); ?>" /><?php else: echo $profile->get("age"); endif; ?></span>
<span class="float-ending"><!-- --></span></li><?php endif; ?>

<li><span class="profile-li-left"><strong><?php echo LANG_RIGHTS; ?>:</strong></span>
<span class="profile-li-right"><?php if ($profile->get("rights")==0) { echo LANG_USER; } else { echo "admin "; $i2=1; while ($i2<=$profile->get("rights")) { $i2++; echo "&bull;"; } } ?></span>
<span class="float-ending"><!-- --></span></li>

<?php if (isset($_SESSION["user_id"]) AND $_GET["profile"]==$_SESSION["user_id"] OR $profile->get("about")!=""): ?><li><span class="profile-li-left"><strong><?php echo LANG_ABOUT_ME; ?>:</strong></span>
<span class="profile-li-right"><?php if (isset($_SESSION["user_id"]) AND $_GET["profile"]==$_SESSION["user_id"]): ?><textarea name="about" cols="" rows="" style="width: 300px; height: 100px;"><?php echo str_replace("<br />", "\r\n", $profile->get("about")); ?></textarea><?php else: echo $profile->get("about"); endif; ?></span>
<span class="float-ending"><!-- --></span></li><?php endif; ?>

<?php if (TABLE_USERS=="kboard_users"): ?><?php if (isset($_SESSION["user_id"]) AND $_GET["profile"]==$_SESSION["user_id"] OR $profile->get("sign")!=""): ?><li><span class="profile-li-left"><strong><?php echo LANG_SIGNATURE; ?>:</strong></span>
<span class="profile-li-right"><?php if (isset($_SESSION["user_id"]) AND $_GET["profile"]==$_SESSION["user_id"]): ?><textarea name="sign" cols="" rows="" style="width: 300px; height: 100px;"><?php echo str_replace("<br />", "\r\n", $profile->get("sign")); ?></textarea><?php else: echo $profile->get("sign"); endif; ?></span>
<span class="float-ending"><!-- --></span></li><?php endif; endif; ?>

<?php if (isset($_SESSION["user_id"]) AND $_GET["profile"]==$_SESSION["user_id"] OR $profile->get("avatar")!=""): ?><li><span class="profile-li-left"><strong><?php echo LANG_AVATAR; ?>:</strong></span>
<span class="profile-li-right"><?php if (isset($_SESSION["user_id"]) AND $_GET["profile"]==$_SESSION["user_id"]): if ($profile->get("avatar")!="") { echo "<img src=\"./avatars/".$_GET["profile"].".".$profile->get("avatar")."\" alt=\"Avatar\" /><br />"; } ?><input type="file" name="file" style="width: 300px;" /><?php if ($profile->get("avatar")!=""): ?> <input type="checkbox" name="delete_avatar" value="1" /> <?php echo LANG_DELETE; endif; ?><?php else: echo "<img src=\"./avatars/".$_GET["profile"].".".$profile->get("avatar")."\" alt=\"Avatar\" />"; endif; ?></span>
<span class="float-ending"><!-- --></span></li><?php endif; ?>

</ul>

</div>

<div class="ul-bottom-corners"><!-- --></div>

<div class="ul-border">

<h2><?php echo LANG_CONTACT; ?></h2>

<ul class="forum">

<?php if (isset($_SESSION["user_id"]) AND $_GET["profile"]==$_SESSION["user_id"]): ?>

<li><span class="profile-li-left"><strong><?php echo LANG_EMAIL; ?>:</strong></span>
<span class="profile-li-right"><input type="text" name="mail" style="width: 300px;" value="<?php echo $profile->get("mail"); ?>" /></span>
<span class="float-ending"><!-- --></span></li>

<li><span class="profile-li-left"><strong><?php echo LANG_JABBER; ?>:</strong></span>
<span class="profile-li-right"><input type="text" name="jabber" style="width: 300px;" value="<?php echo $profile->get("jabber"); ?>" /></span>
<span class="float-ending"><!-- --></span></li>

<li><span class="profile-li-left"><strong><?php echo LANG_MSN; ?>:</strong></span>
<span class="profile-li-right"><input type="text" name="msn" style="width: 300px;" value="<?php echo $profile->get("msn"); ?>" /></span>
<span class="float-ending"><!-- --></span></li>

<li><span class="profile-li-left"><strong><?php echo LANG_SKYPE; ?>:</strong></span>
<span class="profile-li-right"><input type="text" name="skype" style="width: 300px;" value="<?php echo $profile->get("skype"); ?>" /></span>
<span class="float-ending"><!-- --></span></li>

<?php else: ?>

<?php if ($profile->get("mail")!=""): ?><li><span class="profile-li-left"><strong><?php echo LANG_EMAIL; ?>:</strong></span>
<span class="profile-li-right"><?php echo $profile->safe_address($profile->get("mail")); ?></span>
<span class="float-ending"><!-- --></span></li><?php endif; ?>

<?php if ($profile->get("jabber")!=""): ?><li><span class="profile-li-left"><strong><?php echo LANG_JABBER; ?>:</strong></span>
<span class="profile-li-right"><?php echo $profile->safe_address($profile->get("jabber")); ?></span>
<span class="float-ending"><!-- --></span></li><?php endif; ?>

<?php if ($profile->get("msn")!=""): ?><li><span class="profile-li-left"><strong><?php echo LANG_MSN; ?>:</strong></span>
<span class="profile-li-right"><?php echo $profile->safe_address($profile->get("msn")); ?></span>
<span class="float-ending"><!-- --></span></li><?php endif; ?>

<?php if ($profile->get("skype")!=""): ?><li><span class="profile-li-left"><strong><?php echo LANG_SKYPE; ?>:</strong></span>
<span class="profile-li-right"><?php echo $profile->get("skype"); ?></span>
<span class="float-ending"><!-- --></span></li><?php endif; ?>

<?php if ($profile->get("mail")=="" AND $profile->get("jabber")=="" AND $profile->get("msn")=="" AND $profile->get("skype")==""): ?><li class="align-center">-</li><?php endif; ?>

<?php endif; ?>

</ul>

</div>

<div class="ul-bottom-corners"><!-- --></div>

<?php if (isset($_SESSION["user_id"]) AND $_GET["profile"]==$_SESSION["user_id"]): ?>

<div class="ul-border">

<h2><?php echo LANG_CHANGE_OF_PASSWORD; ?></h2>

<ul class="forum">

<li><span class="profile-li-left"><strong><?php echo LANG_OLD_PASSWORD; ?>:</strong></span>
<span class="profile-li-right"><input type="password" name="old_password" style="width: 300px;" /></span>
<span class="float-ending"><!-- --></span></li>

<li><span class="profile-li-left"><strong><?php echo LANG_NEW_PASSWORD; ?>:</strong></span>
<span class="profile-li-right"><input type="password" name="new_password" style="width: 300px;" /></span>
<span class="float-ending"><!-- --></span></li>

</ul>

</div>

<div class="ul-bottom-corners"><!-- --></div>

<?php endif; ?>

<?php if (isset($_SESSION["user_id"]) AND $_GET["profile"]==$_SESSION["user_id"]): ?>

<div class="buttons"><input type="submit" name="submit" value="<?php echo LANG_SAVE_CHANGES; ?>" class="button" /></div>

</form>

<?php endif; ?>