here sumthing some ppl mabe looking for well i did and ppl here helped me to complete it use this code to see user avatar next to their names in online list forums etc
SCRIPTS FOR SALE BY SUBZERO
Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
_______…
so youve optimised a piece of code .. so what about security .. for a start remove the braces , its a security threat, there not needed, second im not even gonna mention the major xss hole in that script.. but heres a tip .. if you really wanna optimise it...
so what have we done here .. first of all weve taken an if else statement which is 4 lines long and combined it into one. so wheres the optimisation?
we only change the src url. the rest is printed as is, even though only one of the two echos is outputted to the screen both are processed. here we only process teh image tag once through php and change the src accordingly
we are no longer populating $avlink, therefore its not uneeded useless var taking up memory space.
and the security?
patched the HUGE XSS hole.
removed braces to help prevent the correct execution of any injected malicious code.
no worries .. if theres any other snippets of code u need optimising ect just post um here .. just dont post whole scripts or ur entire base code as i'll just ignore ya lol
i dont use lavalair or any other premade script so i cant give you the code u need as i simply dont know how the script is coded, what queries are used ect
u need to get the avatar from the users table, then either populate a variable with that avatar or use it directly ..
i.e. on my site i would use
$res = sql_query("SELECT avatar FROM users WHERE id = ".(0+$CURUSER['id'])." LIMIT 1");
$arr = mysql_fetch_assoc($res);
echo "<img src='".htmlspecialchars($arr['avatar'])."' border='0' alt='avatar' />";