Ejemplo n.º 1
0
								echo '<div style="float:left;margin-right:6px">'.$friend_user->get_avatar(44).'</div>';
								echo $friend_user->get_profile_url().'<br />';
								echo '<span class="my-info-label">Active: '.__wps__time_ago($friend_user->get_last_activity()).'</span>';
							echo '</div>';
						}
					echo '</div>';
				} else {
					echo '<div id="my-friends-list">No friends</div>';
				}
				
				// List recent mail (and other info)
				if ($wps->get_current_user_page() == $current_user->ID) {
					$wps_mail = new wps_mail();
					echo '<div id="my-mail-info">';
						echo '<div style="font-weight:bold; margin-bottom:6px;">Mail</div>';
						$unread = $wps_mail->get_inbox_count(true);
						echo 'You have '.($cnt = $wps_mail->get_inbox_count()).' message'.($cnt != 1 ? 's' : '').' of which '.$unread.' '.($unread != 1 ? 'are' : 'is').' unread.';
						
						if ($unread) {
							// Show most recent unread, up to 3, if there are any
							$recent = $unread > 3 ? 3 : $unread;
							if ($recent > 1) {
								echo ' Your most recent '.$recent.' unread messages are:';
							}
							echo '<div style="clear:both; margin-top:6px;">';
							$recent_mail = $wps_mail->get_inbox($recent, 0, 18, "", true, 0, true);
							foreach($recent_mail as $mail) {								
								echo '<div class="my-mail-row">';
									echo '<div class="my-mail-row-avatar">';
										echo $mail['avatar'];
									echo '</div>';
Ejemplo n.º 2
0
				echo '<div class="my-inbox-row">';

					echo "No mail to show....";

				echo '</div>';

			}

		echo '</div>';

		// Show "pages" of messages (if more than 1)

		$show_sent_mail = ($action == "sent");

		$inbox_count = $wps_mail->get_inbox_count(false, $show_sent_mail, $term);

		
		$pages = ($inbox_count % $page_length) == 0 ? $inbox_count / $page_length : floor($inbox_count / $page_length) + 1;

		echo '<div '.$override_show_state.' id="my-inbox-pages">';

		$term_parameter = $term ? '&my-search-term='.$term : '';

		if ($pages > 1) {

			$current_page = floor($start/$page_length)+1;

			$paging_action = ($action == 'inbox' || $action == 'sent') ? $action : 'inbox';

			if ($current_page > 1) echo '<a href="'.$wps->get_mail_url().'?action='.$paging_action.'&start=0'.$term_parameter.'">First</a> ';
Ejemplo n.º 3
0
			} else {

				echo '<div class="my-inbox-row">';

					echo "No mail to show....";

				echo '</div>';

			}

		echo '</div>';

		// Show "pages" of messages (if more than 1)

		$inbox_count = $wps_mail->get_inbox_count();

		$pages = ($inbox_count % $page_length) == 0 ? $inbox_count / $page_length : floor($inbox_count / $page_length) + 1;

		echo '<div '.$override_show_state.' id="my-inbox-pages">';

		if ($pages > 1) {

			$current_page = floor($start/$page_length)+1;

			$paging_action = ($action == 'inbox' || $action == 'sent') ? $action : 'inbox';

			if ($current_page > 1) echo '<a href="'.$wps->get_mail_url().'?action='.$paging_action.'&start=0">First</a> ';

			if ($current_page > 1) echo '<a href="'.$wps->get_mail_url().'?action='.$paging_action.'&start='.((($current_page-1)*$page_length)-$page_length).'">Previous</a> ';