Example #1
0
    ?>
</td>
                            <td align="center"><?php 
    echo Yii::t('hostel', 'Availability');
    ?>
</td>
                        </tr>
                        <?php 
    if ($list == NULL) {
        echo '<tr><td align="center" colspan="6"><strong>' . Yii::t('hostel', 'No data available') . '</strong></td></tr>';
    } else {
        foreach ($list as $list_1) {
            $allot = Allotment::model()->findAllByAttributes(array('room_no' => $list_1->room_no));
            $room = Room::model()->findByAttributes(array('id' => $list_1->room_no));
            $floor = Floor::model()->findByAttributes(array('id' => $room->floor));
            $hostel = Hosteldetails::model()->findByAttributes(array('id' => $floor->hostel_id));
            ?>
                        <tr>
                            <td align="center">
                                <?php 
            echo $hostel->hostel_name;
            ?>
                            <td align="center">
                                <?php 
            echo $floor->floor_no;
            ?>
                            </td>
                            <td align="center">
                                <?php 
            echo $list_1->room_no . '<br>' . Yii::t('hostel', 'Beds') . '&nbsp;-&nbsp;';
            foreach ($allot as $allot_1) {
Example #2
0
	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php 
echo $form->errorSummary($model);
?>
    <div class="formCon">
<div class="formConInner">
	<table width="60%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><?php 
echo $form->labelEx($model, Yii::t('hostel', 'Hostel Name'));
?>
</td>
    <td>&nbsp; </td>
    <td><?php 
echo $form->dropDownList($model, 'hostel_id', CHtml::listData(Hosteldetails::model()->findAll('is_deleted=:x', array(':x' => '0')), 'id', 'hostel_name'), array('prompt' => 'Select'));
?>
		<?php 
echo $form->error($model, 'hostel_id');
?>
</td>
  </tr>
   <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><?php 
echo $form->labelEx($model, Yii::t('hostel', 'floor_no'));
?>
Example #3
0
$setup_cou = false;
$setup_fee = false;
$setup_tim = false;
$setup_lib = false;
$setup_hos = false;
$setup_tra = false;
$setups = 0;
$exp_stu = Students::model()->findAll();
$exp_emp = Employees::model()->findAll();
$exp_cou = Courses::model()->findAll();
$exp_fee = FinanceFeeCategories::model()->findAll();
$exp_tim = TimetableEntries::model()->findAll();
Yii::app()->getModule('library');
$exp_lib = Book::model()->findAll();
Yii::app()->getModule('hostel');
$exp_hos = Hosteldetails::model()->findAll();
Yii::app()->getModule('transport');
$exp_tra = RouteDetails::model()->findAll();
if (count($exp_stu)) {
    $setup_stu = true;
    $setups++;
}
if (count($exp_emp)) {
    $setup_emp = true;
    $setups++;
}
if (count($exp_cou)) {
    $setup_cou = true;
    $setups++;
}
if (count($exp_fee)) {
Example #4
0
 public function getHostelname()
 {
     $hostel = Hosteldetails::model()->findByAttributes(array('id' => $this->hostel_id, 'is_deleted' => 0));
     return $this->floor_no . ' (' . $hostel->hostel_name . ')';
 }
Example #5
0
	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php 
echo $form->errorSummary($model);
?>
<div class="formCon" >
<div class="formConInner">
<table width="60%" border="0" cellspacing="0" cellpadding="0">
 <tr>
    <td><?php 
echo $form->labelEx($model, Yii::t('hostel', 'Select Hostel'));
?>
</td>
    <td>&nbsp;</td>
    <td><?php 
echo CHtml::dropDownList('hostel', '', CHtml::listData(Hosteldetails::model()->findAll('is_deleted=:x', array(':x' => '0')), 'id', 'hostel_name'), array('prompt' => 'Select', 'ajax' => array('type' => 'POST', 'url' => CController::createUrl('/hostel/room/allot'), 'update' => '#floorid', 'data' => 'js:$(this).serialize()')));
?>
		</td>
  </tr>

  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
   <tr>
    <td><?php 
echo $form->labelEx($model, Yii::t('hostel', 'Select Floor'));
?>
</td>
    <td>&nbsp;</td>
Example #6
0
?>
</h1>
<div class="pdtab_Con">
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
		<tr class="pdtab-h">
        	<td align="center"><?php 
echo Yii::t('hostel', 'Hostel Name');
?>
</td>
            <td align="center"><?php 
echo Yii::t('hostel', 'Address');
?>
</td>
          </tr>
         <?php 
$hostel = Hosteldetails::model()->findByAttributes(array('id' => $model->id));
?>
 
          <tr>
          <td align="center"><?php 
echo $hostel->hostel_name;
?>
</td>
           <td align="center"><?php 
echo $hostel->address;
?>
</td>
          </tr>
		</table>
        </div>
	</div>
 /**
  * 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 = Hosteldetails::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }