/// search for person
if (!empty($frm->personsubmit) and !empty($frm->name)) {
- if ($frm->mycourses) {
+ if (optional_param('mycourses', 0, PARAM_BOOL)) {
$users = array();
$mycourses = get_my_courses($USER->id);
foreach ($mycourses as $mycourse) {
foreach ($messages as $message) {
/// ignore messages to and from blocked users unless $frm->includeblocked is set
- if ((!$frm->includeblocked) and (
+ if (!optional_param('includeblocked', 0, PARAM_BOOL) and (
( isset($contacts[$message->useridfrom]) and ($contacts[$message->useridfrom]->blocked == 1)) or
( isset($contacts[$message->useridto] ) and ($contacts[$message->useridto]->blocked == 1))
)
/// Output the header
@header('Content-Type: text/html; charset=utf-8');
?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
-<html <?php echo $direction ?>>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" <?php echo $direction ?>>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
</head>
<tr>
- <td colspan="3" class="message_heading"><?php print_string('searchforperson', 'message') ?></td>
+ <td colspan="3" class="message_heading"><?php print_heading(get_string('searchforperson', 'message')) ?></td>
</tr>
<tr>
- <td align="right"><?php print_string('name') ?>:</td>
- <td><input type="text" name="name" size="16" alt="<?php print_string('name')?>" /></td>
+ <td align="right"><label for="name"><?php print_string('name') ?></label></td>
+ <td><input type="text" name="name" size="16" id="name" /></td>
<td><input type="submit" name="personsubmit" value="<?php print_string('search') ?>" /></td>
</tr>
<tr>
<td> </td>
<td colspan="2">
- <input type="hidden" name="mycourses" value="0" />
- <input type="checkbox" name="mycourses" alt="<?php print_string('onlymycourses', 'message') ?>" /><?php print_string('onlymycourses', 'message') ?></td>
+ <input type="checkbox" name="mycourses" id="mycourses" /><label for="mycourses"><?php print_string('onlymycourses', 'message') ?></label></td>
</tr>
- <tr><td colspan="3"><hr /></td></tr>
+ <tr><td colspan="3"></td></tr>
<tr>
- <td colspan="3" class="message_heading"><?php print_string('searchmessages', 'message') ?></td>
+ <td colspan="3" class="message_heading"><?php print_heading(get_string('searchmessages', 'message')) ?></td>
</tr>
<tr>
- <td align="right"><?php print_string('keywords', 'message') ?>:</td>
- <td><input type="text" name="keywords" size="16" alt="<?php print_string('keywords', 'message')?>" /></td>
+ <td align="right"><label for="keywords"><?php print_string('keywords', 'message') ?></label></td>
+ <td><input type="text" name="keywords" id="keywords" size="16" /></td>
<td><input type="submit" name="keywordssubmit" value="<?php print_string('search') ?>" /></td>
</tr>
<tr>
<td> </td>
<td colspan="2">
- <input type="hidden" name="includeblocked" value="0" />
- <input type="checkbox" name="includeblocked" alt="<?php print_string('includeblockedusers', 'message') ?>" /><?php print_string('includeblockedusers', 'message') ?></td>
+ <input type="checkbox" name="includeblocked" id="includeblocked" /><label for="includeblocked"><?php print_string('includeblockedusers', 'message') ?></label></td>
</tr>
- <tr><td> </td><td colspan="2"><input type="radio" name="keywordsoption" alt="<?php print_string('onlytome', 'message') ?>" value="tome" /><?php print_string('onlytome', 'message') ?></td></tr>
- <tr><td> </td><td colspan="2"><input type="radio" name="keywordsoption" alt="<?php print_string('onlyfromme', 'message') ?>" value="fromme" /><?php print_string('onlyfromme', 'message') ?></td></tr>
- <tr><td> </td><td colspan="2"><input type="radio" checked="checked" name="keywordsoption" alt="<?php print_string('allmine', 'message') ?>" value="allmine" /><?php print_string('allmine', 'message') ?></td></tr>
+ <tr><td> </td><td colspan="2"><input type="radio" name="keywordsoption" id="keywordsoption1" value="tome" /><label for="keywordsoption1"><?php print_string('onlytome', 'message') ?></label></td></tr>
+ <tr><td> </td><td colspan="2"><input type="radio" name="keywordsoption" id="keywordsoption2" value="fromme" /><label for="keywordsoption2"><?php print_string('onlyfromme', 'message') ?></label></td></tr>
+ <tr><td> </td><td colspan="2"><input type="radio" checked="checked" name="keywordsoption" id="keywordsoption3" value="allmine" /><label for="keywordsoption3"><?php print_string('allmine', 'message') ?></label></td></tr>
<?php if (has_capability('moodle/site:readallmessages', get_context_instance(CONTEXT_SYSTEM, SITEID))) { ?>
- <tr><td> </td><td colspan="2"><input type="radio" name="keywordsoption" alt="<?php print_string('allusers', 'message') ?>" value="allusers" /><?php print_string('allusers', 'message') ?></td></tr>
+ <tr><td> </td><td colspan="2"><input type="radio" name="keywordsoption" id="keywordsoption4" value="allusers" /><label for="keywordsoption4"><?php print_string('allusers', 'message') ?></label></td></tr>
<?php } ?>
<?php
<table cellpadding="5" align="center" class="message_form">
<tr valign="top">
- <td align="right"><input type="checkbox" name="showmessagewindow" alt="<?php print_string('showmessagewindow', 'message') ?>" <?php echo $cbshowmessagewindow ?> /></td>
- <td colspan="2"><?php print_string('showmessagewindow', 'message') ?></td>
+ <td align="right"><input type="checkbox" name="showmessagewindow" id="showmessagewindow" <?php echo $cbshowmessagewindow ?> /></td>
+ <td colspan="2"><label for="showmessagewindow"><?php print_string('showmessagewindow', 'message') ?></label></td>
</tr>
<tr valign="top">
- <td align="right"><input type="checkbox" name="blocknoncontacts" alt="<?php print_string('blocknoncontacts', 'message') ?>" <?php echo $cbblocknoncontacts ?> /></td>
- <td colspan="2"><?php print_string('blocknoncontacts', 'message') ?></td>
+ <td align="right"><input type="checkbox" name="blocknoncontacts" id="blocknoncontacts" <?php echo $cbblocknoncontacts ?> /></td>
+ <td colspan="2"><label for="blocknoncontacts"><?php print_string('blocknoncontacts', 'message') ?></label></td>
</tr>
<tr valign="top">
- <td align="right"><input type="checkbox" name="beepnewmessage" alt="<?php print_string('beepnewmessage', 'message') ?>" <?php echo $cbbeepnewmessage ?> /></td>
- <td colspan="2"><?php print_string('beepnewmessage', 'message') ?></td>
+ <td align="right"><input type="checkbox" name="beepnewmessage" id="beepnewmessage" <?php echo $cbbeepnewmessage ?> /></td>
+ <td colspan="2"><label for="beepnewmessage"><?php print_string('beepnewmessage', 'message') ?></label></td>
</tr>
<tr valign="top">
- <td align="right"><input type="checkbox" name="usehtmleditor" alt="<?php print_string('htmleditor') ?>" <?php echo $cbusehtmleditor ?> /></td>
- <td colspan="2"><?php print_string('htmleditor') ?></td>
+ <td align="right"><input type="checkbox" name="usehtmleditor" id="usehtmleditor" <?php echo $cbusehtmleditor ?> /></td>
+ <td colspan="2"><label for="usehtmleditor"><?php print_string('htmleditor') ?></label></td>
</tr>
<tr valign="top">
- <td><input type="checkbox" name="emailmessages" alt="<?php print_string('emailmessages', 'message') ?>" <?php echo $cbemailmessages ?> /></td>
- <td colspan="2"><?php print_string('emailmessages', 'message') ?></td>
+ <td><input type="checkbox" name="emailmessages" id="emailmessages" <?php echo $cbemailmessages ?> /></td>
+ <td colspan="2"><label for="emailmessages"><?php print_string('emailmessages', 'message') ?></label></td>
</tr>
<tr valign="top">
<td> </td>
- <td align="right"><?php print_string('formorethan', 'message') ?>:</td>
- <td><input type="text" name="emailtimenosee" size="2" value="<?php echo $txemailtimenosee ?>" alt="<?php print_string('timenosee', 'message') ?>" /> <?php print_string('mins') ?></td>
+ <td align="right"><label for="emailtimenosee"><?php print_string('formorethan', 'message') ?></label></td>
+ <td><input type="text" name="emailtimenosee" id="emailtimenosee" size="2" value="<?php p($txemailtimenosee) ?>" /> <?php print_string('mins') ?></td>
</tr>
<tr valign="top">
<td> </td>
- <td align="right"><?php print_string('email') ?>:</td>
- <td><input type="text" name="emailaddress" size="20" value="<?php echo $txemailaddress ?>" alt="<?php print_string('email') ?>" /></td>
+ <td align="right"><label for="emailaddress"><?php print_string('email') ?></label></td>
+ <td><input type="text" name="emailaddress" id="emailaddress" size="20" value="<?php p($txemailaddress) ?>" /></td>
</tr>
<tr valign="top">
<td> </td>
- <td align="right"><?php print_string('format') ?>:</td>
+ <td align="right"><label for="menuemailformat"><?php print_string('format') ?></label></td>
<td><?php echo $format_select ?>
</td>
</tr>