tar cf - <files> -P | pv -s $(du -sb <files> | awk '{print $1}') | gzip > <some .tar.gz file>
where:
- `` is the root-mounted (i.e. starts with /) path to the files
<?php | |
# COM FILTRO | |
$qtd_produtos = Produto::where('grupo', '=', 'BEBIDAS')->count(); | |
# SEM FILTRO, TODOS OS REGISTROS | |
$qtd_produtos = Produto::count(); |
<?php | |
$login_usuario = TSession::getValue('login'); |
<?php | |
$nome_usuario = TSession::getValue('username'); |
<?php | |
ini_set('display_errors',0); | |
class PessoaForm extends TPage | |
{ | |
public static function onCEP($param = null) | |
{ | |
try |
<?php | |
// COM true, IRÁ SALVAR SEM A MÁSCARA DO CAMPO | |
$telefone->setMask('(99) 9999-9999', true); | |
TEntry::changeMask(self::$formName, 'cpf', '999.999.999-99'); | |
TEntry::changeMask(self::$formName, 'cnpj', '999.999.999-99'); |
<?php | |
// DEFININDO A AÇÃO DA COMBOX TIPO PESSOA AO MUDAR DE OPÇÃO | |
$tipo_pessoa->setChangeAction(new TAction([$this,'onTipoPessoa'])); | |
// cpf_cnpj É O NOME DO CAMPO CPF / CNPJ | |
// FUNÇÃO DA COMBO TIPO PESSOA | |
public static function onTipoPessoa($param = null) | |
{ |
<?php | |
public static function buscarEmpresa($param = null) | |
{ | |
if ($param['cnpj']) | |
{ | |
$cnpj = str_replace(['.','-','/',' '],['','','',''], $param['cnpj']); | |
$content = file_get_contents("https://www.receitaws.com.br/v1/cnpj/{$cnpj}", false, stream_context_create([ | |
"ssl" => [ |
<?php | |
# VIA CONSTRUCT | |
$this->datagrid = new BootstrapDatagridWrapper($this->datagrid); | |
$this->filter_criteria = new TCriteria; | |
$unidade_id = TSession::getValue("userunitid"); | |
$this->filter_criteria->add(new TFilter('system_unit_id', '=', $unidade_id)); |
<?php | |
public function __construct($param = null) | |
{ | |
parent::__construct(); | |
// creates the form | |
$this->form = new BootstrapFormBuilder(self::$formName); | |
// define the form title |