message.html 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <form id="theform" method="post" action="messageselect.php">
  2. <input type="hidden" name="id" value="<?php p($id) ?>" />
  3. <input type="hidden" name="sesskey" value="<?php echo sesskey() ?>" />
  4. <input type="hidden" name="returnto" value="<?php p($returnto) ?>" />
  5. <input type="hidden" name="deluser" value="" />
  6. <?php echo $OUTPUT->box_start(); ?>
  7. <table border="0" cellpadding="5">
  8. <tr valign="top">
  9. <td align="right"><b>
  10. <?php print_string("messagebody"); ?>:
  11. </b></td>
  12. <td align="left">
  13. <?php print_textarea(true, 15, 65, 1, 1, "messagebody", $messagebody); ?>
  14. </td>
  15. </tr>
  16. <tr valign="top">
  17. <td align="right"><label for="menuformat"><b><?php print_string("formattexttype"); ?>:</b></label></td>
  18. <td>
  19. <?php
  20. print_string('formathtml');
  21. echo '<input type="hidden" name="format" value="'.FORMAT_HTML.'" />';
  22. ?>
  23. </td>
  24. </tr>
  25. <tr><td align="center" colspan="2">
  26. <input type="submit" name="send" value="<?php print_string('sendmessage', 'message'); ?>" />
  27. <input type="submit" name="preview" value="<?php print_string('preview'); ?>" />
  28. </td></tr>
  29. </table>
  30. <?php echo $OUTPUT->box_end(); ?>
  31. <table align="center"><tr><th colspan="4" scope="row"><?php print_string('currentlyselectedusers'); ?></th></tr>
  32. <?php
  33. if (count($SESSION->emailto[$id])) {
  34. foreach ($SESSION->emailto[$id] as $user) {
  35. echo '<tr><td>'.fullname($user,true).'</td>';
  36. // Check to see if we should be showing the email address.
  37. if ($user->maildisplay == 0) { // 0 = don't display my email to anyone.
  38. echo '<td>' . get_string('emaildisplayhidden') . '</td><td>';
  39. } else {
  40. echo '<td>'.$user->email.'</td><td>';
  41. }
  42. if (empty($user->email)) {
  43. $error = get_string('emailempty');
  44. }
  45. if (!empty($error)) {
  46. echo '<img src="'.$OUTPUT->pix_url('t/emailno') . '" alt="'.$error.'" class="iconsmall" title="'.$error.'"/>';
  47. unset($error);
  48. }
  49. echo '</td><td><input type="submit" onClick="this.form.deluser.value='.$user->id.';" value="' . get_string('remove') . '" /></td></tr>';
  50. }
  51. }
  52. else {
  53. echo '<tr><td colspan="3" align="center">'.get_string('nousersyet').'</td></tr>';
  54. }
  55. ?>
  56. </table>
  57. </form>