From 29d83f0af0567bcb17da4ce9fe44b32f19405f68 Mon Sep 17 00:00:00 2001 From: cookie Date: Fri, 15 Dec 2006 22:52:56 +0000 Subject: user koennen eigene bilder hochladen git-svn-id: svn://svn.cccv.de/engel-system@211 29ba0400-6e00-0410-a75a-ca02368028f8 --- www-ssl/inc/funktion_user.php | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) (limited to 'www-ssl/inc/funktion_user.php') 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: [] */ -function displayavatar($UID, $height="30") +function displayPictur($UID, $height="30") +{ + if( $height > 0) + return( "\"picture"); + else + return( "\"picture"); +} + + +/* Parameter: + + [] */ +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( " \"picture"); - else - return( " \"picture"); + if( GetPicturShow($UID) == 'Y') + return " ". displayPictur( $UID, $height); // show avator $asql = "select * from User where UID = $UID"; -- cgit v1.2.3-54-g00ecf