00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
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
00055
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
00081 $be_group_Array=t3lib_BEfunc::getListGroupNames("title,uid");
00082 $groupArray=array_keys($be_group_Array);
00083
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
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 ?>