Modificaciones y Creación BD

parent 0a47481e
<?php
$host="localhost";
$bd="webapp";
$usuario="root";
$contrasenia="";
try {
$conexion=new PDO("mysql:host=$host;dbname=$bd",$usuario,$contrasenia );
if($conexion){echo "Conectado al sistema";}
} catch ( Exception $ex) {
echo $ex->getMessage();
}
?>
\ No newline at end of file
<?php include("template/cabecera.php"); ?>
<?php include("template/pie.php"); ?>
\ No newline at end of file
<?php include("../template/cabecera.php");?>
<?php
$txtequipo=(isset($_POST['id_equipo']))?$_POST['id_equipo']:"";
$txtnombreEquipo=(isset($_POST['nombreEquipo']))?$_POST['nombreEquipo']:"";
$txtimagen=(isset($_POST['imgEquipo']['name']))?$_POST['imgEquipo']['name']:"";
$accion=(isset($_POST['accion']))?$_POST['accion']:"";
include("../config/bd.php");
switch($accion){
case "Agregar":
//INSERT INTO `equipos` (`id`, `Nombre`, `Imagen`) VALUES (NULL, 'Alavés', 'alaves.png');
$SQL=$conexion->prepare("INSERT INTO `equipos` (`id`, `Nombre`, `Imagen`) VALUES (NULL, 'Alavés', 'alaves.png');");
$SQL->execute();
break;
case "Modificar":
break;
case "Cancelar":
break;
}
?>
<div class="col-md-5">
<div class="card">
<div class="card-header">
Añadir Equipo
</div>
<div class="card-body">
<form method="POST" enctype="multipart/form-data">
<div class = "form-group">
<label for="equipo">ID Equipo: </label>
<input type="text" class="form-control" name="id_equipo" id="id_equipo" placeholder="Indica el id del nuevo equipo">
</div>
<div class = "form-group">
<label for="nombreJugador">Nombre: </label>
<input type="text" class="form-control" name="nombreEquipo" id="nombreEquipo" placeholder="Añade un equipo">
</div>
<div class="btn-group" role="group" aria-label="">
<button type="button" name="accion" value="Agregar" class="btn btn-success">Agregar</button>
<button type="button" name="accion" value="Modificar" class="btn btn-warning">Modificar</button>
<button type="button" name="accion" value="Cancelar" class="btn btn-info">Cancelar</button>
</div>
</form>
</div>
</div>
</div>
<div class="col-md-7">
<table class="table table-bordered">
<thead>
<tr>
<th>Equipo</th>
<th>Jugador</th>
<th>Tarjetas</th>
<th>Goles</th>
<th>Acciones</th>
</tr>
</thead>
<tbody>
<tr>
<td>Nombre equipo</td>
<td>Nombre jugador</td>
<td>Goles</td>
<td>Tarjetas</td>
<td>Seleccionar | Borrar</td>
</tr>
</tbody>
</table>
</div>
<?php include("../template/pie.php");?>
\ No newline at end of file
<?php include("../template/cabecera.php");?>
<?php
$txtequipo=(isset($_POST['equipo']))?$_POST['equipo']:"";
$txtnombreJugador=(isset($_POST['nombreJugador']))?$_POST['nombreJugador']:"";
$accion=(isset($_POST['accion']))?$_POST['accion']:"";
switch($accion){
case "Agregar":
break;
case "Modificar":
break;
case "Cancelar":
break;
}
?>
<div class="col-md-5">
<div class="card">
<div class="card-header">
Añadir Jugador
</div>
<div class="card-body">
<form method="POST" enctype="multipart/form-data">
<div class = "form-group">
<label for="equipo">Equipo: </label>
<input type="text" class="form-control" name="equipo" id="equipo" placeholder="Indica el equipo del nuevo jugador">
</div>
<div class = "form-group">
<label for="nombreJugador">Nombre: </label>
<input type="text" class="form-control" name="nombreJugador" id="nombreJugador" placeholder="Añade un jugador">
</div>
<div class="btn-group" role="group" aria-label="">
<button type="button" name="accion" value="Agregar" class="btn btn-success">Agregar</button>
<button type="button" name="accion" value="Modificar" class="btn btn-warning">Modificar</button>
<button type="button" name="accion" value="Cancelar" class="btn btn-info">Cancelar</button>
</div>
</form>
</div>
</div>
</div>
<div class="col-md-7">
<table class="table table-bordered">
<thead>
<tr>
<th>Equipo</th>
<th>Jugador</th>
<th>Tarjetas</th>
<th>Goles</th>
<th>Acciones</th>
</tr>
</thead>
<tbody>
<tr>
<td>Nombre equipo</td>
<td>Nombre jugador</td>
<td>Goles</td>
<td>Tarjetas</td>
<td>Seleccionar | Borrar</td>
</tr>
</tbody>
</table>
</div>
<?php include("../template/pie.php");?>
\ No newline at end of file
<?php include("../template/cabecera.php");?>
<?php
$txtequipo=(isset($_POST['equipo']))?$_POST['equipo']:"";
$txtnombreJugador=(isset($_POST['nombreJugador']))?$_POST['nombreJugador']:"";
$accion=(isset($_POST['accion']))?$_POST['accion']:"";
switch($accion){
case "Agregar":
break;
case "Modificar":
break;
case "Cancelar":
break;
}
?>
<div class="col-md-5">
<div class="card">
<div class="card-header">
Añadir Jugador
</div>
<div class="card-body">
<form method="POST" enctype="multipart/form-data">
<div class = "form-group">
<label for="equipo">Equipo: </label>
<input type="text" class="form-control" name="equipo" id="equipo" placeholder="Indica el equipo del nuevo jugador">
</div>
<div class = "form-group">
<label for="nombreJugador">Nombre: </label>
<input type="text" class="form-control" name="nombreJugador" id="nombreJugador" placeholder="Añade un jugador">
</div>
<div class="btn-group" role="group" aria-label="">
<button type="button" name="accion" value="Agregar" class="btn btn-success">Agregar</button>
<button type="button" name="accion" value="Modificar" class="btn btn-warning">Modificar</button>
<button type="button" name="accion" value="Cancelar" class="btn btn-info">Cancelar</button>
</div>
</form>
</div>
</div>
</div>
<div class="col-md-7">
<table class="table table-bordered">
<thead>
<tr>
<th>Equipo</th>
<th>Jugador</th>
<th>Tarjetas</th>
<th>Goles</th>
<th>Acciones</th>
</tr>
</thead>
<tbody>
<tr>
<td>Nombre equipo</td>
<td>Nombre jugador</td>
<td>Goles</td>
<td>Tarjetas</td>
<td>Seleccionar | Borrar</td>
</tr>
</tbody>
</table>
</div>
<?php include("../template/pie.php");?>
\ No newline at end of file
<?php include("../template/cabecera.php");?>
<?php
$txtequipo=(isset($_POST['equipo']))?$_POST['equipo']:"";
$txtnombreJugador=(isset($_POST['nombreJugador']))?$_POST['nombreJugador']:"";
$accion=(isset($_POST['accion']))?$_POST['accion']:"";
switch($accion){
case "Agregar":
break;
case "Modificar":
break;
case "Cancelar":
break;
}
?>
<div class="col-md-5">
<div class="card">
<div class="card-header">
Añadir Jugador
</div>
<div class="card-body">
<form method="POST" enctype="multipart/form-data">
<div class = "form-group">
<label for="equipo">Equipo: </label>
<input type="text" class="form-control" name="equipo" id="equipo" placeholder="Indica el equipo del nuevo jugador">
</div>
<div class = "form-group">
<label for="nombreJugador">Nombre: </label>
<input type="text" class="form-control" name="nombreJugador" id="nombreJugador" placeholder="Añade un jugador">
</div>
<div class="btn-group" role="group" aria-label="">
<button type="button" name="accion" value="Agregar" class="btn btn-success">Agregar</button>
<button type="button" name="accion" value="Modificar" class="btn btn-warning">Modificar</button>
<button type="button" name="accion" value="Cancelar" class="btn btn-info">Cancelar</button>
</div>
</form>
</div>
</div>
</div>
<div class="col-md-7">
<table class="table table-bordered">
<thead>
<tr>
<th>Equipo</th>
<th>Jugador</th>
<th>Tarjetas</th>
<th>Goles</th>
<th>Acciones</th>
</tr>
</thead>
<tbody>
<tr>
<td>Nombre equipo</td>
<td>Nombre jugador</td>
<td>Goles</td>
<td>Tarjetas</td>
<td>Seleccionar | Borrar</td>
</tr>
</tbody>
</table>
</div>
<?php include("../template/pie.php");?>
\ No newline at end of file
<!doctype html>
<html lang="en">
<head>
<title>Title</title>
<title>InfoFutbol</title>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
......@@ -17,10 +17,16 @@
<div class="nav navbar-nav">
<a class="nav-item nav-link active" href="#">Administrador de la página <span class="sr-only">(current)</span></a>
<a class="nav-item nav-link" href="<?php echo $url;?>">Inicio</a>
<a class="nav-item nav-link" href="<?php echo $url;?>/administrador/seccion/equipos.php">Equipos</a>
<a class="nav-item nav-link" href="<?php echo $url;?>/administrador/seccion/jugadores.php">Jugadores</a>
<a class="nav-item nav-link" href="<?php echo $url;?>/administrador/seccion/tarjetas.php">Tarjetas</a>
<a class="nav-item nav-link" href="<?php echo $url;?>/administrador/seccion/goles.php">Goles</a>
<a class="nav-item nav-link" href="<?php echo $url;?>/administrador/seccion/Cerrar_sesion.php">Cerrar Sesión</a>
</div>
</nav>
\ No newline at end of file
</br></br>
<div class="container">
<div class="row">
\ No newline at end of file
</div>
</div>
</body>
</html>
\ No newline at end of file
<?php include("template/cabecera.php"); ?>
<div class="jumbotron">
<h1 class="display-3">Jumbo heading</h1>
<p class="lead">Jumbo helper text</p>
<hr class="my-2">
<p>More info</p>
<p class="lead">
<a class="btn btn-primary btn-lg" href="Jumbo action link" role="button">Jumbo action name</a>
</p>
</div>
<?php include("template/pie.php"); ?>
\ No newline at end of file
......@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>webapp</title>
<title>InfoFutbol</title>
<link rel="stylesheet" href="./css/bootstrap.min.css"/>
</head>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment