本文整理汇总了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> '<b><em>" . display($NL[0]['subject']) . "</em></b>'";
$_MAIN_MESSAGE .= " ==> '<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?
示例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'])) {