pearweb_index
[ class tree: pearweb_index ] [ index: pearweb_index ] [ all elements ]

Source for file lists.php

Documentation is available at lists.php

  1. <?php
  2. /*
  3.    +----------------------------------------------------------------------+
  4.    | PEAR Web site version 1.0                                            |
  5.    +----------------------------------------------------------------------+
  6.    | Copyright (c) 2004-2005 The PEAR Group                               |
  7.    +----------------------------------------------------------------------+
  8.    | This source file is subject to version 2.02 of the PHP license,      |
  9.    | that is bundled with this package in the file LICENSE, and is        |
  10.    | available at through the world-wide-web at                           |
  11.    | http://www.php.net/license/2_02.txt.                                 |
  12.    | If you did not receive a copy of the PHP license and are unable to   |
  13.    | obtain it through the world-wide-web, please send a note to          |
  14.    | license@php.net so we can mail you a copy immediately.               |
  15.    +----------------------------------------------------------------------+
  16.    | Author: Martin Jansen <mj@php.net>                                   |
  17.    +----------------------------------------------------------------------+
  18.    $Id$
  19. */
  20.  
  21. response_header('Support - Mailing Lists');
  22.  
  23. /*
  24.  * array of lists (
  25.  *     list,
  26.  *     name,
  27.  *     short desc.,
  28.  *     moderated,
  29.  *     archive,
  30.  *     digest,
  31.  *     newsgroup
  32.  * )
  33.  */
  34. $mailing_lists = array(
  35.     'PEAR Mailing Lists',
  36.  
  37.     array (
  38.         'pear-general',
  39.         'PEAR general list',
  40.         'A list for people with questions on how to use PEAR',
  41.         false,
  42.         true,
  43.         true,
  44.         'php.pear.general',
  45.         'php.pear.general'// identifier for gmane.org
  46.     ),
  47.  
  48.     array (
  49.         'pear-dev',
  50.         'PEAR developers list',
  51.         'A list for the people who make PEAR packages',
  52.         false,
  53.         true,
  54.         true,
  55.         'php.pear.dev',
  56.         'php.pear.devel',
  57.     ),
  58.  
  59.     array (
  60.         'pear-cvs',
  61.         'PEAR SVN list',
  62.         'All commits to PEAR\'s SVN repository get automatically posted to this list',
  63.         false,
  64.         true,
  65.         true,
  66.         'php.pear.cvs',
  67.         'php.cvs.pear',
  68.     ),
  69.  
  70.     array (
  71.         'pear-doc',
  72.         'PEAR documentation list',
  73.         'A list for discussing topics related to the PEAR documentation.',
  74.         false,
  75.         true,
  76.         true,
  77.         'php.pear.doc',
  78.         'php.pear.documentation',
  79.     ),
  80.  
  81.     array (
  82.         'pear-qa',
  83.         'PEAR QA list',
  84.         'A list for managing PEAR\'s Quality Assurance process',
  85.         false,
  86.         true,
  87.         true,
  88.         'php.pear.qa',
  89.         'php.pear.qa',
  90.     ),
  91.  
  92.     array (
  93.         'pear-core',
  94.         'PEAR Core development list',
  95.         'A list for the people who make PEAR\'s core infrastructure',
  96.         false,
  97.         true,
  98.         true,
  99.         'php.pear.core',
  100.         'php.pear.core',
  101.     ),
  102.  
  103.     array (
  104.         'pear-webmaster',
  105.         'PEAR webmaster list',
  106.         'A list for the people managing PEAR\'s website',
  107.         false,
  108.         true,
  109.         true,
  110.         'php.pear.webmaster',
  111.         'php.pear.website',
  112.     ),
  113.  
  114.     array (
  115.         'pear-bugs',
  116.         'PEAR bugs list',
  117.         'A list for people that want to monitor every single bug and comments/changes on those bugs',
  118.         false,
  119.         false,
  120.         true,
  121.         'php.pear.bugs',
  122.         'php.pear.bugs',
  123.     ),
  124. );
  125.  
  126. if (isset($_POST['action'])) {
  127.     # should really grab some email validating routine and use it here.
  128.     if (empty($_POST['email']|| $_POST['email'== 'user@example.com'{
  129.         echo '<div class="errors">';
  130.         echo 'You forgot to specify an email address to be added to the ';
  131.         echo 'list. Go back and try again.';
  132.         echo '</div>';
  133.         response_footer();
  134.         exit;
  135.     elseif (!isset($_POST['maillist'])) {
  136.         echo '<div class="errors">';
  137.         echo 'You forgot to choose an mailing list. Go back and try again.';
  138.         echo '</div>';
  139.         response_footer();
  140.         exit;
  141.     else if (!DEVBOX{
  142.         $request strtolower($_POST['action']);
  143.         if ($request != 'subscribe' && $request != 'unsubscribe'{
  144.             $request 'subscribe';
  145.         }
  146.         $sub str_replace('@''='$_POST['email']);
  147.  
  148.         foreach ($_POST['maillist'as $list => $type{
  149.             if ($type == 'digest'{
  150.                 $list $list '-digest';
  151.             }
  152.             mail("$list-$request-$sub@lists.php.net",
  153.                  'Website Subscription',
  154.                  'This was a request generated from the form at'
  155.                  . 'http://' . PEAR_CHANNELNAME . '/support/lists.php.',
  156.                  "From: {$_POST['email']}");
  157.         }
  158.  
  159.         report_success('A request has been entered into the mailing list'
  160.                        . ' processing queue. You should receive '
  161.                        . (count($_POST['maillist']== 1 ? 'an email' 'emails' )
  162.                        . ' at ' htmlentities($_POST['email']ENT_QUOTES'UTF-8'' shortly describing'
  163.                        . ' how to complete your request.');
  164.     }
  165. }
  166.  
  167. ?>
  168.  
  169.  
  170. <p>
  171.  There are <?php echo count($mailing_lists)-1; ?> PEAR-related mailing
  172.  lists available. Most of them have archives available, and they are
  173.  also available as newsgroups on our
  174.  <a href="news://news.php.net">news server</a>. The archives are
  175.  searchable. The lists are described in more detail in the
  176.  <a href="/manual/en/support.php">manual</a>.
  177. </p>
  178.  
  179. <form method="post" action="/support/lists.php">
  180. <table class="form-holder" cellpadding="5" cellspacing="1">
  181.  
  182. <?php
  183.  
  184. while (list($listinfoeach($mailing_lists)) {
  185.     if (!is_array($listinfo)) {
  186.         echo ' <tr>' "\n";
  187.         echo '  <th class="form-label_top_center">' $listinfo '</th>' "\n";
  188.         echo '  <th class="form-label_top_center">Moderated</th>' "\n";
  189.         echo '  <th class="form-label_top_center">Archive</th>' "\n";
  190.         echo '  <th class="form-label_top_center">Newsgroup</th>' "\n";
  191.         echo '  <th class="form-label_top_center">Normal</th>' "\n";
  192.         echo '  <th class="form-label_top_center">Digest</th>' "\n";
  193.         echo ' </tr>' "\n";
  194.     else {
  195.         echo ' <tr>' "\n";
  196.         echo '  <td class="form-input"><strong>' $listinfo[1'</strong><br /><small>'$listinfo[2"</small></td>\n";
  197.         echo '  <td class="form-input_center">' ($listinfo[3'yes' 'no'"</td>\n";
  198.         echo '  <td class="form-input_center">' ($listinfo[4? make_link("http://news.gmane.org/gmane.comp." $listinfo[7]'yes''n/a'"</td>\n";
  199.         echo '  <td class="form-input_center">' ($listinfo[6? make_link("news://news.php.net/".$listinfo[6]'yes'' ' . make_link("http://news.php.net/group.php?group=".$listinfo[6]'http''n/a'"</td>\n";
  200.         echo '  <td class="form-input_center"><input name="maillist[' $listinfo[0']" type="radio" value="normal" /></td>';
  201.         echo '  <td class="form-input_center">' ($listinfo[5'<input name="maillist[' $listinfo[0']" type="radio" value="digest" />' 'n/a' "</td>\n";
  202.         echo ' </tr>' "\n";
  203.     }
  204. }
  205.  
  206. ?>
  207.  
  208. </table>
  209.  
  210. <p style="text-align: center;">
  211.  <strong>Email:</strong>
  212.  <input type="text" name="email" size="30" value="user@example.com" />
  213.  <input type="submit" name="action" value="Subscribe" />
  214.  <input type="submit" name="action" value="Unsubscribe" />
  215. </p>
  216.  
  217. </form>
  218.  
  219. <p>
  220.  You will be sent a confirmation mail at the address you wish to
  221.  be subscribed or unsubscribed, and only added to the list after
  222.  following the directions in that mail.
  223. </p>
  224.  
  225. <p>
  226.  There are a variety of commands you can use to modify your subscription.
  227.  Either send a message to pear-<tt>whatever</tt>@lists.php.net (as in,
  228.  pear-general@lists.php.net) or you can view the commands for
  229.  ezmlm <a href="http://www.ezmlm.org/ezman-0.32/ezman1.html">here</a>.
  230. </p>
  231.  
  232. <?php
  233. response_footer();

Documentation generated on Mon, 11 Mar 2019 16:01:20 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.