function yes_delete_file_and_edit_agreement() { $fileid = $_POST['fileid']; logmsg("deletefile {$fileid}"); db_delete_files(array($fileid)); no_delete_file_and_edit_agreement(); }
function db_remove_travel_cascading($ids) { global $link; mysqli_set_charset($link, "utf8"); $idar = explode(', ', $ids); $stm2 = $link->stmt_init(); $stm2->prepare('DELETE FROM STUDENT_EXCHANGES WHERE ID=?'); $stm3 = $link->stmt_init(); $stm3->prepare('DELETE FROM STUDENT_SUBJECTS WHERE ID_EXCHANGE=?'); foreach ($idar as $id) { $stm2->bind_param('i', $id); $stm2->execute(); $stm3->bind_param('i', $id); $stm3->execute(); db_append_to_log('STUDENT_EXCHANGES', $id, 'remove', 'record and associated student subjects removed', "--"); } $stm2->close(); $stm3->close(); $fids = db_retrieve_file_ids(7, $idar); db_delete_files($fids); }