Location: PHPKode > projects > FeedMeLinks, Social BookmarkingSince2002 > feedmelinks.com/users.php
<%
	# $Id: users.php,v 1.26 2005/07/17 22:28:30 hirokai Exp $
	$page = "users";
	$errorPage = "index";
	$shouldShowCreateForm = 1;
	$MAX_LINKS = 20;
	$hotRow = -1;
	$shouldDump = 1;
	include_once( "modules/utils.inc.php" );
	$userId = $who;
	$title = "The Recent Links of $who!";
	include_once( "$modules/header.inc.php" );
%>

<style type="text/css">

	.folder_row {}
	.fr {
		height: 22px;
		padding-top: 4px;
		background-color: #dddddd;
		border-bottom: 1px solid #aaaaaa;
	}

	.right_justified_num_column {}
	.fr > .rn {
		float: left;
		width: 60px;
		text-align: right;
		margin-right: 10px;
	}

	.fr > .l {
		float: left;
	}

	.fr > .r {
		float: right;
		width: 60px;
	}

	body { width: 795px; }
</style>

<%
	$con_users = mysql_connect();
	mysql_selectdb( getDBName() );
	$qs = "SELECT * FROM linksUsers WHERE userid = '$userId'";
	$q = mysql_query( $qs );
	if( $q ) {
		$numRows = mysql_num_rows($q);

		if( $numRows ) {
			$i = 0;
%>
	<br>
	<br>
	<div style="float: left;">
<%
			$id   = mysql_result($q,$i,"ID");
			$email = urldecode( mysql_result($q,$i,"email"));

			$qs2 = "SELECT count(*) FROM links WHERE submitter='$userId'";
			$q2 = mysql_query( $qs2 );
			if( $q2 ) $numLinks = mysql_result($q2,0);

			# count folders
			$qs2 = "SELECT count(*) FROM linksGroups WHERE userid='$userId'";
			$q2 = mysql_query( $qs2 );
			if( $q2 ) $numFolders = mysql_result($q2,0);
			conClose( $con_users );
%>

	<big>
	<big>
	<b><%= encodeAddress( $email, $userId ) %></b></big>
	<%= get_verbose_contact_link( $userId ) %>
	&mdash; master of <%= $numLinks %> links and <%= $numFolders %> <%= getCatsName() %>.<br />
	<p style="margin-bottom: 0px;">
		Subscribe to <%= $userId %>'s links with
		<a title="RSS 2.0" href="/u/r/<%= $userId %>" class="bevelbutton"><img src="/img/xml" alt="RSS Feed" border="0" /></a>.
		<link rel="alternate" type="application/rss+xml" title="RSS Feed of <%= $userId %>'s recent links" href="/u/r/<%= $userId %>">

		<small>(<a href="http://feedmelinks.com/help/including-feeds">Huh?</a>)</small>
	</p>

	</big>
	<br />
	<br />

	<% showUserImage( $userId ); %>

	<br />
	<big><b><a href="/comments?who=<%= $userId %>">comments by and about <%= $userId == $u ? "you" : $userId %></a></b></big>
</div>

<%
	if( $who == $u )
		$users = get_contacts( $who );
	else
		$users = get_someone_elses_contacts( $who );
%>
<div style="float: right;">
<%= get_contactlist_grid( $users, get_ownoun() . " peeps", $who )  %>
</div>

<br clear="all" />

	<div id="leftColumn">

		<div class="box">
			<div class="subhead"> <%= $userId == $u ? "your" : "$userId's" %> tags </div>
			<% include_once( "$modules/folder-list.inc.php" ); %>
		</div>
	</div>

	<div id="rightColumn">
		<% include_once( "$modules/my-recent.inc.php" ); %>
	</div>

<%
		} else { // end if numRows
%>
<br />
<br />
<div class="attention">
NO SUCH USER -- TEARS OF SHAME!
</div>
<%
		}

	} else {
		echo "$qs failed";
	}
%>

<div style="clear: left;">
<!-- ? -->
</div>

<% include( "$modules/footer.inc.php" ); %>
Return current item: FeedMeLinks, Social BookmarkingSince2002