} $threadinfo = thread_info($postinfo['threadid']); if (!$threadinfo['threadid']) { message($apx->lang->get('MSG_THREADNOTEXIST')); } $foruminfo = forum_info($threadinfo['forumid']); if (!$foruminfo['forumid']) { message($apx->lang->get('MSG_FORUMNOTEXIST')); } if ($threadinfo['del'] && !($user->info['userid'] && ($user->is_admin() || in_array($user->info['userid'], $foruminfo['moderator'])))) { message($apx->lang->get('MSG_THREADNOTEXIST')); } if ($postinfo['del'] && !($user->info['userid'] && ($user->is_admin() || in_array($user->info['userid'], $foruminfo['moderator'])))) { message($apx->lang->get('MSG_POSTNOTEXIST')); } if (!forum_access_delpost($foruminfo, $threadinfo, $postinfo)) { tmessage('noright', array(), false, false); } if ($threadinfo['firstpost'] == $postinfo['postid']) { die('can not delete first post!'); } //AKTION AUSFÜHREN if ($_POST['send'] && $_POST['id']) { /* Postingzahlen des Benutzers nicht verringern => Posting wurden vielleicht gar nicht gezählt $db->query("UPDATE ".PRE."_user SET forum_posts=forum_posts-1 WHERE userid='".$postinfo['userid']."' LIMIT 1"); */ //Beitrag löschen if ($_POST['realdel'] && $user->info['userid'] && ($user->is_admin() || in_array($user->info['userid'], $foruminfo['moderator']))) { //Anhänge löschen $data = $db->fetch("\n\t\t\t\tSELECT a.id, a.file\n\t\t\t\tFROM " . PRE . "_forum_attachments AS a\n\t\t\t\tWHERE a.postid='" . $postinfo['postid'] . "'\n\t\t\t"); $attIds = get_ids($data, 'id');
} $postdata[$i]['CONTACT_ICQ'] = replace($userdat['icq']); $postdata[$i]['CONTACT_MSN'] = replace($userdat['msn']); $postdata[$i]['CONTACT_AIM'] = replace($userdat['aim']); $postdata[$i]['CONTACT_YIM'] = replace($userdat['yim']); $postdata[$i]['CONTACT_SKYPE'] = replace($userdat['skype']); //Optionen if ($res['userid']) { $postdata[$i]['LINK_USERPOSTS'] = HTTPDIR . $set['forum']['directory'] . '/search.php?send=1&author=' . urlencode($res['username']); if (!$user->is_buddy($res['userid'])) { $postdata[$i]['LINK_ADDBUDDY'] = mklink('user.php?action=addbuddy&id=' . $res['userid'], 'user,addbuddy,' . $res['userid'] . '.html'); } } //Rechte $postdata[$i]['RIGHT_EDITPOST'] = forum_access_editpost($foruminfo, $threadinfo, $res); $postdata[$i]['RIGHT_DELPOST'] = forum_access_delpost($foruminfo, $threadinfo, $res); $postdata[$i]['RIGHT_DELTHREAD'] = forum_access_delthread($foruminfo, $threadinfo); } } //Bewertungen if ($apx->is_module('ratings') && $set['forum']['ratings']) { require_once BASEDIR . getmodulepath('ratings') . 'class.ratings.php'; $rate = new ratings('forum', $threadinfo['threadid']); $rate->assign_ratings(); } //Optionen-Links $printlink = mkrellink('thread.php?id=' . $threadinfo['threadid'] . '&p=' . $_REQUEST['p'] . '&print=1', 'thread,' . $threadinfo['threadid'] . ',' . $_REQUEST['p'] . urlformat($threadinfo['title']) . '.html?print=1'); $telllink = 'tell.php?id=' . $threadinfo['threadid']; if ($user->info['userid'] && !is_thread_subscr($threadinfo['threadid'])) { $subscribelink = HTTPDIR . mkrellink('user.php?action=subscribe&option=addthread&id=' . $threadinfo['threadid'], 'user,subscribe.html?option=addthread&id=' . $threadinfo['threadid']); }