1 | <?php |
||||
2 | /* |
||||
3 | * You may not change or alter any portion of this comment or credits |
||||
4 | * of supporting developers from this source code or any supporting source code |
||||
5 | * which is considered copyrighted (c) material of the original comment or credit authors. |
||||
6 | * |
||||
7 | * This program is distributed in the hope that it will be useful, |
||||
8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
||||
10 | */ |
||||
11 | |||||
12 | /** |
||||
13 | * @copyright XOOPS Project https://xoops.org/ |
||||
14 | * @license GNU GPL 2.0 or later (https://www.gnu.org/licenses/gpl-2.0.html) |
||||
15 | * @package |
||||
16 | * @since |
||||
17 | * @author XOOPS Development Team, Kazumi Ono (AKA onokazu) |
||||
18 | */ |
||||
19 | use Xmf\Request; |
||||
20 | // Check users rights |
||||
21 | if (!is_object($xoopsUser) || !is_object($xoopsModule) || !$xoopsUser->isAdmin($xoopsModule->mid())) { |
||||
22 | exit(_NOPERM); |
||||
23 | } |
||||
24 | // Check is active |
||||
25 | if (!xoops_getModuleOption('active_mailusers', 'system')) { |
||||
0 ignored issues
–
show
Deprecated Code
introduced
by
Loading history...
|
|||||
26 | redirect_header('admin.php', 2, _AM_SYSTEM_NOTACTIVE); |
||||
27 | } |
||||
28 | |||||
29 | // Parameters |
||||
30 | $limit = 100; |
||||
31 | // Get Action type |
||||
32 | $op = Request::getString('op', 'list'); |
||||
33 | // Define main template |
||||
34 | $GLOBALS['xoopsOption']['template_main'] = 'system_mailusers.tpl'; |
||||
35 | // Call Header |
||||
36 | xoops_cp_header(); |
||||
37 | // Define Stylesheet |
||||
38 | $xoTheme->addStylesheet(XOOPS_URL . '/modules/system/css/admin.css'); |
||||
39 | $xoTheme->addScript('browse.php?Frameworks/jquery/jquery.js'); |
||||
40 | $xoTheme->addScript('modules/system/js/admin.js'); |
||||
41 | |||||
42 | switch ($op) { |
||||
43 | |||||
44 | case 'list': |
||||
45 | default: |
||||
46 | // Define Breadcrumb and tips |
||||
47 | $xoBreadCrumb->addLink(_AM_SYSTEM_MAILUSERS_MANAGER, system_adminVersion('mailusers', 'adminpath')); |
||||
48 | $xoBreadCrumb->addHelp(system_adminVersion('mailusers', 'help')); |
||||
49 | $xoBreadCrumb->render(); |
||||
50 | |||||
51 | $display_criteria = 1; |
||||
52 | $form = new XoopsThemeForm(_AM_SYSTEM_MAILUSERS_LIST, 'mailusers', 'admin.php?fct=mailusers', 'post', true); |
||||
53 | if (!empty($_POST['memberslist_id'])) { |
||||
54 | $user_count = count($_POST['memberslist_id']); |
||||
55 | $display_names = ''; |
||||
56 | for ($i = 0; $i < $user_count; ++$i) { |
||||
57 | $uid_hidden = new XoopsFormHidden('mail_to_user[]', $_POST['memberslist_id'][$i]); |
||||
58 | $form->addElement($uid_hidden); |
||||
59 | $display_names .= "<a href='" . XOOPS_URL . '/userinfo.php?uid=' . $_POST['memberslist_id'][$i] . "' rel='external'>" . XoopsUser::getUnameFromId($_POST['memberslist_id'][$i]) . '</a>, '; |
||||
60 | unset($uid_hidden); |
||||
61 | } |
||||
62 | $users_label = new XoopsFormLabel(_AM_SYSTEM_MAILUSERS_SENDTOUSERS2, substr($display_names, 0, -2)); |
||||
63 | $form->addElement($users_label); |
||||
64 | $display_criteria = 0; |
||||
65 | } |
||||
66 | if (!empty($display_criteria)) { |
||||
67 | $selected_groups = array(); |
||||
68 | $group_select = new XoopsFormSelectGroup('<div class="bold spacer">' . _AM_SYSTEM_MAILUSERS_GROUPIS . '<span class="bold green">*</span></div>', 'mail_to_group', false, $selected_groups, 5, true); |
||||
69 | |||||
70 | $lastlog_min = new XoopsFormTextDateSelect(_AM_SYSTEM_MAILUSERS_LASTLOGMIN . '<span class="bold green">*</span>', 'mail_lastlog_min'); |
||||
71 | $lastlog_min->setValue(''); |
||||
72 | $lastlog_max = new XoopsFormTextDateSelect(_AM_SYSTEM_MAILUSERS_LASTLOGMAX . '<span class="bold green">*</span>', 'mail_lastlog_max'); |
||||
73 | $lastlog_max->setValue(''); |
||||
74 | |||||
75 | $date = new XoopsFormElementTray('<div class="bold spacer">' . _AM_SYSTEM_MAILUSERS_DATE . '</div>', ''); |
||||
76 | $date->addElement($lastlog_min); |
||||
77 | $date->addElement($lastlog_max); |
||||
78 | |||||
79 | $idle_more = new XoopsFormText(_AM_SYSTEM_MAILUSERS_IDLEMORE . '<span class="bold green">*</span>', 'mail_idle_more', 10, 5); |
||||
80 | $idle_less = new XoopsFormText(_AM_SYSTEM_MAILUSERS_IDLELESS . '<span class="bold green">*</span>', 'mail_idle_less', 10, 5); |
||||
81 | |||||
82 | $idle = new XoopsFormElementTray('<div class="bold spacer">' . _AM_SYSTEM_MAILUSERS_DAY . '</div>', ''); |
||||
83 | $idle->addElement($idle_more); |
||||
84 | $idle->addElement($idle_less); |
||||
85 | |||||
86 | $regd_min = new XoopsFormTextDateSelect(_AM_SYSTEM_MAILUSERS_REGDMIN . '<span class="bold green">*</span>', 'mail_regd_min'); |
||||
87 | $regd_min->setValue(''); |
||||
88 | $regd_max = new XoopsFormTextDateSelect(_AM_SYSTEM_MAILUSERS_REGDMAX . '<span class="bold green">*</span>', 'mail_regd_max'); |
||||
89 | $regd_max->setValue(''); |
||||
90 | |||||
91 | $regdate = new XoopsFormElementTray('<div class="bold spacer">' . _AM_SYSTEM_MAILUSERS_REGDATE . '</div>', ''); |
||||
92 | $regdate->addElement($regd_min); |
||||
93 | $regdate->addElement($regd_max); |
||||
94 | |||||
95 | $mailok_cbox = new XoopsFormCheckBox('', 'mail_mailok'); |
||||
96 | $mailok_cbox->addOption(1, _AM_SYSTEM_MAILUSERS_MAILOK . '<span class="bold green">*</span>'); |
||||
97 | $inactive_cbox = new XoopsFormCheckBox('', 'mail_inactive'); |
||||
98 | $inactive_cbox->addOption(1, _AM_SYSTEM_MAILUSERS_INACTIVE . '<span class="bold green">*</span>'); |
||||
99 | $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[]\");'"); |
||||
100 | $criteria_tray = new XoopsFormElementTray(_AM_SYSTEM_MAILUSERS_SENDTOUSERS, '<br><br>'); |
||||
101 | $criteria_tray->setDescription('<span class="bold green">*</span>' . _AM_SYSTEM_MAILUSERS_OPTIONAL); |
||||
102 | $criteria_tray->addElement($group_select); |
||||
103 | //$criteria_tray->addElement($lastlog); |
||||
104 | $criteria_tray->addElement($date); |
||||
105 | //$criteria_tray->addElement($lastlog_max); |
||||
106 | $criteria_tray->addElement($idle); |
||||
107 | //$criteria_tray->addElement($idle_less); |
||||
108 | $criteria_tray->addElement($regdate); |
||||
109 | |||||
110 | $criteria_tray->addElement($mailok_cbox); |
||||
111 | $criteria_tray->addElement($inactive_cbox); |
||||
112 | |||||
113 | //$criteria_tray->addElement($regd_max); |
||||
114 | $form->addElement($criteria_tray); |
||||
115 | } |
||||
116 | $fname_text = new XoopsFormText(_AM_SYSTEM_MAILUSERS_MAILFNAME, 'mail_fromname', 30, 255, htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES | ENT_HTML5)); |
||||
117 | $fromemail = !empty($xoopsConfig['adminmail']) ? $xoopsConfig['adminmail'] : $xoopsUser->getVar('email', 'E'); |
||||
118 | $femail_text = new XoopsFormText(_AM_SYSTEM_MAILUSERS_MAILFMAIL, 'mail_fromemail', 30, 255, $fromemail); |
||||
119 | $subject_caption = _AM_SYSTEM_MAILUSERS_MAILSUBJECT . "<br><br><span style='font-size:x-small;font-weight:bold;'>" . _AM_SYSTEM_MAILUSERS_MAILTAGS . "</span><br><span style='font-size:x-small;font-weight:normal;'>" . _AM_SYSTEM_MAILUSERS_MAILTAGS2 . '</span>'; |
||||
120 | $subject_text = new XoopsFormText($subject_caption, 'mail_subject', 50, 255); |
||||
121 | $body_caption = _AM_SYSTEM_MAILUSERS_MAILBODY . "<br><br><span style='font-size:x-small;font-weight:bold;'>" . _AM_SYSTEM_MAILUSERS_MAILTAGS . "</span><br><span style='font-size:x-small;font-weight:normal;'>" . _AM_SYSTEM_MAILUSERS_MAILTAGS1 . '<br>' . _AM_SYSTEM_MAILUSERS_MAILTAGS2 . '<br>' . _AM_SYSTEM_MAILUSERS_MAILTAGS5 . '<br>' . _AM_SYSTEM_MAILUSERS_MAILTAGS3 . '<br>' . _AM_SYSTEM_MAILUSERS_MAILTAGS4 . '</span>'; |
||||
122 | $body_text = new XoopsFormTextArea($body_caption, 'mail_body', '', 10); |
||||
123 | $to_checkbox = new XoopsFormCheckBox(_AM_SYSTEM_MAILUSERS_SENDTO, 'mail_send_to', 'mail'); |
||||
124 | $to_checkbox->addOption('mail', _AM_SYSTEM_MAILUSERS_EMAIL); |
||||
125 | $to_checkbox->addOption('pm', _AM_SYSTEM_MAILUSERS_PM); |
||||
126 | $start_hidden = new XoopsFormHidden('mail_start', 0); |
||||
127 | $op_hidden = new XoopsFormHidden('op', 'send'); |
||||
128 | $submit_button = new XoopsFormButton('', 'mail_submit', _SEND, 'submit'); |
||||
129 | |||||
130 | $form->addElement($fname_text); |
||||
131 | $form->addElement($femail_text); |
||||
132 | $form->addElement($subject_text); |
||||
133 | $form->addElement($body_text); |
||||
134 | $form->addElement($to_checkbox); |
||||
135 | $form->addElement($op_hidden); |
||||
136 | $form->addElement($start_hidden); |
||||
137 | $form->addElement($submit_button); |
||||
138 | $form->setRequired($subject_text); |
||||
139 | $form->setRequired($body_text); |
||||
140 | // Assign form |
||||
141 | $xoopsTpl->assign('form', $form->render()); |
||||
142 | break; |
||||
143 | |||||
144 | // Send |
||||
145 | case 'send': |
||||
146 | // Define Breadcrumb and tips |
||||
147 | |||||
148 | $xoBreadCrumb->addLink(_AM_SYSTEM_MAILUSERS_MANAGER, system_adminVersion('mailusers', 'adminpath')); |
||||
149 | $xoBreadCrumb->addLink(_AM_SYSTEM_MAILUSERS_LIST); |
||||
150 | $xoBreadCrumb->render(); |
||||
151 | |||||
152 | if (!empty($_POST['mail_send_to'])) { |
||||
153 | $added = array(); |
||||
154 | $added_id = array(); |
||||
155 | $criteria = array(); |
||||
156 | $count_criteria = 0; // user count via criteria; |
||||
157 | if (!empty($_POST['mail_inactive'])) { |
||||
158 | $criteria[] = 'level = 0'; |
||||
159 | } else { |
||||
160 | if (!empty($_POST['mail_mailok'])) { |
||||
161 | $criteria[] = 'user_mailok = 1'; |
||||
162 | } |
||||
163 | if (!empty($_POST['mail_lastlog_min'])) { |
||||
164 | $time = strtotime(trim($_POST['mail_lastlog_min'])); |
||||
165 | if ($time > 0) { |
||||
166 | $criteria[] = "last_login > $time"; |
||||
167 | } |
||||
168 | } |
||||
169 | if (!empty($_POST['mail_lastlog_max'])) { |
||||
170 | $time = strtotime(trim($_POST['mail_lastlog_max'])); |
||||
171 | if ($time > 0) { |
||||
172 | $criteria[] = "last_login < $time"; |
||||
173 | } |
||||
174 | } |
||||
175 | if (!empty($_POST['mail_idle_more']) && is_numeric($_POST['mail_idle_more'])) { |
||||
176 | $f_mail_idle_more = (int)trim($_POST['mail_idle_more']); |
||||
177 | $time = 60 * 60 * 24 * $f_mail_idle_more; |
||||
178 | $time = time() - $time; |
||||
179 | if ($time > 0) { |
||||
180 | $criteria[] = "last_login < $time"; |
||||
181 | } |
||||
182 | } |
||||
183 | if (!empty($_POST['mail_idle_less']) && is_numeric($_POST['mail_idle_less'])) { |
||||
184 | $f_mail_idle_less = (int)trim($_POST['mail_idle_less']); |
||||
185 | $time = 60 * 60 * 24 * $f_mail_idle_less; |
||||
186 | $time = time() - $time; |
||||
187 | if ($time > 0) { |
||||
188 | $criteria[] = "last_login > $time"; |
||||
189 | } |
||||
190 | } |
||||
191 | } |
||||
192 | if (!empty($_POST['mail_regd_min'])) { |
||||
193 | $time = strtotime(trim($_POST['mail_regd_min'])); |
||||
194 | if ($time > 0) { |
||||
195 | $criteria[] = "user_regdate > $time"; |
||||
196 | } |
||||
197 | } |
||||
198 | if (!empty($_POST['mail_regd_max'])) { |
||||
199 | $time = strtotime(trim($_POST['mail_regd_max'])); |
||||
200 | if ($time > 0) { |
||||
201 | $criteria[] = "user_regdate < $time"; |
||||
202 | } |
||||
203 | } |
||||
204 | if (!empty($criteria) || !empty($_POST['mail_to_group'])) { |
||||
205 | $criteria_object = new CriteriaCompo(); |
||||
206 | $criteria_object->setStart(isset($_POST['mail_start']) ? $_POST['mail_start'] : 0); |
||||
207 | $criteria_object->setLimit($limit); |
||||
208 | foreach ($criteria as $c) { |
||||
209 | list($field, $op, $value) = explode(' ', $c); |
||||
210 | $crit = new Criteria($field, $value, $op); |
||||
211 | $crit->prefix = 'u'; |
||||
212 | $criteria_object->add($crit, 'AND'); |
||||
213 | } |
||||
214 | /** @var XoopsMemberHandler $member_handler */ |
||||
215 | $member_handler = xoops_getHandler('member'); |
||||
216 | $groups = empty($_POST['mail_to_group']) ? array() : array_map('intval', $_POST['mail_to_group']); |
||||
217 | $getusers = $member_handler->getUsersByGroupLink($groups, $criteria_object, true); |
||||
218 | $count_criteria = $member_handler->getUserCountByGroupLink($groups, $criteria_object); |
||||
219 | foreach ($getusers as $getuser) { |
||||
220 | if (!in_array($getuser->getVar('uid'), $added_id)) { |
||||
221 | $added[] = $getuser; |
||||
222 | $added_id[] = $getuser->getVar('uid'); |
||||
223 | } |
||||
224 | } |
||||
225 | } |
||||
226 | if (!empty($_POST['mail_to_user'])) { |
||||
227 | foreach ($_POST['mail_to_user'] as $to_user) { |
||||
228 | if (!in_array($to_user, $added_id)) { |
||||
229 | $added[] = new XoopsUser($to_user); |
||||
230 | $added_id[] = $to_user; |
||||
231 | } |
||||
232 | } |
||||
233 | } |
||||
234 | $added_count = count($added); |
||||
235 | |||||
236 | //openTable(); |
||||
237 | if ($added_count > 0) { |
||||
238 | $myts = \MyTextSanitizer::getInstance(); |
||||
239 | $xoopsMailer = xoops_getMailer(); |
||||
240 | for ($i = 0; $i < $added_count; ++$i) { |
||||
241 | $xoopsMailer->setToUsers($added[$i]); |
||||
242 | } |
||||
243 | $xoopsMailer->setFromName($myts->stripSlashesGPC($_POST['mail_fromname'])); |
||||
0 ignored issues
–
show
The function
MyTextSanitizer::stripSlashesGPC() has been deprecated: as of XOOPS 2.5.11 and will be removed in next XOOPS version
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This function has been deprecated. The supplier of the function has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.
Loading history...
|
|||||
244 | $xoopsMailer->setFromEmail($myts->stripSlashesGPC($_POST['mail_fromemail'])); |
||||
0 ignored issues
–
show
The function
MyTextSanitizer::stripSlashesGPC() has been deprecated: as of XOOPS 2.5.11 and will be removed in next XOOPS version
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This function has been deprecated. The supplier of the function has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.
Loading history...
|
|||||
245 | $xoopsMailer->setSubject($myts->stripSlashesGPC($_POST['mail_subject'])); |
||||
0 ignored issues
–
show
The function
MyTextSanitizer::stripSlashesGPC() has been deprecated: as of XOOPS 2.5.11 and will be removed in next XOOPS version
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This function has been deprecated. The supplier of the function has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.
Loading history...
|
|||||
246 | $xoopsMailer->setBody($myts->stripSlashesGPC($_POST['mail_body'])); |
||||
0 ignored issues
–
show
The function
MyTextSanitizer::stripSlashesGPC() has been deprecated: as of XOOPS 2.5.11 and will be removed in next XOOPS version
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This function has been deprecated. The supplier of the function has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.
Loading history...
|
|||||
247 | if (in_array('mail', $_POST['mail_send_to'])) { |
||||
248 | $xoopsMailer->useMail(); |
||||
249 | } |
||||
250 | if (in_array('pm', $_POST['mail_send_to']) && empty($_POST['mail_inactive'])) { |
||||
251 | $xoopsMailer->usePM(); |
||||
252 | } |
||||
253 | $xoopsMailer->send(true); |
||||
254 | $xoopsTpl->assign('Sucess', $xoopsMailer->getSuccess()); |
||||
255 | $xoopsTpl->assign('Errors', $xoopsMailer->getErrors()); |
||||
256 | //echo $xoopsMailer->getSuccess(); |
||||
257 | //echo $xoopsMailer->getErrors(); |
||||
258 | |||||
259 | if ($count_criteria > $limit) { |
||||
260 | $form = new XoopsThemeForm(_AM_SYSTEM_MAILUSERS_LIST, 'mailusers', 'admin.php?fct=mailusers', 'post', true); |
||||
261 | if (!empty($_POST['mail_to_group'])) { |
||||
262 | foreach ($_POST['mail_to_group'] as $mailgroup) { |
||||
263 | $group_hidden = new XoopsFormHidden('mail_to_group[]', $mailgroup); |
||||
264 | $form->addElement($group_hidden); |
||||
265 | } |
||||
266 | } |
||||
267 | $inactive_hidden = new XoopsFormHidden('mail_inactive', isset($_POST['mail_inactive']) ? $_POST['mail_inactive'] : ''); |
||||
268 | $lastlog_min_hidden = new XoopsFormHidden('mail_lastlog_min', $myts->htmlSpecialChars($myts->stripSlashesGPC($_POST['mail_lastlog_min']))); |
||||
0 ignored issues
–
show
The function
MyTextSanitizer::stripSlashesGPC() has been deprecated: as of XOOPS 2.5.11 and will be removed in next XOOPS version
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This function has been deprecated. The supplier of the function has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.
Loading history...
|
|||||
269 | $lastlog_max_hidden = new XoopsFormHidden('mail_lastlog_max', $myts->htmlSpecialChars($myts->stripSlashesGPC($_POST['mail_lastlog_max']))); |
||||
0 ignored issues
–
show
The function
MyTextSanitizer::stripSlashesGPC() has been deprecated: as of XOOPS 2.5.11 and will be removed in next XOOPS version
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This function has been deprecated. The supplier of the function has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.
Loading history...
|
|||||
270 | $regd_min_hidden = new XoopsFormHidden('mail_regd_min', $myts->htmlSpecialChars($myts->stripSlashesGPC($_POST['mail_regd_min']))); |
||||
0 ignored issues
–
show
The function
MyTextSanitizer::stripSlashesGPC() has been deprecated: as of XOOPS 2.5.11 and will be removed in next XOOPS version
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This function has been deprecated. The supplier of the function has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.
Loading history...
|
|||||
271 | $regd_max_hidden = new XoopsFormHidden('mail_regd_max', $myts->htmlSpecialChars($myts->stripSlashesGPC($_POST['mail_regd_max']))); |
||||
0 ignored issues
–
show
The function
MyTextSanitizer::stripSlashesGPC() has been deprecated: as of XOOPS 2.5.11 and will be removed in next XOOPS version
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This function has been deprecated. The supplier of the function has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.
Loading history...
|
|||||
272 | $idle_more_hidden = new XoopsFormHidden('mail_idle_more', $myts->htmlSpecialChars($myts->stripSlashesGPC($_POST['mail_idle_more']))); |
||||
0 ignored issues
–
show
The function
MyTextSanitizer::stripSlashesGPC() has been deprecated: as of XOOPS 2.5.11 and will be removed in next XOOPS version
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This function has been deprecated. The supplier of the function has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.
Loading history...
|
|||||
273 | $idle_less_hidden = new XoopsFormHidden('mail_idle_less', $myts->htmlSpecialChars($myts->stripSlashesGPC($_POST['mail_idle_less']))); |
||||
0 ignored issues
–
show
The function
MyTextSanitizer::stripSlashesGPC() has been deprecated: as of XOOPS 2.5.11 and will be removed in next XOOPS version
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This function has been deprecated. The supplier of the function has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.
Loading history...
|
|||||
274 | $fname_hidden = new XoopsFormHidden('mail_fromname', $myts->htmlSpecialChars($myts->stripSlashesGPC($_POST['mail_fromname']))); |
||||
0 ignored issues
–
show
The function
MyTextSanitizer::stripSlashesGPC() has been deprecated: as of XOOPS 2.5.11 and will be removed in next XOOPS version
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This function has been deprecated. The supplier of the function has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.
Loading history...
|
|||||
275 | $femail_hidden = new XoopsFormHidden('mail_fromemail', $myts->htmlSpecialChars($myts->stripSlashesGPC($_POST['mail_fromemail']))); |
||||
0 ignored issues
–
show
The function
MyTextSanitizer::stripSlashesGPC() has been deprecated: as of XOOPS 2.5.11 and will be removed in next XOOPS version
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This function has been deprecated. The supplier of the function has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.
Loading history...
|
|||||
276 | $subject_hidden = new XoopsFormHidden('mail_subject', $myts->htmlSpecialChars($myts->stripSlashesGPC($_POST['mail_subject']))); |
||||
0 ignored issues
–
show
The function
MyTextSanitizer::stripSlashesGPC() has been deprecated: as of XOOPS 2.5.11 and will be removed in next XOOPS version
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This function has been deprecated. The supplier of the function has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.
Loading history...
|
|||||
277 | $body_hidden = new XoopsFormHidden('mail_body', $myts->htmlSpecialChars($myts->stripSlashesGPC($_POST['mail_body']))); |
||||
0 ignored issues
–
show
The function
MyTextSanitizer::stripSlashesGPC() has been deprecated: as of XOOPS 2.5.11 and will be removed in next XOOPS version
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This function has been deprecated. The supplier of the function has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.
Loading history...
|
|||||
278 | $start_hidden = new XoopsFormHidden('mail_start', $_POST['mail_start'] + $limit); |
||||
279 | $mail_mailok_hidden = new XoopsFormHidden('mail_mailok', isset($_POST['mail_mailok']) ? $myts->stripSlashesGPC(trim($_POST['mail_mailok'])) : ''); |
||||
0 ignored issues
–
show
The function
MyTextSanitizer::stripSlashesGPC() has been deprecated: as of XOOPS 2.5.11 and will be removed in next XOOPS version
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This function has been deprecated. The supplier of the function has supplied an explanatory message. The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.
Loading history...
|
|||||
280 | $op_hidden = new XoopsFormHidden('op', 'send'); |
||||
281 | $submit_button = new XoopsFormButton('', 'mail_submit', _AM_SYSTEM_MAILUSERS_SENDNEXT, 'submit'); |
||||
282 | $sent_label = new XoopsFormLabel(_AM_SYSTEM_MAILUSERS_SENT, sprintf(_AM_SYSTEM_MAILUSERS_SENTNUM, $_POST['mail_start'] + 1, $_POST['mail_start'] + $limit, $count_criteria + $added_count - $limit)); |
||||
283 | $form->addElement($sent_label); |
||||
284 | $form->addElement($inactive_hidden); |
||||
285 | $form->addElement($lastlog_min_hidden); |
||||
286 | $form->addElement($lastlog_max_hidden); |
||||
287 | $form->addElement($regd_min_hidden); |
||||
288 | $form->addElement($regd_max_hidden); |
||||
289 | $form->addElement($idle_more_hidden); |
||||
290 | $form->addElement($idle_less_hidden); |
||||
291 | $form->addElement($fname_hidden); |
||||
292 | $form->addElement($femail_hidden); |
||||
293 | $form->addElement($subject_hidden); |
||||
294 | $form->addElement($body_hidden); |
||||
295 | $form->addElement($op_hidden); |
||||
296 | $form->addElement($start_hidden); |
||||
297 | $form->addElement($mail_mailok_hidden); |
||||
298 | if (isset($_POST['mail_send_to']) && \is_array($_POST['mail_send_to'])) { |
||||
299 | foreach ($_POST['mail_send_to'] as $v) { |
||||
300 | $form->addElement(new XoopsFormHidden('mail_send_to[]', $v)); |
||||
301 | } |
||||
302 | } else { |
||||
303 | $to_hidden = new XoopsFormHidden('mail_send_to', 'mail'); |
||||
304 | $form->addElement($to_hidden); |
||||
305 | } |
||||
306 | $form->addElement($submit_button); |
||||
307 | $form->display(); |
||||
308 | } else { |
||||
309 | echo '<h4>' . _AM_SYSTEM_MAILUSERS_SENDCOMP . '</h4>'; |
||||
310 | } |
||||
311 | } else { |
||||
312 | echo '<h4>' . _AM_SYSTEM_MAILUSERS_NOUSERMATCH . '</h4>'; |
||||
313 | } |
||||
314 | } |
||||
315 | break; |
||||
316 | } |
||||
317 | // Call Footer |
||||
318 | xoops_cp_footer(); |
||||
319 |