website logo
Auteur
avatar
xavman

Forum » » Le coin des codeurs » » email masqués ?


Posté : 9 mars 2006 à 23:06 icone du post

Voici la fonction userinfo :

f

unction userinfo($uname, $bypass=0) {
    global $user, $sitename, $smilies, $short_user, $site_font;
    global $name, $email, $url, $bio, $user_avatar, $user_icq, $user_aim, $user_yim, $user_msnm, $user_from, $user_occ, $user_intrest, $user_sig, $user_journal;

    $uname=removeHack($uname);
    $result = mysql_query("SELECT name, user_viewemail, url, bio, user_avatar, user_icq, user_aim, user_yim, user_msnm, user_from, user_occ, user_intrest, user_sig, user_journal, mns FROM users WHERE uname='$uname'");
    list($name, $femail, $url, $bio, $user_avatar, $user_icq, $user_aim, $user_yim, $user_msnm, $user_from, $user_occ, $user_intrest, $user_sig, $user_journal, $mns) = mysql_fetch_array($result);

    if (!$bypass) {global $cookie;}
    !!include!!("header.php");

    if (($uname == $cookie[1]) || ($bypass==1)) {
       echo "<TABLE WIDTH=\"100%\" CELLSPACING=\"2\" CELLPADDING=\"2\" BORDER=\"0\"><TR><TD CLASS=\"HEADER\">\n";
       echo "$uname, ".translate("Welcome to")." $sitename";
       echo "</TD></TR></TABLE>\n";
       echo "<BR>";
       echo "<center>".translate("This is your personal page")."</center><BR>";
       nav($mns);
    }
    $email=removeHack($femail);
    $name=stripslashes(removeHack($name));
    $url=removeHack($url);
    $bio=stripslashes(removeHack($bio));
    $user_icq=stripslashes(removeHack($user_icq));
    $user_aim=stripslashes(removeHack($user_aim));
    $user_yim=stripslashes(removeHack($user_yim));
    $user_msnm=stripslashes(removeHack($user_msnm));
    $user_from=stripslashes(removeHack($user_from));
    $user_occ=stripslashes(removeHack($user_occ));
    $user_intrest=stripslashes(removeHack($user_intrest));
    $user_sig=nl2br(removeHack($user_sig));
    $user_journal=stripslashes(removeHack($user_journal));
    $op="userinfo";
    !!include!!("modules/sform/extend-user/aff_extend-user.php");
    echo "<BR><BR>";
    opentable();
    if ($mns) {
       echo "<TABLE WIDTH=\"100%\" CELLSPACING=\"2\" CELLPADDING=\"2\" BORDER=\"0\"><TR><TD CLASS=\"HEADER\">\n";
       echo translate("Mini-Web site")." : <a href=\"minisite.php?op=$uname\" target=\"_blank\" CLASS=\"ROUGE\"><b>".translate("the page")." ".translate("here")."</b></a></TD></TR>";
       echo "</TABLE>\n";
       echo "<BR>";
    }
    echo "<TABLE WIDTH=\"100%\" CELLSPACING=\"2\" CELLPADDING=\"2\" BORDER=\"0\"><TR><TD CLASS=\"HEADER\">\n";
    echo "Envoyer un message interne (Mel) a "." $uname :";
echo "<A HREF=\"replypmsg.php?send=".urlencode($uname)."\"><img src=\"images/forum/icons/posticon.gif\" border=\"0\" ALT=\"".translate("Send internal Message")."\"></a>";
echo "</TD></TR></TABLE>\n";
    echo "<BR>";
    echo "<TABLE WIDTH=\"100%\" CELLSPACING=\"2\" CELLPADDING=\"2\" BORDER=\"0\"><TR><TD CLASS=\"HEADER\">\n";
    echo translate("Last 10 comments by")." $uname :";
    echo "</TD></TR>\n";
    $result = mysql_query("select c.tid, c.sid, c.subject, s.ihome from comments c, stories s where c.sid=s.sid and name='$uname' order by tid DESC limit 0,10");
    while(list($tid, $sid, $subject, $ihome) = mysql_fetch_row($result)) {
       $rowcolor = tablos();
       if (ctrl_aff($ihome,0)) {
          echo "<TR $rowcolor><TD><a href=\"article.php?thold=-1&mode=flat&order=0&sid=$sid#$tid\" CLASS=\"NOIR\">$subject</a></TD></TR>";
       }
    }
    echo "</TABLE>\n";
    echo "<BR>";
    echo "<TABLE WIDTH=\"100%\" CELLSPACING=\"2\" CELLPADDING=\"2\" BORDER=\"0\"><TR><TD CLASS=\"HEADER\">\n";
    echo translate("Last 10 news submissions sent by")." $uname :";
    echo "</TD></TR>\n";
    $xtab=news_aff("libre", "where informant='$uname' order by sid DESC limit 10", "", 10);
    $story_limit=0;
    while (($story_limit<10) and ($story_limit<sizeof($xtab))) {
       $rowcolor = tablos();
       list($sid, $catid, $aid, $title) = $xtab[$story_limit];
       $story_limit++;
       echo "<TR $rowcolor><TD><a href=\"article.php?sid=$sid\" CLASS=\"NOIR\">$title</a></TD></TR>";
    }
    echo "</TABLE>\n";
    closetable();
    !!include!!("footer.php");
}




voila un exemple de lien :

http://www.nfmed.com/user.php?op=userinfo&uname=LASCAR

Message édité par : developpeur / 12-03-2006 22:53


Cet article provient de NPDS
https://www.npds.org/viewtopic.php?topic=19443&forum=5