Ejemplo n.º 1
0
function userpro_get_avatar($avatar, $id_or_email, $size, $default, $alt = '')
{
    global $userpro;
    if (isset($id_or_email->user_id)) {
        $id_or_email = $id_or_email->user_id;
    } elseif (is_email($id_or_email)) {
        $user = get_user_by('email', $id_or_email);
        $id_or_email = $user->ID;
    }
    if ($id_or_email && userpro_profile_data('profilepicture', $id_or_email)) {
        $url = $userpro->file_uri(userpro_profile_data('profilepicture', $id_or_email));
        $crop = userpro_url . "lib/timthumb.php?src=" . $url . "&w={$size}&h={$size}&a=t&q=100";
        $return = '<img src="' . $crop . '" width="' . $size . '" height="' . $size . '" alt="' . $alt . '" class="modified avatar" />';
    } else {
        if ($id_or_email && userpro_profile_data('gender', $id_or_email)) {
            $gender = strtolower(userpro_profile_data('gender', $id_or_email));
        } else {
            $gender = 'male';
            // default gender
        }
        $userpro_default = userpro_url . 'img/default_avatar_' . $gender . '.jpg';
        $return = '<img src="' . $userpro_default . '" width="' . $size . '" height="' . $size . '" alt="' . $alt . '" class="default avatar" />';
    }
    if (userpro_profile_data('profilepicture', $id_or_email) != '') {
        return $return;
    } else {
        if (userpro_get_option('use_default_avatars') == 1) {
            return $avatar;
        } else {
            return $return;
        }
    }
}
Ejemplo n.º 2
0
function userpro_get_avatar($avatar, $id_or_email, $size, $default, $alt = '')
{
    global $userpro;
    require_once userpro_path . 'lib/BFI_Thumb.php';
    if (isset($id_or_email->user_id)) {
        $id_or_email = $id_or_email->user_id;
    } elseif (is_email($id_or_email)) {
        $user = get_user_by('email', $id_or_email);
        $id_or_email = $user->ID;
    }
    if ($id_or_email && userpro_profile_data('profilepicture', $id_or_email)) {
        $url = $userpro->file_uri(userpro_profile_data('profilepicture', $id_or_email), $id_or_email);
        $params = array('width' => $size, 'height' => $size, 'quality' => 100);
        $crop = bfi_thumb(get_site_url() . (strpos($url, "http") !== false ? urlencode($url) : $url), $params);
        $return = '<img src="' . $crop . '" width="' . $size . '" height="' . $size . '" alt="' . $alt . '" class="modified avatar" />';
    } else {
        if ($id_or_email && userpro_profile_data('gender', $id_or_email)) {
            $gender = strtolower(userpro_profile_data('gender', $id_or_email));
        } else {
            $gender = 'male';
            // default gender
        }
        $userpro_default = userpro_url . 'img/default_avatar_' . $gender . '.jpg';
        $return = '<img src="' . $userpro_default . '" width="' . $size . '" height="' . $size . '" alt="' . $alt . '" class="default avatar" />';
    }
    if (userpro_profile_data('profilepicture', $id_or_email) != '') {
        return $return;
    } else {
        if (userpro_get_option('use_default_avatars') == 1) {
            return $avatar;
        } else {
            return $return;
        }
    }
}
Ejemplo n.º 3
0
function userpro_admin_users_badges($value, $column_name, $user_id)
{
    global $userpro;
    $user = get_userdata($user_id);
    if (userpro_get_option('backend_users_change')) {
        if ('userpro_username' == $column_name) {
            $res = '<div class="upadmin-avatar">' . get_avatar($user_id, 40) . '</div>';
            $res .= '<strong><a href="' . $userpro->permalink($user_id) . '" target="_blank" title="' . __('View Profile', 'userpro') . '">' . $user->user_login . '</a></strong><br />';
            $res .= '<span class="upadmin-small-name">(' . userpro_profile_data('display_name', $user_id) . ')</span>';
            $res .= '<div class="row-actions"><span class="edit"><a href="' . $userpro->permalink($user_id, 'edit') . '" target="_blank">' . __('Edit Profile', 'userpro') . '</a></span></div>';
            return $res;
        }
    }
    if ('userpro_admin_badges' == $column_name) {
        $res = userpro_show_badges($user_id, true);
        return $res;
    }
    if ('userpro_verify' == $column_name) {
        $res = '<div class="upadmin-verify-v2">';
        if ($userpro->get_verified_status($user_id) == 0) {
            $res .= '<a href="#" class="button upadmin-verify-u" data-user="' . $user_id . '">' . userpro_get_badge('unverified') . '</a>';
        } else {
            if (userpro_is_admin($user_id)) {
                $res .= '<a href="#" class="button button-primary upadmin-unverify-u" data-user="' . $user_id . '">' . userpro_get_badge('verified') . '</a>';
            } else {
                $res .= '<a href="#" class="button button-primary upadmin-unverify-u" data-user="' . $user_id . '">' . userpro_get_badge('verified') . '</a>';
            }
        }
        if ($userpro->get_verified_status($user_id) == 0) {
            if ($userpro->invited_to_verify($user_id)) {
                $res .= '&nbsp;&nbsp;' . __('Invitation sent!', 'userpro');
            } else {
                $res .= '<a href="#" class="button upadmin-invite-u" data-user="' . $user_id . '">' . __('Verified Invite', 'userpro') . '</a>';
            }
        }
        $res .= '</div>';
        return $res;
    }
    if ('block_users' == $column_name) {
        $res = '<div class="upadmin-block-v2">';
        if ($userpro->get_account_status($user_id) == 0) {
            $res .= '<a href="#" class="button upadmin-block-u" data-user="' . $user_id . '">' . userpro_get_badge('unblocked') . '</a>';
        } else {
            if (userpro_is_admin($user_id)) {
                $res .= '<a href="#" class="button upadmin-unblock-u" data-user="' . $user_id . '">' . userpro_get_badge('blocked') . '</a>';
            } else {
                $res .= '<a href="#" class="button upadmin-unblock-u" data-user="' . $user_id . '">' . userpro_get_badge('blocked') . '</a>';
            }
        }
        if ($userpro->get_account_status($user_id) == 1) {
            $res .= '<span class="button" data-user="' . $user_id . '">' . __('Account Blocked', 'userpro') . '</span>';
        }
        $res .= '</div>';
        $res .= '</div>';
        return $res;
    }
    return $value;
}
Ejemplo n.º 4
0
 function delete_file($user_id, $key)
 {
     if (userpro_profile_data($key, $user_id)) {
         $file = $this->get_uploads_dir($user_id) . basename(userpro_profile_data($key, $user_id));
         if (file_exists($file)) {
             unlink($file);
         }
     }
 }
Ejemplo n.º 5
0
 function map_url($url, $user)
 {
     $array = array('{username}' => $user->user_login);
     foreach (get_option('userpro_fields') as $key => $arr) {
         $array['{' . $key . '}'] = $this->filter(userpro_profile_data($key, $user->ID));
     }
     $search = array_keys($array);
     $replace = array_values($array);
     $url = str_replace($search, $replace, $url);
     return $url;
 }
Ejemplo n.º 6
0
function userpro_unverify_verified_account($form, $user_id)
{
    global $userpro;
    // validate display name change
    if (!userpro_is_admin($user_id) && userpro_get_option('unverify_on_namechange') && $userpro->get_verified_status($user_id) == 1 && !current_user_can('manage_options')) {
        if (isset($form['display_name'])) {
            $old_displayname = userpro_profile_data('display_name', $user_id);
            $new_displayname = $form['display_name'];
            if ($new_displayname != $old_displayname) {
                $userpro->unverify($user_id);
            }
        }
    }
}
Ejemplo n.º 7
0
function userpro_profile_icons($args, $user_id, $wrapper = null)
{
    global $userpro;
    $res = null;
    foreach (userpro_fields_group_by_template('social', $args["social_group"]) as $key => $array) {
        $icon = $userpro->field_icon($key);
        if (userpro_profile_data($key, $user_id) && userpro_field_is_viewable($key, $user_id, $args) && $icon) {
            $res .= '<a href="' . userpro_link_filter(userpro_profile_data($key, $user_id), $key) . '" class="userpro-profile-icon userpro-tip" title="' . $array['label'] . '" target="' . $args['social_target'] . '" ><i class="userpro-icon-' . $icon . '"></i></a>';
        }
    }
    if ($res) {
        if ($wrapper) {
            echo '<div class="' . $wrapper . '">';
        }
        echo $res;
        if ($wrapper) {
            echo '</div>';
        }
    }
}
Ejemplo n.º 8
0
function userpro_rd_custom_register_redirection($arg)
{
    $user_id = get_current_user_id();
    $user = get_userdata($user_id);
    $rules = get_option('userpro_redirects_register');
    if (is_array($rules)) {
        $rules = array_reverse($rules);
        foreach ($rules as $k => $rule) {
            /* Check user */
            if ($rule['user'] != '' || $rule['user'] == 'all') {
                if ($user_id == $rule['user'] || $rule['user'] == 'all') {
                    $arg = $rule['url'];
                    return $arg;
                    exit;
                }
            }
            /* Check user */
            if ($rule['field'] != '') {
                $test = userpro_profile_data($rule['field'], $user_id);
                if ($test == $rule['field_value']) {
                    $arg = $rule['url'];
                    return $arg;
                    exit;
                }
            }
            /* Check role */
            if ($rule['role'] != '') {
                $user_roles = $user->roles;
                $user_role = array_shift($user_roles);
                if ($user_role == $rule['role']) {
                    $arg = $rule['url'];
                    return $arg;
                    exit;
                }
            }
        }
    }
    return $arg;
}
Ejemplo n.º 9
0
function userpro_bp_get_displayed_user_mentionname()
{
    $user_id = bp_displayed_user_id();
    return userpro_profile_data('display_name', $user_id);
}
Ejemplo n.º 10
0
 function extract_profile_for_mail($user_id, $form)
 {
     $output = '';
     foreach ($form as $k => $v) {
         if ($this->field_label($k) != '' && !strstr($k, 'pass')) {
             $val = userpro_profile_data($k, $user_id);
             if ($k == 'gender') {
                 $val = userpro_profile_data_nicename($k, userpro_profile_data($k, $user_id));
             }
             if (is_array($val)) {
                 $val = implode(', ', $val);
             }
             $output .= $this->field_label($k) . ': ' . $val . "\r\n";
         }
     }
     return $output;
 }
Ejemplo n.º 11
0
Archivo: api.php Proyecto: Darciro/PPM
 function field_value($field, $user_id)
 {
     $value = userpro_profile_data_nicename($field, userpro_profile_data($field, $user_id));
     return $value;
 }
Ejemplo n.º 12
0
function userpro_update_user_profile($user_id, $form, $action = null)
{
    global $userpro;
    extract($form);
    if ($action == 'new_user' && !$userpro->user_exists($user_id)) {
        die;
    }
    if (!$userpro->user_exists($user_id)) {
        die;
    }
    if ($action == 'ajax_save' && $user_id != get_current_user_id() && !current_user_can('manage_options')) {
        die;
    }
    if (!$template) {
        die;
    }
    /* hooks before saving profile fields */
    do_action('userpro_pre_profile_update', $form, $user_id);
    $form = apply_filters('userpro_pre_profile_update_filters', $form, $user_id);
    $fields = userpro_fields_group_by_template($template, $group);
    foreach ($form as $key => $form_value) {
        /* hidden from public */
        if (!isset($form["hide_{$key}"])) {
            update_user_meta($user_id, 'hide_' . $key, 0);
        } elseif (isset($form["hide_{$key}"])) {
            update_user_meta($user_id, 'hide_' . $key, 1);
        }
        /* UPDATE PRIMARY META */
        if (isset($key) && in_array($key, array('user_url', 'display_name', 'role', 'user_login', 'user_pass', 'user_pass_confirm', 'user_email'))) {
            /* Save passwords */
            if ($key == 'user_pass') {
                if (!empty($form_value)) {
                    wp_update_user(array('ID' => $user_id, $key => $form_value));
                }
            } else {
                wp_update_user(array('ID' => $user_id, $key => $form_value));
            }
        }
        /* UPDATE USER META TABLE */
        if (isset($key) && !strstr($key, 'pass')) {
            update_user_meta($user_id, $key, $form_value);
        } else {
            delete_user_meta($user_id, $key);
        }
        /* move user pics to his folder */
        if ((isset($fields[$key]['type']) && $fields[$key]['type'] == 'picture' || isset($fields[$key]['type']) && $fields[$key]['type'] == 'file') && isset($form_value) && !empty($form_value)) {
            $userpro->do_uploads_dir($user_id);
            if (file_exists($userpro->get_uploads_dir() . basename(userpro_profile_data($key, $user_id)))) {
                rename($userpro->get_uploads_dir() . basename(userpro_profile_data($key, $user_id)), $userpro->get_uploads_dir($user_id) . basename(userpro_profile_data($key, $user_id)));
                update_user_meta($user_id, $key, $userpro->get_uploads_url($user_id) . basename(userpro_profile_data($key, $user_id)));
            }
        }
        /* MailChimp Integration */
        if (isset($fields[$key]['type']) && $fields[$key]['type'] == 'mailchimp') {
            if ($form[$key] == 'unsubscribed') {
                $userpro->mailchimp_subscribe($user_id, $fields[$key]['list_id']);
            } elseif ($form[$key] == 'subscribed') {
                $userpro->mailchimp_unsubscribe($user_id, $fields[$key]['list_id']);
            }
        }
    }
    /* do action while updating profile (use $form) */
    do_action('userpro_profile_update', $form, $user_id);
    /* after profile update no args */
    do_action('userpro_after_profile_updated');
}
Ejemplo n.º 13
0
<p class="submit">
	<input type="submit" name="find-user-badges" id="find-user-badges" class="button button-primary" value="<?php 
_e('Find User Badges', 'userpro');
?>
"  />
</p>

</form>

<?php 
if (isset($_POST['badge_user']) && $userpro->user_exists($_POST['badge_user'])) {
    $user_id = $_POST['badge_user'];
    $badges = get_user_meta($user_id, '_userpro_badges', true);
    if (isset($badges) && is_array($badges) && !empty($badges)) {
        echo '<h3>' . sprintf(__('%s\'s Given Badges', 'userpro'), userpro_profile_data('display_name', $user_id)) . '</h3>';
        foreach ($badges as $k => $arr) {
            ?>
			
			<div class="userpro-user-badge">
				<img src="<?php 
            echo $arr['badge_url'];
            ?>
" alt="" title="<?php 
            echo $arr['badge_title'];
            ?>
" /> <?php 
            echo $arr['badge_title'];
            ?>
				<a href="#" class="button userpro-delete-badge" data-user="<?php 
            echo $user_id;
Ejemplo n.º 14
0
    ?>
.userpro-id-<?php 
    echo $user_id;
    ?>
 div.userpro-centered {
	background-image: url(<?php 
    echo $userpro->correct_space_in_url(userpro_profile_data('custom_profile_bg', $user_id));
    ?>
) !important;
	background-size: cover;
	-webkit-background-origin:border;
	background-repeat: no-repeat;
}

<?php 
    if (userpro_profile_data('custom_profile_color', $user_id) == userpro_get_option('heading_light')) {
        ?>
div.userpro-<?php 
        echo $i;
        ?>
.userpro-id-<?php 
        echo $user_id;
        ?>
 div.userpro-profile-name,
div.userpro-<?php 
        echo $i;
        ?>
.userpro-id-<?php 
        echo $user_id;
        ?>
 div.userpro-profile-name a {
Ejemplo n.º 15
0
function userpro_show_field($key, $array, $i, $args, $user_id = null)
{
    global $userpro;
    extract($array);
    extract($args);
    $res = null;
    /**
    		include & exclude
    		done by custom shortcode
    		params 
    		start here 
    		**/
    if (isset($args['exclude_fields']) && $args['exclude_fields'] != '') {
        if (in_array($key, explode(',', $args['exclude_fields']))) {
            $res = '';
            return false;
        }
    }
    if (isset($args['exclude_fields_by_name']) && $args['exclude_fields_by_name'] != '') {
        if (in_array($array['label'], explode(',', $args['exclude_fields_by_name']))) {
            $res = '';
            return false;
        }
    }
    if (isset($args['exclude_fields_by_type']) && $args['exclude_fields_by_type'] != '') {
        if (isset($array['type']) && in_array($array['type'], explode(',', $args['exclude_fields_by_type']))) {
            $res = '';
            return false;
        }
    }
    if (isset($args['include_fields']) && $args['include_fields'] != '') {
        if (!in_array($key, explode(',', $args['include_fields']))) {
            $res = '';
            return false;
        }
    }
    if (isset($args['include_fields_by_name']) && $args['include_fields_by_name'] != '') {
        if (!in_array($array['label'], explode(',', $args['include_fields_by_name']))) {
            $res = '';
            return false;
        }
    }
    if (isset($args['include_fields_by_type']) && $args['include_fields_by_type'] != '') {
        if (isset($array['type']) && !in_array($array['type'], explode(',', $args['include_fields_by_type'])) || !isset($array['type'])) {
            $res = '';
            return false;
        }
    }
    /**
    		end here
    		thanks please do not edit 
    		here unless you know what you do
    		**/
    if ($user_id) {
        $value = userpro_profile_data($key, $user_id);
        if (isset($array['type']) && $key != 'role' && in_array($array['type'], array('select', 'multiselect', 'checkbox', 'checkbox-full', 'radio', 'radio-full'))) {
            $value = userpro_profile_data_nicename($key, userpro_profile_data($key, $user_id));
        }
        if (isset($array['html']) && $array['html'] == 0) {
            $value = userpro_profile_nohtml($value);
        }
        if (isset($array['type']) && $array['type'] == 'picture') {
            if ($key == 'profilepicture') {
                $value = get_avatar($user_id, 64);
            } else {
                $crop = userpro_profile_data($key, $user_id);
                if ($crop) {
                    if (isset($array['width'])) {
                        $width = $array['width'];
                        $height = $array['height'];
                    } else {
                        $width = '';
                        $height = '';
                    }
                    $value = '<img src="' . $crop . '" width="' . $width . '" height="' . $height . '" alt="" class="modified" />';
                }
            }
        }
        if (isset($array['type']) && $array['type'] == 'file') {
            $file = userpro_profile_data($key, $user_id);
            if ($file) {
                $value = '<div class="userpro-file-input"><a href="' . $file . '" ' . userpro_file_type_icon($file) . '>' . basename($file) . '</a></div>';
            }
        }
    }
    /* display a section */
    if ($allow_sections && isset($array['heading'])) {
        $res .= "<div class='userpro-section userpro-column userpro-collapsible-" . $array['collapsible'] . " userpro-collapsed-" . $array['collapsed'] . "'>" . $array['heading'] . "</div>";
    }
    /* display a field */
    if (!$user_id) {
        $user_id = 0;
    }
    if (isset($array['type']) && userpro_field_by_role($key, $user_id) && !empty($value) && userpro_field_is_viewable($key, $user_id, $args) && !in_array($key, $userpro->fields_to_hide_from_view()) && $array['type'] != 'mailchimp' && $array['type'] != 'followers') {
        $res .= "<div class='userpro-field userpro-field-" . $key . " " . userpro_private_field_class($array) . " userpro-field-{$template}' data-key='{$key}'>";
        if ($array['label'] && $array['type'] != 'passwordstrength') {
            if ($args['field_icons'] == 1) {
                $res .= "<div class='userpro-label view iconed'>";
            } else {
                $res .= "<div class='userpro-label view'>";
            }
            $res .= "<label for='{$key}-{$i}'>" . $array['label'] . "</label>";
            if ($args['field_icons'] == 1 && $userpro->field_icon($key)) {
                $res .= '<span class="userpro-field-icon"><i class="userpro-icon-' . $userpro->field_icon($key) . '"></i></span>';
            }
            $res .= "</div>";
        }
        $res .= "<div class='userpro-input'>";
        //***
        /* Before custom field is displayed!
         */
        /**/
        $value = apply_filters('userpro_before_value_is_displayed', $value, $key, $array, $user_id);
        /* SHOW VALUE */
        $countrylist = get_option('userpro_fields');
        $country = $countrylist['billing_country']['options'];
        if ($key == 'role') {
            $res .= userpro_user_role($value);
        } elseif ($key == 'billing_country') {
            foreach ($country as $country_code => $country_name) {
                if ($country_name == $value) {
                    $res .= $value;
                }
                if ($country_code == $value) {
                    $value = $country_name;
                    $res .= $value;
                }
            }
        } elseif ($key == 'shipping_country') {
            foreach ($country as $country_code => $country_name) {
                if ($country_name == $value) {
                    $res .= $value;
                }
                if ($country_code == $value) {
                    $value = $country_name;
                    $res .= $value;
                }
            }
        } else {
            $res .= $value;
        }
        /* hidden field notice */
        if (userpro_field_is_viewable($key, $user_id, $args) && (userpro_profile_data('hide_' . $key, $user_id) || userpro_field_default_hidden($key, $template, $args[$template . '_group']))) {
            $res .= '<div class="userpro-help">' . sprintf(__('(Your %s will not be visible to public)', 'userpro'), strtolower($array['label'])) . '</div>';
        }
        $res .= "<div class='userpro-clear'></div>";
        $res .= "</div>";
        $res .= "</div><div class='userpro-clear'></div>";
    }
    return $res;
}
Ejemplo n.º 16
0
function userpro_update_user_profile($user_id, $form, $action = null)
{
    global $userpro;
    $template = isset($form['template']) ? $form['template'] : 0;
    $group = isset($form['group']) ? $form['group'] : 0;
    if ($action == 'new_user' && !$userpro->user_exists($user_id)) {
        die;
    }
    if (!$userpro->user_exists($user_id)) {
        die;
    }
    if ($action == 'ajax_save' && $user_id != get_current_user_id() && !current_user_can('manage_options')) {
        die;
    }
    if (!$template) {
        die;
    }
    /* hooks before saving profile fields */
    do_action('userpro_pre_profile_update', $form, $user_id);
    $form = apply_filters('userpro_pre_profile_update_filters', $form, $user_id);
    $fields = userpro_fields_group_by_template($template, $group);
    $allfields = get_option('userpro_fields_groups');
    $editfields = $allfields['edit']['default'];
    foreach ($form as $key => $form_value) {
        //$form_value = esc_attr($form_value);  // Commented to solve Array issue
        /* hidden from public */
        if (!isset($form["hide_{$key}"])) {
            update_user_meta($user_id, 'hide_' . $key, 0);
        } elseif (isset($form["hide_{$key}"])) {
            update_user_meta($user_id, 'hide_' . $key, 1);
        }
        /* UPDATE PRIMARY META */
        if (isset($key) && in_array($key, array('user_url', 'display_name', 'role', 'user_login', 'user_pass', 'user_pass_confirm', 'user_email'))) {
            /* Save passwords */
            if ($key == 'user_pass') {
                if (!empty($form_value)) {
                    wp_update_user(array('ID' => $user_id, $key => $form_value));
                }
            } else {
                if ($key == 'role' && $form[$key] == 'administrator' && !is_admin()) {
                    continue;
                } else {
                    wp_update_user(array('ID' => $user_id, $key => $form_value));
                }
            }
        }
        /* delete unused uploads */
        if ((isset($fields[$key]['type']) && $fields[$key]['type'] == 'picture' || isset($fields[$key]['type']) && $fields[$key]['type'] == 'file') && isset($form_value) && !empty($form_value) && basename($form_value) != basename(userpro_profile_data($key, $user_id))) {
            $userpro->delete_file($user_id, $key);
        }
        if (isset($key) && !strstr($key, 'pass')) {
            $countrylist = get_option('userpro_fields');
            if (isset($countrylist['billing_country']['options'])) {
                $country = $countrylist['billing_country']['options'];
            }
            if ($key == 'billing_country') {
                foreach ($country as $country_code => $country_name) {
                    if ($country_name == $form_value) {
                        $form_value = $country_code;
                        update_user_meta($user_id, $key, $form_value);
                    }
                }
            }
            if ($key == 'shipping_country') {
                foreach ($country as $country_code => $country_name) {
                    if ($country_name == $form_value) {
                        $form_value = $country_code;
                        update_user_meta($user_id, $key, $form_value);
                    }
                }
            } else {
                update_user_meta($user_id, $key, $form_value);
            }
        } else {
            delete_user_meta($user_id, $key);
        }
        /* move user pics to his folder */
        if ((isset($fields[$key]['type']) && $fields[$key]['type'] == 'picture' || isset($fields[$key]['type']) && $fields[$key]['type'] == 'file') && isset($form_value) && !empty($form_value)) {
            $userpro->do_uploads_dir($user_id);
            if (file_exists($userpro->get_uploads_dir() . basename(userpro_profile_data($key, $user_id)))) {
                rename($userpro->get_uploads_dir() . basename(userpro_profile_data($key, $user_id)), $userpro->get_uploads_dir($user_id) . basename(userpro_profile_data($key, $user_id)));
                update_user_meta($user_id, $key, $userpro->get_uploads_url($user_id) . basename(userpro_profile_data($key, $user_id)));
            }
        }
        /* MailChimp Integration */
        if (isset($fields[$key]['type']) && $fields[$key]['type'] == 'mailchimp') {
            if ($form[$key] == 'unsubscribed') {
                if (userpro_get_option('aweber_api') != '' && userpro_get_option('aweber_listname') != '') {
                    $userpro->makeAweberSubscribeEntry($user_id);
                }
                if (userpro_get_option('Campaignmonitor_listname') != '' && userpro_get_option('Campaignmonitor_api') != '') {
                    $userpro->makeCampaignmonitorEntry($user_id);
                }
                $userpro->mailchimp_subscribe($user_id, $fields[$key]['list_id']);
            } elseif ($form[$key] == 'subscribed') {
                $userpro->mailchimp_unsubscribe($user_id, $fields[$key]['list_id']);
            }
        }
    }
    foreach ($editfields as $editfieldkey => $editfieldvalue) {
        if (isset($editfieldvalue['type'])) {
            if ($editfieldvalue['type'] == 'checkbox-full' || $editfieldvalue['type'] == 'multiselect' || $editfieldvalue['type'] == 'checkbox') {
                if (!array_key_exists($editfieldkey, $form)) {
                    delete_user_meta($user_id, $editfieldkey);
                }
            }
        }
    }
    /* do action while updating profile (use $form) */
    do_action('userpro_profile_update', $form, $user_id);
    /* after profile update no args */
    do_action('userpro_after_profile_updated');
}
Ejemplo n.º 17
0
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width"></head><bodystyle="min-width: 100%;-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;margin: 0;padding: 0;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;text-align: left;line-height: 19px;font-size: 14px;width: 100%!important;"><table class="body" style="border-spacing: 0;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;height: 100%;width: 100%;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="center" align="center" valign="top"style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;padding: 0;vertical-align: top;text-align: center;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;border-collapse: collapse!important;"><center style="width: 100%;min-width: 580px;"><table class="row header" style="border-spacing: 0;border-collapse: collapse;padding: 0px;vertical-align: top;text-align: left;background: #fff;width: 100%;position: relative;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="center" align="center"style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;padding: 0;vertical-align: top;text-align: center;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;border-collapse: collapse!important;"><center style="width: 100%;min-width: 580px;"><table class="container" style="border-spacing: 0;border-collapse: collapse;padding: 0;vertical-align: top;text-align: inherit;width: 580px;margin: 0 auto;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="wrapper last"style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;padding: 10px 20px 0px 0px;vertical-align: top;text-align: left;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;position: relative;padding-right: 0px;border-collapse: collapse!important;"><table class="twelve columns" style="border-spacing: 0;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;margin: 0 auto;width: 580px;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="six sub-columns"style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;padding: 0px 0px 10px;vertical-align: top;text-align: left;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;min-width: 0px;padding-right: 10px;width: 50%;border-collapse: collapse!important;"><a href="http://www.ppm.art.br" target="_blank" style="color: #2ba6cb;text-decoration: none;"><imgsrc="http://galdar.com.br/espaco-do-cliente/ppm/wp-content/themes/ppm/assets/img/logo.png"style="outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;width: auto;max-width: 100%;float: left;clear: both;display: block;border: none;"></a></td><td class="expander"style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;padding: 0!important;vertical-align: top;text-align: left;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;visibility: hidden;width: 0px;border-collapse: collapse!important;"></td></tr></table></td></tr></table></center></td></tr></table><table class="container" style="border-spacing: 0;border-collapse: collapse;padding: 0;vertical-align: top;text-align: inherit;width: 580px;margin: 0 auto;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;padding: 0;vertical-align: top;text-align: left;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;border-collapse: collapse!important;"><table class="row" style="border-spacing: 0;border-collapse: collapse;padding: 0px;vertical-align: top;text-align: left;width: 100%;position: relative;display: block;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="wrapper last"style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;padding: 10px 20px 0px 0px;vertical-align: top;text-align: left;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;position: relative;padding-right: 0px;border-collapse: collapse!important;"><table class="twelve columns" style="border-spacing: 0;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;margin: 0 auto;width: 580px;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;padding: 0px 0px 10px;vertical-align: top;text-align: left;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;border-collapse: collapse!important;"><h1 style="color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;margin: 0;text-align: left;line-height: 1.3;word-break: normal;font-size: 40px;">Hello, <?php 
if (userpro_profile_data('ppm_fullname', $user->ID)) {
    echo userpro_profile_data('ppm_fullname', $user->ID);
}
?>
</h1><p class="lead" style="margin-bottom: 20px;margin: 0;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 21px;font-size: 18px;">Welcome to Music Pro Awards 2016. Your application has beensuccessful.</p><p style="margin: 0;margin-bottom: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;">If you want to make a new application of a music company orprofessional, return to entries and do it again. We remember: beresponsible for multiple entries, only you are entitled to voteso, share the Music Pro Awards website for professionals who youknow and build this experience and increase our network.</p></td><td class="expander"style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;padding: 0!important;vertical-align: top;text-align: left;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;visibility: hidden;width: 0px;border-collapse: collapse!important;"></td></tr></table></td></tr></table><table class="row callout" style="border-spacing: 0;border-collapse: collapse;padding: 0px;vertical-align: top;text-align: left;width: 100%;position: relative;display: block;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="wrapper last"style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;padding: 10px 20px 0px 0px;vertical-align: top;text-align: left;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;position: relative;padding-bottom: 20px;padding-right: 0px;border-collapse: collapse!important;"><table class="twelve columns" style="border-spacing: 0;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;margin: 0 auto;width: 580px;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="panel"style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;padding: 10px!important;vertical-align: top;text-align: left;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;background: #222;border: 1px solid #d9d9d9;border-color: #ddd;border-collapse: collapse!important;"><p style="margin: 0;margin-bottom: 10px;color: #fff;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;">For questions, please email us on <ahref="mailto:ppm@grv.art.br"style="color: rgb(236, 208, 0);text-decoration: none;font-weight: 600;">ppm@grv.art.br</a>| <a href="tel:+556133224263" style="color: rgb(236, 208, 0);text-decoration: none;font-weight: 600;">tel:55 61 3322 4263</a></p></td><td class="expander"style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;padding: 0!important;vertical-align: top;text-align: left;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;visibility: hidden;width: 0px;border-collapse: collapse!important;"></td></tr><tr style="padding: 0;vertical-align: top;text-align: left;"><td style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;padding: 0px 0px 10px;vertical-align: top;text-align: left;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;border-collapse: collapse!important;"><p style="margin-top: 20px;text-align: right;margin: 0;margin-bottom: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;line-height: 19px;font-size: 14px; padding-top: 10px; font-style: italic;">Good luck</p></td></tr></table></td></tr></table><table class="info" style="border-spacing: 0;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;width: 100%;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="wrapper panel info-heading"style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;padding: 10px!important;vertical-align: top;text-align: left;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;background: #222;border: 1px solid #d9d9d9;border-color: #ddd;position: relative;border-collapse: collapse!important;"><h6 style="margin-top: 20px;margin-bottom: 10px;color: #FFFFFF;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;margin: 0;text-align: left;line-height: 1.3;word-break: normal;font-size: 20px; padding-top: 30px;">Voting Steps</h6><p style="margin: 0;margin-bottom: 10px;color: #fff;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;">Step 01: From the choice of 5 pre-selected by category</p></td></tr><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="panel"style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;padding: 10px!important;vertical-align: top;text-align: left;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;background: #f2f2f2;border: 1px solid #d9d9d9;border-collapse: collapse!important;"><p style="margin: 0;margin-bottom: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;">Finalized the registration and registration period, we will provide a listof all the entries in all categories.</p></td></tr><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="wrapper panel"style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;padding: 10px!important;vertical-align: top;text-align: left;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;background: #f2f2f2;border: 1px solid #d9d9d9;position: relative;border-collapse: collapse!important;"><p style="margin: 0;margin-bottom: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;">Who can vote in step 01, from the release of the total list of subscribersin all categories?</p><p style="margin: 0;margin-bottom: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;">A: ARTISTS AND MUSIC PROFESSIONALS previously registered on the eventwebsite only. <br/> Jury source: supporting links</p></td></tr><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="wrapper panel info-heading"style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;padding: 10px!important;vertical-align: top;text-align: left;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;background: #222;border: 1px solid #d9d9d9;border-color: #ddd;position: relative;border-collapse: collapse!important;"><p style="margin: 0;margin-bottom: 10px;color: #fff;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;">Step 02: The choice of 3 Selected by category</p></td></tr><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="panel"style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;padding: 10px!important;vertical-align: top;text-align: left;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;background: #f2f2f2;border: 1px solid #d9d9d9;border-collapse: collapse!important;"><p style="margin: 0;margin-bottom: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;">Who can vote in step 02, from the results of five pre-selected in eachcategory?</p><p style="margin: 0;margin-bottom: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;">A: previously registered professionals and general public who will be able,all together, freely select only at the Music Pro Awards 2016 website, the 3[three] Selected for all categories who wish to vote.</p><p style="margin: 0;margin-bottom: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;">Jury source: supporting links</p></td></tr><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="wrapper panel info-heading"style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;padding: 10px!important;vertical-align: top;text-align: left;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;background: #222;border: 1px solid #d9d9d9;border-color: #ddd;position: relative;border-collapse: collapse!important;"><p style="margin: 0;margin-bottom: 10px;color: #fff;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;">Step 03: The choice of the winner of each category</p></td></tr><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="panel"style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;padding: 10px!important;vertical-align: top;text-align: left;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;background: #f2f2f2;border: 1px solid #d9d9d9;border-collapse: collapse!important;"><p style="margin: 0;margin-bottom: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;">Who can vote in step 03, from the release of the results of three selectedfrom each category?</p><p style="margin: 0;margin-bottom: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;">A: The Jury</p><p style="margin: 0;margin-bottom: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;">Jury source: supporting links. For vote: <a href="www.ppm.art.br"target="_blank"style="color: #2ba6cb;text-decoration: none;">www.ppm.art.br</a></p></td></tr><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="wrapper panel info-heading"style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;padding: 10px!important;vertical-align: top;text-align: left;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;background: #222;border: 1px solid #d9d9d9;border-color: #ddd;position: relative;border-collapse: collapse!important;"><p style="margin: 0;margin-bottom: 10px;color: #fff;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;">III How many will be pre-selected by the Public and Professional previouslyregistered in each category?</p></td></tr><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="panel"style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;padding: 10px!important;vertical-align: top;text-align: left;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;background: #f2f2f2;border: 1px solid #d9d9d9;border-collapse: collapse!important;"><p style="margin: 0;margin-bottom: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;">5 [five]. The category that does not reach the minimum of three entries willbe automatically excluded from voting, and consequently, awards.</p></td></tr><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="wrapper panel info-heading"style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;padding: 10px!important;vertical-align: top;text-align: left;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;background: #222;border: 1px solid #d9d9d9;border-color: #ddd;position: relative;border-collapse: collapse!important;"><p style="margin: 0;margin-bottom: 10px;color: #fff;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;">VI How many will be Selected by the artists and music professionalspreviously registered in each category?</p></td></tr><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="panel"style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;padding: 10px!important;vertical-align: top;text-align: left;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;background: #f2f2f2;border: 1px solid #d9d9d9;border-collapse: collapse!important;"><p style="margin: 0;margin-bottom: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;">3 [three] </p></td></tr></table></tr><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="wrapper panel info-heading"style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;padding: 10px!important;vertical-align: top;text-align: left;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;background: #222;border: 1px solid #d9d9d9;border-color: #ddd;position: relative;border-collapse: collapse!important;"><p style="margin: 0;margin-bottom: 10px;color: #fff;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;">V Deadlines</p></td></tr><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="panel"style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;padding: 10px!important;vertical-align: top;text-align: left;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;background: #f2f2f2;border: 1px solid #d9d9d9;border-collapse: collapse!important;"><p style="margin: 0;margin-bottom: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;">I Registration: 20 nov 2015 to jan 17, 2016 at <a href="www.ppm.art.br" target="_blank" style="color: #2ba6cb;text-decoration: none;">www.ppm.art.br</a></p><p style="margin: 0;margin-bottom: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;">II Disclosure of all subscribers by category: January 25, 2016</p><p style="margin: 0;margin-bottom: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;">Voting Period only to previously registered Music Professionals: 1st to February 20,2016 [this stage we will know 5 Pre-Selected]</p><p style="margin: 0;margin-bottom: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;">III Disclosure of 5 [five] Pre - Selected by category: February 28 2016</p><p style="margin: 0;margin-bottom: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;">IV Public Voting Period between General and music professionals previously registered:February 29 to March 13, 2016 [3 Selected this stage we will know]</p><p style="margin: 0;margin-bottom: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;">V Disclosure of 3 [three] Selected by Category: March 20, 2016</p><p style="margin: 0;margin-bottom: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;">VI Voting Period to the Judging Committee for choosing the winner: 21 to March 27,2016</p><p style="margin: 0;margin-bottom: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;text-align: left;line-height: 19px;font-size: 14px;">VII Award Ceremony : 1, 2 and 3 April 2016 | Location: Theatre Brasilia: BrasiliaFederal District</p></td></tr></table><table class="row" style="border-spacing: 0;border-collapse: collapse;padding: 0px;vertical-align: top;text-align: left;width: 100%;position: relative;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td class="wrapper last"style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;padding: 10px 20px 0px 0px;vertical-align: top;text-align: left;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;position: relative;padding-right: 0px;border-collapse: collapse!important;"><table class="twelve columns" style="border-spacing: 0;border-collapse: collapse;padding: 0;vertical-align: top;text-align: left;margin: 0 auto;width: 580px;"><tr style="padding: 0;vertical-align: top;text-align: left;"><td align="center"style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;padding: 0px 0px 10px;vertical-align: top;text-align: left;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;border-collapse: collapse!important;"><center style="width: 100%;min-width: 580px;"><p style="text-align: center;margin: 0;margin-bottom: 10px;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;padding: 0;line-height: 19px;font-size: 14px;">Music Pro Awards 2016 | Creation, Production, Distribution</p></center></td><td class="expander"style="word-break: break-word;-webkit-hyphens: auto;-moz-hyphens: auto;hyphens: auto;padding: 0!important;vertical-align: top;text-align: left;color: #222222;font-family: Helvetica, Arial, sans-serif;font-weight: normal;margin: 0;line-height: 19px;font-size: 14px;visibility: hidden;width: 0px;border-collapse: collapse!important;"></td></tr></table></td></tr></table></center></td></tr></table></body></html>
Ejemplo n.º 18
0
        echo $userpro->permalink($comment['comment_userid']);
        ?>
" title="<?php 
        _e('View Profile', 'userpro');
        ?>
" ><?php 
        echo get_avatar($comment['comment_userid'], "40");
        ?>
 </a></div> 
	
			
	<div class="userwall-post-content"><div class="displayname"><a href="<?php 
        echo $userpro->permalink($comment['comment_userid']);
        ?>
"><?php 
        echo userpro_profile_data('display_name', $comment['comment_userid']);
        ?>
</a></div>
	
	<?php 
        $commenttimestamp = strtotime($comment['comment_date']);
        $commenttime = date('d-M-Y', $commenttimestamp);
        ?>
	<div class="post-date post-comment-date"><?php 
        echo "Commented On " . $commenttime;
        ?>
</div><?php 
        echo "<br><p>" . $comment['comment_content'] . "</p>";
        echo "</div></div>";
    }
    ?>
Ejemplo n.º 19
0
function userwall_upload_img()
{
    global $userpro;
    $my_post = array('post_title' => 'imgpost', 'post_content' => $_POST['src'], 'post_status' => 'publish', 'post_type' => 'userpro_userwall');
    $post_data = wp_insert_post($my_post);
    add_post_meta($post_data, 'user_id', get_current_user_id());
    $dislike_post = 0;
    $like_post = 0;
    $data = array('user_profile' => '<div class="userwall" id=' . $post_data . '><div class="userwall_delete_post">
<i onclick="userwall_report_post( ' . $post_data . ' ,' . get_current_user_id() . ');" class="reportpost fa fa-exclamation-circle"></i>
<i  onclick="userwall_delete_post( ' . $post_data . ' , this);" class="fa fa-trash fa-fw"></i>
</div><div class="userwall-post-content-img" data-key="profilepicture"><a href="' . $userpro->permalink(get_current_user_id()) . '" title="_e(\'View Profile\',\'userpro\')"> ' . get_avatar(get_current_user_id(), "60") . '</a></div>
		<div class="userwall-post-content" id=userwall-post-content' . $post_data . '><div class="displayname"><a href="' . $userpro->permalink(get_current_user_id()) . '"> ' . userpro_profile_data('display_name', get_current_user_id()) . '</a><div class="post-date">Posted On ' . date('d-M-Y h:i') . '</div></div>
			<br><br> <img src="' . $_POST['src'] . '" width="auto" style="-moz-user-select: none;
    border-radius: 10px;max-width:99%"> </div><div  class="userwall-comment-data-' . $post_data . '" id="userwall-comment">

<div class="userwall_postlikecount_post" id="userwall_postlikecount_post' . $post_data . '">
<i onclick="userwall_postlikecount_post(' . $post_data . ',' . get_current_user_id() . ',' . $like_post . ',' . $dislike_post . ');"  class="fa fa-thumbs-up btn-like-dislike socialwall_postlikecount_post"></i> <i class="socialwall_postlikecount_post ">' . $like_post . '</i>
<i onclick="userwall_postdislikecount_post(' . $post_data . ',' . get_current_user_id() . ',' . $dislike_post . ',' . $like_post . ');" class="fa fa-thumbs-down btn-like-dislike socialwall_postlikecount_post"></i><i class="socialwall_postlikecount_post ">' . $dislike_post . '</i>
</div>
<div class="countlike" id="countlike' . $post_data . '">
<br>



</div>

</div> <div class="commenttext">
<div class="clear"></div><textarea placeholder="Enter comment and Hit ENTER to submit..." id=userwall-comment-' . $post_data . ' onkeypress="user_post_comment(\'userwall-comment\',' . get_current_user_id() . ',' . $post_data . ',event);" name="userwall-comment"cols="40" rows="1" class="comment_textarea"></textarea></div>');
    $post_all_data = json_encode($data);
    if (is_array($post_all_data)) {
        print_r($post_all_data);
    } else {
        echo $post_all_data;
    }
    die;
}
Ejemplo n.º 20
0
 function export_users()
 {
     global $userpro;
     if (!file_exists($userpro->upload_base_dir . 'downloads/')) {
         @mkdir($userpro->upload_base_dir . 'downloads/', 0777, true);
     }
     $export = array('id' => 'ID', 'user_login' => 'Username', 'user_email' => 'Email');
     $export = array_merge(array_keys($export), array_keys($userpro->fields));
     if (isset($_POST['exp_exclude']) && !empty($_POST['exp_exclude'])) {
         $export = array_diff(array_values($export), explode(',', $_POST['exp_exclude']));
     }
     if (isset($_POST['exp_include']) && !empty($_POST['exp_include'])) {
         $export = explode(',', $_POST['exp_include']);
     }
     $list[] = $export;
     $export = array_unique($export);
     $users = get_users('number=' . $_POST['exp_users_num'] . '&offset=0');
     foreach ($users as $user) {
         foreach ($export as $k => $v) {
             $values[] = userpro_profile_data($v, $user->ID);
         }
         $list[] = $values;
         $values = null;
     }
     $file = $userpro->upload_base_dir . 'downloads/' . time() . '.csv';
     $fp = fopen($file, 'w');
     foreach ($list as $fields) {
         fputcsv($fp, $fields);
     }
     fclose($fp);
     echo '<div class="updated fade"><p><strong>' . sprintf(__('Download the exported users list <a href="%s">here</a>.', 'userpro'), $userpro->upload_base_url . 'downloads/' . time() . '.csv') . '</strong></p></div>';
 }
Ejemplo n.º 21
0
Archivo: api.php Proyecto: Darciro/PPM
 function extract_profile_for_mail($user_id, $form)
 {
     $output = '';
     $customfieldarray = array();
     foreach ($form as $k => $v) {
         if ($this->field_label($k) != '' && !strstr($k, 'pass')) {
             $val = userpro_profile_data($k, $user_id);
             if ($k == 'gender') {
                 $val = userpro_profile_data_nicename($k, userpro_profile_data($k, $user_id));
             }
             if (is_array($val)) {
                 $val = implode(', ', $val);
             }
             $output .= $this->field_label($k) . ': ' . $val . "\r\n";
             $customfieldarray['{USERPRO_' . $k . '}'] = $val;
         }
     }
     return array('output' => $output, 'custom_fields' => $customfieldarray);
 }
Ejemplo n.º 22
0
function userpro_broadcast()
{
    global $userpro, $userpro_msg;
    $output = '';
    extract($_POST);
    if (!userpro_is_logged_in() || $user_id != get_current_user_id()) {
        die;
    }
    $user_id = get_current_user_id();
    $registered_users = explode(",", $user_list);
    $no_of_users -= 1;
    if ($registered_users[$user_no] != $user_id) {
        $userpro_msg->do_chat_dir($registered_users[$user_no], $user_id, $mode = 'inbox');
        $userpro_msg->write_chat($registered_users[$user_no], $user_id, $broadcast_body, $mode = 'inbox');
        $userpro_msg->email_user($registered_users[$user_no], $user_id, $broadcast_body);
        if (isset($_SESSION['user_count'])) {
            $_SESSION['user_count'] += 1;
        } else {
            $_SESSION['user_count'] = 1;
        }
        $output['message'] = '<div class="userpro-msg-notice">' . __('Your message has been sent to ' . userpro_profile_data('display_name', $registered_users[$user_no]) . '.', 'userpro-msg') . '</div><div class="userpro-msg-notice">' . __('Message sent to ' . $_SESSION['user_count'] . ' out of ' . $no_of_users . ' users.', 'userpro-msg') . '</div>';
        if ($_SESSION['user_count'] >= $no_of_users) {
            unset($_SESSION['user_count']);
            $userpro_msg->email_broadcaster($user_id, $broadcast_body);
            $output['message'] .= '<div class="userpro-msg-notice">' . __('Your message has been broadcasted successfully.', 'userpro-msg') . '</div>';
        }
        $output = json_encode($output);
        if (is_array($output)) {
            print_r($output);
        } else {
            echo $output;
        }
        die;
    } else {
        $output['message'] = '';
        $output = json_encode($output);
        if (is_array($output)) {
            print_r($output);
        } else {
            echo $output;
        }
        die;
    }
}
Ejemplo n.º 23
0
?>
</label></th>
		<td>
			<select name="badge_to_users[]" id="badge_to_users[]" multiple="multiple" class="chosen-select" style="width:300px" data-placeholder="<?php 
_e('Choose...', 'userpro');
?>
">
				<?php 
$users = userpro_badges_admin_users();
foreach ($users as $user) {
    ?>
				<option value="<?php 
    echo $user->ID;
    ?>
"><?php 
    echo userpro_profile_data('display_name', $user->ID);
    if ($user->user_email) {
        echo ' (' . $user->user_email . ')';
    }
    ?>
</option>
				<?php 
}
?>
			</select>
			<span class="description"><?php 
_e('You can assign this badge to specific to the users you want by choosing them here.', 'userpro');
?>
</span>
		</td>
	</tr>
Ejemplo n.º 24
0
<div class="userpro-msg-user">
			
				<div class="userpro-msg-user-thumb"><?php 
echo get_avatar(get_current_user_id(), 50);
?>
</div>
				<div class="userpro-msg-user-info">
					<div class="userpro-msg-user-name">
						<a href="<?php 
echo $userpro->permalink(get_current_user_id());
?>
"><?php 
echo userpro_profile_data('display_name', get_current_user_id());
?>
</a><?php 
echo userpro_show_badges(get_current_user_id(), $inline = true);
?>
					</div>
					<div class="userpro-msg-user-tab"><i class="userpro-icon-comment-alt"></i><?php 
_e('Message History', 'userpro-msg');
?>
</div>
				</div>
				
				<a href="#" class="userpro-back-to-inbox" data-user_id="<?php 
echo get_current_user_id();
?>
"><i class="userpro-icon-angle-left"></i><?php 
_e('Back', 'userpro-msg');
?>
</a>
Ejemplo n.º 25
0
 function activity($user_id = 0, $offset = 0, $per_page = 10, $activity_user = 0)
 {
     // private
     if ($user_id) {
         $keys = get_user_meta($user_id, '_userpro_following_ids', true);
         $activity = (array) get_option('userpro_activity');
         if (is_array($keys)) {
             $result = array_intersect_key($activity, $keys);
             if (isset($result) && is_array($result) && $result != '' && $result != array('')) {
                 if (isset($activity_user) && $activity_user != '') {
                     $result = array_intersect_key($result, array_flip(explode(',', $activity_user)));
                 }
                 foreach ($result as $uid => $actions) {
                     foreach ($actions as $k => $action) {
                         $action = str_replace(userpro_profile_data('display_name', $user_id), __('you', 'userpro'), $action);
                         $activities[$k] = $action;
                     }
                 }
                 if (isset($activities)) {
                     // show activities
                     $activities = apply_filters('userpro_private_activity_filter', $activities);
                     krsort($activities);
                     $activities = array_slice($activities, $offset, $per_page);
                     return $activities;
                 }
             }
         }
         // public
     } else {
         $result = (array) get_option('userpro_activity');
         if (isset($result) && is_array($result) && $result != '' && $result != array('')) {
             if (isset($activity_user) && $activity_user != '') {
                 $result = array_intersect_key($result, array_flip(explode(',', $activity_user)));
             }
             foreach ($result as $uid => $actions) {
                 foreach ($actions as $k => $action) {
                     $action = str_replace(userpro_profile_data('display_name', $user_id), __('you', 'userpro'), $action);
                     $activities[$k] = $action;
                 }
             }
             if (isset($activities)) {
                 // show activities
                 $activities = apply_filters('userpro_public_activity_filter', $activities);
                 krsort($activities);
                 $activities = array_slice($activities, $offset, $per_page);
                 return $activities;
             }
         }
     }
 }
Ejemplo n.º 26
0
        $field3 = get_field_object('tax_breaks');
        $field4 = get_field_object('team');
        $field5 = get_field_object('cast');
        $field6 = get_field_object('investor_info');
        $field7 = get_field_object('target');
        $field8 = get_field_object('invested');
        $field9 = get_field_object('soft');
        $field10 = get_field_object('investers');
        $user_ID = get_the_author_id();
        $select_financ = get_user_meta($user_ID, 'select_financ', true);
        $select_creative = get_user_meta($user_ID, 'select_creative', true);
        $finance_package = get_user_meta($user_ID, 'finance_package', true);
        $creative_package = get_user_meta($user_ID, 'creative_package', true);
        $add_image = get_user_meta($user_ID, 'add_image', true);
        $u_vid = false;
        $u_vid = userpro_profile_data('video', $user_ID);
        ?>
    <div class="col-sm-6 col-md-3 <?php 
        echo $user_ID;
        ?>
">
	<div class="pro-box">
	<div class="img-thumb">
	<h4><?php 
        the_title();
        ?>
</h4><br />
	
	
			  
Ejemplo n.º 27
0
            ?>
"><?php 
            echo get_avatar($user_id, $emd_thumb);
            ?>
</a>
			</div>
			
			<div class="emd-user-info">
				<div class="emd-user-left"><a href="<?php 
            echo $userpro->permalink($user_id);
            ?>
" title="<?php 
            _e('View Full Profile', 'userpro');
            ?>
"><?php 
            echo userpro_profile_data('display_name', $user_id);
            ?>
</a></div>
				<div class="emd-user-right"><?php 
            echo userpro_show_badges($user_id, true);
            ?>
</div>
				<div class="userpro-clear"></div>
				<?php 
            do_action('userpro_after_profile_img', $user_id);
            ?>
			</div>
			
			<?php 
            if ($emd_bio) {
                ?>
Ejemplo n.º 28
0
 function populate_columns_inscricao($column)
 {
     global $post;
     $user = get_user_by('id', $post->post_author);
     switch ($column) {
         case 'nome':
             if (userpro_profile_data('ppm_fullname', $post->post_author)) {
                 echo userpro_profile_data('ppm_fullname', $post->post_author);
             } else {
                 echo $user->user_nicename;
             }
             break;
         case 'email':
             // global $userpro;
             // var_dump($userpro);
             echo $user->user_email;
             break;
     }
 }
Ejemplo n.º 29
0
/**
	Sends mail
	This function manage the Mail stuff sent by plugin
	to users
	**/
function userpro_mail($id, $template = null, $var1 = null, $form = null)
{
    global $userpro;
    $user = get_userdata($id);
    $builtin = array('{USERPRO_ADMIN_EMAIL}' => userpro_get_option('mail_from'), '{USERPRO_BLOGNAME}' => userpro_get_option('mail_from_name'), '{USERPRO_BLOG_URL}' => home_url(), '{USERPRO_BLOG_ADMIN}' => admin_url(), '{USERPRO_LOGIN_URL}' => $userpro->permalink(0, 'login'), '{USERPRO_USERNAME}' => $user->user_login, '{USERPRO_FIRST_NAME}' => userpro_profile_data('first_name', $user->ID), '{USERPRO_LAST_NAME}' => userpro_profile_data('last_name', $user->ID), '{USERPRO_NAME}' => userpro_profile_data('display_name', $user->ID), '{USERPRO_EMAIL}' => $user->user_email, '{USERPRO_PROFILE_LINK}' => $userpro->permalink($user->ID), '{USERPRO_VALIDATE_URL}' => $userpro->create_validate_url($user->ID), '{USERPRO_PENDING_REQUESTS_URL}' => admin_url() . '?page=userpro&tab=requests', '{USERPRO_ACCEPT_VERIFY_INVITE}' => $userpro->accept_invite_to_verify($user->ID));
    if (isset($var1) && !empty($var1)) {
        $builtin['{VAR1}'] = $var1;
    }
    if (isset($form) && $form != '') {
        $builtin['{USERPRO_PROFILE_FIELDS}'] = $userpro->extract_profile_for_mail($user->ID, $form);
    }
    $search = array_keys($builtin);
    $replace = array_values($builtin);
    $headers = 'From: ' . userpro_get_option('mail_from_name') . ' <' . userpro_get_option('mail_from') . '>' . "\r\n";
    /////////////////////////////////////////////////////////
    /* verify email/new registration */
    /////////////////////////////////////////////////////////
    if ($template == 'verifyemail') {
        $subject = userpro_get_option('mail_verifyemail_s');
        $message = userpro_get_option('mail_verifyemail');
        $message = str_replace($search, $replace, $message);
    }
    /////////////////////////////////////////////////////////
    /* secret key request */
    /////////////////////////////////////////////////////////
    if ($template == 'secretkey') {
        $subject = userpro_get_option('mail_secretkey_s');
        $message = userpro_get_option('mail_secretkey');
        $message = str_replace($search, $replace, $message);
    }
    /////////////////////////////////////////////////////////
    /* account being removed */
    /////////////////////////////////////////////////////////
    if ($template == 'accountdeleted') {
        $subject = userpro_get_option('mail_accountdeleted_s');
        $message = userpro_get_option('mail_accountdeleted');
        $message = str_replace($search, $replace, $message);
    }
    /////////////////////////////////////////////////////////
    /* verification invite */
    /////////////////////////////////////////////////////////
    if ($template == 'verifyinvite') {
        $subject = userpro_get_option('mail_verifyinvite_s');
        $message = userpro_get_option('mail_verifyinvite');
        $message = str_replace($search, $replace, $message);
    }
    /////////////////////////////////////////////////////////
    /* account being verified */
    /////////////////////////////////////////////////////////
    if ($template == 'accountverified') {
        $subject = userpro_get_option('mail_accountverified_s');
        $message = userpro_get_option('mail_accountverified');
        $message = str_replace($search, $replace, $message);
    }
    /////////////////////////////////////////////////////////
    /* account being unverified */
    /////////////////////////////////////////////////////////
    if ($template == 'accountunverified') {
        $subject = userpro_get_option('mail_accountunverified_s');
        $message = userpro_get_option('mail_accountunverified');
        $message = str_replace($search, $replace, $message);
    }
    /////////////////////////////////////////////////////////
    /* new user's account */
    /////////////////////////////////////////////////////////
    if ($template == 'newaccount' && !$userpro->is_pending($user->ID)) {
        $subject = userpro_get_option('mail_newaccount_s');
        $message = userpro_get_option('mail_newaccount');
        $message = str_replace($search, $replace, $message);
    }
    /////////////////////////////////////////////////////////
    /* email user except: profileupdate */
    /////////////////////////////////////////////////////////
    if ($template != 'profileupdate' && $template != 'pendingapprove') {
        wp_mail($user->user_email, $subject, $message, $headers);
    }
    /////////////////////////////////////////////////////////
    /* admin emails notifications */
    /////////////////////////////////////////////////////////
    if ($template == 'pendingapprove') {
        $subject = userpro_get_option('mail_admin_pendingapprove_s');
        $message = userpro_get_option('mail_admin_pendingapprove');
        $message = str_replace($search, $replace, $message);
        wp_mail(userpro_get_option('mail_from'), $subject, $message, $headers);
    }
    if ($template == 'newaccount') {
        $subject = userpro_get_option('mail_admin_newaccount_s');
        $message = userpro_get_option('mail_admin_newaccount');
        $message = str_replace($search, $replace, $message);
        wp_mail(userpro_get_option('mail_from'), $subject, $message, $headers);
    }
    if ($template == 'accountdeleted' && userpro_get_option('notify_admin_profile_remove')) {
        $subject = userpro_get_option('mail_admin_accountdeleted_s');
        $message = userpro_get_option('mail_admin_accountdeleted');
        $message = str_replace($search, $replace, $message);
        wp_mail(userpro_get_option('mail_from'), $subject, $message, $headers);
    }
    if ($template == 'profileupdate') {
        $subject = userpro_get_option('mail_admin_profileupdate_s');
        $message = userpro_get_option('mail_admin_profileupdate');
        $message = str_replace($search, $replace, $message);
        wp_mail(userpro_get_option('mail_from'), $subject, $message, $headers);
    }
}
Ejemplo n.º 30
0
	<div class="userpro-msg-new">

		<div class="userpro-msg-user">
			
			<div class="userpro-msg-user-thumb"><?php 
echo get_avatar($chat_with, 50);
?>
</div>
			<div class="userpro-msg-user-info">
				<div class="userpro-msg-user-name">
					<a href="<?php 
echo $userpro->permalink($chat_with);
?>
"><?php 
echo userpro_profile_data('display_name', $chat_with);
?>
</a><?php 
echo userpro_show_badges($chat_with, $inline = true);
?>
				</div>
				<div class="userpro-msg-user-tab"><a href="<?php 
echo $userpro->permalink($chat_with);
?>
" class="userpro-flat-btn"><?php 
_e('View Profile', 'userpro-msg');
?>
</a></div>
			</div>
			
		<div class="userpro-clear"></div>