72 lines
2.5 KiB
PHP
72 lines
2.5 KiB
PHP
<?php
|
|
if (session_status() !== PHP_SESSION_ACTIVE){
|
|
session_start();
|
|
}
|
|
|
|
$id_prestador = empty($_POST['id_prestador']) ? NULL : $_POST['id_prestador'];
|
|
$id_cliente = empty($_POST['id_cliente']) ? NULL : $_POST['id_cliente'];
|
|
$date_cad = empty($_POST['date_cad']) ? NULL : $_POST['date_cad'];
|
|
$data_expiracao = empty($_POST['data_expiracao']) ? NULL : $_POST['data_expiracao'];
|
|
$observacao = empty($_POST['observacao']) ? NULL : $_POST['observacao'];
|
|
$valor = empty($_POST['valor']) ? NULL : $_POST['valor'];
|
|
|
|
if($id_prestador == NULL)
|
|
{
|
|
$_SESSION['msg'] = 'Prestador não selecionado!';
|
|
header('Location: cad_orcamento.php');
|
|
}
|
|
|
|
include("../conexao.php");
|
|
include('../menu.php');
|
|
?>
|
|
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title> Cadastro de Orçamento </title>
|
|
<link rel="stylesheet" href="../css/menu.css">
|
|
<link rel="stylesheet" href="../css/forms.css">
|
|
<link rel="stylesheet" href="../css/article.css">
|
|
<link rel="stylesheet" href="../css/input.css">
|
|
</head>
|
|
<body>
|
|
<?php
|
|
echo $nav;
|
|
?>
|
|
<article>
|
|
<section class='center'>
|
|
<a href="index.php">Listar</a>
|
|
<p><h1> Continuação do Cadastro </h1></p>
|
|
<form method="POST" action="inc_orcamento.php">
|
|
<input type="hidden" name="dat" value="<?php echo $date_cad; ?>">
|
|
<input type="hidden" name="valor" value="<?php echo $valor; ?>">
|
|
<input type="hidden" name="data_expiracao" value="<?php echo $data_expiracao;?>">
|
|
<input type="hidden" name="observacao" value="<?php echo $observacao;?>">
|
|
<input type="hidden" name="id_prestador" value="<?php echo $id_prestador;?>">
|
|
<input type="hidden" name="id_cliente" value="<?php echo $id_cliente;?>">
|
|
<label> Serviços: </label>
|
|
<select name="id_servico">
|
|
<?php
|
|
$query = 'SELECT * FROM consulta_prestador_servico WHERE id_prestador = ? ORDER BY servico ';
|
|
$stmt = $con->prepare($query);
|
|
$stmt->bind_param('s',$id_prestador);
|
|
$stmt->execute();
|
|
$resu = $stmt->get_result();
|
|
while($reg = $resu->fetch_assoc()){
|
|
?>
|
|
<option value="<?php echo $reg['id_servico'];?>"><?php echo $reg['servico']?></option>
|
|
<?php
|
|
}
|
|
?>
|
|
</select>
|
|
<br><br>
|
|
<table class='input'>
|
|
<td><input class='buttons' type="submit" value="Enviar"></td>
|
|
<td><button type="button" class='buttons' onclick="javascript:history.back()">Voltar</button></td>
|
|
</table>
|
|
</form>
|
|
</section>
|
|
</article>
|
|
<?php echo $footer;?>
|
|
</body>
|
|
</html>
|