Example #1
0
include_once '../../includes.sys/ini.php';
include_once '../../includes.sys/metodos.php';
include_once '../DAO/CheckListDAO.php';
include_once '../CheckList.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
$titulo = "Documentos Obsoletos";
$checkList = new CheckList();
$DAO = new CheckListDAO();
if (!in_array(178, listarAcesso())) {
    echo '<script language= "JavaScript">location.href="' . EXTERNAL_ROOT_PORTAL . '/modulos.php";</script>';
}
if (!empty($_GET['cmd']) && $_GET['cmd'] == 'del') {
    $id = ValidateInteger(INPUT_GET, 'id');
    $retorno = $DAO->Deletar($id);
    if ($retorno == 1) {
        echo '<script language= "JavaScript">alert("Registro removido com sucesso");</script>';
        echo '<script language= "JavaScript">location.href="index.php";</script>';
    } else {
        print_r($retorno);
    }
}
$aprovado = mysql_query("SELECT \r\n\t\t\t\t\t\t\t\tCK.* \r\n\t\t\t\t\t\t\tFROM \r\n\t\t\t\t\t\t\t\t" . MYSQL_BASE_PROJETOS . " P\r\n\t\t\t\t\t\t\t    INNER JOIN " . MYSQL_BASE_CHECK_LISTS . " CK ON CK.id = P.id_check_list\r\n\t\t\t\t\t\t\tWHERE \r\n\t\t\t\t\t\t\t\tCK.status = 'O';");
$num_obsoleto = mysql_num_rows($aprovado);
?>
<style>
<!--
	a:HOVER {
		text-decoration: none;
	}