| 1 |
<?php |
| 2 |
/** |
| 3 |
* Member page template |
| 4 |
* |
| 5 |
* @package Welcart |
| 6 |
*/ |
| 7 |
|
| 8 |
$usces_members = $this->get_member(); |
| 9 |
$usces_member_history = $this->get_member_history( $usces_members['ID'] ); |
| 10 |
$colspan = usces_is_membersystem_point() ? 9 : 7; |
| 11 |
|
| 12 |
$html = '<div id="memberpages"> |
| 13 |
|
| 14 |
<div class="whitebox"> |
| 15 |
<div id="memberinfo"> |
| 16 |
<table id="memberdetail"> |
| 17 |
<tr> |
| 18 |
<th scope="row">' . esc_html__( 'member number', 'usces' ) . '</th> |
| 19 |
<td class="num">' . $usces_members['ID'] . '</td> |
| 20 |
<td rowspan="3" class="blank_cell"> </td> |
| 21 |
<th>' . esc_html__( 'Strated date', 'usces' ) . '</th> |
| 22 |
<td>' . mysql2date( __( 'Y/m/d' ), $usces_members['registered'] ) . '</td> |
| 23 |
</tr> |
| 24 |
<tr> |
| 25 |
<th scope="row">' . apply_filters( 'usces_filters_memberpage_name_label', esc_html__( 'Full name', 'usces' ) ) . '</th> |
| 26 |
<td>' . sprintf( _x( '%s', 'honorific', 'usces'), esc_html( $usces_members['name1'] . ' ' . $usces_members['name2'] ) ) . '</td>'; |
| 27 |
|
| 28 |
if ( usces_is_membersystem_point() ) { |
| 29 |
$html .= '<th>' . esc_html__( 'The current point', 'usces' ) . '</th> |
| 30 |
<td class="num">' . $usces_members['point'] . '</td>'; |
| 31 |
} else { |
| 32 |
$html .= '<th> </th> |
| 33 |
<td class="num"> </td>'; |
| 34 |
} |
| 35 |
$html .= '</tr> |
| 36 |
<tr> |
| 37 |
<th scope="row">' . esc_html__( 'e-mail adress', 'usces' ) . '</th> |
| 38 |
<td>' . esc_html( $usces_members['mailaddress1'] ) . '</td>'; |
| 39 |
$html_reserve = '<th class="blank"> </th> |
| 40 |
<td class="blank"> </td>'; |
| 41 |
$html .= apply_filters( 'usces_filter_memberinfo_page_reserve', $html_reserve, $usces_members['ID'] ); |
| 42 |
$html .= '</tr> |
| 43 |
</table>' . "\n"; |
| 44 |
|
| 45 |
$html .= '<ul class="member_submenu">' . "\n"; |
| 46 |
$submenu_list = '<li class="edit_member"><a href="#edit">' . esc_html__( 'To member information editing', 'usces' ) . '</a></li>' . "\n"; |
| 47 |
$html .= apply_filters( 'usces_filter_member_submenu_list', $submenu_list, $usces_members ); |
| 48 |
$html .= '<li class="logout_member">' . usces_loginout( 'return' ) . '</li> |
| 49 |
</ul>' . "\n"; |
| 50 |
|
| 51 |
$html .= '<div class="header_explanation">'; |
| 52 |
$header = ''; |
| 53 |
$html .= apply_filters( 'usces_filter_memberinfo_page_header', $header ); |
| 54 |
$html .= '</div>'; |
| 55 |
|
| 56 |
$html .= '<h3>' . esc_html__( 'Purchase history', 'usces' ) . '</h3>'; |
| 57 |
$html .= '<div class="currency_code">' . esc_html__( 'Currency', 'usces' ) . ' : ' . __( usces_crcode( 'return' ), 'usces' ) . '</div>'; |
| 58 |
$html .= usces_member_history( 'return' ); |
| 59 |
$html .= ' |
| 60 |
<h3><a name="edit"></a>' . esc_html__( 'Member information editing', 'usces' ) . '</h3> |
| 61 |
<div class="error_message">' . $this->error_message . '</div> |
| 62 |
<form action="' . esc_url( USCES_MEMBER_URL ) . '#edit" method="post" onKeyDown="if (event.keyCode == 13) {return false;}"> |
| 63 |
<table class="customer_form">'; |
| 64 |
|
| 65 |
$html .= uesces_addressform( 'member', $usces_members ); |
| 66 |
|
| 67 |
$html .= '<tr> |
| 68 |
<th scope="row">' . esc_html__( 'e-mail adress', 'usces' ) . '</th> |
| 69 |
<td colspan="2"><input name="member[mailaddress1]" id="mailaddress1" type="text" value="' . esc_attr( $usces_members['mailaddress1'] ) . '" /></td> |
| 70 |
</tr> |
| 71 |
<tr> |
| 72 |
<th scope="row">' . esc_html__( 'password', 'usces' ) . '</th> |
| 73 |
<td colspan="2"><input class="hidden" value=" " /> |
| 74 |
<input name="member[password1]" id="password1" type="password" value="' . esc_attr( $usces_members['password1'] ) . '" autocomplete="off" /> |
| 75 |
' . esc_html__( 'Leave it blank in case of no change.', 'usces' ) . '</td> |
| 76 |
</tr> |
| 77 |
<tr> |
| 78 |
<th scope="row">' . esc_html__( 'Password (confirm)', 'usces' ) . '</th> |
| 79 |
<td colspan="2"><input name="member[password2]" id="password2" type="password" value="' . esc_attr( $usces_members['password2'] ) . '" /> |
| 80 |
' . esc_html__( 'Leave it blank in case of no change.', 'usces' ) . '</td> |
| 81 |
</tr>'; |
| 82 |
|
| 83 |
$html .= '</table> |
| 84 |
<input name="member_regmode" type="hidden" value="editmemberform" /> |
| 85 |
<input name="member_id" type="hidden" value="' . $usces_members['ID'] . '" /> |
| 86 |
<div class="send"> |
| 87 |
<input name="top" type="button" value="' . esc_html__( 'Back to the top page.', 'usces' ) . '" onclick="location.href=\'' . home_url() . '\'" /> |
| 88 |
<input name="editmember" type="submit" value="' . esc_html__( 'update it', 'usces' ) . '" /> |
| 89 |
<input name="deletemember" type="submit" value="' . esc_html__( 'delete it', 'usces' ) . '" onclick="return confirm(\'' . esc_html__( 'All information about the member is deleted. Are you all right?', 'usces' ) . '\');" /></div>'; |
| 90 |
|
| 91 |
$noncekey = $this->member_nonce_key( 'post_member' ); |
| 92 |
$html .= wp_nonce_field( $noncekey, 'wc_nonce', true, false ); |
| 93 |
$html .= '</form>'; |
| 94 |
|
| 95 |
$html .= '<div class="footer_explanation">'; |
| 96 |
$footer = ''; |
| 97 |
$html .= apply_filters( 'usces_filter_memberinfo_page_footer', $footer ); |
| 98 |
$html .= '</div>'; |
| 99 |
|
| 100 |
$html .= '</div> |
| 101 |
</div> |
| 102 |
</div>'; |
| 103 |
|