コード例 #1
0
ファイル: add.php プロジェクト: msergeev06/mj-msergeev
} 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">
	<input type="hidden" name="car" value="<?php 
echo $carID;
?>
">
	<table class="add_ts">
		<tr>
			<td class="title">Автомобиль</td>