5 * Assumes $user object for displayed user is present
7 * SourceForge: Breaking Down the Barriers to Open Source Development
8 * Copyright 1999-2001 (c) VA Linux Systems
9 * http://sourceforge.net
11 * @author Drew Streib <dtype@valinux.com>
14 require_once $gfwww.'include/vote_function.php';
16 $HTML->header(array('title'=>_('Developer Profile')));
18 echo $HTML->boxTop(_('Personal Information'), _('Personal Information')); ?>
20 <table class="my-layout-table" id="user-profile-personal-info">
23 <?php echo _('User Id') ?>
28 if (session_loggedin() && user_ismember(1)) {
29 echo util_make_link ('/admin/useredit.php?user_id='.$user_id,$user_id);
34 </strong><?php if($GLOBALS['sys_use_people']) { ?>( <?php echo util_make_link ('/people/viewprofile.php?user_id='.$user_id,'<strong>'._('Skills Profile').'</strong>'); ?> )<?php } ?>
39 <td><?php echo _('Login name') ?></td>
40 <td><strong><?php print $user->getUnixName(); ?></strong></td>
44 <td><?php echo _('Real name') ?> </td>
45 <td><strong><?php print $user->getTitle() .' '. $user->getRealName(); ?></strong></td>
48 <?php if(!isset($GLOBALS['sys_show_contact_info']) || $GLOBALS['sys_show_contact_info']) { ?>
50 <td><?php echo _('Your Email Address') ?>: </td>
52 <strong><?php echo util_make_link ('/sendmessage.php?touser='.$user_id, str_replace('@',' @nospam@ ',$user->getEmail())); ?></strong>
55 <?php if ($user->getJabberAddress()) { ?>
57 <td><?php echo _('Jabber Address') ?></td>
59 <a href="jabber:<?php print $user->getJabberAddress(); ?>"><strong><?php print $user->getJabberAddress(); ?></strong></a>
64 <?php if ($user->getAddress() || $user->getAddress2()) { ?>
66 <td><?php echo _('Address:'); ?></td>
67 <td><?php echo $user->getAddress().'<br/>'.$user->getAddress2(); ?></td>
71 <?php if ($user->getPhone()) { ?>
73 <td><?php echo _('Phone:'); ?></td>
74 <td><?php echo $user->getPhone(); ?></td>
78 <?php if ($user->getFax()) { ?>
80 <td><?php echo _('FAX:'); ?></td>
81 <td><?php echo $user->getFax(); ?></td>
88 <?php echo _('Site Member Since') ?>
90 <td><strong><?php print date(_('Y-m-d H:i'), $user->getAddDate()); ?></strong>
96 if ($sys_use_ratings) {
97 echo $HTML->boxMiddle(_('Peer Rating'), _('Peer Rating'));
98 echo '<table class="my-layout-table" id="user-profile-rating">';
99 if ($user->usesRatings()) {
100 echo vote_show_user_rating($user_id);
102 echo '<tr><td colspan="2">';
103 echo _('User chose not to participate in peer rating');
106 echo '</table><!-- id="user-profile-rating" -->';
109 if ($sys_use_diary) {
110 echo $HTML->boxMiddle(_('Diary and Notes'), _('Diary and Notes'));
114 Get their diary information
118 $res = db_query_params ('SELECT count(*) from user_diary WHERE user_id=$1 AND is_public=1',
120 echo _('Diary/Note entries:').' '.db_result($res,0,0).'
121 <p>'.util_make_link ('/developer/diary.php?diary_user='.$user_id,_('View Diary & Notes')).'</p>
123 echo util_make_link ('/developer/monitor.php?diary_user='.$user_id,
124 html_image("ic/check.png",'15','13',array(),0) ._('Monitor this Diary')
127 $hookparams['user_id'] = $user_id;
128 plugin_hook("user_personal_links",$hookparams);
135 echo $HTML->boxMiddle(_('Project Info'), _('Project Info'));
137 // now get listing of groups for that user
138 $res_cat = db_query_params ('SELECT groups.group_name,
139 groups.unix_group_name,
141 user_group.admin_flags,
144 groups,user_group,role WHERE user_group.user_id=$1 AND user_group.role_id=role.role_id AND
145 groups.group_id=user_group.group_id AND groups.is_public=$2 AND groups.status=$3',
150 // see if there were any groups
151 if (db_numrows($res_cat) < 1) {
153 <p><?php echo _('This developer is not a member of any projects.') ?></p>
155 } else { // endif no groups
156 print "<p>"._('This developer is a member of the following projects:')."<br /> ";
157 while ($row_cat = db_fetch_array($res_cat)) {
158 print ('<br />' . util_make_link_g ($row_cat['unix_group_name'],$row_cat['group_id'],$row_cat['group_name']).' ('.$row_cat['role_name'].')');
165 $me = session_get_user();
166 if ($sys_use_ratings) {
167 if ($user->usesRatings() && (!$me || $me->usesRatings())) {
168 printf(_('<p>If you are familiar with this user, please take a moment to rate him/her on the following criteria. Keep in mind, that your rating will be visible to the user and others.</p><p>The %1$s Peer Rating system is based on concepts from <a href="http://www.advogato.com/">Advogato.</a> The system has been re-implemented and expanded in a few ways.</p>'), forge_get_config ('forge_name'));
171 <div class="align-center">
172 <?php echo vote_show_user_rate_box ($user_id, $me?$me->getID():0); ?>
175 <?php printf(_('<p>The Peer rating box shows all rating averages (and response levels) for each individual criteria. Due to the math and processing required to do otherwise, these numbers incoporate responses from both "trusted" and "non-trusted" users.</p><ul><li>The "Sitewide Rank" field shows the user\'s rank compared to all ranked %1$s users.</li><li>The "Aggregate Score" shows an average, weighted overall score, based on trusted-responses only.</li><li>The "Personal Importance" field shows the weight that users ratings of other developers will be given (between 1 and 1.5) -- higher rated user\'s responses are given more weight.</li></ul><p>If you would like to opt-out from peer rating system (this will affect your ability to both rate and be rated), refer to <a href="%2$s">your account maintenance page</a>. If you choose not to participate, your ratings of other users will be permanently deleted and the \'Peer Rating\' box will disappear from your user page.</p>'),
176 forge_get_config ('forge_name'),
177 util_make_url ("/account/"));
179 } else if ($me && !$me->usesRatings()) { ?>
182 <?php printf (_('You opted-out from peer rating system, otherwise you would have a chance to rate the user. Refer to <a href="%1$s">your account maintenance page</a> for more information.'),
183 util_make_url ("/account")); ?>
189 echo $HTML->boxBottom();
191 $HTML->footer(array());
195 // c-file-style: "bsd"