Skip to content

Instantly share code, notes, and snippets.

View LucianoCharlesdeSouza's full-sized avatar

Luciano Charles de Souza LucianoCharlesdeSouza

  • indaial - santa catarina
View GitHub Profile
$this->Links[] = "<div class=\"col-sm-12 text-center\"><ul class=\"pagination\">";
$first = "<li class=\"active\"></li>";
if ($this->getPager() > 1):
$first = "<li><a class=\"\" href=\"?" . $this->getPage() . "=1\">Primeira</a></li>";
endif;
$this->Links[] = $first;
for ($i = $this->getPager() - $this->getMaxLinks(); $i <= $this->getPager() - 1; $i++):
if ($i >= 1):
$this->Links[] = "<li><a href=\"?" . $this->getPage() . "=" . $i . "\">" . $i . "</a></li>";
private function verifyWhereAndOrder() {
if ($this->Where == null && $this->Order == null) {
$this->query .= $this->getTable() . " LIMIT " . $this->index_page . "," . $this->getMaxPerPage();
return $this->FullQuery($this->query);
}
if ($this->Where == null && $this->Order != null) {
$this->query .= $this->getTable() . " {$this->Order} LIMIT " . $this->index_page . "," . $this->getMaxPerPage();
return $this->FullQuery($this->query);
}
@LucianoCharlesdeSouza
LucianoCharlesdeSouza / Calender.php
Created June 21, 2019 16:16
Classe geradora de uma ou mais tabelas em formato de Calendario
<?php
class Calender
{
private function createWeeks()
{
$weeks = "DSTQQSS";
$td = '';
//index.php
<?php
echo 'bem vindo a index';
//form.php
<?php
@LucianoCharlesdeSouza
LucianoCharlesdeSouza / loginBlockByAttempts.php
Last active July 14, 2019 17:00
login block by attempts
<?php
if ( session_status() !== PHP_SESSION_ACTIVE ){
session_start();
}
$email = filter_input(INPUT_POST, 'email');
$pass = filter_input(INPUT_POST, 'pass');
/**
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
@LucianoCharlesdeSouza
LucianoCharlesdeSouza / makeImageWithText.php
Last active November 14, 2019 12:31
Create image with text in php
<?php
//Seto o Content Type
// header('Content-type: image/jpeg');
// Crio a imagem com um arquivo existente
$jpg_image = imagecreatefromjpeg('image.jpg');
// Aloco uma cor para o texto
$white = imagecolorallocate($jpg_image, 251, 22808, 10);
<?php
/**
* Class Calendar
*
* @author Luciano Charles de Souza
* E-mail: [email protected]
* Github: https://github.com/LucianoCharlesdeSouza
* YouTube: https://www.youtube.com/channel/UC2bpyhuQp3hWLb8rwb269ew?view_as=subscriber
*/
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
.mail-box {
border-collapse: collapse;
border-spacing: 0;
display: table;
table-layout: fixed;
width: 100%;
}
.mail-box aside {
display: table-cell;