Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Reikalinga pagalba kuo skubau.

Parašė Narysx· 2010 Spa. 25 19:10:51
#8


<?php
 
/*-------------------------------------------------------+
 
| <span style="border-bottom: 1px dotted black;">PHP</span>-Fusion Content Management System
 
| Copyright (C) 2002 - 2008 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: Nick Jones (Digitanium)
 
+--------------------------------------------------------+
 
| 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"); }
 
 
 
if (iMEMBER) {
 
	openside($userdata['user_name']);
 
	$msg_count = dbcount("(message_id)", DB_MESSAGES, "message_to='".$userdata['user_id']."' AND message_read='0'AND message_folder='0'");
 
	echo THEME_BULLET." <a href='".BASEDIR."edit_profile.php' class='side'>".$locale['global_120']."</a><br />\n";
 
	echo THEME_BULLET." <a href='".BASEDIR."messages.php' class='side'>".$locale['global_121']."</a><br />\n";
 
	echo THEME_BULLET." <a href='".BASEDIR."members.php' class='side'>".$locale['global_122']."</a><br />\n";
 
	if (iADMIN && (iUSER_RIGHTS != "" || iUSER_RIGHTS != "C")) {
 
		echo THEME_BULLET." <a href='".ADMIN."index.php".$aidlink."' class='side'>".$locale['global_123']."</a><br />\n";
 
	}
 
	echo THEME_BULLET." <a href='".BASEDIR."setuser.php?logout=yes' class='side'>".$locale['global_124']."</a>\n";
 
 
 
	/////buddies
 
	if (file_exists(INFUSIONS."buddys_system/locale/".$settings['locale'].".php")) {
 
	include INFUSIONS."buddys_system/locale/".$settings['locale'].".php";
 
} else {
 
	include INFUSIONS."buddys_system/locale/English.php";
 
}
 
$result = dbquery("SELECT * FROM ".DB_PREFIX."buddys
 
WHERE buddy_to = ".$userdata['user_id']." AND buddy_status != 0 AND buddy_status !=2");
 
 
 
$i = 0;
 
while($data = dbarray($result)){
 
$result_check = dbquery("SELECT * FROM ".DB_PREFIX."buddys
 
WHERE buddy_to = ".$data['buddy_from']." AND buddy_from = ".$userdata['user_id'].""); 
 
$data_check = dbarray($result_check);
 
if ($data_check['buddy_id'] != true) {
 
$i = $i+1; 
 
}} if ($i > 0) {$i = "<font color='red'>$i</font>";}
 
 
 
 
 
echo "<center><img src='".BASEDIR."images/ven.png' alt='' /> <a href='".INFUSIONS."buddys_system/buddys.php' class='side'>".$locale['mf07']."</a> ($i)</center><hr />";
 
 
 
$lastseen=time()-120; // 120 sek.
 
 
 
echo"<table border='0' cellpadding='0' cellspacing='1' width='100%'>\n";
 
$result=dbquery("SELECT * FROM ".DB_PREFIX."users WHERE user_lastvisit >=".$lastseen."");
 
 
 
while($data = dbarray($result)) {
 
 
 
$result_from=dbquery("SELECT * FROM ".DB_PREFIX."buddys WHERE
 
buddy_from = ".$userdata['user_id']." AND buddy_to = ".$data['user_id']."");
 
$data_from = dbarray($result_from);
 
 
 
$result_to=dbquery("SELECT * FROM ".DB_PREFIX."buddys WHERE
 
buddy_to = ".$userdata['user_id']." AND buddy_from = ".$data['user_id']."");
 
$data_to = dbarray($result_to);
 
 
 
if($data_to['buddy_id'] != "" AND $data_from['buddy_id'] != ""){
 
 
 
$bild = "<img src='".INFUSIONS."buddys_panel/images/mail.gif' border='0'>";
 
$datum = strftime("Sidst aktiv: Kl. %H:%M:%S ", $data['user_lastvisit']);
 
 
 
echo "<tr>
 
<td><a href='".BASEDIR."messages.php?msg_send=".$data['user_id']."' target='_parent'>$bild</a> <a href='".BASEDIR."profile.php?lookup=".$data['user_id']."' target='_parent' title='$datum'>".$data['user_name']."</a></td>
 
</tr>";
 
 
 
}
 
 
 
}
 
echo"</table>\n";
 
////buddies
 
 
 
 
 
	if ($msg_count) { echo "<br /><br /><div style='text-align:center'><strong><a href='".BASEDIR."messages.php' class='side'>".sprintf($locale['global_125'], $msg_count).($msg_count == 1 ? $locale['global_126'] : $locale['global_127'])."</a></strong></div>\n"; }
 
} else {
 
	openside($locale['global_100']);
 
	echo "<div style='text-align:center'>\n";
 
	echo "<form name='loginform' method='post' action='".FUSION_SELF."'>\n";
 
	echo $locale['global_101']."<br />\n<input type='text' name='user_name' class='textbox' style='width:100px' /><br />\n";
 
	echo $locale['global_102']."<br />\n<input type='password' name='user_pass' class='textbox' style='width:100px' /><br />\n";
 
	echo "<input type='checkbox' name='remember_me' value='y' title='".$locale['global_103']."' style='vertical-align:middle;' />\n";
 
	echo "<input type='submit' name='login' value='".$locale['global_104']."' class='button' /><br />\n";
 
	echo "</form>\n<br />\n";
 
	if ($settings['enable_registration']) {
 
		echo "".$locale['global_105']."<br /><br />\n";
 
	}
 
	echo $locale['global_106']."\n</div>\n";
 
}
 
closeside();
 
?>


Dėl tų avatarų, tai pasiredaguok register.php, kad automatiškai iškart su avataru sukurtų vartotoją.