This file contains hidden or 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 | |
$url = 'https://www.google.com.br/'; | |
public static function extrairNome($url) | |
{ | |
$host = parse_url($url, PHP_URL_HOST); | |
$partes = explode('.', $host); | |
return $partes[0]; | |
} |
This file contains hidden or 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
var errorMessage = 'OCORREU UM ERRO'; | |
__adianti_message('warning', errorMessage); |
This file contains hidden or 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 | |
# EXEMPLO: LockRegisterService::checkLocked($object,'ClienteList'); | |
class LockRegisterService | |
{ | |
public static function checkLocked($object, $listClass = NULL) | |
{ | |
$userid = TSession::getValue('userid'); | |
$lock_time = 5; # 5 MINUTOS |
This file contains hidden or 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->disableAutoComplete(); | |
$cpf->disableAutoComplete(); | |
$celular->disableAutoComplete(); |
This file contains hidden or 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 | |
$array = ["A", "B", "C"]; | |
$dados = implode(", ", $array); | |
# RETORNO: A, B, C |
This file contains hidden or 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 | |
# VendaForm | |
public function onAddDetailVendaItemVenda($param = null) | |
{ | |
try | |
{ | |
$data = (object) $param; |
This file contains hidden or 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
Menu iniciar | |
Powershell em modo administrador | |
Comando: irm https://massgrave.dev/get | iex | |
Opção 1 |
This file contains hidden or 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 | |
if ($value < 0) | |
{ | |
$valor = 'R$ '.number_format($value,2,',','.'); | |
return "<span style = 'color:white;background-color:#F44336;padding:6px;border-radius:7px;font-weight:600'>$valor</span>"; | |
} elseif ($value > 0) { | |
$valor = 'R$ '.number_format($value,2,',','.'); | |
return "<span style = 'color:white;background-color:#3F51B5;padding:6px;border-radius:7px;font-weight:600'>$valor</span>"; |
This file contains hidden or 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 | |
if ($value > 0 or $value < 0) | |
{ | |
$valor = 'R$ '.number_format($value,2,',','.'); | |
return "<span style ='color:white;background-color:#F44336;padding:6px;border-radius:7px;font-weight:600'>$valor</span>"; | |
} else { | |
return ''; | |
} |
This file contains hidden or 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 | |
if ($value > 0) | |
{ | |
$valor = 'R$ '.number_format($value,2,',','.'); | |
return "<span style = 'color:white;background-color:#009688;padding:6px;border-radius:7px;font-weight:600'>$valor</span>"; | |
} else { | |
return ''; | |
} |