?> </div></td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td><?php echo $form->labelEx($model, Yii::t('hostel', 'food_preference')); ?> </td> <td> </td> <td><?php echo $form->dropDownList($model, 'food_preference', CHtml::listData(FoodInfo::model()->findAll(), 'id', 'food_preference'), array('prompt' => 'Select')); ?> <?php //echo $form->error($model,'food_preference'); ?> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td><?php echo $form->labelEx($model, Yii::t('hostel', 'Description')); ?>
" readonly="readonly"></td> <td><input type="text" name="id" value="<?php echo $student_id; ?> " hidden="hidden"></td> </tr> <tr> <td width="100%"> <td width="3%"> <?php echo '<td><strong>' . CHtml::label(Yii::t('hostel', 'Food Preference')) . '</strong></td><td>'; ?> </td> <td> </td> <td><?php echo CHtml::dropDownList('food_preference', '', CHtml::listData(FoodInfo::model()->findAll(), 'id', 'food_preference'), array('prompt' => 'Select', 'id' => 'food_preference')) . '</td>'; ?> </tr> <tr> <td> </td></tr> </table> </div> <div style="padding-left:20px"> <?php echo CHtml::button('Save', array('submit' => array('Registration/Messchange', 'id' => $fid), 'class' => 'formbut')); ?> </div></div> </div> </td> </tr>
?> </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', 'Food Preferance'); ?> </td> <td align="center"><?php echo Yii::t('hostel', 'Amount'); ?> </td> </tr> <?php $food = FoodInfo::model()->findByAttributes(array('id' => $model->id)); ?> <tr> <td align="center"><?php echo $food->food_preference; ?> </td> <td align="center"><?php echo $food->amount; ?> </td> </tr> </table> </div>
<?php $this->renderPartial('/settings/hostel_left'); ?> </td> <td valign="top"> <div class="cont_right"> <h1><?php echo Yii::t('hostel', 'Student Details'); ?> </h1> <?php $allot = Allotment::model()->findByAttributes(array('student_id' => $studentid, 'status' => 'S')); if ($allot != NULL) { $stud = Students::model()->findByAttributes(array('id' => $allot->student_id)); $register = Registration::model()->findByAttributes(array('student_id' => $allot->student_id)); $food = FoodInfo::model()->findByAttributes(array('id' => $register->food_preference)); $mess = MessFee::model()->findByAttributes(array('student_id' => $allot->student_id)); $floor = Floor::model()->findByAttributes(array('id' => $allot->floor)); $hostel = Hosteldetails::model()->findByAttributes(array('id' => $floor->hostel_id)); ?> <div class="pdtab_Con" style="padding:0px;"> <table width="100%" cellpadding="0" cellspacing="0" border="0" > <tr class="pdtab-h"> <td align="center"><?php echo Yii::t('hostel', 'Student Name'); ?> </td> <td align="center"><?php echo Yii::t('hostel', 'Hostel'); ?> </td>
/** * 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 = FoodInfo::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }
<tr> <td colspan="4"> </td> </tr> <tr> <td> <?php echo '<td><strong>' . CHtml::label(Yii::t('hostel', 'Food Preference')) . '</strong></td><td>'; ?> </td> <td> </td> <td><?php echo CHtml::dropDownList('food_preference', '', CHtml::listData(FoodInfo::model()->findAll(), 'id', 'food_preference'), array('prompt' => $food_preference, 'id' => 'food_preference', 'style' => 'width:146px')) . '</td>'; ?> </td> <td></td> </tr> </table> </div> <div style="padding:0 0 10px 20px"> <?php echo CHtml::button(Yii::t('hostel', 'Save'), array('submit' => array('Registration/Messchange', 'id' => $rid), 'class' => 'formbut')); ?> </div></div> </div> </td> </tr>
<td valign="top"> <div class="cont_right"> <h1><?php echo Yii::t('hostel', 'Manage Mess Details'); ?> </h1> <div class="edit_bttns" style="top:20px; right:20px;"> <ul> <li> <?php echo CHtml::link('<span>' . Yii::t('hostel', 'Enter Mess Details') . '</span>', array('/hostel/foodInfo/create'), array('class' => 'addbttn last ')); ?> </li> </ul> </div> <?php $hst = FoodInfo::model()->findAll('is_deleted=:x', array(':x' => 0)); ?> <div class="pdtab_Con"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr class="pdtab-h"> <td align="center"><?php echo Yii::t('hostel', 'Preference'); ?> </td> <td align="center"><?php echo Yii::t('hostel', 'Amount'); ?> </td> <td align="center"><?php echo Yii::t('hostel', 'Action'); ?>