Skip to content

Instantly share code, notes, and snippets.

@carlosleonam
carlosleonam / PedidosReport.php
Created October 21, 2021 12:30
Relatório de Pediidos em TCPDF ( by Paulo Guimarães )
<?php
/**
* PedidosReport Report
* @author <your name here>
*/
include_once('vendor/tecnickcom/tcpdf/tcpdf_include.php');
class AWIPDF extends TCPDF
@carlosleonam
carlosleonam / DuplicataReport.php
Last active April 20, 2024 01:32
Modelo Duplicata com TCPDF ( by Paulo Guimarães )
<?php
/**
* DuplicataReport Report
* @author <your name here>
*/
include_once('vendor/tecnickcom/tcpdf/tcpdf_include.php');
@carlosleonam
carlosleonam / ReciboReport.php
Last active October 21, 2021 12:23
Recibo com TCPDF (by Paulo Guimarães)
<?php
class ReciboReport extends TWindow
{
/**
* Generate the report
*/
public function __construct($param)
@carlosleonam
carlosleonam / GerarRelatorioJasperForm.cphp
Created October 19, 2021 03:01
Gerar Relatorio no Jasper (Form) (by @fernando Fernandes)
<?php
use Adianti\Control\TWindow;
class GeraRelatorioForm extends TWindow
{
protected $form; // formulário
private $valueField;
private $datagrid; // listing
private $pageNavigation;
@carlosleonam
carlosleonam / adianti_url_limpa.md
Last active September 30, 2021 17:28
Ativar a URL 'limpa' em sistemas no Adianti Framework.

Ativar a URL 'limpa' em sistemas no Adianti Framework.

Precisamos ir acrescentando camadas de segurança, para aplicativos hospedados na WEB.

// Check is LOCAL
if (window.location.host.replace(/(localhost|127\.0\.0\.1)(:\d+)?/i, "") !== '') {

    Adianti.registerState = false;  // Disable URL parameters
@carlosleonam
carlosleonam / check_host_location.md
Last active September 30, 2021 15:04
Check if HOST is local (localhost) or remote (WEB)

Check if HOST is local (localhost) or remote (WEB)

Put below code in your JS file:

// Check is LOCAL
if (window.location.host.replace(/(localhost|127\.0\.0\.1)(:\d+)?/i, "") == '') {
    // youtr code here

}
@carlosleonam
carlosleonam / mysql_backup.sh
Created September 22, 2021 20:10 — forked from tleish/mysql_backup.sh
Bash Script to backup all MySQL databases
#!/bin/bash
#==============================================================================
#TITLE: mysql_backup.sh
#DESCRIPTION: script for automating the daily mysql backups on development computer
#AUTHOR: tleish
#DATE: 2013-12-20
#VERSION: 0.4
#USAGE: ./mysql_backup.sh
#CRON:
# example cron for daily db backup @ 9:15 am
@carlosleonam
carlosleonam / controle_remoto_s42.md
Last active August 22, 2021 18:54
Análise dos Fontes do S42

Análise do S42

Digitação de Documentos

Atualização

Procedimento que gera o S4203.DBF (CADMOV), a partir das notas em S4208 (DIGNOT) e S4209 (ITENOT)

@carlosleonam
carlosleonam / php_clean_seesion_files.md
Last active July 30, 2021 18:00
Force CLEAN session files in PHP server.

Force CLEAN session files in PHP server.

OPTION 1

Every 30 minutes, not on the hour

Grabs maxlifetime directly from `php -i`

doesn't care if /var/lib/php5 exists, errs go to /dev/null

@carlosleonam
carlosleonam / calling_loading.md
Last active June 25, 2021 20:44
Chamado a tela "Carregando..." (by Whatsapp Adianti Group)

Adianti Framework - Chamando o "Carregando..." (loading)

// Chamando o aviso
$script = new TElement('script');
$script->type = 'text/javascript';
$script->add('$.blockUI({ message: "", fadeIn: 0, fadeOut: 0, css: { border: "none", top: "100px", left: 0, maxWidth: "300px", width: "inherit", padding: "15px", backgroundColor: "#000", "border-radius": "5px 5px 5px 5px", opacity: .5, color: "#fff" } });');
parent::add($script);