$_REQUEST['duration'], 'comment' => $_REQUEST['comment'], 'address' => $_REQUEST['address'], 'distance' => $_REQUEST['distance'], 'price' => $_REQUEST['price'], 'contact' => $_REQUEST['contact'], 'equipment_name' => $_REQUEST['equipment_name'], 'client_name' => $_REQUEST['client_name'], 'reason' => $_REQUEST['reason'], 'revealed' => $_REQUEST['revealed'], 'control_list' => $controls, 'recom' => $_REQUEST['recom'], 'repair_parts' => $_REQUEST['repair_parts'], 'marks' => $_REQUEST['marks'], 'marks_main' => (isset($_REQUEST['marks_main']) ? (int)$_REQUEST['marks_main'] : null), 'marks_client' => (isset($_REQUEST['marks_client']) ? (int)$_REQUEST['marks_client'] : null), 'dopengineer_ids' => (isset($_REQUEST['dopEngineerIds']) ? $_REQUEST['dopEngineerIds'] : null), 'move_trouble' => $_REQUEST['move_trouble'] ]; if($id) $_SESSION["addRegisterType"] = 'edit'; else $_SESSION["addRegisterType"] = 'add'; $id = Register::AddRecord($id, $clientId, $equipId, $date, $engineerId, $status, $link_id, $comment_main, $data); $_SESSION["addRegister"] = $id; echo $id;