X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=article.php;h=d30e4c4ebc3e1440f11556258f071d89c8efc97a;hb=1248ebac1f106382e4c0cc888e6598d5eccf3eef;hp=ce496567b1727c80389e8f8367e5bf31e35f0b61;hpb=a3b667fec7ee31b6b20681b813a33a44bb281cbc;p=banana.git diff --git a/article.php b/article.php index ce49656..d30e4c4 100644 --- a/article.php +++ b/article.php @@ -7,118 +7,31 @@ * Copyright: See COPYING files that comes with this distribution ********************************************************************************/ -require("include/session.inc.php"); -require("include/encoding.inc.php"); -require("include/wrapper.inc.php"); -require("include/format.inc.php"); -require("include/config.inc.php"); -require("include/NetNNTP.inc.php"); -require("include/spool.inc.php"); -require("include/post.inc.php"); -require("include/profile.inc.php"); -require("include/password.inc.php"); -require("include/error.inc.php"); - -$profile=getprofile(); -require($profile['locale']); - -require("include/header.inc.php"); +require_once("include/banana.inc.php"); +require_once("include/header.inc.php"); if (isset($_REQUEST['group'])) { - $group=htmlentities(strtolower($_REQUEST['group'])); + $group = htmlentities(strtolower($_REQUEST['group'])); } if (isset($_REQUEST['id'])) { - $id=htmlentities(strtolower($_REQUEST['id'])); + $id = htmlentities(strtolower($_REQUEST['id'])); } -$nntp = new nntp($news['server']); -if (!$nntp) error("nntpsock"); -if ($news['user']!="anonymous") { - $result = $nntp->authinfo($news["user"],$news["pass"]); - if (!$result) erro("nntpauth"); -} -$spool = new spool($nntp,$group,$profile['display'],$profile['lastnews']); -if (!$spool) error("nntpspool"); -$nntp->group($group); - -$post = new post($nntp,$id); -if (!$post) { - if ($nntp->lasterrorcode == "423") { - $spool->delid($id); - } - error("nntpart"); -} +echo $banana->action_showArticle($group, $id); -$ndx = $spool->getndx($id); - -?> -
- -
- -headers))) { +if (isset($_GET['type']) && $_GET['type']=='cancel' && $banana->post->checkcancel()) { ?> -

- -

- - - - -
+

+

+
+ + + + +
- - - - - - $real) { - if (isset($post->headers->$nick)) - echo "" - ."\n"; -} -?> - - - - - - - - - - - - -
- -
$real".formatdisplayheader($nick,$post->headers->$nick,$spool) - ."
- -
-
body); ?>
-
- -
- -disp($ndx-$news['threadtop'],$ndx+$news['threadbottom'],$ndx); -?> -
-
-