message("Bestätigung", ' <form name="theform" method="post" action="' . build_link("postops.php") . '"> Möchten Sie diesen Post wirklich löschen?<br><br> <input type="hidden" name="do_delete" value="1"> <input type="hidden" name="action" value="delete"> <input type="hidden" name="post[postid]" value="' . $post['postid'] . '"> <input class="tbbutton" type="submit" name="Submit" value="Löschen >>"> </form>'); } } else { // re-get $post $post = $HTTP_POST_VARS['post']; if (!($post['postid'] = intval($post['postid']))) { exit('nix da'); } // decrease thread reply count thwb_query("UPDATE " . $pref . "thread SET threadreplies=threadreplies-1 WHERE threadid={$thread['threadid']}"); // decrease board post count thwb_query("UPDATE " . $pref . "board SET boardposts=boardposts-1 WHERE boardid={$board['boardid']}"); // remove post thwb_query("DELETE FROM " . $pref . "post WHERE postid={$post['postid']}"); // display stuff updatethread($thread['threadid']); updateboard($board['boardid']); log_action('delete post'); message("Post wurde gelöscht", "Post wurde gelöscht.<br><a href=\"" . build_link("showtopic.php?thread[threadid]={$thread['threadid']}") . "\">Zurück zum Thread</a>"); } } else { message("Fehler", "Sie haben keine Erlaubnis diesen Post zu löschen"); } }
$a_src = $a_tgt; $a_tgt = $a_tmp; } if (!($a_src['threadtime'] > $a_tgt['threadtime'])) { message('Fehler', 'Der Ziel-Thread ist jünger als der Quell-Thread. Dies würde die Beitragsreihenfolge zerstören'); } // do it. thwb_query('UPDATE ' . $pref . 'post SET threadid = \'' . $tgt . '\' WHERE threadid = \'' . $src . '\''); thwb_query('DELETE FROM ' . $pref . 'thread WHERE threadid = \'' . $src . '\''); thwb_query('UPDATE ' . $pref . 'thread SET threadreplies = ' . ($a_tgt['threadreplies'] + $a_src['threadreplies'] + 1) . ' WHERE threadid = \'' . $tgt . '\''); updatethread($tgt); updateboard($a_src['boardid']); updateboard($a_tgt['boardid']); logaction('merge with ' . $tgt); message('Info', 'Die Threads wurden erfolgreich verschmolzen.<br><a href="' . build_link('showtopic.php?threadid=' . $tgt) . '">Zum Ziel-Thread</a>.'); } /* * =============================================================== * action: markthread thread * =============================================================== */ /*if( $action == 'markthread' ) { $navpath .= "Thread markieren"; if( $g_user['userid'] != 0 ) {