| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
exit; // Exit if accessed directly. |
| 4 |
} |
| 5 |
wp_enqueue_script( 'fep-view-message' ); |
| 6 |
if ( fep_get_option( 'block_other_users', 1 ) ) { |
| 7 |
wp_enqueue_script( 'fep-block-unblock-script' ); |
| 8 |
} |
| 9 |
?> |
| 10 |
<div id="fep-content-single"> |
| 11 |
<div id="fep-content-single-sidebar"> |
| 12 |
<div class="fep-loader"></div> |
| 13 |
<div class="fep-filter-heads-div"> |
| 14 |
<select class="fep-filter fep-ajax-load"> |
| 15 |
<?php foreach ( Fep_Messages::init()->get_table_filters() as $filter => $filter_display ) : ?> |
| 16 |
<option value="<?php echo esc_attr( $filter ); ?>"<?php selected( isset( $_GET['fep-filter'] ) ? $_GET['fep-filter'] : '', $filter ); ?>><?php echo esc_html( $filter_display ); ?></option> |
| 17 |
<?php endforeach; ?> |
| 18 |
</select> |
| 19 |
</div> |
| 20 |
<div id="fep-content-single-heads" class="fep-odd-even"> |
| 21 |
<?php require fep_locate_template( 'view-message-heads.php' ); ?> |
| 22 |
</div> |
| 23 |
</div> |
| 24 |
<div id="fep-content-single-main"> |
| 25 |
<div class="fep-loader"></div> |
| 26 |
<div id="fep-content-single-content"> |
| 27 |
<?php require fep_locate_template( 'view-message-content.php' ); ?> |
| 28 |
</div> |
| 29 |
<div id="fep-content-single-reply-form-error"> |
| 30 |
<?php |
| 31 |
if ( ! fep_current_user_can( 'send_reply', $parent_id ) ) { |
| 32 |
echo '<div class="fep-error">' . esc_html__( 'You do not have permission to send reply to this message!', 'front-end-pm' ) . '</div>'; |
| 33 |
} elseif ( fep_success()->get_error_messages() ) { |
| 34 |
echo fep_info_output(); |
| 35 |
} |
| 36 |
?> |
| 37 |
</div> |
| 38 |
<div id="fep-content-single-reply-form"<?php if ( ! fep_current_user_can( 'send_reply', $parent_id ) ) echo ' style="display:none;"';?>> |
| 39 |
<?php |
| 40 |
if ( isset( $_POST['fep_action'] ) && 'reply' == $_POST['fep_action'] && ! fep_errors()->get_error_messages() ) { |
| 41 |
unset( $_REQUEST['message_content'] ); //hack to empty message content |
| 42 |
} |
| 43 |
echo Fep_Form::init()->form_field_output( 'reply', '', array( 'fep_parent_id' => $parent_id ) ); |
| 44 |
?> |
| 45 |
</div> |
| 46 |
</div> |
| 47 |
</div> |
| 48 |
|
| 49 |
<?php |
| 50 |
|