';
$html .= '
';
$html .= '
';
$html .= '
';
$html .= self::$icon . ' ' . self::$title_text;
$html .= ' ';
$html .= self::$iconAction;
$html .= '';
$html .= self::$subtitle;
$html .= '
';
$html .= '';
if(self::$otherBtn) {
$html .= self::otherBtn(self::$otherBtn);
}
if(self::$goBack) {
$html .= self::goBack(self::$goBack);
}
$html .= '
';
$html .= '';
return $html;
}
public static function goBack($goBack) {
global $volver_lg;
$html = '';
$html .= '' . $volver_lg . ' ';
$html .= ' ';
return $html;
}
public static function otherBtn (...$otherBtn) {
$html = '';
foreach(self::$otherBtn as $btn) {
$html .= $btn;
}
return $html;
}
public static function navigationButton() {//Los breadcrum de la navegacion
$html = '';
$html .= '';
foreach(self::$navigationButton as $btn) {
$html .= $btn;
}
$html .= ' ';
$html .= ' ';
return $html;
}
public static function Input($id, $type, $nombre = FALSE, $required = FALSE, $other = FALSE) {
global $campo_obligatorio_lg;
$required = $required ? 'required' : FALSE;
if(!$nombre) {
$placeholder = !empty(self::$placeHolder) ? self::getPlaceHolder() : FALSE;
} else {
$placeholder = $nombre;
}
/* $yelling = $type == 'date' ? FALSE : 'onkeyup="yelling(this)"'; */
$html = '';
return $html;
}
public static function ToggleSwitch ($id, $nombre) {
$html = '';
return $html;
}
public static function StockSelect($con, $id, $label = FALSE, $select = FALSE, $other = FALSE, $grupo = FALSE, $usuarioSession = FALSE, $firstOption = NULL) {
//$con es la conexion
//$id es el id y name
//$label por si se quiere asignar el label con nombre
//$select es el valor de comparacion para asignar un selected
//$other es para asignar otras cosas como funciones
global $elige_lg;
global $campo_obligatorio_lg;
$INT = "#*INT$";
$GRUPO_CONDICION = "#$grupo$";
$USUARIO_SESSION = "#$usuarioSession$";
$firstOption = $firstOption ? $firstOption : $elige_lg;
$html = '';
return $html;
}
public static function EstadoSelect($con, $id, $label = FALSE, $select = FALSE, $other = FALSE) {
global $estado_lg;
global $lg;
$html = '';
$label = $label ? '' . $label . ' ' : FALSE;
$html .= $label;
$html .= '';
$html .= '' . mb_strtoupper($estado_lg, 'UTF-8') . ' ';
$sql = "SELECT * FROM VEHICULOS_ESTADOS WHERE ACTIVO = 1";
$res = $con->query($sql);
while($row = $res->fetch_array()) {
$selected = $select == $row['CODIGO'] ? 'selected' : FALSE;
$html .= '' . $row['DESCRIPCION_' .$lg] . ' ';
}
$html .= ' ';
$html .= '
';
return $html;
}
//OBSOLETAS
public static function TitleSection ($icon, $titulo, $volver = NULL, $volver_texto = FALSE) {
$html = '';
$html .= '
';
$html .= ' ' . $titulo;
$html .= ' ';
if($volver){
$html .= '
';
}
$html .= '
';
return $html;
}
//OBSOLETAS
public static function MainTitle($titulo, $icon = FALSE, $subtitulo = FALSE){
$iconTAG = $icon ? ' ' : '';
$html = '';
$html .= $iconTAG . $titulo;
$html .= ' ';
if($subtitulo){
$html .= '' . $subtitulo . '
';
}
return $html;
}
//OBSOLETAS
public static function Back($volver, $volver_texto){
//window.location.href=
//history.back()
$html = '';
return $html;
}
//No se encuentra uso para esta funcion - Mb 15/01/2021
public static function buscarContacto($placeholder, $control_input , $cliente = NULL, $titulo){
$html = '';
$html .= '
';
$html .= '
';
$html .= '';
$html .= '
';
$html .= '
';
$html .= '';
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '
';
echo $html;
}
//OBSOLETAS
public static function inputsClientes($id, $label, $type, $value = NULL, $required = NULL, $required_text = NULL){
$html = '';
$html .= '
' . $label . ' ';
$html .= '
';
if($required){
$html .= '
';
$html .= $required_text;
$html .= '
';
}
$html .= '
';
echo $html;
}
public static function inputSinIcono($id, $label, $tipo_input, $otras = FALSE, $required = FALSE, $mensaje_invalid = FALSE){
//$id = label for, id input, name input
//$label = titulo de input
//$tipo_input = el tipo de input (number, text, date, hidden)
//$otras = cualquier campo necesario del input como value, acciones js, placeholder
//required = si es necesario el campo, y el mensaje
//style = add a class;
global $campo_obligatorio_lg;
$html = '' . $label . ' ';
/* $yelling = $tipo_input == 'text' ? 'onkeyup="yelling(this)"' : FALSE; */
$html .= ' ';
if($required){
$mensaje_invalid = $mensaje_invalid ? $mensaje_invalid : $campo_obligatorio_lg;
$html .= '' . $mensaje_invalid . '
';
}
return $html;
}
public static function inputConIcono ($id, $icon, $tipo_input, $otras = FALSE, $required = FALSE, $label = FALSE) {
global $campo_obligatorio_lg;
$required = $required ? 'required' : '';
$invalid_tooltip = '';
$d_none = 'd-none';
if($required) {
$required = 'required';
$invalid_tooltip = '' . $campo_obligatorio_lg . '
';
}
if($label) {
$d_none = 'd-block';
}
$html = '' . $label . ' ';
$html .= '';
return $html;
}
public static function TextArea($id, $placeholder, $value = FALSE){
$value = $value ? $value : FALSE;
$html = '';
return $html;
}
public static function ButtonModal($title, $target, $icon){
$html = '';
$html .= '';
$html .= ' ';
$html .= ' ';
$html .= ' ';
return $html;
}
public static function ButtonLink($link, $icono, $tooltip = FALSE) {
$tooltip = $tooltip ? 'data-toggle="tooltip" data-placement="top" data-title="' . $tooltip . '"' : '';
$html = '' . $icono . ' ';
return $html;
}
//Observaciones Tasaciones
//No se encuentra uso para esta funcion - Mb 15/01/2021
public static function observaciones($con, $observaciones_lg, $codigo_tas = FALSE, $tas_value, $vehiculo, $guardar_lg, $seccion_vacia_lg){
$schema = new Schema($con);
$html = '';
$html .= '';
echo $html;
}
public static function ListadoIVA($con, $id, $label = FALSE, $select = FALSE){
global $elige_lg;
$html = '';
if($label) {
$html .= '' . $label .' ';
}
$html .= '';
$sql = "SELECT * FROM EXPEDIENTES_IMPUESTOS WHERE GRUPO = 'IVA'";
$res = $con->query($sql);
$html .= '' . $elige_lg . ' ';
while($row = $res->fetch_array()) {
$selected = $row['CODIGO'] == $select ? 'selected' : '';
$html .= '' . number_format($row['PORCENTAJE'], 2, ',', '.') . ' ';
}
$html .= ' ';
$html .= '
';
return $html;
}
public static function rebu() {
global $sin_rebu_lg;
$html = '';
return $html;
}
public static function select_precio ($id = FALSE, $top = FALSE, $min = FALSE, $label = FALSE) {
global $precio_hasta_lg;
global $elige_lg;
$id = !$id ? 'precio_hasta' : $id;
$top = !$top ? 1000000 : $top;
$min = !$min ? 1000: $min;
$label = $label ? '' . $label .' ' : FALSE;
$optionName = $label ? $elige_lg : $precio_hasta_lg;
$html = '';
$html .= $label;
$html .= '';
$html .= " $optionName ";
for($i = $min; $i <= $top; $i = $i + 1000){
if(!empty($i)){
if($i > 10000 AND $i < 10000){
$i = $i + 9000;
}
if($i > 10000 AND $i < 100000){
$i = $i + 9000;
}
if($i > 100000 AND $i < 1000000){
$i = $i + 49000;
}
if($i > 1000000 AND $i < $top){
$i = $i + 499000;
}
$html .= "" . number_format($i,2,',','.') . " ";
}
}
$html .= ' ';
$html .= '
';
return $html;
}
public static function range($id = FALSE, $label = FALSE, $value = FALSE, $max = FALSE) {
$html = '';
$html .= '' . $label . ' ';
$html .= ' ';
$html .= ' ';
$html .= '
';
return $html;
}
public static function select_ano ($id = FALSE, $label = FALSE, $select = FALSE) {
global $ano_matriculacion_lg;
global $elige_lg;
$id = $id ? $id : 'anio';
$label = $label ? '' . $label .' ' : FALSE;
$optionName = $label ? $elige_lg : $ano_matriculacion_lg;
$html = '';
$html .= $label;
$html .= '';
$html .= " $optionName ";
for($i = date('Y'); $i >= 1975; $i--) {
$selected = $select == $i ? 'selected' : FALSE;
$html .= "$i ";
}
$html .= ' ';
$html .= '
';
return $html;
}
public static function select_km ($input_name = FALSE) {
global $km_hasta_lg;
$input_name = $input_name ? $input_name : 'kmHasta';
$html = '';
$html .= '';
$html .= "$km_hasta_lg ";
for($i = 10000; $i <= 200000; $i = $i + 10000){
$html .= "" . number_format($i,0,',',' ') . " ";
}
$html .= ' ';
$html .= '
';
return $html;
}
public static function select_si_no($id, $label, $select = NULL, $required = FALSE) {
global $lg;
global $elige_lg;
global $si_lg;
global $no_lg;
global $campo_obligatorio_lg;
$required = $required ? 'required' : '';
$html = '';
return $html;
}
public static function sub_titulo ($titulo, $style = FALSE) {
$html = '' . $titulo . ' ';
return $html;
}
public static function input_file ($accept = FALSE, $style = FALSE) {
global $vacio_lg;
$style = $style ? $style : 'col-12';
$accept = $accept ? $accept : 'accept="image/jpeg,image/gif,image/png,application/pdf"';
$html = '';
return $html;
}
public static function mensaje_informativo ($mensaje_principal, $mensaje_secundario = FALSE, $tipo_mesaje = FALSE) {
if ($tipo_mesaje) {
$color = 'danger';
$icono = 'exclamation-circle';
} else {
$color = 'success';
$icono = 'check-circle';
}
$mensaje_secundario = $mensaje_secundario ? ' - ' . $mensaje_secundario : '';
$html = '';
$html .= ' ' . $mensaje_principal . $mensaje_secundario;
$html .= '× ';
$html .= '
';
return $html;
}
public static function input_radio_buttons_style ($style = FALSE, ...$other) {
//$style == css para los labels
//...$other = es lo que se mete desde fuera , todo el input y en funcion de cuantos de meten se generaran lo botones
$html = '';
for($i = 0; $i < count($other); $i++) {
$active = strpos($other[$i], 'checked') ? 'active' : '';
$style = $style ? $style : 'btn-secondary btn-sm';
$html .= '';
$html .= $other[$i];
$html .= ' ';
}
$html .= '
';
return $html;
}
public static function img_no_disponible ($style = FALSE) {
// Se tiene que meter en un row
$style = $style ? $style : 'bg-light';
$html = '';
$html .= '
';
$html .= ' ';
$html .= '
';
$html .= '
';
$html .= '';
$html .= '
';
$html .= ' ';
$html .= '
';
$html .= '
';
$html .= '';
$html .= '
';
$html .= ' ';
$html .= '
';
$html .= '
';
return $html;
}
public static function img_disponible ($ruta, $id, $card_title, $otras_funcionalidades = FALSE, $style = FALSE, $view_modal = FALSE) {
//$card_title = titulo de la imagen
//$otras_funcionalidades = otros botones de acción
//$ruta = ruta en funcion de donde se encuentra el archivo
//$id = codigo de la imagen
$id_for_modal = str_split($id,9);
$style = $style ? $style : 'col-sm-4 col-md-6 col-12 mb-3';
$html = '';
$html .= '
';
$html .= '
';
$html .= '
' . $card_title . ' ';
$html .= $otras_funcionalidades ? $otras_funcionalidades : '';
$html .= '';
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '';
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '
';
return $html;
}
public static function iframe_disponible ($ruta, $id, $card_title, $style = FALSE) {
$id_for_modal = str_split($id,9);
$style = $style ? $style : 'col-12 mb-3';
$html = '';
$html .= '
';
$html .= '
';
$html .= ' ';
$html .= '
' . $card_title . ' ';
$html .= '';
$html .= '
';
$html .= '
';
$html .= '';
$html .= '
';
$html .= '
';
/* $html .= '
'; */
$html .= '
';
$html .= '';
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '
';
return $html;
}
public static function img_sortable ($ruta, $id, $card_title, $otras_funcionalidades = FALSE, $style = FALSE) {
$id_for_modal = str_split($id,9);
$style = $style ? $style : 'col-sm-4 col-md-6 col-12 mb-3';
$html = ' ';
$html .= '
';
$html .= '
';
$html .= '
' . $card_title . ' ';
$html .= $otras_funcionalidades ? $otras_funcionalidades : '';
$html .= '';
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '
';
$html .= '
';
return $html;
}
public static function Tooltip($descripcion) {
return ' ';
}
}