// Set title according to the "mode"
$eval = sprintf("\$listHeader = ADMIN_LIST_%s_ACCOUNTS;", strtoupper(SQL_ESCAPE($_GET['mode'])));
eval($eval);
-}
+} // END - if
// Remember it
define('__TITLE', $listHeader);
if (empty($_GET['page'])) { $_GET['page'] = "1"; }
// Set base URL
-$BASE = "<A href=\"".URL."/modules.php?module=admin";
+$BASE = "[<A href=\"".URL."/modules.php?module=admin";
-if (!empty($_GET['u_id']))
-{
+if (!empty($_GET['u_id'])) {
// Secure the user ID
$uid = bigintval($_GET['u_id']);
- // Does the account exists? 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
+ // Does the account exists? 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
$result = SQL_QUERY_ESC("SELECT gender, surname, family, street_nr, zip, city, country, email, birth_day, birth_month, birth_year, max_mails, receive_mails, refid, status, REMOTE_ADDR, last_online, last_module, ref_clicks, total_logins, used_points, emails_sent, joined, last_update, last_profile_sent, notified, ref_payout".$MORE."
FROM "._MYSQL_PREFIX."_user_data
WHERE userid=%s LIMIT 1",
array($uid), __FILE__, __LINE__);
- if (SQL_NUMROWS($result) == 1)
- {
+ if (SQL_NUMROWS($result) == 1) {
// Account found!
$DATA = SQL_FETCHROW($result);
SQL_FREERESULT($result);
$CATS = GET_TOTAL_DATA($uid, "user_cats", "id", "userid", true);
$LINKS = GET_TOTAL_DATA($uid, "user_links", "id", "userid", true);
- if ($LINKS > 0) $LINKS = $BASE."&what=list_links&u_id=".$uid."\">".$LINKS."</A>";
- if ($DATA[13] > 0) $DATA[13] = str_replace(("u_id=".$uid), ("u_id=".$DATA[13]), $BASE."&what=list_user\">".$DATA[13]."</A>");
+ if ($LINKS > 0) $LINKS = $BASE."&what=list_links&u_id=".$uid."\">".$LINKS."</A>]";
+ if ($DATA[13] > 0) $DATA[13] = str_replace(("u_id=".$uid), ("u_id=".$DATA[13]), $BASE."&what=list_user\">".$DATA[13]."</A>]");
if (empty($DATA[17])) $DATA[17] = "---";
- if ($REFS > 0) $REFS = $BASE."&what=list_refs&u_id=".$uid."\">".$REFS."</A></STRONG>";
- if ($CATS > 0) $CATS = $BASE."&what=list_cats&u_id=".$uid."\">".$CATS."</A>";
+ if ($REFS > 0) $REFS = $BASE."&what=list_refs&u_id=".$uid."\">".$REFS."</A>]";
+ if ($CATS > 0) $CATS = $BASE."&what=list_cats&u_id=".$uid."\">".$CATS."</A>]";
// Prepare data for template
define('_BIRTHDAY', MAKE_DATETIME(mktime(0, 0, 0, $DATA[9], $DATA[8], $DATA[10]), "3"));
$DATA[14] = TRANSLATE_STATUS($DATA[14]);
$DATA[16] = MAKE_DATETIME($DATA[16], "0");
$DATA[20] = TRANSLATE_COMMA($DATA[20]);
- if ($DATA[21] > 0) $DATA[21] = $BASE."&what=email_details&u_id=".$uid."\">".$DATA[21]."</A>";
+ if ($DATA[21] > 0) $DATA[21] = $BASE."&what=email_details&u_id=".$uid."\">".TRANSLATE_COMMA($DATA[21])."</A>]";
$DATA[22] = MAKE_DATETIME($DATA[22], "0");
$DATA[23] = MAKE_DATETIME($DATA[23], "0");
$DATA[24] = MAKE_DATETIME($DATA[24], "0");
// Template laden
LOAD_TEMPLATE("admin_user_details", false, $uid);
- }
- else
- {
+ } else {
// Account does not exists!
LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_MEMBER_404_1.$uid.ADMIN_MEMBER_404_2);
}
-}
- else
-{
+} else {
$whereStatement = "";
- if (($_GET['letter'] != _ALL2) && ($_GET['letter'] != _OTHERS) && (!empty($_GET['letter'])))
- {
+ if (($_GET['letter'] != _ALL2) && ($_GET['letter'] != _OTHERS) && (!empty($_GET['letter']))) {
// List only persons w
$whereStatement = " WHERE family LIKE '".$_GET['letter']."%'";
- }
+ } // END - if
if ($_GET['sortby'] == "family_name") $_GET['sortby'] = "family";
// Parse the mode parameter
// Start a new one
$whereStatement = sprintf(" WHERE status='%s'", SQL_ESCAPE(strip_tags(strtoupper($_GET['mode']))));
}
- }
+ } // END - if
- $SQL = "SELECT userid, gender, surname, family, email, REMOTE_ADDR, refid, status".$MORE." FROM "._MYSQL_PREFIX."_user_data".$whereStatement." ORDER BY ".$_GET['sortby'];
+ $SQL = "SELECT userid, gender, surname, family, email, REMOTE_ADDR, refid, status, emails_sent, mails_confirmed, emails_received".$MORE." FROM "._MYSQL_PREFIX."_user_data".$whereStatement." ORDER BY ".$_GET['sortby'];
$result_master = SQL_QUERY($SQL, __FILE__, __LINE__);
// Calculate page count (0.5 fixes a bug with page count)
if ($_CONFIG['user_limit'] == 0) {
$_CONFIG['user_limit'] = 100;
LOAD_TEMPLATE("admin_settings_saved", false, EXTENSION_WARNING_USER_LIMIT);
- }
+ } // END - if
// Activate the extension please!
$PAGES = round(SQL_NUMROWS($result_master) / $_CONFIG['user_limit'] + 0.5);
$user_count = SQL_NUMROWS($result_user);
SQL_FREERESULT($result_user);
- if (SQL_NUMROWS($result_master) > 0)
- {
+ if (SQL_NUMROWS($result_master) > 0) {
// Free memory
SQL_FREERESULT($result_master);
}
$SW = 2; $OUT = "";
- while (list($uid, $gender, $sname, $fname, $email, $IP, $ref, $status, $nick) = SQL_FETCHROW($result))
- {
+ while (list($uid, $gender, $sname, $fname, $email, $IP, $ref, $status, $emails_sent, $mails_confirmed, $emails_received, $nick) = SQL_FETCHROW($result)) {
if ($ref > 0) $ref = ADMIN_USER_PROFILE_LINK($ref);
- $LINKS = TRANSLATE_COMMA(GET_TOTAL_DATA($uid, "user_links", "id", "userid", true));
- if ($LINKS > 0) $LINKS = $BASE."&what=list_links&u_id=".$uid."\">".$LINKS."</A>";
+ $LINKS = GET_TOTAL_DATA($uid, "user_links", "id", "userid", true);
+ $SENT = $emails_sent;
+ if ($emails_sent > 0) $SENT = $BASE."&what=email_details&u_id=".$uid."\">".TRANSLATE_COMMA($emails_sent)."</A>]";
+ if ($LINKS > 0) $LINKS = $BASE."&what=list_links&u_id=".$uid."\">".TRANSLATE_COMMA($LINKS)."</A>]";
// Add nickname
if (empty($nick) || $nick == $uid) $nick = "---";
+ // Calculate total points
+ $pointsTotal = GET_TOTAL_DATA($uid, "user_points", "points") - GET_TOTAL_DATA($uid, "user_data", "used_points");
+
+ // Clickrate
+ $clickRate = 0;
+ if ($emails_received > 0) {
+ $clickRate = $mails_confirmed / $emails_received * 100;
+ } // END - if
+
// Transfer data to array
$content = array(
'sw' => $SW,
'gender' => TRANSLATE_GENDER($gender),
'sname' => $sname,
'fname' => $fname,
- 'email' => "<A href=\"".CREATE_EMAIL_LINK($email, "user_data")."\">".$email."</A>",
+ 'email' => "<A href=\"".CREATE_EMAIL_LINK($email, "user_data")."\">".$email."</A>]",
'addr' => $IP,
'ref' => $ref,
'status' => TRANSLATE_STATUS($status),
'links' => $LINKS,
'nick' => $nick,
- 'alinks' => MEMBER_ACTION_LINKS($uid, $status)
+ 'alinks' => MEMBER_ACTION_LINKS($uid, $status),
+ 'points' => TRANSLATE_COMMA($pointsTotal),
+ 'sent' => $SENT,
+ 'rate' => TRANSLATE_COMMA($clickRate),
+ 'locked' => TRANSLATE_COMMA(GET_TOTAL_DATA($uid, "user_points", "locked_points"))
);
// Load row template and switch colors
$OUT .= LOAD_TEMPLATE("admin_list_user_row", true, $content);
$SW = 3 - $SW;
- }
+ } // END - while
// Free memory
SQL_FREERESULT($result);
// Free some memory
SQL_FREERESULT($result_master);
- }
- else
- {
+ } else {
// No one as registered so far! :-(
LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_NO_NONE_REGISTERED);
}
<TR>
<TD width="5" class="switch_sw$content[sw] top2 seperator"> </TD>
- <TD width="20%" align="center"
- class="right2 top2 switch_sw$content[sw]"><STRONG>{--_UID--}:</STRONG></TD>
- <TD width="20%" align="center"
- class="right2 top2 switch_sw$content[sw]"><STRONG>{--GENDER--}:</STRONG></TD>
- <TD width="20%" align="center"
- class="right2 top2 switch_sw$content[sw]"><STRONG>{--SURNAME--}:</STRONG></TD>
- <TD width="20%" align="center"
- class="right2 top2 switch_sw$content[sw]"><STRONG>{--FAMILY_NAME--}:</STRONG></TD>
+ <TD width="20%" align="center" class="right2 top2 switch_sw$content[sw]"><STRONG>{--_UID--}:</STRONG></TD>
+ <TD width="20%" align="center" class="right2 top2 switch_sw$content[sw]"><STRONG>{--GENDER--}:</STRONG></TD>
+ <TD width="20%" align="center" class="right2 top2 switch_sw$content[sw]"><STRONG>{--SURNAME--}:</STRONG></TD>
+ <TD width="20%" align="center" class="right2 top2 switch_sw$content[sw]"><STRONG>{--FAMILY_NAME--}:</STRONG></TD>
<TD width="20%" align="center" class="switch_sw$content[sw] top2"><STRONG>{--USER_NICKNAME--}:</STRONG></TD>
</TR>
<TR>
<TD align="center" class="right2 switch_sw$content[sw] bottom2">$content[status]</TD>
<TD align="center" class="switch_sw$content[sw] bottom2">$content[links]</TD>
</TR>
+<TR>
+ <TD width="5" class="switch_sw$content[sw] seperator"> </TD>
+ <TD align="center" class="right2 switch_sw$content[sw]"><STRONG>{--TOTAL_POINTS--}:</STRONG></TD>
+ <TD align="center" class="right2 switch_sw$content[sw]"><STRONG>{--MAILS_SENT--}:</STRONG></TD>
+ <TD align="center" class="right2 switch_sw$content[sw]"><STRONG>{--CLICK_RATE--}:</STRONG></TD>
+ <TD align="center" class="right2 switch_sw$content[sw]"><STRONG>{--POINTS_LOCKED--}:</STRONG></TD>
+ <TD align="center" class="switch_sw$content[sw]"><STRONG>{--__UNUSED--}:</STRONG></TD>
+</TR>
+<TR>
+ <TD class="switch_sw$content[sw] seperator bottom2" width="5"> </TD>
+ <TD align="center" class="right2 switch_sw$content[sw] bottom2">$content[points] {!POINTS!}</TD>
+ <TD align="center" class="right2 switch_sw$content[sw] bottom2">$content[sent]</TD>
+ <TD align="center" class="right2 switch_sw$content[sw] bottom2">$content[rate]%</TD>
+ <TD align="center" class="right2 switch_sw$content[sw] bottom2">$content[locked] {!POINTS!}</TD>
+ <TD align="center" class="switch_sw$content[sw] bottom2">---</TD>
+</TR>
<TR>
<TD height="22" colspan="6" class="admin_title">$content[alinks]</TD>
</TR>