<?php

$EmployeeInfo = EmployeeInfo::model()->findByPk($employee_transaction[0]->employee_transaction_employee_id);
if ($employee_transaction[0]->employee_transaction_category_id != null) {
    $Category = Category::model()->findByPk($employee_transaction[0]->employee_transaction_category_id);
} else {
    $Category = new Category();
}
if ($employee_transaction[0]->employee_transaction_religion_id != null) {
    $Religion = Religion::model()->findByPk($employee_transaction[0]->employee_transaction_religion_id);
} else {
    $Religion = new Religion();
}
$Shift = Shift::model()->findByPk($employee_transaction[0]->employee_transaction_shift_id);
$EmployeeDesignation = EmployeeDesignation::model()->findByPk($employee_transaction[0]->employee_transaction_designation_id);
if ($employee_transaction[0]->employee_transaction_nationality_id != null) {
    $Nationality = Nationality::model()->findByPk($employee_transaction[0]->employee_transaction_nationality_id);
} else {
    $Nationality = new Nationality();
}
$Department = Department::model()->findByPk($employee_transaction[0]->employee_transaction_department_id);
if ($employee_transaction[0]->employee_transaction_languages_known_id != null) {
    $LanguagesKnown = LanguagesKnown::model()->findByPk($employee_transaction[0]->employee_transaction_languages_known_id);
}
$Organization = Organization::model()->findByPk($employee_transaction[0]->employee_transaction_organization_id);
if ($employee_transaction[0]->employee_transaction_emp_address_id != null) {
    $EmployeeAddress = EmployeeAddress::model()->findByPk($employee_transaction[0]->employee_transaction_emp_address_id);
} else {
    $EmployeeAddress = new EmployeeAddress();
}
?>
 /**
  * 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 = Religion::model()->findByPk((int) $id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
    $Category = Category::model()->findByPk($student_transaction[0]->student_transaction_category_id);
} else {
    $Category = new Category();
}
if ($student_transaction[0]->student_transaction_category_id != null) {
    $Nationality = Nationality::model()->findByPk($student_transaction[0]->student_transaction_nationality_id);
} else {
    $Nationality = new Nationality();
}
if ($student_transaction[0]->student_transaction_quota_id != null) {
    $Quota = Quota::model()->findByPk($student_transaction[0]->student_transaction_quota_id);
} else {
    $Quota = new Quota();
}
if ($student_transaction[0]->student_transaction_religion_id != null) {
    $Religion = Religion::model()->findByPk($student_transaction[0]->student_transaction_religion_id);
} else {
    $Religion = new Religion();
}
$Branch = Branch::model()->findByPk($student_transaction[0]->student_transaction_branch_id);
$Shift = Shift::model()->findByPk($student_transaction[0]->student_transaction_shift_id);
$Division = Division::model()->findByPk($student_transaction[0]->student_transaction_division_id);
$Batch = Batch::model()->findByPk($student_transaction[0]->student_transaction_batch_id);
$Organization = Organization::model()->findByPk($student_transaction[0]->student_transaction_organization_id);
if ($student_transaction[0]->student_transaction_languages_known_id != null) {
    $LanguagesKnown = LanguagesKnown::model()->findByPk($student_transaction[0]->student_transaction_languages_known_id);
} else {
    $LanguagesKnown = new $LanguagesKnown();
}
if ($student_transaction[0]->student_transaction_languages_known_id != null) {
    $StudentAddress = StudentAddress::model()->findByPk($student_transaction[0]->student_transaction_student_address_id);
<div class = "row_all_a">
	<div class="row_t_v">
		<?php 
echo '<lable><b>Religion :</b></lable>';
?>
		<div class="rowm">

	<?php 
//echo ($model->student_transaction_religion_id != null ? $model->Rel_Religion->religion_name : 'NA');
?>
	<?php 
$religionid = StudentTransaction::model()->findByPk($model->student_archive_stud_tran_id)->student_transaction_religion_id;
?>
	<?php 
echo Religion::model()->findByPk($religionid)->religion_name;
?>
		
		</div>
	</div>

	<div class="row_t_v">
		<?php 
echo '<lable><b>Branch :</b></lable>';
?>
		<div class="rowm">
			<?php 
//echo $model->Rel_Branch->branch_name .'<br>';
?>
			<?php 
$branchid = StudentTransaction::model()->findByPk($model->student_archive_stud_tran_id)->student_transaction_branch_id;
Ejemplo n.º 5
0
?>
          <?php 
echo $form->error($model, 'birthdate');
?>
        </div>
		</td>
		<td>
        <div class="row">
          <?php 
echo $form->labelEx($model, 'religionid');
?>
          <?php 
echo $form->hiddenField($model, 'religionid');
?>
          <input type="text" name="religion_name" id="religion_name" style="width:75%" readonly value="<?php 
echo Religion::model()->findByPk($model->religionid) !== null ? Religion::model()->findByPk($model->religionid)->religionname : '';
?>
">
          <?php 
$this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'religion_dialog', 'options' => array('title' => Yii::t('app', 'Religion'), 'width' => 'auto', 'autoOpen' => false, 'modal' => true)));
$religion = new Religion('searchwstatus');
$religion->unsetAttributes();
// clear any default values
if (isset($_GET['Religion'])) {
    $religion->attributes = $_GET['Religion'];
}
$this->widget('zii.widgets.grid.CGridView', array('id' => 'religion-grid', 'dataProvider' => $religion->Searchwstatus(), 'filter' => $religion, 'template' => '{summary}{pager}<br>{items}{pager}{summary}', 'columns' => array(array('header' => '', 'type' => 'raw', 'value' => 'CHtml::Button("V",
                array("name" => "send_religion",
                "id" => "send_religion",
                "onClick" => "$(\\"#religion_dialog\\").dialog(\\"close\\"); $(\\"#religion_name\\").val(\\"$data->religionname\\"); $(\\"#Employee_religionid\\").val(\\"$data->religionid\\");"))'), array('name' => 'religionid', 'visible' => false, 'value' => '$data->religionid', 'htmlOptions' => array('width' => '1%')), 'religionname')));
$this->endWidget('zii.widgets.jui.CJuiDialog');