Ejemplo n.º 1
0
											<th>报名时间</th>
										</tr>
									</thead>
									<tbody>
								<?php 
            foreach ($reglist as $reg) {
                echo sprintf('<tr data-detail="%s"><td>%s</td><td>%s</td><td>%s</td></tr>', home_url('enroll-detail?id=' . $reg->reg_id), $reg->email, $reg->realname, $reg->create_time);
            }
            ?>
									</tbody>
								</table>
								<?php 
            if ($pages > 1) {
                echo '<ul id="author-message"><li class="tip">' . sprintf(__('第 %1$s 页,共 %2$s 页,每页显示 %3$s 条。', 'dmeng'), $paged, $pages, $number) . '</li></ul>';
            }
            echo dmeng_pager($paged, $pages);
        } else {
            ?>
								<ul id="author-message"><li class="tip">暂无报名记录</li></ul>
								<?php 
        }
        ?>
							</div>
						</div>
					</div>
				<?php 
    }
    ?>
				</article>
			<?php 
}
Ejemplo n.º 2
0
                foreach ($pmLog as $log) {
                    $pm_data = json_decode($log->msg_title);
                    if ($pm_data->from == $curauth->ID) {
                        update_dmeng_message_type($log->msg_id, $curauth->ID, 'repm');
                    }
                    $item_html .= '<li class="msg" id="' . $log->msg_id . '"><div class="message-content clearfix"><a class="' . ($pm_data->from == $current_user->ID ? 'pull-right' : 'pull-left') . '" href="' . get_author_posts_url($pm_data->from) . '">' . dmeng_get_avatar($pm_data->from, '34', dmeng_get_avatar_type($pm_data->from), false) . '</a><div class="pm-box"><div class="pm-content' . ($pm_data->from == $current_user->ID ? '' : ' highlight') . '">' . '<button type="button" class="close hide" title="' . __('删除这条消息', 'dmeng') . '" data-id="' . $log->msg_id . '" ' . ($pm_data->from == $current_user->ID ? ' data-pm="' . $pm_data->pm . '" ' : '') . 'data-nonce="' . wp_create_nonce($log->msg_id) . '" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>' . wpautop(wp_strip_all_tags(htmlspecialchars_decode($log->msg_content))) . '</div><p class="pm-date">' . date_i18n(get_option('date_format') . ' ' . get_option('time_format'), strtotime($log->msg_date)) . '</p></div></div></li>';
                }
            }
            if ($pages > 1) {
                $item_html .= '<li class="tip">' . sprintf(__('第 %1$s 页,共 %2$s 页,每页显示 %3$s 条。', 'dmeng'), $paged, $pages, $number) . '</li>';
            }
        } else {
            $item_html = '<li class="tip">' . sprintf(__('私信功能需要<a href="%s">登录</a>才可使用!'), wp_login_url()) . '</li>';
        }
    }
    echo '<ul id="author-message">' . $item_html . '</ul>' . dmeng_pager($paged, $pages);
}
//~ 消息end
//~ 资料start
if ($get_tab == 'profile') {
    $avatar_type = array('default' => __('默认头像', 'dmeng'), 'qq' => __('腾讯QQ头像', 'dmeng'), 'weibo' => __('新浪微博头像', 'dmeng'));
    $author_profile = array(__('头像来源', 'dmeng') => $avatar_type[dmeng_get_avatar_type($user_info->ID)], __('用户名', 'dmeng') => $user_info->user_login, __('昵称', 'dmeng') => $user_info->display_name, __('站点', 'dmeng') => $user_info->user_url, __('个人说明', 'dmeng') => $user_info->description);
    $profile_output = '';
    foreach ($author_profile as $pro_name => $pro_content) {
        $profile_output .= '<tr><td class="title">' . $pro_name . '</td><td>' . $pro_content . '</td></tr>';
    }
    $days_num = round((strtotime(date('Y-m-d')) - strtotime($user_info->user_registered)) / 3600 / 24);
    echo '<ul id="author-message"><li class="tip">' . sprintf(__('%s来%s已经%s天了', 'dmeng'), $user_info->display_name, get_bloginfo('name'), $days_num > 1 ? $days_num : 1) . '</li></ul>' . '<table id="author-profile"><tbody>' . $profile_output . '</tbody></table>';
    if ($oneself) {
        ?>