2005-09-10 19:25:43 +02:00
|
|
|
|
<?php
|
|
|
|
|
|
2006-11-21 00:24:10 +01:00
|
|
|
|
function UID2Nick($UID)
|
|
|
|
|
{
|
|
|
|
|
global $con;
|
2005-09-10 19:25:43 +02:00
|
|
|
|
|
|
|
|
|
$SQL = "SELECT Nick FROM `User` WHERE UID='$UID'";
|
|
|
|
|
$Erg = mysql_query($SQL, $con);
|
|
|
|
|
|
|
|
|
|
//echo $UID."#";
|
2005-11-08 21:04:05 +01:00
|
|
|
|
if( mysql_num_rows($Erg))
|
|
|
|
|
return mysql_result($Erg, 0);
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if( $UID == -1)
|
|
|
|
|
return "logout User";
|
|
|
|
|
else
|
|
|
|
|
return "UserID $UID not found";
|
|
|
|
|
}
|
2005-09-10 19:25:43 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2006-11-21 00:24:10 +01:00
|
|
|
|
function TID2Type($TID)
|
|
|
|
|
{
|
|
|
|
|
global $con;
|
2005-09-10 19:25:43 +02:00
|
|
|
|
|
|
|
|
|
$SQL = "SELECT Name FROM `EngelType` WHERE TID='$TID'";
|
|
|
|
|
$Erg = mysql_query($SQL, $con);
|
|
|
|
|
|
|
|
|
|
return mysql_result($Erg, 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2005-11-21 01:13:51 +01:00
|
|
|
|
function ReplaceSmilies($eckig) {
|
2005-09-10 19:25:43 +02:00
|
|
|
|
|
|
|
|
|
$neueckig = $eckig;
|
|
|
|
|
$neueckig = str_replace(";o))","<img src=\"./inc/smiles/icon_redface.gif\">",$neueckig);
|
|
|
|
|
$neueckig = str_replace(":-))","<img src=\"./inc/smiles/icon_redface.gif\">",$neueckig);
|
|
|
|
|
$neueckig = str_replace(";o)","<img src=\"./inc/smiles/icon_wind.gif\">",$neueckig);
|
|
|
|
|
$neueckig = str_replace(":)","<img src=\"./inc/smiles/icon_smile.gif\">",$neueckig);
|
|
|
|
|
$neueckig = str_replace(":-)","<img src=\"./inc/smiles/icon_smile.gif\">",$neueckig);
|
|
|
|
|
$neueckig = str_replace(":(","<img src=\"./inc/smiles/icon_sad.gif\">",$neueckig);
|
|
|
|
|
$neueckig = str_replace(":-(","<img src=\"./inc/smiles/icon_sad.gif\">",$neueckig);
|
|
|
|
|
$neueckig = str_replace(":o(","<img src=\"./inc/smiles/icon_sad.gif\">",$neueckig);
|
|
|
|
|
$neueckig = str_replace(":o)","<img src=\"./inc/smiles/icon_lol.gif\">",$neueckig);
|
|
|
|
|
$neueckig = str_replace(";o(","<img src=\"./inc/smiles/icon_cry.gif\">",$neueckig);
|
|
|
|
|
$neueckig = str_replace(";(","<img src=\"./inc/smiles/icon_cry.gif\">",$neueckig);
|
|
|
|
|
$neueckig = str_replace(";-(","<img src=\"./inc/smiles/icon_cry.gif\">",$neueckig);
|
|
|
|
|
$neueckig = str_replace("8)","<img src=\"./inc/smiles/icon_rolleyes.gif\">",$neueckig);
|
|
|
|
|
$neueckig = str_replace("8o)","<img src=\"./inc/smiles/icon_rolleyes.gif\">",$neueckig);
|
|
|
|
|
$neueckig = str_replace(":P","<img src=\"./inc/smiles/icon_evil.gif\">",$neueckig);
|
|
|
|
|
$neueckig = str_replace(":-P","<img src=\"./inc/smiles/icon_evil.gif\">",$neueckig);
|
|
|
|
|
$neueckig = str_replace(":oP","<img src=\"./inc/smiles/icon_evil.gif\">",$neueckig);
|
|
|
|
|
$neueckig = str_replace(";P","<img src=\"./inc/smiles/icon_mad.gif\">",$neueckig);
|
|
|
|
|
$neueckig = str_replace(";oP","<img src=\"./inc/smiles/icon_mad.gif\">",$neueckig);
|
|
|
|
|
$neueckig = str_replace("?)","<img src=\"./inc/smiles/icon_question.gif\">",$neueckig);
|
|
|
|
|
return $neueckig;
|
|
|
|
|
}
|
|
|
|
|
|
2006-12-15 18:07:27 +01:00
|
|
|
|
|
|
|
|
|
/* Parameter:
|
|
|
|
|
<UserID>
|
|
|
|
|
[<H<EFBFBD>he des Bildes (wenn die h<EFBFBD>he kleiner 1 ist wird die h<EFBFBD>he nicht begrenzt)>] */
|
|
|
|
|
function displayavatar($UID, $height="30")
|
2006-11-21 00:24:10 +01:00
|
|
|
|
{
|
|
|
|
|
global $con;
|
2006-12-15 18:07:27 +01:00
|
|
|
|
|
|
|
|
|
// 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\">");
|
2005-09-10 19:25:43 +02:00
|
|
|
|
|
2006-12-15 18:07:27 +01:00
|
|
|
|
// show avator
|
2006-11-21 00:24:10 +01:00
|
|
|
|
$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 (" <img src=\"./inc/avatar/avatar". mysql_result($aerg, 0, "Avatar"). ".gif\">");
|
2006-12-15 18:07:27 +01:00
|
|
|
|
|
2005-09-10 19:25:43 +02:00
|
|
|
|
}
|
|
|
|
|
|
2006-11-21 00:24:10 +01:00
|
|
|
|
function UIDgekommen($UID)
|
|
|
|
|
{
|
|
|
|
|
global $con;
|
2005-12-22 00:06:12 +01:00
|
|
|
|
|
|
|
|
|
$SQL = "SELECT `Gekommen` FROM `User` WHERE UID='$UID'";
|
|
|
|
|
$Erg = mysql_query($SQL, $con);
|
|
|
|
|
|
|
|
|
|
//echo $UID."#";
|
|
|
|
|
if( mysql_num_rows($Erg))
|
|
|
|
|
return mysql_result($Erg, 0);
|
|
|
|
|
else
|
|
|
|
|
return "0";
|
|
|
|
|
}
|
|
|
|
|
|
2005-09-10 19:25:43 +02:00
|
|
|
|
?>
|