<?php
/*-------------------------------------------------------+
| PHP-Fusion Content Management System
| Copyright (C) 2002 - 2013 Nick Jones
| http://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: user_info.php
| Author: Nick Jones (Digitanium)
| Modified by: JoiNNN
+--------------------------------------------------------+
| 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 http://www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
if (!defined("IN_FUSION")) { die("Access Denied"); }
if (iMEMBER) {
global $userdata;
$msg_count = dbcount("(message_id)", DB_MESSAGES, "message_to='".$userdata['user_id']."' AND message_read='0' AND message_folder='0'");
echo "<a href='".BASEDIR."profile.php?lookup=".$userdata['user_id']."'><span class='user-avatar flleft'>\n";
if ($userdata['user_avatar'] && file_exists(IMAGES."avatars/".$userdata['user_avatar'])) {
echo "<img src='".IMAGES."avatars/".$userdata['user_avatar']."' width='30' height='30' alt='Avatar' />\n";
} else {
echo "<img src='".IMAGES."avatars/noavatar50.png' width='30' height='30' alt='Avatar' />\n";
}
echo "</span></a><div class='memberinfo flleft'>\n";
echo "<strong>".$userdata['user_name']."</strong><br />";
echo "<div class='memberlinks flright'>";
//Edit profile
echo "<a href='".BASEDIR."edit_profile.php' class='side editprofile'>".$locale['global_120']."</a> | \n";
//Messages
echo "<a href='".BASEDIR."messages.php' class='side pm'>".$locale['global_121']." </a>";
if ($msg_count != 0) {
echo "<span class='msg'>".$msg_count."</span>\n";
}
echo " | \n";
//Submissions
if (iADMIN && checkrights("SU") && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C")) {
$subm_count = dbcount("(submit_id)", DB_SUBMISSIONS);
if ($subm_count) {
echo "<a href='".ADMIN."submissions.php".$aidlink."' class='side'>".$locale['global_129']."</a> <span class='subs'>".$subm_count."</span> | \n";
}
}
echo "<a href='".BASEDIR."members.php' class='side members'>".$locale['global_122']."</a> | \n";
//Admin panel
if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C")) {
echo "<a href='".ADMIN."index.php".$aidlink."' class='side adminpanel'>".$locale['global_123']."</a> | \n";
}
//Logout
echo "<a href='".BASEDIR."index.php?logout=yes' class='side logout'>".$locale['global_124']."</a></div></div>\n";
} else {
$action_url = FUSION_SELF.(FUSION_QUERY ? "?".FUSION_QUERY : "");
if (isset($_GET['redirect']) && strstr($_GET['redirect'], "/")) {
$action_url = cleanurl(urldecode($_GET['redirect']));
}
echo "<div class='loginform flright'>\n";
echo "<form name='loginform' method='post' action='".$action_url."'>\n";
echo "<input type='text' name='user_name' class='textbox user' style='width:130px' />\n";
echo "<input type='password' name='user_pass' class='textbox pass' style='width:130px' />\n";
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";
if ($settings['enable_registration']) {
echo " <a href='".BASEDIR."register.php'><input type='button' value='".$locale['global_107']."' class='button'/></a>\n";
}
echo "</form>\n";
echo "</div>";
}
BRAK STOPKI = BRAK POMOCY NA SUPPORCIE.PRZECZYTAJ:
Regulamin Supportu Nie pomagam na PW!!!
|