summaryrefslogtreecommitdiff
path: root/www-ssl/inc/funktion_user.php
blob: f679245d37f5a9854f2a1fdda84256d0feb3ebab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?php

function UID2Nick($UID) {
  include ("./inc/db.php");
  
  $SQL = "SELECT Nick FROM `User` WHERE UID='$UID'";
  $Erg = mysql_query($SQL, $con);

  //echo $UID."#";
  if( mysql_num_rows($Erg))
	return mysql_result($Erg, 0);
  else
  {
  	if( $UID == -1)
		return "logout User";
	else
	  	return "UserID $UID not found";
  }
}


function TID2Type($TID) {
  include ("./inc/db.php");
  
  $SQL = "SELECT Name FROM `EngelType` WHERE TID='$TID'";
  $Erg = mysql_query($SQL, $con);

  return mysql_result($Erg, 0);
}


function ReplaceSmilies($eckig) {

	$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;
}

function displayavatar($dumdidum) {
	include ("./inc/db.php");
	global $displayavatar;
        
       $asql = "select * from User where UID = $dumdidum";
       $aerg = mysql_query ($asql, $con);
       if (($displayavatar<>0) && (mysql_num_rows($Erg)) )
            return ("&nbsp;<img src=\"./inc/avatar/avatar". mysql_result($aerg, 0, "Avatar"). ".gif\">");
}

function Ausgabe_Feld($RID) {
// gibt, nach �bergabe der der SchichtID (SID) und der RaumID (RID),
// die eingetragenden und und offenden Schichteint�ge zur�ck
 	include ("./inc/db.php");
    	include ("./inc/config.php");
//echo "####################", $Erg, "####################<br>";
	
        $SQL2 = "SELECT * FROM `Raeume` ";
	if ($RID != "") {
		$SQL2.= "WHERE (RID = '".$RID."')";
	}
	return mysql_query($SQL2, $con);
}

function UIDgekommen($UID) {
  include ("./inc/db.php");
  
  $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";
}



?>