a62311c71b1139a389e5d3200cf3ae9373612078
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_once("include/session.inc.php");
11 require_once("include/misc.inc.php");
12 require_once("include/format.inc.php");
13 require_once("include/config.inc.php");
14 require_once("include/NetNNTP.inc.php");
15 require_once("include/spool.inc.php");
16 require_once("include/post.inc.php");
17 require_once("include/profile.inc.php");
18 require_once("include/password.inc.php");
19 require_once("include/error.inc.php");
21 $profile = getprofile();
22 require_once("include/header.inc.php");
24 if (isset($_REQUEST['group'])) {
25 $group=htmlentities(strtolower($_REQUEST['group']));
27 if (isset($_REQUEST['id'])) {
28 $id=htmlentities(strtolower($_REQUEST['id']));
31 $nntp = new nntp($news['server']);
32 if (!$nntp) error("nntpsock");
33 if ($news['user']!="anonymous") {
34 $result = $nntp->authinfo($news["user"],$news["pass"]);
35 if (!$result) error("nntpauth");
37 $spool = new BananaSpool($nntp,$group,$profile['display'],$profile['lastnews']);
38 if (!$spool) error("nntpspool");
41 $post = new BananaPost($nntp,$id);
43 if ($nntp->lasterrorcode
== "423") {
49 $ndx = $spool->getndx($id);
53 <?php
echo _b_('Message'); ?
>
57 if (isset($_GET['type']) && ($_GET['type']=='cancel') && (checkcancel($post->headers
))) {
59 <p
class="<?php echo $css['error']?>">
60 <?php
echo _b_('Voulez-vous vraiment annuler ce message ?'); ?
>
62 <form action
="thread.php" method
="post">
63 <input type
="hidden" name
="group" value
="<?php echo $group;?>" />
64 <input type
="hidden" name
="id" value
="<?php
66 <input type
="hidden" name
="type" value
="cancel" />
67 <input type
="submit" name
="action" value
="<?php echo _b_('OK'); ?>" />
75 <table
class="<?php echo $css['bicol']?>" cellpadding
="0" cellspacing
="0"
76 summary
="<?php echo _b_('Contenu du message'); ?>">
79 <?php
echo _b_('En-têtes'); ?
>
83 foreach ($news['headdisp'] as $nick) {
84 if (isset($post->headers
[$nick])) {
85 $res = formatdisplayheader($nick,$post->headers
[$nick],$spool);
87 echo "<tr><td class=\"{$css['bicoltitre']}\">".header_translate($nick)."</td>"
88 ."<td>$res</td></tr>\n";
94 <?php
echo _b_('Corps'); ?
>
99 <pre
><?php
echo formatbody($post->body
); ?
></pre
>
104 <?php
echo _b_('Aperçu'); ?
>
108 <td
class="<?php echo $css['nopadd']?>" colspan
="2">
109 <table
class="<?php echo $css['overview']?>" cellpadding
="0"
110 cellspacing
="0" summary
="overview">
112 $spool->disp($ndx-$news['threadtop'],$ndx+
$news['threadbottom'],$ndx);
121 require_once("include/footer.inc.php");