[#] hm X_Shell Backd00r [#]
<?php
require_once '../models/Noticias.php';
$id_noticia = (isset($_REQUEST['id_noticia'])) ? $_REQUEST['id_noticia'] : null;
$id_noticia= ($_POST['id_noticia']);
$noticia = new Noticias();
$noticia->eliminar($id_noticia);
echo '
<table class="table table-striped table-hover">
<thead>
<tr>
<th>Titulo</th>
<th>Contenido</th>
<th>Fecha de creacion</th>
<th>opciones</th>
</tr>
</thead>
' ;
$noticia = Noticias::verNoticias();
foreach($noticia as $item):
$titulo_enc = utf8_encode($item['titulo']);
echo '
<tr id="noticia-'. $item['id_noticia'].' ">
<td>'.$titulo_enc. '</td>
<td>
<span class="glyphicon glyphicon-book "
data-idnoticia="'. $item['id_noticia'].'" onClick="vistaPrevia(this)" >
</span> leer contenido </td>
</td>
<td>'. $item['fecha_creacion']. '</td>
<td>
<span class="glyphicon glyphicon-pencil pencil"
data-idnoticia="'.$item['id_noticia'].'" onClick="vistaEditar(this)">
</span>
<span class="glyphicon glyphicon-trash trash" data-idnoticia="'.$item['id_noticia'].'" onClick="eliminar(this)"></span>
</td>
</tr>';
endforeach;
echo '
</table>
';
function sanear_string($string){
$no_permitidas= array ("À","Ã","Ì","Ò","Ù","Ù","à ","è","ì","ò","ù","ç","Ç","â","ê","î","ô","û","Â","Ê","ÃŽ","Ô","Û","ü","ö","Ö","ï","ä","«","Ò","Ã","Ä","Ë",'"');
$permitidas= array ("A","A","I","O","U","a","e","i","o","u","ù","c","C","a","e","i","o","u","A","E","I","O","U","u","o","O","i","a","e","U","I","A","E",' ');
$string = str_replace($no_permitidas, $permitidas ,$string);
return $string;
}
?>
Mr.hm X_Shell Backd00r 1.0, Coded By Mr.hm X_Shell Backd00r