<?php
/*-------------------------------------------------------+
| <span style="border-bottom: 1px dotted black;">PHP</span>-Fusion Content Management System
| Copyright (C) 2002 - 2011 Nick Jones
| <a href='http://www.php-fusion.co.uk/' target='_blank'><span style='color:005C5B'>http://www.php-fusion.co.uk/</span></a>
+--------------------------------------------------------+
| Filename: user_info_panel.php
| Author: HaYaLeT | web:hayaletsevgili.com
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at <a href='http://www.gnu.org/licenses/agpl.html.' target='_blank'><span style='color:005C5B'>www.gnu.org/licenses/agpl.html.</span></a> Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }
global $locale, $userdata, $aidlink;
add_to_head("<link rel='stylesheet' type='text/css' href=' ".INFUSIONS."user_info_panel/uinfo.css' />");
if (iMEMBER) {
$msg_count = dbcount("(message_id)", DB_MESSAGES, "message_to='".$userdata['user_id']."' AND message_read='0' AND message_folder='0'");
openside($userdata['user_name']);
if ($userdata['user_avatar'] != "") {
echo "<table cellpadding='0' cellspacing='0' align='center' style='background:url(".INFUSIONS."user_info_panel/images/avbg.png) no-repeat transparent; width:180px; height:150px'>\n<tr>\n";
echo "<td align='center'>";
echo "<img style='width:100px; height:100px; alt='Avatar' src='".IMAGES."avatars/".$userdata['user_avatar']."'>";
echo "</td>\n</tr>\n</table>\n"; }
else {
echo "<table cellpadding='0' cellspacing='0' align='center' style='background:url(".INFUSIONS."user_info_panel/images/avbg.png) no-repeat transparent; width:180px; height: 150px;'>\n<tr>\n";
echo "<td align='center'>";
echo "<a title='No Avatar' href='".BASEDIR."edit_profile.php'><img style='border: 0; width:136px; height: 104px;' alt='No Avatar' src='".INFUSIONS."user_info_panel/images/noav.png'></a><br />";
echo "</td>\n</tr>\n</table>\n"; }
echo "<table cellpadding='0' cellspacing='0' align='center' style='width:180px; height: 64px;'>\n<tr>\n";
echo "<td align='center'>";
echo "<a href='".BASEDIR."edit_profile.php'><img src='".INFUSIONS."user_info_panel/images/1.png' style='border:0; width:38px;' alt='".$locale['global_120']."' title='".$locale['global_120']."' /></a>\n";
echo "<a href='".BASEDIR."messages.php'><img src='".INFUSIONS."user_info_panel/images/2.png' style='border:0; width:38px;' alt='".$locale['global_121']."' title='".$locale['global_121']."' /></a>\n";
echo "<a href='".BASEDIR."members.php'><img src='".INFUSIONS."user_info_panel/images/3.png' style='border:0; width:38px;' alt='".$locale['global_122']."' title='".$locale['global_122']."' /></a>\n";
echo "<a href='".BASEDIR."setuser.php?logout=yes'><img src='".INFUSIONS."user_info_panel/images/4.png' style='border:0; width:38px;' alt='".$locale['global_124']."' title='".$locale['global_124']."' /></a>\n<br />";
echo "</td>";
echo "</tr>\n</table>\n";
if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C")) {
echo "<table cellpadding='0' cellspacing='0' align='center' style='background:url(".INFUSIONS."user_info_panel/images/adbg.png) no-repeat transparent; width:180px; height: 40px;'>\n<tr>\n";
echo "<td align='center'>";
echo "<a class='adminlink' style='display:block;' href='".ADMIN."index.php".$aidlink."'>".$locale['global_123']."</a>";
echo "</td>";
echo "</tr>\n</table>\n"; }
if ($msg_count) {
echo "<div style='text-align:center;margin-top:4px;'>\n";
echo "<strong><a href='".BASEDIR."messages.php' class='side'>".sprintf($locale['global_125'], $msg_count);
echo ($msg_count == 1 ? $locale['global_126'] : $locale['global_127'])."</a></strong>\n";
echo "</div>\n"; }
if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C")) {
$subm_count = dbcount("(submit_id)", DB_SUBMISSIONS);
if ($subm_count) {
echo "<div style='text-align:center;margin-top:4px;'>\n";
echo "<strong><a href='".ADMIN."submissions.php".$aidlink."' class='adminlink'>".sprintf($locale['global_125'], $subm_count);
echo ($subm_count == 1 ? $locale['global_128'] : $locale['global_129'])."</a></strong>\n";
echo "</div>\n"; } }
closeside(); }
else {
if (!preg_match('/login.php/i',FUSION_SELF)) {
$action_url = FUSION_SELF.(FUSION_QUERY ? "?".FUSION_QUERY : "");
if (isset($_GET['redirect']) && strstr($_GET['redirect'], "/")) {
$action_url = cleanurl(urldecode($_GET['redirect'])); }
openside($locale['global_100']);
echo "<div style='text-align:center'>\n";
echo "<form name='loginform' method='post' action='".$action_url."'>\n";
echo "<table cellpadding='0' cellspacing='0' align='center'>\n";
echo "<tr><td align='center'> </td>\n</tr>\n";
echo "<tr><td class='tblbox' align='center'><input type='text' value='".$locale['global_101']."' onblur=\"if(this.value=='') this.value='".$locale['global_101']."'\" onfocus=\"this.value=''\" name='user_name' class='logbox' /></td>\n</tr>\n";
echo "<tr><td align='center'> </td>\n</tr>\n";
echo "<tr><td class='tblbox' align='center'><input type='password' value='".$locale['global_102']."' onblur=\"if(this.value=='') this.value='".$locale['global_102']."'\" onfocus=\"this.value=''\" name='user_pass' class='logbox' /></td>\n</tr>\n";
echo "<tr><td>";
echo "<label><input type='checkbox' name='remember_me' value='y' title='".$locale['global_103']."' style='vertical-align:middle;' /></label>\n";
echo "<input type='submit' name='login' value='".$locale['global_104']."' class='button' />\n";
echo "</td>\n</tr>\n</table>\n";
echo "</form>\n";
echo "</div>\n";
echo "<table cellpadding='0' cellspacing='0' align='center' style='background:url(".INFUSIONS."user_info_panel/images/avbg.png) no-repeat transparent; width:180px; height: 150px;'>\n<tr>\n";
echo "<td align='center'>";
if ($settings['enable_registration']) {
echo "<table cellpadding='0' cellspacing='0' align='center' style='background:url(".INFUSIONS."user_info_panel/images/regbg.png) no-repeat transparent; width:130px; height: 40px;'>\n<tr>\n";
echo "<td align='center'>";
echo "<a class='adminlink' style='display:block;' href='".BASEDIR."register.php' title='' > ".$locale['global_107']."\n</a>\n";
echo "</td>\n";
echo "</tr>\n</table>\n"; }
echo "<table cellpadding='0' cellspacing='0' align='center' style='background:url(".INFUSIONS."user_info_panel/images/regbg.png) no-repeat transparent; width:130px; height: 40px;'>\n<tr>\n";
echo "<td align='center'>";
echo "<a class='adminlink' style='display:block;' href='".BASEDIR."lostpassword.php' title='' >".$locale['global_108']."\n</a>\n";
echo "</td>";
echo "</tr>\n</table>\n";
echo "</td>";
echo "</tr>\n</table>\n";
echo "<table cellpadding='0' cellspacing='0' align='center' style='width:130px; height: 4px;'>\n<tr>\n";
echo "<td align='center'><a class='authlink' href='http://www.hayaletsevgili.com' title='hayaletsevgili.com'>©</a>\n</td>\n";
echo "</tr>\n</table>\n";
closeside();
}
}
?>