Пример #1
0
 /**
  * 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 = Ruangan::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Пример #2
0
 /**
  * @param string id_ruangan
  * @soap
  */
 public function deleteRuangan($ID_Ruangan)
 {
     Ruangan::model()->deleteAll("ID = '" . $ID_Ruangan . "'");
 }
Пример #3
0
<p class="help-block">Fields with <span class="required">*</span> are required.</p>

<?php 
echo $form->errorSummary($model);
?>

<?php 
echo $form->textFieldGroup($model, 'SESSION', array('widgetOptions' => array('htmlOptions' => array('class' => 'span5'))));
?>

<?php 
echo $form->textFieldGroup($model, 'KODE_MK', array('widgetOptions' => array('htmlOptions' => array('class' => 'span5', 'maxlength' => 8))));
?>

<?php 
$data = CHtml::listData(Ruangan::model()->findAll(), 'ID', 'SHORT_NAME');
echo $form->dropDownListGroup($model, 'RUANGAN', array('widgetOptions' => array('data' => $data, 'htmlOptions' => array('class' => 'input-large'))));
// echo $form->textFieldGroup($model, 'RUANGAN', array('widgetOptions' => array('htmlOptions' => array('class' => 'span5', 'maxlength' => 20))));
?>

<?php 
// echo $form->textFieldGroup($model, 'TOPIK', array('widgetOptions' => array('htmlOptions' => array('class' => 'span5', 'maxlength' => 255))));
?>

<?php 
// echo $form->textAreaGroup($model, 'SUB_TOPIK', array('widgetOptions' => array('htmlOptions' => array('rows' => 6, 'cols' => 50, 'class' => 'span8'))));
?>

<?php 
// echo $form->textAreaGroup($model, 'OBJEKTIF', array('widgetOptions' => array('htmlOptions' => array('rows' => 6, 'cols' => 50, 'class' => 'span8'))));
?>
Пример #4
0
<?php

$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array('id' => 'jadwal-form', 'enableAjaxValidation' => false, 'htmlOptions' => array('class' => 'well'), 'type' => 'horizontal'));
?>

	<p class="help-block">Fields with <span class="required">*</span> are required.</p>

	<?php 
echo $form->errorSummary($model);
?>

	<?php 
$ruang = CHtml::listData(Ruangan::model()->findAll(array('order' => 'namaruang ASC', 'distinct' => true)), 'idruang', 'namaruang');
?>

	<?php 
echo $form->dropDownListRow($model, 'idruang', $ruang, array('empty' => '- PILIH RUANG -', 'id' => 'idruang'));
?>
	
	<?php 
echo $form->textFieldRow($model, 'idwaktu', array('hint' => 'Silahkan klik tombol <a href="#" onclick=$("#twaktu").dialog("open");
	return false; class="btn submit">+</a> untuk melihat daftar waktu.'));
?>
		
	<?php 
echo $form->dropDownListRow($model, 'kode_guru', CHtml::listData(Guru::model()->findAll(), 'kode_guru', 'nama_guru'), array('empty' => '- PILIH GURU -'));
?>
	
	<?php 
echo $form->textFieldRow($model, 'kode_mapel', array('hint' => 'Silahkan klik tombol <a href="#" onclick=$("#tmapel").dialog("open");
	return false; class="btn submit">+</a> untuk melihat daftar mapel.'));