Пример #1
0
						echo 'Friendship requested.';
						echo $wps_ui->friendship_cancel($wps_user->get_id(), 'Cancel', 'Cancelled!', 'my-submit-button');
					} else {
						// Not a friend
						echo 'Make friends with '.$wps_user->get_display_name().'...';
						echo $wps_ui->friendship_add($wps_user->get_id(), "Type a message, hit return!", "Request sent.", "my-input-box");
					}
				}
				
				// Poke(tm) button
				echo '<div style="margin-top:10px; margin-bottom:10px">'.$wps_ui->poke_button(get_option(WPS_OPTIONS_PREFIX.'_poke_label'), "my-submit-button").'</div>';
	
			}

			// Show profile information if permitted to do so
			if ($wps_user->is_permitted('personal')) { // defaults to activity permission, set to "personal" for personal info

				// Location
				if ($wps_user->get_city()) echo '<span class="my-info-label">Lives in:</span> '.$wps_user->get_city();
				if ($wps_user->get_city() && ($wps_user->get_country())) echo ', ';
				if ($wps_user->get_country()) echo $wps_user->get_country();
				if ($wps_user->get_city() || $wps_user->get_country()) echo '<br />';
				
				// Date of birth
				if ($wps_user->get_dob_day() && $wps_user->get_dob_month() && $wps_user->get_dob_year()) {
					echo '<span class="my-info-label">Born:</span> '.$wps_user->get_dob_day().' '.__wps__get_monthname($wps_user->get_dob_month()).' '.$wps_user->get_dob_year().'<br />';
				}
				
				// Extended fields
				$extended = $wps_user->get_extended();
				foreach ($extended as $row) {