profile variables
authorx99bachelart <x99bachelart>
Wed, 3 Sep 2003 11:12:09 +0000 (11:12 +0000)
committerx99bachelart <x99bachelart>
Wed, 3 Sep 2003 11:12:09 +0000 (11:12 +0000)
install.d/profile.inc.php [new file with mode: 0644]

diff --git a/install.d/profile.inc.php b/install.d/profile.inc.php
new file mode 100644 (file)
index 0000000..3d2cf41
--- /dev/null
@@ -0,0 +1,34 @@
+<?php
+/********************************************************************************
+* install.d/profile.inc.php : class for posts
+* -----------------------
+*
+* This file is part of the banana distribution
+* Copyright: See COPYING files that comes with this distribution
+********************************************************************************/
+
+/** checkcancel : sets cancel rights
+ * @param $_headers OBJECT headers of message to cancel
+ * @return BOOLEAN true if user has right to cancel message
+ */
+
+function checkcancel($_headers) {
+  return ($_headers->from == $_SESSION['name']." <".$_SESSION['mail'].">");
+}
+
+/** getprofile : sets profile variables
+ * @return ARRAY associative array. Keys are 'name' (name), 'sig' (signature), 'org' 
+ *   (organization), 'display' (display threads with new posts only or all threads),
+ *   'lastnews' (timestamp for empasizing new posts)
+ */
+
+function getprofile() {
+  $array['name'] = $_SESSION['name']." <"
+    .htmlentities($_SESSION['mail']).">";
+  $array['sig'] = $_SESSION['sig'];
+  $array['org']  = $_SESSION['org'];
+  $array['display'] = $_SESSION['displaytype'];
+  $array['lastnews'] = time()-86400;
+  return $array;
+}
+?>