Ejemplo n.º 1
0
/**
 * Output the clients details.
 *
 * @since	1.3.7
 * @param	int		$client_id	Client user ID
 * @return	str
 */
function mdjm_do_client_details_table($client_id, $event_id = 0)
{
    $client = get_userdata($client_id);
    if (!$client) {
        return;
    }
    ?>
    <div id="mdjm-event-client-details" class="mdjm-hidden">
        <table class="widefat mdjm_event_client_details mdjm_form_fields">
        	<thead>
            	<tr>
                	<th colspan="3"><?php 
    printf(__('Contact Details for %s', 'mobile-dj-manager'), $client->display_name);
    ?>
 
                    	<span class="description">(<a href="<?php 
    echo add_query_arg(array('user_id' => $client_id), admin_url('user-edit.php'));
    ?>
"><?php 
    _e('edit', 'mobile-dj-manager');
    ?>
</a>)</span></th>
                </tr>
            </thead>
            <tbody>
            	<tr>
                	<td><i class="fa fa-phone" aria-hidden="true" title="<?php 
    _e('Phone', 'mobile-dj-manager');
    ?>
"></i>
                    <?php 
    echo $client->phone1;
    echo '' != $client->phone2 ? ' / ' . $client->phone2 : '';
    ?>
</td>

                	<td rowspan="3"><?php 
    echo mdjm_get_client_full_address($client->ID);
    ?>
</td>
           		</tr>
                
                <tr>
					<td><i class="fa fa-envelope-o" aria-hidden="true" title="<?php 
    _e('Email', 'mobile-dj-manager');
    ?>
"></i>
                    <a href="<?php 
    echo add_query_arg(array('recipient' => $client->ID, 'event_id' => $event_id), admin_url('admin.php?page=mdjm-comms'));
    ?>
"><?php 
    echo $client->user_email;
    ?>
</a></td>
				</tr>

				<tr>
                	<td><i class="fa fa-sign-in" aria-hidden="true" title="<?php 
    _e('Last Login', 'mobile-dj-manager');
    ?>
"></i>
                    <?php 
    echo mdjm_get_client_last_login($client_id);
    ?>
</td>                  	
           		</tr>
            </tbody>
        </table>
    </div>

    <?php 
}
Ejemplo n.º 2
0
/**
 * Content tag: client_full_address.
 * The full address of the client.
 *
 * @param	int		The event ID.
 * @param	int		The client ID.
 *
 * @return	str		The address of the client.
 */
function mdjm_content_tag_client_full_address($event_id = '', $client_id = '')
{
    if (!empty($client_id)) {
        $user_id = $client_id;
    } elseif (!empty($event_id)) {
        $user_id = mdjm_get_event_client_id($event_id);
    } else {
        $user_id = '';
    }
    $address = '';
    if (!empty($user_id)) {
        $address = mdjm_get_client_full_address($user_id);
    }
    return $address;
}