$oForm->add($aPluginTitle, $aPluginDisplay); } } } } } $oGroupList = new UI_List(); $oGroupList->setWidth("100%"); $oGroupList->setBorder(1); $oAssocGroups = new RecipientGroupMemberCollection(); $oAssocGroups->link("RecipientGroupCollection"); $oAssocGroups->setWhere("recipientgroupmembercollection.idnewsrcp", $recipient->get("idnewsrcp")); $oAssocGroups->setOrder("recipientgroupcollection.groupname"); $oAssocGroups->query(); if ($oAssocGroups->count() == 0) { $oGroupList->setCell(0, 1, i18n("Recipient is not member of any group", $plugin_name)); } else { // Headline $oGroupList->setCell(0, 1, "<strong>" . i18n("Groupname", $plugin_name) . "</strong>"); $oImgDel = new cHTMLImage("images/delete.gif"); $oGroupList->setCell(0, 2, $oImgDel->render()); $oGroupList->setCellAlignment(0, 2, "right"); // Data while ($oAssocGroup = $oAssocGroups->next()) { $oGroup = $oAssocGroups->fetchObject("RecipientGroupCollection"); $oCkbRemove = new cHTMLCheckbox("ckbRemove[]", $oAssocGroup->get("idnewsgroupmember")); echo $oGroup->get("idnewsgroupmember"); $oGroupList->setCell($oAssocGroup->get("idnewsgroupmember"), 1, $oGroup->get("groupname")); $oGroupList->setCell($oAssocGroup->get("idnewsgroupmember"), 2, $oCkbRemove->toHTML(false)); $oGroupList->setCellAlignment($oAssocGroup->get("idnewsgroupmember"), 2, "right"); }
$sContent .= ' <tr>' . chr(10); $sContent .= ' <td>' . i18n("Search in", $plugin_name) . '</td>' . chr(10); $sContent .= ' <td>' . $oSelSearchIn->render() . '</td>' . chr(10); $sContent .= ' </tr>' . chr(10); $sContent .= ' <tr>' . chr(10); $sContent .= ' <td> </td>' . chr(10); $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()) {