<?php $temp = explode("-", $message); $Kode = $temp[0]; $NIM = $temp[1]; $nama_temp = Dim::model()->findByAttributes(array('NIM' => $NIM)); $nama_mhs = $nama_temp->NAMA; $kelas_temp = Registrasi::model()->findByAttributes(array('NIM' => $NIM)); $kelas = $kelas_temp->KELAS; $mk = Kurikulum::model()->findByAttributes(array('KODE_MK' => $Kode)); $nama_MK = $mk->NAMA_KUL_IND; $tes = Yii::app()->db->createCommand("SELECT * FROM registrasi reg WHERE NIM = '{$NIM}' GROUP BY SEM DESC LIMIT 1")->queryAll(); // var_dump($tes); //echo $tes[0]["SEM"]; $weektot = Yii::app()->db->createCommand("SELECT COUNT(DISTINCT WEEK) FROM m_jadwal mj JOIN d_jadwal dj ON mj.ID = dj.ID_JADWAL JOIN berita_acara_daftar_hadir badh ON badh.ID_DETAIL_JADWAL = dj.ID WHERE badh.NIM = '{$NIM}' AND dj.KODE_MK = '{$Kode}'")->queryAll(); $weekisi = Yii::app()->db->createCommand("SELECT DISTINCT WEEK FROM m_jadwal mj JOIN d_jadwal dj ON mj.ID = dj.ID_JADWAL JOIN berita_acara_daftar_hadir badh ON badh.ID_DETAIL_JADWAL = dj.ID WHERE badh.NIM = '{$NIM}' AND dj.KODE_MK = '{$Kode}'")->queryAll(); //echo var_dump($weektot)."<br>"; // echo var_dump($weekisi); $listWeek = array(); $listCount = array(); $listCountAbsen = array(); $indWeek = 0; $indCount = 0; $indCountAbsen = 0; foreach ($weekisi as $hitung) { $testtemp = $hitung["WEEK"]; $listWeek[$indWeek] = "Week " . $testtemp; $tempcount = Yii::app()->db->createCommand("SELECT COUNT(*) FROM berita_acara_daftar_hadir badh \n JOIN d_jadwal dj \n ON badh.ID_DETAIL_JADWAL = dj.ID\n JOIN m_jadwal mj\n ON dj.ID_JADWAL = mj.ID\n WHERE NIM = '{$NIM}' AND mj.WEEK = '{$testtemp}' AND dj.KODE_MK = '{$Kode}' AND badh.STATUS = 'H'")->queryAll(); $absencount = Yii::app()->db->createCommand("SELECT COUNT(*) FROM berita_acara_daftar_hadir badh \n JOIN d_jadwal dj \n ON badh.ID_DETAIL_JADWAL = dj.ID\n JOIN m_jadwal mj\n ON dj.ID_JADWAL = mj.ID\n WHERE NIM = '{$NIM}' AND mj.WEEK = '{$testtemp}' AND dj.KODE_MK = '{$Kode}' AND badh.STATUS = 'A'")->queryAll(); //var_dump($tempcount); foreach ($tempcount as $abc) {
/** * @param string id_registrasi * @param string ta * @param int sem_ta * @soap */ public function deleteRegistrasi($ID_Registrasi, $TA, $SEM_TA) { Registrasi::model()->deleteAll("NIM = '" . $ID_Registrasi . "' and TA = '" . $TA . "' and SEM_TA = '" . $SEM_TA . "'"); }
<?php echo $form->datePickerGroup($model, 'TANGGAL', array('widgetOptions' => array('options' => array('showButtonPanel' => true, 'dateFormat' => 'yy-mm-dd', 'todayHighlight' => true, 'todayBtn' => "linked"), 'htmlOptions' => array('class' => 'span5')), 'prepend' => '<i class="glyphicon glyphicon-calendar"></i>', 'append' => 'Pilih Tanggal!')); ?> <?php echo $form->dropDownListGroup($model, 'SESSION', array('wrapperHtmlOptions' => array('class' => 'col-sm-5'), 'widgetOptions' => array('data' => array('-- Pilih Session --', '1', '2', '3', '4', '5', '6', '7', '8'), 'htmlOptions' => array()))); ?> <?php $idkur = CHtml::listData(Registrasi::model()->findAll(array('select' => 't.KELAS', 'condition' => "TA = 2013", 'order' => 'KELAS DESC', 'distinct' => true)), 'KELAS', 'KELAS'); echo $form->dropDownListGroup($model, 'KELAS', array('wrapperHtmlOptions' => array('class' => 'col-sm-5'), 'widgetOptions' => array('data' => $idkur, 'htmlOptions' => array()))); ?> <?php $ta = CHtml::listData(Registrasi::model()->findAll(array('select' => 't.TA', 'order' => 'TA DESC', 'distinct' => true)), 'TA', 'TA'); echo $form->dropDownListGroup($model, 'TA', array('wrapperHtmlOptions' => array('class' => 'col-sm-5'), 'widgetOptions' => array('data' => $ta, 'htmlOptions' => array()))); ?> <?php $idkur = CHtml::listData(Kurikulum::model()->findAll(array('select' => 't.ID_KUR', 'order' => 'ID_KUR DESC', 'distinct' => true)), 'ID_KUR', 'ID_KUR'); echo $form->dropDownListGroup($model, 'ID_KUR', array('wrapperHtmlOptions' => array('class' => 'col-sm-5'), 'widgetOptions' => array('data' => $idkur, 'htmlOptions' => array('prompt' => '--Select ID Kurikulum--')))); ?> <?php $kuliah = CHtml::listData(Kurikulum::model()->findAll(array('condition' => "ID_KUR = 2012")), 'KODE_MK', 'KODE_MK'); echo $form->dropDownListGroup($model, 'KODE_MK', array('wrapperHtmlOptions' => array('class' => 'col-sm-5'), 'widgetOptions' => array('data' => $kuliah, 'htmlOptions' => array('prompt' => '--ID Kurikulum Belum Dipilih--')))); ?> <?php // echo $form->select2Group(
<?php echo $form->dropDownListGroup($model, 'WEEK', array('wrapperHtmlOptions' => array('class' => 'col-sm-5'), 'widgetOptions' => array('data' => array('Pilih Minggu', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15'), 'htmlOptions' => array()))); ?> <?php echo $form->datePickerGroup($model, 'TANGGAL', array('widgetOptions' => array('options' => array(), 'htmlOptions' => array('class' => 'span5')), 'prepend' => '<i class="glyphicon glyphicon-calendar"></i>', 'append' => 'Pilih Tanggal Jadwal.')); ?> <?php $ta = CHtml::listData(Registrasi::model()->findAll(array('select' => 't.TA', 'order' => 'TA DESC', 'distinct' => true)), 'TA', 'TA'); echo $form->dropDownListGroup($model, 'TA', array('wrapperHtmlOptions' => array('class' => 'col-sm-5'), 'widgetOptions' => array('data' => $ta, 'htmlOptions' => array()))); ?> <?php $idkur = CHtml::listData(Registrasi::model()->findAll(array('select' => 't.KELAS', 'condition' => "TA = 2013", 'order' => 'KELAS DESC', 'distinct' => true)), 'KELAS', 'KELAS'); echo $form->dropDownListGroup($model, 'KELAS', array('wrapperHtmlOptions' => array('class' => 'col-sm-5'), 'widgetOptions' => array('data' => $idkur, 'htmlOptions' => array()))); ?> <?php $idkur = CHtml::listData(Kurikulum::model()->findAll(array('select' => 't.ID_KUR', 'order' => 'ID_KUR DESC', 'distinct' => true)), 'ID_KUR', 'ID_KUR'); echo $form->dropDownListGroup($model, 'ID_KUR', array('wrapperHtmlOptions' => array('class' => 'col-sm-5'), 'widgetOptions' => array('data' => $idkur, 'htmlOptions' => array()))); ?> <!--<BR><BR>--> <?php // for ($i = 0; $i < 8; $i++) { ?> <!-- <div class="well"> <fieldset> <legend>Sesi <?php