More queries now depends on UNIX_TIMESTAMP() SQL function, wrong index in autopurge...
[mailer.git] / inc / modules / admin / what-list_refs.php
index acfc839872e7536b12e31cd6bbf07c2baafccf37..9cb4932e9c33e8d32b1815c7e5c9172cd8193c76 100644 (file)
  ************************************************************************/
 
 // 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);
+if ((!defined('__SECURITY')) || (!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
@@ -70,7 +68,7 @@ if (!empty($_GET['u_id']))
                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=%s ORDER BY userid",
+               $result = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email, status, joined FROM "._MYSQL_PREFIX."_user_data WHERE refid=%s 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 />");
@@ -93,7 +91,7 @@ if (!empty($_GET['u_id']))
                                        $content = array(
                                                'sw'         => $SW,
                                                'u_link'     => ADMIN_USER_PROFILE_LINK($row[0]),
-                                               'salut'      => TRANSLATE_SEX($row[1]),
+                                               'gender'     => TRANSLATE_GENDER($row[1]),
                                                'refs_link'  => "0",
                                                'surname'    => $row[2],
                                                'family'     => $row[3],
@@ -135,7 +133,6 @@ if (!empty($_GET['u_id']))
        // Output selection form with all confirmed user accounts listed
        ADD_MEMBER_SELECTION_BOX();
 }
-CLOSE_TABLE();
 
 //
 ?>