0fbea437 |
1 | <?php |
2 | /******************************************************************************** |
3 | * install.d/profile.inc.php : class for posts |
4 | * ----------------------- |
5 | * |
6 | * This file is part of the banana distribution |
7 | * Copyright: See COPYING files that comes with this distribution |
8 | ********************************************************************************/ |
9 | |
10 | /** checkcancel : sets cancel rights |
11 | * @param $_headers OBJECT headers of message to cancel |
12 | * @return BOOLEAN true if user has right to cancel message |
13 | */ |
14 | |
15 | function checkcancel($_headers) { |
16 | return ($_headers->from == $_SESSION['name']." <".$_SESSION['mail'].">"); |
17 | } |
18 | |
19 | /** getprofile : sets profile variables |
20 | * @return ARRAY associative array. Keys are 'name' (name), 'sig' (signature), 'org' |
21 | * (organization), 'display' (display threads with new posts only or all threads), |
22 | * 'lastnews' (timestamp for empasizing new posts) |
23 | */ |
24 | |
25 | function getprofile() { |
26 | $array['name'] = $_SESSION['name']." <" |
27 | .htmlentities($_SESSION['mail']).">"; |
28 | $array['sig'] = $_SESSION['sig']; |
29 | $array['org'] = $_SESSION['org']; |
189220d9 |
30 | $array['customhdr'] = ""; |
0fbea437 |
31 | $array['display'] = $_SESSION['displaytype']; |
32 | $array['lastnews'] = time()-86400; |
e2625e72 |
33 | $array['locale'] = "locales/fr.inc.php"; |
038d7ab3 |
34 | $array['subscribe'] = array(); |
74b61ee2 |
35 | $array['dropsig'] = true; |
0fbea437 |
36 | return $array; |
37 | } |
38 | ?> |