Nieuw lid |
|
Hallo,
Ik maak gebruik van dit nieuwsscript:
http://www.phpfreakz.nl/library.php?sid=3576
(Nieuwssysteem [Reacties en Admin] 2.1 gemaakt door Joel van hier)
En ik wilde graag dit UBB script erbij toevoegen:
http://www.site...amp;id=177
Alleen ik krijg het niet werkend 
Ik krijg wel als ik de smileys invoeg bij nieuwstoevoegen dan zie ik ze wel maar ik kan er niet op klikken 
En als ik dan me geplaatste nieuwsbericht lees op nieuws.php dan zie ik alleen de code en niet omgezet naar een smilie 
Dit is mijn url waar je het nieuws kan zien:
http://members.lycos.nl/eigenftp/test/nieuws.php
En de nieuwstoevoegen url is:
http://members....voegen.php
En op de nieuws pagina krijg ik elke keer als ik include ('ubb.php'); doe van die rare tekens te zien aan de linkerkant 
Maar voor degene die misschien mij kan vertellen wat ik fout doe zijn hier de codes wat ik heb:
***** NIEUWS.PHP *****
<?php
include ('config.php');
include ('ubb.php');
$sql = "SELECT * FROM nieuws ORDER BY ID DESC";
$query = mysql_query($sql) or die(mysql_error());
$rtel = mysql_num_rows($query);
if ($rtel < 1) {
echo "<div align=center><font face=verdana size=-1>Er zijn nog geen nieuwsberichten</font></div>";
} else {
$rtel/=$max;
if (empty($pagina)) $pagina=1;
$van=($pagina-1)*$max;
if ($pagina > ceil($rtel)) $pagina=1;
for ($i = 1; $i <= ceil($rtel); $i++) {
if ($pagina == $i)
$paginas[$i] = "<b>$i</b>";
else
$paginas[$i] = "<a href=".$_SERVER[REQUEST_URI]."?pagina=".$i.">".$i."</a>";
}
$paginas= implode(" | ", $paginas);
$vorige = ($pagina-1) ? "<a href=\"$php_self?pagina=" . ($pagina - 1)
. "\">< Vorige</a>" : "";
$volgende = ($pagina-ceil($rtel)) ? "<a href=\"$php_self?pagina=" .
($pagina + 1) . "\">Volgende ></a>" : "";
if ($vorige && $volgende) {
$navigatie = ("<font face=\"verdana\" size=\"-1\" color=\"#000000\">
$vorige <font color=\"#000000\">|</font> $paginas
<font face=\"verdana\" size=\"-1\" color=\"#000000\"> |</font> $volgende</font>");
} else {
$navigatie = ("<font face=\"verdana\" size=\"-1\" color=\"#000000\">
$vorige <font color=\"#000000\">|</font> $paginas <font face=\"verdana\"
size=\"-1\" color=\"#000000\">|</font> $volgende</font>");
}
$query = mysql_query("SELECT * FROM nieuws ORDER BY id DESC LIMIT $van, $max");
while ($obj = mysql_fetch_object($query)) {
$bericht=htmlspecialchars($obj->bericht);
$bericht=nl2br($bericht);
$bericht = wordwrap($bericht, 60, "\n", 1 );
$nieuwsid = "$obj->id";
$rij = mysql_query("SELECT * FROM nieuwscomments WHERE nieuwsid=$nieuwsid ORDER BY id DESC");
$comments = mysql_num_rows($rij);
if ($comments == "1")
$commentsnaam ="<a href=\"nieuwsscript/nieuwscomments.php?nieuwsid=$nieuwsid\"><font color=\"#000080\">$comments reactie</font></a>";
else
$commentsnaam ="<a href=\"nieuwsscript/nieuwscomments.php?nieuwsid=$nieuwsid\"><font color=\"#000080\">$comments reacties</font></a>";
if ($comments == "0")
$commentsnaam ="<a href=\"nieuwsscript/nieuwscomments.php?nieuwsid=$nieuwsid\"><font color=\"#000080\">Post een reactie</font></a>";
?>
<?php
include ('config.php');
?>
<div align="center">
<table width="89%" border="1" cellspacing="1" cellpadding="2" bordercolor="#666666" bgcolor="#000000">
<tr bgcolor="#999999">
<td width="35%"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><b>Onderwerp:</b>
<?php echo"$obj->onderwerp"; ?></font></td>
<td width="29%"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><b>Gepost
door:</b> <?php echo"$obj->naam"; ?></font></td>
<td width="36%"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><b>Gepost
op:</b> <?php echo $obj->datum; ?></font></td>
</tr>
<tr bgcolor="#CCCCCC">
<td colspan="3">
<font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><?php echo $bericht; ?>
</font></td>
</tr>
<tr bgcolor="#999999">
<td colspan="3">
<div align="right">
<font face="Verdana, Arial, Helvetica, sans-serif" size="-1">
[ <?php echo $commentsnaam; ?> ]
</font>
</div>
</td>
</tr>
</table>
</div>
<br>
<?php } ?>
<div align="center">
<table width="89%" border="1" cellspacing="1" cellpadding="2" bordercolor="#000000" bgcolor="#666666">
<tr>
<td bgcolor="#999999">
<div align="center"><font size="-1"><?php echo"$navigatie"; ?></font></div>
</td>
</tr>
</table>
</div>
<?php } ?>
<?php include ('config.php'); include ('ubb.php'); $sql = "SELECT * FROM nieuws ORDER BY ID DESC"; if ($rtel < 1) { echo "<div align=center><font face=verdana size=-1>Er zijn nog geen nieuwsberichten</font></div>"; } else { $rtel/=$max; if (empty($pagina)) $pagina=1; $van=($pagina-1)*$max; if ($pagina > ceil($rtel)) $pagina=1; for ($i = 1; $i <= ceil($rtel); $i++) { if ($pagina == $i) $paginas[$i] = "<b>$i</b>"; else $paginas[$i] = "<a href=".$_SERVER[REQUEST_URI]."?pagina=".$i.">".$i."</a>"; } $paginas= implode(" | ", $paginas); $vorige = ($pagina-1) ? "<a href=\"$php_self?pagina=" . ($pagina - 1) . "\">< Vorige</a>" : ""; $volgende = ($pagina-ceil($rtel)) ? "<a href=\"$php_self?pagina=" . ($pagina + 1) . "\">Volgende ></a>" : ""; if ($vorige && $volgende) { $navigatie = ("<font face=\"verdana\" size=\"-1\" color=\"#000000\"> $vorige <font color=\"#000000\">|</font> $paginas <font face=\"verdana\" size=\"-1\" color=\"#000000\"> |</font> $volgende</font>"); } else { $navigatie = ("<font face=\"verdana\" size=\"-1\" color=\"#000000\"> $vorige <font color=\"#000000\">|</font> $paginas <font face=\"verdana\" size=\"-1\" color=\"#000000\">|</font> $volgende</font>"); } $query = mysql_query("SELECT * FROM nieuws ORDER BY id DESC LIMIT $van, $max"); $bericht=nl2br($bericht); $bericht = wordwrap($bericht, 60, "\n", 1 ); $nieuwsid = "$obj->id"; $rij = mysql_query("SELECT * FROM nieuwscomments WHERE nieuwsid=$nieuwsid ORDER BY id DESC"); if ($comments == "1") $commentsnaam ="<a href=\"nieuwsscript/nieuwscomments.php?nieuwsid=$nieuwsid\"><font color=\"#000080\">$comments reactie</font></a>"; else $commentsnaam ="<a href=\"nieuwsscript/nieuwscomments.php?nieuwsid=$nieuwsid\"><font color=\"#000080\">$comments reacties</font></a>"; if ($comments == "0") $commentsnaam ="<a href=\"nieuwsscript/nieuwscomments.php?nieuwsid=$nieuwsid\"><font color=\"#000080\">Post een reactie</font></a>"; ?> <?php include ('config.php'); ?> <div align="center"> <table width="89%" border="1" cellspacing="1" cellpadding="2" bordercolor="#666666" bgcolor="#000000"> <tr bgcolor="#999999"> <td width="35%"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><b>Onderwerp:</b> <?php echo"$obj->onderwerp"; ?></font></td> <td width="29%"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><b>Gepost door:</b> <?php echo"$obj->naam"; ?></font></td> <td width="36%"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><b>Gepost op:</b> <?php echo $obj->datum; ?></font></td> </tr> <tr bgcolor="#CCCCCC"> <td colspan="3"> <font face="Verdana, Arial, Helvetica, sans-serif" size="-1"> <?php echo $bericht; ?> </font></td> </tr> <tr bgcolor="#999999"> <td colspan="3"> <div align="right"> <font face="Verdana, Arial, Helvetica, sans-serif" size="-1"> [ <?php echo $commentsnaam; ?> ] </font> </div> </td> </tr> </table> </div> <br> <?php } ?> <div align="center"> <table width="89%" border="1" cellspacing="1" cellpadding="2" bordercolor="#000000" bgcolor="#666666"> <tr> <td bgcolor="#999999"> <div align="center"><font size="-1"> <?php echo"$navigatie"; ?></font></div> </td> </tr> </table> </div> <?php } ?>
***** NIEUWSTOEVOEGEN.PHP *****
<script language="javascript">
function setCursor()
{
if(document.frmPost.bericht.createTextRange)
{
document.frmPost.bericht.caretPos = document.selection.createRange().duplicate();
}
}
function ubb(begin,eind,opmaak)
{
if(!eind && !opmaak)
{
if(document.frmPost.bericht.createTextRange && document.frmPost.bericht.caretPos)
{
document.frmPost.bericht.caretPos.text = begin;
}
}
else if(opmaak == "dubbel")
{
var selectie = document.selection.createRange().text;
if(!selectie)
{
var url_deel = prompt("Typ hier de/het "+ begin +" die/dat geplaatst moet worden:","");
var tekst_deel = prompt("Typ hier de tekst die geplaatst moet worden:","");
if(url_deel && tekst_deel)
{
document.frmPost.bericht.caretPos.text = "["+begin+"="+url_deel+"]" + tekst_deel + "[/"+eind+"]";
}
}
if(selectie)
{
var url_deel = prompt("Typ hier de url die geplaatst moet worden:","");
if(url_deel)
{
document.selection.createRange().text = "["+begin+"="+url_deel+"]" + selectie + "[/"+eind+"]";
}
}
}
else
{
if(opmaak != "geen")
{
var selectie = document.selection.createRange().text;
if(!selectie)
{
var new_inhoud = prompt("Typ hier de tekst in waarrond "+begin+" & "+eind+" geplaatst moet worden:","");
if(new_inhoud)
{
document.frmPost.bericht.caretPos.text = begin + new_inhoud + eind;
}
}
if(selectie)
{
document.selection.createRange().text = begin + selectie + eind;
}
}
}
document.frmPost.bericht.focus();
return;
}
</script>
</head>
<body>
<?php
include ('config.php');
$arraymaand = array("Januari","Februari","Maart","April","Mei","Juni",
"Juli","Augustus","September","Oktober","November","December");
$datum = date("j ") . $arraymaand[date("n") - 1] . date(" Y");
if ($_POST['submit']) {
if ($bericht == "")
$error="Je moet een bericht invullen!";
if ($naam == "")
$error="Je moet je naam invullen!";
if ($emailadres== "")
$error="Je moet je e-mailadres invullen!";
if ($onderwerp == "")
$error="Je moet een onderwerp invullen!";
if (!$error) {
$query = "INSERT INTO nieuws (datum,bericht,emailadres,onderwerp,naam)
VALUES ('$datum','$bericht','$emailadres','$onderwerp','$naam')";
mysql_query($query) or die (mysql_error());
?>
<div align="center">
<table width="39%" border="1" cellspacing="3" cellpadding="2" bordercolor="#999999" bgcolor="#666666">
<tr>
<td height="22" bgcolor="#999999"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><b>Nieuws
toevoegen: </b></font></td>
</tr>
<tr>
<td height="46" bgcolor="#CCCCCC">
<div align="left"><font face="Arial, Helvetica, sans-serif" size="-1">Het
nieuws is <b>succesvol</b> toegevoegd!</font></div>
</td>
</tr>
<tr>
<td height="21" bgcolor="#999999">
<div align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1">[
Terug naar <a href="nieuws.php">nieuws</a> ]</font></div>
</td>
</tr>
</table>
</div>
<?php
} elseif ($error) {
?>
<div align="center">
<table width="39%" border="1" cellspacing="3" cellpadding="2" bordercolor="#999999" bgcolor="#666666">
<tr>
<td height="22" bgcolor="#999999"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><b>Nieuws
toevoegen: </b></font> </td>
</tr>
<tr>
<td height="23" bgcolor="#CCCCCC">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="97%">
<font face="Arial" color="red" size="-1"><b>Error:</b>
<?php echo"$error"; ?>
</font>
</td>
<td width="3%">
<div align="right">
<input onClick="javascript:history.go(-1);" type="button" name="Button" value="Terug">
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<?php
}
} else {
?>
<form action="" method="post" name="frmPost">
<div align="center">
<table width="39%" border="1" cellspacing="2" cellpadding="2" bordercolor="#999999" bgcolor="#666666">
<tr bgcolor="#999999">
<td colspan="2" height="22"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><b>Nieuws
toevoegen: </b></font></td>
</tr>
<tr bgcolor="#CCCCCC">
<td width="58%">
<div align="left"><font size="-1" face="Verdana, Arial, Helvetica,
sans-serif">Je naam: </font></div>
</td>
<td width="42%"><font size="-1"><font size="-1"><font face="Verdana, Arial, Helvetica, sans-serif">
<input type="text" name="naam" size="30">
</font></font></font></td>
</tr>
<tr bgcolor="#CCCCCC">
<td width="58%">
<div align="left"><font size="-1"><font size="-1"> <font face="Verdana, Arial, Helvetica, sans-serif">
</font></font><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">Je
e-mailadres: </font><font face="Verdana, Arial, Helvetica, sans-serif">
</font></font></div>
</td>
<td width="42%"><font size="-1"><font size="-1"><font face="Verdana, Arial, Helvetica, sans-serif">
<input type="text" name="emailadres" size="30">
</font></font></font></td>
</tr>
<tr bgcolor="#CCCCCC">
<td width="58%">
<div align="left"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">Het
onderwerp: </font></div>
</td>
<td width="42%"><font size="-1"><font size="-1"><font face="Verdana, Arial, Helvetica, sans-serif">
<input type="text" name="onderwerp" size="30">
</font></font></font></td>
</tr>
<tr bgcolor="#CCCCCC">
<td colspan="2">
<div align="center"><font face="Verdana, Arial, Helvetica,
sans-serif" size="-1">Bericht: </font><font size="-1"
face="Verdana, Arial, Helvetica, sans-serif"> </font><br><br>
<table width="466" border="0" cellpadding="1" cellspacing="0">
<tr>
<td colspan="21" align="center">
<img src='smileys/left.gif' width="20" height="20" onclick="ubb('[left]','[/left]','URL invoegen');">
<img src='smileys/center.gif' width="20" height="20" onclick="ubb('[center]','[/center]','URL invoegen');">
<img src='smileys/right.gif' width="20" height="20" onclick="ubb('[right]','[/right]','URL invoegen');">
<img src='smileys/b.gif' width="20" height="20" onclick="ubb('[b]','[/b]','URL invoegen');"><img src='smileys/i.gif' width="20" height="20" onclick="ubb('[i]','[/i]','URL invoegen');"><img src='smileys/u.gif' width="20" height="20" onclick="ubb('[u]','[/u]','URL invoegen');">
</td>
</tr>
<tr>
<td width="20" height="31"><img src="smileys/emotie1.gif" width="20" height="20" onclick="ubb(':d');"></td>
<td width="20"><img src="smileys/emotie3.gif" width="20" height="20" onclick="ubb(':|');"></td>
<td width="20"><img src="smileys/emotie5.gif" width="20" height="20" onclick="ubb('(h)');"></td>
<td width="20"><img src="smileys/emotie7.gif" width="19" height="19" onclick="ubb('(6)');"></td>
<td width="20"><img src="smileys/emotie9.gif" width="20" height="20" onclick="ubb('(h2)');"></td>
<td width="20"><img src="smileys/emotie11.gif" width="20" height="20" onclick="ubb(':X');"></td>
<td width="20"><img src="smileys/emotie13.gif" width="20" height="20" onclick="ubb(',)');"></td>
<td width="20"><img src="smileys/emotie15.gif" width="20" height="20" onclick="ubb(':/');"></td>
<td width="20"><img src="smileys/emotie17.gif" width="18" height="18" onclick="ubb(':!s');"></td>
<td width="16"><img src="smileys/emotie28.gif" width="20" height="20" onclick="ubb(':!/');"></td>
<td width="22"><img src="smileys/happy.gif" width="20" height="20" onclick="ubb('<)');"></td>
<td width="14"><img src="smileys/icon9.gif" width="19" height="19" onclick="ubb(':!|');"></td>
<td width="14"><img src="smileys/laugh.gif" width="20" height="20" onclick="ubb('<d');"></td>
<td width="14"><img src="smileys/mellow.gif" width="20" height="20" onclick="ubb(':-|');"></td>
<td width="14"><img src="smileys/ohmy.gif" width="20" height="20" onclick="ubb(':o');"></td>
<td width="14"><img src="smileys/rolleyes.gif" width="20" height="20" onclick="ubb(':!)');"></td>
<td width="14"><img src="smileys/sleep.gif" width="20" height="20" onclick="ubb('>|');"></td>
<td width="14"><img src="smileys/unsure.gif" width="20" height="20" onclick="ubb('8-)');"></td>
<td width="14"><img src="smileys/wink.gif" width="20" height="20" onclick="ubb(';)');"></td>
<td><img src="smileys/vraag.gif" width="20" height="20" onclick="ubb('(?)');"></td>
<td width="82" rowspan="2"><img src="smileys/offtopic.gif" width="47" height="51" onclick="ubb('(off)');"></td>
</tr>
<tr>
<td height="31"><img src="smileys/emotie2.gif" width="18" height="18" onclick="ubb('(8)');"></td>
<td><img src="smileys/emotie4.gif" width="20" height="20" onclick="ubb('8'|');"></td>
<td><img src="smileys/emotie6.gif" width="18" height="18" onclick="ubb(';!s');"></td>
<td><img src="smileys/emotie8.gif" width="20" height="20" onclick="ubb('0)');"></td>
<td><img src="smileys/emotie10.gif" width="20" height="20" onclick="ubb(':!!/');"></td>
<td><img src="smileys/emotie12.gif" width="20" height="20" onclick="ubb(':°');"></td>
<td><img src="smileys/emotie14.gif" width="20" height="20" onclick="ubb('x)');"></td>
<td><img src="smileys/emotie16.gif" width="20" height="20" onclick="ubb('x!');"></td>
<td><img src="smileys/emotie18.gif" width="20" height="20" onclick="ubb(':-0');"></td>
<td><img src="smileys/emotie38.gif" width="20" height="20" onclick="ubb(':p');"></td>
<td><img src="smileys/huh.gif" width="20" height="20" onclick="ubb('(n)');"></td>
<td><img src="smileys/icon13.gif" width="19" height="19" onclick="ubb('(!)');"></td>
<td><img src="smileys/mad.gif" width="20" height="20" onclick="ubb(':(');"></td>
<td><img src="smileys/middelv2.gif" width="40" height="18" onclick="ubb('(f)');"></td>
<td><img src="smileys/ph34r.gif" width="20" height="20" onclick="ubb('(-)');"></td>
<td><img src="smileys/sad.gif" width="20" height="20" onclick="ubb('*(');"></td>
<td><img src="smileys/smile.gif" width="20" height="20" onclick="ubb(':)');"></td>
<td><img src="smileys/wacko.gif" width="20" height="20" onclick="ubb(':s');"></td>
<td><img src="smileys/wub.gif" width="22" height="29" onclick="ubb('(l)');"></td>
<td><img src="smileys/hard.gif" width="20" height="20" onclick="ubb('(lh)');"></td>
</tr>
</table>
</div>
</td>
</tr>
<tr bgcolor="#CCCCCC">
<td colspan="2">
<div align="center"><font size="-1"><font size="-1"> <font face="Verdana, Arial, Helvetica, sans-serif">
</font></font><font face="Verdana, Arial, Helvetica, sans-serif">
<br><textarea rows="9" cols="90" name="bericht" onkeyup="setCursor();" onkeydown="setCursor();" onfocus="setCursor();" onclick="setCursor();">Tik hier je tekst...</textarea>
</font></font></div>
</td>
</tr>
<tr bgcolor="#CCCCCC">
<td colspan="2"> </td>
</tr>
<tr bgcolor="#999999">
<td colspan="2" height="20">
<div align="center">
<input type="submit" value="Post nieuws" name="submit">
<input type="reset" value="Wis velden" name="reset">
<input type="button" value="Terug naar nieuws"
onClick="window.location='nieuws.php' " name="button">
</div>
</td>
</tr>
</table>
</div>
</form>
<?php } ?>
<script language="javascript"> function setCursor() { if(document.frmPost.bericht.createTextRange) { document.frmPost.bericht.caretPos = document.selection.createRange().duplicate(); } } function ubb(begin,eind,opmaak) { if(!eind && !opmaak) { if(document.frmPost.bericht.createTextRange && document.frmPost.bericht.caretPos) { document.frmPost.bericht.caretPos.text = begin; } } else if(opmaak == "dubbel") { var selectie = document.selection.createRange().text; if(!selectie) { var url_deel = prompt("Typ hier de/het "+ begin +" die/dat geplaatst moet worden:",""); var tekst_deel = prompt("Typ hier de tekst die geplaatst moet worden:",""); if(url_deel && tekst_deel) { document.frmPost.bericht.caretPos.text = "["+begin+"="+url_deel+"]" + tekst_deel + "[/"+eind+"]"; } } if(selectie) { var url_deel = prompt("Typ hier de url die geplaatst moet worden:",""); if(url_deel) { document.selection.createRange().text = "["+begin+"="+url_deel+"]" + selectie + "[/"+eind+"]"; } } } else { if(opmaak != "geen") { var selectie = document.selection.createRange().text; if(!selectie) { var new_inhoud = prompt("Typ hier de tekst in waarrond "+begin+" & "+eind+" geplaatst moet worden:",""); if(new_inhoud) { document.frmPost.bericht.caretPos.text = begin + new_inhoud + eind; } } if(selectie) { document.selection.createRange().text = begin + selectie + eind; } } } document.frmPost.bericht.focus(); return; } </script> </head> <body> <?php include ('config.php'); $arraymaand = array("Januari","Februari","Maart","April","Mei","Juni", "Juli","Augustus","September","Oktober","November","December"); $datum = date("j ") . $arraymaand[date("n") - 1] . date(" Y"); if ($_POST['submit']) { if ($bericht == "") $error="Je moet een bericht invullen!"; if ($naam == "") $error="Je moet je naam invullen!"; if ($emailadres== "") $error="Je moet je e-mailadres invullen!"; if ($onderwerp == "") $error="Je moet een onderwerp invullen!"; if (!$error) { $query = "INSERT INTO nieuws (datum,bericht,emailadres,onderwerp,naam) VALUES ('$datum','$bericht','$emailadres','$onderwerp','$naam')"; ?> <div align="center"> <table width="39%" border="1" cellspacing="3" cellpadding="2" bordercolor="#999999" bgcolor="#666666"> <tr> <td height="22" bgcolor="#999999"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><b>Nieuws toevoegen: </b></font></td> </tr> <tr> <td height="46" bgcolor="#CCCCCC"> <div align="left"><font face="Arial, Helvetica, sans-serif" size="-1">Het nieuws is <b>succesvol</b> toegevoegd!</font></div> </td> </tr> <tr> <td height="21" bgcolor="#999999"> <div align="right"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1">[ Terug naar <a href="nieuws.php">nieuws</a> ]</font></div> </td> </tr> </table> </div> <?php } elseif ($error) { ?> <div align="center"> <table width="39%" border="1" cellspacing="3" cellpadding="2" bordercolor="#999999" bgcolor="#666666"> <tr> <td height="22" bgcolor="#999999"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><b>Nieuws toevoegen: </b></font> </td> </tr> <tr> <td height="23" bgcolor="#CCCCCC"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="97%"> <font face="Arial" color="red" size="-1"><b>Error:</b> </font> </td> <td width="3%"> <div align="right"> <input onClick="javascript:history.go(-1);" type="button" name="Button" value="Terug"> </div> </td> </tr> </table> </td> </tr> </table> </div> <?php } } else { ?> <form action="" method="post" name="frmPost"> <div align="center"> <table width="39%" border="1" cellspacing="2" cellpadding="2" bordercolor="#999999" bgcolor="#666666"> <tr bgcolor="#999999"> <td colspan="2" height="22"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1"><b>Nieuws toevoegen: </b></font></td> </tr> <tr bgcolor="#CCCCCC"> <td width="58%"> <div align="left"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">Je naam: </font></div> </td> <td width="42%"><font size="-1"><font size="-1"><font face="Verdana, Arial, Helvetica, sans-serif"> <input type="text" name="naam" size="30"> </font></font></font></td> </tr> <tr bgcolor="#CCCCCC"> <td width="58%"> <div align="left"><font size="-1"><font size="-1"> <font face="Verdana, Arial, Helvetica, sans-serif"> </font></font><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">Je e-mailadres: </font><font face="Verdana, Arial, Helvetica, sans-serif"> </font></font></div> </td> <td width="42%"><font size="-1"><font size="-1"><font face="Verdana, Arial, Helvetica, sans-serif"> <input type="text" name="emailadres" size="30"> </font></font></font></td> </tr> <tr bgcolor="#CCCCCC"> <td width="58%"> <div align="left"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">Het onderwerp: </font></div> </td> <td width="42%"><font size="-1"><font size="-1"><font face="Verdana, Arial, Helvetica, sans-serif"> <input type="text" name="onderwerp" size="30"> </font></font></font></td> </tr> <tr bgcolor="#CCCCCC"> <td colspan="2"> <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="-1">Bericht: </font><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"> </font><br><br> <table width="466" border="0" cellpadding="1" cellspacing="0"> <tr> <td colspan="21" align="center"> <img src='smileys/left.gif' width="20" height="20" onclick="ubb('[left]','[/left]','URL invoegen');"> <img src='smileys/center.gif' width="20" height="20" onclick="ubb('[center]','[/center]','URL invoegen');"> <img src='smileys/right.gif' width="20" height="20" onclick="ubb('[right]','[/right]','URL invoegen');"> <img src='smileys/b.gif' width="20" height="20" onclick="ubb('[b]','[/b]','URL invoegen');"><img src='smileys/i.gif' width="20" height="20" onclick="ubb('[i]','[/i]','URL invoegen');"><img src='smileys/u.gif' width="20" height="20" onclick="ubb('[u]','[/u]','URL invoegen');"> </td> </tr> <tr> <td width="20" height="31"><img src="smileys/emotie1.gif" width="20" height="20" onclick="ubb(':d');"></td> <td width="20"><img src="smileys/emotie3.gif" width="20" height="20" onclick="ubb(':|');"></td> <td width="20"><img src="smileys/emotie5.gif" width="20" height="20" onclick="ubb('(h)');"></td> <td width="20"><img src="smileys/emotie7.gif" width="19" height="19" onclick="ubb('(6)');"></td> <td width="20"><img src="smileys/emotie9.gif" width="20" height="20" onclick="ubb('(h2)');"></td> <td width="20"><img src="smileys/emotie11.gif" width="20" height="20" onclick="ubb(':X');"></td> <td width="20"><img src="smileys/emotie13.gif" width="20" height="20" onclick="ubb(',)');"></td> <td width="20"><img src="smileys/emotie15.gif" width="20" height="20" onclick="ubb(':/');"></td> <td width="20"><img src="smileys/emotie17.gif" width="18" height="18" onclick="ubb(':!s');"></td> <td width="16"><img src="smileys/emotie28.gif" width="20" height="20" onclick="ubb(':!/');"></td> <td width="22"><img src="smileys/happy.gif" width="20" height="20" onclick="ubb('<)');"></td> <td width="14"><img src="smileys/icon9.gif" width="19" height="19" onclick="ubb(':!|');"></td> <td width="14"><img src="smileys/laugh.gif" width="20" height="20" onclick="ubb('<d');"></td> <td width="14"><img src="smileys/mellow.gif" width="20" height="20" onclick="ubb(':-|');"></td> <td width="14"><img src="smileys/ohmy.gif" width="20" height="20" onclick="ubb(':o');"></td> <td width="14"><img src="smileys/rolleyes.gif" width="20" height="20" onclick="ubb(':!)');"></td> <td width="14"><img src="smileys/sleep.gif" width="20" height="20" onclick="ubb('>|');"></td> <td width="14"><img src="smileys/unsure.gif" width="20" height="20" onclick="ubb('8-)');"></td> <td width="14"><img src="smileys/wink.gif" width="20" height="20" onclick="ubb(';)');"></td> <td><img src="smileys/vraag.gif" width="20" height="20" onclick="ubb('(?)');"></td> <td width="82" rowspan="2"><img src="smileys/offtopic.gif" width="47" height="51" onclick="ubb('(off)');"></td> </tr> <tr> <td height="31"><img src="smileys/emotie2.gif" width="18" height="18" onclick="ubb('(8)');"></td> <td><img src="smileys/emotie4.gif" width="20" height="20" onclick="ubb('8'|');"></td> <td><img src="smileys/emotie6.gif" width="18" height="18" onclick="ubb(';!s');"></td> <td><img src="smileys/emotie8.gif" width="20" height="20" onclick="ubb('0)');"></td> <td><img src="smileys/emotie10.gif" width="20" height="20" onclick="ubb(':!!/');"></td> <td><img src="smileys/emotie12.gif" width="20" height="20" onclick="ubb(':°');"></td> <td><img src="smileys/emotie14.gif" width="20" height="20" onclick="ubb('x)');"></td> <td><img src="smileys/emotie16.gif" width="20" height="20" onclick="ubb('x!');"></td> <td><img src="smileys/emotie18.gif" width="20" height="20" onclick="ubb(':-0');"></td> <td><img src="smileys/emotie38.gif" width="20" height="20" onclick="ubb(':p');"></td> <td><img src="smileys/huh.gif" width="20" height="20" onclick="ubb('(n)');"></td> <td><img src="smileys/icon13.gif" width="19" height="19" onclick="ubb('(!)');"></td> <td><img src="smileys/mad.gif" width="20" height="20" onclick="ubb(':(');"></td> <td><img src="smileys/middelv2.gif" width="40" height="18" onclick="ubb('(f)');"></td> <td><img src="smileys/ph34r.gif" width="20" height="20" onclick="ubb('(-)');"></td> <td><img src="smileys/sad.gif" width="20" height="20" onclick="ubb('*(');"></td> <td><img src="smileys/smile.gif" width="20" height="20" onclick="ubb(':)');"></td> <td><img src="smileys/wacko.gif" width="20" height="20" onclick="ubb(':s');"></td> <td><img src="smileys/wub.gif" width="22" height="29" onclick="ubb('(l)');"></td> <td><img src="smileys/hard.gif" width="20" height="20" onclick="ubb('(lh)');"></td> </tr> </table> </div> </td> </tr> <tr bgcolor="#CCCCCC"> <td colspan="2"> <div align="center"><font size="-1"><font size="-1"> <font face="Verdana, Arial, Helvetica, sans-serif"> </font></font><font face="Verdana, Arial, Helvetica, sans-serif"> <br><textarea rows="9" cols="90" name="bericht" onkeyup="setCursor();" onkeydown="setCursor();" onfocus="setCursor();" onclick="setCursor();">Tik hier je tekst...</textarea> </font></font></div> </td> </tr> <tr bgcolor="#CCCCCC"> <td colspan="2"> </td> </tr> <tr bgcolor="#999999"> <td colspan="2" height="20"> <div align="center"> <input type="submit" value="Post nieuws" name="submit"> <input type="reset" value="Wis velden" name="reset"> <input type="button" value="Terug naar nieuws" onClick="window.location='nieuws.php' " name="button"> </div> </td> </tr> </table> </div> </form> <?php } ?>
En dan totslot nog:
***** UBB.PHP *****
<?
$bericht = htmlspecialchars($bericht);
$bericht = str_replace("\n","<br>",$bericht);
//smilies
$bericht = str_replace(":d", "<img src=\"smileys/emotie1.gif\">", $bericht);
$bericht = str_replace(":|", "<img src=\"smileys/emotie3.gif\">", $bericht);
$bericht = str_replace("(h)", "<img src=\"smileys/emotie5.gif\">", $bericht);
$bericht = str_replace("(6)", "<img src=\"smileys/emotie7.gif\">", $bericht);
$bericht = str_replace("(h2)", "<img src=\"smileys/emotie9.gif\">", $bericht);
$bericht = str_replace(":X", "<img src=\"smileys/emotie11.gif\">", $bericht);
$bericht = str_replace(",)", "<img src=\"smileys/emotie13.gif\">", $bericht);
$bericht = str_replace(":/", "<img src=\"smileys/emotie15.gif\">", $bericht);
$bericht = str_replace(":!s", "<img src=\"smileys/emotie17.gif\">", $bericht);
$bericht = str_replace(":!/", "<img src=\"smileys/emotie28.gif\">", $bericht);
$bericht = str_replace("<)", "<img src=\"smileys/happy.gif.gif\">", $bericht);
$bericht = str_replace(":!|", "<img src=\"smileys/icon9.gif\">", $bericht);
$bericht = str_replace("<d", "<img src=\"smileys/laugh.gif\">", $bericht);
$bericht = str_replace(":-|", "<img src=\"smileys/mellow.gif\">", $bericht);
$bericht = str_replace(":o", "<img src=\"smileys/ohmy.gif\">", $bericht);
$bericht = str_replace(":!)", "<img src=\"smileys/rolleyes.gif\">", $bericht);
$bericht = str_replace(">|", "<img src=\"smileys/sleep.gif\">", $bericht);
$bericht = str_replace("8-)", "<img src=\"smileys/unsure.gif\">", $bericht);
$bericht = str_replace(";)", "<img src=\"smileys/wink.gif\">", $bericht);
$bericht = str_replace("(?)", "<img src=\"smileys/vraag.gif\">", $bericht);
$bericht = str_replace("(off)", "<img src=\"smileys/offtopic.gif\">", $bericht);
$bericht = str_replace("(8)", "<img src=\"smileys/emotie2.gif\">", $bericht);
$bericht = str_replace("8!|", "<img src=\"smileys/emotie4.gif\">", $bericht);
$bericht = str_replace(";!s", "<img src=\"smileys/emotie6.gif\">", $bericht);
$bericht = str_replace("0)", "<img src=\"smileys/emotie8.gif\">", $bericht);
$bericht = str_replace(":!!/", "<img src=\"smileys/emotie10.gif\">", $bericht);
$bericht = str_replace(":°", "<img src=\"smileys/emotie12.gif\">", $bericht);
$bericht = str_replace("x)", "<img src=\"smileys/emotie14.gif\">", $bericht);
$bericht = str_replace("x'", "<img src=\"smileys/emotie16.gif\">", $bericht);
$bericht = str_replace(":-0", "<img src=\"smileys/emotie18.gif\">", $bericht);
$bericht = str_replace(":p", "<img src=\"smileys/emotie38.gif\">", $bericht);
$bericht = str_replace("(n)", "<img src=\"smileys/huh.gif\">", $bericht);
$bericht = str_replace("(!)", "<img src=\"smileys/icon13.gif\">", $bericht);
$bericht = str_replace(":(", "<img src=\"smileys/mad.gif\">", $bericht);
$bericht = str_replace("(f)", "<img src=\"smileys/middelv2.gif\">", $bericht);
$bericht = str_replace("(-)", "<img src=\"smileys/ph34r.gif\">", $bericht);
$bericht = str_replace("*(", "<img src=\"smileys/sad.gif\">", $bericht);
$bericht = str_replace(":)", "<img src=\"smileys/smile.gif\">", $bericht);
$bericht = str_replace(":s", "<img src=\"smileys/wacko.gif\">", $bericht);
$bericht = str_replace("(l)", "<img src=\"smileys/wub.gif\">", $bericht);
$bericht = str_replace("(lh)", "<img src=\"smileys/hard.gif\">", $bericht);
//opmaak
$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\\]","<div align=\"\\1\">\\2</div>",$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);
$bericht = eregi_replace("\[quote\]","<b style='font-size: 8pt'>Quote:</b><hr>",$bericht);
$bericht = eregi_replace('\[quote=([[:alnum:]]+)\]', "<b style='font-size: 8pt'>Quote (\\1):</b><hr>",$bericht);
$bericht = eregi_replace("\[/quote\]","<br /><hr>",$bericht);
$bericht = preg_replace("_\[code\](.*?)\[/code\]_ise", "colorcoding('\\1')", $bericht);
$bericht = str_replace("[b]","<b>",$bericht);
$bericht = str_replace("[/b]","</b>",$bericht);
$bericht = str_replace("[i]","<i>",$bericht);
$bericht = str_replace("[/i]","</i>",$bericht);
$bericht = str_replace("[u]","<u>",$bericht);
$bericht = str_replace("[/u]","</u>",$bericht);
$bericht = str_replace("[left]","<div align=\"left\">",$bericht);
$bericht = str_replace("[/left]","<div>",$bericht);
$bericht = str_replace("[center]","<center>",$bericht);
$bericht = str_replace("[/center]","</center>",$bericht);
$bericht = str_replace("[right]","<div align=\"right\">",$bericht);
$bericht = str_replace("[/right]","<div>",$bericht);
//woordfilter
$bericht = str_replace("fuck","<font color=\"#FF0000\">***</font>",$bericht);
$bericht = str_replace("shit","<font color=\"#FF0000\">***</font>",$bericht);
$bericht = str_replace("dick","<font color=\"#FF0000\">***</font>",$bericht);
$bericht = str_replace("suck","<font color=\"#FF0000\">***</font>",$bericht);
$bericht = str_replace("cum","<font color=\"#FF0000\">***</font>",$bericht);
$bericht = str_replace("blowjob","<font color=\"#FF0000\">***</font>",$bericht);
$bericht = str_replace("pik","<font color=\"#FF0000\">***</font>",$bericht);
$bericht = str_replace("kut","<font color=\"#FF0000\">***</font>",$bericht);
$bericht = str_replace("lul","<font color=\"#FF0000\">***</font>",$bericht);
$bericht = str_replace("eikel","<font color=\"#FF0000\">***</font>",$bericht);
$bericht = str_replace("klootzak","<font color=\"#FF0000\">***</font>",$bericht);
$bericht = str_replace("dyke","<font color=\"#FF0000\">***</font>",$bericht);
$bericht = str_replace("asshole","<font color=\"#FF0000\">***</font>",$bericht);
$bericht = str_replace("hoer","<font color=\"#FF0000\">***</font>",$bericht);
$bericht = str_replace("slet","<font color=\"#FF0000\">***</font>",$bericht);
$bericht = str_replace("teef","<font color=\"#FF0000\">***</font>",$bericht);
$bericht = str_replace("bitch","<font color=\"#FF0000\">***</font>",$bericht);
?>
<? //smilies $bericht = str_replace(":d", "<img src=\"smileys/emotie1.gif\">", $bericht); $bericht = str_replace(":|", "<img src=\"smileys/emotie3.gif\">", $bericht); $bericht = str_replace("(h)", "<img src=\"smileys/emotie5.gif\">", $bericht); $bericht = str_replace("(6)", "<img src=\"smileys/emotie7.gif\">", $bericht); $bericht = str_replace("(h2)", "<img src=\"smileys/emotie9.gif\">", $bericht); $bericht = str_replace(":X", "<img src=\"smileys/emotie11.gif\">", $bericht); $bericht = str_replace(",)", "<img src=\"smileys/emotie13.gif\">", $bericht); $bericht = str_replace(":/", "<img src=\"smileys/emotie15.gif\">", $bericht); $bericht = str_replace(":!s", "<img src=\"smileys/emotie17.gif\">", $bericht); $bericht = str_replace(":!/", "<img src=\"smileys/emotie28.gif\">", $bericht); $bericht = str_replace("<)", "<img src=\"smileys/happy.gif.gif\">", $bericht); $bericht = str_replace(":!|", "<img src=\"smileys/icon9.gif\">", $bericht); $bericht = str_replace("<d", "<img src=\"smileys/laugh.gif\">", $bericht); $bericht = str_replace(":-|", "<img src=\"smileys/mellow.gif\">", $bericht); $bericht = str_replace(":o", "<img src=\"smileys/ohmy.gif\">", $bericht); $bericht = str_replace(":!)", "<img src=\"smileys/rolleyes.gif\">", $bericht); $bericht = str_replace(">|", "<img src=\"smileys/sleep.gif\">", $bericht); $bericht = str_replace("8-)", "<img src=\"smileys/unsure.gif\">", $bericht); $bericht = str_replace(";)", "<img src=\"smileys/wink.gif\">", $bericht); $bericht = str_replace("(?)", "<img src=\"smileys/vraag.gif\">", $bericht); $bericht = str_replace("(off)", "<img src=\"smileys/offtopic.gif\">", $bericht); $bericht = str_replace("(8)", "<img src=\"smileys/emotie2.gif\">", $bericht); $bericht = str_replace("8!|", "<img src=\"smileys/emotie4.gif\">", $bericht); $bericht = str_replace(";!s", "<img src=\"smileys/emotie6.gif\">", $bericht); $bericht = str_replace("0)", "<img src=\"smileys/emotie8.gif\">", $bericht); $bericht = str_replace(":!!/", "<img src=\"smileys/emotie10.gif\">", $bericht); $bericht = str_replace(":°", "<img src=\"smileys/emotie12.gif\">", $bericht); $bericht = str_replace("x)", "<img src=\"smileys/emotie14.gif\">", $bericht); $bericht = str_replace("x'", "<img src=\"smileys/emotie16.gif\">", $bericht); $bericht = str_replace(":-0", "<img src=\"smileys/emotie18.gif\">", $bericht); $bericht = str_replace(":p", "<img src=\"smileys/emotie38.gif\">", $bericht); $bericht = str_replace("(n)", "<img src=\"smileys/huh.gif\">", $bericht); $bericht = str_replace("(!)", "<img src=\"smileys/icon13.gif\">", $bericht); $bericht = str_replace(":(", "<img src=\"smileys/mad.gif\">", $bericht); $bericht = str_replace("(f)", "<img src=\"smileys/middelv2.gif\">", $bericht); $bericht = str_replace("(-)", "<img src=\"smileys/ph34r.gif\">", $bericht); $bericht = str_replace("*(", "<img src=\"smileys/sad.gif\">", $bericht); $bericht = str_replace(":)", "<img src=\"smileys/smile.gif\">", $bericht); $bericht = str_replace(":s", "<img src=\"smileys/wacko.gif\">", $bericht); $bericht = str_replace("(l)", "<img src=\"smileys/wub.gif\">", $bericht); $bericht = str_replace("(lh)", "<img src=\"smileys/hard.gif\">", $bericht); //opmaak $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\\]","<div align=\"\\1\">\\2</div>",$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); $bericht = eregi_replace("\[quote\]","<b style='font-size: 8pt'>Quote:</b><hr>",$bericht); $bericht = eregi_replace('\[quote=([[:alnum:]]+)\]', "<b style='font-size: 8pt'>Quote (\\1):</b><hr>",$bericht); $bericht = preg_replace("_\[code\](.*?)\[/code\]_ise", "colorcoding('\\1')", $bericht); $bericht = str_replace("[left]","<div align=\"left\">",$bericht); $bericht = str_replace("[center]","<center>",$bericht); $bericht = str_replace("[/center]","</center>",$bericht); $bericht = str_replace("[right]","<div align=\"right\">",$bericht); //woordfilter $bericht = str_replace("fuck","<font color=\"#FF0000\">***</font>",$bericht); $bericht = str_replace("shit","<font color=\"#FF0000\">***</font>",$bericht); $bericht = str_replace("dick","<font color=\"#FF0000\">***</font>",$bericht); $bericht = str_replace("suck","<font color=\"#FF0000\">***</font>",$bericht); $bericht = str_replace("cum","<font color=\"#FF0000\">***</font>",$bericht); $bericht = str_replace("blowjob","<font color=\"#FF0000\">***</font>",$bericht); $bericht = str_replace("pik","<font color=\"#FF0000\">***</font>",$bericht); $bericht = str_replace("kut","<font color=\"#FF0000\">***</font>",$bericht); $bericht = str_replace("lul","<font color=\"#FF0000\">***</font>",$bericht); $bericht = str_replace("eikel","<font color=\"#FF0000\">***</font>",$bericht); $bericht = str_replace("klootzak","<font color=\"#FF0000\">***</font>",$bericht); $bericht = str_replace("dyke","<font color=\"#FF0000\">***</font>",$bericht); $bericht = str_replace("asshole","<font color=\"#FF0000\">***</font>",$bericht); $bericht = str_replace("hoer","<font color=\"#FF0000\">***</font>",$bericht); $bericht = str_replace("slet","<font color=\"#FF0000\">***</font>",$bericht); $bericht = str_replace("teef","<font color=\"#FF0000\">***</font>",$bericht); $bericht = str_replace("bitch","<font color=\"#FF0000\">***</font>",$bericht); ?>
Als iemand me zou kunnen vertellen waar ik de mist in ga zou ik heel blij zijn!
Alvast bedankt
|