* Copyright: See COPYING files that comes with this distribution
********************************************************************************/
-require_once("include/session.inc.php");
require_once("include/misc.inc.php");
require_once("include/groups.inc.php");
require_once("include/format.inc.php");
$banana = new Banana;
+switch (basename($_SERVER['SCRIPT_NAME'])) {
+ case "thread.php":
+ if (!isset($_SESSION['bananapostok'])) {
+ $_SESSION['bananapostok']=true;
+ }
+ break;
+
+ default:
+ $_SESSION['bananapostok']=true;
+ break;
+}
+
if (empty($css)) {
$css = array(
'bananashortcuts' => 'bananashortcuts',
$text = preg_split("/[ \t]/",strtr($text,$banana->spool->ids));
$parents = preg_grep("/^\d+$/",$text);
$p = array_pop($parents);
+ $par_ok = Array();
while ($p) {
- $valid_parents[]=$p;
+ $par_ok[]=$p;
$p = $banana->spool->overview[$p]->parent;
}
- foreach (array_reverse($valid_parents) as $p) {
+ foreach (array_reverse($par_ok) as $p) {
$rsl .= "<a href=\"article.php?group={$banana->spool->group}&id=$p\">$ndx</a> ";
$ndx++;
}
+++ /dev/null
-<?php
-/********************************************************************************
-* include/session.inc.php : sessions for profile
-* -------------------------
-*
-* This file is part of the banana distribution
-* Copyright: See COPYING files that comes with this distribution
-********************************************************************************/
-
-session_start();
-
-// verify if a profile has been submitted
-if (!isset($_SESSION['profile']) && isset($_POST['action']) && $_POST['action']=="OK") {
- $_SESSION['name'] = $_POST['profile_name'];
- $_SESSION['mail'] = $_POST['profile_mail'];
- $_SESSION['org'] = $_POST['profile_org'];
- $_SESSION['sig'] = $_POST['profile_sig'];
- $_SESSION['login'] = $_POST['profile_login'];
- $_SESSION['passwd'] = $_POST['profile_passwd'];
- $_SESSION['displaytype'] = $_POST['displaytype'];
- $_SESSION['profile'] = true;
-}
-
-//sets sessions variables
-if (!isset($_SESSION['profile'])) {
- require_once("include/profile.inc.php");
- $profile=getprofile();
- require_once("header.inc.php");
- require_once("profile_form.inc.php");
- require_once("footer.inc.php");
- exit;
-}
-
-// refresh-post protection
-switch (basename($_SERVER['SCRIPT_NAME'])) {
- case "thread.php":
- if (!isset($_SESSION['bananapostok'])) {
- $_SESSION['bananapostok']=true;
- }
- break;
-
- default:
- $_SESSION['bananapostok']=true;
- break;
-}
-
-?>