mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 20:17:24 +08:00
fix massmail
This commit is contained in:
+5
-5
@@ -7,13 +7,13 @@ stderr("Error", "Permission denied.");
|
|||||||
$class = intval($_POST["class"] ?? 0);
|
$class = intval($_POST["class"] ?? 0);
|
||||||
if ($class)
|
if ($class)
|
||||||
int_check($class,true);
|
int_check($class,true);
|
||||||
$or = $_POST["or"] ?? '';
|
|
||||||
if (!in_array($or, ["<", ">", "=", "<=", ">="], true)) {
|
|
||||||
stderr("Error", "Invalid symbol!");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($_SERVER["REQUEST_METHOD"] == "POST")
|
if ($_SERVER["REQUEST_METHOD"] == "POST")
|
||||||
{
|
{
|
||||||
|
$or = $_POST["or"] ?? '';
|
||||||
|
if (!in_array($or, ["<", ">", "=", "<=", ">="], true)) {
|
||||||
|
stderr("Error", "Invalid symbol!");
|
||||||
|
}
|
||||||
$res = sql_query("SELECT id, username, email FROM users WHERE class $or ".mysql_real_escape_string($class)) or sqlerr(__FILE__, __LINE__);
|
$res = sql_query("SELECT id, username, email FROM users WHERE class $or ".mysql_real_escape_string($class)) or sqlerr(__FILE__, __LINE__);
|
||||||
|
|
||||||
$subject = substr(htmlspecialchars(trim($_POST["subject"])), 0, 80);
|
$subject = substr(htmlspecialchars(trim($_POST["subject"])), 0, 80);
|
||||||
@@ -33,7 +33,7 @@ $message = "Message received from ".$SITENAME." on " . date("Y-m-d H:i:s") . ".\
|
|||||||
$message1 . "\n\n" .
|
$message1 . "\n\n" .
|
||||||
"---------------------------------------------------------------------\n$SITENAME\n";
|
"---------------------------------------------------------------------\n$SITENAME\n";
|
||||||
|
|
||||||
$success = sent_mail($to,$SITENAME,$SITEEMAIL,$subject,$message,"Mass Mail",false);
|
$success = sent_mail($to,$SITENAME,$SITEEMAIL,$subject,$message,"Mass Mail",false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user