Пример #1
0
include locate_template('templates/sections/user-info.php');
?>

  <?php 
if (is_user_role('editor') || is_user_role('administrator') || $user_info->ID == get_current_user_id()) {
    $userdata = ['DNI' => get_the_author_meta('dbem_dnie', $user_info->ID), 'Fecha de nacimiento' => get_the_author_meta('bornday', $user_info->ID), 'Teléfono' => get_the_author_meta('dbem_phone', $user_info->ID), 'Dirección' => get_the_author_meta('dbem_address', $user_info->ID), 'Estudios' => get_the_author_meta('titulacion', $user_info->ID), 'Centro de estudios' => get_the_author_meta('centro_de_estudios', $user_info->ID)];
    /* Datos de asociado */
    if ($user_info->ID == get_current_user_id()) {
        $title_section = 'Tus datos de asociado';
    } else {
        $title_section = 'Datos de asociado';
    }
    wpdc_the_section_custom($userdata, 'userdata', $title_section, true);
    /* Messages */
    if ($user_info->ID == get_current_user_id()) {
        $title_section = 'Mensajes con ' . get_option('blogname');
    } else {
        $title_section = 'Mensajes con ' . wpdc_get_user_name($user_info->ID);
    }
    wpdc_the_section_messages(get_user_notification_track($user_info->ID, 'type', 'message'), 'user_messages', $title_section, true);
}
if (is_user_role('editor') || is_user_role('administrator')) {
    /* Historial de registro */
    wpdc_the_section_registry_track(get_user_registry_track($user_info->ID), 'user_track', 'Historial', true);
}
?>


</div><!-- end of flexboxer -->
<?php 
get_footer();
Пример #2
0
/**
 * GET USER ASOCIATION POSITION
 ***********************************/
function wpdc_the_asociation_position($user_id)
{
    $output = '';
    if (is_user_role('subscriber', $user_id)) {
        $output .= change_role_name('subscriber');
        if (get_the_author_meta('asociation_status', $user_id) == 'pendiente') {
            $output .= ' | Pendiente de asociaciarse';
        }
    } else {
        $pos = get_the_author_meta('asociation_position', $user_id);
        $res = get_the_author_meta('asociation_responsability', $user_id);
        if (!empty($pos)) {
            $output .= change_role_name($pos);
        }
        if (!empty($pos) && !empty($res)) {
            $output .= ' | ';
        }
        if (!empty($res)) {
            $output .= change_role_name($res);
        }
        if (empty($res) && empty($pos)) {
            $output .= change_role_name('author');
        }
    }
    echo $output;
}
Пример #3
0
        ?>
" target="_blank">Más información</a></strong></span>
          </div>
        </div>
      
        <div id="content-<?php 
        the_ID();
        ?>
