irc passkey

Started by Fire-Fox, July 02, 2011, 04:20:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Fire-Fox

#3
Almost got it working, now i just need a else if a users dosn't have a passkey that i need help with

//START IRC Passkey
if ($user['class'] >= UC_STAFF || $CURUSER['class'] >= UC_USER) {
$HTMLOUT .= "<tr><td class='rowhead'>IRC Passkey</td><td align='left'> ".$CURUSER['passkey']."</td></tr>";
}
//END IRC Passkey

Mindless

#2
So wheres $passkey defined ? Why are you selecting all from users when SELECT passkey is all ye need.

WHERE passkey = $passkey

Wheres and what is $passkey

This

$HTMLOUT .= $HTMLOUT .=

Should be

$HTMLOUT .=

Fire-Fox

Why is this not working?

The passkey should not be showed to a another user who is browsing a profile.
and if the users don't have a passkey it should return a line like: "You havent downloaded a torrent, to get a passkey"

//START IRC Passkey
if ($CURUSER['class'] >= UC_STAFF || UC_USER && $user["id"] != $CURUSER["id"]) {
$res = mysql_query ("SELECT * FROM USERS WHERE passkey = $passkey");
$row = mysql_fetch_assoc($res);
$HTMLOUT .= "<tr><td class='rowhead'>IRC Passkey</td><td align='left'> ".$CURUSER['passkey']."</td></tr>";
} else
$HTMLOUT .= $HTMLOUT .= "<tr><td class='rowhead'>IRC Passkey</td><td align='left'>You havent downloaded a torrent, to get a passkey</td></tr>";
}
//END IRC Passkey