Discover gists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public static function exportarProdutos($param = null) | |
{ | |
TTransaction::open(self::$database); | |
$arquivo = 'app/output/'.uniqid().'.xls'; | |
$largura_colunas = [100,400,100]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
TScript::create("$('label:contains(\"PARCELAR\")').css('margin-top','14px');"); | |
# PARCELAR É A DESCRIÇÃO DA TLabel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Funcao | |
{ | |
public static function unidadeLogada() | |
{ | |
TTransaction::open('permission'); | |
$unit_id = TSession::getValue('userunitid'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
new TQuestion("DESEJA SALVAR?", new TAction([__CLASS__, 'onYes'], $param), NULL, 'ATENÇÃO!','SIM','NÃO'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$imagem = $object->imagem; | |
TScript::create("$('#img').attr('src', 'download.php?file={$imagem}')"); | |
# COM LINK EXTERNO | |
TScript::create("$('#img').attr('src', '{$imagem}'"); | |
# img É O ID DO COMPONENTE TImage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
TScript::create("$(\".tab-name:contains('DADOS PESSOAIS')\").click();"); | |
# DADOS PESSOAIS É O NOME DA ABA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as P from 'parsimmon' | |
import Day from '~/utils/Day' | |
import Month from '~/utils/Month' | |
const shortMonths = { | |
jan: 1, | |
feb: 2, | |
mar: 3, | |
apr: 4, | |
may: 5, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function __construct($param) | |
{ | |
parent::__construct(); | |
# CRIA A AÇÃO PARA EXECUTAR O MÉTODO QUE IRÁ SALVAR A TAB QUE O USUÁRIO SELECIONOU | |
$abaSelecionada = new TAction([$this, 'abaSelecionada']); | |
$this->form->setTabAction($abaSelecionada); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ini_set('session.gc_maxlifetime', 1800); # 1800 SEGUNDOS = 30 MINUTOS | |
session_start(); # INICIA A SESSÃO | |
# OU VIA php.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$nome_completo = 'FABRICIO ALMEIDA'; | |
$array = explode(' ', $nome); | |
# RETORNO DO explode | |
Array | |
( | |
[0] => FABRICIO |
NewerOlder