Exemple #1
0
<?php

include_once '../../includes.sys/ini.php';
include_once '../../includes.sys/metodos.php';
include_once '../DAO/PendenciaDAO.php';
include_once '../Pendencia.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
$pendencia = new Pendencia();
$DAO = new PendenciaDAO();
$pendencia->setId(limpaTexto($_GET['id']));
$resultado = $DAO->Listar("SELECT * FROM " . MYSQL_BASE_PENDENCIA . " WHERE concluido='N' AND id=" . $pendencia->getId());
foreach ($resultado as $item) {
    $pendencia->setUsuario($item['id_documento_pendente']);
    $pendencia->setDescricao($item['descricao']);
    $pendencia->setDocumentoPendente($item['id_documento_pendente']);
    $pendencia->setResponsavel($item['responsavel']);
    $pendencia->setDataLimite($item['limite']);
    $pendencia->setEmailResponsavel($item['email']);
}
?>
<!-- topbar ends -->
<div class="container-fluid">
	<div class="row-fluid">

		<!-- left menu starts -->
		<div class="span2 main-menu-span">
				<?php 
include_once '../menu.php';
?>
			</div>
Exemple #2
0
<?php

include_once '../../includes.sys/ini.php';
include_once '../../includes.sys/metodos.php';
include_once '../DAO/PendenciaDAO.php';
include_once '../Pendencia.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
$pendencia = new Pendencia();
$DAO = new PendenciaDAO();
//Verifica se a opcao de salvar foi iniciada
if (!empty($_POST['cmd']) && $_POST['cmd'] == 'finalizar') {
    $pendencia->setDocumentoCorrigido($_POST['documento']);
    $pendencia->setId(limpaTexto($_POST['id']));
    if ($pendencia->getDocumentoCorrigido() != NULL) {
        $retorno = $DAO->Atualizar($pendencia);
        if ($retorno == true) {
            echo '<script language= "JavaScript">alert("Registro alterado com sucesso");</script>';
            echo '<script language= "JavaScript">location.href="index.php";</script>';
        }
    } else {
        echo '<script language= "JavaScript">alert("Escolha o documento");</script>';
    }
} else {
    $pendencia->setId(limpaTexto($_GET['id']));
    $resultado = $DAO->Listar("SELECT * FROM " . MYSQL_BASE_PENDENCIA . " WHERE concluido='N' AND id=" . $pendencia->getId());
    foreach ($resultado as $item) {
        $pendencia->setUsuario($item['id_documento_pendente']);
        $pendencia->setDescricao($item['descricao']);
        $pendencia->setDocumentoPendente($item['id_documento_pendente']);
    }
Exemple #3
0
<?php

include_once '../../includes.sys/ini.php';
include_once '../../includes.sys/metodos.php';
include_once '../DAO/PendenciaDAO.php';
include_once '../../cadastros/Usuario.class.php';
include_once '../Pendencia.class.php';
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
$usuario = new Usuario();
$pendencia = new Pendencia();
$DAO = new PendenciaDAO();
//Verifica se a opcao de salvar foi iniciada
if (!empty($_POST['cmd']) && $_POST['cmd'] == 'inserir') {
    $pendencia->setUsuario(userId());
    $pendencia->setDocumentoPendente($_POST['documento']);
    $pendencia->setIdPessoa($_POST['responsavel']);
    $pendencia->setDescricao($_POST['descricao']);
    $pendencia->setConcluido('N');
    $pendencia->setDataLimite($_POST['dataPrazo']);
    $pessoa = $_POST['responsavel'];
    //Verifica se todos os campos foram digitados
    if ($pendencia->getDocumentoPendente() != NULL && $pendencia->getDescricao() != NULL && $pendencia->getDataLimite() != NULL) {
        $retorno = $DAO->Gravar($pendencia);
        // 		die(print_r($retorno));
        if ($retorno == true) {
            $retorno = $DAO->Listar("SELECT cod_documento FROM " . MYSQL_BASE_DOCUMENTOS . " WHERE id=" . $pendencia->getDocumentoPendente());
            foreach ($retorno as $item) {
                $cod_documento = $item['cod_documento'];
            }
            //---------Envio de e-mail-Inicio-----------------