+++ /dev/null
-<?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);
-}
-
-//
-?>