" class="wrap wrap--frame">
          <?php 
        the_content();
        ?>
        </div>
        
        <?php 
        if (get_user_meta($current_user->ID, 'asociation_responsability', true) == 'rp_jobs' || is_user_role('administrator')) {
            ?>
          <?php 
            wpdc_the_edit_icon(get_bloginfo('url') . '/edit-jobs/?id=' . get_the_ID());
            ?>
        <?php 
        }
        ?>

      <?php 
    }
    ?>
    </section>

  <?php 
} else {
<?php

get_header();
if (get_user_meta($current_user->ID, 'asociation_position', true) == 'tesorero' || is_user_role('administrator')) {
    $args = array('order' => 'DESC', 'posts_per_page' => -1, 'post_type' => 'fee', 'orderby' => 'meta_value', 'meta_key' => 'fee_date_end');
    $wp_query = new wp_query($args);
    $pageoptions = ["feelist" => $wp_query->post_count . " Cuotas creadas", "createfee" => "Crear cuota", "setbankaccount" => "Configurar cuentas"];
    ?>

  <!-- flexboxer -->
  
    <div class="flexboxer flexboxer--configuration__treasury">

      <!-- admin options -->
      <?php 
    wpdc_the_pageoptions($pageoptions);
    ?>

      <!-- create fee options -->
      <?php 
    include locate_template('templates/sections/fee-create.php');
    ?>

      <!-- bank account options -->
      <?php 
    include locate_template('templates/sections/config-bankaccount.php');
    ?>
          
      <!-- fee list -->
      <?php 
    if (have_posts()) {
      <?php 
                if ($log == true) {
                    ?>
<td><?php 
                    the_last_login($user_id);
                    ?>
</td><?php 
                }
                ?>
      
      <?php 
                if ($est == true) {
                    ?>
<td><?php 
                    if (get_the_author_meta('perfil_publico', $user_id) == 1) {
                        if (is_user_role('author', $user_id) || is_user_role('editor', $user_id)) {
                            echo '<span style="color:green;" title="Confirmado">C</span>';
                        } else {
                            echo '<span title="Pendiente de confirmación">P</span>';
                        }
                    } else {
                        echo '<span title="En proceso de registro">NP</span>';
                    }
                    ?>
</td><?php 
                }
                ?>
      
      <?php 
                if ($kar == true) {
                    ?>
             foreach ($_POST['posts_to_remove'] as $post_id) {
                 if (!empty($post_id) && $post_id > 0) {
                     $cont++;
                     wp_delete_post($post_id, true);
                 }
             }
             if ($cont > 0) {
                 $alerts_success .= '<p>' . $cont . ' artículos eliminados con éxito</p>';
             }
         }
     }
 }
 /* EDITAR POST
 *
 ******************************************************/
 if (esc_attr($_POST['action']) == 'edit-posts' && (get_user_meta($current_user->ID, 'asociation_responsability', true) == 'rp_posts' || is_user_role('administrator'))) {
     if (esc_attr($_POST['updatesection']) == 'updateposts') {
         $hasError = false;
         $publish_status = 'publish';
         $publish_type = 'post';
         $msg = '';
         if (trim($_POST['post_name']) === '') {
             $hasError = true;
             $msg .= '<p>Falta el nombre del artículo!</p>';
         }
         if (!$_POST['id'] > 0) {
             $hasError = true;
             $msg .= '<p>Qué intentas?</p>';
         }
         if (get_post_type($_POST['id']) != $publish_type) {
             $hasError = true;
Пример #7
0
  <?php 
if (is_user_role("author") || is_user_role("editor") || is_user_role("administrator")) {
    if (get_option("invitation_op") == true || is_user_role("editor") || is_user_role("administrator")) {
        if ($invitaciones < get_option("invitation_count") || is_user_role("administrator")) {
            ?>
          <?php 
            do_action('front_end_box/login');
            ?>

          <section class="wrap wrap--content wrap--shadow wrap--form">
            <h3 class="title title--section"><?php 
            the_title();
            ?>
</h3>
            <?php 
            if (!is_user_role("administrator")) {
                ?>
              <p class="help help--section">Invitaciones restantes: <?php 
                echo $invit_rest;
                ?>
</p>
            <?php 
            }
            ?>

  					<form name="registerform" action="<?php 
            echo add_query_arg('do', 'register', home_url('/invitar/'));
            ?>
" method="post" onsubmit="return validateForm(this);">

              <?php 
Пример #8
0
      </a>
    </figure>
  <?php 
}
?>
  <div class="wrap wrap--content content content--archive">
    <h2 class="title title--archive" ><a href="<?php 
the_permalink();
?>
"><?php 
the_title();
?>
</a></h2>
    <p class="info info--post">
      <?php 
if (!is_user_role('administrator', get_the_author_meta('ID'))) {
    echo 'Por <a href="' . get_author_posts_url(get_the_author_meta('ID')) . '">' . wpdc_get_user_name(get_the_author_meta('ID')) . '</a> ';
}
?>
      <span class="js-date"><?php 
echo get_the_date('Y-m-d H:i:s');
?>
</span>
    <p>
    <div class="content">
      <?php 
the_excerpt();
?>
    </div>
  </div>
</section>