Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require '../backend/model/conexion.php';
- $conexion = new conexion();
- $conn = $conexion->conectar();
- ?>
- <!--modal-->
- <div class="modal fade bd-example-modal-lg" id="modalRestaurant" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
- <div class="modal-dialog modal-lg modal-dialog-centered" role="document">
- <div class="modal-content">
- <div class="modal-header">
- <h5 class="modal-title" id="exampleModalLongTitle">Agreagr nuevo Restaurante(Próximamente)</h5>
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
- <span aria-hidden="true">×</span>
- </button>
- </div>
- <div class="modal-body">
- <div class="container-fluid">
- <div class="row">
- <div class="col-sm-12">
- <label for="exampleInputEmail1">Nombre del restaurante</label>
- <input type="text" class="form-control" id="nombre" placeholder="Póximamente">
- </div>
- <div class="col-sm-12">
- <label for="address">Direccion</label>
- <input class="form-control" id="address" type="text" placeholder="Póximamente">
- </div>
- </div>
- <div class="row">
- <div class="col-md-6 col-sm-12">
- <label for="cp">codigo postal</label>
- <input type="text" class="form-control" id="cp" placeholder="Póximamente">
- </div>
- <div class="col-md-6 col-sm-12">
- <label for="cost">Categoria</label>
- <select class="form-control" id="categoria" placeholder="Póximamente">
- <!--consulta sql php-->
- <?php
- $sql = $conn -> query( " SELECT Nombre FROM Categorias " ) ;
- while($row = $sql -> fetch_array(MYSQLI_NUM) ){
- printf ("<option>".$row[0]."</option>","<option>".$row[1]."</option>");
- }
- ?>
- <!-- end consulta -->
- </select>
- </div>
- <div class="col-sm-12">
- <label for="position">Telefono</label>
- <input class="form-control" id="tele" placeholder="Póximamente">
- </div>
- <div class="col-md-6 col-sm-12">
- <label for="cost">Ciudad</label>
- <select class="form-control" id="ciudad" placeholder="Póximamente">
- <!--consulta sql php-->
- <?php
- $sql = $conn -> query( " SELECT Nombre FROM ciudad " ) ;
- while($row = $sql -> fetch_array(MYSQLI_NUM) ){
- printf ("<option>".$row[0]."</option>","<option>".$row[1]."</option>");
- }
- ?>
- <!-- end consulta -->
- </select>
- </div>
- <div class="col-md-6 col-sm-12">
- <label for="cost">Estado</label>
- <select class="form-control" id="state" placeholder="Póximamente">
- <!--consulta sql php-->
- <?php
- $sql = $conn -> query( " SELECT Nombre FROM estado " ) ;
- while($row = $sql -> fetch_array(MYSQLI_NUM) ){
- printf ("<option>".$row[0]."</option>","<option>".$row[1]."</option>");
- }
- ?>
- <!-- end consulta -->
- </select>
- </div>
- <div class="col-sm-12">
- <label for="position">Pais</label>
- <select id="country" class="form-control" placeholder="Póximamente">
- <!--consulta sql php-->
- <?php
- $sql = $conn -> query( " SELECT Nombre FROM pais " ) ;
- while($row = $sql -> fetch_array(MYSQLI_NUM) ){
- printf ("<option>".$row[0]."</option>","<option>".$row[1]."</option>");
- }
- ?>
- <!-- end consulta -->
- </select>
- </div>
- </div>
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-secondary" data-dismiss="modal" >Cancelar</button>
- <button type="button" class="btn btn-primary" onclick="AddRestaurant();" >Guardar</button>
- </div>
- </div>
- </div>
- </div>
- <!-- Fin formulario para agregar un restaurante -->
- <!-- comienzo para editar un restaurante -->
- <!-- Inicio de la página -->
- <h1 class="h3 mb-2 text-gray-800">Restaurantes</h1>
- <div class="row">
- <div class="col s12 mb-4">
- <a href="#" class="btn btn-secondary btn-icon-split float-right" data-toggle="modal" data-target=".bd-example-modal-lg">
- <span class="icon text-white-50" style="background-color:#78909c;">
- <i class="fas fa-plus" ></i>
- </span>
- <span class="text" style="background-color:#90a4ae;">Nuevo Restaurant</span>
- </a>
- </div>
- </div>
- <div class="row">
- <div class="card shadow mb-4 col s12">
- <div class="card-header">
- <h5><strong>Restaurantes</strong></h5>
- </div>
- <div class="card-body">
- <div class="table-responsive">
- <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
- <thead>
- <tr>
- <th></th>
- <th>Nombre</th>
- <th>Direccion</th>
- <th>Telefono</th>
- <th>Ciudad</th>
- </tr>
- </thead>
- <tbody id="tableRestaurantsContainer">
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- <!-- Page level plugins -->
- <script type="text/javascript">
- $('#modalEditEmployee').on('hidden.bs.modal', function (e) {
- $("#idDishEmployee").val("");
- $("#nameEdit").val("");
- $("#userEdit").val("");
- $("#emailEdit").val("");
- $("#positionEdit").val("");
- $("#confirmDelete").addClass("d-none");
- $("#delete").removeClass("d-none");
- LoadDataRestaurants();
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement