コード例 #1
0
 //nur erster durchlauf
 //wenn status ok, also neu 1, gestartet 2 oder angehalten 5
 //dann neu eintrag in sendeliste/history, q_id, nl_id, grp_id, adr_id
 if ($Q[0]['status'] == 1 || $Q[0]['status'] == 2 || $Q[0]['status'] == 5) {
     $NL = $NEWSLETTER->getNL($Q[0]['nl_id'], 0, 0, 0, 0);
     if (DEBUG) {
         echo "\nNL:\n";
     }
     if (DEBUG) {
         print_r($NL);
     }
     //wenn das Newsletter auch wirklich aktiv ist......
     if ($NL[0]['aktiv'] == 1) {
         $_MAIN_MESSAGE .= "<br>&nbsp;&nbsp;'<b><em>" . display($NL[0]['subject']) . "</em></b>'";
         $_MAIN_MESSAGE .= "&nbsp;&nbsp;==&gt;&nbsp;&nbsp;'<b>" . display($GRP[0]['name']) . "</b>'";
         $hc_fastinsert = $QUEUE->addHQ(array('nl_id' => $Q[0]['nl_id'], 'q_id' => $Q[0]['id'], 'grp_id' => $Q[0]['grp_id'], 'host_id' => $Q[0]['host_id'], 'status' => 1, 'created' => date("Y-m-d H:i:s")));
         $hqtime = $HQTimer->MidResult();
         if (DEBUG) {
             $_MAIN_MESSAGE .= "\nhc_fastinsert:\n";
         }
         if (DEBUG) {
             $_MAIN_MESSAGE .= print_r($hc_fastinsert, TRUE);
         }
         if ($hc_fastinsert[0]) {
             if (DEBUG) {
                 $_MAIN_MESSAGE .= "<br>num rows:" . $hc_fastinsert[1] . "<br>affected rows:" . $hc_fastinsert[2];
             }
             $_MAIN_MESSAGE .= "<br>" . sprintf(___("%s Einträge eingefügt."), $hc_fastinsert[2]);
             $_MAIN_MESSAGE .= "<br>" . sprintf(___("Benötigte Zeit: %s Sekunden"), number_format($hqtime, 2, ".", ""));
             //status der Q und NL auf gestartet setzen!
             $NEWSLETTER->setStatus($Q[0]['nl_id'], 6);
コード例 #2
0
ファイル: send_it.php プロジェクト: aydancoskun/octobercms
 send_log("Preparing " . ($qpcc + 1) . " of {$qpc} Qs");
 send_log("begin");
 send_log("QID=" . $QP[$qpcc]['id']);
 send_log("Status=" . $QP[$qpcc]['status']);
 send_log("nl_id=" . $QP[$qpcc]['nl_id']);
 send_log("grp_id=" . $QP[$qpcc]['grp_id']);
 send_log("host_id=" . $QP[$qpcc]['host_id']);
 send_log("send_at=" . $QP[$qpcc]['send_at']);
 send_log("autogen=" . $QP[$qpcc]['autogen']);
 $ReportMail_HTML = "";
 $G = $ADDRESS->getGroup($QP[$qpcc]['grp_id']);
 $NL = $NEWSLETTER->getNL($QP[$qpcc]['nl_id']);
 $HOST = $HOSTS->getHost($QP[$qpcc]['host_id'], array("aktiv" => 1, "type" => "smtp"));
 send_log("q status=1, q autogen =1");
 send_log("creating recipients list:");
 $h_refresh = $QUEUE->addHQ(array('nl_id' => $QP[$qpcc]['nl_id'], 'q_id' => $QP[$qpcc]['id'], 'grp_id' => $QP[$qpcc]['grp_id'], 'host_id' => $QP[$qpcc]['host_id'], 'status' => 1, 'created' => date("Y-m-d H:i:s")));
 #proof?!
 if ($C[0]['proof'] == 1) {
     if (DEBUG) {
         $MESSAGE .= send_log("proofing global enabled");
     }
     if ($QP[$qpcc]['proof'] == 1) {
         if (DEBUG) {
             $MESSAGE .= send_log("proofing for this q enabled");
         }
         $ADDRESS->proof();
     } else {
         if (DEBUG) {
             $MESSAGE .= send_log("proofing for this q disabled");
         }
     }