<?php

$kelas = "41B";
$mata_kuliah = "IF411111";
$model = BeritaAcaraDaftarHadir::model()->findAllByAttributes(array('TANGGAL' => $message, 'KODE_MK' => $mata_kuliah));
$model2 = Jadwal::model()->findAllByAttributes(array('TANGGAL' => $message, 'KODE_MK' => $mata_kuliah));
$model3 = BeritaAcaraDaftarHadir::model()->findAllByAttributes(array('TANGGAL' => $message, 'KODE_MK' => $mata_kuliah));
$mkul = Kurikulum::model()->findByAttributes(array('KODE_MK' => $mata_kuliah));
$dosen = Pengajar::model()->findByAttributes(array('KODE_MK' => $mata_kuliah));
$criteriaDataIb = new CDbCriteria();
$criteriaDataIb->condition = 'KODE_MK = :kodemk';
$criteriaDataIb->order = 'ID DESC';
$criteriaDataIb->limit = 1;
$criteriaDataIb->params = array('kodemk' => $mata_kuliah);
$tajaran = Jadwal::model()->find($criteriaDataIb);
$imagePath = Yii::getPathOfAlias('application.icons');
$baseUrl = Yii::app()->assetManager->publish($imagePath);
?>
<table>
    <tr>
        <td>
            Institut Teknologi Del <br/>
            Jl. Sisingamangaraja, Sitoluama, Laguboti <br/>
            Toba Samosir, Sumatera Utara 22381 <br/>
            Telp. 0632-331234
        </td>
        <td></td>
    </tr>
    <tr>
        <td>
            <h4><b>Daftar Hadir Mahasiswa Semester 1 T.A 2013/2014</b></h4>
Example #2
0
	<?php 
$idwaktu = CHtml::listData(Jadwal::model()->findAll(array('order' => 'idwaktu ASC', 'select' => 'idwaktu', 'distinct' => true)), 'idwaktu', 'idwaktu');
?>
	<?php 
echo $form->dropDownListRow($model, 'idwaktu', $idwaktu, array('class' => 'span5', 'empty' => '-- Pilih Waktu --', 'rel' => 'tooltip', 'data-placement' => 'right', 'title' => 'Langkah 1 Pilih Waktu'));
?>
	
	<?php 
$kode_guru = CHtml::listData(Jadwal::model()->findAll(array('order' => 'kode_guru ASC', 'select' => 'kode_guru', 'distinct' => true)), 'kode_guru', 'kode_guru');
?>
	<?php 
echo $form->dropDownListRow($model, 'kode_guru', $kode_guru, array('class' => 'span5', 'empty' => '-- Pilih Kode Guru --', 'rel' => 'tooltip', 'data-placement' => 'right', 'title' => 'Langkah 1 Pilih kode guru'));
?>
	
	<?php 
$kode_mapel = CHtml::listData(Jadwal::model()->findAll(array('order' => 'kode_mapel ASC', 'select' => 'kode_mapel', 'distinct' => true)), 'kode_mapel', 'kode_mapel');
?>
	<?php 
echo $form->dropDownListRow($model, 'kode_mapel', $kode_mapel, array('class' => 'span5', 'empty' => '-- Pilih Kode Mapel --', 'rel' => 'tooltip', 'data-placement' => 'right', 'title' => 'Langkah 1 Pilih kode mata pelajaran'));
?>
	
	<?php 
$th_ajar = CHtml::listData(SemesterAktif::model()->findAll(array('order' => 'th_ajar ASC', 'select' => 'th_ajar', 'distinct' => true)), 'th_ajar', 'th_ajar');
?>
	<?php 
echo $form->dropDownListRow($model, 'th_ajar', $th_ajar, array('class' => 'span5', 'empty' => '-- Pilih Tahun --', 'rel' => 'tooltip', 'data-placement' => 'right', 'title' => 'Langkah 1 Pilih tahun'));
?>

	<?php 
