2 /********************************************************************************
3 * article.php : article 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/wrapper.inc.php");
13 require("include/format.inc.php");
14 require("include/config.inc.php");
15 require("include/NetNNTP.inc.php");
16 require("include/spool.inc.php");
17 require("include/post.inc.php");
18 require("include/profile.inc.php");
19 require("include/password.inc.php");
21 $profile=getprofile();
22 require($profile['locale']);
24 require("include/header.inc.php");
26 $group=strtolower(htmlentities($_REQUEST['group']));
28 $mynntp = new nntp($news['server']);
30 echo "<p class=\"error\">\n\t".$locale['error']['connect']."\n</p>";
31 require("include/footer.inc.php");
35 if ($news['user']!="anonymous") {
36 $result = $mynntp->authinfo($news["user"],$news["pass"]);
38 echo "<p class=\"error\">\n\tYou have provided bad credentials to "
39 ."the server. Good bye !\n</p>";
40 require("include/footer.inc.php");
44 $spool = new spool($mynntp,$group,$profile['display'],$profile['lastnews']);
46 echo "<p class=\"error\">\n\tError while accessing group.\n</p>";
47 require("include/footer.inc.php");
50 $mynntp->group($group);
52 $post = new post($mynntp,$_REQUEST['id']);
54 if ($mynntp->lasterrorcode
== "423") {
55 $spool->delid($_REQUEST['id']);
57 echo "<p class=\"error\">\n\tError while reading message.\n</p>";
58 require("include/footer.inc.php");
62 $ndx = $spool->getndx($_REQUEST['id']);
66 <?php
echo $locale['article']['message'];?
>
70 if (($_GET['type']=='cancel') && (checkcancel($post->headers
))) {
73 <?php
echo $locale['article']['cancel'];?
>
74 <form action
="thread.php" method
="post">
75 <input type
="hidden" name
="group" value
="<?php echo $group;?>" />
76 <input type
="hidden" name
="id" value
="<?php
77 echo $_REQUEST['id'];?>" />
78 <input type
="hidden" name
="type" value
="cancel" />
79 <input type
="submit" name
="action" value
="<?php echo
80 $locale['article']['okbtn'];?>" />
89 <table
class="bicol" cellpadding
="0" cellspacing
="0"
90 summary
="<?php echo $locale['article']['summary'];?>">
93 <?php
echo $locale['article']['headers'];?
>
97 foreach ($news['head'] as $real => $nick) {
98 if (isset($post->headers
->$nick))
99 echo "<tr><td class=\"bicoltitre\">$real</td>"
100 ."<td>".formatdisplayheader($nick,$post->headers
->$nick,$spool)
106 <?php
echo $locale['article']['body'];?
>
111 <pre
><?php
echo formatbody($post->body
); ?
></pre
>
116 <?php
echo $locale['article']['overview'];?
>
120 <td
class="nopadd" colspan
="2">
121 <table
class="overview" cellpadding
="0" cellspacing
="0" summary
="overview">
123 $spool->disp($ndx-$news['threadtop'],$ndx+
$news['threadbottom'],$ndx);
132 require("include/footer.inc.php");