-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
987 additions
and
67 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
include_once($_SERVER['DOCUMENT_ROOT'].'/dirs.php'); | ||
include_once(DB_PATH.'DB.PHP'); | ||
include_once(MODELS_PATH.'project.php'); | ||
include_once(HELPERS_PATH.'curdate.php'); | ||
?> | ||
|
||
<div class='panel'> | ||
<h3>CREAR PROYECTO:</h3><br/> | ||
<form method="POST" action="helpers/nuevo-proyecto.php" enctype="multipart/form-data"> | ||
<input type='text' id='curdate' name='curdate' value='<?php echo $CURDATE;?>' hidden/> | ||
|
||
<table border='1' cellpadding='4' cellspacing='2'> | ||
<tr><td colspan="3">Inserte imagen y nombre del proyecto</td></tr> | ||
<tr> | ||
<td>Imagen:</td> | ||
<td><input type="file" name="imagen" id="imagen"></td> | ||
<td rowspan="2"><input type="submit" class="white" name="send_image" id="send_image" value="Cargar imagen"></td> | ||
</tr> | ||
|
||
<tr> | ||
<td>Nombre Imagen:</td> | ||
<td><input type="Text" name="nombre_imagen" id="nombre_imagen"></td> | ||
</tr> | ||
</table> | ||
</form><br/> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<table border='1' cellpadding='4' cellspacing='2'> | ||
<tr><td colspan="3">Inserte imagen y nombre del proyecto</td></tr> | ||
<input type="text" name="ID" value="<?= $proyecto->getID();?>" hidden> | ||
<input type="text" name="datos" value="<?= $proyecto->getDatos();?>" hidden> | ||
<input type="text" name="tecnologia" value="<?= $proyecto->getTecnologia();?>" hidden> | ||
<input type="text" name="tiempo" value="<?= $proyecto->getTiempo();?>" hidden> | ||
<tr> | ||
<td>Imagen:</td> | ||
<td><input type="file" name="imagen" id="imagen"></td> | ||
<td rowspan="2"><input type="submit" class="white" name="send_image" id="send_image" value="Cargar imagen"></td> | ||
</tr> | ||
|
||
<tr> | ||
<td>Nombre Imagen:</td> | ||
<td><input type="Text" name="nombre_imagen" id="nombre_imagen"></td> | ||
</tr> | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php | ||
include_once($_SERVER['DOCUMENT_ROOT'].'/dirs.php'); | ||
include_once(HELPERS_PATH.'projectsinfo.php'); | ||
include_once(MODELS_PATH.'project.php'); ?> | ||
|
||
<div class='panel'> | ||
<h3>PROYECTOS:</h3> | ||
<table> | ||
<tr> | ||
<td rowspan="2"><b>Nombre</b></td> | ||
<td rowspan="2"><b>Datos</b></td> | ||
<td rowspan="2"><b>Tecnología Empleada</b></td> | ||
<td rowspan="2"><b>Tiempo de consecución</b></td> | ||
<td rowspan="2"><b>Ruta Imagen</b></td> | ||
<td colspan="3"><b>Acciones</b></td> | ||
</tr> | ||
<tr> | ||
<td><b>Ver</b></td> | ||
<td><b>Editar</b></td> | ||
<td><b>Eliminar</b></td> | ||
</tr> | ||
|
||
<?php foreach($proyecto as $p):?> | ||
|
||
<?php $proyecto = new Proyecto($p['ID'], $p['nombre'], $p['datos'], $p['tecnologia'], $p['tiempo'], $p['imagen']);?> | ||
<tr> | ||
<td><?=$proyecto->getNombre_proyecto();?></td> | ||
<td><?=$proyecto->getDatos();?></td> | ||
<td><?=$proyecto->getTecnologia();?></td> | ||
<td><?=$proyecto->getTiempo();?></td> | ||
<td><?=$proyecto->getImagen();?></td> | ||
<!--LEER PROYECTO--> | ||
<form method='post' action=TODO:'../views/leerproyecto.php'> | ||
<td><input type='text' id='id_proyecto' name='id_proyecto' value='<?=$proyecto->getID();?>' hidden/> | ||
<button type='submit' class='edit' id='ver_proyecto<?=$proyecto->getID();?>' name='ver_proyecto' value='' /> | ||
<?php include (PARTIALS_PATH.'boton-ver.html');?></button></td></form> | ||
<!--EDITAR PROYECTO--> | ||
<form method='post' action='helpers/editar-proyecto.php'> | ||
<td><input type='text' id='id_proyecto' name='id_proyecto' value='<?=$proyecto->getID();?>' hidden/> | ||
<button type='submit' class='edit' id='editar-<?=$proyecto->getID();?>' name='editar'/><?php include (PARTIALS_PATH.'boton-editar.html');?></button></td></form> | ||
<!--BORRAR PROYECTO--> | ||
<form method='post' action='controllers/borrar-proyecto.php'> | ||
<td><input type='text' id='id_proyecto' name='id_proyecto' value='<?=$proyecto->getID();?>' hidden/> | ||
<button type='submit' class='red' id='borrar-<?=$proyecto->getID();?>' name='borrar' value='' onclick="return confirm('¿Realmente desea borrar el proyecto?')"> | ||
<?php include (PARTIALS_PATH.'boton-borrar.html');?></button></td></form> | ||
</tr> | ||
|
||
<?php endforeach; ?> | ||
</table> | ||
</div> | ||
|
||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
include_once($_SERVER['DOCUMENT_ROOT'].'/dirs.php'); | ||
include_once(HELPERS_PATH.'curdate.php'); | ||
include_once(HELPERS_PATH.'currentuser.php');?> | ||
|
||
<section> | ||
<!--NUEVO PROYECTO--> | ||
<?php include (ADMIN_PATH.'admin-partials/projects/crear-proyecto.php')?> | ||
<!--LISTAR PROYECTS--> | ||
<?php include (ADMIN_PATH.'admin-partials/projects/listar-proyectos.php')?> | ||
|
||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
include_once($_SERVER['DOCUMENT_ROOT'].'/dirs.php'); | ||
include_once(DB_PATH.'db.php'); | ||
|
||
$id = $_POST['id_proyecto']; | ||
|
||
$drop = "DELETE FROM proyectos WHERE ID_proyecto=".$id; | ||
|
||
$mysqli->query($drop); | ||
|
||
header('Location: ../areausuarios.php'); | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
<?php | ||
include_once($_SERVER['DOCUMENT_ROOT'].'/dirs.php'); | ||
include_once(DB_PATH.'db.php'); | ||
|
||
$nombre = $_POST['nombre_proyecto']; | ||
$datos = $_POST['datos_proyecto']; | ||
|
||
$html = $_POST['Html']; | ||
$css = $_POST['Css']; | ||
$js = $_POST['JavaScript']; | ||
$mysql = $_POST['MySQL']; | ||
$php = $_POST['PHP']; | ||
$csharp = $_POST['C#']; | ||
|
||
$consecucion = $_POST['tiempo_consecucion']; | ||
$rutaimagen = $_POST['rutaimagen']; | ||
|
||
//SECUENCIA PARA AÑADIR LAS TECNOLOGÍAS | ||
//HTML | ||
if($html != ""){ | ||
$tecnologia = $tecnologia.$html; | ||
} | ||
|
||
//CSS | ||
if($css != ""){ | ||
if($html != ""){ | ||
$tecnologia = $tecnologia.", "; | ||
} | ||
}$tecnologia = $tecnologia.$css; | ||
|
||
//JAVASCRIPT | ||
if($js != ""){ | ||
if($css != ""){ | ||
$tecnologia = $tecnologia.", "; | ||
}else if($html != ""){ | ||
$tecnologia = $tecnologia.", "; | ||
} | ||
}$tecnologia = $tecnologia.$js; | ||
|
||
//MYSQL | ||
if($mysql != ""){ | ||
if($js != ""){ | ||
$tecnologia = $tecnologia.", "; | ||
}else if($css != ""){ | ||
$tecnologia = $tecnologia.", "; | ||
}else if($html != ""){ | ||
$tecnologia = $tecnologia.", "; | ||
} | ||
}$tecnologia = $tecnologia.$mysql; | ||
|
||
//PHP | ||
if($php != ""){ | ||
if($mysql != ""){ | ||
$tecnologia = $tecnologia.", "; | ||
}else if($js != ""){ | ||
$tecnologia = $tecnologia.", "; | ||
}else if($css != ""){ | ||
$tecnologia = $tecnologia.", "; | ||
}else if($html != ""){ | ||
$tecnologia = $tecnologia.", "; | ||
} | ||
}$tecnologia = $tecnologia.$php; | ||
|
||
//C# | ||
if($csharp != ""){ | ||
if($php != ""){ | ||
$tecnologia = $tecnologia.", "; | ||
}else if($mysql != ""){ | ||
$tecnologia = $tecnologia.", "; | ||
}else if($js != ""){ | ||
$tecnologia = $tecnologia.", "; | ||
}else if($css != ""){ | ||
$tecnologia = $tecnologia.", "; | ||
}else if($html != ""){ | ||
$tecnologia = $tecnologia.", "; | ||
} | ||
}$tecnologia = $tecnologia.$csharp; | ||
|
||
$sql = "INSERT INTO proyectos (nombre_proyecto, datos, tecnologia_empleada, tiempo_consecucion, imagen) VALUES ('".$nombre."', '".$datos."', '".$tecnologia."', '".$consecucion."', '".$rutaimagen."' );"; | ||
|
||
$results = $mysqli->query($sql); | ||
|
||
if($results){ | ||
|
||
header("Location: ../areausuarios.php"); | ||
}else{ | ||
|
||
echo "###ERROR###"; | ||
} | ||
|
||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
include_once($_SERVER['DOCUMENT_ROOT'].'/dirs.php'); | ||
include_once(DB_PATH.'db.php'); | ||
|
||
$ID = $_POST['id']; | ||
$fecha = $_POST['curdate']; | ||
$categoria = $_POST['categoria']; | ||
$titular = $_POST['titular']; | ||
$subtitulo = $_POST['subtitulo']; | ||
$noticia = $_POST['noticia']; | ||
|
||
$update = "UPDATE noticias SET noticia = '".$noticia."', categoria ='".$categoria."', fecha = '".$fecha."', titular= '".$titular."', subtitulo = '".$subtitulo."' WHERE ID = '".$ID."'"; | ||
|
||
$mysqli->query($update); | ||
|
||
header("Location: ../areausuarios.php"); | ||
?> |
Oops, something went wrong.