Bumped to 1.6.8
[moodle.git] / message / discussion.php
blobe4797fd56ebac6596c41b0054f86c9300d3c78af
1 <?php // $Id$
3 require('../config.php');
4 require('lib.php');
6 require_login();
8 if (isguest()) {
9 redirect($CFG->wwwroot);
12 if (empty($CFG->messaging)) {
13 error("Messaging is disabled on this site");
16 /// Script parameters
17 $userid = required_param('id', PARAM_INT);
19 /// Check the user we are talking to is valid
20 if (! $user = get_record('user', 'id', $userid)) {
21 error("User ID was incorrect");
24 /// Select encoding
25 $encoding = current_charset();
27 /// Print frameset to contain all the various panes
28 @header('Content-Type: text/html; charset='.$encoding);
30 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
31 <html>
32 <head>
33 <meta http-equiv="content-type" content="text/html; charset=<?php echo $encoding ?>" />
34 <title><?php echo get_string('discussion', 'message').': '.fullname($user) ?></title>
35 </head>
36 <frameset rows="110,*,0,200" border="0" marginwidth="2" marginheight="1">
37 <frame src="user.php?id=<?php p($user->id)?>&amp;frame=user" name="user"
38 scrolling="no" marginwidth="0" marginheight="">
39 <frame src="messages.php" name="messages"
40 scrolling="yes" marginwidth="10" marginheight="10">
41 <frame src="refresh.php?id=<?php p($user->id)?>&amp;name=<?php echo urlencode(fullname($user)) ?>" name="refresh"
42 scrolling="no" marginwidth="0" marginheight="0">
43 <frame src="send.php?id=<?php p($user->id)?>" name="send"
44 scrolling="no" marginwidth="2" marginheight="2">
45 </frameset>
46 <noframes>Sorry, but support for Frames is required to use Messaging</noframes>
48 </html>