weekly release 2.0.4+
[moodle.git] / user / message.html
blobe9e7913140a92d55a0de678b296c6e4be249b6f4
1 <form id="theform" method="post" action="messageselect.php">
2 <input type="hidden" name="id" value="<?php p($id) ?>" />
3 <input type="hidden" name="returnto" value="<?php p($returnto) ?>" />
4 <input type="hidden" name="deluser" value="" />
5 <?php echo $OUTPUT->box_start(); ?>
6 <table border="0" cellpadding="5">
7 <tr valign="top">
8 <td align="right"><b>
9 <?php print_string("messagebody"); ?>:
10 </b></td>
11 <td align="left" rowspan="2">
12 <?php print_textarea($usehtmleditor, 25, 65, 630, 400, "messagebody", $messagebody); ?>
13 </td>
14 </tr>
16 <tr valign="top">
17 <td align="right"><b><?php print_string("formattexttype"); ?>:</b></td>
18 <td>
19 <?php
20 if ($usehtmleditor) { /// Trying this out for a while
21 print_string('formathtml');
22 echo '<input type="hidden" name="format" value="'.FORMAT_HTML.'" />';
23 } else {
24 choose_from_menu(format_text_menu(), "format", $format, "");
27 </td>
28 </tr>
30 <tr><td align="center" colspan="2"><input type="submit" name="preview" value="<?php print_string('preview'); ?>" /></td></tr>
31 </table>
32 <?php echo $OUTPUT->box_end(); ?>
33 <table align="center"><tr><th colspan="4" scope="row"><?php print_string('currentlyselectedusers'); ?></th></tr>
34 <?php
35 if (count($SESSION->emailto[$id])) {
36 foreach ($SESSION->emailto[$id] as $user) {
37 echo '<tr><td>'.fullname($user,true).'</td><td>'.$user->email.'</td><td>';
38 if (empty($user->email)) {
39 $error = get_string('emailempty');
41 if (!empty($error)) {
42 echo '<img src="'.$OUTPUT->pix_url('t/emailno') . '" alt="'.$error.'" title="'.$error.'"/>';
43 unset($error);
45 echo '</td><td><input type="submit" onClick="this.form.deluser.value='.$user->id.';" value="' . get_string('remove') . '" /></td></tr>';
48 else {
49 echo '<tr><td colspan="3" align="center">'.get_string('nousersyet').'</td></tr>';
52 </table>
53 </form>