File "envoi_forum_w.php"
Full path: /home/meharicl/www/diaporama/envoi_forum_w.php
File
size: 2.73 B
MIME-type: text/html
Charset: 8 bit
Download Open Edit Advanced Editor Back
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Sans Titre</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="generator" content="HAPedit 3.1">
</head>
<body bgcolor="#FFFFFF">
<?php
<?php
define('IN_PHPBB', true);
$phpEx = substr(strrchr(__FILE__, '.'), 1);
$user->setup();
include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
$backup = array(
'user' => $user,
'auth' => $auth,
);
$sql = 'SELECT * FROM '.$basePhpbb.'.phpbb_users WHERE username = "'.$username.'"';
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
$poster = 2;
$user->ip = '0.0.0.0';
$user->data = array_merge($user->data, $row);
$auth->acl($user->data);
$uid = $bitfield = $flags = '';
generate_text_for_storage($message, $uid, $bitfield, $flags, true, true, true);
$poll = array();
$data = array(
// General Posting Settings
'forum_id' => 58, // The forum ID in which the post will be placed. (int)
'icon_id' => false, // The Icon ID in which the post will be displayed with on the viewforum, set to false for icon_id. (int)
// Defining Post Options
'enable_bbcode' => true, // Enable BBcode in this post. (bool)
'enable_smilies' => true, // Enabe smilies in this post. (bool)
'enable_urls' => true, // Enable self-parsing URL links in this post. (bool)
'enable_sig' => true, // Enable the signature of the poster to be displayed in the post. (bool)
// Values from generate_text_for_storage()
'bbcode_bitfield' => $bitfield, // Value created from the generate_text_for_storage() function.
'bbcode_uid' => $uid, // Value created from the generate_text_for_storage() function.
// Other Options
'post_edit_locked' => 0, // Disallow post editing? 1 = Yes, 0 = No
//'topic_title' => $subject, // Subject/Title of the topic. It should pass through generate_text_for_storage() before this. (string)
// Email Notification Settings
'notify_set' => false, // (bool)
'notify' => false, // (bool)
'post_time' => 0, // Set a specific time, use 0 to let submit_post() take care of getting the proper time (int)
'forum_name' => '', // For identifying the name of the forum in a notification email. (string)
// Indexing
'enable_indexing' => true, // Allow indexing the post? (bool)
);
$data['topic_title'] = 'Titre du sujet concern';
$data['message'] = 'Voici un premier message<br/>sur 2 lignes, et <b>en gras</b>';
$data['message_md5'] = md5($data['message']);
submit_post('post', $data['topic_title'], $username, POST_NORMAL, $poll, $data);
?>
?>
</body>
</html>