include_once __DIR__ . "/../include/header.php"; MSergeev\Core\Lib\Buffer::setTitle("Запчасти - Добавление информации о приобретенных зап.частях"); use MSergeev\Packages\Icar\Lib; use MSergeev\Core\Lib as CoreLib; if (isset($_REQUEST['car'])) { $carID = intval($_REQUEST["car"]); } else { $carID = Lib\MyCar::getDefaultCarID(); } $pService = Lib\Points::getPointTypeIdByCode("service"); $pStore = Lib\Points::getPointTypeIdByCode("shop"); $pCarwash = Lib\Points::getPointTypeIdByCode("wash"); $bError = false; if (isset($_POST["action"])) { if ($res = Lib\RepairParts::addRepairPartsFromPost($_POST)) { ?> <span style="color: green;">Данные успешно добавлены</span><?php $bError = false; } else { ?> <span style="color: red;">Ошибка добавления данных:<?php echo Lib\RepairParts::showErrorList(); ?> </span><?php $bError = true; //msDebug($res); } } ?> <form action="" method="post">