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 | */ |
0fbea437 |
14 | function checkcancel($_headers) { |
efec50ec |
15 | return ($_headers->from == $_SESSION['name']." <".$_SESSION['mail'].">"); |
0fbea437 |
16 | } |
17 | |
18 | /** getprofile : sets profile variables |
19 | * @return ARRAY associative array. Keys are 'name' (name), 'sig' (signature), 'org' |
20 | * (organization), 'display' (display threads with new posts only or all threads), |
21 | * 'lastnews' (timestamp for empasizing new posts) |
22 | */ |
23 | |
24 | function getprofile() { |
efec50ec |
25 | $array['name'] = $_SESSION['name']." <".htmlentities($_SESSION['mail']).">"; |
26 | $array['sig'] = $_SESSION['sig']; |
27 | $array['org'] = $_SESSION['org']; |
28 | $array['customhdr'] = ""; |
29 | $array['display'] = $_SESSION['displaytype']; |
30 | $array['lastnews'] = time()-86400; |
31 | $array['locale'] = "locales/fr.inc.php"; |
32 | $array['subscribe'] = array(); |
33 | $array['dropsig'] = true; |
34 | return $array; |
0fbea437 |
35 | } |
36 | ?> |