Baru

parent 6705458d
...@@ -7,9 +7,12 @@ ...@@ -7,9 +7,12 @@
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/controllers/SiteController.php</file> <file>file:/C:/xampp/htdocs/Test/smartcard/protected/controllers/SiteController.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/controllers/JadwalController.php</file> <file>file:/C:/xampp/htdocs/Test/smartcard/protected/controllers/JadwalController.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/site/login.php</file> <file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/site/login.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/mJadwal/index.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraDaftarHadir/LaporanBeritaAcaraKuliah.php</file> <file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraDaftarHadir/LaporanBeritaAcaraKuliah.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/models/Excel.php</file> <file>file:/C:/xampp/htdocs/Test/smartcard/protected/models/Excel.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraDaftarHadir/searchBeritaAcaraDaftarHadir.php</file> <file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraDaftarHadir/searchBeritaAcaraDaftarHadir.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/beritaAcaraDaftarHadir/SearcHDaftarHadir.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/dJadwal/index.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/site/upload.php</file> <file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/site/upload.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/site/excelpath.php</file> <file>file:/C:/xampp/htdocs/Test/smartcard/protected/views/site/excelpath.php</file>
<file>file:/C:/xampp/htdocs/Test/smartcard/protected/controllers/DJadwalController.php</file> <file>file:/C:/xampp/htdocs/Test/smartcard/protected/controllers/DJadwalController.php</file>
......
...@@ -275,50 +275,54 @@ class BeritaAcaraDaftarHadirController extends Controller { ...@@ -275,50 +275,54 @@ class BeritaAcaraDaftarHadirController extends Controller {
} }
} }
public function actionValidate(/* $rfid, $nim ,$datetime*/) { public function actionValidate($rfid, $nim, $datetime) {
// $tanggal = date('Y-m-d H:m:s'); $temp = explode(" ", $datetime);
// echo $tanggal->format('Y-m-d'); $tanggal = $temp[0];
// $waktu = $temp[1];
$dt = new DateTime();
echo $dt->format('Y-m-d H:i:s');
// $waktu = date('H:i:s'); $sql = "SELECT * FROM m_jadwal mj INNER JOIN d_jadwal dj ON mj.`ID`=dj.`ID_JADWAL`
// $sql = "SELECT * FROM jadwal WHERE ((RUANGAN='$rfid' AND TANGGAL ='$tanggal') AND ('$waktu' BETWEEN jadwal.`START_TIME` AND jadwal.`END_TIME`)) WHERE ((dj.RUANGAN='$rfid' AND mj.TANGGAL ='$tanggal')
//AND KELAS IN (SELECT KELAS FROM registrasi WHERE registrasi.`NIM`='$nim' ORDER BY SEM DESC)"; AND ('$waktu' BETWEEN (SUBTIME(dj.`START_TIME`,'0:15:00')) AND (ADDTIME(dj.`END_TIME`,'0:15:00')))
// AND mj.KELAS IN (SELECT KELAS FROM registrasi WHERE registrasi.`NIM`='$nim' ORDER BY SEM DESC))";
// $list = Yii::app()->db->createCommand($sql)->queryAll();
// if ($list) { $list = Yii::app()->db->createCommand($sql)->queryAll();
// $kehadiran = BeritaAcaraDaftarHadir::model()->findByAttributes( if ($list) {
// array( foreach ($list as $l) {
// 'WEEK' => $list[0]['WEEK'], $kehadiran = BeritaAcaraDaftarHadir::model()->findByAttributes(
// 'TANGGAL' => $list[0]['TANGGAL'], array(
// 'SESSION' => $list[0]['SESSION'], 'ID_DETAIL_JADWAL' => $l['ID'],
// 'START_TIME' => $list[0]['START_TIME'], 'NIM' => $nim,
// 'END_TIME' => $list[0]['END_TIME'], )
// 'KODE_MK' => $list[0]['KODE_MK'], );
// 'NIM' => $nim,
// ) if ($this->cekKehadiran($kehadiran->STATUS)) {
// ); $kehadiran->STATUS = 'H';
// $kehadiran->WAKTU_ABSEN = $waktu;
// if ($this->cekKehadiran($kehadiran->STATUS)) { $kehadiran->save();
// $kehadiran->STATUS = 'H'; echo "Berhasil";
// $kehadiran->WAKTU_ABSEN = $waktu; } else {
// $kehadiran->save(); echo "Sudah Ter Absen" . "<BR>";
// echo "Berhasil"; }
// } else { }
// echo "Gagal"; } else {
// } // var_dump($list);
// // $this->render('admin', array(
//// $this->render('index', array( // 'model' => $model,
//// 'dataProvider' => $dataProvider, // ));
//// )); echo "Gagal";
// } else { }
//// var_dump($list);
//// $this->render('admin', array(
//// 'model' => $model,
//// )); // $this->render('index', array(
// echo "Gagal"; // 'dataProvider' => $dataProvider,
// } // ));
}
protected function cekKehadiran($status) {
return ($status == 'A' ? true : false);
} }
} }
...@@ -38,10 +38,16 @@ $this->widget('booster.widgets.TbGridView', array( ...@@ -38,10 +38,16 @@ $this->widget('booster.widgets.TbGridView', array(
'header' => 'Minggu', 'header' => 'Minggu',
'name' => 'WEEK', 'name' => 'WEEK',
'value' => '$data->WEEK', 'value' => '$data->WEEK',
'htmlOptions' => array(
'width' => '20', // menentukan ukuran column
),
), ),
array( array(
'header' => 'Tanggal', 'header' => 'Tanggal',
'name' => 'TANGGAL', 'name' => 'TANGGAL',
'htmlOptions' => array(
'width' => '100', // menentukan ukuran column
),
'filter' => $this->widget('zii.widgets.jui.CJuiDatePicker', array( 'filter' => $this->widget('zii.widgets.jui.CJuiDatePicker', array(
'model' => $model, 'model' => $model,
'attribute' => 'TANGGAL', 'attribute' => 'TANGGAL',
...@@ -65,16 +71,25 @@ $this->widget('booster.widgets.TbGridView', array( ...@@ -65,16 +71,25 @@ $this->widget('booster.widgets.TbGridView', array(
array( array(
'header' => 'Kelas', 'header' => 'Kelas',
'name' => 'KELAS', 'name' => 'KELAS',
'htmlOptions' => array(
'width' => '100', // menentukan ukuran column
),
'value' => '$data->KELAS', 'value' => '$data->KELAS',
), ),
array( array(
'header' => 'Tahun Ajaran', 'header' => 'Tahun Ajaran',
'name' => 'TA', 'name' => 'TA',
'htmlOptions' => array(
'width' => '100', // menentukan ukuran column
),
'value' => '$data->TA', 'value' => '$data->TA',
), ),
array( array(
'header' => 'Kurikulum', 'header' => 'Kurikulum',
'name' => 'ID_KUR', 'name' => 'ID_KUR',
'htmlOptions' => array(
'width' => '100', // menentukan ukuran column
),
'value' => '$data->ID_KUR', 'value' => '$data->ID_KUR',
), ),
array( array(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment