ce496567b1727c80389e8f8367e5bf31e35f0b61
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");
20 require("include/error.inc.php");
22 $profile=getprofile();
23 require($profile['locale']);
25 require("include/header.inc.php");
27 if (isset($_REQUEST['group'])) {
28 $group=htmlentities(strtolower($_REQUEST['group']));
30 if (isset($_REQUEST['id'])) {
31 $id=htmlentities(strtolower($_REQUEST['id']));
34 $nntp = new nntp($news['server']);
35 if (!$nntp) error("nntpsock");
36 if ($news['user']!="anonymous") {
37 $result = $nntp->authinfo($news["user"],$news["pass"]);
38 if (!$result) erro("nntpauth");
40 $spool = new spool($nntp,$group,$profile['display'],$profile['lastnews']);
41 if (!$spool) error("nntpspool");
44 $post = new post($nntp,$id);
46 if ($nntp->lasterrorcode
== "423") {
52 $ndx = $spool->getndx($id);
55 <div
class="<?php echo $css['title']?>">
56 <?php
echo $locale['article']['message'];?
>
60 if (isset($_GET['type']) && ($_GET['type']=='cancel') && (checkcancel($post->headers
))) {
62 <p
class="<?php echo $css['error']?>">
63 <?php
echo $locale['article']['cancel'];?
>
64 <form action
="thread.php" method
="post">
65 <input type
="hidden" name
="group" value
="<?php echo $group;?>" />
66 <input type
="hidden" name
="id" value
="<?php
68 <input type
="hidden" name
="type" value
="cancel" />
69 <input type
="submit" name
="action" value
="<?php echo
70 $locale['article']['okbtn'];?>" />
79 <table
class="<?php echo $css['bicol']?>" cellpadding
="0" cellspacing
="0"
80 summary
="<?php echo $locale['article']['summary'];?>">
83 <?php
echo $locale['article']['headers'];?
>
87 foreach ($news['headdisp'] as $nick => $real) {
88 if (isset($post->headers
->$nick))
89 echo "<tr><td class=\"{$css['bicoltitre']}\">$real</td>"
90 ."<td>".formatdisplayheader($nick,$post->headers
->$nick,$spool)
96 <?php
echo $locale['article']['body'];?
>
101 <pre
><?php
echo formatbody($post->body
); ?
></pre
>
106 <?php
echo $locale['article']['overview'];?
>
110 <td
class="<?php echo $css['nopadd']?>" colspan
="2">
111 <table
class="<?php echo $css['overview']?>" cellpadding
="0"
112 cellspacing
="0" summary
="overview">
114 $spool->disp($ndx-$news['threadtop'],$ndx+
$news['threadbottom'],$ndx);
123 require("include/footer.inc.php");