3 require("../../includes.php");
5 global $CFG, $page_owner;
6 $page_owner = page_owner();
8 if ($page_owner == -1) {
9 $page_owner = $_SESSION['userid'];
12 if ($page_owner == -1) {
13 header("Location: " . $CFG->wwwroot
);
17 $name = user_info("name", $_SESSION['userid']);
19 if ($page_owner == $_SESSION['userid']) {
20 $body = "<p>" . sprintf(__gettext("The following users have interests in common with %s (with the number of interests in common listed):"),$name) . "</p>";
23 if ($similarusers = similarusers_get_users($page_owner,25)) {
30 <div
class="networktable">
35 foreach($similarusers as $similaruser) {
37 $usermenu = run("users:infobox:menu",array($similaruser->ident
));
38 $similarmetric = sprintf(__gettext("%s interests in common"),$similaruser->metric
);
42 <td align
="center" valign
="top">
43 <a href
="{$CFG->wwwroot}{$similaruser->username}"><img src
="{$CFG->wwwroot}_icon/user/{$similaruser->icon}" border
="0" /></a
><br
/>
44 <a href
="{$CFG->wwwroot}{$similaruser->username}">{$similaruser->name
}</a
><br
/>
65 templates_page_setup();
67 $title = sprintf(__gettext("%s: similar users"), $name);
69 $body = templates_draw( array(
70 'context' => 'contentholder',
75 echo templates_page_draw(array($title, $body));