$oBtnSave = new cHTMLButton("submit", i18n("Save", $plugin_name));
$sContent = '<div style="border-bottom: 0px solid #B3B3B3; padding-left:17px; background: ' . $cfg['color']['table_dark'] . ';">' . "\n";
$sContent .= '  <form target="left_bottom" onsubmit="append_registered_parameters(this);" id="htmlnewsletter" name="htmlnewsletter" method="get" action="main.php?1">' . "\n";
$sContent .= '   <input type="hidden" name="area" value="' . $area . '">' . "\n";
$sContent .= '   <input type="hidden" name="frame" value="2">' . "\n";
$sContent .= '   <input type="hidden" name="contenido" value="' . $sess->id . '">' . "\n";
$sContent .= '   <input type="hidden" name="elemperpage" value="' . $_REQUEST["elemperpage"] . '">' . "\n";
$sContent .= '   <input type="hidden" name="sortby" value="' . $_REQUEST["sortby"] . '">' . "\n";
$sContent .= '   <input type="hidden" name="sortorder" value="' . $_REQUEST["sortorder"] . '">' . "\n";
$sContent .= '   <input type="hidden" name="restrictgroup" value="' . $_REQUEST["restrictgroup"] . '">' . "\n";
$sContent .= '   <input type="hidden" name="filter" value="' . $_REQUEST["filter"] . '">' . "\n";
$sContent .= '   <input type="hidden" name="searchin" value="' . $_REQUEST["searchin"] . '">' . "\n";
$sContent .= '   <input type="hidden" name="action_html" value="save_newsletter_properties">' . "\n";
$sContent .= '   <table>' . "\n";
$sContent .= '	  <tr>' . "\n";
$sContent .= '		 <td>' . $oCkbHTMLNewsletter->toHTML(false) . ' ' . i18n("Enable HTML Newsletter", $plugin_name) . '</td>' . "\n";
$sContent .= '	  </tr>' . "\n";
$sContent .= '	  <tr>' . "\n";
$sContent .= '		 <td>' . i18n("HTML Template Category:", $plugin_name) . '<br />' . $oSelHTMLTemplateIDCat->render() . '</td>' . "\n";
$sContent .= '	  </tr>' . "\n";
$sContent .= '	  <tr>' . "\n";
$sContent .= '		 <td>' . i18n("HTML Newsletter Category:", $plugin_name) . '<br />' . $oSelHTMLNewsletterIDCat->render() . '</td>' . "\n";
$sContent .= '	  </tr>' . "\n";
$sContent .= '	  <tr>' . "\n";
$sContent .= '		 <td>' . i18n("Send test destination:", $plugin_name) . '<br />' . $oSelTestDestination->render() . '</td>' . "\n";
$sContent .= '	  </tr>' . "\n";
$sContent .= '	  <tr>' . "\n";
$sContent .= '		 <td style="text-align: right;">' . $oBtnSave->render() . '</td>' . "\n";
$sContent .= '	  </tr>' . "\n";
$sContent .= '	</table>' . "\n";
$sContent .= '  </form>' . "\n";
    $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");
        }
    }
    $oForm->add(i18n("Associated Groups", $plugin_name), $oGroupList->render());
    $oForm->add(i18n("Author", $plugin_name), $classuser->getUserName($recipient->get("author")) . " (" . $recipient->get("created") . ")");
    $oForm->add(i18n("Last modified by", $plugin_name), $classuser->getUserName($recipient->get("modifiedby")) . " (" . $recipient->get("lastmodified") . ")");
    $oPage->setContent($sNotis . $oForm->render(true));
} else {
    $oPage->setContent($sNotis . "");
}
$oPage->render();
 } else {
     if ($iItems == 0) {
         $oAddedRecipientList->setCell(1, 1, i18n("No recipients found", $plugin_name));
         $oAddedRecipientList->setCell(1, 2, '&nbsp;');
     } else {
         while ($oRcp = $oInsiders->next()) {
             $iID = $oRcp->get("idnewsrcp");
             $sName = $oRcp->get("name");
             $sEMail = $oRcp->get("email");
             if (empty($sName)) {
                 $sName = $sEMail;
             }
             $oAddedRecipientList->setCell($iID, 1, $sName . " (" . $sEMail . ")");
             if ($perm->have_perm_area_action($area, "recipientgroup_recipient_delete")) {
                 $oCkbDel = new cHTMLCheckbox("deluser[]", $iID);
                 $oAddedRecipientList->setCell($iID, 2, $oCkbDel->toHTML(false));
             } else {
                 $oAddedRecipientList->setCell($iID, 2, "&nbsp;");
             }
             $oAddedRecipientList->setCellAlignment($iID, 2, "right");
         }
     }
 }
 // Member list pager (-> below data, as iMembers is needed)
 $oPagerLink = new cHTMLLink();
 $oPagerLink->setLink("main.php");
 $oPagerLink->setCustom("member_elemperpage", $_REQUEST["member_elemperpage"]);
 $oPagerLink->setCustom("member_filter", $_REQUEST["member_filter"]);
 $oPagerLink->setCustom("member_sortby", $_REQUEST["member_sortby"]);
 $oPagerLink->setCustom("member_sortorder", $_REQUEST["member_sortorder"]);
 $oPagerLink->setCustom("member_searchin", $_REQUEST["member_searchin"]);