Gastenboek smilies hulp gevraagd
Ik ben bezig met een gastenboekservice, alles werkt behalve mijn smilies...
Bericht.php:
Verwerkt.php:
Als je meer informatie nodig hebt, moet je het maar vragen...
Bedankt aan diegene die me wi helpen ...
Greetz Kristof
Bericht.php:
Code (php)
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
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
<?include('functies.php');?>
<html>
<head>
<title>KristofDebleu.Net - Gratis gastenboek</TITLE>
<meta name="robots" content="index, follow">
<script type="text/javascript">
function getObject(obj) {
var theObj;
if(document.all) {
if(typeof obj=="string") {
return document.all(obj);
} else {
return obj.style;
}
}
if(document.getElementById) {
if(typeof obj=="string") {
return document.getElementById(obj);
} else {
return obj.style;
}
}
return null;
}
//Contador de caracteres.
function Contar(entrada,salida,texto,caracteres) {
var entradaObj=getObject(entrada);
var salidaObj=getObject(salida);
var longitud=caracteres - entradaObj.value.length;
if(longitud <= 0) {
longitud=0;
texto='<span class="disable"> '+texto+' </span>';
entradaObj.value=entradaObj.value.substr(0,caracteres);
}
salidaObj.innerHTML = texto.replace("{CHAR}",longitud);
}
//-->
</script>
<LINK REL=STYLESHEET HREF="css/site.css">
</head>
<BODY>
<form name="form1" method="post" action="gastenboek_verwerk.php">
<table width="379" border="0">
<tr>
<td width="101">Naam:</td>
<td width="262"><input name="name" type="text" id="name"></td>
</tr>
<tr>
<td>Mail:</td>
<td><input name="mail" type="text" id="mail"></td>
</tr>
<tr>
<td>Site:</td>
<td><input name="site" type="text" id="site"></td>
</tr>
</table>
<p>Bericht(Maz. 230 tekens, <span id="sBann" class="minitext">230 tekens over!)</span><span class="2">
</span></p>
<p><span class="2">
<textarea name="bericht" cols="60" class="text" id="eBann" maxlength="230" onKeyUp="Contar('eBann','sBann','{CHAR} tekens over!.',230);"></textarea>
<input name="user" type="hidden" id="user" value="<? echo $_GET['user']; ?>">
</span>
</p>
<p>
<td>
<img style="margin: 1px; margin-left: 0px" onMouseover="this.style.cursor='pointer'" onClick="sendtext(document.form1.bericht, ':)')" src="images/smilies/smile.gif" alt="Emoticon">
<img style="margin: 1px" onMouseover="this.style.cursor='pointer'" onClick="sendtext(document.form1.bericht, ':p')" src="images/smilies/exclaim.gif" alt="Emoticon">
<img style="margin: 1px" onMouseover="this.style.cursor='pointer'" onClick="sendtext(document.form1.bericht, ':p')" src="images/smilies/confused.gif" alt="Emoticon">
<img style="margin: 1px" onMouseover="this.style.cursor='pointer'" onClick="sendtext(document.form1.bericht, ':(')" src="images/smilies/cool.gif" alt="Emoticon">
<img style="margin: 1px" onMouseover="this.style.cursor='pointer'" onClick="sendtext(document.form1.bericht, ';)')" src="images/smilies/wink.gif" alt="Emoticon">
<img style="margin: 1px" onMouseover="this.style.cursor='pointer'" onClick="sendtext(document.form1.bericht, ':angry')" src="images/smilies/neutral.gif" alt="Emoticon"><br />
<img style="margin: 1px; margin-left: 0px" onMouseover="this.style.cursor='pointer'" onClick="sendtext(document.form1.bericht, ':roll')" src="images/smilies/rolleyes.gif" alt="Emoticon">
<img style="margin: 1px" onMouseover="this.style.cursor='pointer'" onClick="sendtext(document.form1.bericht, ':kiss')" src="images/smilies/twisted.gif" alt="Emoticon">
<img style="margin: 1px" onMouseover="this.style.cursor='pointer'" onClick="sendtext(document.form1.bericht, ':cool')" src="images/smilies/cool.gif" alt="Emoticon">
<img style="margin: 1px" onMouseover="this.style.cursor='pointer'" onClick="sendtext(document.form1.bericht, ':cry')" src="images/smilies/cry.gif" alt="Emoticon">
<img style="margin: 1px" onMouseover="this.style.cursor='pointer'" onClick="sendtext(document.form1.bericht, ':huh')" src="images/smilies/question.gif" alt="Emoticon">
<img style="margin: 1px" onMouseover="this.style.cursor='pointer'" onClick="sendtext(document.form1.bericht, ':omg')" src="images/smilies/mrgreen.gif" alt="Emoticon"><br /><br />
BBcode</a> is OFF<br />HTML is OFF</td></tr></table><br />
</p>
<p>
<input type="submit" name="Submit" value="Verzend">
<input type="reset" name="Reset" value="Reset">
</p>
</form>
</html>
<html>
<head>
<title>KristofDebleu.Net - Gratis gastenboek</TITLE>
<meta name="robots" content="index, follow">
<script type="text/javascript">
function getObject(obj) {
var theObj;
if(document.all) {
if(typeof obj=="string") {
return document.all(obj);
} else {
return obj.style;
}
}
if(document.getElementById) {
if(typeof obj=="string") {
return document.getElementById(obj);
} else {
return obj.style;
}
}
return null;
}
//Contador de caracteres.
function Contar(entrada,salida,texto,caracteres) {
var entradaObj=getObject(entrada);
var salidaObj=getObject(salida);
var longitud=caracteres - entradaObj.value.length;
if(longitud <= 0) {
longitud=0;
texto='<span class="disable"> '+texto+' </span>';
entradaObj.value=entradaObj.value.substr(0,caracteres);
}
salidaObj.innerHTML = texto.replace("{CHAR}",longitud);
}
//-->
</script>
<LINK REL=STYLESHEET HREF="css/site.css">
</head>
<BODY>
<form name="form1" method="post" action="gastenboek_verwerk.php">
<table width="379" border="0">
<tr>
<td width="101">Naam:</td>
<td width="262"><input name="name" type="text" id="name"></td>
</tr>
<tr>
<td>Mail:</td>
<td><input name="mail" type="text" id="mail"></td>
</tr>
<tr>
<td>Site:</td>
<td><input name="site" type="text" id="site"></td>
</tr>
</table>
<p>Bericht(Maz. 230 tekens, <span id="sBann" class="minitext">230 tekens over!)</span><span class="2">
</span></p>
<p><span class="2">
<textarea name="bericht" cols="60" class="text" id="eBann" maxlength="230" onKeyUp="Contar('eBann','sBann','{CHAR} tekens over!.',230);"></textarea>
<input name="user" type="hidden" id="user" value="<? echo $_GET['user']; ?>">
</span>
</p>
<p>
<td>
<img style="margin: 1px; margin-left: 0px" onMouseover="this.style.cursor='pointer'" onClick="sendtext(document.form1.bericht, ':)')" src="images/smilies/smile.gif" alt="Emoticon">
<img style="margin: 1px" onMouseover="this.style.cursor='pointer'" onClick="sendtext(document.form1.bericht, ':p')" src="images/smilies/exclaim.gif" alt="Emoticon">
<img style="margin: 1px" onMouseover="this.style.cursor='pointer'" onClick="sendtext(document.form1.bericht, ':p')" src="images/smilies/confused.gif" alt="Emoticon">
<img style="margin: 1px" onMouseover="this.style.cursor='pointer'" onClick="sendtext(document.form1.bericht, ':(')" src="images/smilies/cool.gif" alt="Emoticon">
<img style="margin: 1px" onMouseover="this.style.cursor='pointer'" onClick="sendtext(document.form1.bericht, ';)')" src="images/smilies/wink.gif" alt="Emoticon">
<img style="margin: 1px" onMouseover="this.style.cursor='pointer'" onClick="sendtext(document.form1.bericht, ':angry')" src="images/smilies/neutral.gif" alt="Emoticon"><br />
<img style="margin: 1px; margin-left: 0px" onMouseover="this.style.cursor='pointer'" onClick="sendtext(document.form1.bericht, ':roll')" src="images/smilies/rolleyes.gif" alt="Emoticon">
<img style="margin: 1px" onMouseover="this.style.cursor='pointer'" onClick="sendtext(document.form1.bericht, ':kiss')" src="images/smilies/twisted.gif" alt="Emoticon">
<img style="margin: 1px" onMouseover="this.style.cursor='pointer'" onClick="sendtext(document.form1.bericht, ':cool')" src="images/smilies/cool.gif" alt="Emoticon">
<img style="margin: 1px" onMouseover="this.style.cursor='pointer'" onClick="sendtext(document.form1.bericht, ':cry')" src="images/smilies/cry.gif" alt="Emoticon">
<img style="margin: 1px" onMouseover="this.style.cursor='pointer'" onClick="sendtext(document.form1.bericht, ':huh')" src="images/smilies/question.gif" alt="Emoticon">
<img style="margin: 1px" onMouseover="this.style.cursor='pointer'" onClick="sendtext(document.form1.bericht, ':omg')" src="images/smilies/mrgreen.gif" alt="Emoticon"><br /><br />
BBcode</a> is OFF<br />HTML is OFF</td></tr></table><br />
</p>
<p>
<input type="submit" name="Submit" value="Verzend">
<input type="reset" name="Reset" value="Reset">
</p>
</form>
</html>
Verwerkt.php:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?
ob_start();
$fout = 0;
if ($_POST['name'] == "")
{
$fout = $fout +1;
}
if ($_POST['bericht'] == "")
{
$fout = $fout +1;
}
if ($fout == "0")
{
include "config.php";
$sql=("INSERT INTO ".$_POST['user']." (name, mail, site, bericht) VALUES ('".$_POST['name']."','".$_POST['mail']."','".$_POST['site']."','".$_POST['bericht']."')");mysql_query($sql);
echo "uw bericht is verzonden!";
header("Location: gastenboek.php?user=".$_POST['user']);
}
else
{
echo "U heeft uw naam niet ingevuld en/of geen bericht ingevuld! Vul deze vak(ken) in en probeer het opniew!";
}
ob_end_flush();
?>
ob_start();
$fout = 0;
if ($_POST['name'] == "")
{
$fout = $fout +1;
}
if ($_POST['bericht'] == "")
{
$fout = $fout +1;
}
if ($fout == "0")
{
include "config.php";
$sql=("INSERT INTO ".$_POST['user']." (name, mail, site, bericht) VALUES ('".$_POST['name']."','".$_POST['mail']."','".$_POST['site']."','".$_POST['bericht']."')");mysql_query($sql);
echo "uw bericht is verzonden!";
header("Location: gastenboek.php?user=".$_POST['user']);
}
else
{
echo "U heeft uw naam niet ingevuld en/of geen bericht ingevuld! Vul deze vak(ken) in en probeer het opniew!";
}
ob_end_flush();
?>
Als je meer informatie nodig hebt, moet je het maar vragen...
Bedankt aan diegene die me wi helpen ...
Greetz Kristof
Wat werkt er niet aan je smilies? Worden ze niet toegevoegd als je op een smilie klikt, worden ze niet goed weergegeven in je bericht?
Dit is een voorbeeld: http://gastenboek.kristofdebleu.net/gastenboek.php?user=kristofd
Ik voeg mijn smilies in mijn bericht in maar hij toont ze uiteindelijk niet ...
Ik voeg mijn smilies in mijn bericht in maar hij toont ze uiteindelijk niet ...
Blijkbaar gaat er dan iets niet goed bij het weergeven van je gastenboek. De tekencombinaties die smilies voorstellen worden blijkbaar niet goed omgezet. Geef de code voor het weergeven van je gastenboek eens?
gastenboek.php
Code (php)
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
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
<html>
<head>
<LINK REL=STYLESHEET HREF="css/site.css">
</head>
</html>
<?
/*
Naam: Rene Biemans
Versie: 1.2
Copyrights: renebiemans.nl
Werking:
Laat het gastenboek zien van een user
*/
include "config.php";
$user_form = $_GET['user'];
$sql=("SELECT * FROM users WHERE user='$user_form'");
$result=@mysql_query($sql);
$background=@mysql_result($result,$i,"background");
$logo=@mysql_result($result,$i,"logo");
$height=@mysql_result($result,$i,"height");
$width=@mysql_result($result,$i,"width");
$width=@mysql_result($result,$i,"width");
$textcolor=@mysql_result($result,$i,"textcolor");
echo mysql_error();
//afsluiten mysql connectie
?>
<html>
<head>
<title><? echo $title_gastenboek;
echo $_GET['user']; ?></title>
<body bgcolor="<? echo $background; ?>" text="<? echo $textcolor; ?>">
</head>
<body>
<center>
<p>
<?
if (!$logo == "")
{
echo "<img src = '$logo' width='$width' height='$height'>";
}
?></p>
<a href="gastenboek_bericht.php?user=<? echo $_GET['user']; ?>">
<p>|Nieuw bericht|</p>
</center></a>
</body>
<?
if ($_GET['user'] == "")
{
echo "Geen user geselecteerd!";
}
else
{
$query="SELECT * FROM ".$_GET['user']."";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
$i=0;
while ($i < $num) {
$name=mysql_result($result,$i,"name");
$mail=mysql_result($result,$i,"mail");
$site=mysql_result($result,$i,"site");
$bericht=mysql_result($result,$i,"bericht");
echo "<B>Naam: $name</b><br>E-mail: $mail<br>Site: $site<br> $bericht<br><hr><br>";
$i++;
}
}
?>
</html>
<head>
<LINK REL=STYLESHEET HREF="css/site.css">
</head>
</html>
<?
/*
Naam: Rene Biemans
Versie: 1.2
Copyrights: renebiemans.nl
Werking:
Laat het gastenboek zien van een user
*/
include "config.php";
$user_form = $_GET['user'];
$sql=("SELECT * FROM users WHERE user='$user_form'");
$result=@mysql_query($sql);
$background=@mysql_result($result,$i,"background");
$logo=@mysql_result($result,$i,"logo");
$height=@mysql_result($result,$i,"height");
$width=@mysql_result($result,$i,"width");
$width=@mysql_result($result,$i,"width");
$textcolor=@mysql_result($result,$i,"textcolor");
echo mysql_error();
//afsluiten mysql connectie
?>
<html>
<head>
<title><? echo $title_gastenboek;
echo $_GET['user']; ?></title>
<body bgcolor="<? echo $background; ?>" text="<? echo $textcolor; ?>">
</head>
<body>
<center>
<p>
<?
if (!$logo == "")
{
echo "<img src = '$logo' width='$width' height='$height'>";
}
?></p>
<a href="gastenboek_bericht.php?user=<? echo $_GET['user']; ?>">
<p>|Nieuw bericht|</p>
</center></a>
</body>
<?
if ($_GET['user'] == "")
{
echo "Geen user geselecteerd!";
}
else
{
$query="SELECT * FROM ".$_GET['user']."";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
$i=0;
while ($i < $num) {
$name=mysql_result($result,$i,"name");
$mail=mysql_result($result,$i,"mail");
$site=mysql_result($result,$i,"site");
$bericht=mysql_result($result,$i,"bericht");
echo "<B>Naam: $name</b><br>E-mail: $mail<br>Site: $site<br> $bericht<br><hr><br>";
$i++;
}
}
?>
</html>
Gewijzigd op 01/01/1970 01:00:00 door Kristof Debleu
Ik zie nergens in deze code een functie die de tekencombinatie van een smilie om zou zetten naar de htmlcode voor een afbeelding. Ik zou een functie als preg_replace() maar die zie ik nergens.
Daarnaast is je script ook verreweg van netjes:
-> @tjes om fouten te onderdrukken? Niet doen, zorg liever voor een goede foutafhandeling
-> gebruik liever mysql_fetch_assoc() in plaats van mysql_result, werkt veel makkelijker.
-> $_GET waarden in queries zonder enige beveiliging: vragen om problemen!
Daarnaast is je script ook verreweg van netjes:
-> @tjes om fouten te onderdrukken? Niet doen, zorg liever voor een goede foutafhandeling
-> gebruik liever mysql_fetch_assoc() in plaats van mysql_result, werkt veel makkelijker.
-> $_GET waarden in queries zonder enige beveiliging: vragen om problemen!
Ok bedankt Blanche, ik ga hier direct eens werk van maken ...
Bedankt voor uw reactie !!!!!
Bedankt voor uw reactie !!!!!
Ik heb het bestand aangepast, maar het lukt nog altijd niet:
gastenboek.php:
Bedankt aan de helper ...
gastenboek.php:
Code (php)
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
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
<html>
<head>
<LINK REL=STYLESHEET HREF="css/site.css">
</head>
</html>
<?
include "config.php";
$user_form = $_GET['user'];
$sql=("SELECT * FROM users WHERE user='$user_form'");
$result=@mysql_query($sql);
$background=@mysql_result($result,$i,"background");
$logo=@mysql_result($result,$i,"logo");
$height=@mysql_result($result,$i,"height");
$width=@mysql_result($result,$i,"width");
$width=@mysql_result($result,$i,"width");
$textcolor=@mysql_result($result,$i,"textcolor");
echo mysql_error();
//afsluiten mysql connectie
?>
<html>
<head>
<title><? echo $title_gastenboek;
echo $_GET['user']; ?></title>
<body bgcolor="<? echo $background; ?>" text="<? echo $textcolor; ?>">
</head>
<body>
<center>
<p>
<?
if (!$logo == "")
{
echo "<img src = '$logo' width='$width' height='$height'>";
}
?></p>
<a href="gastenboek_bericht.php?user=<? echo $_GET['user']; ?>">
<p>|Nieuw bericht|</p>
</center></a>
</body>
<?
if ($_GET['user'] == "")
{
echo "Geen user geselecteerd!";
}
else
{
$query="SELECT * FROM ".$_GET['user']."";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
$i=0;
while ($i < $num) {
$name=mysql_result($result,$i,"name");
$mail=mysql_result($result,$i,"mail");
$site=mysql_result($result,$i,"site");
$bericht=mysql_result($result,$i,"bericht");
echo "<B>Naam: $name</b><br>E-mail: $mail<br>Site: $site<br> $bericht<br><hr><br>";
$i++;
}
function ubb_smiley($bericht = "smilies") {
//UBB-code
$bericht = preg_replace("/\[B\](?U)((.|\n|\r)*)\[\/B\]/", "<B>\\1</B>", $bericht);
$bericht = preg_replace("/\[U\](?U)((.|\n|\r)*)\[\/U\]/", "<U>\\1</U>", $bericht);
$bericht = preg_replace("/\[I\](?U)((.|\n|\r)*)\[\/I\]/", "<I>\\1</I>", $bericht);
$bericht = preg_replace("/\[S\](?U)((.|\n|\r)*)\[\/S\]/", "<S>\\1</S>", $bericht);
$bericht = eregi_replace("\\[COLOR=([^\\[]*)\\]([^\\[]*)\\[/COLOR\\]","<font color=\"\\1\">\\2</font>",$bericht);
$bericht = eregi_replace("\\[SIZE=([^\\[]*)\\]([^\\[]*)\\[/SIZE\\]","<font size=\"\\1\">\\2</font>",$bericht);
$bericht = eregi_replace("\\[ALIGN=([^\\[]*)\\]([^\\[]*)\\[/ALIGN\\]","<p align=\"\\1\">\\2</p>",$bericht);
$bericht = eregi_replace("\\[EMAIL=([^\\[]*)\\]([^\\[]*)\\[/EMAIL\\]", "<a href=\"mailto:\\1\">\\2</a>",$bericht);
$bericht = eregi_replace("\\[URL=([^\\[]*)\\]([^\\[]*)\\[/URL\\]","<a href=\\1 target=_blank>\\2</a>",$bericht); ;
//Smileys-code
$bericht = str_replace(":)", "<img src=\"images/smilies/confused.gif\">", $bericht);
$bericht = str_replace(":(", "<img src=\"images/smilies/cool.gif\">", $bericht);
$bericht = str_replace(":s", "<img src=\"images/smilies/cry.gif\">", $bericht);
$bericht = str_replace(":P", "<img src=\"images/smilies/exclaim.gif\">", $bericht);
$bericht = str_replace(":D", "<img src=\"images/smilies/mrgreen.gif\">", $bericht);
$bericht = str_replace(";)", "<img src=\"images/smilies/neutral.gif\">", $bericht);
$bericht = str_replace(":omg:", "<img src=\"images/smilies/wink.gif\">", $bericht);
$bericht = str_replace(":cool:", "<img src=\"images/smilies/smile.gif\">", $bericht);
}
}
?>
<head>
<LINK REL=STYLESHEET HREF="css/site.css">
</head>
</html>
<?
include "config.php";
$user_form = $_GET['user'];
$sql=("SELECT * FROM users WHERE user='$user_form'");
$result=@mysql_query($sql);
$background=@mysql_result($result,$i,"background");
$logo=@mysql_result($result,$i,"logo");
$height=@mysql_result($result,$i,"height");
$width=@mysql_result($result,$i,"width");
$width=@mysql_result($result,$i,"width");
$textcolor=@mysql_result($result,$i,"textcolor");
echo mysql_error();
//afsluiten mysql connectie
?>
<html>
<head>
<title><? echo $title_gastenboek;
echo $_GET['user']; ?></title>
<body bgcolor="<? echo $background; ?>" text="<? echo $textcolor; ?>">
</head>
<body>
<center>
<p>
<?
if (!$logo == "")
{
echo "<img src = '$logo' width='$width' height='$height'>";
}
?></p>
<a href="gastenboek_bericht.php?user=<? echo $_GET['user']; ?>">
<p>|Nieuw bericht|</p>
</center></a>
</body>
<?
if ($_GET['user'] == "")
{
echo "Geen user geselecteerd!";
}
else
{
$query="SELECT * FROM ".$_GET['user']."";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
$i=0;
while ($i < $num) {
$name=mysql_result($result,$i,"name");
$mail=mysql_result($result,$i,"mail");
$site=mysql_result($result,$i,"site");
$bericht=mysql_result($result,$i,"bericht");
echo "<B>Naam: $name</b><br>E-mail: $mail<br>Site: $site<br> $bericht<br><hr><br>";
$i++;
}
function ubb_smiley($bericht = "smilies") {
//UBB-code
$bericht = preg_replace("/\[B\](?U)((.|\n|\r)*)\[\/B\]/", "<B>\\1</B>", $bericht);
$bericht = preg_replace("/\[U\](?U)((.|\n|\r)*)\[\/U\]/", "<U>\\1</U>", $bericht);
$bericht = preg_replace("/\[I\](?U)((.|\n|\r)*)\[\/I\]/", "<I>\\1</I>", $bericht);
$bericht = preg_replace("/\[S\](?U)((.|\n|\r)*)\[\/S\]/", "<S>\\1</S>", $bericht);
$bericht = eregi_replace("\\[COLOR=([^\\[]*)\\]([^\\[]*)\\[/COLOR\\]","<font color=\"\\1\">\\2</font>",$bericht);
$bericht = eregi_replace("\\[SIZE=([^\\[]*)\\]([^\\[]*)\\[/SIZE\\]","<font size=\"\\1\">\\2</font>",$bericht);
$bericht = eregi_replace("\\[ALIGN=([^\\[]*)\\]([^\\[]*)\\[/ALIGN\\]","<p align=\"\\1\">\\2</p>",$bericht);
$bericht = eregi_replace("\\[EMAIL=([^\\[]*)\\]([^\\[]*)\\[/EMAIL\\]", "<a href=\"mailto:\\1\">\\2</a>",$bericht);
$bericht = eregi_replace("\\[URL=([^\\[]*)\\]([^\\[]*)\\[/URL\\]","<a href=\\1 target=_blank>\\2</a>",$bericht); ;
//Smileys-code
$bericht = str_replace(":)", "<img src=\"images/smilies/confused.gif\">", $bericht);
$bericht = str_replace(":(", "<img src=\"images/smilies/cool.gif\">", $bericht);
$bericht = str_replace(":s", "<img src=\"images/smilies/cry.gif\">", $bericht);
$bericht = str_replace(":P", "<img src=\"images/smilies/exclaim.gif\">", $bericht);
$bericht = str_replace(":D", "<img src=\"images/smilies/mrgreen.gif\">", $bericht);
$bericht = str_replace(";)", "<img src=\"images/smilies/neutral.gif\">", $bericht);
$bericht = str_replace(":omg:", "<img src=\"images/smilies/wink.gif\">", $bericht);
$bericht = str_replace(":cool:", "<img src=\"images/smilies/smile.gif\">", $bericht);
}
}
?>
Bedankt aan de helper ...




