c87d7e96 |
1 | <?php |
2 | /******************************************************************************** |
3 | * include/session.inc.php : sessions for profile |
4 | * ------------------------- |
5 | * |
6 | * This file is part of the banana distribution |
7 | * Copyright: See COPYING files that comes with this distribution |
8 | ********************************************************************************/ |
9 | |
10 | session_start(); |
11 | |
ac4afc23 |
12 | // verify if a profile has been submitted |
91786088 |
13 | if (!isset($_SESSION['profile']) && isset($_POST['action']) && $_POST['action']=="OK") { |
efec50ec |
14 | $_SESSION['name'] = $_POST['profile_name']; |
15 | $_SESSION['mail'] = $_POST['profile_mail']; |
16 | $_SESSION['org'] = $_POST['profile_org']; |
17 | $_SESSION['sig'] = $_POST['profile_sig']; |
18 | $_SESSION['login'] = $_POST['profile_login']; |
19 | $_SESSION['passwd'] = $_POST['profile_passwd']; |
20 | $_SESSION['displaytype'] = $_POST['displaytype']; |
21 | $_SESSION['profile'] = true; |
c87d7e96 |
22 | } |
25d27cb7 |
23 | |
ac4afc23 |
24 | //sets sessions variables |
25 | if (!isset($_SESSION['profile'])) { |
efec50ec |
26 | require_once("include/profile.inc.php"); |
27 | $profile=getprofile(); |
efec50ec |
28 | require_once("header.inc.php"); |
29 | require_once("profile_form.inc.php"); |
30 | require_once("footer.inc.php"); |
31 | exit; |
ac4afc23 |
32 | } |
33 | |
25d27cb7 |
34 | // refresh-post protection |
efec50ec |
35 | switch (basename($_SERVER['SCRIPT_NAME'])) { |
36 | case "thread.php": |
37 | if (!isset($_SESSION['bananapostok'])) { |
38 | $_SESSION['bananapostok']=true; |
39 | } |
40 | break; |
41 | |
42 | default: |
43 | $_SESSION['bananapostok']=true; |
44 | break; |
25d27cb7 |
45 | } |
efec50ec |
46 | |
c87d7e96 |
47 | ?> |