Skip to content

Instantly share code, notes, and snippets.

View mvnp's full-sized avatar
🏠
Working from home

Marcos Pereira mvnp

🏠
Working from home
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<table border="1" width="100%">
<thead>
<tr>
<th>Name</th>
<?php
/**
* CodeIgniter
*
* An open source application development framework for PHP
*
* This content is released under the MIT License (MIT)
*
* Copyright (c) 2014 - 2017, British Columbia Institute of Technology
*
<?php defined('BASEPATH') OR exit('No direct script access allowed');
class Cripto extends CI_Controller {
public function __construct(){
parent::__construct();
}
/**
* Buscando criptomedas ...
public function csv(){
if( isset($_POST['enviar_csv']) && count($_FILES['userfile']['name']) > 0 ){
// ...
$file = $_FILES['userfile']['tmp_name'];
$handle = fopen($file, "r");
$data = [];
// Loop through the csv file and insert into database
do {
if ( isset($data[0]) ) {
<?php
class Usuario {
public function login($email, $senha){
# faz login
}
}
(function(){
'use strict';
var empresas_id = "#ajax_empresa";
var local_id = "#ajax_local";
var servicos_id = "#ajax_servico";
var pesquisadores_id = "#ajax_persquisador";
var pesquisa_id = "#ajax_pesquisa";
var unidades_id = "#ajax_unidade";
$(document).on('blur', '.edit_descr > span', function(event){
event.preventDefault();
var descricao = $(this).text();
var metodo_id = $(this).data("metodo_id");
if(descricao && metodo_id){
if(confirm("Deseja realmente atualizar a descrição desta função no sistema?") == true){
<IfModule mod_rewrite.c>
RewriteEngine On
# !IMPORTANT! Set your RewriteBase here and don't forget trailing and leading
# slashes.
# If your page resides at
# http://www.example.com/mypage/test1
# then use
# RewriteBase /mypage/test1/
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
@mvnp
mvnp / SQL
Created August 23, 2017 01:39
SELECT f.FUNC_NOME, p.PERG_PERG, r.RSPND_RESP_AVALO, e.PDOS_AVALR_ID,
(SELECT f.FUNC_NOME FROM funcionarios f WHERE f.ID = e.PDOS_AVALR_ID) AS NOME_AVALIADOR
FROM responder r
INNER JOIN perguntas p on r.RSPND_PERG_ID = p.ID
INNER JOIN funcionarios f on r.RSPND_AVALO_ID = f.ID
INNER JOIN pesquisados e on r.RSPND_PESQ_ID = e.ID
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