diff options
author | cookie <cookie@29ba0400-6e00-0410-a75a-ca02368028f8> | 2006-12-15 22:52:56 +0000 |
---|---|---|
committer | cookie <cookie@29ba0400-6e00-0410-a75a-ca02368028f8> | 2006-12-15 22:52:56 +0000 |
commit | 29d83f0af0567bcb17da4ce9fe44b32f19405f68 (patch) | |
tree | ea8e6f11ae9d746923f6a7f713595936cbd21bc7 /www-ssl/inc/funktion_user.php | |
parent | f446caee58e93823242b1dd76631783f198af5b1 (diff) |
user koennen eigene bilder hochladen
git-svn-id: svn://svn.cccv.de/engel-system@211 29ba0400-6e00-0410-a75a-ca02368028f8
Diffstat (limited to 'www-ssl/inc/funktion_user.php')
-rwxr-xr-x | www-ssl/inc/funktion_user.php | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/www-ssl/inc/funktion_user.php b/www-ssl/inc/funktion_user.php index 9a1433fd..ac8744cf 100755 --- a/www-ssl/inc/funktion_user.php +++ b/www-ssl/inc/funktion_user.php @@ -58,21 +58,40 @@ function ReplaceSmilies($eckig) { } +function GetPicturShow($UID) +{ + global $con; + + $SQL= "SELECT `show` FROM `UserPicture` WHERE `UID`='$UID'"; + $res = mysql_query( $SQL, $con); + if( mysql_num_rows($res) == 1) + return mysql_result( $res, 0, 0); + else + return ""; +} + + /* Parameter: <UserID> [<Höhe des Bildes (wenn die höhe kleiner 1 ist wird die höhe nicht begrenzt)>] */ -function displayavatar($UID, $height="30") +function displayPictur($UID, $height="30") +{ + if( $height > 0) + return( "<img src=\"./inc/ShowUserPicture.php?UID=$UID\" height=\"$height\" alt=\"picture of USER$UID\">"); + else + return( "<img src=\"./inc/ShowUserPicture.php?UID=$UID\" alt=\"picture of USER$UID\">"); +} + + +/* Parameter: + <UserID> + [<Höhe des Bildes (wenn die höhe kleiner 1 ist wird die höhe nicht begrenzt)>] */ +function displayavatar( $UID, $height="30") { global $con; - // ist ein foto hinterlegt? - $SQL= "SELECT * FROM `UserPicture` WHERE `UID`='$UID' AND `show`='Y'"; - $res = mysql_query( $SQL, $con); - if( mysql_num_rows($res) == 1) - if( $height > 0) - return( " <img src=\"./inc/ShowUserPicture.php?UID=$UID\" height=\"$height\" alt=\"picture of USER$UID\">"); - else - return( " <img src=\"./inc/ShowUserPicture.php?UID=$UID\" alt=\"picture of USER$UID\">"); + if( GetPicturShow($UID) == 'Y') + return " ". displayPictur( $UID, $height); // show avator $asql = "select * from User where UID = $UID"; |