Herzlich willkommen im Archiv vom ABAKUS Online Marketing Forum
Du befindest Dich im Archiv vom ABAKUS Online Marketing Forum. Hier kannst Du Dich für das Forum mit den aktuellen Beiträgen registrieren.
Code: Alles auswählen
SELECT t.topic_id
Code: Alles auswählen
SELECT t.topic_id, t.topic_poster
Code: Alles auswählen
//
// Send vars to template
//
$template->assign_vars(array(
'FORUM_ID' => $forum_id,
Code: Alles auswählen
'DONE_BUTTON' => ($userdata['user_id'] == $topic['topic_poster'] && ($forum_id == 58 || $forum_id == 75)) ? ('<a href="' . append_sid("done.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . '"><img ENTSPRECHEND ANPASSEN></a>') : '',
Code: Alles auswählen
<?php
// phpbb
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
// start session management
$userdata = session_pagestart($user_ip, $forum_id);
init_userprefs($userdata);
// vars
$topic_id = isset($_GET[POST_TOPIC_URL]) ? intval($_GET[POST_TOPIC_URL]) : 0;
if (!$userdata['session_logged_in'] || !$topic_id) {
message_die(GENERAL_MESSAGE, 'Topic_post_not_exist');
}
// auth topic poster
$sql = 'SELECT topic_id
FROM ' . TOPICS_TABLE . '
WHERE topic_id = ' . intval($topic_id) . '
AND topic_poster = ' . intval($userdata['user_id']);
if (!($result = $db->sql_query($sql))) {
message_die(GENERAL_ERROR, 'Could not obtain topic information', '', __LINE__, __FILE__, $sql);
}
if (!($row = $db->sql_fetchrow($result))) {
message_die(GENERAL_MESSAGE, 'Topic_post_not_exist');
}
// lock topic
$sql = 'UPDATE ' . TOPICS_TABLE . '
SET topic_status = ' . TOPIC_LOCKED . '
WHERE topic_id = ' . intval($topic_id) . '
AND topic_moved_id = 0';
if (!$db->sql_query($sql)) {
message_die(GENERAL_ERROR, "Could not update topic status.", '', __LINE__, __FILE__, $sql);
}
// display message
$message = sprintf($lang['Click_return_topic'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . '">', '</a>');
$message .= '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . $redirect_page . '">')
);
message_die(GENERAL_MESSAGE, $lang['Topics_Locked'] . '<br /><br />' . $message);
?>
Code: Alles auswählen
ORDER BY t.topic_type DESC, t.topic_last_post_id DESC
Code: Alles auswählen
ORDER BY " . ($forum_id != 58 && $forum_id != 75) ? "" : "t.topic_status ASC, ") . "t.topic_type DESC, t.topic_last_post_id DESC
Code: Alles auswählen
// lock topic
if (($forum_id == 58 || $forum_id == 75) && $forum_topic_data['topic_status'] == TOPIC_UNLOCKED && $forum_topic_data['topic_time'] < (time() - 5184000)) {
$sql = 'UPDATE ' . TOPICS_TABLE . '
SET topic_status = ' . TOPIC_LOCKED . '
WHERE topic_id = ' . intval($topic_id) . '
AND topic_moved_id = 0';
if (!$db->sql_query($sql)) {
message_die(GENERAL_ERROR, "Could not update topic status.", '', __LINE__, __FILE__, $sql);
}
}