[ Index ]
 

Code source de XOOPS 2.0.17.1

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/htdocs/modules/system/admin/mailusers/ -> mailform.php (source)

   1  <?php
   2  // $Id: mailform.php 952 2007-08-06 21:34:37Z dugris $

   3  //  ------------------------------------------------------------------------ //

   4  //                XOOPS - PHP Content Management System                      //

   5  //                    Copyright (c) 2000 XOOPS.org                           //

   6  //                       <http://www.xoops.org/>                             //

   7  //  ------------------------------------------------------------------------ //

   8  //  This program is free software; you can redistribute it and/or modify     //

   9  //  it under the terms of the GNU General Public License as published by     //

  10  //  the Free Software Foundation; either version 2 of the License, or        //

  11  //  (at your option) any later version.                                      //

  12  //                                                                           //

  13  //  You may not change or alter any portion of this comment or credits       //

  14  //  of supporting developers from this source code or any supporting         //

  15  //  source code which is considered copyrighted (c) material of the          //

  16  //  original comment or credit authors.                                      //

  17  //                                                                           //

  18  //  This program is distributed in the hope that it will be useful,          //

  19  //  but WITHOUT ANY WARRANTY; without even the implied warranty of           //

  20  //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //

  21  //  GNU General Public License for more details.                             //

  22  //                                                                           //

  23  //  You should have received a copy of the GNU General Public License        //

  24  //  along with this program; if not, write to the Free Software              //

  25  //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //

  26  //  ------------------------------------------------------------------------ //

  27  // Author: Kazumi Ono (AKA onokazu)                                          //

  28  // URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //

  29  // Project: The XOOPS Project                                                //

  30  // ------------------------------------------------------------------------- //

  31  
  32  $form = new XoopsThemeForm(_AM_SENDMTOUSERS, "mailusers", "admin.php?fct=mailusers", 'post', true);
  33  
  34  // from finduser section

  35  if (!empty($_POST['memberslist_id'])) {
  36      $user_count = count($_POST['memberslist_id']);
  37      $display_names = "";
  38      for ( $i = 0; $i < $user_count; $i++ ) {
  39          $uid_hidden = new XoopsFormHidden("mail_to_user[]", $_POST['memberslist_id'][$i]);
  40          $form->addElement($uid_hidden);
  41          $display_names .= "<a href='".XOOPS_URL."/userinfo.php?uid=".$_POST['memberslist_id'][$i]."' target='_blank'>".$_POST['memberslist_uname'][$_POST['memberslist_id'][$i]]."</a>, ";
  42          unset($uid_hidden);
  43      }
  44      $users_label = new XoopsFormLabel(_AM_SENDTOUSERS2, substr($display_names, 0, -2));
  45      $form->addElement($users_label);
  46      $display_criteria = 0;
  47  }
  48  if ( !empty($display_criteria) ) {
  49      $selected_groups = array();
  50      $group_select = new XoopsFormSelectGroup(_AM_GROUPIS."<br />", "mail_to_group", false, $selected_groups, 5, true);
  51      $lastlog_min = new XoopsFormText(_AM_LASTLOGMIN."<br />"._AM_TIMEFORMAT."<br />", "mail_lastlog_min", 20, 10);
  52      $lastlog_max = new XoopsFormText(_AM_LASTLOGMAX."<br />"._AM_TIMEFORMAT."<br />", "mail_lastlog_max", 20, 10);
  53      $regd_min = new XoopsFormText(_AM_REGDMIN."<br />"._AM_TIMEFORMAT."<br />", "mail_regd_min", 20, 10);
  54      $regd_max = new XoopsFormText(_AM_REGDMAX."<br />"._AM_TIMEFORMAT."<br />", "mail_regd_max", 20, 10);
  55      $idle_more = new XoopsFormText(_AM_IDLEMORE."<br />", "mail_idle_more", 10, 5);
  56      $idle_less = new XoopsFormText(_AM_IDLELESS."<br />", "mail_idle_less", 10, 5);
  57      $mailok_cbox = new XoopsFormCheckBox('', 'mail_mailok');
  58      $mailok_cbox->addOption(1, _AM_MAILOK);
  59      $inactive_cbox = new XoopsFormCheckBox(_AM_INACTIVE."<br />", "mail_inactive");
  60      $inactive_cbox->addOption(1, _AMIFCHECKD);
  61      $inactive_cbox->setExtra("onclick='javascript:disableElement(\"mail_lastlog_min\");disableElement(\"mail_lastlog_max\");disableElement(\"mail_idle_more\");disableElement(\"mail_idle_less\");disableElement(\"mail_to_group[]\");'");
  62      $criteria_tray = new XoopsFormElementTray(_AM_SENDTOUSERS, "<br /><br />");
  63      $criteria_tray->addElement($group_select);
  64      $criteria_tray->addElement($lastlog_min);
  65      $criteria_tray->addElement($lastlog_max);
  66      $criteria_tray->addElement($idle_more);
  67      $criteria_tray->addElement($idle_less);
  68      $criteria_tray->addElement($mailok_cbox);
  69      $criteria_tray->addElement($inactive_cbox);
  70      $criteria_tray->addElement($regd_min);
  71      $criteria_tray->addElement($regd_max);
  72      $form->addElement($criteria_tray);
  73  }
  74  
  75  $fname_text = new XoopsFormText(_AM_MAILFNAME, "mail_fromname", 30, 255, htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES));
  76  $fromemail = !empty($xoopsConfig['adminmail']) ? $xoopsConfig['adminmail'] : $xoopsUser->getVar("email", "E");
  77  $femail_text = new XoopsFormText(_AM_MAILFMAIL, "mail_fromemail", 30, 255, $fromemail);
  78  //$subject_caption = _AM_MAILSUBJECT."<br /><br /><span style='font-size:x-small;font-weight:bold;'>"._AM_MAILTAGS."</span><br /><span style='font-size:x-small;font-weight:normal;'>"._AM_MAILTAGS1."<br />"._AM_MAILTAGS2."<br />"._AM_MAILTAGS3."</span>";

  79  $subject_caption = _AM_MAILSUBJECT."<br /><br /><span style='font-size:x-small;font-weight:bold;'>"._AM_MAILTAGS."</span><br /><span style='font-size:x-small;font-weight:normal;'>"._AM_MAILTAGS2."</span>";
  80  $subject_text = new XoopsFormText($subject_caption, "mail_subject", 50, 255);
  81  $body_caption = _AM_MAILBODY."<br /><br /><span style='font-size:x-small;font-weight:bold;'>"._AM_MAILTAGS."</span><br /><span style='font-size:x-small;font-weight:normal;'>"._AM_MAILTAGS1."<br />"._AM_MAILTAGS2."<br />"._AM_MAILTAGS3."<br />"._AM_MAILTAGS4."</span>";
  82  $body_text = new XoopsFormTextArea($body_caption, "mail_body", "", 10);
  83  $to_checkbox = new XoopsFormCheckBox(_AM_SENDTO, "mail_send_to", "mail");
  84  $to_checkbox->addOption("mail", _AM_EMAIL);
  85  $to_checkbox->addOption("pm", _AM_PM);
  86  $start_hidden = new XoopsFormHidden("mail_start", 0);
  87  $op_hidden = new XoopsFormHidden("op", "send");
  88  $submit_button = new XoopsFormButton("", "mail_submit", _SEND, "submit");
  89  
  90  $form->addElement($fname_text);
  91  $form->addElement($femail_text);
  92  $form->addElement($subject_text);
  93  $form->addElement($body_text);
  94  $form->addElement($to_checkbox);
  95  $form->addElement($op_hidden);
  96  $form->addElement($start_hidden);
  97  $form->addElement($submit_button);
  98  $form->setRequired($subject_text);
  99  $form->setRequired($body_text);
 100  //$form->setRequired($to_checkbox);

 101  ?>


Généré le : Sun Nov 25 11:44:32 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics