1c7063db73c71ee2e23c212e7ef768ba0ff21af0
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="<?php echo $css["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?$css["pair
"]:$css["impair
"]);?>" >
56 <td
class="<?php echo $css["total
"]; ?>">
57 <?php
echo $groupinfo[0]; ?
>
59 <td
class="<?php echo $css["unread
"]; ?>">
60 <input type
="checkbox" name
="subscribe[]" value
="<?php echo $g;?>"
61 <?php
if (in_array($g, $banana->profile
['subscribe'])) echo 'checked="checked"'; ?
> />
63 <td
class="<?php echo $css["group
"]; ?>">
64 <?php
echo "<a href=\"thread.php?group=$g\">$g</a>";?
>
66 <td
class="<?php echo $css["description
"]; ?>">
73 <tr
class="<?php echo (!$pair?$css["pair
"]:$css["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");