[ Index ] |
|
Code source de IMP H3 (4.1.5) |
1 <form method="post" name="compose" enctype="multipart/form-data" action="<?php echo Util::addParameter(Horde::applicationUrl('compose.php'), 'uniq', base_convert(microtime(), 10, 36)) ?>"> 2 <input type="hidden" name="reloaded" value="1" /> 3 <input type="hidden" name="actionID" value="" /> 4 <input type="hidden" name="spellcheck" value="" /> 5 <input type="hidden" name="done_action" value="<?php echo $f_done_action ?>" /> 6 <input type="hidden" name="message" value="<?php echo htmlspecialchars($f_message) ?>" /> 7 <input type="hidden" name="oldmsg" value="<?php echo htmlspecialchars($f_oldmsg) ?>" /> 8 <input type="hidden" name="currmsg" value="<?php echo htmlspecialchars($f_currmsg) ?>" /> 9 <input type="hidden" name="newmsg" value="<?php echo htmlspecialchars($f_newmsg) ?>" /> 10 <input type="hidden" name="rtemode" value="<?php echo htmlspecialchars($rtemode) ?>" /> 11 <?php if (!empty($ignoreall)): ?> 12 <input type="hidden" name="ignoreall" value="<?php echo htmlspecialchars(serialize($ignoreall)) ?>" /> 13 <?php endif; ?> 14 15 <!-- Maintain state --> 16 <?php 17 foreach ($s_var as $val) { 18 $form_val = Util::getFormData($val); 19 if (!empty($form_val)) { 20 if (is_array($form_val)) { 21 foreach ($form_val as $key2 => $val2) { 22 echo '<input type="hidden" name="' . $val . '[' . htmlspecialchars($key2) . ']" value="' . htmlspecialchars($val2) . '" />' . "\n"; 23 } 24 } else { 25 echo '<input type="hidden" name="' . $val . '" value="' . htmlspecialchars($form_val) . '" />' . "\n"; 26 } 27 } 28 } 29 30 $count = $i = $numerrors = 0; 31 if (isset($error) && is_array($error)) { 32 $numerrors = count($error); 33 } 34 $errorscount = $errorsleft = $numerrors; 35 36 if ($numerrors > 0) { 37 for ($k = 0; $k < $errorscount; $k++) { 38 if (in_array(String::lower($error[$k][0], true), $ignoreall)) { 39 $errorsleft--; 40 } 41 } 42 } 43 ?> 44 45 <h1 class="header"> 46 <?php if ($errorsleft > 0): ?> 47 <?php echo _("Spell Checker") ?> - <em><?php echo $errorsleft ?> <?php echo ($errorsleft > 1) ? _("spelling errors") : _("spelling error"); ?></em> 48 <?php else: ?> 49 <?php echo _("Spell check complete") ?> - <?php echo _("No spelling errors") ?> 50 <?php endif; ?> 51 </h1> 52 53 <table width="100%" border="0" cellspacing="0" cellpadding="1"> 54 <?php 55 while (($count < $prefs->getValue('num_words')) && ($i < $numerrors)) { 56 if (!isset($error) || !is_array($error)) { 57 echo _("Spell check complete"); 58 break; 59 } 60 61 if (!in_array(String::lower($error[$i][0], true), $ignoreall)) { 62 ?> 63 <tr class="item"> 64 <td class="item"><?php echo _("Correct") ?></td> 65 <td colspan="3" nowrap="nowrap"> 66 <?php 67 $offset = $error[$i][1]; 68 $word = $error[$i][0]; 69 $alt = $error[$i][2]; 70 echo '<span style="color:#ff0000">"' . htmlspecialchars($word) . '"</span>'; 71 echo _(" in "); 72 $context = _highlightError(htmlspecialchars($word), htmlspecialchars($f_currmsg), htmlspecialchars($offset)); 73 74 if (!empty($context)) { 75 echo "<span class=\"fixed\">$context</span>"; 76 } else { 77 echo _("none"); 78 } 79 ?> 80 </td> 81 <td><strong><em><?php echo _("Change"); ?></em></strong></td> 82 <td><strong><em><?php echo _("Change All"); ?></em></strong></td> 83 <td><?php echo _("Ignore") ?></td> 84 <td><?php echo _("Ignore All") ?></td> 85 </tr> 86 <tr> 87 <td class="item"><strong><?php echo _("Suggestions") ?></strong></td> 88 <td class="item"> 89 <input type="hidden" name="oldword[<?php echo $count ?>]" value="<?php echo htmlspecialchars($word) ?>" /> 90 <input type="hidden" name="wordoffset[<?php echo $count ?>]" value="<?php echo htmlspecialchars($offset) ?>" /> 91 <select name="subs[<?php echo $count ?>]" onchange="change_selected(<?php echo $count ?>);"> 92 <?php 93 if (!empty($alt)) { 94 $checkedval = 3; 95 $altwords = explode(', ', $alt); 96 for ($j = 0; $j < count($altwords); $j++) { 97 echo '<option value="' . htmlspecialchars($altwords[$j]) . '">' . htmlspecialchars($altwords[$j]) . '</option>'; 98 } 99 } else { 100 $checkedval = 3; 101 echo '<option value="0">' . _("No suggestions") . '</option>'; 102 } 103 ?> 104 </select> 105 </td> 106 <td class="item"><strong><?php echo (!empty($alt)) ? _("or") : _("Replace with:"); ?></strong></td> 107 <td class="item"><input type="text" name="subtext[<?php echo $count ?>]" size="12" onchange="change_selected(<?php echo $count ?>);" /></td> 108 <td class="item"><input type="radio" value="1" name="opt[<?php echo $count ?>]" <?php if ($checkedval == 1) echo 'checked="checked"'; ?> /></td> 109 <td class="item"><input type="radio" value="2" name="opt[<?php echo $count ?>]" <?php if ($checkedval == 2) echo 'checked="checked"'; ?> /></td> 110 <td class="item"><input type="radio" value="3" name="opt[<?php echo $count ?>]" <?php if ($checkedval == 3) echo 'checked="checked"'; ?> /></td> 111 <td class="item"><input type="radio" value="4" name="opt[<?php echo $count ?>]" <?php if ($checkedval == 4) echo 'checked="checked"'; ?> /></td> 112 </tr> 113 <?php 114 $count++; 115 } 116 $i++; 117 } 118 ?> 119 <tr class="item"> 120 <td colspan="8" class="item"> 121 <input type="button" class="button" onclick="document.compose.actionID.value='spell_check_cancel'; document.compose.submit();" value="<?php echo _("Cancel") ?>" /><em> <?php echo _("(Discard all changes and return to the compose screen.)") ?></em> 122 </td> 123 </tr> 124 <?php if (($actionID == 'spell_check_forward') || ($errorsleft == 0)): ?> 125 <tr class="item"> 126 <td colspan="8" class="item"> 127 <input type="button" class="button" onclick="document.compose.actionID.value='<?php echo $spell_check_done_action; ?>'; document.compose.submit();" value="<?php echo _("Done") ?>" /><em> <?php echo $spell_check_done_caption; ?></em> 128 </td> 129 </tr> 130 <?php endif; ?> 131 <?php if ($errorsleft > 0): ?> 132 <tr class="item"> 133 <td colspan="8" class="item"> 134 <input type="button" class="button" onclick="document.compose.actionID.value='spell_check_forward'; document.compose.submit();" value="<?php echo _("Next") ?>" /><em> <?php echo _("(Apply these changes and move to next screen.)") ?></em> 135 </td> 136 </tr> 137 <?php endif; ?> 138 <tr><td colspan="8"> </td></tr> 139 </table> 140 <h1 class="header"> 141 <?php echo _("Corrected Text") ?> 142 </h1> 143 <div class="item"> 144 <span class="fixed" style="white-space:pre"> 145 <?php echo $display_msg ?> 146 </span> 147 </div> 148 149 </form>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Thu Nov 29 12:30:07 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |