} if (!isset($_REQUEST["outsider_page"]) || !is_numeric($_REQUEST["outsider_page"]) || $_REQUEST["outsider_page"] <= 0 || $_REQUEST["outsider_elemperpage"] == 0) { $_REQUEST["outsider_page"] = 1; } if ($_REQUEST["outsider_sortorder"] != "DESC") { $_REQUEST["outsider_sortorder"] = "ASC"; } // Output form $oForm = new UI_Table_Form("properties", "main.php?1", "get"); // Use "get" for folding rows... $oForm->setVar("frame", $frame); $oForm->setVar("area", $area); $oForm->setVar("action", "recipientgroup_save_group"); $oForm->setVar("idrecipientgroup", $_REQUEST["idrecipientgroup"]); $oForm->setSubmitJS("append_registered_parameters(this);"); $oForm->addHeader(i18n("Edit group", $plugin_name)); $oTxtGroupName = new cHTMLTextbox("groupname", $oRGroup->get("groupname"), 40); $oForm->add(i18n("Group name", $plugin_name), $oTxtGroupName->render()); $oCkbDefault = new cHTMLCheckbox("defaultgroup", "1"); $oCkbDefault->setChecked($oRGroup->get("defaultgroup")); $oForm->add(i18n("Default group", $plugin_name), $oCkbDefault->toHTML(false)); // Member list options folding row $oMemberListOptionRow = new cFoldingRow("a91f5540-52db-11db-b0de-0800200c9a66", i18n("Member list options", $plugin_name)); $oSelItemsPerPage = new cHTMLSelectElement("member_elemperpage"); $oSelItemsPerPage->autoFill(array(0 => i18n("-- All --", $plugin_name), 25 => 25, 50 => 50, 75 => 75, 100 => 100)); $oSelItemsPerPage->setDefault($_REQUEST["member_elemperpage"]); $oSelSortBy = new cHTMLSelectElement("member_sortby"); foreach ($aFields as $sKey => $aData) { if (strpos($aData["type"], "sort") !== false) { if ($_REQUEST["member_sortby"] == "") { $_REQUEST["member_sortby"] = $aData["field"];
foreach ($_REQUEST["ckbRemove"] as $iGroupMemberID) { if (is_numeric($iGroupMemberID)) { $oGroupMembers->delete($iGroupMemberID); } } } } if (count($aMessages) > 0) { $sNotis = $notification->returnNotification("warning", implode("<br>", $aMessages)) . "<br>"; } $oForm = new UI_Table_Form("properties"); $oForm->setVar("frame", $frame); $oForm->setVar("area", $area); $oForm->setVar("action", "recipients_save"); $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") . ")");
<td><img src="images/spacer.gif" width="1" height="10"></td> </tr> <tr class="text_medium" style="background-color: #ffffff;"> <td style="border: 1px; border-color: #B3B3B3; border-style: solid; background-color: #E2E2E2; color:#666666"> ' . sprintf(i18n("Go to page: %s", $plugin_name), $sBrowseLinks) . '</td> </tr> </table>'; $oPage->setContent($oFrmOptions->render() . "<br />" . $oList->render() . $sBrowseHTML); } else { // Just show the job data $oJob = new cNewsletterJob($_REQUEST["idnewsjob"]); $oForm = new UI_Table_Form("properties"); $oForm->setVar("frame", $frame); $oForm->setVar("area", $area); $oForm->setVar("action", ""); $oForm->setVar("idnewsjob", $idnewsjob); $oForm->addHeader(i18n("Newsletter Dispatch Job", $plugin_name)); $oForm->add(i18n("Name", $plugin_name), $oJob->get("name")); $sDateFormat = getEffectiveSetting("backend", "timeformat", "d.m.Y H:i"); switch ($oJob->get("status")) { case 1: $oForm->add(i18n("Status", $plugin_name), i18n("Pending", $plugin_name)); break; case 2: $oForm->add(i18n("Status", $plugin_name), sprintf(i18n("Sending (started: %s)", $plugin_name), date($sDateFormat, strtotime($oJob->get("started"))))); break; case 9: $oForm->add(i18n("Status", $plugin_name), sprintf(i18n("Finished (started: %s, finished: %s)", $plugin_name), date($sDateFormat, strtotime($oJob->get("started"))), date($sDateFormat, strtotime($oJob->get("finished"))))); break; } $oForm->add(i18n("Statistics", $plugin_name), sprintf(i18n("Planned: %s, Send: %s", $plugin_name), $oJob->get("rcpcount"), $oJob->get("sendcount"))); $oForm->add(i18n("From", $plugin_name), $oJob->get("newsfrom") . " (" . $oJob->get("newsfromname") . ")");
function editWorkflowStep($idworkflowitem) { global $area, $idworkflow, $idworkflowitem, $frame, $availableWorkflowActions; global $notification; $workflowitem = new WorkflowItem(); if ($workflowitem->loadByPrimaryKey($idworkflowitem) == false) { return " "; } $workflowactions = new WorkflowActions(); $stepname = $workflowitem->get("name"); $stepdescription = $workflowitem->get("description"); $id = $workflowitem->get("idworkflowitem"); $task = $workflowitem->get("idtask"); $form = new UI_Table_Form("workflow_edit"); $form->setVar("area", $area); $form->setVar("action", "workflow_save_step"); $form->setVar("idworkflow", $idworkflow); $form->setVar("idworkflowitem", $idworkflowitem); $form->setVar("frame", $frame); $form->addHeader(i18n("Edit workflow step", "workflow")); $form->add(i18n("Step name", "workflow"), formGenerateField("text", "wfstepname", $stepname, 40, 255)); $form->add(i18n("Step description", "workflow"), formGenerateField("textbox", "wfstepdescription", $stepdescription, 60, 10)); foreach ($availableWorkflowActions as $key => $value) { $actions .= formGenerateCheckbox("wfactions[" . $key . "]", "1", $workflowactions->get($id, $key)) . '<label for="wfactions[' . $key . ']1">' . $value . '</label>' . "<br>"; } $form->add(i18n("Actions", "workflow"), $actions); $form->add(i18n("Assigned users", "workflow"), getWorkflowUsers($idworkflowitem)); return $form->render(true); }
$idworkflow = $_GET['idworkflow']; } if ($idworkflow) { $sReloadScript = "<script type=\"text/javascript\">\n var left_bottom = top.content.frames['left'].frames['left_bottom'];\n var right_top = top.content.frames['right'].frames['right_top'];\n if (left_bottom) {\n var href = left_bottom.location.href;\n href = href.replace(/&action=workflow_delete/, '');\n left_bottom.location.href = href+'&idworkflow='+" . $idworkflow . ";\n }\n \n if (right_top) {\n right_top.location.href = right_top.location.href+'&idworkflow='+" . $idworkflow . ";\n }\n </script>"; } else { $sReloadScript = ''; } //function formGenerateField ($type, $name, $initvalue, $width, $maxlen) $form->setVar("area", $area); $form->setVar("action", "workflow_save"); $form->setVar("idworkflow", $idworkflow); $form->setVar("frame", $frame); if ($workflow->virgin) { $name = i18n("New Workflow", "workflow"); $header = i18n("Create new workflow", "workflow"); } else { $header = i18n("Edit workflow", "workflow"); $description = $workflow->get("description"); $name = $workflow->get("name"); $created = $workflow->get("created"); $author = $userclass->getRealname($workflow->get("idauthor")); } $form->addHeader($header); $form->add(i18n("Workflow name", "workflow"), formGenerateField("text", "wfname", $name, 40, 255)); $form->add(i18n("Description", "workflow"), formGenerateField("textbox", "wfdescription", $description, 50, 10)); $form->add(i18n("Author", "workflow"), $author); $form->add(i18n("Created", "workflow"), $created); $page = new UI_Page(); $page->setContent($form->render(true)); $page->addScript('reload', $sReloadScript); $page->render();
// Ups, template has been deleted: Restore from current newsletter message article $notis = $notification->returnNotification("warning", i18n("The html newsletter template article has been deleted, it has been restored using the html message article of this newsletter", $plugin_name)) . "<br>"; $iIDArt = conCopyArticle($oNewsletter->get("idart"), $oClientLang->getProperty("newsletter", "html_template_idcat"), sprintf(i18n("%s (Template restored)", $plugin_name), $oNewsletter->get("name"))); $oNewsletter->set("template_idart", $iIDArt); $oNewsletter->store(); } } } } $oForm = new UI_Table_Form("frmNewsletterMsg"); $oForm->setVar("frame", $frame); $oForm->setVar("area", $area); $oForm->setVar("action", "news_save"); $oForm->setVar("idnewsletter", $idnewsletter); $oForm->setWidth("100%"); $oForm->addHeader(sprintf(i18n("Edit newsletter message (%s)", $plugin_name), $oNewsletter->get("name"))); $oForm->add(i18n("Subject", $plugin_name), $oNewsletter->get("subject")); $sTagInfoText = '<a href="javascript:fncShowHide(\'idTagInfoText\');"><strong>' . i18n("Tag information", $plugin_name) . '</strong></a>' . '<div id="idTagInfoText" style="display: none"><br /><b>' . i18n("Special message tags (will be replaced when sending)", $plugin_name) . ':</b><br>' . 'MAIL_NAME: ' . i18n("Name of the recipient", $plugin_name) . '<br />' . 'MAIL_DATE: ' . i18n("Date, when the mail has been sent", $plugin_name) . '<br />' . 'MAIL_TIME: ' . i18n("Time, when the mail has been sent", $plugin_name) . '<br />' . 'MAIL_NUMBER: ' . i18n("Number of recipients", $plugin_name) . '<br />' . 'MAIL_UNSUBSCRIBE: ' . i18n("Link to unsubscribe", $plugin_name) . '<br />' . 'MAIL_STOP: ' . i18n("Link to pause the subscription", $plugin_name) . '<br />' . 'MAIL_GOON: ' . i18n("Link to resume the subscription", $plugin_name); $sTagInfoHTML = '<a href="javascript:fncShowHide(\'idTagInfoHTML\');"><strong>' . i18n("Tag information", $plugin_name) . '</strong></a>' . '<div id="idTagInfoHTML" style="display: none"><br /><b>' . i18n("Special message tags (will be replaced when sending, {..} = optional)", $plugin_name) . ":</b><br />" . '[mail name="name" type="text"]{text}MAIL_NAME{text}[/mail]: ' . i18n("Name of the recipient", $plugin_name) . "<br />" . '[mail name="date" type="text"]{text}MAIL_DATE{text}[/mail]: ' . i18n("Date, when the mail has been sent", $plugin_name) . "<br />" . '[mail name="time" type="text"]{text}MAIL_TIME{text}[/mail]: ' . i18n("Time, when the mail has been sent", $plugin_name) . "<br />" . '[mail name="number" type="text"]{text}MAIL_NUMBER{text}[/mail]: ' . i18n("Number of recipients", $plugin_name) . "<br />" . '[mail name="unsubscribe" type="link" {text="' . i18n("Link text", $plugin_name) . '" }]{text}MAIL_UNSUBSCRIBE{text}[/mail]: ' . i18n("Link to unsubscribe", $plugin_name) . "<br />" . '[mail name="stop" type="link" {text="' . i18n("Link text", $plugin_name) . '" }]{text}MAIL_STOP{text}[/mail]: ' . i18n("Link to pause the subscription", $plugin_name) . "<br />" . '[mail name="goon" type="link" {text="' . i18n("Link text", $plugin_name) . '" }]{text}MAIL_GOON{text}[/mail]: ' . i18n("Link to resume the subscription", $plugin_name); // Mention plugin interface if (getSystemProperty("newsletter", "newsletter-recipients-plugin") == "true") { $sTagInfoText .= "<br /><br /><strong>" . i18n("Additional message tags from recipients plugins:", $plugin_name) . "</strong><br />"; $sTagInfoHTML .= "<br /><br /><strong>" . i18n("Additional message tags from recipients plugins:", $plugin_name) . "</strong><br />"; if (is_array($cfg['plugins']['recipients'])) { foreach ($cfg['plugins']['recipients'] as $plugin) { plugin_include("recipients", $plugin . "/" . $plugin . ".php"); if (function_exists("recipients_" . $plugin . "_wantedVariables")) { $aPluginVars = call_user_func("recipients_" . $plugin . "_wantedVariables"); foreach ($aPluginVars as $sPluginVar) { $sTagInfoText .= 'MAIL_' . strtoupper($sPluginVar) . '<br />'; $sTagInfoHTML .= '[mail name="' . strtolower($sPluginVar) . '" type="text"][/mail]<br />';
$_REQUEST["txtData"] = implode("\n", $aInvalidLines); } if (count($aMessage) > 0) { $sMessage = $notification->returnNotification("warning", implode("<br />", $aMessage)) . "<br />"; } $sMessage .= $notification->returnNotification("info", sprintf(i18n("%d recipients added, %d recipients skipped (email already exists) and %d invalid recipients/e-mail adresses ignored. Invalid recipients are shown (if any).", $plugin_name), $iAdded, $iDublettes, $iInvalid)); if ($iAdded > 0) { $oPage->setReload(); } } } $oForm = new UI_Table_Form("properties"); $oForm->setVar("frame", $frame); $oForm->setVar("area", $area); $oForm->setVar("action", "recipients_import_exec"); $oForm->addHeader(i18n("Import recipients", $plugin_name)); $oSelDelimiter = new cHTMLSelectElement("selDelimiter"); $aItems = array(); $aItems[] = array("semicolon", i18n("Semicolon", $plugin_name)); $aItems[] = array("tab", i18n("Tab", $plugin_name)); $oSelDelimiter->autoFill($aItems); $oSelDelimiter->setDefault($_REQUEST["selDelimiter"]); $oForm->add(i18n("Delimiter", $plugin_name), $oSelDelimiter->render()); $oAreaData = new cHTMLTextarea("txtData", $_REQUEST["txtData"], 80, 20); $sInfo = '<a href="javascript:fncShowHide(\'idInfoText\');"><strong>' . i18n("Import information", $plugin_name) . '</strong></a>' . '<div id="idInfoText" style="display: none">' . '<br /><br /><strong>' . i18n("Specify colum types:", $plugin_name) . '</strong>' . i18n("<br />The first line must contain the column names; this specifies the column order.<br /><column name>[delimiter]<column name>...", $plugin_name) . '<br /><br /><strong>' . i18n("Data structure:", $plugin_name) . '</strong><br />' . i18n("The recipients have to be entered using the following format:<br /><data>[Delimiter]<data>... - each recipient in a new line.", $plugin_name) . '<br /><br /><strong>' . i18n("Example:", $plugin_name) . '</strong>' . i18n("<br />name;mail;confirmed<br />Smith;jon.smith@example.org;1", $plugin_name) . '<br /><br /><strong>' . i18n("The following column names will be recognized:", $plugin_name) . '</strong><br />' . implode("<br />\n", $aFields) . '</div>'; $oForm->add(i18n("Recipients", $plugin_name), $oAreaData->render() . "<br />" . $sInfo); unset($sInfo); $sExecScript = ' <script type="text/javascript"> /* Enabled/Disable group box */ function fncShowHide(strItemID) {