Documentation TYPO3 par Ameos

class.mod_user_task.php

00001 <?php
00002 /***************************************************************
00003 *  Copyright notice
00004 *
00005 *  (c) 1999-2004 Kasper Skaarhoj (kasperYYYY@typo3.com)
00006 *  All rights reserved
00007 *
00008 *  This script is part of the TYPO3 project. The TYPO3 project is
00009 *  free software; you can redistribute it and/or modify
00010 *  it under the terms of the GNU General Public License as published by
00011 *  the Free Software Foundation; either version 2 of the License, or
00012 *  (at your option) any later version.
00013 *
00014 *  The GNU General Public License can be found at
00015 *  http://www.gnu.org/copyleft/gpl.html.
00016 *  A copy is found in the textfile GPL.txt and important notices to the license
00017 *  from the author is found in LICENSE.txt distributed with these scripts.
00018 *
00019 *
00020 *  This script is distributed in the hope that it will be useful,
00021 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00022 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00023 *  GNU General Public License for more details.
00024 *
00025 *  This copyright notice MUST APPEAR in all copies of the script!
00026 ***************************************************************/
00033 require_once(PATH_t3lib."class.t3lib_extobjbase.php");
00034 
00035 class mod_user_task extends t3lib_extobjbase {
00036         var $getUserNamesFields = "username,usergroup,usergroup_cached_list,uid,realName,email";
00037         var $userGroupArray=array();
00038         var $perms_clause="";
00039 
00040         var $backPath;
00041         var $BE_USER;
00042 
00043         function JScode()       {
00044 
00045         }
00046         function sendEmail($email,$subject,$message)    {
00047                 $sender = $this->BE_USER->user["realName"]." <".$this->BE_USER->user["email"].">";
00048                 $message.='
00049 
00050 --------
00051 '.sprintf($GLOBALS["LANG"]->getLL("messages_emailFooter"),$GLOBALS["TYPO3_CONF_VARS"]["SYS"]["sitename"],t3lib_div::getIndpEnv("HTTP_HOST"));
00052                 mail($email,$GLOBALS["TYPO3_CONF_VARS"]["BE"]["notificationPrefix"]." ".$subject,$message,"From: ".$sender);
00053 
00054 //              debug($email);
00055 //              debug($message);
00056         }
00057         function mod_user_task_init($BE_USER)   {
00058                 $this->BE_USER = $BE_USER;
00059                 $this->perms_clause = $this->BE_USER->getPagePermsClause(1);
00060         }
00061         function helpBubble()   {
00062                 return '<img src="'.$this->backPath.'gfx/helpbubble.gif" width="14" height="14" hspace=2 align=top'.$GLOBALS["SOBE"]->doc->helpStyle().'>';
00063         }
00064         function loadLeftFrameJS()      {
00065                 $str = '<script language="javascript" type="text/javascript">if (parent.nav_frame)      parent.nav_frame.document.location="overview.php";</script>';
00066                 return $str;
00067         }
00068         function headLink($key,$dontLink=0,$params="")  {
00069                 $str = $GLOBALS["SOBE"]->MOD_MENU["function"][$key];
00070                 if (!$dontLink) $str = '<a href="index.php?SET[function]='.$key.$params.'" target="list_frame" onClick="this.blur();">'.htmlspecialchars($str).'</a>';
00071                 return $str;
00072         }
00073         function fixed_lgd($str,$len=0) {
00074                 return t3lib_div::fixed_lgd($str,$len?$len:$this->BE_USER->uc["titleLen"]);
00075         }
00076         function errorIcon()    {
00077                 return '<img src="'.$this->backPath.'gfx/icon_fatalerror.gif" width="18" height="16" align=top>';
00078         }
00079         function getUserAndGroupArrays()        {
00080                         // Get groupnames for todo-tasks
00081                 $be_group_Array=t3lib_BEfunc::getListGroupNames("title,uid");
00082                 $groupArray=array_keys($be_group_Array);
00083                         // Usernames
00084                 $be_user_Array = $be_user_Array_o = t3lib_BEfunc::getUserNames($this->getUserNamesFields);
00085                 if (!$GLOBALS["BE_USER"]->isAdmin())            $be_user_Array = t3lib_BEfunc::blindUserNames($be_user_Array,$groupArray,1);
00086 
00087                 $this->userGroupArray = array($be_user_Array,$be_group_Array,$be_user_Array_o);
00088                 return $this->userGroupArray;
00089         }
00090         function dateTimeAge($tstamp,$prefix=1) {
00091                 return t3lib_BEfunc::dateTimeAge($tstamp,$prefix);
00092         }
00093         function accessMod($mod)        {
00094                 return $this->BE_USER->modAccess(array("name"=>$mod,"access"=>"user,group"),0);
00095         }
00096 }
00097 
00098 // Include extension?
00099 if (defined("TYPO3_MODE") && $TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/taskcenter/task/class.mod_user_task.php"])     {
00100         include_once($TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/taskcenter/task/class.mod_user_task.php"]);
00101 }
00102 
00103 
00104 ?>


Généré par Les spécialistes TYPO3 avec  doxygen 1.4.6