1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- include $_SERVER['DOCUMENT_ROOT'] . "/core/db_provider.php";
- include $_SERVER['DOCUMENT_ROOT'] . "/core/it_deportament.php";
- include $_SERVER['DOCUMENT_ROOT'] . "/core/it_employee.php";
- $itc = new ITDeportamentComtroller();
- $iec = new ITEmployeeComtroller();
- try {
- // $deportament = null;
- if (isset($_GET['deportament'])) {
- $deportament = $itc->get_all_by_id($_GET['deportament']);
- $list_employee = $iec->get_employee_by_deportament($deportament->id);
- } else exit();
- // var_dump($deportament);
- } catch (PDOException $e) {
- exit();
- }
- ?>
- <div class='row' style='margin-bottom: 20px; padding: 20px;'>
- <div class='col-md-8 col-md-offset-2'>
- <h2><?= $deportament->name ?></h2>
- <br /><br /><br />
- <?php foreach ($list_employee as $employee) : ?>
- <b><?= $employee->position ?><br /><?= $employee->fio ?><br>
- <?php if ($employee->phone != NULL) : ?>
- Телефон: <?= $employee->phone ?><br></b>
- <?php endif ?>
- <hr style='clear: both;'>
- <?php endforeach ?>
- </div>
- </div>
|