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
######################################################################## | |
# OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2.0.6 - 10/2022 | |
# ---------------------------------------------------------------------- | |
# @Author: Andreas Hecht | |
# @Author URI: https://seoagentur-hamburg.com | |
# License: GNU General Public License v2 or later | |
# License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
######################################################################## | |
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
function calculateDifferenceBetweenTwoPeriods($start, $end) { | |
$start = new DateTime($start); | |
$end = new DateTime($end); | |
$interval = $start->diff($end); | |
//Uncomment the line below to see all the returned values for the difference. | |
//print_r($interval); | |
$hour = str_pad($interval->h, 2, '0', STR_PAD_LEFT); |
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
//onScriptInit | |
[sw_i] = array(); | |
echo <<<HTML | |
<style> | |
input#rec_f0_top { | |
width: 160px !important; | |
padding: 10px !important; | |
} | |
</style> |
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
?> | |
<style> | |
.scFormToolbar { | |
display: none !important; | |
} | |
.scFormBorder { | |
border-style: none !important; | |
} | |
td.scFormLabelOddMult.btnNovoCM { | |
padding: 0 10px !important; |
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
$cnpj = {cnpj}; | |
$webservice = "https://www.receitaws.com.br/v1/cnpj/".$cnpj; | |
$consulta = file_get_contents($webservice); | |
$retorno = json_decode($consulta,true); | |
if($retorno["status"] == "OK") { | |
if($retorno["situacao"] == "ATIVA") { | |
{razao_social} = $retorno["nome"]; | |
{nome_fantasia} = $retorno["fantasia"]; | |
{cep} = str_replace(".", "", str_replace("-", "", $retorno["cep"])); |
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
Requisitos: | |
- Precisa habilitar a opção "Linhas" na barra de ferramentas inferior. | |
- Precisa habilitar a opção "Navegação por página" na barra de ferramentas inferior. | |
- Precisa deixar a grid com a opção "Paginação = Parcial" com "10 registros" por vez. | |
- Este código deve ser jogado no evento onScriptInit da grid(consulta). | |
Atenção: | |
- Onde tiver "10000" você troca pela quantidade de segundos que deseja que a paginação aconteça. | |
- Essa quantidade equivale a 10 segundos. |
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
1° - Coloquei na query pra pegar somente o dia atual. | |
SELECT * FROM calendar WHERE STR_TO_DATE(CONCAT(start_date, " ", start_time), "%Y-%m-%d %H:%i:%s") >= NOW() AND STR_TO_DATE(CONCAT(start_date, " ", start_time), "%Y-%m-%d %H:%i:%s") <= NOW() + INTERVAL 24 HOUR; | |
2° - Coloquei esses links no evento onScriptInit para poder importar o link do fontawesome e da biblioteca animate pra animar o sino. | |
echo <link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous"> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css">'; | |
3° - Coloquei esse código no evento onRecord para habilitar o sino de acordo com o tempo de proximidade. |
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
//função | |
function setAttributes(el, attrs) { | |
for (var key in attrs) { | |
el.setAttribute(key, attrs[key]); | |
} | |
} | |
//chamada da função | |
setAttributes(inputFile, { "id": idName, "class": "scFormObjectOdd", "type": "text", "value": idName }); |
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
?> | |
<style> | |
.loader { | |
position: fixed; | |
left: 0px; | |
top: 0px; | |
width: 100%; | |
height: 100%; | |
z-index: 9999; | |
background: url('http://i.imgur.com/zAD2y29.gif') 50% 50% no-repeat white; |