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 nulo (event) { | |
return true; | |
} | |
if(sessionStorage.getItem('enterToSend') === 'true'){ | |
document.getElementById('enterToSend').setAttribute('checked', true); | |
document.getElementById('mensagem').addEventListener('keydown', function(e) { | |
if(e.keyCode == 13) { | |
document.getElementById('enviaMensagem').click(); |
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 onMessageClick(e) { | |
if(e.keyCode == 13) { | |
document.getElementById('enviaMensagem').click(); | |
} | |
} | |
if(sessionStorage.getItem('enterToSend') === 'true'){ | |
document.getElementById('enterToSend').setAttribute('checked', true); | |
document.getElementById('mensagem').addEventListener('keydown', onMessageClick); | |
} else { |
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 | |
defined('BASEPATH') OR die('404. That’s an error.'); | |
/** | |
* Substitua o arquivo `application/config/routes.php` por este. (Salve suas rotas antes :D ) | |
* Crie o diretório `application/routes`. | |
* Em seguida só criar quantos arquivos de rotas desejar. | |
* Normalmente crio um arquivo de rota para cada área do meu sistema, exemplo: | |
* `dashboard.php`, `perfil.php`, `login.php`, `exemplo.php`. | |
**/ |
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 | |
defined('BASEPATH') OR exit('No direct script access allowed'); | |
class Password { | |
/** | |
* Cria o password | |
*/ | |
public function create($password_input) | |
{ |
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 | |
/** | |
* exemplo: $array_de_arrays = array( | |
* array('linha1.coluna1', 'linha1.coluna2', 'linha1.coluna3'), | |
* array('llinha2.coluna1', 'linha2.coluna2', 'linha2.coluna3') | |
* ); | |
**/ | |
function writeCSV($local_do_arquivo, $array_de_arrays) { | |
$arquivo = fopen($local_do_arquivo, 'w'); |
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
#FORÇAR HTTPS E URLS AMIGÁVEIS | |
RewriteEngine on | |
RewriteCond $1 !^(index\.php|resources|robots\.txt) | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ index.php/$1 [L,QSA] | |
RewriteCond %{HTTP_HOST} \. | |
RewriteCond %{HTTPS} off | |
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} |
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
//EXEMPLO: | |
// QUERO PEGAR EQUIPAMENTOS DA TABELA EQUIPAMENTOS E GERA O .CSV : | |
function writeCSV($nome_do_arquivo, $array_de_arrays, $array_de_indices = array()) { | |
$arquivo = fopen(FCPATH.$nome_do_arquivo, 'w'); | |
array_unshift($array_de_arrays, $array_de_indices); | |
foreach ($array_de_arrays as $array) { |
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
/** | |
* use no form: enctype="multipart/form-data" | |
**/ | |
public function insert_foto($equipamento) | |
{ | |
$config['upload_path'] = FCPATH . 'public/application/equipamentos/fotos'; | |
$config['allowed_types'] = 'jpg|png|jpeg|gif|tif'; | |
$config['max_size'] = 1024 * 5; |
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 | |
defined('BASEPATH') OR exit('No direct script access allowed'); | |
class Index_controller extends Sistema_controller { | |
#GET: /admin/servicos/clientes/id | |
public function clientes_by_id() |
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="pt-br"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Seleção de lugares</title> | |
<style> | |
*, *:before, *:after { |
OlderNewer