summaryrefslogtreecommitdiff
path: root/www-ssl/inc/funktion_user.php
diff options
context:
space:
mode:
authorcookie <cookie@29ba0400-6e00-0410-a75a-ca02368028f8>2006-12-15 17:07:27 +0000
committercookie <cookie@29ba0400-6e00-0410-a75a-ca02368028f8>2006-12-15 17:07:27 +0000
commitf446caee58e93823242b1dd76631783f198af5b1 (patch)
tree4ac4b0a497f4029bbfd07dff48317fb0f9a237cb /www-ssl/inc/funktion_user.php
parentae10c6c89592d02a2e2ab8dff4c3764cb10f99da (diff)
bilder von user koennen in db abgelegt werden
git-svn-id: svn://svn.cccv.de/engel-system@210 29ba0400-6e00-0410-a75a-ca02368028f8
Diffstat (limited to 'www-ssl/inc/funktion_user.php')
-rwxr-xr-xwww-ssl/inc/funktion_user.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/www-ssl/inc/funktion_user.php b/www-ssl/inc/funktion_user.php
index c98598f8..9a1433fd 100755
--- a/www-ssl/inc/funktion_user.php
+++ b/www-ssl/inc/funktion_user.php
@@ -57,15 +57,30 @@ function ReplaceSmilies($eckig) {
return $neueckig;
}
-function displayavatar($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( "&nbsp;<img src=\"./inc/ShowUserPicture.php?UID=$UID\" height=\"$height\" alt=\"picture of USER$UID\">");
+ else
+ return( "&nbsp;<img src=\"./inc/ShowUserPicture.php?UID=$UID\" alt=\"picture of USER$UID\">");
+ // show avator
$asql = "select * from User where UID = $UID";
$aerg = mysql_query ($asql, $con);
if( mysql_num_rows($aerg) )
if( mysql_result($aerg, 0, "Avatar") > 0)
return ("&nbsp;<img src=\"./inc/avatar/avatar". mysql_result($aerg, 0, "Avatar"). ".gif\">");
+
}
function UIDgekommen($UID)