c3e87dc8f2035e0c179f1d6740222a4a6f644ef9
2 /********************************************************************************
3 * post.php : posting page
6 * This file is part of the banana distribution
7 * Copyright: See COPYING files that comes with this distribution
8 ********************************************************************************/
10 require_once("include/banana.inc.php");
11 require_once("include/header.inc.php");
13 if (isset($_REQUEST['group'])) {
14 $group = htmlentities(strtolower($_REQUEST['group']));
16 if (isset($_REQUEST['id'])) {
17 $id = htmlentities(strtolower($_REQUEST['id']));
24 if (isset($group) && isset($id) && isset($_REQUEST['type']) && ($_REQUEST['type']=='followup')) {
25 $banana->newPost($id);
28 $subject = (preg_match("/^re\s*:\s*/i", $banana->post
->headers
['subject']) ?
'' : 'Re: ').$banana->post
->headers
['subject'];
29 $body = $banana->post
->name
." wrote :\n".wrap($banana->post
->body
, "> ");
30 $target = isset($banana->post
->headers
['followup-to']) ?
$banana->post
->headers
['followup-to'] : $banana->post
->headers
['newsgroups'];
34 $banana->nntp
->quit();
37 <?php
echo _b_('Nouveau message'); ?
>
45 <form action
="thread.php" method
="post">
46 <table
class="<?php echo $css['bicol']?>" cellpadding
="0" cellspacing
="0" border
="0">
49 <?php
echo _b_('En-têtes'); ?
>
53 <td
class="<?php echo $css['bicoltitre'];?>">
54 <?php
echo _b_('Nom'); ?
>
57 <?php
echo htmlentities($banana->profile
['name']); ?
>
61 <td
class="<?php echo $css['bicoltitre'];?>">
62 <?php
echo _b_('Sujet'); ?
>
65 <input type
="text" name
="subject" value
="<?php if (isset($subject)) echo $subject; ?>" />
69 <td
class="<?php echo $css['bicoltitre'];?>">
70 <?php
echo _b_('Forums'); ?
>
73 <input type
="text" name
="newsgroups" value
="<?php if (isset($target)) echo $target; ?>" />
77 <td
class="<?php echo $css['bicoltitre'];?>">
78 <?php
echo _b_('Suivi-à'); ?
>
81 <input type
="text" name
="followup" value
="" />
85 <td
class="<?php echo $css['bicoltitre'];?>">
86 <?php
echo _b_('Organisation'); ?
>
89 <?php
echo $banana->profile
['org']; ?
>
94 <?php
echo _b_('Corps'); ?
>
98 <td
class="<?php echo $css['bicolvpadd'];?>" colspan
="2">
99 <textarea name
="body" cols
="90" rows
="16"><?php
100 echo htmlentities($body);
101 if ($banana->profile
['sig']) echo "\n\n-- \n".htmlentities($banana->profile
['sig']);
106 <td
class="<?php echo $css['bouton']?>" colspan
="2">
108 if (isset($group) && isset($id) && isset($_REQUEST['type'])
109 && ($_REQUEST['type']=='followup')) {
111 <input type
="hidden" name
="type" value
="followupok" />
112 <input type
="hidden" name
="group" value
="<?php echo $group;?>" />
113 <input type
="hidden" name
="id" value
="<?php echo $id;?>" />
117 <input type
="hidden" name
="type" value
="new" />
121 <input type
="submit" name
="action" value
="OK" />
128 require_once("include/footer.inc.php");