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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
</head> | |
<body> | |
<div id="main"> | |
<div id="header"></div> |
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 | |
if($_SERVER['REQUEST_METHOD'] == 'POST'){ | |
//Instancia a classe PDO | |
$pdo = new PDO("mysql:host=localhost;dbname=exemplo", "root", ""); | |
//Recupera o nome da empresa | |
$company = filter_input(INPUT_POST, 'company', FILTER_SANITIZE_ENCODED); |
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 ContaBancaria{ | |
private $saldo; | |
public function __construct($saldo){ | |
$this->saldo = $saldo; | |
} |
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 | |
//Define a interface, para usar melhor o polimorfismo | |
interface Shipping{ | |
public function calculate(); | |
} | |
//Cria uma classe abstrata, vai define alguns valores padrões | |
abstract class AbstractShipping implements Shipping{ | |
protected $weight; |
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
jQuery(function(){ | |
jQuery('#ac-ts-1').click(function(){ | |
var accordion = jQuery('#accordion-ts'); | |
if(accordion.hasClass('accordi-off')){ | |
accordion.removeClass('accordi-off').addClass("accordi-on"); | |
}else{ | |
accordion.removeClass('accordi-on').addClass("accordi-off"); | |
} | |
}); | |
}); |
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
jQuery(function(){ | |
accordionEffect("#ac-ts-1", "#accordi-on1"); | |
accordionEffect("#ac-ts-2", "#accordi-on2"); | |
accordionEffect(".ac-ts-3", "#accordi-on3", "ts3-"); | |
}); | |
/** | |
Define uma função abstrair o efeito accordion | |
@var bclick = Elemento que receberá o click | |
@var target = Elemento que irá sofrer o efeito |
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 | |
$destino = 'webmasters@site.com.br'; | |
$assunto = 'Formulario de contato'; | |
$cabecalho = 'From: email@seusite.com.br'."\n\r"; | |
$cabecalho = 'Reply-to: '.$_POST['email']; | |
$mensagem = 'Forma a mensagem com os dados vindo do formularui'; |
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 | |
$date = date("d/m/Y h:i"); | |
$ip = $_SERVER["REMOTE_ADDR"]; | |
$navegador = $_SERVER['HTTP_USER_AGENT']; | |
$nome = $_POST["nome"]; | |
$email = $_POST["email"]; | |
$telefone = $_POST["telefone"]; | |
$mensagem = $_POST["mensagem"]; |
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 | |
$mailchimp = new MailChimpManager(); | |
$mailchimp->firstname('Primeiro Nome') | |
->lastname('Ultimo Nome') | |
->city('Cidade') | |
->country('Rio de Janeiro') | |
->genre(MailChimpManager::MASC) | |
->deal(MailChimpManager::YES) |
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 | |
$mailChimpManager = new MailChimpManager(); | |
//Verifica se tem o mailchimp | |
if($mailChimpManager->has($email)){ | |
//definino a loja | |
$store_id = 0; | |
//Informa sim ou não | |
$mailChimpManager->subscription(MailChimpManager::YES); | |
//altero |