$smt = CHtml::listData(SemesterAktif::model()->findAll(array('order' => 'semester ASC', 'select' => 'semester', 'distinct' => true)), 'semester', 'semester');
?>
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer the ID of the model to be loaded
  */
 public function loadModel($id)
 {
     $model = Jadwal::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
</TD>
<TD ALIGN="CENTER"><CENTER>
    <?php 
//echo $form->textFieldGroup($model,'ID_KUR',array('widgetOptions'=>array('htmlOptions'=>array('class'=>'span5'))));
?>

    <?php 
$data = CHtml::listData(Jadwal::model()->findAll(), 'KODE_MK', 'KODE_MK');
echo $form->dropDownListGroup($model, 'KODE_MK', array('wrapperHtmlOptions' => array('class' => 'col-sm-5'), 'widgetOptions' => array('data' => $data, 'htmlOptions' => array())));
?>

</CENTER>
</TD>
<TD ALIGN="CENTER"><CENTER>
    <?php 
$data = CHtml::listData(Jadwal::model()->findAll(), 'KELAS', 'KELAS');
echo $form->dropDownListGroup($model, 'KELAS', array('wrapperHtmlOptions' => array('class' => 'col-sm-5'), 'widgetOptions' => array('data' => $data, 'htmlOptions' => array())));
?>
    <CENTER>
        </TD>
        </TR>
        <TR >
            <TD ALIGN="CENTER" COLSPAN="4" ><CENTER>
            <div class="form-actions">
                <?php 
$this->widget('booster.widgets.TbButton', array('buttonType' => 'submit', 'context' => 'primary', 'label' => $model->isNewRecord ? 'Search' : 'Save'));
?>
            </div>
        </CENTER>
        <TD>
            </TR>
Example #5
0
	
	<?php 
    $bulan = date('m');
    if ($bulan < 7) {
        $smt = 2;
        //jika th 2(1-6) maka tahun-1/tahun-2 2012/2013
        $th_ajar = date('Y') - 1 . '/' . date('Y');
    } elseif ($bulan < 13 && $bulan > 6) {
        $smt = 1;
        //jika th 1(7-12) maka tahun/tahun+1 2012/2013
        $th_ajar = date('Y') . '/' . (date('Y') + 1);
    }
    ?>
	
	<?php 
    $jadwal = Jadwal::model()->findAll(array('condition' => "kode_guru='" . Yii::app()->user->id . "'"));
    foreach ($jadwal as $pg => $pgi) {
        ?>
	<pre>
	<?php 
        echo "Nama\t\t: " . $pgi->kodeGuru->nama_guru . " (" . $pgi->kode_guru . ")" . $form->hiddenField($model, "kode_guru", array('value' => $pgi['kode_guru']));
        ?>
				<?php 
        echo "Semester\t: " . $smt;
        ?>

	<?php 
        echo "Mata Pelajaran\t: " . $pgi->kodeMapel->kodeMapel->mapel . " (" . $pgi['kode_mapel'] . ")" . $form->hiddenField($model, "kode_mapel", array('value' => $pgi['kode_mapel']));
        ?>
				<?php 
        echo "Tahun Ajar\t: " . $th_ajar;
Example #6
0
    ?>
	<?php 
    ?>

	<?php 
    ?>
	
	<?php 
    $kode_mapel = Yii::app()->db->createCommand("select kode_mapel from jadwal where kode_guru='" . Yii::app()->user->id . "';")->queryScalar();
    ?>
	<?php 
    echo $form->hiddenField($model, 'kode_mapel', array('class' => 'span5', 'maxlength' => 6, 'value' => $kode_mapel));
    ?>

	<?php 
    $kelasArray = CHtml::listData(Jadwal::model()->findAll(array('order' => 'kelas ASC', 'condition' => "kode_guru='" . Yii::app()->user->id . "'", 'distinct' => true)), 'kelas', 'kelas');
    ?>
	
	<?php 
    echo $form->hiddenField($model, 'kelas', array('class' => 'span5', 'maxlength' => 1));
    ?>

	<?php 
    echo $form->hiddenField($model, 'lokal', array('class' => 'span5', 'maxlength' => 1));
    ?>

	<?php 
    echo $form->hiddenField($model, 'kode_guru', array('class' => 'span5', 'maxlength' => 2, 'value' => Yii::app()->user->id));
    ?>

	<?php 
Example #7
0
    ?>
		
		<?php 
    $this->widget('bootstrap.widgets.TbButton', array('buttonType' => 'reset', 'label' => 'Ulangi', 'icon' => 'icon-refresh icon-white', 'type' => 'danger'));
    ?>
		
		<?php 
    $this->widget('bootstrap.widgets.TbButton', array('type' => 'danger', 'icon' => 'icon-share-alt icon-white', 'label' => 'Kembali', 'url' => array('index')));
    ?>
	</div>

<?php 
    $this->endWidget();
    ?>
<!-- Menampilkan dialog/popup ketika button di atas di klik -->
<?php 
    $this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'mydialog', 'options' => array('title' => 'Klik tanda <code>+</code> untuk memilih jam mengajar!', 'autoOpen' => true, 'modal' => true, 'show' => array('effect' => 'blind', 'duration' => 1000), 'hide' => array('effect' => 'explode', 'duration' => 500), 'width' => 640, 'height' => 480)));
    $this->widget('bootstrap.widgets.TbGridView', array('id' => 'penempatan-grid', 'dataProvider' => Jadwal::model()->idwaktujurnal(), 'type' => 'striped bordered condensed', 'columns' => array('idwaktu', 'kodeGuru.nama_guru', 'kelas', 'lokal', array('header' => '', 'type' => 'raw', 'value' => 'CHtml::Button(
		        "+"
		        , array(
				"class" => "btn submit"
		        , "id" => "get_link"
		        , "onClick" => "$(\\"#mydialog\\").dialog(\\"close\\");$(\\"#Jurnal_idwaktu \\").val(\\"". $data->idwaktu."\\");
				$(\\"#Jurnal_kode_mapel \\").val(\\"". $data->kode_mapel."\\");
				$(\\"#Jurnal_kelas \\").val(\\"". $data->kelas."\\");
				$(\\"#Jurnal_lokal \\").val(\\"". $data->lokal."\\");
				$(\\"#Jurnal_idruang \\").val(\\"". $data->idruang."\\");
				$(\\"#Jurnal_kurikulum \\").val(\\"". $data->kurikulum."\\");
				"))'))));
    $this->endWidget('zii.widgets.jui.CJuiDialog');
}
Example #8
0
<!-- Menampilkan dialog/popup ketika button di atas di klik -->
<?php 
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'mydialog', 'options' => array('title' => 'Klik tanda <code>+</code> untuk input data siswa', 'autoOpen' => false, 'modal' => true, 'show' => array('effect' => 'blind', 'duration' => 1000), 'hide' => array('effect' => 'explode', 'duration' => 500), 'width' => 640, 'height' => 480)));
?>

<?php 
//echo $this->renderPartial('_caridialog', array('model2'=>$model2,'model'=>$model));
?>

<?php 
$this->widget('bootstrap.widgets.TbGridView', array('id' => 'penempatan-grid', 'dataProvider' => $model2->search(), 'type' => 'striped bordered condensed', 'filter' => $model2, 'columns' => array(array('name' => 'kelas', 'type' => 'raw', 'value' => '$data->kelas', 'filter' => CHtml::listData(Jadwal::model()->findAll(array('condition' => "kode_guru='" . Yii::app()->user->id . "'", 'order' => 'kelas ASC', 'select' => 'kelas', 'distinct' => true)), 'kelas', 'kelas')), array('name' => 'lokal', 'type' => 'raw', 'value' => '$data->lokal', 'filter' => CHtml::listData(Jadwal::model()->findAll(array('condition' => "kode_guru='" . Yii::app()->user->id . "'", 'order' => 'lokal ASC', 'select' => 'lokal', 'distinct' => true)), 'lokal', 'lokal')), 'nis', 'nis0.nama_lengkap', array('header' => '', 'type' => 'raw', 'value' => 'CHtml::Button(
		        "+"
		        , array(
				"class" => "btn submit"
		        , "id" => "get_link"
		        , "onClick" => "$(\\"#mydialog\\").dialog(\\"close\\");$(\\"#Nilai_nis \\").val(\\"". $data->nis."\\");
				$(\\"#Nilai_kelas \\").val(\\"". $data->kelas."\\");
				$(\\"#Nilai_lokal \\").val(\\"". $data->lokal."\\");"))'))));
$this->endWidget('zii.widgets.jui.CJuiDialog');
Example #9
0
<?php

$kode_guru = User::model()->findAll(array('select' => 'kode_guru', 'condition' => "id='" . Yii::app()->user->id . "'"));
foreach ($kode_guru as $kg) {
    $jadwal = Jadwal::model()->findAll(array('condition' => "kode_guru='" . $kg['kode_guru'] . "'"));
    foreach ($jadwal as $pg => $pgi) {
        $box = $this->beginWidget('bootstrap.widgets.TbBox', array('title' => "Kelas " . $pgi['kelas'] . $pgi['lokal'] . " (" . $pgi['th_ajar'] . "/" . $pgi['semester'] . ")", 'headerIcon' => 'icon-th-list', 'htmlOptions' => array('class' => 'bootstrap-widget-table')));
        $form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array('id' => 'nilai-form', 'enableAjaxValidation' => false, 'type' => 'inline', 'htmlOptions' => array('class' => 'well')));
        ?>

			<div class="well"><h5>
			<?php 
        echo "Kode Mapel: " . $pgi['kode_mapel'] . $form->hiddenField($model, "kode_mapel", array('value' => $pgi['kode_mapel']));
        ?>
			<?php 
        echo "| Nama: " . Yii::app()->user->name . " (" . $pgi['kode_mapel'] . ")" . $form->hiddenField($model, "kode_guru", array('value' => $pgi['kode_guru']));
        ?>
			</h5></div>
	<?php 
        echo $form->errorSummary($model);
        ?>
	<hr>
	<p class="help-block">Fields with <span class="required">*</span> are required.</p>
	<table class="table table-bordered">
		<thead>
		<tr>
			<th>nis</th>
			<th>NAMA</th>
			<th>NILAI AKHIR</th>
			<th>UJIAN NASIONAL</th>
			<th>UJIAN SEKOLAH</th>
Example #10
0
<?php

$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array('action' => Yii::app()->createUrl($this->route), 'method' => 'get'));
?>

	<?php 
$kelas = CHtml::listData(Jadwal::model()->findAll(array('condition' => "kode_guru='" . Yii::app()->user->id . "'", 'order' => 'kelas ASC', 'select' => 'kelas', 'distinct' => true)), 'kelas', 'kelas');
?>
	<?php 
echo $form->dropDownListRow($model2, 'kelas', $kelas, array('class' => 'span5', 'empty' => '-- Pilih Kelas --'));
?>
	
	<?php 
$lokal = CHtml::listData(Jadwal::model()->findAll(array('condition' => "kode_guru='" . Yii::app()->user->id . "'", 'order' => 'lokal ASC', 'select' => 'lokal', 'distinct' => true)), 'lokal', 'lokal');
?>
	<?php 
echo $form->dropDownListRow($model2, 'lokal', $lokal, array('class' => 'span5', 'empty' => '-- Pilih Lokal --'));
?>
	
	<?php 
//echo $form->textFieldRow($model,'nis',array('class'=>'span5'));
?>

	<?php 
//echo $form->textFieldRow($model,'kelas',array('class'=>'span5'));
?>

	<?php 
//echo $form->textFieldRow($model,'lokal',array('class'=>'span5','maxlength'=>1));
?>