branched
[mailer.git] / 0.2.1 / inc / modules / admin / what-list_refs.php
diff --git a/0.2.1/inc/modules/admin/what-list_refs.php b/0.2.1/inc/modules/admin/what-list_refs.php
deleted file mode 100644 (file)
index cc8c449..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-<?php
-/************************************************************************
- * MXChange v0.2.1                                    Start: 01/28/2004 *
- * ================                             Last change: 06/10/2004 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : what-list_refs.php                               *
- * -------------------------------------------------------------------- *
- * Short description : Show all referrals made by a member              *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Alle generierten Refs eines Mitgliedes anzeigen  *
- * -------------------------------------------------------------------- *
- *                                                                      *
- *    Mod created by : Lars Moehlenbruch ( http://www.surfo.net )       *
- *                                                                      *
- * -------------------------------------------------------------------- *
- *                                                                      *
- *                 Highly modified by Roland Haeder                     *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * 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__));
-
-OPEN_TABLE("100%", "admin_content admin_content_align", "");
-if (!empty($_GET['u_id']))
-{
-       // Check if the user already exists
-       $result = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%d LIMIT 1",
-        array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
-       if (SQL_NUMROWS($result) == 1)
-       {
-               // Free memory
-               SQL_FREERESULT($result);
-
-               // Loads surname, family's name and the email address
-               $result     = SQL_QUERY_ESC("SELECT COUNT(*) FROM "._MYSQL_PREFIX."_user_data WHERE refid=%d",
-                array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
-               $result_lck = SQL_QUERY_ESC("SELECT COUNT(*) FROM "._MYSQL_PREFIX."_user_data WHERE refid=%d AND status != 'CONFIRMED' ORDER BY userid",
-                array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
-               $menge      = SQL_RESULT($result    , 0, 0);
-               $menge_lck  = SQL_RESULT($result_lck, 0, 0);
-
-               // Free memory
-               SQL_FREERESULT($result);
-               SQL_FREERESULT($result_lck);
-
-               $result = SQL_QUERY_ESC("SELECT userid, sex, surname, family, email, status, joined FROM "._MYSQL_PREFIX."_user_data WHERE refid=%d ORDER BY userid",
-                array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
-
-               OUTPUT_HTML (ADMIN_TOTAL_REFS_1."".ADMIN_USER_PROFILE_LINK($_GET['u_id'])."".ADMIN_TOTAL_REFS_2.$menge.ADMIN_TOTAL_REFS_3.$menge_lck.ADMIN_TOTAL_REFS_4."<BR><BR>");
-               if ($result)
-               {
-                       $rows = SQL_NUMROWS($result);
-                       if ($rows > 0)
-                       {
-                               // Load all referrals
-                               $SW = "2"; $OUT = "";
-                               while ($row = SQL_FETCHROW($result))
-                               {
-                                       // Check for referrals
-                                       $result_refs = SQL_QUERY_ESC("SELECT COUNT(userid) FROM "._MYSQL_PREFIX."_user_data WHERE refid=%d",
-                                        array(bigintval($row[0])), __FILE__, __LINE__);
-                                       $refs_cnt = SQL_RESULT($result_refs, 0, 0);
-                                       SQL_FREERESULT($result_refs);
-
-                                       // Prepare data for the template
-                                       $content = array(
-                                               'sw'         => $SW,
-                                               'u_link'     => ADMIN_USER_PROFILE_LINK($row[0]),
-                                               'salut'      => TRANSLATE_SEX($row[1]),
-                                               'refs_link'  => "0",
-                                               'surname'    => $row[2],
-                                               'family'     => $row[3],
-                                               'email'      => "<A href=\"".CREATE_EMAIL_LINK($row[4], "user_data")."\">".$row[4]."</A>",
-                                               'status'     => TRANSLATE_STATUS($row[5]),
-                                               'registered' => MAKE_DATETIME($row[6], "3"),
-                                       );
-
-                                       // Check if referral count is larger 0 and update link
-                                       if ($refs_cnt > 0) $content['refs_link'] = ADMIN_USER_PROFILE_LINK($row[0], $refs_cnt, "list_refs");
-
-                                       // Load row template and switch color
-                                       $OUT .= LOAD_TEMPLATE("admin_list_refs_row", true, $content);
-                                       $SW = 3 - $SW;
-                               }
-
-                               // Free memory
-                               SQL_FREERESULT($result);
-                               define('__REF_ROWS', $OUT);
-
-                               // Load main template
-                               LOAD_TEMPLATE("admin_list_refs");
-                       }
-               }
-                else
-               {
-                       // No referrals made so far
-                       LOAD_TEMPLATE("admin_settings_saved", false, USER_REF_404);
-               }
-       }
-        else
-       {
-               // User not found
-               LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_MEMBER_404_1.$_GET['u_id'].ADMIN_MEMBER_404_2);
-       }
-}
- else
-{
-       // Output selection form with all confirmed user accounts listed
-       ADD_MEMBER_SELECTION_BOX();
-}
-CLOSE_TABLE();
-
-//
-?>