Skip to content

Instantly share code, notes, and snippets.

View fayqLs's full-sized avatar

FABRICIO fayqLs

View GitHub Profile
@fayqLs
fayqLs / .php
Created December 7, 2024 04:55
SUBLINHAR LINHA DATAGRID
<?php
function($value, $object, $row)
{
if (object->feito == 1)
{
$row->style = 'text-decoration:line-through;';
}
return $value;
@fayqLs
fayqLs / .htaccess
Created November 26, 2024 16:53
DIRECIONAR A ABERTURA DO SISTEMA PARA O SITE HTML
DirectoryIndex index.html index.php
@fayqLs
fayqLs / .php
Created November 24, 2024 17:56
CRIAR PASTA COM PERMISSÃO
<?php
$pasta_pdf = 'app/output/pdf/';
if (!is_dir($pasta_pdf ))
{
mkdir($pasta_pdf , 0777, true);
}
/* GRUPOS DE PERMISSÃO
0777 - Leitura, escrita e execução para todos. Acesso total a todos os usuários.
@fayqLs
fayqLs / pais.sql
Created November 4, 2024 22:26
SQL INSERT TABELA PAIS (MySQL)
-- ESTRUTURA DA TABELA "pais"
DROP TABLE IF EXISTS `pais`;
CREATE TABLE `pais` (
`id` int(11) NOT NULL,
`nome` varchar(60) DEFAULT NULL,
`nome_pt` varchar(60) DEFAULT NULL,
`sigla` varchar(2) DEFAULT NULL,
`bacen` int(5) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
@fayqLs
fayqLs / estado.sql
Created November 4, 2024 22:23
SQL INSERT TABELA ESTADO (MySQL)
-- ESTRUTURA DA TABELA "estado"
CREATE TABLE `estado` (
`id` int(11) NOT NULL,
`nome` varchar(75) DEFAULT NULL,
`uf` varchar(2) DEFAULT NULL,
`ibge` int(2) DEFAULT NULL,
`pais` int(3) DEFAULT NULL,
`ddd` varchar(50) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
@fayqLs
fayqLs / cidade.sql
Created November 4, 2024 22:21
SQL INSERT TABELA CIDADE (MySQL)
-- ESTRUTURA DA TABELA "cidade"
DROP TABLE IF EXISTS `cidade`;
CREATE TABLE `cidade` (
`id` int(11) NOT NULL,
`nome` varchar(120) DEFAULT NULL,
`uf` int(2) DEFAULT NULL,
`ibge` int(7) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
@fayqLs
fayqLs / .php
Created October 30, 2024 06:40
CARREGAR IMAGEM NO TImage EM EDIÇÃO
<?php
$systemUnit = SystemUnit::find(TSession::getValue('userunitid'));
if ($systemUnit)
{
if ($systemUnit->logomarca)
{
$this->img_logomarca->src = $systemUnit->logomarca;
}
}
@fayqLs
fayqLs / .php
Created October 25, 2024 05:52
SALVAR DADOS ARRAY ENTRE FORMULÁRIO DE ETAPAS
<?php
public function onAvancar($param = null) # MÉTODO 1º FORMULÁRIO
{
try
{
$this->form->validate();
$data = $this->form->getData();
$object = (array) $data;
@fayqLs
fayqLs / .php
Created October 25, 2024 05:22
MÉTODO DE PROFISSÕES
<?php
# EXEMPLO DE USO: Funcao::profissoes()
class Funcao
{
public static function profissoes()
{
$profissoes = array(
'Administrador' => 'Administrador',
@fayqLs
fayqLs / .css
Created October 25, 2024 04:13
OCULTAR TÍTULO FORMULÁRIO
div[page-name="NomeClasse"] .card-header.panel-heading {
display: none !important;
}