+
+$this->profile['subscribe'][] = 'xorg.general';
+$this->profile['subscribe'][] = 'xorg.test';
+$this->profile['subscribe'][] = 'xorg.promo.x1970';
+$this->profile['lastnews'] = time() - 24*3600*7;
+
+ }
+
+ function run()
+ {
+ require_once("include/misc.inc.php");
+ global $banana;
+
+ $banana = new Banana();
+ $group = empty($_GET['group']) ? null : strtolower($_GET['group']);
+ $artid = empty($_GET['artid']) ? null : strtolower($_GET['artid']);
+ $banana->state = Array ('group' => $group, 'artid' => $artid);
+
+ if (is_null($group)) {
+
+ return $banana->action_listGroups();
+
+ } elseif (is_null($artid)) {
+
+ if (isset($_POST['action']) && $_POST['action'] == 'new') {
+ return $banana->action_doFup($group, isset($_POST['artid']) ? intval($_POST['artid']) : -1);
+ } elseif (isset($_GET['action']) && $_GET['action'] == 'new') {
+ return $banana->action_newFup($group);
+ } else {
+ return $banana->action_showThread($group, isset($_GET['first']) ? intval($_GET['first']) : 1);
+ }
+
+ } else {
+
+ if (isset($_POST['action']) && $_POST['action']=='cancel') {
+ $res = $banana->action_cancelArticle($group, $artid);
+ } else {
+ $res = '';
+ }
+
+ if (isset($_GET['action'])) {
+ switch ($_GET['action']) {
+ case 'cancel':
+ $res .= $banana->action_showArticle($group, $artid);
+ if ($banana->post->checkcancel()) {
+ $form = '<p class="error">'._b_('Voulez-vous vraiment annuler ce message ?').'</p>'
+ . "<form action=\"?group=$group&artid=$artid\" method='post'><p>"
+ . '<input type="hidden" name="action" value="cancel" />'
+ . '<input type="submit" value="Annuler !" />'
+ . '</p></form>';
+ return $form.$res;
+ }
+ return $res;
+
+ case 'new':
+ return $banana->action_newFup($group, $artid);
+ }
+ }
+ return $res . $banana->action_showArticle($group, $artid);
+ }