<?php

Include("includes/con_cliente.php");

 require_once('connection.php');
    session_start();

    if(isset($_SESSION['User']))
    {
        $query="select * from tbusuario where nomeuser='".$_SESSION['User']."'";
        $result=mysqli_query($con,$query);
        $resultado = mysqli_fetch_assoc($result);
        $r_resultado = $resultado;
        //echo $resultado["nome"] .'<br>';
    }
    else
    {
        header("location:index.php");
    }
?>
<html lang="pt-br">

    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        <title>Sistema SCA - Grupo BRO</title>

        <link rel="stylesheet" href="node_modules/bootstrap/compiler/bootstrap.css">
        <link rel="stylesheet" href="node_modules/bootstrap/compiler/styler.css">

        <!--<link rel="stylesheet" type="text/css" media="screen" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" /> -->
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
        <link rel="stylesheet" href="https://cdn.rawgit.com/Eonasdan/bootstrap-datetimepicker/e8bddc60e73c1ec2475f827be36e1957af72e2ea/build/css/bootstrap-datetimepicker.css" />

<!--        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment-with-locales.js"></script>
        <script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
        <script type="text/javascript" src="https://cdn.rawgit.com/Eonasdan/bootstrap-datetimepicker/e8bddc60e73c1ec2475f827be36e1957af72e2ea/src/js/bootstrap-datetimepicker.js"></script> -->


        <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.mask/1.14.15/jquery.mask.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>


    </head>
    <body>
        
        <nav class="navbar fixed-top navbar-expand-lg navbar-dark" style="background-color: #3333ff;">
          <!--<a class="navbar-brand" href="#">SCA</a> -->
          <a class="navbar-brand" href="menu.php">
                <img src="img/logomarca.png" width="50" height="40" class="d-inline-block align-center" alt="">
                SCA - Cadastro de Veícuos - Inclusão de Veículo
          </a>

          <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo02" aria-controls="navbarTogglerDemo02" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>

          </button>
          <div class="collapse navbar-collapse" id="navbarTogglerDemo02">
            <ul class="navbar-nav mr-auto mt-2 mt-lg-0">
            </ul>
            <form class="form-inline my-2 my-lg-0">
              <button class="btn btn-primary btn-sm my-2 my-sm-0" type="submit">
                <a href="m.php" style="color:inherit"> Sair </a>
              </button>
            </form>
          </div>
        </nav>

        
        <div style="margin-top: 6rem;" >
          <div class="container">

        
          <!--<h5 class="container p-2 page-header text-center"> Bem-vindo <?php echo $resultado["nomeuser"];?> </h5> --> 

          <form method="POST" action="vcadastrado.php" enctype="multipart/form-data">
            <div class="form-row">
              <div class="col-md-2 mb-3">
                <label for="txtplaca">Placa</label>
                <!--<input type="text" class="form-control" id="txtplaca" placeholder="KKK-9999" required> -->
                <input type="text" class="form-control" id="txtplaca" name="txtplaca" placeholder="KKK-9999" required onkeypress="$(this).mask('SSS-0000');">
              </div>
              <div class="col-md-2 mb-3">
                <label for="txtano">Ano</label>
                <input type="text" class="form-control" id="txtano" name="txtano" placeholder="2019"required>
              </div>
              <div class="col-md-2 mb-3">
                <label for="validationDefault02">Marca</label>
                <!--<input type="text" class="form-control" id="validationDefault03" placeholder="Marca"required> -->
                <select class="custom-select" name="txtmarca">
                  <option value="Chevrolet">Chevrolet</option>
                  <option value="Fiat">Fiat</option>
                  <option value="Ford">Ford</option>
                  <option value="Volkswagen">Volkswagen</option>
                  <option value="Toyota">Toyota</option>
                  <option value="Honda">Honda</option>
                  <option value="Reanult">Reanult</option>
                  <option value="Hyundai">Hyundai</option>
                  <option value="Peugeot">Peugeot</option>
                  <option value="Citroen">Citroen</option>
                  <option value="Mercedes">Mercedes</option>
                  <option value="Land Rover">Land Rover</option>
                  <option value="Porsche">Porsche</option>
                  <option value="Volvo">Volvo</option>
                </select>
              </div>
              <div class="col-md-2 mb-3">
                <label for="txtmodelo">Modelo</label>
                <input type="text" class="form-control" id="txtmodelo" name="txtmodelo" placeholder="Modelo"required>
              </div>
              <div class="col-md-2 mb-3">
                <label for="txtchassi">Chassi</label>
                <input type="text" class="form-control" id="txtchassi" name="txtchassi" placeholder="A1D235SS2A1A4432"required>
              </div>
              <div class="col-md-2 mb-3">
                <label for="txtcor">Cor</label>
                <input type="text" class="form-control" id="txtcor" name="txtcor" placeholder="Branca"required>
              </div>
            </div>
            <div class="form-row">
              <div class="col-md-3 mb-3">
                <label for="txtcidade">Cidade</label>
                <input type="text" class="form-control" id="txtcidade" name="txtcidade" placeholder="Recife" required>
              </div>
              <div class="col-md-3 mb-3">
                <label for="txtuf">Estado</label>
                <!--<input type="text" class="form-control" id="validationDefault04" placeholder="PE" required> -->
                <select class="custom-select" id="txtuf" name="txtestado">
                    <option value="AC">Acre</option>
                    <option value="AL">Alagoas</option>
                    <option value="AP">Amapá</option>
                    <option value="AM">Amazonas</option>
                    <option value="BA">Bahia</option>
                    <option value="CE">Ceará</option>
                    <option value="DF">Distrito Federal</option>
                    <option value="ES">Espírito Santo</option>
                    <option value="GO">Goiás</option>
                    <option value="MA">Maranhão</option>
                    <option value="MT">Mato Grosso</option>
                    <option value="MS">Mato Grosso do Sul</option>
                    <option value="MG">Minas Gerais</option>
                    <option value="PA">Pará</option>
                    <option value="PB">Paraíba</option>
                    <option value="PR">Paraná</option>
                    <option value="PE">Pernambuco</option>
                    <option value="PI">Piauí</option>
                    <option value="RJ">Rio de Janeiro</option>
                    <option value="RN">Rio Grande do Norte</option>
                    <option value="RS">Rio Grande do Sul</option>
                    <option value="RO">Rondônia</option>
                    <option value="RR">Roraima</option>
                    <option value="SC">Santa Catarina</option>
                    <option value="SP">São Paulo</option>
                    <option value="SE">Sergipe</option>
                    <option value="TO">Tocantins</option>
                  </select>
              </div>
              <div class="col-md-3 mb-3">
                <label for="txtempresa">Empresa</label>
                <!--<input type="text" class="form-control" id="validationDefault05" placeholder="Empresa" required> --> 
                 <select class="custom-select" id="txtempresa" name="txtempresa">
                  <option value="Brasil Ortopedia">Brasil Ortopedia</option>
                  <option value="Ajumed">Ajumed</option>
                  <option value="Orthomac">Orthomac</option>
                  <option value="Best Care">Best Care</option>
                  <option value="Diretoria">Diretoria</option>
                  <option value="Locado">Locado</option>
                  <option value="Outros">Outros</option>
                </select>
              </div>
              <div class="col-md-3 mb-3">
                <label for="txtkminicial">KM Inicial</label>
                <input type="text" class="form-control" id="txtkminicial" name="txtkminicial" placeholder="000000" required onkeypress="$(this).mask('000000');">
              </div>
              <div class="col-md-3 mb-3">
                <label for="txtstatus">Situação do Veículo</label>
                <select class="custom-select" id="txtstatus" name="txtstatus">
                  <option value="Ativo">Ativo</option>
                  <option value="Em Manutenção">Em Manutenção</option>
                  <option value="Vendido">Vendido</option>
                  <option value="Inativo">Inativo</option>
                </select>
              </div>

            </div>
            <button class="btn btn-primary" type="submit">Gravar Cadastro</button>
            <button class="btn btn-warning" type="reset" disableValidation="true">Limpar</button>
          </form>
        </div>
        </div>

        <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.css">
 <!--       <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
        <script src="//cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>
        <script src="//cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.mask/1.14.15/jquery.mask.min.js"></script>
        
        <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
        <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script> -->

    </body>

    <footer class="page-footer font-small text-primary "style="margin-top: 6rem">
          <div class="footer-copyright text-center py-3">© 2019 Copyright: Brasil Ortopedia
          </div>
    </footer>

</html>
