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
SELECT DISTINCT * from (agenda join TIPOAGENDA ON TIPOAGENDA.tipoagenda_id=AGENDA.tipoagenda) | |
where year(agenda_data)= year(now()) | |
and ADDDATE(agenda_data, INTERVAL 1 MONTH)=ADDDATE(now(), INTERVAL 1 MONTH) | |
order by agenda_data ASC |
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 defined('BASEPATH') OR exit('No direct script access allowed'); | |
class Welcome4 extends CI_Controller { | |
/** | |
* Gera a tabela de valores sem os nomes das naturezas e | |
* foi inserido as colunas de PACOTE e NATUREZA no início | |
* e implementado a possível ordenação por orden alfabética | |
* de naturezas ou possível ordenação por ordem alfabética | |
* de pacotes ... |
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
foreach ($planilha as $info) : ?> | |
<?php $count = 0; $total = 0; $remove = 0; ?> | |
<?php if($count == 0 OR ($count % 13 == 0)) : $count++; ?> | |
<tr> | |
<?php for ($i = 0; $i < 13; $i++) : ?> | |
<?php $remove = $info[0]['ORCD_VLR']; ?> | |
<?php if($i == 0) : ?> | |
<td><?php echo $info[$i]['PCT_DESCRICAO'] ?></td> | |
<td><?php echo $info[$i]['NAT_DESCRICAO'] ?></td> | |
<?php else : ?> |
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 | |
class Carrinho { | |
private $pref = 'media_'; | |
private function existe($id) { | |
if(!isset($_SESSION[$this->pref.'produto'])) { | |
$_SESSION[$this->pref.'produto']=array(); | |
} |
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 | |
$servername = "localhost"; | |
$username = "username"; | |
$password = "password"; | |
try { | |
$conn = new PDO("mysql:host=$servername;dbname=myDB", $username, $password); | |
// set the PDO error mode to exception | |
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
<style> | |
.esconde{display:none!important} | |
</style> | |
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script> | |
<script> |
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
<!DOCTYPE html> | |
<html lang="pt-br en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Carrinho de compras</title> | |
<style> | |
.limpar { | |
border: 1px solid #963131; | |
padding: 5px 10px; | |
background-color: #e47e7e; |
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 | |
// VERIFICA SE A VARIÁVEL PROD FOI ENVIADA | |
if(!empty($_GET['prod'])){ | |
// VERIFICA SE O CARRINHO JÁ FOI CRIADO, CASO NÃO, CRIA | |
if(!isset($_SESSION["carrinho"])){ | |
// INICIANDO A SESSION | |
session_start(); | |
// CRIANDO O CARRINHO | |
$_SESSION["carrinho"] = array(); | |
} |
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
window.searchUnidadeDescr = $('.sumo_unidade_descr').SumoSelect({ | |
placeholder: 'Selecione...', | |
csvDispCount: 0, | |
captionFormat:'{0} Selecionado(s)', | |
captionFormatAllSelected:'{0} Todos Selecionados', | |
floatWidth: 600, | |
forceCustomRendering: true, | |
nativeOnDevice: ['Android', 'BlackBerry', 'iPhone', 'iPad', 'iPod', 'Opera Mini', 'IEMobile', 'Silk'], | |
outputAsCSV: false, | |
csvSepChar: ',', |
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 | |
$image = imagecreatefromjpeg($_GET['src']); | |
$filename = 'images/cropped_whatever.jpg'; | |
$thumb_width = 200; | |
$thumb_height = 150; | |
$width = imagesx($image); | |
$height = imagesy($image); |