function getTitleFromMenu ($mode, $what, $column = 'what', $ADD='') {
// Fix empty 'what'
if (empty($what)) {
function getTitleFromMenu ($mode, $what, $column = 'what', $ADD='') {
// Fix empty 'what'
if (empty($what)) {
if (isAdmin()) $ADD = '';
$dummy = substr($search, 0, -4);
if (isAdmin()) $ADD = '';
$dummy = substr($search, 0, -4);
array($mode), __FUNCTION__, __LINE__);
//* DEBUG: */ debugOutput(__LINE__.'/'.$main_cnt.':'.getWhat().'*');
array($mode), __FUNCTION__, __LINE__);
//* DEBUG: */ debugOutput(__LINE__.'/'.$main_cnt.':'.getWhat().'*');
// There are menus available, so we simply display them... :)
$GLOBALS['rows'] = '';
while ($content = SQL_FETCHARRAY($result_main)) {
// There are menus available, so we simply display them... :)
$GLOBALS['rows'] = '';
while ($content = SQL_FETCHARRAY($result_main)) {
array($mode, $content['action']), __FUNCTION__, __LINE__);
// Do we have some entries?
array($mode, $content['action']), __FUNCTION__, __LINE__);
// Do we have some entries?
* userid = Referal id wich should receive...
* points = ... xxx points
* sendNotify = shall I send the referal an email or not?
* userid = Referal id wich should receive...
* points = ... xxx points
* sendNotify = shall I send the referal an email or not?
* locked = Shall I pay it to normal (false) or locked (true) points ammount?
* add_mode = Add points only to $userid or also refs? (WARNING! Changing 'ref' to 'direct'
* for default value will cause no referal will get points ever!!!)
*/
* locked = Shall I pay it to normal (false) or locked (true) points ammount?
* add_mode = Add points only to $userid or also refs? (WARNING! Changing 'ref' to 'direct'
* for default value will cause no referal will get points ever!!!)
*/
-function addPointsThroughReferalSystem ($subject, $userid, $points, $sendNotify = false, $rid = '0', $locked = false, $add_mode = 'ref') {
+function addPointsThroughReferalSystem ($subject, $userid, $points, $sendNotify = false, $refid = '0', $locked = false, $add_mode = 'ref') {
//* DEBUG: */ debugOutput('----------------------- <font color="#00aa00">' . __FUNCTION__ . ' - ENTRY</font> ------------------------<ul><li>');
// Convert mode to lower-case
$add_mode = strtolower($add_mode);
//* DEBUG: */ debugOutput('----------------------- <font color="#00aa00">' . __FUNCTION__ . ' - ENTRY</font> ------------------------<ul><li>');
// Convert mode to lower-case
$add_mode = strtolower($add_mode);
// Then let's credit him here...
//* DEBUG: */ debugOutput(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__ . '</font>):userid='.$userid.',ref='.getUserData('refid').',points='.$points.' - ADVANCE!');
addPointsThroughReferalSystem(sprintf("%s_ref:%s", $subject, $GLOBALS['ref_level']), getUserData('refid'), $points, $sendNotify, getUserData('refid'), $locked);
// Then let's credit him here...
//* DEBUG: */ debugOutput(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__ . '</font>):userid='.$userid.',ref='.getUserData('refid').',points='.$points.' - ADVANCE!');
addPointsThroughReferalSystem(sprintf("%s_ref:%s", $subject, $GLOBALS['ref_level']), getUserData('refid'), $points, $sendNotify, getUserData('refid'), $locked);
// Found data so add them as OPTION lines: $id is the value and $name is the "name" of the option
// @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
while (list($value, $title, $add) = SQL_FETCHROW($result)) {
// Found data so add them as OPTION lines: $id is the value and $name is the "name" of the option
// @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
while (list($value, $title, $add) = SQL_FETCHROW($result)) {
- $totalUsers = countSumTotalData('CONFIRMED', 'user_data', 'userid', 'status', true, ' AND max_mails > 0');
-
- if ($totalUsers >= getConfig('activate_xchange')) {
+ if (getTotalConfirmedUser() >= getConfig('activate_xchange')) {
// Activate System
setSqlsArray(array(
"UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N', `hidden`='N', `mem_only`='Y' WHERE `module`='order' LIMIT 1",
// Activate System
setSqlsArray(array(
"UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N', `hidden`='N', `mem_only`='Y' WHERE `module`='order' LIMIT 1",
// Now a mail to the user and that's all...
$message = loadEmailTemplate('del-user', $data, $userid);
// Now a mail to the user and that's all...
$message = loadEmailTemplate('del-user', $data, $userid);
// Is ext-sql_patches installed and newer than 0.0.5?
if (isExtensionInstalledAndNewer('sql_patches', '0.0.5')) {
// Use it from config
// Is ext-sql_patches installed and newer than 0.0.5?
if (isExtensionInstalledAndNewer('sql_patches', '0.0.5')) {
// Use it from config
), __FUNCTION__, __LINE__);
// Are there some entries?
), __FUNCTION__, __LINE__);
// Are there some entries?
// Get unconfirmed mails
$row['unconfirmed'] = countSumTotalData($row['refid'], 'user_links', 'id', 'userid', true);
// Get unconfirmed mails
$row['unconfirmed'] = countSumTotalData($row['refid'], 'user_links', 'id', 'userid', true);
array($column, bigintval($id), $count), __FUNCTION__, __LINE__);
// Are there entries?
array($column, bigintval($id), $count), __FUNCTION__, __LINE__);
// Are there entries?