vBulletin Modifications

userstat ploblem

Welcome to vBHackers.com! - vBHackers Updates:

Go Back   vBulletin Modifications > General vBulletin Section > General vBulletin Support

Closed Thread
 
LinkBack Thread Tools
Old 05-15-2007, 06:14 PM   #1
Junior Member
Join Date: Feb 2006
leet is on a distinguished road

Default userstat ploblem

hello guys, i have a little problem :| , and im looking for help, tcl and php file works very good, only teamname is wrong, because it appears IND for all users
[FxP Team: iND]

PHP:
Quote:
<?php
error_reporting(7);
define ('LF', "\n");
$server="localhost";
$dbuser="user";
$dbpass="vb";
$db="user1";
$link = mysql_pconnect($server,$dbuser,$dbpass);
$username=$_GET["username"];
if ($link)
{
$db_selected = mysql_select_db($db, $link);
$user=mysql_query("SELECT * FROM user WHERE username='".addslashes(htmlspecialchars($username) )."'");
$user=mysql_fetch_array($user);
if ($user['userid'])
{
#$team = mysql_query("SELECT * FROM team WHERE teamid='$user[userid]'");
#$teaminfo=mysql_fetch_array($team);
if ($teaminfo['name'] !='') {
$team = $teaminfo['name'];
} else {
$team = "iND";
}
echo

LF, $user[username],
LF, $team,
LF, $user[posts],
LF, $user[pubs],
LF, $user[hacks],
LF, $user[scans],
LF, $user[races],
LF, $user[mirror],
LF, $user[leeches],
LF, $user[credits];
}
} else {
echo LF, mysql_error($conn);
}
?>
TCL:
Quote:
set url "http://vbsite/userstat.php"
set agent "Mozilla"
package require http
bind pub "-|-" !user stat

proc stat { nick host handle channel text } {
global chan url agent
putlog "$text"
if {$text != ""} {
set query "$url?username=$text"
set page [http::config -useragent $agent]
set page [http::geturl $query]


set lines [split [::http::data $page] \n]
set nick [lindex $lines 1]
set teams [lindex $lines 2]
set post [lindex $lines 3]
set pub [lindex $lines 4]
set hacks [lindex $lines 5]
set scan [lindex $lines 6]
set race [lindex $lines 7]
set mirror [lindex $lines 8]
set leeches [lindex $lines 9]
set credits [lindex $lines 10]

upvar #0 $page state
set max 0

if {$nick != ""} {
putquick "PRIVMSG $channel :\002\0037Forum User Stats For:\003 $nick ";
putquick "PRIVMSG $channel :\0037\002\[\0037FxP Team: \003$teams\0037\002\]";
putquick "PRIVMSG $channel :\0037\002\[\0037Posts:\003 $post\0037\002\]";
putquick "PRIVMSG $channel :\0037\002\[\0037Filled:\003 $pub\0037\002\]";
putquick "PRIVMSG $channel :\0037\002\[\0037Hacks:\003 $hacks\0037\002\]";
putquick "PRIVMSG $channel :\0037\002\[\0037Scans:\003 $scan\0037\002\]";
putquick "PRIVMSG $channel :\0037\002\[\0037Races:\003 $race\0037\002\]";
putquick "PRIVMSG $channel :\0037\002\[\0037Mirrors:\003 $mirror\0037\002\]";
putquick "PRIVMSG $channel :\0037\002\[\0037Leeched:\003 $leeches\0037\002\]";
putquick "PRIVMSG $channel :\0037\002\[\0037Credits:\003 $credits\0037\002\]"
} else {
putquick "PRIVMSG $channel :\0037\002\[ No User Found \002\]"
}
http::cleanup $page
} else {
putquick "PRIVMSG $channel :!user <Username>: Get User Stats."
}
}
someone check it out and please fix my problem.

regards.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Old 05-19-2007, 05:37 PM   #2
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

This site doesn't support FXP.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 05-19-2007, 08:04 PM   #3
Michael Biddle
Administrator
Michael Biddle's Avatar
Join Date: Feb 2005
Real Name: Michael Biddle
Location: Anaheim
Michael Biddle is on a distinguished road

Default

Thread Closed
__________________
Support will ONLY be offered through forums


Michael Biddle / vBHackers.com
vBSEO 3.1 GOLD Released vB Blogs Compatible | Non-Encrypted | Branding Removal Option | Sitemaps 2.1 | Language Packs

Crawlability Network: vBulletin SEO | vBulletin Hackers
Affiliates: vBulletinSetup
Are you interested in a Recipe mod for vBulletin
Free Modifications: Latest X Posts on Forumhome | Default Signature | Default Signature Per Usergroup




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -3. The time now is 09:21 PM.


SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc. (Patent Pending)