X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=article.php;h=d30e4c4ebc3e1440f11556258f071d89c8efc97a;hb=1248ebac1f106382e4c0cc888e6598d5eccf3eef;hp=a62311c71b1139a389e5d3200cf3ae9373612078;hpb=d4c195913991d708094171f9f5be70516fa92f64;p=banana.git diff --git a/article.php b/article.php index a62311c..d30e4c4 100644 --- a/article.php +++ b/article.php @@ -7,116 +7,31 @@ * Copyright: See COPYING files that comes with this distribution ********************************************************************************/ -require_once("include/session.inc.php"); -require_once("include/misc.inc.php"); -require_once("include/format.inc.php"); -require_once("include/config.inc.php"); -require_once("include/NetNNTP.inc.php"); -require_once("include/spool.inc.php"); -require_once("include/post.inc.php"); -require_once("include/profile.inc.php"); -require_once("include/password.inc.php"); -require_once("include/error.inc.php"); - -$profile = getprofile(); +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'])); -} - -$nntp = new nntp($news['server']); -if (!$nntp) error("nntpsock"); -if ($news['user']!="anonymous") { - $result = $nntp->authinfo($news["user"],$news["pass"]); - if (!$result) error("nntpauth"); -} -$spool = new BananaSpool($nntp,$group,$profile['display'],$profile['lastnews']); -if (!$spool) error("nntpspool"); -$nntp->group($group); - -$post = new BananaPost($nntp,$id); -if (!$post) { - if ($nntp->lasterrorcode == "423") { - $spool->delid($id); - } - error("nntpart"); + $id = htmlentities(strtolower($_REQUEST['id'])); } -$ndx = $spool->getndx($id); - -?> -

- -

+echo $banana->action_showArticle($group, $id); -headers))) { +if (isset($_GET['type']) && $_GET['type']=='cancel' && $banana->post->checkcancel()) { ?> -

+

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