'MEMBER_ORDER_TEST_STARTED' => "Framekiller-Test startet...",
'MEMBER_ORDER_PLEASE_WAIT_1' => "Ihre Seite wird auf Framekiller getestet. Bitte noch ",
'MEMBER_ORDER_PLEASE_WAIT_2' => " Sekunden warten.",
- 'ADMIN_LIST_NOREFS_ACCOUNTS' => "Auflistung aller Accounts ohne Werber",
'ADMIN_NO_REFERAL_LEVELS' => "In Ihrem {?mt_word?} sind keine Referal-Ebenen eingerichtet! Ihre Mitglieder erhalten <u>keine</u> {?POINTS?} gutgeschrieben. Richten Sie mindestens Referal-Ebene 0 mit 100% Vergütung ein.",
'ADMIN_SESSION_SAVE_PATH_INVALID' => "Pfad für Sitzungsdateien ungütig.",
'ADMIN_CONFIG_SESSION_TITLE' => "Einstellungen zum Sitzungsmanagement",
'ADMIN_LIST_STATUS_UNCONFIRMED_ACCOUNTS' => "Alle unbestätigten Mitglieder-Accounts auflisten",
'ADMIN_LIST_MODE_CONFIRMED_ACCOUNTS' => "Alle bestätigten Mitglieder-Accounts auflisten",
'ADMIN_LIST_MODE_NOREFS_ACCOUNTS' => "Alle Mitglieder-Accounts ohne Referals auflisten",
+ 'ADMIN_LIST_MODE_RANDOM_REFID_ACCOUNTS' => "Alle Mitglieder-Accounts für Zufallsreferal auflisten",
// Admin task lines
'ADMIN_TASK_TYPE_MEMBER_SUPPORT' => "Support-Anfrage eines Mitgliedes",
'ADMIN_TASK_CONFIRMED' => "Bestätigt",
'ADMIN_TASK_UNCONFIRMED' => "Unbestätigt",
'ADMIN_TASK_LOCKED' => "Gesperrt",
+ 'ADMIN_TASK_RANDOM_REFID' => "Zufallsreferal",
'ADMIN_TASK_NEW_TASKS' => "Ohne Zuweisung",
'ADMIN_TASK_CLOSED_TASKS' => "Geschlossen",
'ADMIN_TASK_YOUR_TASKS' => "Ihre Aufgaben",
foreach (
array(
// Member accounts
- 'confirmed_members','unconfirmed_members','locked_members',
+ 'confirmed_members','unconfirmed_members','locked_members','random_refid',
// Tasks
'update_tasks','new_tasks','closed_tasks','your_tasks','deleted_tasks','solved_tasks',
// Mail orders
$content['unconfirmed_members'] = '<a href="{%url=modules.php?module=admin&what=list_user&status=UNCONFIRMED%}">' . $value . '</a>';
} // END - if
-
// And locked accounts
$value = getTotalLockedUser();
if ($value > 0) {
$content['locked_members'] = '<a href="{%url=modules.php?module=admin&what=list_user&status=locked%}">' . $value . '</a>';
} // END - if
+ if (isExtensionInstalledAndNewer('user', '0.3.4')) {
+ // And random refid
+ $value = getTotalRandomRefidUser();
+ if ($value > 0) {
+ $content['random_refid'] = '<a href="{%url=modules.php?module=admin&what=list_user&mode=random_refid%}">' . $value . '</a>';
+ } // END - if
+ } // END - if
+
//
// Unassigned tasks
//
$MORE = '';
$colspan = 4;
-// Add random confirmed if extension version matches
-if (isExtensionInstalledAndNewer('user', '0.3.4')) {
- // Add it...
- $MORE .= ", `rand_confirmed`";
-
- // Add lock reason?
- if (isExtensionInstalledAndNewer('user', '0.3.5')) {
- // Add them...
- $MORE .= ", `lock_reason`, UNIX_TIMESTAMP(`lock_timestamp`) AS `lock_timestamp`";
- } // END - if
+// Add lock reason?
+if (isExtensionInstalledAndNewer('user', '0.3.5')) {
+ // Add them...
+ $MORE .= ", UNIX_TIMESTAMP(`lock_timestamp`) AS `lock_timestamp`";
} // END - if
// Is the extension 'country' installed?
// Does the account exists?
$result_user = SQL_QUERY_ESC("SELECT
- `userid`, `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`, `emails_received`, `mails_confirmed`".$MORE."
+ `userid`, `country`, `email`, `birth_day`, `birth_month`, `birth_year`, `last_online`, `used_points`, `emails_sent`, `joined`, `last_update`, `last_profile_sent`, `notified`, `emails_received`, `mails_confirmed`".$MORE."
FROM
`{?_MYSQL_PREFIX?}_user_data`
WHERE
// Add links to the numbers
if ($content['links'] > 0) $content['links'] = $base . '&what=list_links&userid=' . $userid . '%}">' . $content['links'] . '</a>]';
- if (isValidUserId($content['refid'])) $content['refid'] = $base . '&what=list_user&userid=' . $content['refid'] . '%}">'.$content['refid'] . '</a>]';
if ($content['refs'] > 0) $content['refs'] = $base . '&what=list_refs&userid=' . $userid . '%}">{%pipe,translateComma=' . $content['refs'] . '%}</a>]';
if ($content['cats'] > 0) $content['cats'] = $base . '&what=list_cats&userid=' . $userid . '%}">{%pipe,translateComma=' . $content['cats'] . '%}</a>]';
}
break;
+ case 'random_refid': // Users available for random referal id
+ if (!empty($whereStatement)) {
+ // Add AND statement
+ $whereStatement .= " AND `rand_confirmed` >= {?user_min_confirmed?}";
+ } else {
+ // Add WHERE statement
+ $whereStatement = " WHERE `rand_confirmed` >= {?user_min_confirmed?}";
+ }
+ break;
+
default: // Invalid list mode
- logDebugMessage(__FILE__, __LINE__, sprintf("Invalid list mode %s detected.", getRequestParameter('mode')));
+ debug_report_bug(__FILE__, __LINE__, sprintf("Invalid list mode %s detected.", getRequestParameter('mode')));
break;
} // END - switch
} // END - if
// Generate master query string
- $sql = sprintf("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 `%s` ASC",
+ $sql = sprintf("SELECT `userid`, `email`, `emails_sent`, `mails_confirmed`, `emails_received`" . $MORE . " FROM `{?_MYSQL_PREFIX?}_user_data`" . $whereStatement . " ORDER BY `%s` ASC",
getRequestParameter('sortby')
);
}
// Calculate sum (default) or count records of given criteria
-function countSumTotalData ($search, $tableName, $lookFor = 'id', $whereStatement = 'userid', $countRows = false, $add = '') {
+function countSumTotalData ($search, $tableName, $lookFor = 'id', $whereStatement = 'userid', $countRows = false, $add = '', $mode = '=') {
// Init count/sum
$data['res'] = '0';
if ($countRows === true) {
// Count whole table
$result = SQL_QUERY_ESC("SELECT COUNT(`%s`) AS `res` FROM `{?_MYSQL_PREFIX?}_%s`".$add,
- array($lookFor, $tableName), __FUNCTION__, __LINE__);
+ array(
+ $lookFor,
+ $tableName
+ ), __FUNCTION__, __LINE__);
} else {
// Sum whole table
$result = SQL_QUERY_ESC("SELECT SUM(`%s`) AS `res` FROM `{?_MYSQL_PREFIX?}_%s`".$add,
- array($lookFor, $tableName), __FUNCTION__, __LINE__);
+ array(
+ $lookFor,
+ $tableName
+ ), __FUNCTION__, __LINE__);
}
} elseif (($countRows === true) || ($lookFor == 'userid')) {
// Count rows
//* DEBUG: */ debugOutput('COUNT!');
- $result = SQL_QUERY_ESC("SELECT COUNT(`%s`) AS `res` FROM `{?_MYSQL_PREFIX?}_%s` WHERE `%s`='%s'".$add,
- array($lookFor, $tableName, $whereStatement, $search), __FUNCTION__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT COUNT(`%s`) AS `res` FROM `{?_MYSQL_PREFIX?}_%s` WHERE `%s`%s'%s'".$add,
+ array(
+ $lookFor,
+ $tableName,
+ $whereStatement,
+ $mode,
+ $search
+ ), __FUNCTION__, __LINE__);
} else {
// Add all rows
//* DEBUG: */ debugOutput('SUM!');
- $result = SQL_QUERY_ESC("SELECT SUM(`%s`) AS `res` FROM `{?_MYSQL_PREFIX?}_%s` WHERE `%s`='%s'".$add,
- array($lookFor, $tableName, $whereStatement, $search), __FUNCTION__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT SUM(`%s`) AS `res` FROM `{?_MYSQL_PREFIX?}_%s` WHERE `%s`%s'%s'".$add,
+ array(
+ $lookFor,
+ $tableName,
+ $whereStatement,
+ $mode,
+ $search
+ ), __FUNCTION__, __LINE__);
}
// Load row
return $GLOBALS[__FUNCTION__];
}
+// "Getter" for total locked user accounts
+function getTotalRandomRefidUser () {
+ // Is it cached?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Then do it
+ if (isExtensionInstalledAndNewer('user', '0.3.4')) {
+ $GLOBALS[__FUNCTION__] = countSumTotalData('{?user_min_confirmed?}', 'user_data', 'userid', 'rand_confirmed', true, '', '>=');
+ } else {
+ $GLOBALS[__FUNCTION__] = 0;
+ }
+ } // END - if
+
+ // Return cached value
+ return $GLOBALS[__FUNCTION__];
+}
+
// Is given userid valid?
function isValidUserId ($userid) {
// Do we have cache?
</tr>
<tr>
<td align="center" class="bottom right {%template,ColorSwitch%}">{%pipe,generateUserProfileLink=$content[userid]%}</td>
- <td align="center" class="bottom right {%template,ColorSwitch%}">{%pipe,translateGender=$content[gender]%}</td>
- <td align="center" class="bottom right {%template,ColorSwitch%}">$content[surname]</td>
- <td align="center" class="bottom right {%template,ColorSwitch%}">$content[family]</td>
+ <td align="center" class="bottom right {%template,ColorSwitch%}">{%user,gender,translateGender=$content[userid]%}</td>
+ <td align="center" class="bottom right {%template,ColorSwitch%}">{%user,surname=$content[userid]%}</td>
+ <td align="center" class="bottom right {%template,ColorSwitch%}">{%user,family=$content[userid]%}</td>
<td align="center" class="bottom {%template,ColorSwitch%}">{%user,nickname,fixEmptyContentToDashes=$content[userid]%}</td>
</tr>
<tr>
</tr>
<tr>
<td align="center" class="right {%template,ColorSwitch%} bottom">$content[email]</td>
- <td align="center" class="right {%template,ColorSwitch%} bottom">$content[REMOTE_ADDR]</td>
- <td align="center" class="right {%template,ColorSwitch%} bottom">{%pipe,generateUserProfileLink=$content[refid]%}</td>
- <td align="center" class="right {%template,ColorSwitch%} bottom">{%pipe,translateUserStatus=$content[status]%}</td>
+ <td align="center" class="right {%template,ColorSwitch%} bottom">{%user,REMOTE_ADDR=$content[userid]%}</td>
+ <td align="center" class="right {%template,ColorSwitch%} bottom">{%user,refid,generateUserProfileLink=$content[userid]%}</td>
+ <td align="center" class="right {%template,ColorSwitch%} bottom">{%user,status,translateUserStatus=$content[userid]%}</td>
<td align="center" class="{%template,ColorSwitch%} bottom">$content[links]</td>
</tr>
<tr>
<td align="center" class="right {%template,ColorSwitch%}"><strong>{--LOCK_REASON--}:</strong></td>
<td align="center" class="right {%template,ColorSwitch%}"><strong>{--LOCK_TIMESTAMP--}:</strong></td>
<td align="center" class="right {%template,ColorSwitch%}"><strong>{--OWN_POINTS--}:</strong></td>
- <td align="center" class="right {%template,ColorSwitch%}"><strong>{--_UNUSED--}:</strong></td>
+ <td align="center" class="right {%template,ColorSwitch%}"><strong>{--RAND_CONFIRMED--}:</strong></td>
<td align="center" class="{%template,ColorSwitch%}"><strong>{--_UNUSED--}:</strong></td>
</tr>
<tr>
- <td align="center" class="right {%template,ColorSwitch%} bottom">{%pipe,fixEmptyContentToDashes=$content[lock_reason]%}</td>
+ <td align="center" class="right {%template,ColorSwitch%} bottom">{%user,lock_reason,fixEmptyContentToDashes=$content[userid]%}</td>
<td align="center" class="right {%template,ColorSwitch%} bottom">$content[lock_timestamp]</td>
<td align="center" class="right {%template,ColorSwitch%} bottom">{%pipe,translateComma=$content[own_points]%}</td>
- <td align="center" class="right {%template,ColorSwitch%} bottom">---</td>
+ <td align="center" class="right {%template,ColorSwitch%} bottom">{%user,rand_confirmed,translateComma=$content[userid]%}</td>
<td align="center" class="{%template,ColorSwitch%} bottom">---</td>
</tr>
<tr>
</td>
</tr>
<tr>
- <td align="right" class="admin_task_left switch_sw2">{--ADMIN_TASK_LOCKED--}:</td>
- <td align="center" class="admin_task_right switch_sw2">
+ <td align="right" class="admin_task_left switch_sw2 bottom">{--ADMIN_TASK_LOCKED--}:</td>
+ <td align="center" class="admin_task_right switch_sw2 bottom">
<strong>$content[locked_members]</strong>
</td>
</tr>
+ <tr>
+ <td align="right" class="admin_task_left switch_sw1">{--ADMIN_TASK_RANDOM_REFID--}:</td>
+ <td align="center" class="admin_task_right switch_sw1">
+ <strong>$content[random_refid]</strong>
+ </td>
+ </tr>
</table>
</td>
<td align="center" valign="top">
<tr>
<td align="center" width="25%" class="top right">
{--GENDER--}:<br />
- <strong>{%pipe,translateGender=$content[gender]%}</strong>
+ <strong>{%user,gender,translateGender=$content[userid]%}</strong>
</td>
<td align="center" width="25%" class="top right">
{--SURNAME--}:<br />
- <strong>$content[surname]</strong>
+ <strong>{%user,surname=$content[userid]%}</strong>
</td>
<td align="center" width="25%" class="top right">
{--FAMILY--}:<br />
- <strong>$content[family]</strong>
+ <strong>{%user,family=$content[userid]%}</strong>
</td>
<td align="center" width="25%" class="top">
{--STREET_NR--}:<br />
- <strong>$content[street_nr]</strong>
+ <strong>{%user,street_nr=$content[userid]%}</strong>
</td>
</tr>
<tr>
</td>
<td align="center" class="top right">
{--ZIP--}:<br />
- <strong>$content[zip]</strong>
+ <strong>{%user,zip,bigintval=$content[userid]%}</strong>
</td>
<td align="center" class="top">
{--CITY--}:<br />
- <strong>$content[city]</strong>
+ <strong>{%user,city=$content[userid]%}</strong>
</td>
</tr>
<tr>
</td>
<td align="center" class="top right">
{--ACCOUNT_STATUS--}:<br />
- <strong>{%pipe,translateUserStatus=$content[status]%}</strong>
+ <strong>{%user,status,translateUserStatus=$content[userid]%}</strong>
</td>
<td align="center" class="top right">
{--RECEIVE_MAILS--}:<br />
- <strong>$content[receive_mails]</strong>
+ <strong>{%user,receive_mails,translateComma=$content[userid]%}</strong>
</td>
<td align="center" class="top">
{--MAX_PER_DAY--}:<br />
- <strong>$content[max_mails]</strong>
+ <strong>{%user,max_mails,translateComma=$content[userid]%}</strong>
</td>
</tr>
<tr>
<td align="center" class="top right">
{--REFERAL_USERID--}:<br />
- <strong>$content[refid]</strong>
+ <strong>{%user,refid,generateUserProfileLink=$content[userid]%}</strong>
</td>
<td align="center" class="top right">
{--REFERAL_CLICKS--}:<br />
- <strong>$content[ref_clicks]</strong>
+ <strong>{%user,ref_clicks,translateComma=$content[userid]%}</strong>
</td>
<td align="center" class="top right">
{--TOTAL_LOGINS--}:<br />
- <strong>$content[total_logins]</strong>
+ <strong>{%user,total_logins,translateComma=$content[userid]%}</strong>
</td>
<td align="center" class="top">
{--REMOTE_IP--}:<br />
- <strong>$content[REMOTE_ADDR]</strong>
+ <strong>{%user,REMOTE_ADDR=$content[userid]%}</strong>
</td>
</tr>
<tr>
</td>
<td align="center" class="top right">
{--ADMIN_LAST_MODULE--}:<br />
- <strong>{%pipe,fixEmptyContentToDashes=$content[last_module]%}</strong>
+ <strong>{%user,last_module,fixEmptyContentToDashes=$content[userid]%}</strong>
</td>
<td align="center" class="top right">
{--HAS_JOINED--}:<br />
</td>
<td align="center" class="top right">
{--RAND_CONFIRMED--}:<br />
- <strong>{%pipe,translateComma=$content[rand_confirmed]%}</strong>
+ <strong>{%user,rand_confirmed,translateComma=$content[userid]%}</strong>
</td>
<td align="center" class="top right">
{--LOCK_TIMESTAMP--}:<br />
</td>
<td align="center" class="top">
{--LOCK_REASON--}:<br />
- <strong>{%pipe,fixEmptyContentToDashes=$content[lock_reason]%}</strong>
+ <strong>{%user,lock_reason,fixEmptyContentToDashes=$content[userid]%}</strong>
</td>
</tr>
<tr>
<tr>
<td align="center" class="top right">
{--ADMIN_USER_REFERAL_PAYOUT--}:<br />
- <strong>$content[ref_payout]</strong>
+ <strong>{%user,ref_payout,translateComma=$content[userid]%}</strong>
</td>
<td align="center" class="top right">
{--USER_NICKNAME--}:<br />
</td>
<td align="center" class="top">
{--EMAILS_RECEIVED--}:<br />
- <strong>{%pipe,translateComma=$content[emails_received]%}</strong>
+ <strong>{%user,emails_received,translateComma=$content[userid]%}</strong>
</td>
</tr>
<tr>
<td align="center" class="top right">
{--MAILS_CONFIRMED--}:<br />
- <strong>{%pipe,translateComma=$content[mails_confirmed]%}</strong>
+ <strong>{%user,mails_confirmed,translateComma=$content[userid]%}</strong>
</td>
<td align="center" class="top right">
{--_UNUSED--}:<br />