Onbekend |
|
Helloow,
Ik zit met een probleem! nl bij men pm systeem verwijderd hij men pm niet! Weet iemand hoe dit komt--> dit is het script
<script language = "Javascript">
function SelecteerAlles() {
if (document.delber.check_all.checked==1) {
val=1;
} else {
val=0;
}
dml=document.forms['delber'];
len = dml.elements.length;
var i=0;
for( i=0 ; i<len ; i++) {
if (dml.elements[i].value=='delete') {
dml.elements[i].checked=val;
}
}
}
</script>
<?
include('config.php');
if($logses == true) {
if($_POST['delber']) {
mysql_query("DELETE * FROM pm WHERE aan='$gebruiker'");
}
foreach($_POST as $key => $value) {
if($value == "delete") {
mysql_query("DELETE * FROM pm WHERE id='$key'");
}
}
$record = mysql_query("SELECT * FROM pm WHERE aan='$gebruiker' ORDER BY id DESC");
$tell = mysql_num_rows($record);
?>
<form name="delber" method="post" action="">
<table width="95%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td width="4%"> </td>
<td width="39%">Titel:</td>
<td width="25%">Verstuurd van: </td>
<td width="32%">Wanneer:</td>
</tr>
<?
if($tell > 0) {
while($obj = mysql_fetch_object($record)) {
$pm_id = $obj->id;
$datum = $obj->datum;
$van = $obj->van;
$titel = $obj->titel;
$gelezen = $obj->gelezen;
if($gelezen == 0) { $kleur = "#999999"; } else { $kleur = "#CCCCCC"; }
?>
<tr bgcolor="<? echo $kleur; ?>">
<td align="center"><input type="checkbox" name="<? echo $pm_id; ?>" value="delete"></td>
<td><? echo "<a href='index.php?astro=login/pm&id=$pm_id'>$titel</a>"; ?></td>
<td align="center"><? echo $van; ?></td>
<td align="center"><? echo date("d/m/y H:i", $datum); ?></td>
</tr>
<?
}
} else {
?>
<tr>
<td colspan="4" align="center"><div class="error">Je hebt geen privé berichten!</div></td>
</tr>
<?
}
?>
<tr>
<td align="center"><input type="checkbox" name="check_all" value="checkall" onClick="javascript:SelecteerAlles()"></td>
<td><dd><input type="submit" name="delber" value="Verwijder"></dd></td>
<td> </td>
<td> </td>
</tr>
</table></form>
<?
} else { echo "<div class='error'>Je bent niet ingelogt!</div>"; }
?>
<script language = "Javascript"> function SelecteerAlles() { if (document.delber.check_all.checked==1) { val=1; } else { val=0; } dml=document.forms['delber']; len = dml.elements.length; var i=0; for( i=0 ; i<len ; i++) { if (dml.elements[i].value=='delete') { dml.elements[i].checked=val; } } } </script> <? include('config.php'); if($logses == true) { if($_POST['delber']) { mysql_query("DELETE * FROM pm WHERE aan='$gebruiker'"); } foreach($_POST as $key => $value) { if($value == "delete") { } } $record = mysql_query("SELECT * FROM pm WHERE aan='$gebruiker' ORDER BY id DESC"); ?> <form name="delber" method="post" action=""> <table width="95%" border="1" cellspacing="0" cellpadding="0"> <tr> <td width="4%"> </td> <td width="39%">Titel:</td> <td width="25%">Verstuurd van: </td> <td width="32%">Wanneer:</td> </tr> <? if($tell > 0) { $pm_id = $obj->id; $datum = $obj->datum; $van = $obj->van; $titel = $obj->titel; $gelezen = $obj->gelezen; if($gelezen == 0) { $kleur = "#999999"; } else { $kleur = "#CCCCCC"; } ?> <tr bgcolor=" <? echo $kleur; ?>"> <td align="center"><input type="checkbox" name=" <? echo $pm_id; ?>" value="delete"></td> <td> <? echo "<a href='index.php?astro=login/pm&id=$pm_id'>$titel</a>"; ?></td> <td align="center"> <? echo $van; ?></td> <td align="center"> <? echo date("d/m/y H:i", $datum); ?></td> </tr> <? } } else { ?> <tr> <td colspan="4" align="center"><div class="error">Je hebt geen privé berichten!</div></td> </tr> <? } ?> <tr> <td align="center"><input type="checkbox" name="check_all" value="checkall" onClick="javascript:SelecteerAlles()"></td> <td><dd><input type="submit" name="delber" value="Verwijder"></dd></td> <td> </td> <td> </td> </tr> </table></form> <? } else { echo "<div class='error'>Je bent niet ingelogt!</div>"; } ?>
Greetz Mathieu
|