74 lines
2.2 KiB
PHP
74 lines
2.2 KiB
PHP
|
<?php
|
||
|
if (session_status() !== PHP_SESSION_ACTIVE){
|
||
|
session_start();
|
||
|
}
|
||
|
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>
|
||
|
<?php if(isset($_SESSION['msg'])){?>
|
||
|
<div class="msg">
|
||
|
<?php echo $_SESSION['msg'];
|
||
|
unset($_SESSION['msg']);?>
|
||
|
</div>
|
||
|
<?php }?>
|
||
|
<p><h1> Orçamento - Cadastro </h1></p>
|
||
|
<form method="POST" action="cad_orcamento2.php">
|
||
|
<p> Data: <input type="date" name="date_cad"></p>
|
||
|
<p> Valor: <input type="number" name="valor"></p>
|
||
|
<p> Data de Expiração: <input type="date" name="data_expiracao"></p>
|
||
|
<p> Observação: <input type="text" name="observacao"></p>
|
||
|
<label> Cliente: </label>
|
||
|
<select name="id_cliente">
|
||
|
<?php
|
||
|
$query = 'SELECT * FROM tbclientes ORDER BY nome';
|
||
|
$resu = mysqli_query($con, $query) or die(mysqli_connect_error());
|
||
|
while($reg = mysqli_fetch_array($resu)){
|
||
|
if(strcasecmp($reg['nome'],'ADMINISTRADOR') != 0){
|
||
|
?>
|
||
|
<option value="<?php echo $reg['id'];?>"><?php echo $reg['nome']?></option>
|
||
|
<?php
|
||
|
}
|
||
|
}
|
||
|
?>
|
||
|
</select>
|
||
|
<br><br>
|
||
|
<label> Prestadores: </label>
|
||
|
<select name="id_prestador">
|
||
|
<?php
|
||
|
$query = 'SELECT * FROM prestadores ORDER BY nome;';
|
||
|
$resu = mysqli_query($con, $query) or die(mysqli_connect_error());
|
||
|
while($reg = mysqli_fetch_array($resu)){
|
||
|
?>
|
||
|
<option value="<?php echo $reg['id'];?>"> <?php echo $reg['nome'];?></option>
|
||
|
<?php
|
||
|
}
|
||
|
?>
|
||
|
</select>
|
||
|
<br><br>
|
||
|
<table class='input'>
|
||
|
<td><input class='buttons' type="submit" value="Enviar"></td>
|
||
|
<td><input class='buttons' type="reset" value="Limpar"></td>
|
||
|
</table>
|
||
|
</form>
|
||
|
</section>
|
||
|
</article>
|
||
|
<?php echo $footer;?>
|
||
|
</body>
|
||
|
</html>
|