Skip to content

Instantly share code, notes, and snippets.

View lastk's full-sized avatar

Rafael Oliveira lastk

  • Salvador-Ba, Brazil
View GitHub Profile
require 'rubygems'
require 'sinatra'
get '/' do
'
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
</head>
function pesquisarUsuario($usuarioTo, $numPagina=null, $qtdRegistros=null) {
$sql = '';
$select = 'SELECT CD_USUARIO, CD_FUNC_ORIG, NOME, SOBRENOME, CPF, EMAIL, SENHA, DT_NASCIMENTO, SEXO, FL_RECEBE_EMAIL, FL_CONFIAVEL, CD_SITE_FUNC, FL_ATIVO, DH_CADASTRO, DH_ULTIMO_ACESSO ';
$selectCount = 'SELECT COUNT(*) ';
$from = ' FROM TB_USUARIO ';
$limit = '';
if(isset($numPagina) && isset($qtdRegistros)){
$numPag = ($numPagina - 1) * $qtdRegistros;
$limit = " LIMIT " . $numPag . ", " . $qtdRegistros;
}
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<!-- topo -->
<div id="topo">