This file contains hidden or 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
jQuery.fn.center = function () { | |
this.css("position","absolute"); | |
this.css("top", Math.max(0, ((jQuery(window).height() - jQuery(this).outerHeight()) / 2) + jQuery(window).scrollTop()) + "px"); | |
this.css("left", Math.max(0, ((jQuery(window).width() - jQuery(this).outerWidth()) / 2) + jQuery(window).scrollLeft()) + "px"); | |
return this; |
This file contains hidden or 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 | |
$dsn = 'mysql:host=XXXX.XXXX.XXXX.XXXX;dbname=DBNAME'; | |
$nombre_usuario = 'dbuser'; | |
$password = 'dbpass'; | |
$opciones = array( | |
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8', | |
); | |
$pdo = new PDO($dsn, $nombre_usuario, $password, $opciones); | |
?> |
This file contains hidden or 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
jQuery('.solo_numeros').keyup(function(e){ | |
if (/\D/g.test(this.value)){this.value = this.value.replace(/\D/g, '');} | |
}); |
This file contains hidden or 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
UPDATE wp_posts | |
SET | |
post_content = REPLACE (post_content, 'http://localhost/tusitio.com.mx', 'http://www.tusitio.com.mx') | |
WHERE post_content LIKE '%http://localhost/tusitio.com.mx%'; | |
UPDATE wp_posts | |
SET | |
guid = REPLACE (guid, 'http://localhost/tusitio.com.mx', 'http://www.tusitio.com.mx') | |
WHERE guid LIKE '%http://localhost/tusitio.com.mx%'; |
This file contains hidden or 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
$clase = @$cnt1++%2==0 ? "normal" : "alterna"; |
This file contains hidden or 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
<form name="form" id="form_id" action="action.php" method="post" enctype="multipart/form-data"> |
This file contains hidden or 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
if( !empty($_FILES['nombre']) ){ | |
// SUBE EL ARCHIVO | |
$fecha = date('d-m-y'); | |
$extensiones_permitidas = array("jpg", "jpeg", "png", "JPG", "JPEG", "PNG"); | |
$extension = end(explode(".", $_FILES['nombre']["name"])); | |
if ((($_FILES['nombre']["type"] == "image/png") || ($_FILES['nombre']["type"] == "image/jpeg") || ($_FILES['nombre']["type"] == "image/jpg") || ($_FILES['nombre']["type"] == "image/PNG")) && in_array($extension, $extensiones_permitidas)) | |
{ | |
if ($_FILES['nombre']["error"] > 0) |
This file contains hidden or 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
/* Cambia el lenguaje del datepicker a español */ | |
jQuery.datepicker.regional['es'] = { | |
closeText: 'Cerrar', | |
prevText: '<Ant', | |
nextText: 'Sig>', | |
currentText: 'Hoy', | |
monthNames: ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'], | |
monthNamesShort: ['Ene','Feb','Mar','Abr', 'May','Jun','Jul','Ago','Sep', 'Oct','Nov','Dic'], | |
dayNames: ['Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado'], | |
dayNamesShort: ['Dom','Lun','Mar','Mié','Juv','Vie','Sáb'], |
This file contains hidden or 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 | |
include_once('conn.php' ); | |
require_once(__DIR__.'/ForceUTF8/Encoding.php'); | |
use ForceUTF8\Encoding; | |
$resultado = new stdClass(); | |
$sql = 'DESCRIBE tabla'; | |
$query = $pdo->prepare($sql); |
This file contains hidden or 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> | |
<meta charset='UTF-8' /> | |
<title>Lista de Esados de la República Mexicana</title> | |
</head> | |
<body> | |
<h1>Lista de Estados de la República Mexicana</h1> | |
<label>Estado de la República</label> | |
<select name="estado"> |
OlderNewer