<?php define('IN_PHPBB', true); $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); require_once($phpbb_root_path . 'common.' . $phpEx); require_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx); // Start session management $user->session_create( 54, true, false, false); $auth->acl($user->data); $user->setup(); $my_subject = utf8_normalize_nfc('Название темы'); $my_text = utf8_normalize_nfc('Текст'); $submit = (isset($_POST['submit'])) ? true : false; // variables to hold the parameters for submit_post $poll = $uid = $bitfield = $options = ''; generate_text_for_storage($my_subject, $uid, $bitfield, $options, false, false, false); generate_text_for_storage($post_text, $uid, $bitfield, $options, true, true, true); $data = array( 'forum_id' => 2, 'topic_id' => '', 'icon_id' => false, 'enable_bbcode' => true, 'enable_smilies' => true, 'enable_urls' => true, 'enable_sig' => true, 'from_user_id' => $user->data['user_id'], 'from_username' => $user->data['username'], 'from_user_ip' => $user->data['user_ip'], 'message' => $my_text, 'message_md5' => md5($my_text), 'bbcode_bitfield' => $bitfield, 'bbcode_uid' => $uid, 'post_edit_locked' => 0, 'topic_title' => $my_subject, 'notify_set' => false, 'notify' => false, 'post_time' => 0, 'forum_name' => '', 'enable_indexing' => true, ); submit_post('post', $my_subject, '', POST_NORMAL, $poll, $data); $user->session_kill(); ?> |