/**
 * Displays the signed contract for review.
 *
 * @since	1.3.6
 * @param	int		$event_id	The event ID.
 * @return	void
 */
function mdjm_review_signed_contract()
{
    if (empty($_GET['mdjm_action'])) {
        return;
    }
    if ('review_contract' !== $_GET['mdjm_action']) {
        return;
    }
    if (!mdjm_employee_can('manage_events')) {
        return;
    }
    $mdjm_event = new MDJM_Event($_GET['event_id']);
    if (!mdjm_is_admin()) {
        if (!array_key_exists(get_current_user_id(), $mdjm_event->get_all_employees())) {
            return;
        }
    }
    if (!$mdjm_event->get_contract_status()) {
        printf(__('The contract for this %s is not signed', 'mobile-dj-manager'), mdjm_get_label_singular());
        exit;
    }
    $contract_id = $mdjm_event->get_contract();
    if (empty($contract_id)) {
        return;
    }
    echo mdjm_show_contract($contract_id, $mdjm_event);
    exit;
}
/**
 * Returns the event contract ID.
 *
 * @since	1.3
 * @param	int		$event_id	The event ID.
 * @return	int		The post ID of the event contract.
 */
function mdjm_get_event_contract($event_id)
{
    $event = new MDJM_Event($event_id);
    return $event->get_contract();
}