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 | |
$directorio = opendir(__DIR__); | |
mkdir ($directorio . '/renombrados'); | |
while ($archivo = readdir($directorio)) { | |
if (!is_dir($archivo) AND strpos($archivo, '.jpg')) { | |
$numero = (int) substr($archivo, strpos($archivo, '_') + 1, -4); | |
if (0 === $numero % 2) { | |
$archivo_nuevo = 'renombrados/obra_' . (string)($numero / 2) . '_imagen.jpg'; |
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 | |
/** | |
* Estima el tiempo necesario para leer una entrada en WordPress | |
* | |
* @return string | |
*/ | |
function wpr_estima_tiempo_lectura() { | |
$entrada = get_post(); |
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
$.fn.iguala = function() { | |
var alturaMaxima = 0; | |
$(this).each(function(e){ | |
var elementoAltura = $(this).height(); | |
if (elementoAltura > alturaMaxima) | |
{ | |
alturaMaxima = elementoAltura; | |
} | |
}); | |
//se le sumaa 20 para que no se salga el contenido, creo que es por alg煤n |
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 | |
//--------------------------------------------------------------------------------------------------- | |
// Proyecto: Servicio Inform谩tico Recursos Humanos Universidad de Sevilla | |
// Archivo: app_code/robot_hominis_excel.php | |
//--------------------------------------------------------------------------------------------------- | |
include("../../cascara_core/lib/phpExcel/PHPExcel/Reader/Excel5.php"); | |
global $smarty; | |
global $plantilla; |
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
<label class="control-label" for="fichero1">A帽adir nuevo fichero</label> | |
<div class="controls"> | |
<input id="fichero1" type="file" style="display:none" name="fichero1"> | |
<div class="input-append"> | |
<input id="falso1" class="input-xlarge" type="text"> | |
<a class="btn btn-file"><i class="fa fa-folder-open-o"></i> Seleccionar</a> | |
</div> | |
</div> | |
<script type="text/javascript"> |
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 | |
$entrada = fopen("asistencia.csv", "r"); | |
$salida = fopen("asistencia_procesada.csv", "w"); | |
while (($line = fgetcsv($entrada, 1000, ";")) !== FALSE) | |
{ | |
if ($line[3] == '0:00') | |
{ | |
$hora_fin_exploded = explode(":", $line[4]); | |
$hora_fin = $hora_fin_exploded[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
<?php | |
$ruta_completa = CC_DIR_BASE . 'public/upload/recurso/' . $id; | |
if (is_dir($ruta_completa)) | |
{ | |
$directorio = opendir($ruta_completa); | |
while ($archivo = readdir($directorio)) | |
{ | |
$fecha = date ("d-m-Y", filemtime($ruta_completa . "/" . $archivo)); | |
$archivos[] = array($archivo, $fecha); |
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 | |
# Cambiar a HTTPS | |
if (empty ($_SERVER["HTTPS"])) { | |
header ("Location: https://".$_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"]); | |
exit (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
<a href="descarga.php?archivo=imagen5.jpeg" >Descargar imagen</a> | |
<?php | |
//Si la variable archivo que pasamos por URL no esta | |
//establecida acabamos la ejecucion del script. | |
if (!isset($_GET['archivo']) || empty($_GET['archvo'])) { | |
exit(); | |
} | |
//Utilizamos basename por seguridad, devuelve el |
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
MENU_bolsa | |
Campo Tipo Nulo Predeterminado Comentarios MIME | |
id int(11) No | |
alias varchar(200) No | |
descripcion varchar(300) No | |
lft int(11) No | |
rgt int(11) No |
NewerOlder