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 | |
$info = FALSE; | |
$submit = filter_input(INPUT_POST, 'submit'); | |
if(isset($submit)){ | |
$tamano = $_FILES["archivo"]['size']; | |
$tipo = $_FILES["archivo"]['type']; | |
$nombre = $_FILES["archivo"]['name']; |
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
/** | |
* MOSTRAR FECHA DE HOY | |
* | |
* Fecha de hoy en el siguiente formato | |
* <i>nDia dia 'de' Nmes 'de' agno</i> | |
* @author Fernando Magrosoto V. | |
* @param {string} contenedor El ID del contenedor donde poner la fecha | |
*/ | |
var class_FechaHoy = function(contenedor) | |
{ |
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
// JavaScript Document | |
// Inicialización de AJAX multiplataforma | |
// Otra alternativa para instanciar el objeto. | |
// Sólo es necesario crear un nuevo objeto con el nombre de la instancia | |
// ej: XMLHttp = crearInstancia(); | |
function crearInstancia() { | |
XMLHttp = false; |
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 | |
############################################################################# | |
## Función para comparar fechas extraídas | |
## de un sql query. | |
## Lo que hace la función es convertir | |
## las fechas gregorianas en fechas julianas | |
## y calcular los días de diferencia | |
## | |
## Créditos: http://www.webtutoriales.com/articulos/comparar-fechas-en-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 | |
$fileName = $_FILES['afile']['name']; | |
$fileType = $_FILES['afile']['type']; | |
$fileContent = file_get_contents($_FILES['afile']['tmp_name']); | |
$dataUrl = 'data:' . $fileType . ';base64,' . base64_encode($fileContent); | |
$json = json_encode(array( | |
'name' => $fileName, | |
'type' => $fileType, | |
'dataUrl' => $dataUrl, |
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 | |
/** | |
* SCRIPT PARA ENVIAR CORREOS DESDE PHP | |
* | |
* Script sencillo para enviar datos de un formulario | |
* por correo mediante MAIL de PHP | |
* | |
* @author: Fernando Magrosoto V | |
* @copyright: Febrero 2000 |
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
Estas son las sentencias básicaS para manejar MySQL con PHP. | |
// Estos son los datos de conexión | |
$dbhost = 'localhost'; // Servidor de la BD | |
$dbuser = 'root'; // Usuario | |
$dbpass = 'password'; // Password | |
$dbname = 'somedatabase'; // Base de datos | |
// Conexión |
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> | |
<head> | |
<title>Dropdown menu</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<style> | |
nav ul { | |
font-family:sans-serif; | |
list-style:none; |
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
/** | |
* FORMATEAR FECHA | |
* | |
* Formatear la fecha de formato MySQL a formato humanamente legible. | |
* Incluye opción para mostrar la hora o no. | |
* @author Fernando Magrosoto | |
*/ | |
function formatearFecha($fecha, $phora){ | |
$fechaO = explode(" ",$fecha); |
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="es-MX"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Elementos en sticky mode</title> | |
<link href='http://fonts.googleapis.com/css?family=Raleway:400,200' | |
rel='stylesheet' type='text/css'> | |
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script> | |
<style> | |
OlderNewer