foreach ($base['autos'] as $auto) {
$model = $auto[2];
switch ($model) {
case 'Р7':
if($trigger[$model] == false){
echo "<div class='autocatalog__group'><h2>$model</h2>";
echo "<div class='autocatalog__headers'>";
foreach ($base['headers'] as $header) {
echo "<h5>$header</h5>";
}
echo "</div>";
}
$trigger[$model]++;
showAuto($auto);
$arr = [];
foreach($base['autos'] as $item) {
if($item[2] == $auto[2]) {
array_push($arr, $item);
}
}
if(count($arr) == $trigger[$model]) {
echo "</div>";
}
break;
default:
break;
}
}
foreach ($employee as $value) {
echo ' <div class="new-form" data-employee-id="'.$value['id_employee'].'">
<input type="text" disabled value="'.$value['first_name'].'">
<input type="text" disabled value="'.$value['second_name'].'">
<input type="text" disabled value="'.$value['middle_name'].'">
<select name="list-position" id="list-position">';
foreach ($positions as $val) {
echo '<option value="'.$val['id_position'].'">'.$val['position'].'</option>';
}
echo '</select>
<input type="text" disabled value="'.$value['position'].'">
<input type="text" disabled value="'.$value['salary'].'">
<button class="change-employee" data-id="'.$id.'">Изменить</button>
<button id="js-save-change-employee" class="save-change-employee hide" data-id="'.$id.'">Сохранить изменения</button>
</div>';
}