110d65b6ebd78dcd4da06fd05356a91163c2485f
2 /********************************************************************************
3 * subscribe.php : subscriptions 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/banana.inc.php");
11 require_once("include/header.inc.php");
13 $groups = new BananaGroups(2);
17 <?php
echo _b_('Abonnements'); ?
>
22 if (isset($_POST['subscribe']) && isset($_POST['action']) && $_POST['action']=="OK") {
23 update_subscriptions($_POST['subscribe']);
24 $banana->profile
['subscribe']=$_POST['subscribe'];
27 if (!sizeof($groups->overview
)) error("nntpgroups");
32 <form method
="post" action
="<?php echo $_SERVER['PHP_SELF'];?>">
33 <table
class="bicol" cellspacing
="0" cellpadding
="2">
36 <?php
echo _b_('Total'); ?
>
39 <?php
echo _b_('Abonné'); ?
>
42 <?php
echo _b_('Nom'); ?
>
45 <?php
echo _b_('Description'); ?
>
50 foreach ($groups->overview
as $g => $d) {
52 $groupinfo = $banana->nntp
->group($g);
53 $newarts = $banana->nntp
->newnews($banana->profile
['lastnews'], $g);
55 <tr
class="<?php echo ($pair?"pair
":"impair
");?>" >
57 <?php
echo $groupinfo[0]; ?
>
60 <input type
="checkbox" name
="subscribe[]" value
="<?php echo $g;?>"
61 <?php
if (in_array($g, $banana->profile
['subscribe'])) echo 'checked="checked"'; ?
> />
64 <?php
echo "<a href=\"thread.php?group=$g\">$g</a>";?
>
73 <tr
class="<?php echo (!$pair?"pair
":"impair
"); ?>">
74 <td colspan
="4" class="bouton">
75 <input type
="submit" name
="action" value
="OK" />
84 $banana->nntp
->quit();
85 require_once("include/footer.inc.php");