
<?php
/*---------------------------------------------------+
| PHP-Fusion 6 Content Management System
+----------------------------------------------------+
| Copyright © 2002 - 2005 Nick Jones
| http://www.php-fusion.co.uk/
+----------------------------------------------------+
| Released under the terms & conditions of v2 of the
| GNU General Public License. For details refer to
| the included gpl.txt file or visit http://gnu.org
+----------------------------------------------------*/
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }

if (iMEMBER) {
	openside($userdata['user_name']);
                
              
	$msg_count = dbcount("(message_id)", "messages", "message_to='".$userdata['user_id']."' AND message_read='0'AND message_folder='0'");

if ($userdata['user_avatar'] != "") {
echo "<center><img border='0' alt='".$locale['on106']."' title='".$locale['on106']."' src='".BASEDIR."images/avatars/".$userdata['user_avatar']."'></center>\n";
} else {
echo "<center><img border='0' alt='".$locale['on107']."' title='".$locale['on107']."' src='".BASEDIR."images/no_avatar.gif'></center>\n";
}
    echo "<table align='center' width='100%' cellpadding='3' cellspacing='1' >";
    if ($msg_count) 
    {
      echo "<tr><td class='tbl2' colspan='3' align='center' valign='bottom'><a href='".BASEDIR."messages.php?folder=inbox'><img src='".INFUSIONS."user_info_panel/images/pn.png' alt='PN Inbox' border='0' style='padding:3px;'><br /><small><b>".sprintf($locale['global_125'], $msg_count).($msg_count == 1 ? $locale['global_126'] : $locale['global_127'])."</b></small></a></td></tr>";
    }
	
echo "<tr>
<td class='tbl1' colspan='4' align='center' valign='bottom'><small><b>Laikas: <span id=\"digitalclock\"></span></b></small></td>
</tr>";
		echo "<script type='text/javascript'>
		function calctime()
		{
		var currenttime = new Date();
		var hours = currenttime.getHours();
		var minutes = currenttime.getMinutes();
		var seconds = currenttime.getSeconds();
		if (hours == 0)
		{ hours = 12; }
		if (hours < 10)
		{ hours = \"0\" + hours; }
		if (minutes < 10)
		{ minutes = \"0\" + minutes; }
		if (seconds < 10)
		{ seconds = \"0\" + seconds; }
		var clocklocation = document.getElementById('digitalclock');
		clocklocation.innerHTML = hours + \":\" + minutes + \":\" + seconds;
		setTimeout(\"calctime()\", 1000);
		}
		calctime();
		</script>";
		
    echo "  <tr>
                <td class='tbl1' colspan='4' align='center' valign='bottom'><small><b>Tavo pasirinktis:</b></small></td>
              </tr>
	    <tr>
              <td class='tbl1' width='33%' align='center' valign='bottom'><a href='".BASEDIR."edit_profile.php'><img src='".INFUSIONS."user_info_panel/images/edit.png' alt='Redaguoti Profilį' border='0' style='padding:3px;'><br /><small>Redaguoti</small></a></td>
              <td class='tbl2' width='33%' align='center' valign='bottom'><a href='".BASEDIR."profile.php?lookup=".$userdata['user_id']."'><img src='".INFUSIONS."user_info_panel/images/profil.png' alt='?iūrėti Savo Profilį' border='0' style='padding:3px;'><br /><small>Profilis</small></a></td>
              <td class='tbl1' width='33%' align='center' valign='bottom'><a href='".BASEDIR."members.php'><img src='".INFUSIONS."user_info_panel/images/members.png' alt='?iūrėti Narių Sąra?ą' border='0' style='padding:3px;'><br /><small>Nariai</small></a></td>
            </tr>
            <tr>
              <td class='tbl2' width='33%' align='center' valign='bottom'><a href='".BASEDIR."messages.php?folder=inbox'><img src='".INFUSIONS."user_info_panel/images/pn_inbox.png' alt='Gautos ?inutės' border='0' style='padding:3px;'><br /><small>Gautos</small></a></td>
              <td class='tbl1' width='33%' align='center' valign='bottom'><a href='".BASEDIR."messages.php?folder=outbox'><img src='".INFUSIONS."user_info_panel/images/pn_outbox.png' alt='Ra?yti ?inutę' border='0' style='padding:3px;'><br /><small>Ra?yti</small></a></td>
              <td class='tbl2' width='33%' align='center' valign='bottom'><a href='".BASEDIR."setuser.php?logout=yes'><img src='".INFUSIONS."user_info_panel/images/logout.png' alt='Atsjungti' border='0' style='padding:3px;'><br /><small>Atsijungti</small></a></td>
            </tr>

          </table>";
    if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C")) {
      include LOCALE.LOCALESET."admin/main.php";
      tablebreak();
      echo "<table align='center' width='100%' cellpadding='3' cellspacing='1' >
              <tr>
                <td class='tbl1' colspan='4' align='center' valign='bottom'><small><b>Administracija</b></small></td>
              </tr>
              <tr>
                <td class='tbl1' width='25%' align='center' valign='bottom'><a href='".ADMIN."index.php".$aidlink."&pagenum=1' title='".$locale['ac01']."'><img src='".INFUSIONS."user_info_panel/images/admin_content.png' alt='Turinio' border='0' style='padding:3px;'></a></td>
                <td class='tbl2' width='25%' align='center' valign='bottom'><a href='".ADMIN."index.php".$aidlink."&pagenum=2' title='".$locale['ac02']."'><img src='".INFUSIONS."user_info_panel/images/admin_user.png' alt='Narių' border='0' style='padding:3px;'></a></td>
                <td class='tbl1' width='25%' align='center' valign='bottom'><a href='".ADMIN."index.php".$aidlink."&pagenum=3' title='".$locale['ac03']."'><img src='".INFUSIONS."user_info_panel/images/admin_main.png' alt='Sistemos' border='0' style='padding:3px;'></a></td>
                <td class='tbl2' width='25%' align='center' valign='bottom'><a href='".ADMIN."index.php".$aidlink."&pagenum=4' title='".$locale['ac04']."'><img src='".INFUSIONS."user_info_panel/images/admin_infusion.png' alt='Modifikacijos' border='0' style='padding:3px;'></a></td>
              </tr>
			  <tr>
			  </tr>
            </table>";
}
          
} else {
	openside($locale['060']);
	echo "<div align='center'>".(isset($loginerror) ? $loginerror : "")."
<form name='loginform' method='post' action='".FUSION_SELF."'>
".$locale['061']."<br>
<input type='text' name='user_name' class='textbox' style='width:100px'><br>
".$locale['062']."<br>
<input type='password' name='user_pass' class='textbox' style='width:100px'><br>
<input type='checkbox' name='remember_me' value='y' title='".$locale['063']."' style='vertical-align:middle;'>
<input type='submit' name='login' value='".$locale['064']."' class='button'><br>
</form>
<br>\n";
	if ($settings['enable_registration']) {
		echo "".$locale['065']."<br><br>\n";
	}
	echo $locale['066']."
</div>\n";
}
closeside();
?>
