$sContent .= ' <td>' . $oSubmit->render() . '</td>' . chr(10); $sContent .= ' </tr>' . chr(10); $sContent .= ' </table>' . chr(10); $sContent .= '</div>' . chr(10); $oMemberListOptionRow->setContentData($sContent); // Members $oAddedRecipientList = new UI_List(); $oAddedRecipientList->setWidth("100%"); $oAddedRecipientList->setBorder(1); $oAddedRecipientList->setCell(0, 1, "<strong>" . i18n("Name", $plugin_name) . "</strong>"); $oImgDel = new cHTMLImage("images/but_invert_selection.gif"); $sLnkDelIcon = '<a title="' . i18n("Check all", $plugin_name) . '" href="javascript://" onclick="fncCheckDel(\'deluser[]\');">' . $oImgDel->render() . '</a>'; $oAddedRecipientList->setCell(0, 2, $sLnkDelIcon); $oAddedRecipientList->setCellAlignment(0, 2, "right"); $oInsiders = new RecipientCollection(); $oInsiders->link("RecipientGroupMemberCollection"); $oInsiders->setWhere("recipientcollection.idclient", $client); $oInsiders->setWhere("recipientcollection.idlang", $lang); $oInsiders->setWhere("RecipientGroupMemberCollection.idnewsgroup", $_REQUEST["idrecipientgroup"]); // Get insiders for outsiders list (*sigh!*) // TODO: Ask user to have at least mySQL 4.1... $oInsiders->query(); $aInsiders = array(); if ($oInsiders->count() > 0) { while ($oInsider = $oInsiders->next()) { $aInsiders[] = $oInsider->get($oInsider->primaryKey); } } // Filter if ($_REQUEST["member_filter"] != "") { if ($_REQUEST["member_searchin"] == "--all--" || $_REQUEST["member_searchin"] == "") {
# Get data ################################## $oRecipients = new RecipientCollection(); // Updating keys, if activated; all recipients of all clients! $sMsg = ""; if (getSystemProperty("newsletter", "updatekeys")) { $iUpdatedRecipients = $oRecipients->updateKeys(); $sMsg = $notification->returnNotification("info", sprintf(i18n("%d recipients, with no or incompatible key has been updated. Deactivate update function.", $plugin_name), $iUpdatedRecipients)); } $oRecipients->setWhere("recipientcollection.idclient", $client); $oRecipients->setWhere("recipientcollection.idlang", $lang); // sort by and sort order $oRecipients->setOrder("recipientcollection." . $_REQUEST["sortby"] . " " . $_REQUEST["sortorder"]); // Show group if ($_REQUEST["restrictgroup"] != "--all--") { $oRecipients->link("RecipientGroupMemberCollection"); $oRecipients->setWhere("RecipientGroupMemberCollection.idnewsgroup", $_REQUEST["restrictgroup"]); } // Search for if ($_REQUEST["filter"] != "") { if ($_REQUEST["searchin"] == "--all--" || $_REQUEST["searchin"] == "") { foreach ($aFields as $sKey => $aData) { if (strpos($aData["type"], "search") !== false) { $oRecipients->setWhereGroup("filter", "recipientcollection." . $aData["field"], $_REQUEST["filter"], "LIKE"); } } $oRecipients->setInnerGroupCondition("filter", "OR"); } else { $oRecipients->setWhere("recipientcollection." . $_REQUEST["searchin"], $_REQUEST["filter"], "LIKE"); } }