From 6b15e03ac407caf4c6b5f344e20768365660f782 Mon Sep 17 00:00:00 2001 From: zlaxy Date: Sun, 20 May 2018 11:06:29 +0300 Subject: [PATCH] gbdb.csv -> .htgbdb.csv and multiemail notifications --- gbdb.csv => .htgbdb.csv | 0 LICENSE | 4 +--- index.php | 8 +++++--- settings.php | 12 +++++++----- 4 files changed, 13 insertions(+), 11 deletions(-) rename gbdb.csv => .htgbdb.csv (100%) diff --git a/gbdb.csv b/.htgbdb.csv similarity index 100% rename from gbdb.csv rename to .htgbdb.csv diff --git a/LICENSE b/LICENSE index 41b361c..15676dc 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,4 @@ -sshch - -sshch is released under the DWTW license +phpcsvguestbook is released under the DWTW license This program is free software; you can redistribute it and/or modify it under the terms of the Do What Thou Wilt License. diff --git a/index.php b/index.php index ba73f81..2b75169 100644 --- a/index.php +++ b/index.php @@ -30,9 +30,11 @@ function SendMail() { if ($GBsubjectfield) $message=$message." ".$_POST["subj"]; if ($GBcategoryfield) $message=$message." [".$_POST["category"]."]"; $message=$message.":\r\n\r\n".$_POST["text"]."\r\n\r\n_____\r\n".$Titles["MailAdmin"]; - mail($GBnotificationmailto, $Titles["MailSubject"], $message, - "From: ".$GBnotificationmailfrom." \r\n"."Content-type: text/plain; charset=utf-8\r\n" - ."X-Mailer: PHP/".phpversion()); + foreach ($GBnotificationmailto as $email) { + mail($email, $Titles["MailSubject"], $message, + "From: ".$GBnotificationmailfrom." \r\n"."Content-type: text/plain; charset=utf-8\r\n" + ."X-Mailer: PHP/".phpversion()); + } } function ReadEntries() { diff --git a/settings.php b/settings.php index 5735039..85e3f8a 100644 --- a/settings.php +++ b/settings.php @@ -6,7 +6,7 @@ * Please, change $GBadmin and $GBpassword parameters for access to administration page. */ -$GBdata="gbdb.csv"; +$GBdata=".htgbdb.csv"; $GBadmin="root"; $GBpassword="password"; @@ -37,10 +37,12 @@ $GBupload=array( // enable or disable upload feature $GBfilesize=1048576; // maximum file size // أقصى حجم ملف // максимальный размер загружаемого файла -$GBnotificationmailto=""; // leave empty if you don't want send notification - // ترك فارغة إذا كنت لا تريد إرسال إشعار - // оставьте поле пустым, если не хотите отправки уведомлений о новых записях -$GBnotificationmailfrom=""; +$GBnotificationmailto=array( // enable or disable email notifications, false - disabled, array - addresses + 0=>"somemail@mail.com", // تمكين أو تعطيل إعلامات البريد الإلكتروني، كاذبة - تعطيل، مجموعة من العناوين. + 1=>"anothermail@mail.com"); // включение или отключение уведомлений на почту, false - отключено, array - список адресов +$GBnotificationmailfrom="gb@mail.com"; // mailfrom field for notifications + // البريد من الميدان للإشعارات + // поле mailfrom для уведомленеий $GBtextlenght=7168; // maximum size of entry text // أقصى حجم نص مدخل // максимальное количество символов для текста записи