Grafische gevorderde |
|
De $gebruikersnaam komt van de sessie die gestart word (zou niet weten waarom hij dan de gebruikersnaam onthoud, maar tis nu eenmaal zo ) Dus we zijn het er over eens dat dit gewoon veilig is?
EDIT: Heb nog een probleempje. Als ik priveberichten op mijn site bekijk worden er geen brakes ingevoegd aan het eind van de tabel, maar word het zaakje uitgerekt. De code klopt neit helemaal, maar wat meot ik eraan veranderen?
<?
<b>Van:</b> <a href="profiel.php?mid=<? echo $object->van ?>"><? echo $a ?></a><br>
<b>Naar:</b> <? echo $b ?><br>
<b>Verzonden:</b> <? echo $object->datum ?><hr color="#000000" width="60%" size="1\">
<?
$bericht = $object->bericht;
$bericht = htmlspecialchars($bericht);
$bericht = nl2br($bericht);
$bericht = str_replace("\n","<br>",$bericht);
$bericht = str_replace(" "," ",$bericht);
$bericht = str_replace(":]","<img src=\"img/smiles/laugh.gif\">",$bericht);
$bericht = str_replace(":-]","<img src=\"img/smiles/laugh.gif\">",$bericht);
$bericht = str_replace(":)","<img src=\"img/smiles/smile.gif\">",$bericht);
$bericht = str_replace(":-)","<img src=\"img/smiles/smile.gif\">",$bericht);
$bericht = str_replace(":D","<img src=\"img/smiles/biggrin.gif\">",$bericht);
$bericht = str_replace(":-D","<img src=\"img/smiles/biggrin.gif\">",$bericht);
$bericht = str_replace(":P","<img src=\"img/smiles/tongue.gif\">",$bericht);
$bericht = str_replace(":-P","<img src=\"img/smiles/tongue.gif\">",$bericht);
$bericht = str_replace(":p","<img src=\"img/smiles/tongue.gif\">",$bericht);
$bericht = str_replace(":-p","<img src=\"img/smiles/tongue.gif\">",$bericht);
$bericht = str_replace(";)","<img src=\"img/smiles/wink.gif\">",$bericht);
$bericht = str_replace(";-)","<img src=\"img/smiles/wink.gif\">",$bericht);
$bericht = str_replace(":O","<img src=\"img/smiles/ohmy.gif\">",$bericht);
$bericht = str_replace(":-O","<img src=\"img/smiles/ohmy.gif\">",$bericht);
$bericht = str_replace(":o","<img src=\"img/smiles/ohmy.gif\">",$bericht);
$bericht = str_replace(":-o","<img src=\"img/smiles/ohmy.gif\">",$bericht);
$bericht = str_replace(":(","<img src=\"img/smiles/sad.gif\">",$bericht);
$bericht = str_replace(":-(","<img src=\"img/smiles/sad.gif\">",$bericht);
$bericht = str_replace("8)","<img src=\"img/smiles/cool.gif\">",$bericht);
$bericht = str_replace("8-)","<img src=\"img/smiles/cool.gif\">",$bericht);
$bericht = str_replace(":\\","<img src=\"img/smiles/dry.gif\">",$bericht);
$bericht = str_replace(":-\\","<img src=\"img/smiles/dry.gif\">",$bericht);
$bericht = str_replace("%)","<img src=\"img/smiles/rolleyes.gif\">",$bericht);
$bericht = str_replace("%-)","<img src=\"img/smiles/rolleyes.gif\">",$bericht);
$bericht = str_replace(":@","<img src=\"img/smiles/dry.gif\">",$bericht);
$bericht = str_replace(":-@","<img src=\"img/smiles/dry.gif\">",$bericht);
$bericht = str_replace(":|","<img src=\"img/smiles/unsure.gif\">",$bericht);
$bericht = str_replace(":-|","<img src=\"img/smiles/unsure.gif\">",$bericht);
$bericht = str_replace(":?","<img src=\"img/smiles/huh.gif\">",$bericht);
$bericht = str_replace(":-?","<img src=\"img/smiles/huh.gif\">",$bericht);
$bericht = str_replace("|8|","<img src=\"img/smiles/ph34r.gif\">",$bericht);
$bericht = str_replace("|8-|","<img src=\"img/smiles/ph34r.gif\">",$bericht);
$bericht = str_replace("8/","<img src=\"img/smiles/blink.gif\">",$bericht);
$bericht = str_replace("8-/","<img src=\"img/smiles/blink.gif\">",$bericht);
$bericht = preg_replace("#\[b\](.*?)\[/b\]#si","<b>\\1</b>", $bericht);
$bericht = preg_replace("#\[i\](.*?)\[/i\]#si","<i>\\1</i>", $bericht);
$bericht = preg_replace("#\[u\](.*?)\[/u\]#si","<u>\\1</u>", $bericht);
$bericht = preg_replace("#\[center\](.*?)\[/center\]#si","<b>\\1</b>", $bericht);
$bericht = preg_replace("#\[hr\]#si","<hr color=\"#000000\" width=\"60%\" size=\"1\">", $bericht);
$bericht = preg_replace("#\[code\](.*?)\[/code\]#si","<font style=\"font-family: Courier New\">\\1</font>", $bericht);
$bericht = eregi_replace("([a-zA-Z0-9_-]+)@([a-zA-Z0-9\._-]+)(\.[a-zA-Z]+)", "<a href=\"mailto:\\1@\\2\\3\">\\1@\\2\\3</a>", $bericht);
$bericht = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\0\" target=\"_blank\">\\0</a>",$bericht);
$bericht = preg_replace("#\[img="(.*?)"\]#si","<img src=\"http://\\1\">", $bericht);
$bericht = preg_replace("#\[color="(.*?)"](.*?)\[/color\]#si","<font color=\"\\1\">\\2</font>", $bericht);
echo $bericht;
?>
<? <b >Van :</b > <a href ="profiel.php?mid=<? echo $object->van ?>"><? echo $a ?></a><br> <b>Naar:</b> <? echo $b ?><br> <b>Verzonden:</b> <? echo $object->datum ?><hr color="#000000" width="60%" size="1\"> <? $bericht = $object->bericht; $bericht = nl2br($bericht); $bericht = str_replace(":]","<img src=\"img/smiles/laugh.gif\">",$bericht); $bericht = str_replace(":-]","<img src=\"img/smiles/laugh.gif\">",$bericht); $bericht = str_replace(":)","<img src=\"img/smiles/smile.gif\">",$bericht); $bericht = str_replace(":-)","<img src=\"img/smiles/smile.gif\">",$bericht); $bericht = str_replace(":D","<img src=\"img/smiles/biggrin.gif\">",$bericht); $bericht = str_replace(":-D","<img src=\"img/smiles/biggrin.gif\">",$bericht); $bericht = str_replace(":P","<img src=\"img/smiles/tongue.gif\">",$bericht); $bericht = str_replace(":-P","<img src=\"img/smiles/tongue.gif\">",$bericht); $bericht = str_replace(":p","<img src=\"img/smiles/tongue.gif\">",$bericht); $bericht = str_replace(":-p","<img src=\"img/smiles/tongue.gif\">",$bericht); $bericht = str_replace(";)","<img src=\"img/smiles/wink.gif\">",$bericht); $bericht = str_replace(";-)","<img src=\"img/smiles/wink.gif\">",$bericht); $bericht = str_replace(":O","<img src=\"img/smiles/ohmy.gif\">",$bericht); $bericht = str_replace(":-O","<img src=\"img/smiles/ohmy.gif\">",$bericht); $bericht = str_replace(":o","<img src=\"img/smiles/ohmy.gif\">",$bericht); $bericht = str_replace(":-o","<img src=\"img/smiles/ohmy.gif\">",$bericht); $bericht = str_replace(":(","<img src=\"img/smiles/sad.gif\">",$bericht); $bericht = str_replace(":-(","<img src=\"img/smiles/sad.gif\">",$bericht); $bericht = str_replace("8)","<img src=\"img/smiles/cool.gif\">",$bericht); $bericht = str_replace("8-)","<img src=\"img/smiles/cool.gif\">",$bericht); $bericht = str_replace(":\\","<img src =\ "img/smiles/dry.gif\">",$bericht); $bericht = str_replace(":-\\","<img src =\ "img/smiles/dry.gif\">",$bericht); $bericht = str_replace("%)","<img src=\"img/smiles/rolleyes.gif\">",$bericht); $bericht = str_replace("%-)","<img src=\"img/smiles/rolleyes.gif\">",$bericht); $bericht = str_replace(":@","<img src=\"img/smiles/dry.gif\">",$bericht); $bericht = str_replace(":-@","<img src=\"img/smiles/dry.gif\">",$bericht); $bericht = str_replace(":|","<img src=\"img/smiles/unsure.gif\">",$bericht); $bericht = str_replace(":-|","<img src=\"img/smiles/unsure.gif\">",$bericht); $bericht = str_replace(":?","<img src=\"img/smiles/huh.gif\">",$bericht); $bericht = str_replace(":-?","<img src=\"img/smiles/huh.gif\">",$bericht); $bericht = str_replace("|8|","<img src=\"img/smiles/ph34r.gif\">",$bericht); $bericht = str_replace("|8-|","<img src=\"img/smiles/ph34r.gif\">",$bericht); $bericht = str_replace("8/","<img src=\"img/smiles/blink.gif\">",$bericht); $bericht = str_replace("8-/","<img src=\"img/smiles/blink.gif\">",$bericht); $bericht = preg_replace("#\[b\](.*?)\[/b\]#si","<b>\\1</b>", $bericht); $bericht = preg_replace("#\[i\](.*?)\[/i\]#si","<i>\\1</i>", $bericht); $bericht = preg_replace("#\[u\](.*?)\[/u\]#si","<u>\\1</u>", $bericht); $bericht = preg_replace("#\[center\](.*?)\[/center\]#si","<b>\\1</b>", $bericht); $bericht = preg_replace("#\[hr\]#si","<hr color=\"#000000\" width=\"60%\" size=\"1\">", $bericht); $bericht = preg_replace("#\[code\](.*?)\[/code\]#si","<font style=\"font-family: Courier New\">\\1</font>", $bericht); $bericht = eregi_replace("([a-zA-Z0-9_-]+)@([a-zA-Z0-9\._-]+)(\.[a-zA-Z]+)", "<a href=\"mailto:\\1@\\2\\3\">\\1@\\2\\3</a>", $bericht); $bericht = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]","<a href=\"\\0\" target=\"_blank\">\\0</a>",$bericht); $bericht = preg_replace("#\[img="(.*?)"\]#si","<img src=\"http://\\1\">", $bericht); $bericht = preg_replace("#\[color="(.*?)"](.*?)\[/color\]#si","<font color=\"\\1\">\\2</font>", $bericht); ?>
|