Plugin Directory

Changeset 2099632


Ignore:
Timestamp:
06/03/2019 07:28:16 AM (7 years ago)
Author:
cuxaro
Message:

Solved bug with wpdb

Location:
registro-de-jornada-laboral
Files:
6 added
4 edited

Legend:

Unmodified
Added
Removed
  • registro-de-jornada-laboral/trunk/ficharme-lite.php

    r2099392 r2099632  
    22/**
    33 * @package ficharme_lite
    4  * @version 1.1.0
     4 * @version 1.1.1
    55 */
    66/*
     
    9999//Instalacion
    100100
    101 function ficharme_create_plugin_database_table()
    102 {
     101function ficharme_create_plugin_database_table(){
     102
     103   
    103104    global $table_prefix, $wpdb;
    104105
  • registro-de-jornada-laboral/trunk/ficharme-shortcodes.php

    r2099392 r2099632  
    66    $current_user = wp_get_current_user();
    77
     8    global $wpdb;
     9
    810    $consulta_where = " 1  ";
     11
    912    if ( !is_ficharme_boss() ) {
    1013
     
    1417    $consulta =  "SELECT * FROM ".$wpdb->prefix."buzz_registro_fichaje WHERE $consulta_where ORDER BY hora_registro DESC";
    1518
    16     global $wpdb;
    17 
    18 
    1919    $fichajes = $wpdb->get_results( $consulta, OBJECT );
    2020
    21 
    22 
    23     $return .= '<div class="listado-fichajes">';
     21    $return = '<div class="listado-fichajes">';
    2422    if($fichajes):
    2523        $return .= '<table>';
     
    5048        $return .= '</table>';
    5149    endif;
    52     $returm .= '</div>';
     50    $return .= '</div>';
    5351
    5452    return $return;
     
    7068
    7169
    72     $return .= '<div class="registrar-fichaje">';
     70    $return = '<div class="registrar-fichaje">';
    7371
    7472    $return .= __('Hola ','ficharme') . $current_user->display_name .'<br>';
     73   
    7574    if($fichajes):
    7675
  • registro-de-jornada-laboral/trunk/js/ajax.js

    r2095214 r2099632  
    22    $('#registar').on('click', function(){ 
    33
    4     console.log('Pulsado')
     4    //console.log('Pulsado')
    55
    66
     
    2121         },
    2222         success: function(response) {
    23            console.log(tipoRegistro);
    2423
    25            console.log('OK');
     24           // console.log(tipoRegistro);
     25
     26           // console.log('OK');
    2627               // Actualiza el mensaje con la respuesta
    2728               var obj = JSON.parse(response);
     
    2930               $('.ultimo_fichaje').text(obj.ultimo_fichaje);
    3031
    31                
    32 
    3332               $('#registar').text(obj.nuevo_tipo_fichaje);
    3433               $('#registar').data('tipo-registro', obj.nuevo_tipo_fichaje);
    35 
    3634
    3735             }
  • registro-de-jornada-laboral/trunk/readme.txt

    r2099392 r2099632  
    66Tested up to: 5.2.1
    77Requires PHP: 5.6
    8 Stable tag: 1.1.0
     8Stable tag: 1.1.1
    99License: GPLv2 or later
    1010
     
    1313= Como funciona =
    1414
    15 * Fichar: `[ficharme_fichar]` en la pagina, post, widget o lugar poner el botón de fichar.
    16 
    17 Automáticamente detectará el ultimo fichaje del trabajador y mostrará el botón de entrada o salida automáticamente
     15* Fichar: `[ficharme_fichar]` en la pagina, post, widget o lugar poner el botón de fichar. Automáticamente detectará el ultimo fichaje del trabajador y mostrará el botón de entrada o salida automáticamente
    1816
    1917* Ver fichajes: `[ficharme_fichajes]` con este shortcode que puedes ingresar donde quieras mostrará los fichajes del propio usuario y si el usuario es 'Administrador' o 'Empresa', mostrará todos los fichajes de todos los trabajadores.
     
    3432
    3533== Changelog ==
     34
     35= 1.1.1 =
     36
     37Solucionado bug
     38
    3639= 1.1.0 =
    3740
Note: See TracChangeset for help on using the changeset viewer.