$udd_whofrom = $udd_themessage->systemmessage; } else { $udd_whofrom = $udd_themessage->displayname; } if (function_exists('bcdiv')) { $udd_halfchars = bcdiv($udd_par_maxchars, 2, 0); } elseif (function_exists('floor')) { $udd_halfchars = floor($udd_par_maxchars / 2); } else { $udd_halfchars = $udd_par_maxchars / 2; } if (strlen($udd_whofrom) >= $udd_halfchars - 1) { $udd_whofrom = substr($udd_whofrom, 0, $udd_halfchars - 1); $udd_whofrom = $udd_whofrom . "."; } $udd_cm = uddeIMgetMessage($udd_themessage->message, "", $udd_themessage->cryptmode, "", $udd_config->cryptkey); $udd_displaymessage = stripslashes($udd_cm); if ($udd_themessage->systemmessage || $udd_config->allowbb) { require_once $udd_pathtouser . "/bbparser.php"; $udd_displaymessage = uddeIMbbcode_strip($udd_displaymessage); } $udd_displaymessage = htmlspecialchars($udd_displaymessage, ENT_QUOTES, $udd_config->charset); $udd_displaymessage = str_replace("&#", "&#", $udd_displaymessage); $udd_maxlen = $udd_par_maxchars - strlen($udd_whofrom) - 1; // one space if ($udd_maxlen < 5) { $udd_maxlen = 5; } if ($udd_themessage->cryptmode == 2) { $udd_pms_show = uddeIMsefRelToAbs("index.php?option=com_uddeim" . ($udd_item_id ? "&Itemid=" . $udd_item_id : "") . "&task=showpass&messageid=" . $udd_themessage->id); } else {
function uddeIMshowTrashCan($myself, $item_id, $limit, $limitstart, $cryptpass, $config) { global $uddeicons_onlinepic, $uddeicons_offlinepic, $uddeicons_readpic, $uddeicons_unreadpic; $pathtosite = uddeIMgetPath('live_site'); $pathtouser = uddeIMgetPath('user'); $my_gid = $config->usergid; if( ($config->trashrestriction==0) || ($config->trashrestriction==1 && (uddeIMisSpecial($my_gid) || uddeIMisSpecial2($my_gid, $config))) || ($config->trashrestriction==2 && (uddeIMisAdmin($my_gid) || uddeIMisAdmin2($my_gid, $config))) ) { // ok trashcan enabled } else { uddeIMprintMenu($myself, 'trashcan', $item_id, $config); echo "<div id='uddeim-m'>\n"; echo "<div id='uddeim-overview'><p><b>"._UDDEADM_NOTRASHACCESS_NOT."</b></p></div>\n"; echo "</div>\n<div id='uddeim-bottomborder'>".uddeIMcontentBottomborder($myself, $item_id, 'standard', 'none', $config)."</div>\n"; return; } $rightnow=uddetime($config->timezone); $offset=((float)$config->TrashLifespan) * 86400; $timeframe=$rightnow-$offset; $total = uddeIMgetTrashcanCount($myself, $timeframe); // now load messages as required if(!$limitstart) { $limitstart=0; } if(!$limit) { $limit=$config->perpage; } if ($limitstart>=$total) $limitstart=max(0,$limitstart - $limit); $allmessages = Array(); if ($total>0) $allmessages = uddeIMselectTrashcan($myself, $timeframe, $limitstart, $limit, $config); // write the uddeim menu uddeIMprintMenu($myself, 'trashcan', $item_id, $config); echo "<div id='uddeim-m'>\n"; // if no messages: if(count($allmessages)<1) { // no messages to list echo "<div id='uddeim-overview'><p><b>"._UDDEIM_NOMESSAGES_TRASHCAN."</b></p>\n</div>\n"; // and close the HTML output and return echo "</div>\n<div id='uddeim-bottomborder'>".uddeIMcontentBottomborder($myself, $item_id, 'standard', 'none', $config)."</div>\n"; return; } // now open the inbox container and table; write table headings echo "<div id='uddeim-overview'>"; echo "<table cellpadding='7' width='100%'>"; // echo "\n\n\t<tr><th class='sectiontableheader'> </th><th class='sectiontableheader'>"._UDDEIM_FROM." / "._UDDEIM_TO."</th><th class='sectiontableheader'>"._UDDEIM_MESSAGE."</th><th class='sectiontableheader'>"._UDDEIM_DATE."</th><th class='sectiontableheader'> </th></tr>"; echo "\n\n\t<tr><th class='sectiontableheader'> </th><th class='sectiontableheader'>"._UDDEIM_FROM." / "._UDDEIM_TO."</th><th class='sectiontableheader'>"._UDDEIM_MESSAGE."</th><th class='sectiontableheader'>"._UDDEIM_DELETED."</th><th class='sectiontableheader'> </th></tr>"; $i=1; // now write the list foreach($allmessages as $themessage) { if($themessage->toread) { $readcell=$uddeicons_readpic; } else { $readcell=$uddeicons_unreadpic; } if ($config->showlistattachment) { $cnt = uddeIMgetAttachmentCount($themessage->id); if ($cnt) $readcell .= "<br /><img src='".$pathtosite."/components/com_uddeim/templates/".$config->templatedir."/images/attachment.gif' alt='"._UDDEIM_ATTACHMENT."' title='"._UDDEIM_ATTACHMENT."' border='0' />"; } $themarker = ""; $theuser = 0; $datumcell = ""; // $createdcell=uddeDate($themessage->datum, $config, uddeIMgetUserTZ()); if ($myself==$themessage->toid && $myself!=$themessage->fromid) { // Msg sent to me, sender is someone else, so user is in "fromid" $themarker = "<"; $theuser = $themessage->fromid; $datumcell=uddeDate($themessage->totrashdate, $config, uddeIMgetUserTZ()); // $displayname = $themessage->fromname; $displayname = uddeIMevaluateUsername($themessage->fromname, $themessage->fromid, $themessage->publicname); } elseif ($myself==$themessage->fromid && $myself!=$themessage->toid) { // Msg sent by me, receiver is someone else, so user is in "toid" $themarker = ">"; $theuser = $themessage->toid; $datumcell=uddeDate($themessage->totrashdateoutbox, $config, uddeIMgetUserTZ()); // $displayname = $themessage->toname; $displayname = uddeIMevaluateUsername($themessage->toname, $themessage->toid, $themessage->publicname); } else { // this case appears when a copy to me message has been trashed my myself // totrashoutbox=1 messages (sender has trashed are not selected in the SQL statement, so they do not appear here // totrash=1 messages has been trashed by myself, so I show them in the trashcan $themarker = "<"; // the message has been send to me (we could also reorder the if-clause and catch this case with "$myself==$themessage->toid" but maybe I change the marker sometime) $theuser = $themessage->fromid; $datumcell=uddeDate($themessage->totrashdate, $config, uddeIMgetUserTZ()); // $displayname = $themessage->fromname; $displayname = uddeIMevaluateUsername($themessage->fromname, $themessage->fromid, $themessage->publicname); } // systemmsg = "an XXX XXXX" $personalsys=0; if($themessage->systemflag && $myself==$themessage->toid && $themessage->systemmessage==$displayname) { $personalsys=1; } if($themessage->systemflag && $myself==$themessage->toid) { $displayname=$themessage->systemmessage; // its for me, so show systemname "to username" (copy2me message) } $fromcell = $themarker." ".$displayname; if ($theuser) { if(($config->showcblink && !$themessage->systemflag) || ($config->showcblink && $personalsys)) { $fromcell = uddeIMshowThumbOrLink($theuser, $themarker." ".$displayname, $config); } // Is this user currently online? Don't check, if it is a system message if (($config->showonline && !$themessage->systemflag) || ($config->showonline && $personalsys)) { $isonline = uddeIMisOnline($theuser); if($isonline) { $fromcell.=" ".$uddeicons_onlinepic; } else { $fromcell.=" ".$uddeicons_offlinepic; } } } // CRYPT $cm = uddeIMgetMessage($themessage->message, $cryptpass, $themessage->cryptmode, $themessage->crypthash, $config->cryptkey); $teasermessage=$cm; // if it is a system message or bb codes allowed, parse BB codes if ($themessage->systemflag || $config->allowbb) $teasermessage=uddeIMbbcode_strip($teasermessage); $teasermessage=uddeIMteaser(stripslashes($teasermessage), $config->firstwordsinbox, $config->quotedivider, $config->languagecharset); $teasermessage=htmlspecialchars($teasermessage, ENT_QUOTES, $config->charset); $teasermessage=str_replace("&#", "&#", $teasermessage); $teasermessage=str_replace("&</br>", " ", $teasermessage); $safemessage=htmlspecialchars(stripslashes($cm), ENT_QUOTES, $config->charset); $safemessage=str_replace("&</br>", "</br>", $safemessage); $messagecell=$teasermessage; if($config->actionicons) { $deletecell="<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=restore&Itemid=".$item_id."&limit=".$limit."&limitstart=".$limitstart."&messageid=".$themessage->id)."'><img src='".$pathtosite."/components/com_uddeim/templates/".$config->templatedir."/images/recycle.gif' alt='"._UDDEIM_RESTORE."' title='"._UDDEIM_RESTORE."' /></a>"; } else { $deletecell="<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=restore&Itemid=".$item_id."&limit=".$limit."&limitstart=".$limitstart."&messageid=".$themessage->id)."'>"._UDDEIM_RESTORE."</a>"; } echo "\n\t<tr class='sectiontableentry".$i."'>"; echo "\n\t\t<td style='width:32px; text-align:center; vertical-align:middle'>".$readcell."</td>"; $st=uddeIMgetStyleForThumb($config); echo "\n\t\t<td ".$st.">".$fromcell."</td>"; echo "\n\t\t<td>".$messagecell."</td>"; // echo "\n\t\t<td>".$createdcell."</td>"; echo "\n\t\t<td>".$datumcell."</td>"; if($config->actionicons) { echo "\n\t\t<td style='width:32px; text-align:center; vertical-align:middle'>".$deletecell."</td>"; } else { echo "\n\t\t<td class='pathway'>".$deletecell."</td>"; } echo "</tr>"; $i++; if ($i>2) { $i=1; } } // now close inbox table and container echo "\n</table></div>\n"; // write the inbox navigation links $pageNav = new uddeIMmosPageNav($total, $limitstart, $limit); $referlink = "index.php?option=com_uddeim&task=trashcan&Itemid=".$item_id; if($total>$limit) { $shownav = $pageNav->writePagesLinks($referlink); $shownav = uddeIMarrowReplace($shownav, $config->templatedir, $pathtouser); echo "<div id='uddeim-pagenav'>".$shownav."<br />"; echo "[<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=trashcan&Itemid=".$item_id."&limitstart=0&limit=".$total)."'>"._UDDEIM_SHOWALL."</a>]"; echo "</div>\n"; } $keephours=((float)$config->TrashLifespan) * 24; echo "<div id='uddeim-bottomlines'>"; if ($config->TrashLifespanNote) echo "<p>"._UDDEIM_TRASHCAN_INFO_1.$keephours._UDDEIM_TRASHCAN_INFO_2."</p>"; echo "</div>\n"; echo "</div>\n<div id='uddeim-bottomborder'>".uddeIMcontentBottomborder($myself, $item_id, 'standard', 'none', $config)."</div>\n"; }
function uddeIMshowMessage($myself, $item_id, $messageid, $isforward, $cryptpass, $config) { global $uddeicons_onlinepic, $uddeicons_offlinepic, $uddeicons_readpic, $uddeicons_unreadpic; $my_gid = $config->usergid; $displaymessages = uddeIMselectInboxMessage($myself, $messageid, $config, 0); if (count($displaymessages)<1) { echo _UDDEIM_MESSAGENOACCESS; return; } // write the uddeim menu uddeIMprintMenu($myself, 'showMessage', $item_id, $config); echo "<div id='uddeim-m'>\n"; foreach($displaymessages as $displaymessage) { $is_spam = 0; if ($config->reportspam) // save one database query if possible $is_spam = uddeIMgetSpamStatus($messageid); $fromname = uddeIMevaluateUsername($displaymessage->fromname, $displaymessage->fromid, $displaymessage->publicname); if ($displaymessage->systemflag) $fromname = $displaymessage->systemmessage; $personalsys = 0; if ($displaymessage->systemflag && $displaymessage->systemmessage==$displaymessage->fromname) $personalsys = 1; // CRYPT $cm = uddeIMgetMessage($displaymessage->message, $cryptpass, $displaymessage->cryptmode, $displaymessage->crypthash, $config->cryptkey); // echo str_replace("&#", "&#", nl2br(htmlspecialchars(stripslashes($cm), ENT_QUOTES, $config->charset))); $dmessage = nl2br(htmlspecialchars(stripslashes($cm), ENT_QUOTES, $config->charset)); $dmessage = str_replace("&#", "&#", $dmessage); // unicode workaround $dmessage = str_replace("&</br>", "</br>", $dmessage); // if system message or bbcodes allowed, call parser if ($displaymessage->systemflag || $config->allowbb) $dmessage = uddeIMbbcode_replace($dmessage, $config); if ($config->allowsmile) $dmessage = uddeIMsmile_replace($dmessage, $config); $bodystring = $dmessage; // converted message for email body $replytomessage = ""; if ($config->replytext) $replytomessage = uddeIMreplySuggestion($cm, $displaymessage, $fromname, "", $isforward, "inbox", $config); // We used an placeholder above to insert the "reply suggestion" for the "mailto:" link $urlbody = rawurlencode($replytomessage); // display the message $headerstring="<table class='innermost'><tr>"; // does CB have a thumbnail image of the sender? if ($config->showcbpic && $displaymessage->fromname || $config->gravatar) { $frompic = uddeIMgetPicOnly($displaymessage->fromid, $config); if ($frompic && ($personalsys || !$displaymessage->systemflag)) $headerstring.="<td valign='top' rowspan='2'>".$frompic."</td>\n"; } $headerstring.="<td valign='top' width='99%'><div class='uddeim-messagefrom'>"; if ($displaymessage->toid!=$displaymessage->fromid) { // not a copy to myself $headerstring.=_UDDEIM_MESSAGEFROM; } else { // $headerstring.=_UDDEIM_MESSAGE." "; // BUGBUG: "Message admin" - sollte besser "Copy to yourself" sein if ( 0 == strncasecmp($displaymessage->systemmessage, _UDDEIM_TO_SMALL." ", strlen(_UDDEIM_TO_SMALL)+1 ) ) $headerstring.=_UDDEIM_MESSAGE." "; // systemmsg is "to XXX", so suppress the from (copy2me) else $headerstring.=_UDDEIM_MESSAGEFROM." "; // systemmsg is a name } // show links ??? $temp = $fromname; if ($config->showcblink && $displaymessage->fromname) { if (!$displaymessage->systemflag || $personalsys) { $temp = uddeIMgetLinkOnly($displaymessage->fromid, $fromname, $config); } } // display email address if ($displaymessage->fromname==NULL && !$displaymessage->fromid && $displaymessage->publicemail!=NULL) $temp .= " <<a href='mailto:".$displaymessage->publicemail."?body=".$urlbody."'>".$displaymessage->publicemail."</a>>"; $headerstring.=$temp; // is this user currently online? if ($config->showonline && $displaymessage->fromname) { if (!$displaymessage->systemflag || $personalsys) { $isonline = uddeIMisOnline($displaymessage->fromid); if ($isonline) $headerstring.=" ".$uddeicons_onlinepic; else $headerstring.=" ".$uddeicons_offlinepic; } } $headerstring.="<br />"; $headerstring.=uddeLdate($displaymessage->datum, $config, uddeIMgetUserTZ()); $headerstring.="</div></td><td valign='top'><span class='uddeim-clear'> </span><ul>"; // show delete & block links if ($config->allowforwards) { if ($displaymessage->cryptmode==2 || $displaymessage->cryptmode==4) { // Message is encrypted, so go to enter password page $headerstring.="<li class='uddeim-messageactionlink-forward'><a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=forwardpass&Itemid=".$item_id."&messageid=".$displaymessage->id)."'>"._UDDEIM_FORWARDLINK."</a></li>\n"; } else { // normal message $headerstring.="<li class='uddeim-messageactionlink-forward'><a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=forward&Itemid=".$item_id."&messageid=".$displaymessage->id)."'>"._UDDEIM_FORWARDLINK."</a></li>\n"; } } if (!$displaymessage->archived && $config->allowarchive) $headerstring.="<li class='uddeim-messageactionlink-archive'><a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=archivemessage&Itemid=".$item_id."&messageid=".$displaymessage->id)."'>"._UDDEIM_STORE."</a></li>\n"; if ( $displaymessage->archived && $config->allowarchive) $headerstring.="<li class='uddeim-messageactionlink-archive'><a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=unarchive&Itemid=".$item_id."&messageid=".$displaymessage->id)."'>"._UDDEIM_UNARCHIVE."</a></li>\n"; if (!$displaymessage->totrash) { // but only if not already moved to trash $headerstring.="<li class='uddeim-messageactionlink-delete'><a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=delete&Itemid=".$item_id."&ret=top&messageid=".$displaymessage->id)."'>"._UDDEIM_DELETELINK."</a></li>\n"; if ($config->blocksystem && !$displaymessage->systemflag && $displaymessage->fromid) { $headerstring.="<li class='uddeim-messageactionlink-block'><a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=blockuser&Itemid=".$item_id."&recip=".$displaymessage->fromid)."'>"._UDDEIM_BLOCKNOW."</a></li>\n"; } } if ($config->reportspam) { // uddeIMcheckPlugin('spamcontrol') && not required since uddeIMcheckConfig sets this 0 if plugin is missing if ($is_spam) $headerstring.="<br /><li class='uddeim-messageactionlink-spam'><a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=unreportspam&Itemid=".$item_id."&messageid=".$displaymessage->id)."'>"._UDDEIM_SPAMCONTROL_UNREPORT."</a></li>"; else $headerstring.="<br /><li class='uddeim-messageactionlink-spam'><a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=reportspam&Itemid=".$item_id."&messageid=".$displaymessage->id)."'>"._UDDEIM_SPAMCONTROL_REPORT."</a></li>"; } $headerstring.="</ul>"; $headerstring.="</td>"; $headerstring.="</tr>"; $msgnavigation = " "; if ($config->enablereply) { $msgnavigation = ""; $pathtosite = uddeIMgetPath('live_site'); $pic = "<img src='".$pathtosite."/components/com_uddeim/templates/".$config->templatedir."/images/envelope.gif' alt='"._UDDEIM_PMNAV_EXISTS."' title='"._UDDEIM_PMNAV_EXISTS."' />"; $picdel = "<img src='".$pathtosite."/components/com_uddeim/templates/".$config->templatedir."/images/envelope_deleted.gif' alt='"._UDDEIM_PMNAV_DELETED."' title='"._UDDEIM_PMNAV_DELETED."' />"; $replyid = $displaymessage->replyid; if ($replyid) { $msgnavigation .= _UDDEIM_PMNAV_THISISARESPONSE; $copy2me = ($displaymessage->toid==$displaymessage->fromid && $displaymessage->fromid==$myself); if ($copy2me) // this is a copy2me message, so the original is also stored in inbox $orig = uddeIMselectInboxMessage($myself, $replyid, $config, 0); else $orig = uddeIMselectOutboxMessage($myself, $replyid, $config, 0); $temp = Array(); foreach($orig as $or) $temp = $or; $orig = $temp; if (count($orig)>0) { // the message should be stored in the outbox $goto = "showout"; $c2me = ""; if ($copy2me) // this is a copy2me message, so the original is also stored in inbox $goto = "show"; if ($orig->cryptmode==2 || $orig->cryptmode==4) { // Message is encrypted, so go to enter password page $msgnavigation .= " <a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=".$goto."pass&Itemid=".$item_id."&messageid=".$replyid)."'>".$pic."</a>"; } else { // normal message $msgnavigation .= " <a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=".$goto."&Itemid=".$item_id."&messageid=".$replyid)."'>".$pic."</a>"; } } else { $msgnavigation .= " ".$picdel; } } $repls = uddeIMselectMessageReplies($displaymessage->id, 'outbox', $myself); if (count($repls)>0) { $msgnavigation .= "<br />"; $msgnavigation .= _UDDEIM_PMNAV_THEREARERESPONSES; foreach($repls as $repl) { $goto = "showout"; $c2me = ""; if ($repl->toid==$repl->fromid) { // copy2me are stored in the inbox $goto = "show"; $c2me = " "._UDDEIM_PMNAV_COPY2ME; // BUGBUG } if ($repl->cryptmode==2 || $repl->cryptmode==4) { // Message is encrypted, so go to enter password page $msgnavigation .= " <a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=".$goto."pass&Itemid=".$item_id."&messageid=".$repl->id)."'>".$pic."</a>".$c2me; } else { // normal message $msgnavigation .= " <a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=".$goto."&Itemid=".$item_id."&messageid=".$repl->id)."'>".$pic."</a>".$c2me; } $msgnavigation .= " "; } } } $headerstring.="<tr>"; $headerstring.="<td valign='bottom'><div class='uddeim-messagefrom'>".trim($msgnavigation)."</div></td>"; $headerstring.="<td valign='bottom'>"; if ($config->reportspam) { // uddeIMcheckPlugin('spamcontrol') && not required since uddeIMcheckConfig sets this 0 if plugin is missing if ($is_spam) $headerstring.="<div class='uddeim-messagefrom-spam'>"._UDDEIM_SPAMCONTROL_MARKED."</div>"; } $headerstring.="</td>"; $headerstring.="</tr>"; $headerstring.="</table>"; // output the message if (!$isforward) { echo "<div class='uddeim-messageheader'>".$headerstring."</div>"; echo "<div class='uddeim-messagebody'>".uddeIMreplyquoteMarkup($bodystring,$config->quotedivider)."</div>"; // UDDEIMFILE if( $config->enableattachment ) // Always show attachments when attachments are enabled uddeIMshowAttachments("inbox", $item_id, $displaymessage->id, $config); } $trashmessage = $displaymessage->totrash; $to_id = $displaymessage->fromid; $replytoid = $displaymessage->id; $disablereply = $displaymessage->disablereply; // now check, if we can send a reply if (!$config->pubreplies) { // we do not allow replies to public users, so check if it is a public user if ( uddeIMisPublicUser($displaymessage->fromname,$displaymessage->fromid) ) // it is $displaymessage->fromname which specifies if it is a public user or not $disablereply = 1; } else { // we allow replies to public users, so check if it is a public user... if ( uddeIMisPublicUser($displaymessage->fromname,$displaymessage->fromid) && (!$displaymessage->publicemail || $displaymessage->publicemail==NULL)) $disablereply = 1; // ..its a public user and there is no email address given, we could send a reply to } if ( uddeIMisDeletedUser($displaymessage->fromname,$displaymessage->fromid) ) $disablereply = 1; // ..its a deleted user so disable replies if ($displaymessage->archived) $disablereply = 1; // ..no reply to archived messages if ($displaymessage->fromid==$myself && $displaymessage->fromid==$displaymessage->toid) $disablereply = 1; // ...no reply to copy2me messages } // read flag set to true, but only when its a forward if (!$isforward) uddeIMupdateToread($myself, $displaymessage->id, 1); if ($config->inboxlimit) { // there is a limit for inbox + archive if ($config->allowarchive) { // have an archive and an "archive and inbox" limit, so get number of messages in inbox and archive $universeflag = _UDDEIM_ARC_UNIVERSE_BOTH; // inbox and archive $total = uddeIMgetInboxArchiveCount($myself); } else { // user has switched of archive but there is an limit for "inbox and archive", so count inbox messages only $universeflag = _UDDEIM_ARC_UNIVERSE_INBOX; // inbox $total = uddeIMgetInboxCount($myself); } // "You have XX messages in your inbox/inbox+archive." $limitreached = _UDDEIM_INBOX_LIMIT_1." ".$total; $limitreached.= " ".($total==1 ? _UDDEIM_INBOX_LIMIT_2_SINGULAR : _UDDEIM_INBOX_LIMIT_2)." "; $limitreached.= $universeflag; if (!uddeIMisAdmin($my_gid) && !uddeIMisAdmin2($my_gid, $config) && (!$disablereply || ($isforward && $config->allowforwards))) { // so the warning is only displayed when a forward or reply is possible // "The allowed maximum is XX." // $limitreached.= _UDDEIM_INBOX_LIMIT_3." ".$config->maxarchive.". "; $limitreached.= " "._UDDEIM_SHOWINBOXLIMIT_2." ".$config->maxarchive.")."; // (of max. ) if ($total > $config->maxarchive) { // "You have XX messages in your inbox/inbox+archive." $limitreached = _UDDEIM_INBOX_LIMIT_1." ".$total; $limitreached.= " ".($total==1 ? _UDDEIM_INBOX_LIMIT_2_SINGULAR : _UDDEIM_INBOX_LIMIT_2)." "; $limitreached.= $universeflag; // You can still receive and read messages but you will not be able to reply or to compose new ones until you delete messages. $limitwarning = _UDDEIM_INBOX_LIMIT_4; $showinboxlimit_borderbottom = "<span class='uddeim-warning'>"; $showinboxlimit_borderbottom.= $limitreached." "; $showinboxlimit_borderbottom.= $limitwarning; $showinboxlimit_borderbottom.= "</span>"; echo "<div id='uddeim-bottomlines'>".$showinboxlimit_borderbottom."</div>"; // close main container echo "</div>\n<div id='uddeim-bottomborder'>".uddeIMcontentBottomborder($myself, $item_id, 'standard', $limitreached, $config)."</div>\n"; return; } } } if (($isforward && $config->allowforwards) || !$disablereply) { // it is a forward or you can reply to the message // show reply form if(!$trashmessage) { // but only if not already moved to trash // echo "<div id='uddeim-writeform'><b>"._UDDEIM_REPLY."</b><br />"; // which page did refer to this "show Message" page? we want to send back the user where he came from $tbackto = uddeIMmosGetParam($_SERVER, 'HTTP_REFERER', null); if(stristr($tbackto, "com_uddeim")) { $tbackto=""; } if ($isforward && $config->allowforwards) { // it is a forward, so allow selecting a recipient uddeIMdrawWriteform($myself, $my_gid, $item_id, $tbackto, "", $replytomessage, 0, 0, 0, 0, $config); } else { // it is a reply, so reply to $to_id { uddeIMdrawWriteform($myself, $my_gid, $item_id, $tbackto, $to_id, $replytomessage, $replytoid, 1, 0, 0, $config); // isreply, errorcode, sysmsg } } else { // offer restore link echo "<div id='uddeim-bottomlines'>"._UDDEIM_YOUMOVEDTOTRASH; echo "<br />"; echo "<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=restore&Itemid=".$item_id."&messageid=".$replytoid)."'>"._UDDEIM_RESTORE."</a></div>\n"; } } else { // don't allow replies ($disablereply) if ($displaymessage->archived) echo "<div id='uddeim-bottomlines'>"._UDDEIM_CANTREPLYARCHIVE."</div>\n"; else echo "<div id='uddeim-bottomlines'>"._UDDEIM_CANTREPLY."</div>\n"; } // close container echo "</div>\n<div id='uddeim-bottomborder'>".uddeIMcontentBottomborder($myself, $item_id, 'standard', 'none', $config)."</div>\n"; }
function uddeIMarchiveDownload($myself, $item_id, $arcmes, $limit, $limitstart, $cryptpass, $config) { $mosConfig_sitename = uddeIMgetSitename(); // if e-mail traffic stopped, don't send. if (!$config->emailtrafficenabled) { $mosmsg = _UDDEIM_STOPPEDEMAIL; uddeJSEFredirect("index.php?option=com_uddeim&task=archive&Itemid=".$item_id, $mosmsg); } if (!$config->allowarchive || !$config->enabledownload) { $mosmsg = _UDDEIM_ARCHIVENOTENABLED; uddeJSEFredirect("HTTP_REFERER", $mosmsg, "archive"); } $n = count($arcmes); if(!$n) { echo _UDDEIM_NOMSGSELECTED."<br /><a href='javascript:history.go(-1)'>"._UDDEIM_BACK."</a>"; return; } $clrf=chr(10); $rightnow=uddetime($config->timezone); $htmlstring="<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"><html><head><title>"; $htmlstring.=$mosConfig_sitename." "._UDDEIM_MESSAGEDOWNLOAD; $htmlstring.="</title></head><body><h2>"; $htmlstring.=_UDDEIM_MESSAGEDOWNLOAD." - ".$mosConfig_sitename; $htmlstring.="</h2><h4>".uddeLdate($rightnow, $config, uddeIMgetUserTZ())."</h4><!-- generated by uddeIM messaging component --><table cellspacing=0 cellpadding=4 border=0>"; $exportstring=_UDDEIM_MESSAGEDOWNLOAD." - ".$mosConfig_sitename.$clrf; $exportstring.=uddeLdate($rightnow, $config, uddeIMgetUserTZ()); $exportstring.=$clrf.$clrf.$clrf; $maindivider="================================================================================".$clrf; $exportstring.=$maindivider; for($i = 0; $i <= ($n-1); $i++) { $trashs = uddeIMselectArchiveMessage($myself, $arcmes[$i], $config); foreach($trashs as $trash) { $fromname = uddeIMevaluateUsername($trash->fromname, $trash->fromid, $trash->publicname); if($trash->systemflag) $fromname = $trash->systemmessage; // $headstring.=" (".uddeLdate($trash->datum, $config, uddeIMgetUserTZ()).")"; // $headdivider=str_repeat("=", strlen($headstring)); // $exportstring.=" ".$headstring.$clrf." ".$headdivider.$clrf.$clrf; $cm = uddeIMgetMessage($trash->message, $cryptpass, $trash->cryptmode, $trash->crypthash, $config->cryptkey); $dlmsg = stripslashes($cm); $dlmsg = uddeIMbbcode_strip($dlmsg); // $exportstring.=stripslashes($dlmsg); // $exportstring.=$clrf.$clrf.$clrf.$clrf; // $exportstring.=$maindivider; $exportstring.=_UDDEIM_EXPORT_FORMAT; $exportstring=str_replace("%user%", $fromname, $exportstring); $exportstring=str_replace("%msgdate%", uddeLdate($trash->datum, $config, uddeIMgetUserTZ()), $exportstring); $exportstring=str_replace("%msgbody%", $dlmsg, $exportstring); $htmlstring.="\n\t<tr bgcolor=#cccccc><td><strong>".$fromname."</strong></td><td align=right>".uddeLdate($trash->datum, $config, uddeIMgetUserTZ())."</td></tr><tr><td> </td><td>"; $htmlstring.=nl2br(stripslashes($dlmsg)); $htmlstring.="</td></tr>"; } } $htmlstring.="\n</table>\n</body>\n</html>\n"; // we now have $exportstring and $htmlstring (text and html respecitvely) as files with all checked messages (in arcmes[]) // $ret = uddeIMgetNameEmailFromID($myself, $var_toname, $var_tomail, $config); $var_toname = uddeIMgetNameFromID($myself, $config); $var_tomail = uddeIMgetEMailFromID($myself, $config); if (!$var_tomail) { $mosmsg = _UDDEIM_EXPORT_COULDNOTSEND; uddeJSEFredirect("index.php?option=com_uddeim&task=archive&Itemid=".$item_id, $mosmsg); } if (!$var_toname) $var_toname = "Anonymous"; $subject = $mosConfig_sitename." "._UDDEIM_MESSAGEDOWNLOAD; $var_fromname = $config->emn_sendername; $var_frommail = $config->emn_sendermail; if(uddeIMsendmail($var_fromname, $var_frommail, $var_toname, $var_tomail, $subject, $exportstring, "", "", "", $config)) { $mosmsg = _UDDEIM_EXPORT_MAILED; } else { $mosmsg = _UDDEIM_EXPORT_COULDNOTSEND; } uddeJSEFredirect("index.php?option=com_uddeim&task=archive&Itemid=".$item_id, $mosmsg); }
function uddeIMshowPostboxUser($myself, $userid, $item_id, $limit, $limitstart, $cryptpass, $config, $filter_user, $filter_unread, $filter_flagged, $sort_mode) { global $uddeicons_delayedpic, $uddeicons_flagged, $uddeicons_unflagged, $uddeicons_onlinepic, $uddeicons_offlinepic, $uddeicons_readpic, $uddeicons_unreadpic; $pathtosite = uddeIMgetPath('live_site'); // invoke pruning if set so $my_gid = $config->usergid; // message limit for inbox? if ($config->inboxlimit && $config->allowarchive) { $universeflag = _UDDEIM_ARC_UNIVERSE_BOTH; // inbox and archive } else { $universeflag = _UDDEIM_ARC_UNIVERSE_INBOX; // inbox } if ($config->inboxlimit && $config->allowarchive) { // inbox + archive, already stored messages in archive are not counted, when archive is disabled $total = uddeIMgetInboxArchiveCount($myself); } else { $total = uddeIMgetInboxCount($myself); // also used for navigation } $limitwarning = ""; // "You have XX messages in your inbox/inbox+archive." $limitreached = _UDDEIM_INBOX_LIMIT_1." ".$total; $limitreached.= " ".($total==1 ? _UDDEIM_INBOX_LIMIT_2_SINGULAR : _UDDEIM_INBOX_LIMIT_2)." "; $limitreached.= $universeflag; if ($config->inboxlimit) { // there is a limit for inbox + archive if (!uddeIMisAdmin($my_gid) && !uddeIMisAdmin2($my_gid, $config)) { // "The allowed maximum is XX." // $limitreached.= _UDDEIM_INBOX_LIMIT_3." ".$config->maxarchive.". "; $limitreached.= " "._UDDEIM_SHOWINBOXLIMIT_2." ".$config->maxarchive.")."; // (of max. ) if ($total > $config->maxarchive) { $limitwarning = _UDDEIM_INBOX_LIMIT_4; // You can still receive and read messages but you will not be able to reply or to compose new ones until you delete messages. } } } else { // there is a limit for the archive only $limitreached.= "."; // so inbox is unlimited } $totalpostbox = uddeIMgetPostboxUserCount($myself, $userid, $filter_user, $filter_unread, $filter_flagged); // now load messages as required if(!$limitstart) $limitstart = 0; if(!$limit) $limit=$config->perpage; if ($limitstart>=$totalpostbox) $limitstart=max(0,$limitstart - $limit); // $allmessages = uddeIMselectInbox($myself, $limitstart, $limit, $config, $filter_user, $filter_unread, $filter_flagged, $sort_mode); $allmessages = uddeIMselectPostboxUser($myself, $userid, $limitstart, $limit, $config); // write the uddeim menu uddeIMprintMenu($myself, 'inbox', $item_id, $config); echo "<div id='uddeim-m'>\n"; //if ($config->enablefilter==1 || $config->enablefilter==3) // uddeIMprintFilter($myself, 'postboxuser', $totalpostbox, $item_id, $config, $filter_user, $filter_unread, $filter_flagged); // if no messages: if (count($allmessages)<1) { // no messages to list uddeIMshowNoMessage('postbox', $filter_user, $filter_unread, $filter_flagged); echo "</div>\n<div id='uddeim-bottomborder'>".uddeIMcontentBottomborder($myself, $item_id, 'standard', 'none', $config)."</div>\n"; return; } uddeIMaddScript($pathtosite."/components/com_uddeim/js/uddeimtools.js"); if ($config->blocksystem) { if ($userid && $userid!=$myself) { $isblocked = uddeIMcheckBlockerBlocked($myself, $userid); if (!$isblocked) { echo "<div id='uddeim-block'>"; echo "<table border='0' cellpadding='0' cellspacing='0' width='100%'><tr><td align='left'>"; $blockcell = "<div style='text-align:right;'><a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=blockuser&Itemid=".$item_id."&recip=".$userid."&ret=postboxuser")."'>"._UDDEIM_BLOCKNOW."</a></div>"; echo $blockcell; echo "</td></tr></table>"; echo "</div>"; } } } echo "<form method='post' name='messages' action='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=inboxfork&Itemid=".$item_id)."'>\n"; // now open the inbox container and table; write table headings echo "<div id='uddeim-overview'>"; echo "<table cellpadding='7' width='100%'>\n"; // checkcell $delall="<input type=\"checkbox\" name=\"arcmes[]\" value=\"\" onclick=\"wiglwogl(this);\" title=\""._UDDEIM_CHECKALL."\" />"; echo "<tr>"; echo "<th style='border:none; text-align:center;' class='sectiontableheader'>".$delall."</th>"; echo "<th style='border:none;' class='sectiontableheader'> </th>"; echo "<th style='border:none;' class='sectiontableheader'>"._UDDEIM_FROM."/"._UDDEIM_TO."</th>"; echo "<th style='border:none;' class='sectiontableheader'>"._UDDEIM_DATE."</th>"; echo "<th style='border:none;' class='sectiontableheader'> </th>"; echo "</tr>\n"; $k = 1; $i = 1; // now write the list foreach($allmessages as $themessage) { $isinbox = 0; $isoutbox = 0; if ($myself==$themessage->toid && $myself!=$themessage->fromid) { $isinbox = 1; } elseif ($myself==$themessage->fromid && $myself!=$themessage->toid) { $isoutbox = 1; } else { // this case appears when a copy to me message has been trashed my myself $isinbox = 1; } $is_spam = 0; if ($config->reportspam) // save one database query if possible $is_spam = uddeIMgetSpamStatus($themessage->id); $flagcell = ""; $archivecell = ""; $fwdcell = ""; $deletecell = ""; $recallcell = ""; $attachcell = ""; $spamcell = ""; $spamcellflag = ""; if ($isinbox) { if($config->allowflagged) { if($themessage->flagged) $flagcell="<br /><a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=unflag&recip=".$userid."&ret=postboxuser&Itemid=".$item_id."&messageid=".$themessage->id."&limit=".$limit."&limitstart=".$limitstart)."'>".$uddeicons_flagged."</a>"; else $flagcell="<br /><a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=flag&recip=".$userid."&ret=postboxuser&Itemid=".$item_id."&messageid=".$themessage->id."&limit=".$limit."&limitstart=".$limitstart)."'>".$uddeicons_unflagged."</a>"; } if($themessage->toread) $readcell="<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=markunread&recip=".$userid."&ret=postboxuser&Itemid=".$item_id."&messageid=".$themessage->id."&limit=".$limit."&limitstart=".$limitstart)."'>".$uddeicons_readpic."</a>"; else $readcell="<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=markread&recip=".$userid."&ret=postboxuser&Itemid=".$item_id."&messageid=".$themessage->id."&limit=".$limit."&limitstart=".$limitstart)."'>".$uddeicons_unreadpic."</a>"; if ($config->showlistattachment) { $cnt = uddeIMgetAttachmentCount($themessage->id); if ($cnt) $attachcell = "<br /><img src='".$pathtosite."/components/com_uddeim/templates/".$config->templatedir."/images/attachment.gif' alt='"._UDDEIM_ATTACHMENT."' title='"._UDDEIM_ATTACHMENT."' border='0' />"; } if ($config->actionicons) { $deletecell="<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=postboxdeleteinbox&recip=".$userid."&Itemid=".$item_id."&limit=".$limit."&limitstart=".$limitstart."&messageid=".$themessage->id)."'><img src='".$pathtosite."/components/com_uddeim/templates/".$config->templatedir."/images/trash.gif' alt='"._UDDEIM_DELETELINK."' title='"._UDDEIM_DELETELINK."' /></a>"; if ($config->allowforwards) { if ($themessage->cryptmode==2 || $themessage->cryptmode==4) { // Message is encrypted, so go to enter password page $fwdcell="<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=forwardpass&Itemid=".$item_id."&messageid=".$themessage->id)."'><img src='".$pathtosite."/components/com_uddeim/templates/".$config->templatedir."/images/forward.gif' alt='"._UDDEIM_FORWARDLINK."' title='"._UDDEIM_FORWARDLINK."' /></a><br />"; } else { // normal message $fwdcell="<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=forward&Itemid=".$item_id."&messageid=".$themessage->id)."'><img src='".$pathtosite."/components/com_uddeim/templates/".$config->templatedir."/images/forward.gif' alt='"._UDDEIM_FORWARDLINK."' title='"._UDDEIM_FORWARDLINK."' /></a><br />"; } } if ($config->allowarchive && $themessage->toread) $archivecell="<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=archivemessage&Itemid=".$item_id."&limit=".$limit."&limitstart=".$limitstart."&messageid=".$themessage->id)."'><img src='".$pathtosite."/components/com_uddeim/templates/".$config->templatedir."/images/archive.gif' alt='"._UDDEIM_STORE."' title='"._UDDEIM_STORE."' /></a><br />"; } else { $deletecell="<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=postboxdeleteinbox&recip=".$userid."&Itemid=".$item_id."&limit=".$limit."&limitstart=".$limitstart."&messageid=".$themessage->id)."'>"._UDDEIM_DELETELINK."</a>"; if ($config->allowforwards) { if ($themessage->cryptmode==2 || $themessage->cryptmode==4) { // Message is encrypted, so go to enter password page $fwdcell="<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=forwardpass&Itemid=".$item_id."&messageid=".$themessage->id)."'>"._UDDEIM_FORWARDLINK."</a><br />"; } else { // normal message $fwdcell="<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=forward&Itemid=".$item_id."&messageid=".$themessage->id)."'>"._UDDEIM_FORWARDLINK."</a><br />"; } } if ($config->allowarchive && $themessage->toread) $archivecell="<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=archivemessage&Itemid=".$item_id."&limit=".$limit."&limitstart=".$limitstart."&messageid=".$themessage->id)."'>"._UDDEIM_STORE."</a><br />"; } if ($config->reportspam) { // uddeIMcheckPlugin('spamcontrol') && not required since uddeIMcheckConfig sets this 0 if plugin is missing if ($is_spam) { $spamcell = "<br /><br /><a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=unreportspam&Itemid=".$item_id."&messageid=".$themessage->id."&recip=".$userid."&ret=postboxuser")."'>"._UDDEIM_SPAMCONTROL_UNREPORT."</a>"; $spamcellflag = "<br /><div class='uddeim-messagefrom-spam'>"._UDDEIM_SPAMCONTROL_MARKED."</div>"; } else { $spamcell = "<br /><br /><a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=reportspam&Itemid=".$item_id."&messageid=".$themessage->id."&recip=".$userid."&ret=postboxuser")."'>"._UDDEIM_SPAMCONTROL_REPORT."</a>"; } } } if ($isoutbox) { if ($themessage->delayed) { $readcell=$uddeicons_delayedpic; } else { if ($themessage->toread) $readcell=$uddeicons_readpic; else $readcell=$uddeicons_unreadpic; } if ($config->showlistattachment) { $cnt = uddeIMgetAttachmentCount($themessage->id); if ($cnt) $attachcell = "<br /><img src='".$pathtosite."/components/com_uddeim/templates/".$config->templatedir."/images/attachment.gif' alt='"._UDDEIM_ATTACHMENT."' title='"._UDDEIM_ATTACHMENT."' border='0' />"; } if ($config->actionicons) { $deletecell="<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=postboxdeleteoutbox&recip=".$userid."&Itemid=".$item_id."&limit=".$limit."&limitstart=".$limitstart."&messageid=".$themessage->id)."'><img src='".$pathtosite."/components/com_uddeim/templates/".$config->templatedir."/images/trash.gif' alt='"._UDDEIM_DELETELINK."' title='"._UDDEIM_DELETELINK."' /></a>"; if ($config->allowforwards) { if ($themessage->cryptmode==2 || $themessage->cryptmode==4) { // Message is encrypted, so go to enter password page $fwdcell="<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=forwardoutboxpass&Itemid=".$item_id."&messageid=".$themessage->id)."'><img src='".$pathtosite."/components/com_uddeim/templates/".$config->templatedir."/images/forward.gif' alt='"._UDDEIM_FORWARDLINK."' title='"._UDDEIM_FORWARDLINK."' /></a><br />"; } else { // normal message $fwdcell="<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=forwardoutbox&Itemid=".$item_id."&messageid=".$themessage->id)."'><img src='".$pathtosite."/components/com_uddeim/templates/".$config->templatedir."/images/forward.gif' alt='"._UDDEIM_FORWARDLINK."' title='"._UDDEIM_FORWARDLINK."' /></a><br />"; } } } else { $deletecell="<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=postboxdeleteoutbox&recip=".$userid."&Itemid=".$item_id."&limit=".$limit."&limitstart=".$limitstart."&messageid=".$themessage->id)."'>"._UDDEIM_DELETELINK."</a>"; if ($config->allowforwards) { if ($themessage->cryptmode==2 || $themessage->cryptmode==4) { // Message is encrypted, so go to enter password page $fwdcell="<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=forwardoutboxpass&Itemid=".$item_id."&messageid=".$themessage->id)."'>"._UDDEIM_FORWARDLINK."</a><br />"; } else { // normal message $fwdcell="<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=forwardoutbox&Itemid=".$item_id."&messageid=".$themessage->id)."'>"._UDDEIM_FORWARDLINK."</a><br />"; } } } if(!$themessage->toread) { // if not read then a recall is possible if($config->actionicons) { if ($themessage->cryptmode==2 || $themessage->cryptmode==4) { // Message is encrypted, so go to enter password page $recallcell="<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=recallpass&Itemid=".$item_id."&messageid=".$themessage->id)."'><img src='".$pathtosite."/components/com_uddeim/templates/".$config->templatedir."/images/restore.gif' alt='"._UDDEIM_RECALL."' title='"._UDDEIM_RECALL."' /></a><br />"; } else { // normal message $recallcell="<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=recall&Itemid=".$item_id."&messageid=".$themessage->id)."'><img src='".$pathtosite."/components/com_uddeim/templates/".$config->templatedir."/images/restore.gif' alt='"._UDDEIM_RECALL."' title='"._UDDEIM_RECALL."' /></a><br />"; } } else { if ($themessage->cryptmode==2 || $themessage->cryptmode==4) { // Message is encrypted, so go to enter password page $recallcell="<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=recallpass&Itemid=".$item_id."&messageid=".$themessage->id)."'>"._UDDEIM_RECALL."</a><br />"; } else { // normal message $recallcell="<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=recall&Itemid=".$item_id."&messageid=".$themessage->id)."'>"._UDDEIM_RECALL."</a><br />"; } } } } if ($isinbox) { if ($config->actionicons) { $newemail = "<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=reply&recip=".$userid."&Itemid=".$item_id."&messageid=".$themessage->id)."'>"; $newemail .= "<img src='".$pathtosite."/components/com_uddeim/templates/".$config->templatedir."/images/menu_new.gif' alt='"._UDDEIM_COMPOSE."' />"; $newemail .= "</a>"; } else { $newemail = "<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=reply&recip=".$userid."&Itemid=".$item_id."&messageid=".$themessage->id)."'>"._UDDEIM_COMPOSE."</a>"; } } if ($isoutbox) { if ($config->actionicons) { $newemail = "<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=new&recip=".$userid."&Itemid=".$item_id)."'>"; $newemail .= "<img src='".$pathtosite."/components/com_uddeim/templates/".$config->templatedir."/images/menu_new.gif' alt='"._UDDEIM_COMPOSE."' />"; $newemail .= "</a>"; } else { $newemail = "<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=new&recip=".$userid."&Itemid=".$item_id)."'>"._UDDEIM_COMPOSE."</a>"; } } // CRYPT $cm = uddeIMgetMessage($themessage->message, $cryptpass, $themessage->cryptmode, $themessage->crypthash, $config->cryptkey); $teasermessage=$cm; // if it is a system message or bb codes allowed, parse BB codes if ($themessage->systemflag || $config->allowbb) $teasermessage=uddeIMbbcode_strip($teasermessage); $teasermessage=uddeIMteaser(stripslashes($teasermessage), $config->firstwordsinbox, $config->quotedivider, $config->languagecharset); $teasermessage=htmlspecialchars($teasermessage, ENT_QUOTES, $config->charset); $teasermessage=str_replace("&#", "&#", $teasermessage); $safemessage=htmlspecialchars(stripslashes($cm), ENT_QUOTES, $config->charset); $showemail = ""; if ($isinbox) { if ($themessage->cryptmode==2 || $themessage->cryptmode==4) { // Message is encrypted, so go to enter password page $messagecell= "<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=showpass&Itemid=".$item_id."&messageid=".$themessage->id)."'>".$teasermessage."</a>"; $showemail = "<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=showpass&Itemid=".$item_id."&messageid=".$themessage->id)."'>"; $showemail .= "<img src='".$pathtosite."/components/com_uddeim/templates/".$config->templatedir."/images/page_white_magnify.gif' alt='"._UDDEIM_DISPLAY."' />";; $showemail .= "</a>"; } else { // normal message // $messagecell="<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=show&Itemid=".$item_id."&messageid=".$themessage->id)."'>".$teasermessage."</a>"; $messagecell="<a href='javascript:uddeIMtoggleLayer2(\"".$i."\");'>".$teasermessage."</a>"; $showemail = "<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=show&Itemid=".$item_id."&messageid=".$themessage->id)."'>"; $showemail .= "<img src='".$pathtosite."/components/com_uddeim/templates/".$config->templatedir."/images/page_white_magnify.gif' alt='"._UDDEIM_DISPLAY."' />";; $showemail .= "</a>"; } } if ($isoutbox) { if ($themessage->cryptmode==2 || $themessage->cryptmode==4) { // Message is encrypted, so go to enter password page $messagecell="<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=showoutpass&Itemid=".$item_id."&messageid=".$themessage->id)."'>".$teasermessage."</a>"; $showemail = "<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=showoutpass&Itemid=".$item_id."&messageid=".$themessage->id)."'>"; $showemail .= "<img src='".$pathtosite."/components/com_uddeim/templates/".$config->templatedir."/images/page_white_magnify.gif' alt='"._UDDEIM_DISPLAY."' />";; $showemail .= "</a>"; } else { // normal message // $messagecell="<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=showout&Itemid=".$item_id."&messageid=".$themessage->id)."'>".$teasermessage."</a>"; $messagecell="<a href='javascript:uddeIMtoggleLayer2(\"".$i."\");'>".$teasermessage."</a>"; $showemail = "<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=showout&Itemid=".$item_id."&messageid=".$themessage->id)."'>"; $showemail .= "<img src='".$pathtosite."/components/com_uddeim/templates/".$config->templatedir."/images/page_white_magnify.gif' alt='"._UDDEIM_DISPLAY."' />";; $showemail .= "</a>"; } } $datumcell=uddeDate($themessage->datum, $config, uddeIMgetUserTZ()); // checkcell $delcell="<input type='checkbox' name='arcmes[]' value='".$themessage->id."' />"; //echo "<tr class='sectiontableentry1'>"; echo "<tr class='uddeim-messagebody2header'>"; echo "<td style='padding:4px; border-bottom:none; border-right:none; width:32px; text-align:center; vertical-align:top'>".$delcell."</td>"; // checkcell echo "<td style='padding:4px; border-bottom:none; border-right:none; width:32px; text-align:center; vertical-align:top'>". $readcell.$attachcell.$flagcell. "</td>"; $st=uddeIMgetStyleForThumb($config); //echo "<td ".$st.">"; echo "<td style='padding:4px; border-bottom:none; border-right:none; vertical-align:top'>"; if ($isinbox) echo uddeIMdoInboxHeader($myself, $themessage, $config); if ($isoutbox) echo uddeIMdoOutboxHeader($myself, $themessage, $config); echo "</td>"; echo "<td style='padding:4px; border-bottom:none; border-right:none; vertical-align:top'>"; echo $datumcell; echo $spamcell.$spamcellflag; echo "</td>"; if ($config->actionicons) { echo "<td style='padding:4px; border-bottom:none; width:32px; text-align:center; vertical-align:top'>". // $fwdcell.$recallcell.$archivecell.$deletecell."<br /><br />".$newemail. $fwdcell.$recallcell.$archivecell.$deletecell. "</td>"; } else { echo "<td style='padding:4px; border-bottom:none; vertical-align:top' class='pathway'>". $fwdcell.$recallcell.$archivecell.$deletecell."<br /><br />".$newemail. "</td>"; } echo "</tr>\n"; // if ($themessage->cryptmode!=2 && $themessage->cryptmode!=4) { // Message is encrypted, so display no message // ############################################################# MESSSAGE $cm = uddeIMgetMessage($themessage->message, $cryptpass, $themessage->cryptmode, $themessage->crypthash, $config->cryptkey); // echo str_replace("&#", "&#", nl2br(htmlspecialchars(stripslashes($cm), ENT_QUOTES, $config->charset))); $dmessage = nl2br(htmlspecialchars(stripslashes($cm), ENT_QUOTES, $config->charset)); $dmessage = str_replace("&#", "&#", $dmessage); // unicode workaround // if system message or bbcodes allowed, call parser if ($themessage->systemflag || $config->allowbb) $dmessage = uddeIMbbcode_replace($dmessage, $config); if ($config->allowsmile) $dmessage = uddeIMsmile_replace($dmessage, $config); $bodystring = $dmessage; // converted message for email body if (0) { echo "<tr class='uddeim-messagebody2body'>"; echo "<td colspan='3' style='border-style:none; padding:0 8px 0 8px; text-align:left; vertical-align:bottom'>"; echo str_replace("<br />", "", $fwdcell." ".$recallcell." ".$archivecell." ".$deletecell." ".$newemail); echo "</td>"; echo "<td colspan='2' style='border-style:none; padding:0 8px 0 8px; text-align:right; vertical-align:middle'>"; echo str_replace("<br />", "", $readcell.$attachcell.$flagcell); echo "</td>"; echo "</tr>"; } echo "<tr class='uddeim-messagebody2body'>"; echo "<td colspan='4' style='padding:8px; border-top:none; border-right:none;'>"; // echo "<div style='text-align:right;'><a href='javascript:uddeIMtoggleLayer2(\"".$i."\");'>"._UDDEADM_SPAMCONTROL_SHOWHIDE."</a></div>"; if ($config->postboxfull==0) { $st_preview = "display:inline;"; $st_normal = "display:none;"; } if ($config->postboxfull==1) { if ($i==1) { $st_preview = "display:none;"; $st_normal = "display:inline;"; } else { $st_preview = "display:inline;"; $st_normal = "display:none;"; } } if ($config->postboxfull==2) { $st_preview = "display:none;"; $st_normal = "display:inline;"; } echo "<div id='uddeimdivlayerpreview_".$i."' style='".$st_preview."'>"; echo "<div class='uddeim-messagebody2'>".$messagecell."</div>"; echo "</div>\n"; echo "<div id='uddeimdivlayer_".$i."' style='".$st_normal."'>"; $messagecell="<a href='javascript:uddeIMtoggleLayer2(\"".$i."\");'>".uddeIMreplyquoteMarkup($bodystring,$config->quotedivider)."</a>"; echo "<div class='uddeim-messagebody2'>".$messagecell."</div>"; // UDDEIMFILE if( $config->enableattachment ) { // Always show attachments when attachments are enabled if ($isinbox) uddeIMshowAttachments("inbox", $item_id, $themessage->id, $config); if ($isoutbox) uddeIMshowAttachments("outbox", $item_id, $themessage->id, $config); } echo "</div>\n"; echo "</td>\n"; echo "<td style='padding:4px; border-top:none; border-left:none; width:32px; text-align:center; vertical-align:top'>"; echo $newemail."<br />".$showemail; echo "</td>\n"; echo "</tr>\n"; // } $i++; $k++; if ($k > 2) $k = 1; } $muldel = uddeIMsefRelToAbs("index.php?option=com_uddeim&task=mulpostboxdelete&Itemid=".$item_id."&recip=".$userid."&limitstart=0&limit=".$limit); if($config->bottomlineicons) { echo "<tr><th style='border:none; text-align:center;' class='sectiontablefooter'>"; echo '<a href="#" onclick="inboxDelete(\''.$muldel.'\'); return false;"><img src="'.$pathtosite.'/components/com_uddeim/templates/'.$config->templatedir.'/images/trash.gif" alt="'._UDDEIM_TRASHCHECKED.'" title="'._UDDEIM_TRASHCHECKED.'"/></a>'; echo "</th><th style='border:none;' class='sectiontablefooter'> </th><th style='border:none;' class='sectiontablefooter'> </th><th style='border:none;' class='sectiontablefooter'> </th><th style='border:none;' class='sectiontablefooter'> </th></tr>\n"; } // now close inbox table and container echo "</table></div>\n"; // checkcell echo "</form>\n"; // write the inbox navigation links $pageNav = new uddeIMmosPageNav($totalpostbox, $limitstart, $limit); $referlink = "index.php?option=com_uddeim&task=postboxuser&Itemid=".$item_id."&recip=".$userid; if ($totalpostbox>$limit) { $shownav = $pageNav->writePagesLinks($referlink); $shownav = uddeIMarrowReplace($shownav, $config->templatedir); echo "<div id='uddeim-pagenav'>".$shownav."<br />"; echo "[<a href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=postboxuser&Itemid=".$item_id."&recip=".$userid."&limitstart=0&limit=".$totalpostbox)."'>"._UDDEIM_SHOWALL."</a>]"; echo "</div>\n"; } $showinboxlimit_borderbottom = ""; if ($limitwarning) { $showinboxlimit_borderbottom = "<span class='uddeim-warning'>"; $showinboxlimit_borderbottom.= $limitreached." "; $showinboxlimit_borderbottom.= $limitwarning; $showinboxlimit_borderbottom.= "</span>"; } $keephours1=($config->ReadMessagesLifespan) * 1; // this are days $keephours2=($config->UnreadMessagesLifespan) * 1; // this are days echo "<div id='uddeim-bottomlines'>"; if(!$config->bottomlineicons) echo '<p><a href="#" onclick="inboxDelete(\''.$muldel.'\'); return false;">'._UDDEIM_TRASHCHECKED.'</a></p>'; if ($config->ReadMessagesLifespanNote) echo "<p>"._UDDEIM_READ_INFO_1.$keephours1._UDDEIM_READ_INFO_2."</p>"; if ($config->UnreadMessagesLifespanNote) echo "<p>"._UDDEIM_UNREAD_INFO_1.$keephours2._UDDEIM_UNREAD_INFO_2."</p>"; if ($showinboxlimit_borderbottom) echo "<p>".$showinboxlimit_borderbottom."</p>"; echo "</div>\n"; //if ($config->enablefilter==2 || $config->enablefilter==3) // uddeIMprintFilter($myself, 'postboxuser', $totalpostbox, $item_id, $config, $filter_user, $filter_unread, $filter_flagged); echo "</div>\n<div id='uddeim-bottomborder'>".uddeIMcontentBottomborder($myself, $item_id, 'standard', $limitreached, $config)."</div>\n"; // echo "</div>\n<div id='uddeim-bottomborder'>".uddeIMcontentBottomborder($myself, $item_id, 'standard', $showinboxlimit_borderbottom, $config)."</div>\n"; }
function uddeIMrssFeedPlugin($versionstring, $userid, $config) { $database = uddeIMgetDatabase(); $sitename = uddeIMgetSitename(); $live_site = uddeIMgetPath('live_site'); $Itemid = uddeIMmosGetParam( $_REQUEST, 'Itemid'); if (!$Itemid || !isset($Itemid) || empty( $Itemid )) { $Itemid = uddeIMgetItemid($config); } else if ($config->overwriteitemid) { $Itemid = (int)$config->useitemid; } $item_id = (int)$Itemid; $username = stripslashes( strval( uddeIMmosGetParam ($_REQUEST, 'user', '') )); $passwd = stripslashes( strval( uddeIMmosGetParam ($_REQUEST, 'pass', '') )); $showall = (int) uddeIMmosGetParam ($_REQUEST, 'showall', 0); $type = (int) uddeIMmosGetParam ($_REQUEST, 'type', 0); $row = uddeIMselectUserrecordFromUsername($username, $config); if ($row) { if ($row->block) { uddeIMrssOutputHeader($versionstring); uddeIMrssOutputItem($type, "Code=5", _UDDEIM_RSS_USERBLOCKED, ""); uddeIMrssOutputFooter(); return; } $gid = uddeIMgetGID($row->id); // $userid if (!$config->enablerss || ($config->enablerss==2 && !uddeIMisAdmin($gid) && !uddeIMisAdmin2($gid, $config))) { uddeIMrssOutputHeader($versionstring); uddeIMrssOutputItem($type, "Code=2", _UDDEIM_RSS_NOTALLOWED, ""); uddeIMrssOutputFooter(); return; } if ((strpos($row->password, ':') === false) && $row->password == md5($passwd)) { // Old password hash storage but authentic ... lets convert it $salt = uddeIMmosMakePassword(16); $crypt = md5($passwd.$salt); $row->password = $crypt.':'.$salt; } list($hash, $salt) = explode(':', $row->password); $hash_db = sha1($hash); // the hash value from the user database $hash_post = $passwd; if ($hash_db != $hash_post) { uddeIMrssOutputHeader($versionstring); uddeIMrssOutputItem($type, "Code=3", _UDDEIM_RSS_WRONGPASSWORD, ""); uddeIMrssOutputFooter(); return; } uddeIMrssOutputHeader($versionstring); $filter = ""; if (!$showall) { $filter = "AND a.toread=0 "; } $limit = ""; if ($config->rsslimit) $limit = " LIMIT ".(int)$config->rsslimit; $userid = uddeIMgetIDfromUsername($username, $config, true); $sql = "SELECT a.*, b.".($config->realnames ? "name" : "username")." AS fromname FROM #__uddeim AS a LEFT JOIN #__users AS b ON a.fromid=b.id WHERE a.toid=".(int)$userid." AND a.totrash=0 AND a.archived=0 AND `a`.`delayed`=0 ".$filter."ORDER BY a.datum DESC".$limit; $database->setQuery($sql); $rows = $database->loadObjectList(); if (!$rows) { $pms_show = uddeIMsefRelToAbs("index.php?option=com_uddeim&Itemid=".$item_id); uddeIMrssOutputItem($type,($showall ? "Code=0" : "Code=1"), ($showall ? _UDDEIM_RSS_NOMESSAGES : _UDDEIM_RSS_NONEWMESSAGES), "", $pms_show); } else { foreach ($rows as $row) { $fromname = uddeIMevaluateUsername($row->fromname, $row->fromid, $row->publicname); if($row->systemmessage) $fromname = $row->systemmessage; if ($row->cryptmode==2) $pms_show = uddeIMsefRelToAbs("index.php?option=com_uddeim&Itemid=".$item_id."&task=showpass&messageid=".$row->id); else $pms_show = uddeIMsefRelToAbs("index.php?option=com_uddeim&Itemid=".$item_id."&task=show&messageid=".$row->id); $cm = uddeIMgetMessage($row->message, "", $row->cryptmode, "", $config->cryptkey); $cm = stripslashes($cm); if($row->systemflag || $config->allowbb) { $cm = uddeIMbbcode_strip($cm); } $cm = htmlspecialchars($cm, ENT_QUOTES, $config->charset); $cm = str_replace("&#", "&#", $cm); $title = $fromname.": ".substr($cm,0,30); $pubdate = date("r",$row->datum); $desc = substr($cm,0,500); uddeIMrssOutputItem(0, "", $title, $desc, $pms_show, $pubdate); } } uddeIMrssOutputFooter(); } else { uddeIMrssOutputHeader($versionstring); uddeIMrssOutputItem($type, "Code=4", _UDDEIM_RSS_NOOBJECT, ""); uddeIMrssOutputFooter(); } }
function uddeIMreportSpam($myself, $item_id, $messageid, $recip, $ret, $limit, $limitstart, $config) { $db = uddeIMgetDatabase(); // read message $messageid $displaymessages = uddeIMselectInboxMessage($myself, $messageid, $config); if (count($displaymessages)<1) { echo _UDDEIM_MESSAGENOACCESS; return; } if (!uddeIMgetSpamStatus($messageid)) { // and append to #__uddeim_spam foreach($displaymessages as $displaymessage) { if ($displaymessage->cryptmode==2 || $displaymessage->cryptmode==4) $cm = "Cannot display - Message is encrypted."; else $cm = uddeIMgetMessage($displaymessage->message, "", $displaymessage->cryptmode, $displaymessage->crypthash, $config->cryptkey); $dm = nl2br(htmlspecialchars(stripslashes($cm), ENT_QUOTES, $config->charset)); $dm = str_replace("&#", "&#", $dm); $dm = str_replace("&</br>", "</br>", $dm); $dm = uddeIMencrypt($dm,"",CRYPT_MODE_STOREBASE64); $sql = "INSERT INTO #__uddeim_spam (mid, datum, reported, fromid, toid, message) VALUES (". (int)$displaymessage->id.", ". (int)$displaymessage->datum.", ". (int)uddetime($config->timezone).", ". (int)$displaymessage->fromid.", ". (int)$displaymessage->toid.", ". $db->Quote($dm).")"; $db->setQuery($sql); if (!$db->query()) die("SQL error when attempting to save a report" . $db->stderr(true)); } uddeIMnotifySpam($myself, $item_id, $displaymessage->fromid, $displaymessage->toid, $config); } $addlink = ""; if ($recip) $addlink = "&recip=".(int)$recip; $task = "inbox"; if ($ret=="postboxuser") $task = "postboxuser"; if(!$limit && !$limitstart) { $redirecturl="index.php?option=com_uddeim&task=".$task."&Itemid=".$item_id.$addlink; } else { $redirecturl="index.php?option=com_uddeim&task=".$task."&Itemid=".$item_id.$addlink."&limit=".$limit."&limitstart=".$limitstart; } uddeJSEFredirect($redirecturl); }
function uddeIMrecallMessage($myself, $item_id, $messageid, $cryptpass, $config) { // this function has three parts // first, read the message // second, delete the message from the db (complete erase) // third, display values for editing $my_gid = $config->usergid; $displaymessages = uddeIMselectOutboxMessageIfUnread($myself, $messageid, $config); if(count($displaymessages)<1) { $mosmsg = _UDDEIM_COULDNOTRECALL; uddeJSEFredirect("index.php?option=com_uddeim&task=outbox&Itemid=".$item_id, $mosmsg); } $recipname = ""; $recalled_message = ""; foreach($displaymessages as $themessage) { // recalling a message to a public user makes no sense since it has been sent anyway if ( uddeIMisPublicUser($themessage->toname,$themessage->toid) ) { $mosmsg = _UDDEIM_COULDNOTRECALLPUBLIC; uddeJSEFredirect("index.php?option=com_uddeim&task=outbox&Itemid=".$item_id, $mosmsg); } // CRYPT $recalled_message = uddeIMgetMessage($themessage->message, $cryptpass, $themessage->cryptmode, $themessage->crypthash, $config->cryptkey); $recalled_message = stripslashes($recalled_message); $recipname = uddeIMgetNameFromID($themessage->toid, $config); } // write the uddeim menu uddeIMprintMenu($myself, 'new', $item_id, $config); echo "<div id='uddeim-m'>\n"; // delete it from db (after writing the form since I need the message for a query inside of uddeIMdrawWriteform) uddeIMpurgeMessageFromUser($myself, $messageid); echo "<div id='uddeim-toplines'><p>"._UDDEIM_RECALLEDMESSAGE_INFO."</p></div>\n"; uddeIMdrawWriteform($myself, $my_gid, $item_id, "", $recipname, $recalled_message, 0, 0, 0, 0, $config); // allow to select a recipient echo "</div>\n<div id='uddeim-bottomborder'>".uddeIMcontentBottomborder($myself, $item_id, 'standard', 'none', $config)."</div>\n"; }
function uddeIMshowMCP($option, $task, $act, $config) { $mosConfig_offset = uddeIMgetOffset(); $database = uddeIMgetDatabase(); $version = uddeIMgetVersion(); $emnid = intval( uddeIMmosGetParam( $_POST, 'id', '' ) ); uddeIMaddScript(uddeIMgetPath('live_site')."/components/com_uddeim/js/uddeimtools.js"); switch($act) { case "delete": uddeIMdeleteOneMessage($option, $task, $act, $emnid, $config); break; case "deliver": uddeIMdeleteOneMessage($option, $task, $act, $emnid, $config); break; } // get parameter from filter $f_param = array(); $f_where = array(); $f_param[0] = uddeIMmosGetParam($_POST, 'f_username', ''); if($f_param[0]!="") $f_where[] = "ufrom.username LIKE '$f_param[0]%'"; $f_param[1] = uddeIMmosGetParam($_POST, 'f_name', ''); if($f_param[1]!="") $f_where[] = "ufrom.name LIKE '$f_param[1]%'"; $limit = intval( uddeIMmosGetParam( $_POST, 'limit', 10 ) ); $limitstart = intval( uddeIMmosGetParam( $_POST, 'limitstart', 0 ) ); $where = count($f_where) ? " WHERE `delayed`<>0 " . implode(' AND ', $f_where) : " WHERE `delayed`<>0"; $sql = "SELECT count(id) FROM #__uddeim".$where; $database->setQuery($sql); $total = (int)$database->loadResult(); if ($limit==0) { $limit = $total; $limitstart = 0; } if ($limitstart>=$total) $limitstart = 0; // echo($sql." ==> ".$total."<br />"); $sql = "SELECT a.totrash AS trashinbox, a.totrashoutbox AS trashoutbox, a.*, ufrom.name AS fromname, uto.name AS toname, ufrom.username AS fromusername, uto.username AS tousername, ufrom.id AS fromid, uto.id AS toid FROM ((#__uddeim AS a LEFT JOIN #__users AS ufrom ON a.fromid = ufrom.id) LEFT JOIN #__users AS uto ON a.toid = uto.id)"; $sql .= $where; $sql .= " ORDER BY a.id DESC LIMIT $limitstart,$limit"; $database->setQuery($sql); $rows = $database->loadObjectList(); // echo($sql."<br />"); // include_once(uddeIMgetPath('absolute_path')."/administrator/includes/pageNavigation.php"); $pageNav = new uddeIMmosPageNav( $total, $limitstart, $limit ); $query="SELECT username,name FROM #__users WHERE block!='1' ORDER BY username"; $database->setQuery($query); $results = $database->loadObjectList(); $results = array("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"); $the_username='******'; if ($f_param[0]=="") $the_username.=' selected'; $the_username.='>'._UDDEADM_USERSET_SELUSERNAME.'</option>'; foreach($results as $result) { $the_username.='<option value="'.$result.'"'; if ($result==$f_param[0]) $the_username.=' selected'; $the_username.='>'.$result.'...</option>'; } $the_username.="</select>"; $the_name='<select id="f_name" class="text" name="f_name" size="1"><option value=""'; if ($f_param[1]=="") $the_name.=' selected'; $the_name.='>'._UDDEADM_USERSET_SELNAME.'</option>'; foreach($results as $result) { $the_name.='<option value="'.$result.'"'; if ($result==$f_param[1]) $the_name.=' selected'; $the_name.='>'.$result.'...</option>'; } $the_name.="</select>"; // <h4><img align="middle" style="display: inline;" src="<?php echo uddeIMgetPath('live_site')."/administrator/images/inbox.png"; " /> <?php echo _UDDEADM_MCP_EDIT; </h4> ?> <form action="<?php echo uddeIMredirectIndex(); ?>" method="post" name="adminForm" id='adminForm'> <div align="center"> <table cellpadding="4" cellspacing="0" border="0" width="98%"> <tr> <td class="sectionname" align="left"> <h4><?php echo _UDDEADM_MCP_EDIT; ?></h4> </td> <td class="sectionname" align="right"> <img align="middle" style="display: inline; border:1px solid lightgray;" src="<?php echo uddeIMgetPath('live_site')."/components/com_uddeim/templates/images/uddeim_logo.png"; ?>" /> </td> </tr> </table> </div> <table cellpadding="4" cellspacing="0" border="0" width="100%" class="adminlist"> <tr> <td width="100%" align="left"><?php echo $pageNav->writeLimitBox('?option=$option&task=$task'); ?></td> <td><?php echo $the_username; ?></td> <td><?php echo $the_name; ?></td> <td> <input type="submit" value="<?php echo _UDDEADM_ADMIN_FILTER; ?>" /> </td> </tr> </table> <br /> <table class="adminlist"> <tr> <th class="title" width="4%"><input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count( $rows ); ?>);" /></th> <th class="title" width="4%"><?php echo "ID"; ?></th> <th class="title" width="4%"><?php echo _UDDEADM_MCP_TRASHED; ?></th> <th class="title" nowrap="nowrap"><?php echo _UDDEADM_MCP_FROM; ?></th> <th class="title" width="4%"><?php echo _UDDEADM_MCP_TRASHED; ?></th> <th class="title" nowrap="nowrap"><?php echo _UDDEADM_MCP_TO; ?></th> <th class="title"><?php echo _UDDEADM_MCP_DELIVER; ?></th> <th class="title"><?php echo _UDDEADM_MCP_DELETE; ?></th> <th class="title" nowrap="nowrap"><?php echo _UDDEADM_MCP_DATE; ?></th> </tr> <?php $k = 0; for($i=0, $n=count( $rows ); $i < $n; $i++) { $row = &$rows[$i]; echo "<tr class='row$k'>"; echo "<td width='5%'><input type='checkbox' id='cb$i' name='uddeid[]' value='$row->id' onclick='isChecked(this.checked);' /></td>"; echo "<td align='left'>$row->id</td>"; echo "<td align='left'>"; echo uddeIMshowValueNULL($row->trashoutbox); echo "</td>"; echo "<td align='left'>"; if ($row->fromid) echo "Public: $row->fromname ($row->fromusername)"; else echo "$row->publicname ($row->publicemail)"; echo "</td>"; echo "<td align='left'>"; echo uddeIMshowValueNULL($row->trashinbox); echo "</td>"; echo "<td align='left'>"; echo "$row->toname ($row->tousername)"; echo "</td>"; echo "<td align='left'>"; if ($row->delayed) { echo "<a href='#' onclick='document.adminForm.act.value=\"deliver\"; document.adminForm.id.value=\"".$row->id."\"; if (confirm(\""._UDDEADM_MCP_NOTEDELIVER."\")) document.adminForm.submit(); return false;'>"; uddeIMshowTick(true,false); // show tick, opaque (false) echo "</a>"; } else { uddeIMshowTick(false,true); // show cross, opaque (false) } echo "</td>"; echo "<td align='left'>"; if (is_null($row->trashoutbox) && is_null($row->trashinbox)) { // message already deleted } else { echo "<a href='#' onclick='document.adminForm.act.value=\"delete\"; document.adminForm.id.value=\"".$row->id."\"; if (confirm(\""._UDDEADM_MCP_NOTEDEL."\")) document.adminForm.submit(); return false;'>"; uddeIMshowTick(false,($row->trashoutbox && $row->trashinbox)); // show cross, not opaque (opaque, wenn beide true) echo "</a>"; } echo "</td>"; echo "<td align='left'>"; echo date("Y-m-d H:i:s", $row->datum + (3600*uddeIMgetUserTZ())); echo "</td>"; echo "</tr>\n"; echo "<tr class='row$k'>"; echo "<td align='left'></td>"; echo "<td align='left'></td>"; echo "<td align='left' colspan='7'>"; echo "<div style='text-align:right;'><a href='javascript:uddeIMtoggleLayer(\"".$i."\");'>"._UDDEADM_MCP_SHOWHIDE."</a></div>"; echo "<div id='uddeimdivlayer_".$i."' style='display:none;'>"; // $dm = uddeIMdecrypt($row->message, "", $row->cryptmode); $dm = uddeIMgetMessage($row->message, "", $row->cryptmode, $row->crypthash, $config->cryptkey); echo $dm; echo "</div>"; echo "</td>"; echo "</tr>\n"; $k = 1 - $k; } ?> <tr> <th align="center" colspan="9"><?php echo $pageNav->writePagesLinks(); ?></th> </tr> <tr> <td align="center" colspan="9"><?php echo $pageNav->writePagesCounter(); ?></td> </tr> </table> <input type="hidden" name="option" value="<?php echo $option;?>" /> <input type="hidden" name="task" value="<?php echo $task;?>" /> <input type="hidden" name="act" value="" /> <input type="hidden" name="id" value="" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="hidemainmenu" value="0" /> <?php if ($version->PRODUCT == "Joomla!" || $version->PRODUCT == "Accessible Joomla!") if (strncasecmp($version->RELEASE, "1.0", 3)) { echo "<input type=\"hidden\" name=\"limitstart\" value=\"".(int)$limitstart."\" />"; } ?> </form> <?php }