public function actionReport($idRapat)
 {
     // is current user has the required privilege ?
     if (!Yii::app()->user->checkAccess('pdf_report')) {
         throw new CHttpException(403, 'You are not authorized to perform this action.');
     }
     $rapat = Rapat::model()->findByPk($idRapat);
     $agendaRapats = $this->getAgendaRapat($idRapat);
     $agendaRapats = $this->getTempAgendas($agendaRapats);
     $daftarAbsen = $this->getAbsenAnggota($idRapat);
     $this->renderPartial('report', array('rapat' => $rapat, 'agendas' => $agendaRapats, 'daftarAbsen' => $daftarAbsen));
 }
Beispiel #2
0
 /**
  * Send meeting reminder.
  */
 public function actionSendMeetingReminder($idRapat)
 {
     // is current user has the required privilege ?
     if (!Yii::app()->user->checkAccess('mail_meetingReminder')) {
         throw new CHttpException(403, 'You are not authorized to perform this action.');
     }
     $rapat = Rapat::model()->findByPk($idRapat);
     $agendaRapats = $this->getAgendaRapat($idRapat);
     $agendaRapats = $this->getAgendas($agendaRapats);
     $subject = '[Reminder] Rapat' . $rapat->waktu_tanggal;
     $content = $rapat->waktu_tanggal . ', ' . $rapat->tempat . '<br/>';
     $content .= 'Chairperson : ' . $rapat->chairperson0->nama . '<br/>';
     $content .= 'Notulen : ' . $rapat->notulen0->nama . '<br/>';
     $content .= 'Agenda yang akan dibahas : <br/>';
     $i = 1;
     foreach ($agendaRapats as $agendaRapat) {
         $content .= '(' . $i . ') ' . $agendaRapat->topik . '<br/>';
         $i++;
     }
     $members = Member::model()->findAll();
     foreach ($members as $member) {
         while ($this->sendEmail($member->email, $subject, $content) == false) {
             $this->sendEmail($member->email, $subject, $content);
         }
     }
     return true;
 }
Beispiel #3
0
 /**
  * Loads data about a certain meeting.
  */
 public function loadMeeting($date = '2014-04-18')
 {
     $meeting = Rapat::model()->findByAttributes(array('waktu_tanggal' => $date));
     return $meeting;
 }
Beispiel #4
0
 public function actionMeetingEnded($idRapat)
 {
     // is current user has the required privilege ?
     if (!Yii::app()->user->checkAccess('site_endMeeting')) {
         throw new CHttpException(403, 'You are not authorized to perform this action.');
     }
     $rapat = Rapat::model()->findByPk($idRapat);
     $agendaRapats = $this->getAgendaRapat($idRapat);
     $agendaRapats = $this->getTempAgendas($agendaRapats);
     $daftarAbsen = AbsenAnggota::model()->findAllByAttributes(array('id_rapat' => $idRapat));
     $this->render('meetingEnded', array('rapat' => $rapat, 'agendas' => $agendaRapats, 'daftarAbsen' => $daftarAbsen));
 }