[ Index ] |
|
Code source de IMP H3 (4.1.5) |
1 <?php $tabindex = 1 ?> 2 3 <?php if ($prefs->getValue('auto_expand')): ?> 4 <iframe id="autoexpand" name="autoexpand" style="width:0;height:0;border-width:0" src="<?php echo Horde::applicationUrl('expand.php') ?>"></iframe> 5 <?php endif; ?> 6 7 <form method="post" name="compose"<?php if ($imp['file_upload']) echo ' enctype="multipart/form-data"'; ?> action="<?php echo Util::addParameter(Horde::url('compose.php'), 'uniq', base_convert(microtime(), 10, 36)) ?>"> 8 <?php if ($imp['file_upload']): ?> 9 <?php if ($browser->hasQuirk('broken_multipart_form')): ?> 10 <input type="hidden" name="msie_formdata_is_broken" value="" /> 11 <?php endif; ?> 12 <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $imp['file_upload'] ?>" /> 13 <?php endif; ?> 14 <?php Util::pformInput() ?> 15 <input type="hidden" name="actionID" value="" /> 16 <input type="hidden" name="__formToken_compose" value="<?php echo Horde_Token::generateId('compose'); ?>" /> 17 <?php if (isset($messageCacheID)): ?> 18 <input type="hidden" name="messageCache" value="<?php echo $messageCacheID ?>" /> 19 <?php endif; ?> 20 <input type="hidden" name="spellcheck" value="" /> 21 <input type="hidden" name="page" value="<?php echo htmlspecialchars(Util::getFormData('page')) ?>" /> 22 <input type="hidden" name="start" value="<?php echo htmlspecialchars(Util::getFormData('start')) ?>" /> 23 <input type="hidden" name="popup" value="<?php echo htmlspecialchars(Util::getFormData('popup')) ?>" /> 24 <input type="hidden" name="thismailbox" value="<?php echo htmlspecialchars(Util::getFormData('thismailbox')) ?>" /> 25 <input type="hidden" name="attachmentAction" value="" /> 26 <input type="hidden" name="reloaded" value="1" /> 27 <input type="hidden" name="oldrtemode" value="<?php echo $rtemode ?>" /> 28 <input type="hidden" name="rtemode" value="<?php echo $rtemode ?>" /> 29 <?php 30 if (!($reply_type = Util::getFormData('reply_type'))) { 31 switch ($actionID) { 32 case 'reply': 33 case 'reply_all': 34 case 'reply_list': 35 $reply_type = 'reply'; 36 break; 37 38 case 'forward': 39 $reply_type = 'forward'; 40 break; 41 } 42 } 43 ?> 44 <?php if ($reply_type): ?> 45 <input type="hidden" name="reply_type" value="<?php echo $reply_type ?>" /> 46 <input type="hidden" name="in_reply_to" value="<?php echo htmlspecialchars($header['inreplyto']) ?>" /> 47 <?php if ($reply_type == 'reply'): ?> 48 <input type="hidden" name="references" value="<?php echo htmlspecialchars($header['references']) ?>" /> 49 <input type="hidden" name="reply_index" value="<?php echo htmlspecialchars($reply_index) ?>" /> 50 <?php endif; ?> 51 <?php endif; ?> 52 53 <h1 class="header"><?php echo htmlspecialchars($title) ?></h1> 54 55 <br /> 56 <?php IMP::status(); ?> 57 58 <table width="100%" cellspacing="1"> 59 <tr> 60 <td> </td> 61 <td> 62 <table width="100%" cellspacing="0"> 63 <tr> 64 <td class="leftAlign" nowrap="nowrap"> 65 <input name="btn_send_message" type="submit" <?php echo Horde::getAccessKeyAndTitle(_("_Send Message")) ?> class="button" onclick="return uniqSubmit('send_message');" value="<?php echo _("Send Message") ?>" /> 66 <?php if ($conf['user']['allow_folders']): ?> 67 <input name="btn_save_draft" type="submit" <?php echo Horde::getAccessKeyAndTitle(_("Save _Draft")) ?> class="button" onclick="uniqSubmit('save_draft');" value="<?php echo _("Save Draft") ?>" /> 68 <?php endif; ?> 69 <input name="btn_cancel_compose" type="submit" title="<?php echo _("Cancel Message") ?>" class="button" onclick="return confirmCancel();" value="<?php echo _("Cancel Message") ?>" /> 70 </td> 71 <td class="rightAlign" style="padding:2px"><?php echo Help::link('imp', 'compose-buttons') ?> </td> 72 </tr> 73 </table> 74 </td> 75 </tr> 76 77 <tr> 78 <?php if (!$prefs->isLocked('default_identity')): ?> 79 <td class="light rightAlign"><strong><?php echo Horde::label('identity', _("_Identity")) ?> </strong></td> 80 <td class="item"> 81 <table width="100%"> 82 <tr> 83 <td class="leftAlign"> 84 <input type="hidden" name="last_identity" value="<?php echo $identity->getDefault() ?>" /> 85 <?php if (count($select_list) > 1): ?> 86 <select id="identity" name="identity" tabindex="<?php echo $tabindex++ ?>" onchange="change_identity(this.selectedIndex)" style="direction:ltr"> 87 <?php foreach ($select_list as $key => $select): ?> 88 <option value="<?php echo $key ?>"<?php if ($key == $identity->getDefault()) echo ' selected="selected"' ?>><?php echo htmlspecialchars($select) ?></option> 89 <?php endforeach; ?> 90 </select> 91 <?php else: ?> 92 <input type="hidden" name="identity" value="<?php echo $identity->getDefault() ?>" /> 93 <?php echo htmlspecialchars($select_list[0]) ?> 94 <?php endif; ?> 95 </td> 96 <?php else: ?> 97 <td class="light rightAlign"><strong><?php echo _("From") ?> </strong></td> 98 <td class="item"> 99 <table width="100%"> 100 <tr> 101 <?php if (!$prefs->isLocked('from_addr')): ?> 102 <td class="leftAlign"><input type="text" size="55" tabindex="<?php echo $tabindex++ ?>" class="fixed" name="from" value="<?php echo htmlspecialchars($from) ?>" style="direction:ltr"/></td> 103 <?php else: ?> 104 <td class="leftAlign"><strong> <?php echo htmlspecialchars($from) ?></strong></td> 105 <?php endif; ?> 106 <?php endif; ?> 107 <td class="rightAlign"><?php echo Help::link('imp', 'compose-from') ?> </td> 108 </tr> 109 </table> 110 </td> 111 </tr> 112 113 <tr> 114 <td class="light rightAlign"><strong><?php echo Horde::label('to', _("_To")) ?> </strong></td> 115 <td class="item"> 116 <table width="100%"> 117 <?php if (is_array($header['to'])): $first_to = true; ?> 118 <?php foreach ($header['to'] as $to_item): ?> 119 <tr> 120 <?php if (count($to_item) > 1): ?> 121 <td class="leftAlign"> 122 <select id="to" tabindex="<?php echo $tabindex++ ?>" name="to_list[<?php echo htmlspecialchars($to_item[0]) ?>]" style="width:350px;direction:ltr"> 123 <option value="" selected="selected"><?php echo _("Choose a match or edit the address to the right:") ?></option> 124 <?php for ($i = 1; $i < count($to_item); $i++): ?> 125 <option value="<?php echo htmlspecialchars($to_item[$i]) ?>"><?php echo htmlspecialchars($to_item[$i]) ?></option> 126 <?php endfor; ?> 127 </select> 128 <input type="text" size="15" tabindex="<?php echo $tabindex++ ?>" class="fixed" name="to_field[<?php echo htmlspecialchars($to_item[0]) ?>]" value="<?php echo htmlspecialchars($to_item[0]) ?>" style="width:150px;direction:ltr" /> 129 </td> 130 <?php else: ?> 131 <td class="leftAlign"><input type="text" id="to" size="55" tabindex="<?php echo $tabindex++ ?>" class="fixed" name="to_field[]" value="<?php echo htmlspecialchars($to_item) ?>" style="direction:ltr" /></td> 132 <?php endif; ?> 133 <?php if ($first_to): $first_to = false; ?> 134 <td class="rightAlign"><?php echo Help::link('imp', 'compose-to') ?> </td> 135 <?php else: ?> 136 <td> </td> 137 <?php endif; ?> 138 </tr> 139 <?php endforeach; ?> 140 <?php else: ?> 141 <tr> 142 <td class="leftAlign"><input type="text" id="to" size="55" tabindex="<?php echo $tabindex++ ?>" class="fixed" style="direction:ltr" name="to" value="<?php echo htmlspecialchars($header['to']) ?>" <?php echo ($browser->hasFeature('iframes')) ? 'onchange="expandField(this);" /> <span id="expandingto" class="inProgress" style="visibility:hidden">' . _("Expanding") . '…</span>' : '/>' ?></td> 143 <td class="rightAlign"><?php echo Help::link('imp', 'compose-to') ?> </td> 144 </tr> 145 <?php endif; ?> 146 </table> 147 </td> 148 </tr> 149 150 <?php if ($conf['compose']['allow_cc']): ?> 151 <tr> 152 <td class="light rightAlign"><strong><?php echo Horde::label('cc', _("_Cc")) ?> </strong></td> 153 <td class="item"> 154 <table width="100%"> 155 <?php if (is_array($header['cc'])): $first_cc = true; ?> 156 <?php foreach ($header['cc'] as $cc_item): ?> 157 <tr> 158 <?php if (count($cc_item) > 1): ?> 159 <td class="leftAlign"> 160 <table cellspacing="0"> 161 <tr> 162 <td width="350"> 163 <select id="cc" tabindex="<?php echo $tabindex++ ?>" name="cc_list[<?php echo htmlspecialchars($cc_item[0]) ?>]" style="width:350px;direction:ltr"> 164 <option value="" selected="selected"><?php echo _("Choose a match or edit the address to the right:") ?></option> 165 <?php for ($i = 1; $i < count($cc_item); $i++): ?> 166 <option value="<?php echo htmlspecialchars($cc_item[$i]) ?>"><?php echo htmlspecialchars($cc_item[$i]) ?></option> 167 <?php endfor; ?> 168 </select> 169 </td> 170 <td width="150"> 171 <input type="text" size="15" tabindex="<?php echo $tabindex++ ?>" class="fixed" name="cc_field[<?php echo htmlspecialchars($cc_item[0]) ?>]" value="<?php echo htmlspecialchars($cc_item[0]) ?>" style="width:150px;direction:ltr" /> 172 </td> 173 </tr> 174 </table> 175 </td> 176 <?php else: ?> 177 <td class="leftAlign"><input type="text" id="cc" size="55" tabindex="<?php echo $tabindex++ ?>" class="fixed" name="cc_field[]" value="<?php echo htmlspecialchars($cc_item) ?>" style="direction:ltr" /></td> 178 <?php endif; ?> 179 <?php if ($first_cc): $first_cc = false; ?> 180 <td class="rightAlign"><?php echo Help::link('imp', 'compose-cc') ?> </td> 181 <?php else: ?> 182 <td> </td> 183 <?php endif; ?> 184 </tr> 185 <?php endforeach; ?> 186 <tr> 187 <td class="leftAlign"><input type="text" id="cc" size="55" tabindex="<?php echo $tabindex++ ?>" class="fixed" name="cc_new" style="direction:ltr" /></td> 188 <td> </td> 189 </tr> 190 <?php else: ?> 191 <tr> 192 <td class="leftAlign"><input type="text" id="cc" size="55" tabindex="<?php echo $tabindex++ ?>" class="fixed" style="direction:ltr" name="cc" value="<?php echo htmlspecialchars($header['cc']) ?>" <?php echo ($browser->hasFeature('iframes')) ? 'onchange="expandField(this);" /> <span id="expandingcc" class="inProgress" style="visibility:hidden">' . _("Expanding") . '…</span>' : '/>' ?></td> 193 <td class="rightAlign"><?php echo Help::link('imp', 'compose-cc') ?> </td> 194 </tr> 195 <?php endif; ?> 196 </table> 197 </td> 198 </tr> 199 <?php endif; ?> 200 201 <?php if ($conf['compose']['allow_bcc']): ?> 202 <tr> 203 <td class="light rightAlign"><strong><?php echo Horde::label('bcc', _("_Bcc")) ?> </strong></td> 204 <td class="item"> 205 <table width="100%"> 206 <?php if (is_array($header['bcc'])): $first_bcc = true; ?> 207 <?php foreach ($header['bcc'] as $bcc_item): ?> 208 <tr> 209 <?php if (count($bcc_item) > 1): ?> 210 <td class="leftAlign"> 211 <table cellspacing="0"> 212 <tr> 213 <td width="350"> 214 <select id="bcc" tabindex="<?php echo $tabindex++ ?>" name="bcc_list[<?php echo htmlspecialchars($bcc_item[0]) ?>]" style="width:350px;direction:ltr"> 215 <option value="" selected="selected"><?php echo _("Choose a match or edit the address to the right:") ?></option> 216 <?php for ($i = 1; $i < count($bcc_item); $i++): ?> 217 <option value="<?php echo htmlspecialchars($bcc_item[$i]) ?>"><?php echo htmlspecialchars($bcc_item[$i]) ?></option> 218 <?php endfor; ?> 219 </select> 220 </td> 221 <td width="150"> 222 <input type="text" size="15" tabindex="<?php echo $tabindex++ ?>" class="fixed" name="bcc_field[<?php echo htmlspecialchars($bcc_item[0]) ?>]" value="<?php echo htmlspecialchars($bcc_item[0]) ?>" style="width:150px;direction:ltr" /> 223 </td> 224 </tr> 225 </table> 226 </td> 227 <?php else: ?> 228 <td class="leftAlign"><input type="text" id="bcc" size="55" tabindex="<?php echo $tabindex++ ?>" class="fixed" name="bcc_field[]" value="<?php echo htmlspecialchars($bcc_item) ?>" style="direction:ltr" /></td> 229 <?php endif; ?> 230 <?php if ($first_bcc): $first_bcc = false; ?> 231 <td class="rightAlign"><?php echo Help::link('imp', 'compose-bcc') ?> </td> 232 <?php else: ?> 233 <td> </td> 234 <?php endif; ?> 235 </tr> 236 <?php endforeach; ?> 237 <tr> 238 <td class="leftAlign"><input type="text" id="bcc" size="55" tabindex="<?php echo $tabindex++ ?>" class="fixed" name="bcc_new" style="direction:ltr" /></td> 239 <td> </td> 240 </tr> 241 <?php else: ?> 242 <tr> 243 <td class="leftAlign"><input type="text" id="bcc" size="55" tabindex="<?php echo $tabindex++ ?>" class="fixed" style="direction:ltr" name="bcc" value="<?php echo htmlspecialchars($header['bcc']); ?>" <?php echo ($browser->hasFeature('iframes')) ? 'onchange="expandField(this);" /> <span id="expandingbcc" class="inProgress" style="visibility:hidden">' . _("Expanding") . '…</span>' : '/>' ?></td> 244 <td class="rightAlign"><?php echo Help::link('imp', 'compose-bcc') ?> </td> 245 </tr> 246 <?php endif; ?> 247 </table> 248 </td> 249 </tr> 250 <?php endif; ?> 251 252 <tr> 253 <td class="light rightAlign"><strong><?php echo Horde::label('subject', _("S_ubject")) ?> </strong></td> 254 <td class="item"> 255 <table width="100%"> 256 <tr> 257 <td class="leftAlign"><input type="text" id="subject" tabindex="<?php echo $tabindex++ ?>" class="fixed" name="subject" value="<?php echo htmlspecialchars($header['subject']) ?>" size="55" <?php if ($browser->isBrowser('msie')) echo 'onkeydown="subjectTab();" ' ?>/></td> 258 <td class="rightAlign"><?php echo Help::link('imp', 'compose-subject') ?> </td> 259 </tr> 260 </table> 261 </td> 262 </tr> 263 264 <?php 265 $set_priority = $prefs->getValue('set_priority'); 266 $locked_charset = $prefs->isLocked('sending_charset'); 267 ?> 268 <?php if ($set_priority || !$locked_charset): ?> 269 <tr> 270 <td class="light rightAlign"><strong><?php echo ($locked_charset) ? Horde::label('priority', _("_Priority")) : Horde::label('charset', _("C_harset")) ?> </strong></td> 271 <td class="item"> 272 <table width="100%"> 273 <tr> 274 <?php if (!$locked_charset): ?> 275 <td> 276 <select id="charset" name="charset" tabindex="<?php echo $tabindex++ ?>" style="direction:ltr"> 277 <?php foreach ($nls['encodings'] as $charset => $name): ?> 278 <option value="<?php echo $charset ?>"<?php if (strtolower($charset) == strtolower($encoding)) echo ' selected="selected"' ?>><?php echo $name ?></option> 279 <?php endforeach; ?> 280 </select> 281 </td> 282 <?php endif; ?> 283 284 <?php if ($set_priority): ?> 285 <?php $priority = substr(Util::getFormData('x_priority', '3'), 0, 1); ?> 286 <?php if (!$locked_charset): ?> 287 <td class="rightAlign"><?php echo Horde::label('priority', _("_Priority")) ?> </td> 288 <?php endif; ?> 289 <td class="leftAlign"> 290 <select id="priority" name="x_priority" tabindex="<?php echo $tabindex++ ?>"> 291 <option value="1 (Highest)"<?php if ($priority == '1)') echo ' selected="selected"' ?>>1 (<?php echo _("Highest") ?>)</option> 292 <option value="2 (High)"<?php if ($priority == '2') echo ' selected="selected"' ?>>2 (<?php echo _("High") ?>)</option> 293 <option value="3 (Normal)"<?php if ($priority == '3') echo ' selected="selected"' ?>>3 (<?php echo _("Normal") ?>)</option> 294 <option value="4 (Low)"<?php if ($priority == '4') echo ' selected="selected"' ?>>4 (<?php echo _("Low") ?>)</option> 295 <option value="5 (Lowest)"<?php if ($priority == '5') echo ' selected="selected"' ?>>5 (<?php echo _("Lowest") ?>)</option> 296 </select> 297 </td> 298 <td class="rightAlign"><?php echo Help::link('imp', 'compose-priority') ?> </td> 299 <?php endif; ?> 300 301 </tr> 302 </table> 303 </td> 304 </tr> 305 <?php endif; ?> 306 307 <?php if (!$prefs->isLocked('stationery') && !empty($stationery_list)): ?> 308 <tr> 309 <td class="light rightAlign" valign="middle"><strong><?php echo Horde::label('stationery', _("Stationery")) ?> </strong></td> 310 <td class="item"> 311 <table width="100%"> 312 <tr> 313 <td class="leftAlign"> 314 <select name="stationery" id="stationery" onchange="uniqSubmit('change_stationery');"> 315 <option value=""><?php echo _("Select a stationery:") ?></option> 316 <?php foreach ($stationery_list as $stationery_id => $stationery_choice): ?> 317 <option value="<?php echo $stationery_id ?>"<?php if ($stationery === $stationery_id) echo ' selected="selected"' ?>><?php echo $stationery_choice['n'] ?></option> 318 <?php endforeach; ?> 319 </select> 320 </td> 321 </tr> 322 </table> 323 </td> 324 </tr> 325 <?php endif; ?> 326 327 <tr> 328 <td> </td> 329 <td class="item"> 330 <table width="100%" cellspacing="0"> 331 <tr> 332 <td> 333 <table width="100%" cellspacing="0"> 334 <tr> 335 <?php if ($registry->hasMethod('contacts/search')): ?> 336 <?php $contacts_url = Horde::applicationUrl('contacts.php'); ?> 337 <td align="center"><?php echo Horde::link('#', '', 'widget', null, 'window.open(\'' . $contacts_url . '\', \'contacts\', \'toolbar=no,location=no,status=no,scrollbars=yes,resizable=yes,width=550,height=300,left=100,top=100\'); return false;') . Horde::img('addressbook_browse.png') . '<br />' . _("Address Book") . '</a>' ?></td> 338 <td align="center"><?php echo Horde::link('#', '', 'widget', null, "uniqSubmit('compose_expand_addr'); return false;") . Horde::img('expand.png') . '<br />' . _("Expand Names") . '</a>' ?></td> 339 <?php endif; ?> 340 <?php if (!empty($conf['utils']['spellchecker'])): ?> 341 <td align="center"><?php echo Horde::link('#', '', 'widget', null, "uniqSubmit('spell_check'); return false;") . Horde::img('spellcheck.png') . '<br />' . _("Spell Check") . '</a>' ?></td> 342 <?php endif; ?> 343 <?php if ($browser->hasFeature('javascript') && $conf['compose']['special_characters']): ?> 344 <td align="center"><?php echo Horde::link('#', '', 'widget', null, 'window.open(\'' . Horde::url($registry->get('webroot', 'horde') . '/services/keyboard.php') . '\', \'chars\', \'height=220,width=400\'); return false;') . Horde::img('keyboard.png', null, null, $registry->getImageDir('horde')) . '<br />' . _("Special Characters") . '</a>' ?></td> 345 <?php endif; ?> 346 <?php if ($imp['file_upload']): ?> 347 <td align="center"><?php echo Horde::link('#attachments', '', 'widget', null, 'document.compose.upload_1.focus(); return false;') . Horde::img('manage_attachments.png') . '<br />' . _("Attachments") . '</a>' ?></td> 348 <?php endif; ?> 349 </tr> 350 </table> 351 </td> 352 <td class="item rightAlign" rowspan="2"><?php echo Help::link('imp', 'compose-options') ?> </td> 353 </tr> 354 <tr> 355 <td> 356 <table width="100%" cellspacing="1"> 357 <tr> 358 <td class="item leftAlign" valign="bottom"> 359 <?php if ($conf['user']['allow_folders'] && !$prefs->isLocked('save_sent_mail')): ?> 360 <input id="ssm" type="checkbox" name="save_sent_mail"<?php if ($ssm_check) echo ' checked="checked"'; ?> /> 361 <?php echo Horde::label('ssm', _("Sa_ve a copy in ")) ?> 362 <?php 363 $sent_mail_folder = $identity->getValue('sent_mail_folder'); 364 if (empty($sent_mail_folder)) { 365 $sent_mail_folder = Util::getFormData('sent_mail_folder'); 366 } 367 if (!empty($conf['user']['select_sentmail_folder']) && 368 !$prefs->isLocked('sent_mail_folder')) { 369 $folders = IMP::flistSelect('', false, array('INBOX'), $sent_mail_folder); 370 echo ' <select onchange="document.compose.save_sent_mail.checked=\'checked\'" tabindex="' . $tabindex++ . '" name="sent_mail_folder">' . $folders . '</select>'; 371 } else { 372 if (!empty($sent_mail_folder)) { 373 $sent_mail_folder = '"' . IMP::displayFolder($sent_mail_folder) . '"'; 374 } 375 echo '<span id="sent_mail_folder">' . $sent_mail_folder . '</span>'; 376 } 377 ?> 378 <?php endif; ?> 379 380 <?php 381 $d_read = $prefs->getValue('disposition_request_read'); 382 $d_deliv = $prefs->getValue('disposition_request_delivery'); 383 ?> 384 <?php if ($conf['compose']['allow_receipts'] && ($d_read != 'never')): ?> 385 <br /><input id="rrr" type="checkbox" name="request_read_receipt"<?php if (($d_read != 'ask') || (Util::getFormData('request_read_receipt') == 'on')) echo ' checked="checked"'; ?> /> <?php echo Horde::label('rrr', _("Request a _Read Receipt")) ?> 386 <?php endif; ?> 387 </td> 388 </tr> 389 390 <?php if ($browser->hasFeature('rte') && !$prefs->isLocked('compose_html')): ?> 391 <tr> 392 <td colspan="2"> 393 <table width="100%" cellspacing="0"> 394 <tr> 395 <td class="item leftAlign" width="20"> 396 <?php echo Horde::img('compose.png', _("Switch Composition Method"), 'align="middle"') ?> 397 </td> 398 <td class="item leftAlign"> 399 <?php echo Horde::link('#', _("Switch Composition Method"), '', '', "document.compose.rtemode.value='" . ($rtemode ? 0 : 1) . "'; uniqSubmit(); return false;") ?> 400 <?php echo $rtemode ? _("Switch to plain text composition") : _("Switch to HTML composition") ?></a> 401 </td> 402 </tr> 403 </table> 404 </td> 405 </tr> 406 <?php endif; ?> 407 </table> 408 </td> 409 </tr> 410 </table> 411 </td> 412 </tr> 413 414 <tr> 415 <td class="light rightAlign" valign="top"><strong><?php echo Horde::label('message', _("Te_xt")) ?> </strong></td> 416 <td class="item"> 417 <textarea class="composebody" tabindex="<?php echo $tabindex++ ?>" name="message" id="message" rows="20" cols="80"><?php echo htmlspecialchars($msg) ?></textarea> 418 </td> 419 </tr> 420 421 <tr> 422 <td> </td> 423 <td> 424 <table width="100%" cellspacing="0"> 425 <tr> 426 <td class="leftAlign" nowrap="nowrap"> 427 <input name="btn_send_message" type="submit" <?php echo Horde::getAccessKeyAndTitle(_("_Send Message"), true) ?> class="button" onclick="return uniqSubmit('send_message');" value="<?php echo _("Send Message") ?>" /> 428 <?php if ($conf['user']['allow_folders']): ?> 429 <input name="btn_save_draft" type="submit" <?php echo Horde::getAccessKeyAndTitle(_("Save _Draft"), true) ?> class="button" onclick="uniqSubmit('save_draft');" value="<?php echo _("Save Draft") ?>" /> 430 <?php endif; ?> 431 <input name="btn_cancel_compose" type="submit" title="<?php echo _("Cancel Message") ?>" class="button" onclick="return confirmCancel();" value="<?php echo _("Cancel Message") ?>" /> 432 </td> 433 <td class="rightAlign" style="padding:2px"><?php echo Help::link('imp', 'compose-buttons') ?></td> 434 </tr> 435 <?php if ($prefs->getValue('use_pgp') || $prefs->getValue('use_smime')): ?> 436 <tr> 437 <td class="item leftAlign" nowrap="nowrap"> 438 <?php echo Horde::label('encrypt_options', _("Encr_yption Options")) ?>: 439 <select id="encrypt_options" name="encrypt_options"> 440 <?php 441 $encryptOpt = Util::getFormData('encrypt_options'); 442 require IMP_TEMPLATES . '/compose/encrypt_list.inc'; 443 ?> 444 </select> 445 </td> 446 <td class="item rightAlign"><?php echo Help::link('imp', 'compose-options-encrypt') ?> </td> 447 </tr> 448 <?php if ($prefs->getValue('use_pgp') && $prefs->getValue('pgp_public_key')): ?> 449 <tr> 450 <td class="item leftAlign" nowrap="nowrap"> 451 <input id="pap" type="checkbox" name="pgp_attach_pubkey" <?php if (Util::getFormData('pgp_attach_pubkey', $prefs->getValue('pgp_attach_pubkey'))) echo 'checked="checked" ' ?>/> 452 <?php echo Horde::label('pap', _("Attach a copy of your PGP public key to your message?")) ?> 453 </td> 454 <td class="item rightAlign"><?php echo Help::link('imp', 'pgp-compose-attach-pubkey') ?> </td> 455 </tr> 456 <?php endif; ?> 457 <?php endif; ?> 458 </table> 459 </td> 460 </tr> 461 462 <?php 463 if ($imp['file_upload']): 464 $localeinfo = NLS::getLocaleInfo(); 465 ?> 466 <tr> 467 <td colspan="2"> </td> 468 </tr> 469 470 <tr class="header"> 471 <td colspan="2" height="25" class="header"> 472 <strong> <a id="attachments"></a><?php echo _("Attachments") ?></strong> 473 <?php if ($GLOBALS['registry']->hasMethod('files/selectlistLink')): ?> 474 <?php $res = $GLOBALS['registry']->call('files/selectlistLink', array(_("Attach Files"), 'widget', 'compose', true)); if (!is_a($res, 'PEAR_Error')) echo $res; ?> 475 <input type="hidden" name="selectlist_selectid" value="" /> 476 <?php endif; ?> 477 </td> 478 </tr> 479 480 <tr> 481 <td> </td> 482 <td class="item"> 483 <table width="100%"> 484 <tr> 485 <?php if (!$imp_compose->maxAttachmentSize()): ?> 486 <td class="leftAlign" colspan="2"> 487 <?php echo _("Maximum total attachment size reached.") ?> 488 </td> 489 <?php else: if (!isset($attachments)): ?> 490 <td class="leftAlign" colspan="2"> 491 <?php echo _("Maximum number of attachments reached.") ?> 492 </td> 493 <?php else: ?> 494 <td class="leftAlign"> 495 <table> 496 <tr id="attachment_row_1"> 497 <td class="leftAlign"> 498 <strong><?php echo _("File") ?> 1:</strong> <input name="upload_1" tabindex="<?php echo $tabindex++ ?>" type="file" onchange="attachmentChanged()" size="25" class="fixed" style="direction:ltr" /> 499 </td> 500 <td class="leftAlign"> 501 <select name="upload_disposition_1"> 502 <option value="attachment" selected="selected"><?php echo _("Attachment") ?></option> 503 <option value="inline"><?php echo _("Inline") ?></option> 504 </select> 505 </td> 506 </tr> 507 <tr> 508 <td colspan="2"> 509 (<?php echo _("Maximum Attachment Size") . ': ' . number_format($imp_compose->maxAttachmentSize(), 0, $localeinfo['decimal_point'], $localeinfo['thousands_sep']) . ' ' . _("bytes") ?>) 510 </td> 511 </tr> 512 </table> 513 </td> 514 <?php endif; ?> 515 <?php endif; ?> 516 <td> 517 <input type="submit" name="btn_add_attachment" class="button" onclick="uniqSubmit('add_attachment');" value="<?php echo _("Update") ?>" /> 518 </td> 519 <td class="rightAlign"><?php echo Help::link('imp', 'compose-attach') ?> </td> 520 </tr> 521 </table> 522 </td> 523 </tr> 524 525 <?php 526 $save_attach = $prefs->getValue('save_attachments'); 527 $show_link_attach = ($conf['compose']['link_attachments'] && !$conf['compose']['link_all_attachments']); 528 $show_save_attach = ((strpos($save_attach, 'prompt') === 0) && !$conf['compose']['link_all_attachments']); 529 ?> 530 <?php if ($show_link_attach || $show_save_attach): ?> 531 <tr> 532 <td> </td> 533 <td class="item"> 534 <table width="100%" cellspacing="2"> 535 <?php if ($show_save_attach): ?> 536 <?php $save_attach_val = Util::getFormData('save_attachments_select', ($save_attach == 'prompt_yes')); ?> 537 <tr> 538 <td class="leftAlign"><strong><?php echo _("Save Attachments with message in sent-mail folder?") ?></strong> </td> 539 <td class="leftAlign"> 540 <select name="save_attachments_select"> 541 <option value="1"<?php if ($save_attach_val == 1) echo ' selected="selected"' ?>><?php echo _("Yes") ?></option> 542 <option value="0"<?php if ($save_attach_val == 0) echo ' selected="selected"' ?>><?php echo _("No") ?></option> 543 </select> 544 </td> 545 <td class="item rightAlign"><?php echo Help::link('imp', 'compose-save-attachments') ?> </td> 546 </tr> 547 <?php endif; ?> 548 <?php if ($show_link_attach): ?> 549 <?php $link_attach_val = Util::getFormData('link_attachments'); ?> 550 <tr> 551 <td class="leftAlign"><strong><?php echo _("Link Attachments?") ?></strong> </td> 552 <td class="leftAlign"> 553 <select name="link_attachments"> 554 <option value="1"<?php if ($link_attach_val == 1) echo ' selected="selected"' ?>><?php echo _("Yes") ?></option> 555 <option value="0"<?php if ($link_attach_val == 0) echo ' selected="selected"' ?>><?php echo _("No") ?></option> 556 </select> 557 </td> 558 <td class="item rightAlign"><?php echo Help::link('imp', 'compose-link-attachments') ?> </td> 559 </tr> 560 <?php endif; ?> 561 </table> 562 </td> 563 </tr> 564 <?php endif; ?> 565 <?php if ($imp_compose->numberOfAttachments()): ?> 566 <tr> 567 <td> </td> 568 <td class="item"> 569 <table width="100%"> 570 <tr> 571 <td class="leftAlign"> 572 <table class="item" cellspacing="2"> 573 <?php 574 require_once 'Horde/MIME/Contents.php'; 575 $mime_contents = &new MIME_Contents(new MIME_Part()); 576 577 foreach ($imp_compose->getAttachments() as $file_num => $mime) { 578 $file_num++; 579 $disposition = $mime->getDisposition(); 580 $viewer = &$mime_contents->getMIMEViewer($mime); 581 $linked = Util::getFormData (sprintf('file_linked_%d', $file_num)); 582 if ($mime->getType() != 'application/octet-stream') { 583 $preview_url = Util::addParameter(Horde::applicationUrl('view.php'), array('actionID' => 'compose_attach_preview', 'id' => $file_num, 'messageCache' => $imp_compose->getMessageCacheId())); 584 } else { 585 $preview_url = null; 586 } 587 require IMP_TEMPLATES . '/compose/attachments.inc'; 588 } 589 ?> 590 <tr> 591 <td> </td> 592 </tr> 593 <tr> 594 <td colspan="4" class="leftAlign"><strong><?php echo _("Total Attachments Size:") ?></strong> <?php echo number_format($imp_compose->sizeOfAttachments() / 1024, 2, $localeinfo['decimal_point'], $localeinfo['thousands_sep']) ?> <?php echo _("KB") ?></th> 595 </tr> 596 </table> 597 </td> 598 <td class="rightAlign" valign="top"><?php echo Help::link('imp', 'compose-attachments') ?> </td> 599 </tr> 600 </table> 601 </td> 602 </tr> 603 <?php endif; ?> 604 <?php endif; ?> 605 606 </table> 607 </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 |
![]() |