Exemple #1
0
echo $msgpulsado;
/* SELECT */
include_once "classes/class.personal.php";
$personal = new personal();
$personal->select($id);
$nombre = $personal->getnombre();
$apellido = $personal->getapellido();
$login = $personal->getlogin();
$role = $personal->getrole();
if ($_POST['confirm']) {
    $id = $_POST['id_personal'];
    /* DELETE */
    include_once "classes/class.personal.php";
    $personald = new personal();
    $personald->select($id);
    $personald->delete($id);
    echo '<div class="notify"><p>personal, eliminado!</p><p><a href="v_personal.php">Regresar</a></p></div>';
    $_SESSION['msg_ok'] = 'personal, eliminado!';
    header('Location: ' . BASEURL . '/personal/v_personal.php');
} else {
    echo '
<div class="item-content-prod-edit">
<form action="d_personal.php?id=' . $id . '" id="simpleform" method="post">
		<div class="barra-prod-edit"><span>Eliminar personal</span></div>
	
			<div class="form-item">
				<label for=""></label>
				<span>Confirma Eliminar este personal? <input type="checkbox" name="confirm" id="confirm" class="checkbox" /></span>
			<input type="hidden" name="id_personal" name="id_personal" value="' . $id . '" />
			<input type="hidden" name="pulsado" value="1" />