Source for file mailout.php

Documentation is available at mailout.php

  1. <?php
  2. /**
  3.  * mailout.php
  4.  *
  5.  * Copyright (c) 1999-2006 The SquirrelMail Project Team
  6.  * Licensed under the GNU GPL. For full terms see the file COPYING.
  7.  *
  8.  * $Id: mailout.php,v 1.13.2.9 2006/02/03 22:27:52 jervfors Exp $
  9.  * @package plugins
  10.  * @subpackage listcommands
  11.  */
  12.  
  13. define('SM_PATH','../../');
  14.  
  15. /* SquirrelMail required files. */
  16. require_once(SM_PATH 'include/validate.php');
  17. include_once(SM_PATH 'functions/page_header.php');
  18. include_once(SM_PATH 'include/load_prefs.php');
  19. include_once(SM_PATH 'functions/html.php');
  20. require_once(SM_PATH 'functions/identity.php');
  21.  
  22. displayPageHeader($colornull);
  23.  
  24. /* get globals */
  25. sqgetGlobalVar('mailbox'$mailboxSQ_GET);
  26. sqgetGlobalVar('send_to'$send_toSQ_GET);
  27. sqgetGlobalVar('subject'$subjectSQ_GET);
  28. sqgetGlobalVar('body',    $body,    SQ_GET);
  29. sqgetGlobalVar('action',  $action,  SQ_GET);
  30.  
  31. switch $action {
  32. case 'help':
  33.     $out_string _("This will send a message to %s requesting help for this list. You will receive an emailed response at the address below.");
  34.     break;
  35. case 'subscribe':
  36.     $out_string _("This will send a message to %s requesting that you will be subscribed to this list. You will be subscribed with the address below.");
  37.     break;
  38. case 'unsubscribe':
  39.     $out_string _("This will send a message to %s requesting that you will be unsubscribed from this list. It will try to unsubscribe the adress below.");
  40.     break;
  41. default:
  42.     error_box(sprintf(_("Unknown action: %s"),htmlspecialchars($action))$color);
  43.     exit;
  44. }
  45.  
  46. echo html_tag('p''''left' .
  47. html_tag'table''''center'$color[0]'border="0" width="75%"' "\n" .
  48.     html_tag'tr',
  49.         html_tag'th'_("Mailinglist"' ' _($action)''$color[9)
  50.     .
  51.     html_tag'tr' .
  52.     html_tag'td''''left' );
  53.  
  54.  
  55. printf$out_stringhtmlspecialchars($send_to) );
  56.  
  57. echo '<form method="post" action="../../src/compose.php">';
  58.  
  59. $idents get_identities();
  60.  
  61. echo html_tag('p''''center' _("From:"' ';
  62.  
  63. if (count($idents1{
  64.     echo '<select name="identity">';
  65.     foreach($idents as $nr=>$data{
  66.         echo '<option value="' $nr '">' .
  67.             htmlspecialchars(
  68.                 $data['full_name'].' <'.
  69.                 $data['email_address'">\n");
  70.     }
  71.     echo '</select>' "\n" ;
  72. else {
  73.     echo htmlspecialchars('"'.$idents[0]['full_name'].'" <'.$idents[0]['email_address'].'>');
  74. }
  75.  
  76. echo '<br />'
  77. '<input type="hidden" name="send_to" value="' htmlspecialchars($send_to'">'
  78. '<input type="hidden" name="subject" value="' htmlspecialchars($subject'">'
  79. '<input type="hidden" name="body" value="' htmlspecialchars($body'">'
  80. '<input type="hidden" name="mailbox" value="' htmlspecialchars($mailbox'">'
  81. '<input type="submit" name="send" value="' _("Send Mail"'"><br /><br /></center>'
  82. '</form></td></tr></table></p></body></html>';
  83. ?>

Documentation generated on Sat, 07 Oct 2006 16:32:18 +0300 by phpDocumentor 1.3.0RC6