Example #1
0
    $html .= '<b>' . buscaCampo("comentarios_texto", "SELECT", "vistoria", "comentarios_texto", "os =" . $os) . '</b>';
    $html .= '</td>';
    $html .= '</tr>';
    $html .= '</table>';
    $html .= '<b>Relatório gerado pelo Sistema Engenharia de Campo em ' . date("d/m/Y") . ' às ' . date("h:i:s") . '</b></td>';
    $html .= '</td>';
    $html .= '</tr>';
    $html .= '</table>';
    $html .= '</center>';
    $html .= '</body>';
    $html .= '</html>';
    echo $html;
    /*
    //Cria o relatório em HTML
    $html_path = realpath($_SERVER['DOCUMENT_ROOT']) .'\\files\\fotos\\'. $os .'\\'. $os .'.html';
    $fo_html = fopen($html_path,'w');
    fwrite($fo_html, $html);
    fclose($fo_html);
    
    //Converte o relatório em PDF
    define('MPDF_PATH', realpath($_SERVER['DOCUMENT_ROOT']) .'\\modulos\\');
    $pdf_path = realpath($_SERVER['DOCUMENT_ROOT']) .'\\files\\fotos\\'. $os .'\\'. $os .'.pdf';
    
    include(MPDF_PATH . 'mpdf56/mpdf.php');
    $mpdf = new mPDF();
    $mpdf->WriteHTML($html);
    $mpdf->Output($pdf_path,'F');
    */
}
geraMomentoSKY(48787160);
Example #2
0
    $html .= '</table>';
    $html .= '<b>Relatório gerado pelo Sistema Engenharia de Campo em ' . date("d/m/Y") . ' às ' . date("h:i:s") . '</b></td>';
    $html .= '</td>';
    $html .= '</tr>';
    $html .= '</table>';
    $html .= '</center>';
    $html .= '</body>';
    $html .= '</html>';
    echo $html;
    /*
    //Cria o relatório em HTML
    $html_path = realpath($_SERVER['DOCUMENT_ROOT']) .'\\files\\fotos\\'. $os .'\\'. $os .'.html';
    $fo_html = fopen($html_path,'w');
    fwrite($fo_html, $html);
    fclose($fo_html);
    
    //Converte o relatório em PDF
    define('MPDF_PATH', realpath($_SERVER['DOCUMENT_ROOT']) .'\\modulos\\');
    $pdf_path = realpath($_SERVER['DOCUMENT_ROOT']) .'\\files\\fotos\\'. $os .'\\'. $os .'.pdf';
    
    include(MPDF_PATH . 'mpdf56/mpdf.php');
    $mpdf = new mPDF();
    $mpdf->WriteHTML($html);
    $mpdf->Output($pdf_path,'F');
    */
}
if (isset($_GET['ano']) && isset($_GET['mes']) && isset($_GET['tipo'])) {
    geraMomentoSKY($_GET['ano'] . '-' . $_GET['mes'], $_GET['tipo']);
} else {
    header('Location: http://' . $_SERVER['HTTP_HOST'] . '/km');
}
Example #3
0
        $html .= '<td id="borded-1px" onMouseOver="this.style.backgroundColor=\'#ff0\';this.style.cursor=\'pointer\';" onMouseOut="this.style.backgroundColor=\'#fff\'">';
        if ($_SESSION['nivel_acesso'] < 3) {
            $html .= '<b><a href="javascript:if(confirm(\'Deseja alterar o status dessa indicação?\')){if(' . $_GET['nvl'] . '<2){alert(\'Indicação alterada com sucesso!\');document.location.href=\'napista.php?sel=' . $_GET['sel'] . '&nvl=' . $_GET['nvl'] . '&ano=' . $_GET['ano'] . '&mes=' . $_GET['mes'] . '&tipo=' . $_GET['tipo'] . '&alterar=' . $row['os'] . '&status=' . (!$row['selecionada'] ? 1 : 0) . '\'}else{alert(\'Você não tem permissão para fazer alterações nesta página!\')}}">' . ($row['selecionada'] ? 'EXCLUIR' : 'INCLUIR') . ' INDICAÇÃO</a>';
        }
        $html .= '</td>';
        $html .= '<td colspan=4 id="borded-1px">';
        $html .= '<b>' . $row['comentarios_texto'] . '</b>';
        $html .= '</td>';
        $html .= '</tr>';
        //ULTRAPASSAGENS - FIM
        $indice++;
    }
    $html .= '</table>';
    $html .= '<b>Relatório gerado pelo Sistema Engenharia de Campo em ' . date("d/m/Y") . ' às ' . date("h:i:s") . '</b></td>';
    $html .= '</td>';
    $html .= '</tr>';
    $html .= '</table>';
    $html .= '</center>';
    $html .= '</body>';
    $html .= '</html>';
    echo $html;
}
if (isset($_GET['ano']) && isset($_GET['mes']) && isset($_GET['tipo'])) {
    if (isset($_GET['alterar'])) {
        $query = 'UPDATE vistoria_indicacao_momento_sky SET selecionada = ' . $_GET['status'] . ' WHERE os = ' . $_GET['alterar'];
        $result = mysql_query($query);
    }
    geraMomentoSKY($periodo_inicial, $periodo_final, $tipo);
} else {
    header('Location: http://' . $_SERVER['HTTP_HOST'] . '/km');
}