$dateTime = $date2 . ' ' . $invitedLocation->getLocationTime2(); echo "send new email v2 set date <br>\n"; } elseif ($invited->getTotalEmailSent_() == 2) { $dateTime = $date3 . ' ' . $invitedLocation->getLocationTime3(); echo "send new email v3 set date <br>\n"; } else { echo "\n else no send new email total sent is greater than 2 and value i" . $invited->getTotalEmailSent_(); } $alert->alert("Date Time Send", $dateTime, " set = " . $dateTime . " <br>\n"); echo "set time zone = " . Time::getTimeZoneDateTime24(); //send email //email version of sending if (Time::getTimeZoneDateTime24() >= $dateTime) { $alert->alert("\nAdd activity log", $invitedActivity->addActivityLog($qId, $action, $database), "set qId = {$qId} , action = {$action}"); echo "\n send email to invited <br>\n"; if (Email::sendInviteEmail3($admin->getAdminEmail_(), $invited->getEmail(), $email->inviteSubject1($invited->getTotalEmailSent_()), $qId, $invited->getTotalEmailSent_(), $invited->getFirstName())) { echo " email " . $invited->getEmail(); echo "\n send email to admin"; $newTotalSent = $invited->getTotalEmailSent_() + 1; $alert->alert("\nUpdate total send email ", $invited->updateTotalEmailSent($iId, $invited->getTotalEmailSent_() + 1, $database), "set iId = {$iId} and last total email sent " . $invited->getTotalEmailSent_() . " new total email sent " . $newTotalSent); } else { echo "failed to send email<br>\n"; } } else { echo "<br> \n " . __LINE__ . ". ) time zone = " . Time::getTimeZoneDateTime24() . " < " . $dateTime; echo "<br>\n Email = " . $invited->getEmail(); } } else { echo "\n email will not received an invite because the totasent email is greater than 2 but " . $invited->getTotalEmailSent_(); echo "\n update queue status to 1"; if ($invitedQueue->updateQueueStatus($qId, 1, $database) == TRUE) {
// if($invited->isEmailExist($email)) // $invitedQueue->setInvitedQueueById($qId,$database); // $invited->updateInvitedStatus($invitedQueue->getInvitedId(), 6); // } //initialized $signUp = false; $qId = 107; $email = '*****@*****.**'; // 6 = is sign up pending echo "\n test remove the email "; //validate and conditions //validate and conditions // condition if (!empty($qId) and !empty($email)) { $invited->_setInvitedInformationByQid($qId, $database); if ($invited->getEmail() == $email) { if ($invited->getStatus() == 4) { Log::addExecutionLog("Information already deleted"); } else { if ($invitedQueue->updateQueueStatus($qId, 1, $database)) { if ($invited->updateInvitedStatus($invited->getInvitedId(), 4, $database)) { Log::addExecutionLog("Information successfully deleted"); } else { Log::addExecutionLog("Information Failed update invited status"); } } else { Log::addExecutionLog("Information Failed update queue status"); } } } else { Log::addExecutionLog("Email url is not match in the database using qId");
$dateTime = $date2 . ' ' . $invitedLocation->getLocationTime2(); echo "send new email v2 set date\n"; } elseif ($invited->getTotalEmailSent_() == 2) { $dateTime = $date3 . ' ' . $invitedLocation->getLocationTime3(); echo "send new email v3 set date\n"; } else { echo "\n else no send new email total sent is greater than 2 and value i" . $invited->getTotalEmailSent_(); } $alert->alert("Date Time Send", $dateTime, " set = " . $dateTime . " \n"); echo "set time zone = " . Time::getTimeZoneDateTime24(); //send email if (Time::getTimeZoneDateTime24() >= $dateTime) { $alert->alert("\nAdd activity log", $invitedActivity->addActivityLog($qId, $action, $database), "set qId = {$qId} , action = {$action}"); echo "\n send email to invited "; if (Email::sendInviteEmail($admin->getAdminEmail_(), '*****@*****.**', "Invited", $qId, $invited->getFirstName())) { echo " email " . $invited->getEmail(); echo "\n send email to admin"; $newTotalSent = $invited->getTotalEmailSent_() + 1; $alert->alert("\nUpdate total send email ", $invited->updateTotalEmailSent($iId, $invited->getTotalEmailSent_() + 1, $database), "set iId = {$iId} and last total email sent " . $invited->getTotalEmailSent_() . " new total email sent " . $newTotalSent); } else { echo "failed to send email " . __LINE__; } } else { echo "<br> \n " . __LINE__ . ". ) time zone = " . Time::getTimeZoneDateTime24() . " is less than with date time db " . $dateTime; } } else { echo "\n email will not received an invite because the totasent email is greater than 2 but " . $invited->getTotalEmailSent_(); echo "\n update queue status to 1"; } // $database->update() echo "\n---------------------------------------------------------------------------------------------------\n<br>";