Esempio n. 1
0
 function listNoticia()
 {
     $NoticiasBack = new NoticiasBack();
     $resultado = $NoticiasBack->listado();
     //Llamada a la vista
     require 'views/back/listNoticia.php';
 }
Esempio n. 2
0
}
include 'views/back/layout.php';
?>
 


<?php 
startblock('contenido');
?>
 

	<?php 
if (isset($_GET["id"])) {
    $CategoriasFront = new CategoriasFront();
    $NoticiasFront = new NoticiasFront();
    $NoticiasBack = new NoticiasBack();
    $resultado = $NoticiasBack->editarNoticia($_GET["id"]);
    while ($row = $resultado->fetch_assoc()) {
        $imagen = $NoticiasFront->imagenPortadaNoticia($row['id']);
        $categoria = $CategoriasFront->categoriaNoticia($row['id']);
        ?>
	<div >  
   	
		<div class="col-lg-12 col-md-12">	
			<div class="title-page">
				<h3>
					<i class="icon-title fa fa-flag-o red"></i><strong>Editar Noticia</strong>
					<a href="admin-noticia"> 
						<button type="button" class="text-uppercase btn btn-naranja pull-right"><i class="glyphicon glyphicon-arrow-left"></i> Volver</button>
					</a>
				</h3>
Esempio n. 3
0
}
?>

<?php 
include dirname(__FILE__) . '/layout.php';
?>
 


<?php 
startblock('contenido');
?>
 
	<?php 
if (isset($_GET["id"])) {
    $NoticiasBack = new NoticiasBack();
    $noticia = $NoticiasBack->datos($_GET["id"]);
    while ($row = $noticia->fetch_assoc()) {
        $nombreNoticia = $row['titulo'];
    }
    ?>
	<div >  
   	
		<div class="col-lg-12 col-md-12">	
			<div class="title-page">
				<h3>
					<i class="icon-title fa fa-flag-o red"></i><strong>Eliminar Categoria</strong>
					<a href="/admin-noticia"> 
						<button type="button" class="text-uppercase btn btn-naranja pull-right"><i class="glyphicon glyphicon-arrow-left"></i> Volver</button>
					</a>
				</h3>
Esempio n. 4
0
    }
    if (!validaRequerido($categoria)) {
        $errores[] = 'Debe seleccionar al menos una categoría.';
        $errorCategoria = 'Debe seleccionar al menos una categoría.';
    }
    if (empty($errores)) {
        if ($imagen != null) {
            $target_path = "uploads/";
            $token = rand(1, 10000000000000000);
            $target_path = $target_path . $token;
            if (move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
                $imagen = $token;
            }
            $imagen = $token;
        }
        $NoticiasBack = new NoticiasBack();
        $mensajeOk = $NoticiasBack->cargaNoticia($titulo, $texto, $descarga, $fecha, $imagen, $categoria);
    }
}
include 'views/back/layout.php';
?>
 

<?php 
startblock('contenido');
?>
 
<div >  
   	
		<div class="col-lg-12 col-md-12">	
			<div class="title-page">