} } } } } } } echo "</tr>"; $i = 1; $m = 1; foreach ($employee_data as $t => $sd) { echo "<tr>"; echo "<td class='text-center'>" . $i . "</td>"; foreach ($selected_list as $s) { if ($s == 'emp_department_name') { echo "<td class='text-center'>" . EmpDepartment::findOne($sd['emp_master_department_id'])->emp_department_name . "</td>"; } else { if ($s == 'city') { if ($sd['emp_master_emp_address_id'] != 0) { $add = EmpAddress::findOne($sd['emp_master_emp_address_id']); if ($add->emp_cadd_city != null) { echo "<td class='text-center'>" . City::findOne($add->emp_cadd_city)->city_name . "</td>"; } else { echo "<td> </td>"; } } else { echo "<td> </td>"; } } else { if ($s == 'emp_designation_name') { if ($sd['emp_master_designation_id'] != null) {
} } } echo "</tr>"; $i = 1; foreach ($employee_data as $t => $sd) { if ($i % 2 == 0) { $bgcolor = "#FFFFFF"; } else { $bgcolor = "#E3E3E3"; } echo '<tr align=center bgcolor=' . $bgcolor . '>'; echo "<td style='align:center; valign:'middle';'>" . $i . "</td>"; foreach ($selected_list as $s) { if ($s == 'emp_department_name') { echo "<td style='align:center; valign:'middle';'>" . EmpDepartment::findOne($sd['emp_master_department_id'])->emp_department_name . "</td>"; } else { if ($s == 'emp_designation_name') { if ($sd['emp_master_designation_id'] != null) { echo "<td class='text-center'>" . EmpDesignation::findOne($sd['emp_master_designation_id'])->emp_designation_name . "</td>"; } else { echo "<td > </td>"; } } else { if ($s == 'city') { if ($sd['emp_master_emp_address_id'] != 0) { $add = EmpAddress::findOne($sd['emp_master_emp_address_id']); if ($add->emp_cadd_city != null) { echo "<td style='align:center; valign:'middle';'>" . City::findOne($add->emp_cadd_city)->city_name . "</td>"; } else { echo "<td> </td>";
use app\modules\employee\models\EmpDesignation; ?> <div class="grid-view user-data"> <?php if (!empty($employee_data)) { $emp_info = new EmpInfo(); echo "</br></br><h3>Employee List</h3>"; $i = 1; foreach ($employee_data as $t => $sd) { echo "<h3>" . $sd['emp_first_name'] . " " . $sd['emp_last_name'] . "</h3>"; echo "<table>"; echo '<tr>'; echo "<td class='label'>Sr.No</td><td>" . $i . "</td>"; foreach ($selected_list as $s) { if ($s == 'emp_department_name') { echo "<tr><td class='label'>Department</td><td>" . EmpDepartment::findOne($sd['emp_master_department_id'])->emp_department_name . "</td></tr>"; } else { if ($s == 'emp_designation_name') { if ($sd['emp_master_designation_id'] != null) { echo "<tr><td class='label'>Designation </td><td class='text-center'>" . EmpDesignation::findOne($sd['emp_master_designation_id'])->emp_designation_name . "</td></tr>"; } else { echo "<tr><td> </td></tr>"; } } else { if ($s == 'emp_cadd') { if ($sd['emp_master_emp_address_id'] != 0) { echo "<tr><td class='label'>Local Address</td>"; if (!empty(EmpAddress::findOne($sd['emp_master_emp_address_id'])->emp_cadd_city)) { $add_c = "<br/>" . City::findOne(EmpAddress::findOne($sd['emp_master_emp_address_id'])->emp_cadd_city)->city_name . ", "; } else { $add_c = '';
/** * Finds the EmpDepartment model based on its primary key value. * If the model is not found, a 404 HTTP exception will be thrown. * @param integer $id * @return EmpDepartment the loaded model * @throws NotFoundHttpException if the model cannot be found */ protected function findModel($id) { if (($model = EmpDepartment::findOne($id)) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }
use app\modules\employee\models\EmpDesignation; ?> <div class="grid-view user-data"> <?php if (!empty($employee_data)) { $emp_info = new EmpInfo(); echo "</br></br><h3>" . Yii::t('report', 'Employee List') . "</h3>"; $i = 1; foreach ($employee_data as $t => $sd) { echo "<h3>" . $sd['emp_first_name'] . " " . $sd['emp_last_name'] . "</h3>"; echo "<table>"; echo '<tr>'; echo "<td class='label'>" . Yii::t('report', 'Sr.No') . "</td><td>" . $i . "</td>"; foreach ($selected_list as $s) { if ($s == 'emp_department_name') { echo "<tr><td class='label'>" . Yii::t('report', 'Department') . "</td><td>" . EmpDepartment::findOne($sd['emp_master_department_id'])->emp_department_name . "</td></tr>"; } else { if ($s == 'emp_designation_name') { if ($sd['emp_master_designation_id'] != null) { echo "<tr><td class='label'>" . Yii::t('report', 'Designation') . " </td><td class='text-center'>" . EmpDesignation::findOne($sd['emp_master_designation_id'])->emp_designation_name . "</td></tr>"; } else { echo "<tr><td> </td></tr>"; } } else { if ($s == 'emp_cadd') { if ($sd['emp_master_emp_address_id'] != 0) { echo "<tr><td class='label'>" . Yii::t('report', 'Local Address') . "</td>"; if (!empty(EmpAddress::findOne($sd['emp_master_emp_address_id'])->emp_cadd_city)) { $add_c = "<br/>" . City::findOne(EmpAddress::findOne($sd['emp_master_emp_address_id'])->emp_cadd_city)->city_name . ", "; } else { $add_c = '';