}
}
+function message_history_link ($userid1, $userid2=0, $returnstr=false) {
+ global $USER;
+
+ if (!$userid2) {
+ $userid2 = $USER->id;
+ }
+
+ $str = link_to_popup_window("/message/history.php?user1=$userid1&user2=$userid2", "message_history_$user->id",
+ get_string('messagehistory', 'message'), 500, 500, '',
+ 'menubar=0,location=0,statusbar,scrollbars,resizable,width=500,height=500', true);
+
+ if ($returnstr) {
+ return $str;
+ } else {
+ echo $str;
+ return true;
+ }
+}
/**
<?php // $Id$
require('../config.php');
+ require('lib.php');
require_login();
}
echo get_string("lastaccess").":", $datestring;
echo '</font>';
- echo '<br /><font size="2">';
- echo '<a target="message_history'.$user->id.'" '.
- link_to_popup_window("/message/history.php?user1=$user->id", "message_history_$user->id",
- get_string('messagehistory', 'message'), 500, 500, '');
+ echo '<br />';
+ message_history_link($user->id);
echo '</td>';
echo '</tr></table>';
echo '</table></table></body>'; // Close possible theme tables off