//Abonnements if (isset($_POST['subscription']) && $user->info['userid']) { if (!$_POST['subscription']) { $db->query("DELETE FROM " . PRE . "_forum_subscriptions WHERE ( userid='" . $user->info['userid'] . "' AND type='thread' AND source='" . $threadinfo['threadid'] . "' ) LIMIT 1"); } elseif (in_array($_POST['subscription'], array('none', 'instant', 'daily', 'weekly'))) { $notify = $_POST['subscription']; list($subexists) = $db->first("SELECT id FROM " . PRE . "_forum_subscriptions WHERE ( userid='" . $user->info['userid'] . "' AND type='thread' AND source='" . $threadinfo['threadid'] . "' ) LIMIT 1"); if ($subexists) { $db->query("UPDATE " . PRE . "_forum_subscriptions SET notification='" . $notify . "' WHERE id='" . $subexists . "' LIMIT 1"); } else { $db->query("INSERT INTO " . PRE . "_forum_subscriptions (userid,type,source,notification) VALUES ('" . $user->info['userid'] . "','thread','" . $threadinfo['threadid'] . "','" . $notify . "')"); } } } //Thema als gelesen markieren thread_isread($threadinfo['threadid']); //Weiterleiten zum Thema $forwarder = 'thread.php?id=' . $threadinfo['threadid'] . '&goto=lastpost'; message($apx->lang->get('MSG_POST_ADD_OK'), $forwarder); require 'lib/_end.php'; require '../lib/_end.php'; } } else { $_POST['allowcodes'] = 1; $_POST['allowsmilies'] = 1; $_POST['allowsig'] = 1; $_POST['transform_links'] = 1; $_POST['username'] = $_COOKIE[$set['main']['cookie_pre'] . '_forum_username']; $_POST['hash'] = md5(microtime()); $_POST['subscription'] = is_thread_subscr($threadinfo['threadid']); if ($user->info['forum_autosubscribe'] && !$_POST['subscription']) {
$db->query("UPDATE " . PRE . "_forum_attachments SET postid='" . $pid . "' WHERE hash='" . addslashes($_POST['hash']) . "' AND time>'" . (time() - 3600) . "'"); } //Index aktualisieren if ($foruminfo['searchable']) { update_index($_POST['text'], $tid, $pid); update_index($_POST['title'], $tid, $pid, true); } //Abonnements if ($user->info['userid']) { if (in_array($_POST['subscription'], array('none', 'instant', 'daily', 'weekly'))) { $notify = $_POST['subscription']; $db->query("INSERT INTO " . PRE . "_forum_subscriptions (userid,type,source,notification) VALUES ('" . $user->info['userid'] . "','thread','" . $tid . "','" . $notify . "')"); } } //Thema als gelesen markieren thread_isread($tid); //Weiterleiten zum Thema $forwarder = mkrellink('thread.php?id=' . $tid . '#p' . $pid, 'thread,' . $tid . ',1' . urlformat($_POST['title']) . '.html#p' . $pid); message($apx->lang->get('MSG_THREAD_ADD_OK'), $forwarder); require 'lib/_end.php'; require '../lib/_end.php'; } } else { $_POST['icon'] = 'none'; $_POST['sticky_type'] = 'no'; $_POST['allowcodes'] = 1; $_POST['allowsmilies'] = 1; $_POST['allowsig'] = 1; $_POST['transform_links'] = 1; $_POST['username'] = $_COOKIE[$set['main']['cookie_pre'] . '_forum_username']; $_POST['hash'] = md5(microtime());