Actualización
This commit is contained in:
@@ -1,146 +1,146 @@
|
||||
<?php
|
||||
$ICO =[
|
||||
"mas"=>'<span class="ing-mas ing-fw"></span>',
|
||||
"menos"=>'<span class="ing-menos ing-fw"></span>',
|
||||
"editar"=>'<span class="ing-editar ing-fw"></span>',
|
||||
"borrar"=>'<span class="ing-borrar ing-fw"></span>',
|
||||
"borrar2"=>'<span class="ing-basura ing-fw"></span>',
|
||||
"cancelar"=>'<span class="ing-cancelar ing-fw"></span>',
|
||||
"buscar"=>'<span class="ing-buscar ing-fw"></span>',
|
||||
"descargar"=>'<span class="ing-descarga ing-fw"></span>',
|
||||
"cargar"=>'<span class="ing-carga-archivo ing-fw"></span>',
|
||||
"ver"=>'<span class="ing-ver ing-fw"></span>',
|
||||
"cambiar"=>'<span class="ing-cambiar ing-fw"></span>',
|
||||
"circulo"=>'<span class="ing-bullet ing-fw"></span>',
|
||||
"aceptar"=>'<span class="ing-aceptar ing-fw"></span>',
|
||||
"alerta"=>'<span class="ing-importante ing-fw"></span>',
|
||||
"calendario"=>'<span class="ing-eventos ing-fw"></span>',
|
||||
"ojo"=>'<span class="ing-ojo ing-fw"></span>',
|
||||
"profesor"=>'<span class="ing-formacion ing-fw"></span>',
|
||||
|
||||
"lista"=>'<span class="fas fa-list fa-fw"></span>',
|
||||
"lista_check"=>'<span class="ing-listado-menus ing-fw"></span>',
|
||||
"abajo"=>'<span class="ing-caret ing-fw"></span>',
|
||||
"arriba"=>'<span class="ing-caret ing-rotate-180 ing-fw"></span>',
|
||||
"izquierda"=>'<span class="ing-caret ing-rotate-90 ing-fw"></span>',
|
||||
"derecha"=>'<span class="ing-caret ing-rotate-270 ing-fw"></span>',
|
||||
];
|
||||
$ICO_LG =[
|
||||
"mas"=>'<span class="ing-mas ing-fw ing-lg"></span>',
|
||||
"menos"=>'<span class="ing-menos ing-fw ing-lg"></span>',
|
||||
"editar"=>'<span class="ing-editar ing-fw ing-lg"></span>',
|
||||
"borrar"=>'<span class="ing-borrar ing-fw ing-lg"></span>',
|
||||
"borrar2"=>'<span class="ing-basura ing-fw ing-lg"></span>',
|
||||
"cancelar"=>'<span class="ing-cancelar ing-fw ing-lg"></span>',
|
||||
"buscar"=>'<span class="ing-buscar ing-fw ing-lg"></span>',
|
||||
"descargar"=>'<span class="ing-descarga ing-fw ing-lg"></span>',
|
||||
"cargar"=>'<span class="ing-carga-archivo ing-fw ing-lg"></span>',
|
||||
"ver"=>'<span class="ing-reporte-resultados ing-fw ing-lg"></span>',
|
||||
"cambiar"=>'<span class="ing-cambiar ing-fw ing-lg"></span>',
|
||||
"circulo"=>'<span class="ing-bullet ing-fw ing-lg"></span>',
|
||||
"aceptar"=>'<span class="ing-aceptar ing-fw ing-lg"></span>',
|
||||
"alerta"=>'<span class="ing-importante ing-fw ing-lg"></span>',
|
||||
"calendario"=>'<span class="ing-eventos ing-fw ing-lg"></span>',
|
||||
"ojo"=>'<span class="ing-ojo ing-fw ing-lg"></span>',
|
||||
"profesor"=>'<span class="ing-formacion ing-fw ing-lg"></span>',
|
||||
|
||||
"lista"=>'<span class="fas fa-list fa-fw ing-lg"></span>',
|
||||
"lista_check"=>'<span class="ing-listado-menus ing-fw ing-lg"></span>',
|
||||
"abajo"=>'<span class="ing-caret ing-fw ing-lg"></span>',
|
||||
"arriba"=>'<span class="ing-caret ing-rotate-180 ing-fw ing-lg"></span>',
|
||||
|
||||
/*
|
||||
"insert"=>'<span class="fas fa-plus fa-fw fa-lg"></span>',
|
||||
"update"=>'<span class="fas fa-pen fa-fw fa-lg"></span>',
|
||||
"delete"=>'<span class="fas fa-trash-alt fa-fw fa-lg"></span>',
|
||||
"search"=>'<span class="fas fa-search fa-fw fa-lg"></span>',
|
||||
"insert_box"=>'<span class="fas fa-plus-square fa-fw fa-lg"></span>',
|
||||
"update_box"=>'<span class="fas fa-pen-square fa-fw fa-lg"></span>',
|
||||
"delete_box"=>'<span class="fas fa-minus-square fa-fw fa-lg"></span>',
|
||||
"error"=>'<span class="fas fa-times fa-fw fa-lg"></span>',
|
||||
"error_circle"=>'<span class="fas fa-times-circle fa-fw fa-lg"></span>',
|
||||
"ok"=>'<span class="fas fa-check fa-fw fa-lg"></span>',
|
||||
"ok_circle"=>'<span class="fas fa-check-circle fa-fw fa-lg"></span>',
|
||||
"list"=>'<span class="fas fa-list fa-fw fa-lg"></span>',
|
||||
"circulo"=>'<span class="ing-bullet fa-fw fa-lg"></span>',
|
||||
"question_circle"=>'<span class="fas fa-question-circle fa-fw fa-lg"></span>',
|
||||
"info_circle"=>'<span class="fas fa-info-circle fa-fw fa-lg"></span>',
|
||||
"square_check"=>'<span class="fas fa-circle fa-fw fa-lg"></span>',
|
||||
"square_empty"=>'<span class="far fa-circle fa-fw fa-lg"></span>',
|
||||
"eraser"=>'<span class="fas fa-eraser fa-fw fa-lg"></span>',*/
|
||||
];
|
||||
|
||||
$ICO_RND =[
|
||||
"right"=>'<span class="fa-stack float-right">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="icon icon-right fa-stack-1x" style="color:white"></i>
|
||||
</span>',
|
||||
"left"=>'<span class="fa-stack float-right">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="icon icon-left fa-stack-1x" style="color:white"></i>
|
||||
</span>',
|
||||
"error"=>'<span class="fa-stack float-right">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="fas fa-times fa-stack-1x" style="color:white"></i>
|
||||
</span>',
|
||||
"error_circle"=>'<span class="fa-stack float-right">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="icon icon-error fa-stack-1x" style="color:white"></i>
|
||||
</span>',
|
||||
"ok_circle"=>'<span class="fa-stack float-right">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="icon icon-correct fa-stack-1x" style="color:white"></i>
|
||||
</span>',
|
||||
"ok"=>'<span class="fa-stack float-right">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="icon icon-chk fa-stack-1x" style="color:white"></i>
|
||||
</span>',
|
||||
"close"=>'<span class="fa-stack float-right">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="icon icon-close fa-stack-1x" style="color:white"></i>
|
||||
</span>',
|
||||
"next"=>'<span class="fa-stack float-right">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="icon icon-arrow fa-stack-1x" style="color:white"></i>
|
||||
</span>',
|
||||
"back"=>'<span class="fa-stack float-right">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="icon icon-arrowprev fa-stack-1x" style="color:white"></i>
|
||||
</span>',
|
||||
];
|
||||
|
||||
//Sistemas registrados
|
||||
define("APSA", 1);
|
||||
define("GEMA", 2);
|
||||
define("CIDIT", 3);
|
||||
define("CONSTANCIA", 5);
|
||||
define("EXPOING", 7);
|
||||
|
||||
define("MAX_ROWS", 30);
|
||||
|
||||
define("HORA_INICIO", 6);//hora inicial de horario
|
||||
define("HORA_FINAL", 22);//hora final de horario
|
||||
define("FRACCION_HORA", 4);//fracciones en una hora
|
||||
|
||||
define("DURACION_MIN", 60);//hora inicial de horario
|
||||
define("DURACION_MAX", 360);//hora final de horario
|
||||
define("DURACION_STEP", 15);//fracciones en una hora
|
||||
|
||||
define("FACULTAD", "Facultad de Ingeniería");
|
||||
//define("NOMBRE_DIRECTOR", "Ing. Edmundo G. Barrera Monsiváis");
|
||||
|
||||
define("PE_INI", "PE_INI$");
|
||||
define("PE_INI_Y", "PE_INI_Y$");
|
||||
define("PE_FIN", "PE_FIN$");
|
||||
define("PE_FIN_Y", "PE_FIN_Y$");
|
||||
|
||||
define("PR_INI", "PR_INI$");
|
||||
define("PR_INI_Y", "PR_INI_Y$");
|
||||
define("PR_FIN", "PR_FIN$");
|
||||
define("PR_FIN_Y", "PR_FIN_Y$");
|
||||
|
||||
define("EX_INI", "EX_INI$");
|
||||
define("EX_INI_Y", "EX_INI_Y$");
|
||||
define("EX_FIN", "EX_FIN$");
|
||||
define("EX_FIN_Y", "EX_FIN_Y$");
|
||||
<?php
|
||||
$ICO =[
|
||||
"mas"=>'<span class="ing-mas ing-fw"></span>',
|
||||
"menos"=>'<span class="ing-menos ing-fw"></span>',
|
||||
"editar"=>'<span class="ing-editar ing-fw"></span>',
|
||||
"borrar"=>'<span class="ing-borrar ing-fw"></span>',
|
||||
"borrar2"=>'<span class="ing-basura ing-fw"></span>',
|
||||
"cancelar"=>'<span class="ing-cancelar ing-fw"></span>',
|
||||
"buscar"=>'<span class="ing-buscar ing-fw"></span>',
|
||||
"descargar"=>'<span class="ing-descarga ing-fw"></span>',
|
||||
"cargar"=>'<span class="ing-carga-archivo ing-fw"></span>',
|
||||
"ver"=>'<span class="ing-ver ing-fw"></span>',
|
||||
"cambiar"=>'<span class="ing-cambiar ing-fw"></span>',
|
||||
"circulo"=>'<span class="ing-bullet ing-fw"></span>',
|
||||
"aceptar"=>'<span class="ing-aceptar ing-fw"></span>',
|
||||
"alerta"=>'<span class="ing-importante ing-fw"></span>',
|
||||
"calendario"=>'<span class="ing-eventos ing-fw"></span>',
|
||||
"ojo"=>'<span class="ing-ojo ing-fw"></span>',
|
||||
"profesor"=>'<span class="ing-formacion ing-fw"></span>',
|
||||
|
||||
"lista"=>'<span class="fas fa-list fa-fw"></span>',
|
||||
"lista_check"=>'<span class="ing-listado-menus ing-fw"></span>',
|
||||
"abajo"=>'<span class="ing-caret ing-fw"></span>',
|
||||
"arriba"=>'<span class="ing-caret ing-rotate-180 ing-fw"></span>',
|
||||
"izquierda"=>'<span class="ing-caret ing-rotate-90 ing-fw"></span>',
|
||||
"derecha"=>'<span class="ing-caret ing-rotate-270 ing-fw"></span>',
|
||||
];
|
||||
$ICO_LG =[
|
||||
"mas"=>'<span class="ing-mas ing-fw ing-lg"></span>',
|
||||
"menos"=>'<span class="ing-menos ing-fw ing-lg"></span>',
|
||||
"editar"=>'<span class="ing-editar ing-fw ing-lg"></span>',
|
||||
"borrar"=>'<span class="ing-borrar ing-fw ing-lg"></span>',
|
||||
"borrar2"=>'<span class="ing-basura ing-fw ing-lg"></span>',
|
||||
"cancelar"=>'<span class="ing-cancelar ing-fw ing-lg"></span>',
|
||||
"buscar"=>'<span class="ing-buscar ing-fw ing-lg"></span>',
|
||||
"descargar"=>'<span class="ing-descarga ing-fw ing-lg"></span>',
|
||||
"cargar"=>'<span class="ing-carga-archivo ing-fw ing-lg"></span>',
|
||||
"ver"=>'<span class="ing-reporte-resultados ing-fw ing-lg"></span>',
|
||||
"cambiar"=>'<span class="ing-cambiar ing-fw ing-lg"></span>',
|
||||
"circulo"=>'<span class="ing-bullet ing-fw ing-lg"></span>',
|
||||
"aceptar"=>'<span class="ing-aceptar ing-fw ing-lg"></span>',
|
||||
"alerta"=>'<span class="ing-importante ing-fw ing-lg"></span>',
|
||||
"calendario"=>'<span class="ing-eventos ing-fw ing-lg"></span>',
|
||||
"ojo"=>'<span class="ing-ojo ing-fw ing-lg"></span>',
|
||||
"profesor"=>'<span class="ing-formacion ing-fw ing-lg"></span>',
|
||||
|
||||
"lista"=>'<span class="fas fa-list fa-fw ing-lg"></span>',
|
||||
"lista_check"=>'<span class="ing-listado-menus ing-fw ing-lg"></span>',
|
||||
"abajo"=>'<span class="ing-caret ing-fw ing-lg"></span>',
|
||||
"arriba"=>'<span class="ing-caret ing-rotate-180 ing-fw ing-lg"></span>',
|
||||
|
||||
/*
|
||||
"insert"=>'<span class="fas fa-plus fa-fw fa-lg"></span>',
|
||||
"update"=>'<span class="fas fa-pen fa-fw fa-lg"></span>',
|
||||
"delete"=>'<span class="fas fa-trash-alt fa-fw fa-lg"></span>',
|
||||
"search"=>'<span class="fas fa-search fa-fw fa-lg"></span>',
|
||||
"insert_box"=>'<span class="fas fa-plus-square fa-fw fa-lg"></span>',
|
||||
"update_box"=>'<span class="fas fa-pen-square fa-fw fa-lg"></span>',
|
||||
"delete_box"=>'<span class="fas fa-minus-square fa-fw fa-lg"></span>',
|
||||
"error"=>'<span class="fas fa-times fa-fw fa-lg"></span>',
|
||||
"error_circle"=>'<span class="fas fa-times-circle fa-fw fa-lg"></span>',
|
||||
"ok"=>'<span class="fas fa-check fa-fw fa-lg"></span>',
|
||||
"ok_circle"=>'<span class="fas fa-check-circle fa-fw fa-lg"></span>',
|
||||
"list"=>'<span class="fas fa-list fa-fw fa-lg"></span>',
|
||||
"circulo"=>'<span class="ing-bullet fa-fw fa-lg"></span>',
|
||||
"question_circle"=>'<span class="fas fa-question-circle fa-fw fa-lg"></span>',
|
||||
"info_circle"=>'<span class="fas fa-info-circle fa-fw fa-lg"></span>',
|
||||
"square_check"=>'<span class="fas fa-circle fa-fw fa-lg"></span>',
|
||||
"square_empty"=>'<span class="far fa-circle fa-fw fa-lg"></span>',
|
||||
"eraser"=>'<span class="fas fa-eraser fa-fw fa-lg"></span>',*/
|
||||
];
|
||||
|
||||
$ICO_RND =[
|
||||
"right"=>'<span class="fa-stack float-right">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="icon icon-right fa-stack-1x" style="color:white"></i>
|
||||
</span>',
|
||||
"left"=>'<span class="fa-stack float-right">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="icon icon-left fa-stack-1x" style="color:white"></i>
|
||||
</span>',
|
||||
"error"=>'<span class="fa-stack float-right">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="fas fa-times fa-stack-1x" style="color:white"></i>
|
||||
</span>',
|
||||
"error_circle"=>'<span class="fa-stack float-right">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="icon icon-error fa-stack-1x" style="color:white"></i>
|
||||
</span>',
|
||||
"ok_circle"=>'<span class="fa-stack float-right">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="icon icon-correct fa-stack-1x" style="color:white"></i>
|
||||
</span>',
|
||||
"ok"=>'<span class="fa-stack float-right">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="icon icon-chk fa-stack-1x" style="color:white"></i>
|
||||
</span>',
|
||||
"close"=>'<span class="fa-stack float-right">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="icon icon-close fa-stack-1x" style="color:white"></i>
|
||||
</span>',
|
||||
"next"=>'<span class="fa-stack float-right">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="icon icon-arrow fa-stack-1x" style="color:white"></i>
|
||||
</span>',
|
||||
"back"=>'<span class="fa-stack float-right">
|
||||
<i class="fas fa-circle fa-stack-2x"></i>
|
||||
<i class="icon icon-arrowprev fa-stack-1x" style="color:white"></i>
|
||||
</span>',
|
||||
];
|
||||
|
||||
//Sistemas registrados
|
||||
define("APSA", 1);
|
||||
define("GEMA", 2);
|
||||
define("CIDIT", 3);
|
||||
define("CONSTANCIA", 5);
|
||||
define("EXPOING", 7);
|
||||
|
||||
define("MAX_ROWS", 30);
|
||||
|
||||
define("HORA_INICIO", 6);//hora inicial de horario
|
||||
define("HORA_FINAL", 22);//hora final de horario
|
||||
define("FRACCION_HORA", 4);//fracciones en una hora
|
||||
|
||||
define("DURACION_MIN", 60);//hora inicial de horario
|
||||
define("DURACION_MAX", 360);//hora final de horario
|
||||
define("DURACION_STEP", 15);//fracciones en una hora
|
||||
|
||||
define("FACULTAD", "Facultad de Ingeniería");
|
||||
//define("NOMBRE_DIRECTOR", "Ing. Edmundo G. Barrera Monsiváis");
|
||||
|
||||
define("PE_INI", "PE_INI$");
|
||||
define("PE_INI_Y", "PE_INI_Y$");
|
||||
define("PE_FIN", "PE_FIN$");
|
||||
define("PE_FIN_Y", "PE_FIN_Y$");
|
||||
|
||||
define("PR_INI", "PR_INI$");
|
||||
define("PR_INI_Y", "PR_INI_Y$");
|
||||
define("PR_FIN", "PR_FIN$");
|
||||
define("PR_FIN_Y", "PR_FIN_Y$");
|
||||
|
||||
define("EX_INI", "EX_INI$");
|
||||
define("EX_INI_Y", "EX_INI_Y$");
|
||||
define("EX_FIN", "EX_FIN$");
|
||||
define("EX_FIN_Y", "EX_FIN_Y$");
|
||||
?>
|
||||
@@ -1,20 +1,20 @@
|
||||
# postgrest.conf
|
||||
|
||||
# The standard connection URI format, documented at
|
||||
# https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING
|
||||
db-uri = "postgres://postgres:4ud1t0rf4lt4$$@localhost:5432/paad_pruebas"
|
||||
|
||||
# The database role to use when no client authentication is provided.
|
||||
# Should differ from authenticator
|
||||
db-anon-role = "postgres"
|
||||
|
||||
# The secret to verify the JWT for authenticated requests with.
|
||||
# Needs to be 32 characters minimum.
|
||||
jwt-secret = "reallyreallyreallyreallyverysafe"
|
||||
jwt-secret-is-base64 = false
|
||||
|
||||
# Port the postgrest process is listening on for http requests
|
||||
server-port = 3000
|
||||
|
||||
# the location root is /api
|
||||
# postgrest.conf
|
||||
|
||||
# The standard connection URI format, documented at
|
||||
# https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING
|
||||
db-uri = "postgres://postgres:4ud1t0rf4lt4$$@localhost:5432/paad_pruebas"
|
||||
|
||||
# The database role to use when no client authentication is provided.
|
||||
# Should differ from authenticator
|
||||
db-anon-role = "postgres"
|
||||
|
||||
# The secret to verify the JWT for authenticated requests with.
|
||||
# Needs to be 32 characters minimum.
|
||||
jwt-secret = "reallyreallyreallyreallyverysafe"
|
||||
jwt-secret-is-base64 = false
|
||||
|
||||
# Port the postgrest process is listening on for http requests
|
||||
server-port = 3000
|
||||
|
||||
# the location root is /api
|
||||
server-host = "*"
|
||||
@@ -1,55 +1,55 @@
|
||||
<?php
|
||||
/*
|
||||
* Funciones de utilidad
|
||||
*/
|
||||
|
||||
function fechaGuion($fechaTxt){//convierte fecha a guiones
|
||||
$fechaTxt = trim($fechaTxt);
|
||||
if(substr($fechaTxt,2,1) == "/" && substr($fechaTxt,5,1) == "/"){// dd/mm/aaaa
|
||||
$fechaArr = explode("/", $fechaTxt);
|
||||
return $fechaArr[2]."-".$fechaArr[1]."-".$fechaArr[0];
|
||||
}
|
||||
if(substr($fechaTxt,4,1) == "-" && substr($fechaTxt,7,1) == "-")// aaaa-mm-dd
|
||||
return $fechaTxt;
|
||||
return "";
|
||||
}
|
||||
function fechaSlash($fechaTxt){//convierte fecha a /
|
||||
$fechaTxt = trim($fechaTxt);
|
||||
if(substr($fechaTxt,2,1) == "/" && substr($fechaTxt,5,1) == "/"){// dd/mm/aaaa
|
||||
return $fechaTxt;
|
||||
}
|
||||
if(substr($fechaTxt,4,1) == "-" && substr($fechaTxt,7,1) == "-"){// aaaa-mm-dd
|
||||
$fechaArr = explode("-", $fechaTxt);
|
||||
return $fechaArr[2]."/".$fechaArr[1]."/".$fechaArr[0];
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
function fechaTexto($fechaTxt, $showYear = true){//convierte fecha a cadena de texto
|
||||
$fechaTxt = trim($fechaTxt);
|
||||
if(substr($fechaTxt,2,1) == "/" && substr($fechaTxt,5,1) == "/"){// dd/mm/aaaa
|
||||
$fechaArr = explode("/", $fechaTxt);
|
||||
if($showYear)
|
||||
return intval($fechaArr[0])." de ".mesNombre($fechaArr[1])." de ".$fechaArr[2];
|
||||
else
|
||||
return intval($fechaArr[0])." de ".mesNombre($fechaArr[1]);
|
||||
}
|
||||
if(substr($fechaTxt,4,1) == "-" && substr($fechaTxt,7,1) == "-"){// aaaa-mm-dd
|
||||
$fechaArr = explode("-", $fechaTxt);
|
||||
if($showYear)
|
||||
return intval($fechaArr[2])." de ".mesNombre($fechaArr[1])." de ".$fechaArr[0];
|
||||
else
|
||||
return intval($fechaArr[2])." de ".mesNombre($fechaArr[1]);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
function mesNombre($num){
|
||||
$meses=array(1=>"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre");
|
||||
return $meses[intval($num)];
|
||||
}
|
||||
|
||||
function diaNombre($num){
|
||||
$dias=array("domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado");
|
||||
return $dias[intval($num)];
|
||||
}
|
||||
<?php
|
||||
/*
|
||||
* Funciones de utilidad
|
||||
*/
|
||||
|
||||
function fechaGuion($fechaTxt){//convierte fecha a guiones
|
||||
$fechaTxt = trim($fechaTxt);
|
||||
if(substr($fechaTxt,2,1) == "/" && substr($fechaTxt,5,1) == "/"){// dd/mm/aaaa
|
||||
$fechaArr = explode("/", $fechaTxt);
|
||||
return $fechaArr[2]."-".$fechaArr[1]."-".$fechaArr[0];
|
||||
}
|
||||
if(substr($fechaTxt,4,1) == "-" && substr($fechaTxt,7,1) == "-")// aaaa-mm-dd
|
||||
return $fechaTxt;
|
||||
return "";
|
||||
}
|
||||
function fechaSlash($fechaTxt){//convierte fecha a /
|
||||
$fechaTxt = trim($fechaTxt);
|
||||
if(substr($fechaTxt,2,1) == "/" && substr($fechaTxt,5,1) == "/"){// dd/mm/aaaa
|
||||
return $fechaTxt;
|
||||
}
|
||||
if(substr($fechaTxt,4,1) == "-" && substr($fechaTxt,7,1) == "-"){// aaaa-mm-dd
|
||||
$fechaArr = explode("-", $fechaTxt);
|
||||
return $fechaArr[2]."/".$fechaArr[1]."/".$fechaArr[0];
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
function fechaTexto($fechaTxt, $showYear = true){//convierte fecha a cadena de texto
|
||||
$fechaTxt = trim($fechaTxt);
|
||||
if(substr($fechaTxt,2,1) == "/" && substr($fechaTxt,5,1) == "/"){// dd/mm/aaaa
|
||||
$fechaArr = explode("/", $fechaTxt);
|
||||
if($showYear)
|
||||
return intval($fechaArr[0])." de ".mesNombre($fechaArr[1])." de ".$fechaArr[2];
|
||||
else
|
||||
return intval($fechaArr[0])." de ".mesNombre($fechaArr[1]);
|
||||
}
|
||||
if(substr($fechaTxt,4,1) == "-" && substr($fechaTxt,7,1) == "-"){// aaaa-mm-dd
|
||||
$fechaArr = explode("-", $fechaTxt);
|
||||
if($showYear)
|
||||
return intval($fechaArr[2])." de ".mesNombre($fechaArr[1])." de ".$fechaArr[0];
|
||||
else
|
||||
return intval($fechaArr[2])." de ".mesNombre($fechaArr[1]);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
function mesNombre($num){
|
||||
$meses=array(1=>"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre");
|
||||
return $meses[intval($num)];
|
||||
}
|
||||
|
||||
function diaNombre($num){
|
||||
$dias=array("domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado");
|
||||
return $dias[intval($num)];
|
||||
}
|
||||
|
||||
@@ -1,50 +1,50 @@
|
||||
<?php
|
||||
/**
|
||||
* PHPMailer SPL autoloader.
|
||||
* PHP Version 5
|
||||
* @package PHPMailer
|
||||
* @link https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project
|
||||
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
|
||||
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
|
||||
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
|
||||
* @author Brent R. Matzelle (original founder)
|
||||
* @copyright 2012 - 2014 Marcus Bointon
|
||||
* @copyright 2010 - 2012 Jim Jagielski
|
||||
* @copyright 2004 - 2009 Andy Prevost
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
||||
* @note This program is distributed in the hope that it will be useful - WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* PHPMailer SPL autoloader.
|
||||
* @param string $classname The name of the class to load
|
||||
*/
|
||||
function PHPMailerAutoload($classname)
|
||||
{
|
||||
//Can't use __DIR__ as it's only in PHP 5.3+
|
||||
$filename = dirname(__FILE__).DIRECTORY_SEPARATOR.'class.'.strtolower($classname).'.php';
|
||||
if (is_readable($filename)) {
|
||||
require $filename;
|
||||
}
|
||||
}
|
||||
|
||||
if (version_compare(PHP_VERSION, '5.1.2', '>=')) {
|
||||
//SPL autoloading was introduced in PHP 5.1.2
|
||||
if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
|
||||
spl_autoload_register('PHPMailerAutoload', true, true);
|
||||
} else {
|
||||
spl_autoload_register('PHPMailerAutoload');
|
||||
}
|
||||
} else {
|
||||
/**
|
||||
* Fall back to traditional autoload for old PHP versions
|
||||
* @param string $classname The name of the class to load
|
||||
*/
|
||||
spl_autoload_register($classname);
|
||||
/*function __autoload($classname)
|
||||
{
|
||||
PHPMailerAutoload($classname);
|
||||
}*/
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* PHPMailer SPL autoloader.
|
||||
* PHP Version 5
|
||||
* @package PHPMailer
|
||||
* @link https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project
|
||||
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
|
||||
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
|
||||
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
|
||||
* @author Brent R. Matzelle (original founder)
|
||||
* @copyright 2012 - 2014 Marcus Bointon
|
||||
* @copyright 2010 - 2012 Jim Jagielski
|
||||
* @copyright 2004 - 2009 Andy Prevost
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
||||
* @note This program is distributed in the hope that it will be useful - WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* PHPMailer SPL autoloader.
|
||||
* @param string $classname The name of the class to load
|
||||
*/
|
||||
function PHPMailerAutoload($classname)
|
||||
{
|
||||
//Can't use __DIR__ as it's only in PHP 5.3+
|
||||
$filename = dirname(__FILE__).DIRECTORY_SEPARATOR.'class.'.strtolower($classname).'.php';
|
||||
if (is_readable($filename)) {
|
||||
require $filename;
|
||||
}
|
||||
}
|
||||
|
||||
if (version_compare(PHP_VERSION, '5.1.2', '>=')) {
|
||||
//SPL autoloading was introduced in PHP 5.1.2
|
||||
if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
|
||||
spl_autoload_register('PHPMailerAutoload', true, true);
|
||||
} else {
|
||||
spl_autoload_register('PHPMailerAutoload');
|
||||
}
|
||||
} else {
|
||||
/**
|
||||
* Fall back to traditional autoload for old PHP versions
|
||||
* @param string $classname The name of the class to load
|
||||
*/
|
||||
spl_autoload_register($classname);
|
||||
/*function __autoload($classname)
|
||||
{
|
||||
PHPMailerAutoload($classname);
|
||||
}*/
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
252
include/util.php
252
include/util.php
@@ -1,127 +1,127 @@
|
||||
<?php
|
||||
/*
|
||||
* Funciones de utilidad
|
||||
*/
|
||||
|
||||
function fechaGuion($fechaTxt, $showDay = true){//convierte fecha a guiones
|
||||
$fechaTxt = trim($fechaTxt);
|
||||
if(substr($fechaTxt,2,1) == "/" && substr($fechaTxt,5,1) == "/"){// dd/mm/aaaa
|
||||
$fechaArr = explode("/", $fechaTxt);
|
||||
if($showDay)
|
||||
return $fechaArr[2]."-".$fechaArr[1]."-".$fechaArr[0];
|
||||
else
|
||||
return $fechaArr[2]."-".$fechaArr[1]."-01";
|
||||
}
|
||||
if(substr($fechaTxt,4,1) == "-" && substr($fechaTxt,7,1) == "-"){// aaaa-mm-dd
|
||||
if($showDay)
|
||||
return $fechaTxt;
|
||||
$fechaArr = explode("-", $fechaTxt);
|
||||
return $fechaArr[0]."-".$fechaArr[1]."-01";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
function fechaSlash($fechaTxt, $showDay = true){//convierte fecha a /
|
||||
$fechaTxt = trim($fechaTxt);
|
||||
if(substr($fechaTxt,2,1) == "/" && substr($fechaTxt,5,1) == "/"){// dd/mm/aaaa
|
||||
if($showDay)
|
||||
return $fechaTxt;
|
||||
|
||||
$fechaArr = explode("/", $fechaTxt);
|
||||
return "01/".$fechaTxt[1]."/".$fechaTxt[2];
|
||||
}
|
||||
if(substr($fechaTxt,4,1) == "-" && substr($fechaTxt,7,1) == "-"){// aaaa-mm-dd
|
||||
$fechaArr = explode("-", $fechaTxt);
|
||||
if($showDay)
|
||||
return $fechaArr[2]."/".$fechaArr[1]."/".$fechaArr[0];
|
||||
else
|
||||
return "01/".$fechaArr[1]."/".$fechaArr[0];
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
function fechaTexto($fechaTxt, $showYear = true){//convierte fecha a cadena de texto
|
||||
$fechaTxt = trim($fechaTxt);
|
||||
if(substr($fechaTxt,2,1) == "/" && substr($fechaTxt,5,1) == "/"){// dd/mm/aaaa
|
||||
$fechaArr = explode("/", $fechaTxt);
|
||||
if($showYear)
|
||||
return intval($fechaArr[0])." de ".mesNombre($fechaArr[1])." de ".$fechaArr[2];
|
||||
else
|
||||
return intval($fechaArr[0])." de ".mesNombre($fechaArr[1]);
|
||||
}
|
||||
if(substr($fechaTxt,4,1) == "-" && substr($fechaTxt,7,1) == "-"){// aaaa-mm-dd
|
||||
$fechaArr = explode("-", $fechaTxt);
|
||||
if($showYear)
|
||||
return intval($fechaArr[2])." de ".mesNombre($fechaArr[1])." de ".$fechaArr[0];
|
||||
else
|
||||
return intval($fechaArr[2])." de ".mesNombre($fechaArr[1]);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
function fechaMonthPicker($fechaTxt){
|
||||
$meses=array(1=>"ene", "feb", "mar", "abr", "may", "jun", "jul", "ago", "sep", "oct", "nov", "dic");
|
||||
$fechaTxt = trim($fechaTxt);
|
||||
if(substr($fechaTxt,2,1) == "/" && substr($fechaTxt,5,1) == "/"){// dd/mm/aaaa
|
||||
$fechaArr = explode("/", $fechaTxt);
|
||||
return $meses[intval($fechaArr[1])].", ".$fechaArr[2];
|
||||
}
|
||||
if(substr($fechaTxt,4,1) == "-" && substr($fechaTxt,7,1) == "-"){// aaaa-mm-dd
|
||||
$fechaArr = explode("-", $fechaTxt);
|
||||
return $meses[intval($fechaArr[1])].", ".$fechaArr[0];
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
function fechaMes($fechaTxt){
|
||||
$fechaTxt = trim($fechaTxt);
|
||||
if(substr($fechaTxt,2,1) == "/" && substr($fechaTxt,5,1) == "/"){// dd/mm/aaaa
|
||||
$fechaArr = explode("/", $fechaTxt);
|
||||
return intval(mesNombre($fechaArr[1])." ".$fechaArr[2]);
|
||||
}
|
||||
if(substr($fechaTxt,4,1) == "-" && substr($fechaTxt,7,1) == "-"){// aaaa-mm-dd
|
||||
$fechaArr = explode("-", $fechaTxt);
|
||||
return intval(mesNombre($fechaArr[2])." ".$fechaArr[1]);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
function mesNombre($num){
|
||||
$meses=array(1=>"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre");
|
||||
return $meses[intval($num)];
|
||||
}
|
||||
|
||||
function diaNombre($num){
|
||||
$dias=array("domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado");
|
||||
return $dias[intval($num)];
|
||||
}
|
||||
|
||||
function horaMin($arr, $campo = "Horario_hora"){
|
||||
$min = "";
|
||||
foreach($arr as $horario){
|
||||
if($min == "" || date('H:i', strtotime($horario[$campo])) < date('H:i', strtotime($min))){
|
||||
$min = $horario[$campo];
|
||||
}
|
||||
}
|
||||
return date('H:i', strtotime($min));
|
||||
}
|
||||
|
||||
function horaMax($arr, $campo = "Horario_hora_final"){
|
||||
$max = "";
|
||||
foreach($arr as $horario){
|
||||
if($max == "" || date('H:i', strtotime($horario[$campo])) > date('H:i', strtotime($max))){
|
||||
$max = $horario[$campo];
|
||||
}
|
||||
}
|
||||
return date('H:i', strtotime($max));
|
||||
}
|
||||
function duracionMinutos($fechahora_i, $fechahora_f){
|
||||
return round((strtotime($fechahora_f) - strtotime($fechahora_i)) / 60,2);
|
||||
}
|
||||
|
||||
function validaPassword($pass){
|
||||
$expr = '/^\S*(?=\S{5,})(?=\S*[a-zA-Z])(?=\S*[\d])(?=\S*[\W])\S*$/';
|
||||
return preg_match($expr, $pass);
|
||||
<?php
|
||||
/*
|
||||
* Funciones de utilidad
|
||||
*/
|
||||
|
||||
function fechaGuion($fechaTxt, $showDay = true){//convierte fecha a guiones
|
||||
$fechaTxt = trim($fechaTxt);
|
||||
if(substr($fechaTxt,2,1) == "/" && substr($fechaTxt,5,1) == "/"){// dd/mm/aaaa
|
||||
$fechaArr = explode("/", $fechaTxt);
|
||||
if($showDay)
|
||||
return $fechaArr[2]."-".$fechaArr[1]."-".$fechaArr[0];
|
||||
else
|
||||
return $fechaArr[2]."-".$fechaArr[1]."-01";
|
||||
}
|
||||
if(substr($fechaTxt,4,1) == "-" && substr($fechaTxt,7,1) == "-"){// aaaa-mm-dd
|
||||
if($showDay)
|
||||
return $fechaTxt;
|
||||
$fechaArr = explode("-", $fechaTxt);
|
||||
return $fechaArr[0]."-".$fechaArr[1]."-01";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
function fechaSlash($fechaTxt, $showDay = true){//convierte fecha a /
|
||||
$fechaTxt = trim($fechaTxt);
|
||||
if(substr($fechaTxt,2,1) == "/" && substr($fechaTxt,5,1) == "/"){// dd/mm/aaaa
|
||||
if($showDay)
|
||||
return $fechaTxt;
|
||||
|
||||
$fechaArr = explode("/", $fechaTxt);
|
||||
return "01/".$fechaTxt[1]."/".$fechaTxt[2];
|
||||
}
|
||||
if(substr($fechaTxt,4,1) == "-" && substr($fechaTxt,7,1) == "-"){// aaaa-mm-dd
|
||||
$fechaArr = explode("-", $fechaTxt);
|
||||
if($showDay)
|
||||
return $fechaArr[2]."/".$fechaArr[1]."/".$fechaArr[0];
|
||||
else
|
||||
return "01/".$fechaArr[1]."/".$fechaArr[0];
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
function fechaTexto($fechaTxt, $showYear = true){//convierte fecha a cadena de texto
|
||||
$fechaTxt = trim($fechaTxt);
|
||||
if(substr($fechaTxt,2,1) == "/" && substr($fechaTxt,5,1) == "/"){// dd/mm/aaaa
|
||||
$fechaArr = explode("/", $fechaTxt);
|
||||
if($showYear)
|
||||
return intval($fechaArr[0])." de ".mesNombre($fechaArr[1])." de ".$fechaArr[2];
|
||||
else
|
||||
return intval($fechaArr[0])." de ".mesNombre($fechaArr[1]);
|
||||
}
|
||||
if(substr($fechaTxt,4,1) == "-" && substr($fechaTxt,7,1) == "-"){// aaaa-mm-dd
|
||||
$fechaArr = explode("-", $fechaTxt);
|
||||
if($showYear)
|
||||
return intval($fechaArr[2])." de ".mesNombre($fechaArr[1])." de ".$fechaArr[0];
|
||||
else
|
||||
return intval($fechaArr[2])." de ".mesNombre($fechaArr[1]);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
function fechaMonthPicker($fechaTxt){
|
||||
$meses=array(1=>"ene", "feb", "mar", "abr", "may", "jun", "jul", "ago", "sep", "oct", "nov", "dic");
|
||||
$fechaTxt = trim($fechaTxt);
|
||||
if(substr($fechaTxt,2,1) == "/" && substr($fechaTxt,5,1) == "/"){// dd/mm/aaaa
|
||||
$fechaArr = explode("/", $fechaTxt);
|
||||
return $meses[intval($fechaArr[1])].", ".$fechaArr[2];
|
||||
}
|
||||
if(substr($fechaTxt,4,1) == "-" && substr($fechaTxt,7,1) == "-"){// aaaa-mm-dd
|
||||
$fechaArr = explode("-", $fechaTxt);
|
||||
return $meses[intval($fechaArr[1])].", ".$fechaArr[0];
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
function fechaMes($fechaTxt){
|
||||
$fechaTxt = trim($fechaTxt);
|
||||
if(substr($fechaTxt,2,1) == "/" && substr($fechaTxt,5,1) == "/"){// dd/mm/aaaa
|
||||
$fechaArr = explode("/", $fechaTxt);
|
||||
return intval(mesNombre($fechaArr[1])." ".$fechaArr[2]);
|
||||
}
|
||||
if(substr($fechaTxt,4,1) == "-" && substr($fechaTxt,7,1) == "-"){// aaaa-mm-dd
|
||||
$fechaArr = explode("-", $fechaTxt);
|
||||
return intval(mesNombre($fechaArr[2])." ".$fechaArr[1]);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
function mesNombre($num){
|
||||
$meses=array(1=>"enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre");
|
||||
return $meses[intval($num)];
|
||||
}
|
||||
|
||||
function diaNombre($num){
|
||||
$dias=array("domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado");
|
||||
return $dias[intval($num)];
|
||||
}
|
||||
|
||||
function horaMin($arr, $campo = "Horario_hora"){
|
||||
$min = "";
|
||||
foreach($arr as $horario){
|
||||
if($min == "" || date('H:i', strtotime($horario[$campo])) < date('H:i', strtotime($min))){
|
||||
$min = $horario[$campo];
|
||||
}
|
||||
}
|
||||
return date('H:i', strtotime($min));
|
||||
}
|
||||
|
||||
function horaMax($arr, $campo = "Horario_hora_final"){
|
||||
$max = "";
|
||||
foreach($arr as $horario){
|
||||
if($max == "" || date('H:i', strtotime($horario[$campo])) > date('H:i', strtotime($max))){
|
||||
$max = $horario[$campo];
|
||||
}
|
||||
}
|
||||
return date('H:i', strtotime($max));
|
||||
}
|
||||
function duracionMinutos($fechahora_i, $fechahora_f){
|
||||
return round((strtotime($fechahora_f) - strtotime($fechahora_i)) / 60,2);
|
||||
}
|
||||
|
||||
function validaPassword($pass){
|
||||
$expr = '/^\S*(?=\S{5,})(?=\S*[a-zA-Z])(?=\S*[\d])(?=\S*[\W])\S*$/';
|
||||
return preg_match($expr, $pass);
|
||||
}
|
||||
Reference in New Issue
Block a user