Esempio n. 1
0
 public function IsASpeaker($SpeakerID)
 {
     if (is_numeric($SpeakerID)) {
         $Speaker = SchedSpeaker::get()->byID($SpeakerID);
         // Check to see if the speaker is listed on this event
         if ($Speaker && $Speaker->name && strpos($this->Speakers, $Speaker->name) !== FALSE) {
             return TRUE;
         }
     }
 }
Esempio n. 2
0
 function EmailSpeakers()
 {
     $getVars = $this->request->getVars();
     $Speakers = SchedSpeaker::get();
     foreach ($Speakers as $Speaker) {
         if ($Speaker->PresentationsForThisSpeaker() && !$Speaker->GeneralOrKeynote() && !SchedSpeakerEmailLog::BeenEmailed($Speaker->email) && $this->validEmail($Speaker->email)) {
             $To = $Speaker->email;
             $Subject = "Important Speaker Information for OpenStack Summit in Paris";
             $email = EmailFactory::getInstance()->buildEmail(SCHED_TOOLS_EMAIL_FROM, $To, $Subject);
             $email->setTemplate("UploadPresentationSlidesEmail");
             $email->populateTemplate($Speaker);
             if (isset($getVars['confirm'])) {
                 SchedSpeakerEmailLog::addSpeaker($Speaker->email);
                 $email->send();
             } else {
                 echo $email->debug();
             }
             echo 'Email sent to ' . $Speaker->email . '<br/>';
         }
     }
 }
 public function IsASpeaker($SpeakerID)
 {
     if (is_numeric($SpeakerID)) {
         $Speaker = SchedSpeaker::get()->byID($SpeakerID);
         // Check to see if the speaker is listed on this event
         if ($Speaker && $Speaker->name && VideoPresentation::get()->filter('speakers:PartialMatch', $this->name)->filter('ID', $this->ID)->count()) {
             return TRUE;
         }
     }
 }