Example #1
0
                message("Bestätigung", '
<form name="theform" method="post" action="' . build_link("postops.php") . '">
  M&ouml;chten Sie diesen Post wirklich l&ouml;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&ouml;schen &gt;&gt;">
</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&ouml;scht", "Post wurde gel&ouml;scht.<br><a href=\"" . build_link("showtopic.php?thread[threadid]={$thread['threadid']}") . "\">Zur&uuml;ck zum Thread</a>");
        }
    } else {
        message("Fehler", "Sie haben keine Erlaubnis diesen Post zu l&ouml;schen");
    }
}
Example #2
0
        $a_src = $a_tgt;
        $a_tgt = $a_tmp;
    }
    if (!($a_src['threadtime'] > $a_tgt['threadtime'])) {
        message('Fehler', 'Der Ziel-Thread ist j&uuml;nger als der Quell-Thread. Dies w&uuml;rde die Beitragsreihenfolge zerst&ouml;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 )
    {