]> git.mxchange.org Git - mailer.git/blobdiff - 0.2.1/inc/modules/member/what-stats.php
win32 to unix line delimiters changed
[mailer.git] / 0.2.1 / inc / modules / member / what-stats.php
index 07421b6af76fed691eb195ee53cdc9a1a8037099..f71f622608a9edea7ec2d4fd77b677b1b73b329d 100644 (file)
@@ -1,95 +1,95 @@
-<?php\r
-/************************************************************************\r
- * MXChange v0.2.1                                    Start: 11/09/2003 *\r
- * ===============                              Last change: 04/21/2004 *\r
- *                                                                      *\r
- * -------------------------------------------------------------------- *\r
- * File              : what-stats.php                                   *\r
- * -------------------------------------------------------------------- *\r
- * Short description : Statistics over send mails                       *\r
- * -------------------------------------------------------------------- *\r
- * Kurzbeschreibung  : Statistik ueber gesendete Mails                  *\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']))\r
-{\r
-       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";\r
-       require($INC);\r
-}\r
- elseif (!IS_LOGGED_IN())\r
-{\r
-       LOAD_URL(URL."/modules.php?module=index");\r
-}\r
-\r
-// Add description as navigation point\r
-ADD_DESCR("member", basename(__FILE__));\r
-\r
-//                               0     1         2         3      4            5            6            7           8\r
-$result = SQL_QUERY_ESC("SELECT id, cat_id, payment_id, subject, url, timestamp_ordered, max_rec, timestamp_send, clicks\r
-FROM "._MYSQL_PREFIX."_user_stats\r
-WHERE userid=%d ORDER BY timestamp_ordered DESC",\r
- array($GLOBALS['userid']), __FILE__, __LINE__);\r
-\r
-if (SQL_NUMROWS($result) > 0)\r
-{\r
-       // Mail orders are in pool so we can display them\r
-       $SW = 2; $OUT = "";\r
-       while ($pool = SQL_FETCHROW($result))\r
-       {\r
-               // Prepare data for the template\r
-               $content = array(\r
-                       'sw'    => $SW,\r
-                       'cat'   => GET_CATEGORY(bigintval($pool[1])),\r
-                       'pay'   => GET_PAYMENT(bigintval($pool[2])),\r
-                       'subj'  => COMPILE_CODE($pool[3]),\r
-                       'url'   => DEREFERER($pool[4]),\r
-                       'stamp' => MAKE_DATETIME($pool[5], "0"),\r
-                       'recs'  => $pool[6],\r
-                       'sent'  => MAKE_DATETIME($pool[7], "0"),\r
-                       'clix'  => $pool[8],\r
-                       'perc'  => COMPILE_CODE($pool[8] / $pool[6] * 100)."%",\r
-               );\r
-\r
-               // Load row template and switch colors\r
-               $OUT .= LOAD_TEMPLATE("member_stats_row", true, $content);\r
-               $SW = 3 - $SW;\r
-       }\r
-\r
-       // Free memory\r
-       SQL_FREERESULT($result);\r
-\r
-       // Remember rows in template\r
-       define('__STATS_ROWS', $OUT);\r
-\r
-       // Load main template\r
-       LOAD_TEMPLATE("member_stats_table");\r
-}\r
- else\r
-{\r
-       // No mail orders fond\r
-       LOAD_TEMPLATE("admin_settings_saved", false, MEMBER_NO_MAILS_IN_POOL);\r
-}\r
-\r
-//\r
-?>\r
+<?php
+/************************************************************************
+ * MXChange v0.2.1                                    Start: 11/09/2003 *
+ * ===============                              Last change: 04/21/2004 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : what-stats.php                                   *
+ * -------------------------------------------------------------------- *
+ * Short description : Statistics over send mails                       *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Statistik ueber gesendete Mails                  *
+ * -------------------------------------------------------------------- *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * 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']))
+{
+       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
+       require($INC);
+}
+ elseif (!IS_LOGGED_IN())
+{
+       LOAD_URL(URL."/modules.php?module=index");
+}
+
+// Add description as navigation point
+ADD_DESCR("member", basename(__FILE__));
+
+//                               0     1         2         3      4            5            6            7           8
+$result = SQL_QUERY_ESC("SELECT id, cat_id, payment_id, subject, url, timestamp_ordered, max_rec, timestamp_send, clicks
+FROM "._MYSQL_PREFIX."_user_stats
+WHERE userid=%d ORDER BY timestamp_ordered DESC",
+ array($GLOBALS['userid']), __FILE__, __LINE__);
+
+if (SQL_NUMROWS($result) > 0)
+{
+       // Mail orders are in pool so we can display them
+       $SW = 2; $OUT = "";
+       while ($pool = SQL_FETCHROW($result))
+       {
+               // Prepare data for the template
+               $content = array(
+                       'sw'    => $SW,
+                       'cat'   => GET_CATEGORY(bigintval($pool[1])),
+                       'pay'   => GET_PAYMENT(bigintval($pool[2])),
+                       'subj'  => COMPILE_CODE($pool[3]),
+                       'url'   => DEREFERER($pool[4]),
+                       'stamp' => MAKE_DATETIME($pool[5], "0"),
+                       'recs'  => $pool[6],
+                       'sent'  => MAKE_DATETIME($pool[7], "0"),
+                       'clix'  => $pool[8],
+                       'perc'  => COMPILE_CODE($pool[8] / $pool[6] * 100)."%",
+               );
+
+               // Load row template and switch colors
+               $OUT .= LOAD_TEMPLATE("member_stats_row", true, $content);
+               $SW = 3 - $SW;
+       }
+
+       // Free memory
+       SQL_FREERESULT($result);
+
+       // Remember rows in template
+       define('__STATS_ROWS', $OUT);
+
+       // Load main template
+       LOAD_TEMPLATE("member_stats_table");
+}
+ else
+{
+       // No mail orders fond
+       LOAD_TEMPLATE("admin_settings_saved", false, MEMBER_NO_MAILS_IN_POOL);
+}
+
+//
+?>