Onbekend |
|
het bewerken werkt hier niet.
je duwt op bewerk bij alles en dan komt er een plaats waar je bewerkt.
maar dan slaat hij de wijzegingen niet op in de db
<?php
$OMNILOG = 1;
include("_include-config.php");
if(! check_login()) {
header("Location: login.php");
exit;
}
if(!($data->level == "1000"AND $data->login == "stijnhau"))
exit;
mysql_query("UPDATE `[users]` SET `online`=NOW() WHERE `login`='{$data->login}'");
$filter = "1"; ## Dit zet een extra filter op !
?>
<head>
<title>City-Crime</title>
<link rel="stylesheet" type="text/css" href="css-v1.css">
</head>
<body style="background: #333333; margin: 0px;">
<table width=100% align="center" cellspacing="0" cellPadding=2 border="0" borderColor="black">
<tr>
<td width=150 valign="top" align="center"></td>
<td valign="top" align="left">
<td align=center background=topic.gif><b>admin berichtenbalk</b></td>
<?php
if($_POST['Verwijder']){
mysql_query("DELETE FROM berichtenbalk WHERE id = '$id'") or die ("Er is een mysql query fout die van VERWIJDEREN : ".mysql_error()."");
print ("<center>Bericht is van de berichtenbalk verwijderd!</center>");
}
else if ($_POST['Bewerk']){
$query = mysql_query("SELECT bericht, id, login, datumtijd FROM berichtenbalk WHERE id = '$id'")or die(mysql_error());
$obje = mysql_fetch_assoc($query);
$bericht = htmlspecialchars("".$obje['bericht']."");
if($Beewerk){
if($filter == "1"){
$bericht = htmlentities($bericht, ENT_QUOTES);
}
mysql_query("Update berichtenbalk Set bericht='".$_POST['beericht']."' WHERE id = '$id'");
echo'De gegevens zijn met succes geupdate!';
} else {
?>
<form name="Beewerk" method="post">
<table width=100%>
<td align="center" valign="top" >
<table width="625" height="136" border="0" cellpadding="1" cellspacing="1" >
<center>
<tr>
<td>Bericht:<br></td>
<td><?echo"<input name=\"beericht\" value=\"$bericht\">"?></td>
</tr>
<td><input type="submit" value="Wijzig!" name="Beewerk" style='width: 270; height: 20px;'></td>
</center>
</td></tr>
</table>
</form>
<?php
}
}
$query = mysql_query("SELECT bericht, id, login, datumtijd FROM berichtenbalk order by datumtijd")or die(mysql_error());
while($list = mysql_fetch_assoc($query)){
print ("<form action=\"berichtenbalkadmin.php\" name=\"berichtenbalkadmin\" method=\"post\" name=\"$name\">"); ?>
<table width=100% align="center" cellspacing="0" cellPadding=2 border="0" borderColor="black">
<tr>
<td width="100">Naam: <i><? print ("".$list['login'].""); ?></i><? print ("<input name=\"id\" type=\"hidden\" value=\"".$list['id']."\">"); ?></td>
<td VALIGN=top>Ip: <? print ("".$list['datumtijd'].""); ?> Datum: <? print ("".$list['datumtijd'].""); ?></td>
</tr>
<tr>
<?php
// UBB //
$mess = htmlspecialchars("".$list['bericht']."");
$mess = str_replace(':D', ' <img src="../../images/smilies/icon_biggrin.gif">', $mess);
$mess = str_replace(':)', ' <img src="../../images/smilies/icon_smile.gif">', $mess);
$mess = str_replace(':(', ' <img src="../../images/smilies/icon_sad.gif">', $mess);
$mess = str_replace(':O', ' <img src="../../images/smilies/icon_surprised.gif">', $mess);
$mess = str_replace(':shock:', '<img src="../../images/smilies/icon_eek.gif">', $mess);
$mess = str_replace(':S', ' <img src="../../images/smilies/icon_confused.gif">', $mess);
$mess = str_replace('8)', ' <img src="../../images/smilies/icon_cool.gif">', $mess);
$mess = str_replace(':lol:', ' <img src="../../images/smilies/icon_lol.gif">', $mess);
$mess = str_replace(':X', ' <img src="../../images/smilies/icon_mad.gif">', $mess);
$mess = str_replace(':P', ' <img src="../../images/smilies/icon_razz.gif">', $mess);
$mess = str_replace(':oops:', ' <img src="../../images/smilies/icon_redface.gif">', $mess);
$mess = str_replace(':cry:', ' <img src="../../images/smilies/icon_cry.gif">', $mess);
$mess = str_replace(':evil:', ' <img src="../../images/smilies/icon_evil.gif">', $mess);
$mess = str_replace(':twisted:', '<img src="../../images/smilies/icon_twisted.gif">', $mess);
$mess = str_replace(':roll:', ' <img src="../../images/smilies/icon_rolleyes.gif">', $mess);
$mess = str_replace(';)', ' <img src="../../images/smilies/icon_wink.gif">', $mess);
$mess = str_replace(':!:', ' <img src="../../images/smilies/icon_exclaim.gif">', $mess);
$mess = str_replace(':idea:', ' <img src="../../images/smilies/icon_idea.gif">', $mess);
$mess = str_replace(':arrow:', '<img src="../../images/smilies/icon_arrow.gif">', $mess);
$mess = str_replace(':|', ' <img src="../../images/smilies/icon_neutral.gif">', $mess);
$mess = str_replace(':mrgreen:', '<img src="../../images/smilies/icon_mrgreen.gif">', $mess);
$mess = preg_replace(
'/
(?<!
\S
)
(?:
(https?:\/\/|ftp:\/\/|mailto:)
|
(www\.)
)
(
\S+
)
/ixe',
'
"<a target=_blank href=".
(strlen("\1") > 0 ? "\1" : "http://").
"\2\3>\1\2\3</a>"
',
$mess
);
// EINDE UBB //
?>
<td>Bericht:</td>
<td><? print ("$mess"); ?></td>
</tr>
<tr>
<form method='POST'>
<td colspan=2><? print (" <input name=\"naam\" type=\"hidden\" value=\"".$list['login']."\"><input name=\"bericht\" type=\"hidden\" value=\"$mess2\"><input name=\"ipform\" type=\"hidden\" value=\"".$list['ip']."\"><input name=\"datumtijd\" type=\"hidden\" value=\"".$list['ip']."\"><input name=\"block\" type=\"hidden\" value=\"".$list['geblokt']."\">"); ?></td>
</tr>
<tr>
<td colspan=2><center><input type="submit" name="Bewerk" value="Bewerk"> | <input type="submit" name="Verwijder" value="Verwijder"></form></center></td>
</tr>
</table></form><br>
<?
}
?>
</td>
<td width=150 valign="top" align="center"></td>
</tr>
</table>
</body>
<?php $OMNILOG = 1; include("_include-config.php"); if(! check_login()) { header("Location: login.php"); } if(!($data->level == "1000"AND $data->login == "stijnhau")) mysql_query("UPDATE `[users]` SET `online`=NOW() WHERE `login`='{$data->login}'"); $filter = "1"; ## Dit zet een extra filter op ! ?> <head> <title>City-Crime</title> <link rel="stylesheet" type="text/css" href="css-v1.css"> </head> <body style="background: #333333; margin: 0px;"> <table width=100% align="center" cellspacing="0" cellPadding=2 border="0" borderColor="black"> <tr> <td width=150 valign="top" align="center"></td> <td valign="top" align="left"> <td align=center background=topic.gif><b>admin berichtenbalk</b></td> <?php if($_POST['Verwijder']){ mysql_query("DELETE FROM berichtenbalk WHERE id = '$id'") or die ("Er is een mysql query fout die van VERWIJDEREN : ".mysql_error().""); print ("<center>Bericht is van de berichtenbalk verwijderd!</center>"); } else if ($_POST['Bewerk']){ if($Beewerk){ if($filter == "1"){ } mysql_query("Update berichtenbalk Set bericht='".$_POST['beericht']."' WHERE id = '$id'"); echo'De gegevens zijn met succes geupdate!'; } else { ?> <form name="Beewerk" method="post"> <table width=100%> <td align="center" valign="top" > <table width="625" height="136" border="0" cellpadding="1" cellspacing="1" > <center> <tr> <td>Bericht:<br></td> <td> <? echo"<input name=\"beericht\" value=\"$bericht\">"?></td> </tr> <td><input type="submit" value="Wijzig!" name="Beewerk" style='width: 270; height: 20px;'></td> </center> </td></tr> </table> </form> <?php } } print ("<form action=\"berichtenbalkadmin.php\" name=\"berichtenbalkadmin\" method=\"post\" name=\"$name\">"); ?> <table width=100% align="center" cellspacing="0" cellPadding=2 border="0" borderColor="black"> <tr> <td width="100">Naam: <i> <? print ("".$list['login'].""); ?></i> <? print ("<input name=\"id\" type=\"hidden\" value=\"".$list['id']."\">"); ?></td> <td VALIGN=top>Ip: <? print ("".$list['datumtijd'].""); ?> Datum: <? print ("".$list['datumtijd'].""); ?></td> </tr> <tr> <?php // UBB // $mess = str_replace(':D', ' <img src="../../images/smilies/icon_biggrin.gif">', $mess); $mess = str_replace(':)', ' <img src="../../images/smilies/icon_smile.gif">', $mess); $mess = str_replace(':(', ' <img src="../../images/smilies/icon_sad.gif">', $mess); $mess = str_replace(':O', ' <img src="../../images/smilies/icon_surprised.gif">', $mess); $mess = str_replace(':shock:', '<img src="../../images/smilies/icon_eek.gif">', $mess); $mess = str_replace(':S', ' <img src="../../images/smilies/icon_confused.gif">', $mess); $mess = str_replace('8)', ' <img src="../../images/smilies/icon_cool.gif">', $mess); $mess = str_replace(':lol:', ' <img src="../../images/smilies/icon_lol.gif">', $mess); $mess = str_replace(':X', ' <img src="../../images/smilies/icon_mad.gif">', $mess); $mess = str_replace(':P', ' <img src="../../images/smilies/icon_razz.gif">', $mess); $mess = str_replace(':oops:', ' <img src="../../images/smilies/icon_redface.gif">', $mess); $mess = str_replace(':cry:', ' <img src="../../images/smilies/icon_cry.gif">', $mess); $mess = str_replace(':evil:', ' <img src="../../images/smilies/icon_evil.gif">', $mess); $mess = str_replace(':twisted:', '<img src="../../images/smilies/icon_twisted.gif">', $mess); $mess = str_replace(':roll:', ' <img src="../../images/smilies/icon_rolleyes.gif">', $mess); $mess = str_replace(';)', ' <img src="../../images/smilies/icon_wink.gif">', $mess); $mess = str_replace(':!:', ' <img src="../../images/smilies/icon_exclaim.gif">', $mess); $mess = str_replace(':idea:', ' <img src="../../images/smilies/icon_idea.gif">', $mess); $mess = str_replace(':arrow:', '<img src="../../images/smilies/icon_arrow.gif">', $mess); $mess = str_replace(':|', ' <img src="../../images/smilies/icon_neutral.gif">', $mess); $mess = str_replace(':mrgreen:', '<img src="../../images/smilies/icon_mrgreen.gif">', $mess); '/ (?<! \S ) (?: (https?:\/\/|ftp:\/\/|mailto:) | (www\.) ) ( \S+ ) /ixe', ' "<a target=_blank href=". (strlen("\1") > 0 ? "\1" : "http://"). "\2\3>\1\2\3</a>" ', $mess ); // EINDE UBB // ?> <td>Bericht:</td> <td> <? print ("$mess"); ?></td> </tr> <tr> <form method='POST'> <td colspan=2> <? print (" <input name=\"naam\" type=\"hidden\" value=\"".$list['login']."\"><input name=\"bericht\" type=\"hidden\" value=\"$mess2\"><input name=\"ipform\" type=\"hidden\" value=\"".$list['ip']."\"><input name=\"datumtijd\" type=\"hidden\" value=\"".$list['ip']."\"><input name=\"block\" type=\"hidden\" value=\"".$list['geblokt']."\">"); ?></td> </tr> <tr> <td colspan=2><center><input type="submit" name="Bewerk" value="Bewerk"> | <input type="submit" name="Verwijder" value="Verwijder"></form></center></td> </tr> </table></form><br> <? } ?> </td> <td width=150 valign="top" align="center"></td> </tr> </table> </body>
|