if ($oJob->get("dispatch_delay") == 0) { // Send manually $oForm = new UI_Table_Form("properties", $sPathNext); $oForm->addHeader(i18n("Report:", $plugin_name)); $oForm->add("", ""); $oForm->add("", sprintf(i18n("Sending newsletter ... (chunk %s of %s, recipients: %s, sent: %s)", $plugin_name), $iChunk, $iChunks, $oJob->get("rcpcount"), $oJob->get("sendcount"))); $oForm->setActionButton("cancel", $cfg['path']['contenido_fullhtml'] . "images/but_cancel.gif", i18n("Stop sending", $plugin_name), "c"); $oForm->setActionButton("submit", $cfg['path']['contenido_fullhtml'] . "images/but_ok.gif", i18n("Send next chunk", $plugin_name), "s", "news_job_run"); } else { // Send automatically $oForm = new UI_Table_Form("properties"); $oForm->addHeader(i18n("Report:", $plugin_name)); $oForm->add("", ""); $oForm->add("", sprintf(i18n("Sending newsletter ... (chunk %s of %s, recipients: %s, sent: %s)", $plugin_name), $iChunk, $iChunks, $oJob->get("rcpcount"), $oJob->get("sendcount"))); $oPage->addScript("Refresh", '<meta http-equiv="refresh" content="' . $oJob->get("dispatch_delay") . '; URL=' . $sPathNext . '">'); $oForm->unsetActionButton("submit"); $oForm->setActionButton("cancel", $cfg['path']['contenido_fullhtml'] . "images/but_cancel.gif", i18n("Stop sending", $plugin_name), "c"); } } else { // All newsletters should have been sent $oForm = new UI_Table_Form("properties"); $oForm->addHeader(i18n("Report:", $plugin_name)); $oForm->add("", ""); $oForm->add("", sprintf(i18n("The newsletter has been sent to %s recipients", $plugin_name), $oJob->get("sendcount"))); $oPage->setReload(); } $oPage->setContent($notis . $oForm->render(true)); } else { if ($action == "news_job_delete" && $perm->have_perm_area_action($area, $action) && is_numeric($_REQUEST["idnewsjob"])) { $oJobs = new cNewsletterJobCollection(); $oJobs->delete($_REQUEST["idnewsjob"]);