]> git.mxchange.org Git - mailer.git/blobdiff - 0.2.1/inc/modules/admin/what-list_newsletter.php
win32 to unix line delimiters changed
[mailer.git] / 0.2.1 / inc / modules / admin / what-list_newsletter.php
index a9c6948bc5af9a7e8337e0625be205f24a45fac1..58c998be0ac508b01970939e91cb14f9f7a40a02 100644 (file)
@@ -1,68 +1,68 @@
-<?php\r
-/************************************************************************\r
- * MXChange v0.2.1                                    Start: 03/04/2005 *\r
- * ===============                              Last change: 03/05/2005 *\r
- *                                                                      *\r
- * -------------------------------------------------------------------- *\r
- * File              : what-list_newsletter.php                         *\r
- * -------------------------------------------------------------------- *\r
- * Short description : Handle HTML or text newsletter                   *\r
- * -------------------------------------------------------------------- *\r
- * Kurzbeschreibung  : Verwalten von HTML- oder Text-Newslettern        *\r
- * -------------------------------------------------------------------- *\r
- *                                                                      *\r
- * -------------------------------------------------------------------- *\r
- * Copyright (c) 2003 - 2008 by Roland Haeder                           *\r
- * For more information visit: http://www.mxchange.org                  *\r
- *                                                                      *\r
- * This program is free software; you can redistribute it and/or modify *\r
- * it under the terms of the GNU General Public License as published by *\r
- * the Free Software Foundation; either version 2 of the License, or    *\r
- * (at your option) any later version.                                  *\r
- *                                                                      *\r
- * This program is distributed in the hope that it will be useful,      *\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of       *\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *\r
- * GNU General Public License for more details.                         *\r
- *                                                                      *\r
- * You should have received a copy of the GNU General Public License    *\r
- * along with this program; if not, write to the Free Software          *\r
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *\r
- * MA  02110-1301  USA                                                  *\r
- ************************************************************************/\r
-\r
-// Some security stuff...\r
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))\r
-{\r
-       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";\r
-       require($INC);\r
-}\r
-\r
-// Add description as navigation point\r
-ADD_DESCR("admin", basename(__FILE__));\r
-\r
-if ((!empty($_POST['uid'])) && (!empty($_POST['id'])))\r
-{\r
-       // Update database...\r
-       // First user's account\r
-       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET nl_until='".time()."+nl_timespan', nl_receive='N', nl_timespan='0' WHERE userid=%d LIMIT 1",\r
-        array(bigintval($_POST['uid'])), __FILE__, __LINE__);\r
-\r
-       // Next the task system...\r
-       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_task_system SET status='SOLVED' WHERE id=%d LIMIT 1",\r
-        array(bigintval($_POST['id'])), __FILE__, __LINE__);\r
-\r
-       // Send mail to user\r
-       $msg = LOAD_EMAIL_TEMPLATE("member_newsletter_done", true, bigintval($_POST['uid']));\r
-       SEND_EMAIL(bigintval($_POST['uid']), NL_MEMBER_DONE_SUBJECT, $msg);\r
-\r
-       // Output message to admin\r
-       LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_NL_MEMBER_DONE);\r
-}\r
- else\r
-{\r
-       // Currently under construction!\r
-       LOAD_TEMPLATE("admin_settings_saved", false, UNDER_CONSTRUCTION);\r
-}\r
-//\r
-?>\r
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 03/04/2005 *
+ * ===============                              Last change: 03/05/2005 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : what-list_newsletter.php                         *
+ * -------------------------------------------------------------------- *
+ * Short description : Handle HTML or text newsletter                   *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Verwalten von HTML- oder Text-Newslettern        *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2008 by Roland Haeder                           *
+ * For more information visit: http://www.mxchange.org                  *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) || (!IS_ADMIN()))
+{
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+
+// Add description as navigation point
+ADD_DESCR("admin", basename(__FILE__));
+
+if ((!empty($_POST['uid'])) && (!empty($_POST['id'])))
+{
+       // Update database...
+       // First user's account
+       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET nl_until='".time()."+nl_timespan', nl_receive='N', nl_timespan='0' WHERE userid=%d LIMIT 1",
+        array(bigintval($_POST['uid'])), __FILE__, __LINE__);
+
+       // Next the task system...
+       $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_task_system SET status='SOLVED' WHERE id=%d LIMIT 1",
+        array(bigintval($_POST['id'])), __FILE__, __LINE__);
+
+       // Send mail to user
+       $msg = LOAD_EMAIL_TEMPLATE("member_newsletter_done", true, bigintval($_POST['uid']));
+       SEND_EMAIL(bigintval($_POST['uid']), NL_MEMBER_DONE_SUBJECT, $msg);
+
+       // Output message to admin
+       LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_NL_MEMBER_DONE);
+}
+ else
+{
+       // Currently under construction!
+       LOAD_TEMPLATE("admin_settings_saved", false, UNDER_CONSTRUCTION);
+}
+//
+?>