$sContent .= ' <table>' . "\n"; $sContent .= ' <tr>' . "\n"; $sContent .= ' <td>' . i18n("Items / page", $plugin_name) . '</td>' . "\n"; $sContent .= ' <td>' . $oSelItemsPerPage->render() . '</td>' . "\n"; $sContent .= ' </tr>' . "\n"; $sContent .= ' <tr>' . "\n"; $sContent .= ' <td>' . i18n("Sort by", $plugin_name) . '</td>' . "\n"; $sContent .= ' <td>' . $oSelSortBy->render() . '</td>' . "\n"; $sContent .= ' </tr>' . "\n"; $sContent .= ' <tr>' . "\n"; $sContent .= ' <td>' . i18n("Sort order", $plugin_name) . '</td>' . "\n"; $sContent .= ' <td>' . $oSelSortOrder->render() . '</td>' . "\n"; $sContent .= ' </tr>' . "\n"; $sContent .= ' <tr>' . "\n"; $sContent .= ' <td>' . i18n("Search for", $plugin_name) . '</td>' . "\n"; $sContent .= ' <td>' . $oTxtFilter->render() . '</td>' . "\n"; $sContent .= ' </tr>' . "\n"; $sContent .= ' <tr>' . "\n"; $sContent .= ' <td>' . i18n("Search in", $plugin_name) . '</td>' . "\n"; $sContent .= ' <td>' . $oSelSearchIn->render() . '</td>' . "\n"; $sContent .= ' </tr>' . "\n"; $sContent .= ' <tr>' . "\n"; $sContent .= ' <td> </td>' . "\n"; $sContent .= ' <td>' . $oBtnApply->render() . '</td>' . "\n"; $sContent .= ' </tr>' . "\n"; $sContent .= ' </table>' . "\n"; $sContent .= '</form>' . "\n"; $sContent .= '</div>' . "\n"; // To template $sLink = "listoptionsgroup"; $oListOptionsRow = new cFoldingRow("79efc1fc-111d-11dc-8314-0800200c9a66", i18n("List options", $plugin_name), $sLink, false);
$oForm->setVar("idrecipient", $recipient->get("idnewsrcp")); $oForm->addHeader(i18n("Edit recipient", $plugin_name)); $oTxtName = new cHTMLTextbox("name", $recipient->get("name"), 40); $oTxtEMail = new cHTMLTextbox("email", $recipient->get("email"), 40); $oCkbConfirmed = new cHTMLCheckbox("confirmed", "1"); $oCkbConfirmed->setChecked($recipient->get("confirmed")); $oCkbDeactivated = new cHTMLCheckbox("deactivated", "1"); $oCkbDeactivated->setChecked($recipient->get("deactivated")); $oSelNewsType = new cHTMLSelectElement("newstype"); $oOption = new cHTMLOptionElement(i18n("Text only", $plugin_name), "0"); $oSelNewsType->addOptionElement(0, $oOption); $oOption = new cHTMLOptionElement(i18n("HTML and text", $plugin_name), "1"); $oSelNewsType->addOptionElement(1, $oOption); $oSelNewsType->setDefault($recipient->get("news_type")); $oForm->add(i18n("Name", $plugin_name), $oTxtName->render()); $oForm->add(i18n("E-Mail", $plugin_name), $oTxtEMail->render()); $oForm->add(i18n("Confirmed", $plugin_name), $oCkbConfirmed->toHTML(false) . " (" . $recipient->get("confirmeddate") . ")"); $oForm->add(i18n("Deactivated", $plugin_name), $oCkbDeactivated->toHTML(false)); $oForm->add(i18n("Message type", $plugin_name), $oSelNewsType->render()); $aPluginOrder = trim_array(explode(",", getSystemProperty("plugin", "recipients-pluginorder"))); // Check out if there are any plugins if (is_array($aPluginOrder)) { foreach ($aPluginOrder as $sPlugin) { if (function_exists("recipients_" . $sPlugin . "_getTitle") && function_exists("recipients_" . $sPlugin . "_display")) { $aPluginTitle = call_user_func("recipients_" . $sPlugin . "_getTitle"); $aPluginDisplay = call_user_func("recipients_" . $sPlugin . "_display", $recipient); if (is_array($aPluginTitle) && is_array($aPluginDisplay)) { foreach ($aPluginTitle as $sKey => $sValue) { $oForm->add($sValue, $aPluginDisplay[$sKey]); } } else {
$sContent .= ' <table>' . chr(10); $sContent .= ' <tr>' . chr(10); $sContent .= ' <td>' . i18n("Items / page", $plugin_name) . '</td>' . chr(10); $sContent .= ' <td>' . $oSelItemsPerPage->render() . '</td>' . chr(10); $sContent .= ' </tr>' . chr(10); $sContent .= ' <tr>' . chr(10); $sContent .= ' <td>' . i18n("Sort by", $plugin_name) . '</td>' . chr(10); $sContent .= ' <td>' . $oSelSortBy->render() . '</td>' . chr(10); $sContent .= ' </tr>' . chr(10); $sContent .= ' <tr>' . chr(10); $sContent .= ' <td>' . i18n("Sort order", $plugin_name) . '</td>' . chr(10); $sContent .= ' <td>' . $oSelSortOrder->render() . '</td>' . chr(10); $sContent .= ' </tr>' . chr(10); $sContent .= ' <tr>' . chr(10); $sContent .= ' <td>' . i18n("Search for", $plugin_name) . '</td>' . chr(10); $sContent .= ' <td>' . $oTxtFilter->render() . '</td>' . chr(10); $sContent .= ' </tr>' . chr(10); $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); $oOutsiderListOptionRow->setContentData($sContent); // TODO: Try to enhance genericdb to get this working with the usual objects... $oOutsiders = new RecipientCollection(); # This requires mySQL V4.1, at least...