1015fc7d8dc47637bb3e085333a56bb65f33ea94
[banana.git] / install.d / profile.inc.php
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'];
30 $array['display'] = $_SESSION['displaytype'];
31 $array['lastnews'] = time()-86400;
32 $array['locale'] = "locales/fr.inc.php";
33 return $array;
34 }
35 ?>