当前位置: 首页>>代码示例>>PHP>>正文


PHP Timer::MidResult方法代码示例

本文整理汇总了PHP中Timer::MidResult方法的典型用法代码示例。如果您正苦于以下问题:PHP Timer::MidResult方法的具体用法?PHP Timer::MidResult怎么用?PHP Timer::MidResult使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Timer的用法示例。


在下文中一共展示了Timer::MidResult方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: display

 //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);
             //start q?
开发者ID:aydancoskun,项目名称:octobercms,代码行数:31,代码来源:queue_send.inc.php

示例2: count

 //if massmail, we can cache body parts
 if ($massmail) {
     $email_obj->cache_body = 1;
 } else {
     $email_obj->cache_body = 0;
 }
 $max_mails = $max_mails_atonce * $max_mails_bcc;
 //maximale anzahl zu bearbeitender mails/empfaenger insgesamt! faktor max_mails_bcc
 send_log("creating list");
 //aktuel offene versandauftraege
 $H = $QUEUE->getHtoSend(0, 0, $max_mails, $Q[$qcc]['id']);
 //id , offset, limit, q_id !!!, ....
 $hc = count($H);
 //wieviel sendeeintraege
 send_log($hc . " Entrys found\n");
 $time = $T->MidResult();
 send_log("time: " . $time);
 send_log("working on max {$max_mails} addresses in {$max_mails_atonce} mails with {$max_mails_bcc} recipients for each mail");
 //wenn massenmailing, body hier schon parsen!!!
 if ($massmail) {
     //to fuer massenmailing
     send_log("prepare Massmail");
     $SUBJ = $NEWSLETTER->parseSubject(array('text' => $NL[0]['subject'], 'date' => date(TM_NL_DATEFORMAT)));
     //hmmm, we should use date from send_at in q!
     send_log("Subject: " . $NL[0]['subject']);
     send_log("Subject (parsed): " . $SUBJ);
     $email_obj->SetEncodedHeader("Subject", $SUBJ);
     //argh, this class forces us to add a to header which is definitely not needed if we have bcc or cc!!!
     $To = $HOST[0]['sender_email'];
     //wird $HOST!
     if (!empty($NL[0]['rcpt_name'])) {
开发者ID:aydancoskun,项目名称:octobercms,代码行数:31,代码来源:send_it.php


注:本文中的Timer::MidResult方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。