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("include/session.inc.php");
11 require("include/encoding.inc.php");
12 require("include/format.inc.php");
13 require("include/config.inc.php");
14 require("include/NetNNTP.inc.php");
15 require("include/post.inc.php");
16 require("include/spool.inc.php");
17 require("include/password.inc.php");
18 require("include/profile.inc.php");
19 require("include/wrapper.inc.php");
21 $profile = getprofile();
22 require($profile['locale']);
24 require("include/header.inc.php");
25 $group=htmlentities(strtolower($_REQUEST['group']));
26 $id=htmlentities(strtolower($_REQUEST['id']));
32 $mynntp = new nntp($news['server']);
34 echo "<p class=\"error\">\n\t".$locale['error']['connect']."\n</p>";
35 require("include/footer.inc.php");
38 if ($news['user']!="anonymous") {
39 $result = $mynntp->authinfo($news["user"],$news["pass"]);
41 echo "<p class=\"error\">\n\t".$locale['error']['credentials']
43 require("include/footer.inc.php");
48 if (isset($group) && isset($id) && isset($_REQUEST['type']) &&
49 ($_REQUEST['type']=='followup')) {
50 $rq=$mynntp->group($group);
51 $post = new post($mynntp,$id);
53 $subject = (preg_match("/^re:/i",$post->headers
->subject
)?
"":"Re: ")
54 .$post->headers
->subject
;
55 $body = $post->headers
->name
." wrote :\n".wrap($post->body
, ">");
56 if (isset($post->headers
->followup
))
57 $target=$post->headers
->followup
;
59 $target=$post->headers
->newsgroups
;
66 <?php
echo $locale['post']['title'];?
>
74 <form action
="thread.php" method
="POST">
75 <table
class="bicol" cellpadding
="0" cellspacing
="0" border
="0">
78 <?php
echo $locale['post']['headers'];?
>
83 <?php
echo $locale['post']['name'];?
>
86 <?php
echo htmlentities($profile['name']); ?
>
91 <?php
echo $locale['post']['subject'];?
>
94 <input type
="text" name
="subject" value
="<?php echo
95 (isset($subject)?$subject:"");?>" />
100 <?php
echo $locale['post']['newsgroups'];?
>
103 <input type
="text" name
="newsgroups" value
="<?php echo
104 (isset($target)?$target:"");?>" />
109 <?php
echo $locale['post']['fu2'];?
>
112 <input type
="text" name
="followup" value
="" />
117 <?php
echo $locale['post']['organization'];?
>
120 <?php
echo $profile['org']; ?
>
125 <?php
echo $locale['post']['body'];?
>
130 <textarea name
="body" cols
="90" rows
="10"><?php
echo
131 (isset($body)?
$body:"").($profile['sig']!=''?
"\n\n-- \n"
132 .$profile['sig']:"");?
></textarea
>
136 <td
class="bouton" colspan
="2">
138 if (isset($group) && isset($id) && isset($_REQUEST['type'])
139 && ($_REQUEST['type']=='followup')) {
141 <input type
="hidden" name
="type" value
="followupok" />
142 <input type
="hidden" name
="group" value
="<?php echo $group;?>" />
143 <input type
="hidden" name
="id" value
="<?php echo $id;?> " />
147 <input type
="hidden" name
="type" value
="new" />
151 <input type
="submit" name
="action" value
="OK" />
157 require("include/footer.inc.php");