I added/changed this in the deletepost.php script:
// -----------------------------------
// Get the post info from the database
$Board_q = addslashes($Board);
$query = "
SELECT w3t_Boards.Bo_Calendar,w3t_Posts.B_Username,w3t_Posts.B_Subject,w3t_Posts.B_Body,w3t_Posts.B_Approved,w3t_Posts.B_File,w3t_Posts.B_Poll,w3t_Posts.B_Main
FROM w3t_Posts,w3t_Boards
WHERE w3t_Posts.B_Number = '$Number'
AND w3t_Posts.B_Board = '$Board_q'
AND w3t_Boards.Bo_Keyword = '$Board_q'
";
$sth = $dbh -> do_query($query);
// -------------------------
// Assign the retrieved data
list($Calendar,$Postedby,$Subject,$Body,$Approved,$File,$Poll,$Main) = $dbh -> fetch_array($sth);
$dbh -> finish_sth($sth);
And this:
if ($Calendar == "Y") {
$query = "
DELETE FROM w3t_Events
WHERE E_Number = '$Number'
";
$dbh -> do_query($query);
}
Just above the file deletion.
It seems to be working in deleting related events. []
https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]