<?php
/*
This PHP script is licensed under the GPL
Author: Terence Yim
E-mail: chtyim@gmail.com
Homepage: http://web-news.sourceforge.net
*/
?>
<font face="<?php echo $font_family; ?>">
<?php
if (is_requested("group")) {
$group = get_request("group");
} else {
unset($group);
}
if (is_requested("add_file")) {
$_SESSION["attach_count"]++;
}
if (isset($_SESSION["attach_count"])) {
?>
<form action="newsgroups.php" method="post" enctype="multipart/form-data">
<?php
} else {
?>
<form action="newsgroups.php" method="post">
<?php }
?>
<input type="hidden" name="compose" value="post">
<table cellspacing="3" cellpadding="0" border="0" width="95%">
<?php
if (isset($error_messages)) {
echo "<tr>";
echo "<td colspan=\"2\"><font size=\"-1\" color=\"".$error_color."\"><b>";
foreach ($error_messages as $msg) {
echo "$msg<br>";
}
echo "</b></font><br></tr>";
echo "</td>";
}
//if (!mb_check_encoding($subject, 'UTF-8')) { //iso-8859-15
/* 21:24 05/05/2026 modifica per evitare il warning */
$toCheck = ($subject !== null) ? $subject : '';
if (mb_check_encoding($toCheck, 'ISO-8859-1')) { //iso-8859-15
//echo "qui";
//imap_utf8(utf8_decode($header["subject"]));
//$header["subject"] = mb_convert_encoding($header["subject"],'HTML-ENTITIES','UTF-8');
//$subject = iconv('UTF-8', 'UTF-8//IGNORE', $subject);
//echo bin2hex($subject);
//$subject = iconv('ISO-8859-15', 'UTF-8//IGNORE', $subject);
//$subject = iconv('Windows-1252', 'UTF-8//IGNORE', $subject);
/* 21:24 05/05/2026 modifica per evitare il warning */
if ($subject === null) {
$subject = '';
}
$subject = str_replace("\xEF\xBF\xBD", "รจ", $subject);
//echo "<br>";
//echo bin2hex($subject);
//$subject = mb_convert_encoding($subject, 'UTF-8', 'UTF-8');
}
/*
$encodings = ['UTF-8', 'SJIS', 'GB2312',
'ISO-8859-1', 'ISO-8859-2', 'ISO-8859-3', 'ISO-8859-4',
'ISO-8859-5', 'ISO-8859-6', 'ISO-8859-7', 'ISO-8859-8', 'ISO-8859-9',
'ISO-8859-10', 'ISO-8859-13', 'ISO-8859-14', 'ISO-8859-15', 'ISO-8859-16',
'WINDOWS-1252', 'WINDOWS-1251', 'EUC-JP', 'EUC-TW', 'KOI8-R', 'BIG-5',
'ISO-2022-KR', 'ISO-2022-JP', 'UTF-16'
];*/
//echo mb_detect_encoding($subject, $encodings);
//var_dump(mb_check_encoding($subject, 'UTF-8'));
?>
<tr>
<td width="12%"><font size="-1"><b><?php echo $messages_ini["text"]["subject"]; ?>:</b></font></td>
<td><input type="text" name="subject" size="60" value="<?php echo $subject; ?>" style="<?php echo $form_style; ?>"></td>
</tr>
<tr>
<td><font size="-1"><b><?php echo $messages_ini["text"]["name"]; ?>:</b></font></td>
<td><input type="text" name="name" size="60" value="<?php echo $name; ?>" style="<?php echo $form_style; ?>"></td>
</tr>
<tr>
<td><font size="-1"><b><?php echo $messages_ini["text"]["email"]; ?>:</b></font></td>
<td><input type="text" name="email" size="60" value="<?php echo $email; ?>" style="<?php echo $form_style; ?>"></td>
</tr>
<tr>
<?php
echo "<!--td valign=\"top\" rowspan=\"";
if (isset($_SESSION["attach_count"])) {
echo ($_SESSION["attach_count"] + 1);
} else {
echo "1";
}
echo "\">";
?>
<font size="-1"><b><?php echo $messages_ini["text"]["attachments"]; ?>:</b></font></td-->
<?php
if (isset($_SESSION["attach_count"])) {
for ($i = 1;$i <= $_SESSION["attach_count"];$i++) {
if ($i != 1) {
echo "<tr>";
}
?>
<td><input type="file" name="file<?php echo $i; ?>" size="32" style="<?php echo $form_style; ?>"></td>
<?php
if ($i != 1) {
echo "</tr>";
}
}
echo "<tr>";
}
?>
<!--td>
<input type="submit" name="add_file" value="<?php echo $messages_ini["control"]["add_file"]; ?>" style="<?php echo $form_style_bold; ?>">
</td-->
</tr>
<tr>
<td valign="top"><font size="-1"><b><?php echo $messages_ini["text"]["newsgroups"]; ?>:</b></font></td>
<td>
<?php
if ($allow_cross_post) {
$count = 1;
while (list($key, $value) = each($newsgroups_list)) {
echo "<input name=\"groups[]\" type=\"checkbox\" value=\"$value\"";
if (isset($groups)) {
if (in_array($value, $groups)) {
echo "checked";
}
} elseif (strcmp($value,$_SESSION["newsgroup"]) == 0) {
echo " checked";
}
echo "><font face=\"$font_family\" size=\"-1\"><b>$value</b></font> ";
if (($count++ % 2) == 0) {
echo "<br>";
}
}
reset($newsgroups_list);
} else {
echo "<input name=\"groups[]\" type=\"radio\" value=\"".$_SESSION["newsgroup"]."\" checked>";
echo "<font face=\"$font_family\" size=\"-1\"><b>".$_SESSION["newsgroup"]."</b></font>";
}
?>
</td>
</tr>
<tr>
<td colspan="2"><font size="-1"><b><?php echo $messages_ini["text"]["message"]; ?>:</b></font></td>
</tr>
<tr>
<td colspan="2">
<textarea name="message" rows="10" cols="79" wrap="virtual" style="<?php echo $form_style; ?>"><?php echo $message; ?></textarea>
</td>
</tr>
<tr>
<td colspan="2">
<br>
<?php
if (isset($reply_id)) {
echo "<input type=\"hidden\" name=\"reply_id\" value=\"$reply_id\">";
}
if (isset($_SESSION["attach_count"])) {
echo "<input type=\"hidden\" name=\"attachment\" value=\"1\">";
}
?>
<input type="submit" onclick="load('loadbox','load','block');" name="post" value="<?php echo $messages_ini["control"]["post"]; ?>" style="<?php echo $form_style_bold; ?>">
<input type="submit" name="cancel" value="<?php echo $messages_ini["control"]["cancel"]; ?>" style="<?php echo $form_style_bold; ?>">
</td>
</tr>
</table>
</form>
</font>
Show this record as plain/text
nopaste service by: Roberto Corrado