示例#1
0
文件: approve.php 项目: hexti/troncal
include_once '../../mensagem/Mensagem.class.php';
include_once "../../ged/DAO/DocumentoDAO.php";
include_once "../../remessa/DAO/PedidoInformacaoDAO.php";
include_once "../../remessa/PedidoInformacao.class.php";
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
$titulo = "Entrada de Documentos";
if (!in_array(12, listarAcesso())) {
    // echo '<script language= "JavaScript">location.href="index.php";</script>';
}
$checkList = new CheckList();
$DAO_CK = new CheckListDAO();
$DAOMsg = new MensagemDAO();
$mensagem = new Mensagem();
$DAO = new DocumentoDAO();
$checkList->setId(limpaTexto($_GET['id']));
// Verifica se a acao de salvar foi iniciada
if (!empty($_POST['cmd']) && $_POST['cmd'] == 'aprovar') {
    connectSQL();
    /* Verifica se nao foi aprovado */
    $query = mysql_query("SELECT id FROM " . MYSQL_BASE_CHECK_LISTS . " \r\n\t\t\t\t\t\t\tWHERE aprovado IS NULL\r\n\t\t\t\t\t\t\tAND id=" . $checkList->getId());
    if (mysql_num_rows($query) > 0) {
        $checkList->setConsideracoes($_POST['consideracoes']);
        $checkList->setAprovadoSupervisor(userId());
        $checkList->setDespacha($_POST['despacha']);
        $post = array("item1", "item2", "item3", "item4", "item5", "item6", "item7", "item8", "item9", "item10", "item11", "item12", "item13", "item14", "item15", "item16", "item17");
        $lista = array();
        foreach ($post as $item) {
            // Verifica se um item foi deixado de ser selecionado
            if (!empty($_POST[$item])) {
                $lista[] = $_POST[$item];
示例#2
0
include_once '../../mensagem/Mensagem.class.php';
include_once "../../ged/DAO/DocumentoDAO.php";
include_once "../../remessa/DAO/PedidoInformacaoDAO.php";
include_once "../../remessa/PedidoInformacao.class.php";
checkUserAuth(EXTERNAL_ROOT_PORTAL . '/index.php?error=true');
include_once '../../head.php';
$titulo = "Entrada de Documentos";
if (!in_array(12, listarAcesso())) {
    // echo '<script language= "JavaScript">location.href="index.php";</script>';
}
$checkList = new CheckList();
$DAO_CK = new CheckListDAO();
$DAOMsg = new MensagemDAO();
$mensagem = new Mensagem();
$DAO = new DocumentoDAO();
$checkList->setId(limpaTexto($_GET['id']));
// Verifica se a acao de salvar foi iniciada
if (!empty($_POST['cmd']) && $_POST['cmd'] == 'aprovar') {
    connectSQL();
    /* Verifica se nao foi aprovado */
    if (1 > 0) {
        $pedido = new PedidoInformacao();
        $DAO_Pedido = new PedidoInformacaoDAO();
        $status_aprovacao = $_POST['aprovacao'];
        /*Inicio - Anexar arquivo*/
        if ($_FILES['file']['error'] != 4) {
            $uploadDir = '../../arquivos/pedido_informacao/';
            $name = sha1(date("d-m-Y H:i:s"));
            $uploadFile = $uploadDir . $name;
            $extension = pathinfo($_FILES['file']['name'], PATHINFO_EXTENSION);
            $uploadFile = $uploadFile . '.' . $extension;