// Add points to account
unset($DEPTH);
- ADD_POINTS_REFSYSTEM($uid, $data['points'], false, "0", $locked, strtolower($_CONFIG['birthday_mode']));
+ ADD_POINTS_REFSYSTEM("birthday_confirm", $uid, $data['points'], false, "0", $locked, strtolower($_CONFIG['birthday_mode']));
// Remove entry from table
$result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_birthday WHERE userid=%s AND chk_value='%s' LIMIT 1",
array($uid, bigintval($GLOBALS['refid']), bigintval($_POST['points'] * 2)), __FILE__, __LINE__);
// Subtract entered points
- SUB_POINTS($uid, $_POST['points']);
+ SUB_POINTS("doubler", $uid, $_POST['points']);
// Add points to "total payed" including charge
$points = $_POST['points'] - $_POST['points'] * $_CONFIG['doubler_charge'];
// Exclude webmaster from doubling...
if ($uid != $_CONFIG['doubler_uid']) {
// Add points
- ADD_POINTS_REFSYSTEM($uid, $points, false, "0", false, "direct");
+ ADD_POINTS_REFSYSTEM(sprintf("doubler_%s", strtolower($_CONFIG['doubler_send_mode'])), $uid, $points, false, "0", false, "direct");
} // END - if
// Set entry as "payed"
// Exclude also webmaster's ID in taking points from webmaster's account
if (($user > 0) && ($user >= $points) && (!$OK) && ($_CONFIG['doubler_uid'] > 0) && ($uid != $_CONFIG['doubler_uid'])) {
// Add points to used points
- SUB_POINTS($_CONFIG['doubler_uid'], $points);
+ SUB_POINTS("doubler_payout", $_CONFIG['doubler_uid'], $points);
// Okay, done!
$OK = true;
// This shall never do a non-admin user!
if (!IS_ADMIN()) return false;
+ // By default the language prefix is the extension's name
+ // @TODO: Do we really need this one anymore? Can't we just take $ext_name and done?
+ $EXT_LANG_PREFIX = $ext_name;
+
// By default we have no failtures
- $EXT_REPORTS_FAILURE = true;
+ $EXT_REPORTS_FAILURE = false;
// Is this extension already installed?
if (EXT_IS_ACTIVE($ext_name)) return false;
$EXT_LOAD_MODE = "register";
// Remains true if extension registration reports no failtures
- $test = ($test && !$EXT_REPORTS_FAILTURE);
+ $test = ($test && !$EXT_REPORTS_FAILURE);
// Does everthing before wents ok?
if ($test) {
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "xxx";
-
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "active";
-
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "admins";
-
//
?>
default: // Do stuff when extension is loaded
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "admintheme";
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "admintheme";
-
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "autopurge";
-
// Keep this extension always active!
$EXT_ALWAYS_ACTIVE = "Y";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank', NULL, 'Bank-Account','N','Y', 3)";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_infos','Angebotspakete','N','Y', 1)";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_create','Konto anlegen','N','Y', 2)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_deposit','Einzahlen','N','Y', 3)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_withdraw','Auszahlen','N','Y', 4)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_deposit','Auf Konto einzahlen','N','Y', 3)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_withdraw','Vom Konto abheben','N','Y', 4)";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_output','Kontoauszug','N','Y', 5)";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_change','Paket wechseln','N','Y', 6)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_remove','Kündigen','N','Y', 7)";
+ $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_remove','Konto Kündigen','N','Y', 7)";
break;
case "remove": // Do stuff when removing extension
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "bank";
-
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "beg";
-
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "birthday";
-
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "bonus";
-
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "cache";
-
// Keep this extension always active!
$EXT_ALWAYS_ACTIVE = "Y";
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "country";
-
// Keep this extension always active!
$EXT_ALWAYS_ACTIVE = "Y";
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "debug";
-
// Keep this extension always active!
$EXT_ALWAYS_ACTIVE = "Y";
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "demo";
-
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "doubler";
-
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "holiday";
-
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "html_mail";
-
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "mailid";
-
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "maintenance";
-
// Keep this extension always active!
$EXT_ALWAYS_ACTIVE = "Y";
}
}
-// Language file prefix
-$EXT_LANG_PREFIX = "mediadata";
-
// Keep this extension always active!
$EXT_ALWAYS_ACTIVE = "Y";
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "mods";
-
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "mydata";
-
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "newsletter";
-
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "nickname";
-
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "online";
-
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "optimize";
-
// Keep this extension always active!
$EXT_ALWAYS_ACTIVE = "Y";
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "order";
-
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "other";
-
// Keep this extension always active!
$EXT_ALWAYS_ACTIVE = "Y";
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "payout";
-
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "primera";
-
// Init array
global $primera;
$primera = array();
}
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "profile";
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "rallye";
-
//
?>
$INC_POOL[] = PATH."inc/gen_refback.php";
} // END - if
-// Language file prefix (hmmm, what shall I write with SQL fixes? ;-) )
-$EXT_LANG_PREFIX = "refback";
-
// Keep this extension always active!
$EXT_ALWAYS_ACTIVE = "N";
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "register";
-
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "removeip";
-
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "repair";
-
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "rewrite";
-
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "safe";
-
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "sponsor";
-
//
?>
}
// Version number
-$EXT_VERSION = "0.5.6";
+$EXT_VERSION = "0.5.7";
// Auto-set extension version
if (!isset($EXT_VER)) $EXT_VER = $EXT_VERSION;
// Version history array (add more with , "0.1" and so on)
-$EXT_VER_HISTORY = array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.7", "0.3.8", "0.3.9", "0.4.0", "0.4.1", "0.4.2", "0.4.3", "0.4.4", "0.4.5", "0.4.6", "0.4.7", "0.4.8", "0.4.9", "0.5.0", "0.5.1", "0.5.2", "0.5.3", "0.5.4", "0.5.5", "0.5.6");
+$EXT_VER_HISTORY = array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.7", "0.3.8", "0.3.9", "0.4.0", "0.4.1", "0.4.2", "0.4.3", "0.4.4", "0.4.5", "0.4.6", "0.4.7", "0.4.8", "0.4.9", "0.5.0", "0.5.1", "0.5.2", "0.5.3", "0.5.4", "0.5.5", "0.5.6", "0.5.7");
switch ($EXT_LOAD_MODE)
{
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admin_menu_las_data";
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admin_menu_stats";
$SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_user_stats_data`";
+ $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_user_book`";
// Delete admin menu entries
$SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE
-what='theme_import' OR
-what='theme_edit' OR
-what='config_extensions' OR
-what='config_home' OR
-what='list_unconfirmed' OR
-what='config_refid' OR
-what='config_title' OR
-what='sub_points' OR
-what='config_admin' OR
-what='config_proxy' OR
-what='config_session' OR
-what='list_norefs'
-LIMIT 14";
+`what`='theme_import' OR
+`what`='theme_edit' OR
+`what`='config_extensions' OR
+`what`='config_home' OR
+`what`='list_unconfirmed' OR
+`what`='config_refid' OR
+`what`='config_title' OR
+`what`='sub_points' OR
+`what`='config_admin' OR
+`what`='config_proxy' OR
+`what`='config_session' OR
+LIMIT 13";
// Delete guest menu entries
$SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_guest_menu WHERE action='themes' LIMIT 1";
// Delete/update member menu entries
$SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE
action='themes' OR
-what='themes' OR
-what='stats2' OR
-what='reflist' OR
-(action='stats' AND (what='' OR what IS NULL)) OR
-(action='extras' AND (what='' OR what IS NULL)) OR
-(action='rals' AND (what='' OR what IS NULL)) OR
-(action='account' AND (what='' OR what IS NULL))";
+`what`='themes' OR
+`what`='stats2' OR
+`what`='reflist' OR
+(action='stats' AND (`what`='' OR what IS NULL)) OR
+(action='extras' AND (`what`='' OR what IS NULL)) OR
+(action='rals' AND (`what`='' OR what IS NULL)) OR
+(action='account' AND (`what`='' OR what IS NULL))";
$SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='main' WHERE
action='stats' OR
action='extras' OR
break;
case "0.1.1": // SQL queries for v0.1.1
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='Home-/Eingangsseite', descr='Stellen Sie hier ein, welcher Menüpunkt (what-welcome ist Standart) als Einstiegspunkt in das Menüsystem genutzt werden soll und wie die automatische Weiterleitung in der Eingangsseite funktionieren soll.' WHERE what='config_home' LIMIT 1";
+ $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='Home-/Eingangsseite', descr='Stellen Sie hier ein, welcher Menüpunkt (what-welcome ist Standart) als Einstiegspunkt in das Menüsystem genutzt werden soll und wie die automatische Weiterleitung in der Eingangsseite funktionieren soll.' WHERE `what`='config_home' LIMIT 1";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD index_delay TINYINT(3) UNSIGNED NOT NULL DEFAULT '-1'";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD index_cookie BIGINT(20) UNSIGNED NOT NULL DEFAULT '31536000'";
// Update notes (these will be set as task text!)
- $UPDATE_NOTES = "Sie können nun <A href=\"".URL."/modules.php?module=admin&what=config_home\">hier</A> die Verzögerungszeit in der <A href=\"".URL."/index.php\">Eingangsseite</A> einstellen.";
+ $UPDATE_NOTES = "Sie können nun <A href=\"".URL."/modules.php?module=admin&`what`=config_home\">hier</A> die Verzögerungszeit in der <A href=\"".URL."/index.php\">Eingangsseite</A> einstellen.";
break;
case "0.1.2": // SQL queries for v0.1.2
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','themes','Designs', 6,'Y','N')";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD curr_theme VARCHAR(255) NOT NULL DEFAULT 'default'";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD stats_limit BIGINT(20) UNSIGNED NOT NULL DEFAULT '10'";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what='config_stats' WHERE what='stats' LIMIT 1";
+ $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET `what`='config_stats' WHERE `what`='stats' LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "<OL>
break;
case "0.3.0": // SQL queries for v0.3.0
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='{!POINTS!}/Referal-Ebenen' WHERE what='config_points' LIMIT 1";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='Mailvergütungen...' WHERE what='payments' LIMIT 1";
+ $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='{!POINTS!}/Referal-Ebenen' WHERE `what`='config_points' LIMIT 1";
+ $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='Mailvergütungen...' WHERE `what`='payments' LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Zwei Menüpunkte umbenannt.";
break;
case "0.3.4": // SQL queries for v0.3.4
- // List accounts with no referal
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_norefs','Mitglieder ohne Werber','Finden Sie hier alle Mitglieder-Accounts, die von niemandem ({--MAIN_TITLE--} wird in der Mail als Werber angegebenen) geworben wurden.', 7)";
-
// Update notes (these will be set as task text!)
- $UPDATE_NOTES = "Fügt den Menüpunkt "Mitglieder ohne Werber" in die Mitglieder-Management hinzu. Mit dieser neuen Funktion können Sie nach Mitglieder-Accounts ohne Werber suchen. TODO-ID #2 CLOSED";
+ $UPDATE_NOTES = "Veraltetes Update (what=list_user&mode=noref)";
break;
case "0.3.5": // SQL queries for v0.3.5
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('rals',NULL,'Rallyes',6,'Y','N')";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('account',NULL,'Ihr Account',7,'Y','N')";
$SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET sort='8' WHERE action='themes' LIMIT 1";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='stats', sort='1', title='Klick-Mails' WHERE what='stats' LIMIT 1";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='account', sort='1', title='Designs' WHERE what='themes' LIMIT 1";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='extras', sort='3' WHERE what='reflinks' LIMIT 1";
+ $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='stats', sort='1', title='Klick-Mails' WHERE `what`='stats' LIMIT 1";
+ $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='account', sort='1', title='Designs' WHERE `what`='themes' LIMIT 1";
+ $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='extras', sort='3' WHERE `what`='reflinks' LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut.";
break;
case "0.4.0": // SQL queries for v0.4.0
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title = 'Email-Management' WHERE action = 'email' AND (what='' OR what IS NULL) LIMIT 1";
+ $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title = 'Email-Management' WHERE action = 'email' AND (`what`='' OR what IS NULL) LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Email-Verwaltung nach Email-Management umbenannt.";
$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_admin_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL";
$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_guest_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL";
$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_member_menu` CHANGE `what` `what` VARCHAR(255) NULL DEFAULT NULL";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what=NULL WHERE what=''";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET what=NULL WHERE what=''";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET what=NULL WHERE what=''";
+ $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET `what`=NULL WHERE `what`=''";
+ $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET `what`=NULL WHERE `what`=''";
+ $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET `what`=NULL WHERE `what`=''";
$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_admin_menu` DROP INDEX `what`, ADD UNIQUE (`what`)";
$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_guest_menu` DROP INDEX `what`, ADD UNIQUE (`what`)";
$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_member_menu` ADD INDEX `action` (`action`)";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Mitglieder könnnen nun z.B. in den Mail-Details zu jeder Mail sehen, wann sie diese bestätigt haben. Die neue Statistik-Tabelle ist aber universell einsetzbar.";
break;
+
+ case "0.5.7": // SQL queries for v0.5.7
+ $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='list_norefs' LIMIT 1";
+
+ // Update notes (these will be set as task text!)
+ $UPDATE_NOTES = "Auflistung der Mitglieder ohne Werber nach what=list_user&mode=norefs verschoben.";
+ break;
}
break;
break;
}
-// Language file prefix (hmmm, what shall I write with SQL fixes? ;-) )
-$EXT_LANG_PREFIX = "sql_patches";
-
// Keep this extension always active!
$EXT_ALWAYS_ACTIVE = "Y";
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "support";
-
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "surfbar";
-
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "task";
-
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "theme";
-
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "top10";
-
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "transfer";
-
//
?>
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "user";
-
// Keep this extension always active!
$EXT_ALWAYS_ACTIVE = "Y";
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "wernis";
-
// Init array
global $WERNIS;
$WERNIS = array();
break;
}
-// Language file prefix
-$EXT_LANG_PREFIX = "yoomedia";
-
// Keep this extension always active!
$EXT_ALWAYS_ACTIVE = "Y";
// Display parsing time and number of SQL queries in footer
function DISPLAY_PARSING_TIME_FOOTER() {
- global $startTime, $_CONFIG;
+ global $_CONFIG;
$endTime = microtime(true);
// Is the timer started?
define('ACCOUNT_LOCKED', "Gesperrt");
define('ACCOUNT_DELETED', "Gelöscht");
define('ADMIN_ALL_ACCOUNTS', "Alle Mitglieder-Accounts auflisten");
-define('ADMIN_LIST_LOCKED_ACCOUNTS', "Alle gesperrten Mitglieder-Accounts auflisten");
-define('ADMIN_LIST_CONFIRMED_ACCOUNTS', "Alle bestätigten Mitglieder-Accounts auflisten");
define('ADMIN_NO_NONE_REGISTERED', "Ihre Suchkriterieren ergaben keine Treffer in der Mitgliederliste. ");
define('ADMIN_MEMBER_404', "Mitglieds-Account <strong>%s</strong> existiert nicht!");
define('ADMIN_LAST_ONLINE', "Zuletzt aktiv");
define('MEMBER_REFLIST_COUNTER_1', "In dieser Ebene haben Sie <u>");
define('MEMBER_REFLIST_COUNTER_2', "</u> Mitglieder geworben.");
+// Special user lists (what=list_user)
+define('ADMIN_LIST_STATUS_LOCKED_ACCOUNTS', "Alle gesperrten Mitglieder-Accounts auflisten");
+define('ADMIN_LIST_STATUS_CONFIRMED_ACCOUNTS', "Alle bestätigten Mitglieder-Accounts auflisten");
+define('ADMIN_LIST_MODE_NOREFS_ACCOUNTS', "Alle Mitglieder-Accounts ohne Referrals auflisten");
//
?>
} else {
// Add points to account
unset($DEPTH);
- ADD_POINTS_REFSYSTEM($uid, $points, false, "0", $locked, strtolower($_CONFIG['beg_mode']));
+ ADD_POINTS_REFSYSTEM("beg", $uid, $points, false, "0", $locked, strtolower($_CONFIG['beg_mode']));
}
// Subtract begged points from member account if the admin has selected one
if ($_CONFIG['beg_uid'] > 0) {
// Subtract from this account
- SUB_POINTS($_CONFIG['beg_uid'], $points);
+ SUB_POINTS("beg_payout", $_CONFIG['beg_uid'], $points);
} // END - if
}
switch ($_CONFIG['bonus_mode'])
{
case "JACKPOT": // ... jackpot
- if ((SUB_JACKPOT($points) == -1) && ($_CONFIG['bonus_uid'] > 0))
- {
+ if ((SUB_JACKPOT($points) == -1) && ($_CONFIG['bonus_uid'] > 0)) {
// Check points amount first...
$TOTAL = GET_TOTAL_DATA($_CONFIG['bonus_uid'], "user_points", "points") - GET_TOTAL_DATA($_CONFIG['bonus_uid'], "user_data", "used_points");
- if ($TOTAL >= $points)
- {
+ if ($TOTAL >= $points) {
// Subtract points from userid's account
- SUB_POINTS($_CONFIG['bonus_uid'], $points);
- }
- }
+ SUB_POINTS("bonus_payout_jackpot", $_CONFIG['bonus_uid'], $points);
+ } // END - if
+ } // END - if
break;
case "UID": // ... userid's account
// Check his amount first
$TOTAL = GET_TOTAL_DATA($_CONFIG['bonus_uid'], "user_points", "points") - GET_TOTAL_DATA($_CONFIG['bonus_uid'], "user_data", "used_points");
- if ($TOTAL >= $points)
- {
+ if ($TOTAL >= $points) {
// Subtract points from userid's account
- SUB_POINTS($_CONFIG['bonus_uid'], $points);
- }
- else
- {
+ SUB_POINTS("bonus_payout_uid", $_CONFIG['bonus_uid'], $points);
+ } else {
// Try to subtract from jackpot
$dummy = SUB_JACKPOT($points);
}
$DATA['info'] = $prices['info'][$key];
$DATA['ref'] = $prices['ref'][$key];
+ // Default is other
+ $winnerLevel = "other";
+
+ // Determine winner level
+ if ($DATA['level'] == 1) {
+ // The winner!
+ $winnerLevel = "_gold";
+ } elseif ($DATA['level'] == 2) {
+ // The vice winner!
+ $winnerLevel = "_silver";
+ } elseif ($DATA['level'] == 3) {
+ // The bronce winner
+ $winnerLevel = "_bronce";
+ }
+
if ($DATA['points'] > 0) {
// Add points directly to user's account
- ADD_POINTS_REFSYSTEM($uid, $DATA['points'], false, "0", false, "direct");
+ ADD_POINTS_REFSYSTEM("rallye_winner" . $winnerLevel, $uid, $DATA['points'], false, "0", false, "direct");
} // END - if
if ($notify == "Y") {
}
// Add suffix to template name
- $template = "member_rallye_expired";
- if ($DATA['level'] == 1) {
- // The winner!
- $template .= "_gold";
- } elseif ($DATA['level'] == 2) {
- // The vice winner!
- $template .= "_silver";
- } elseif ($DATA['level'] == 3) {
- // The bronce winner
- $template .= "_bronce";
- }
+ $template = "member_rallye_expired".$winnerLevel;
// Load template
$msg = LOAD_EMAIL_TEMPLATE($template, $DATA, $uid);
// Add points again, but only directly
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):refback={$refback}<br />\n";
- ADD_POINTS_REFSYSTEM($uid, $refback, false, "0", false, "direct");
+ ADD_POINTS_REFSYSTEM(sprintf("refback:%s", $refid), $uid, $refback, false, "0", false, "direct");
// Reduce points if refid is found
if ($refid == $ref) {
// Remove it from the URL owner
//DEBUG_LOG(__FUNCTION__, __LINE__, "uid=".SURFBAR_GET_USERID().",costs=".SURFBAR_GET_COSTS()."", false);
if (SURFBAR_GET_USERID() > 0) {
- SUB_POINTS(SURFBAR_GET_USERID(), SURFBAR_GET_COSTS());
+ SUB_POINTS("surfbar", SURFBAR_GET_USERID(), SURFBAR_GET_COSTS());
} // END - if
// Book it to the user
//DEBUG_LOG(__FUNCTION__, __LINE__, "uid=".$GLOBALS['userid'].",reward=".SURFBAR_GET_REWARD()."", false);
- ADD_POINTS_REFSYSTEM($GLOBALS['userid'], SURFBAR_GET_DATA('reward'));
+ ADD_POINTS_REFSYSTEM("surfbar", $GLOBALS['userid'], SURFBAR_GET_DATA('reward'));
}
// Updates the statistics of current URL/userid
function SURFBAR_UPDATE_INSERT_STATS_RECORD () {
SQL_FREERESULT($result);
if ($value > 0) {
- define('__CONFIRMED_VALUE', "<A href=\"".URL."/modules.php?module=admin&what=list_user&mode=confirmed\">".$value."</A>");
+ define('__CONFIRMED_VALUE', "<A href=\"".URL."/modules.php?module=admin&what=list_user&status=confirmed\">".$value."</A>");
} else {
define('__CONFIRMED_VALUE', "0");
}
SQL_FREERESULT($result);
if ($value > 0) {
- define('__LOCKED_VALUE', "<A href=\"".URL."/modules.php?module=admin&what=list_user&mode=locked\">".$value."</A>");
+ define('__LOCKED_VALUE', "<A href=\"".URL."/modules.php?module=admin&what=list_user&status=locked\">".$value."</A>");
} else {
define('__LOCKED_VALUE', "0");
}
$SQLs[] = "SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE refid='0' ORDER BY userid";
$DESCRs[] = TASK_ADMIN_LIST_ACCOUNT_NOREF;
$TITLEs[] = TASK_ADMIN_LIST_ACCOUNT_NOREF_TITLE;
- $WHATs[] = "list_norefs";
+ $WHATs[] = "list_user&mode=norefs";
}
if (EXT_IS_ACTIVE("payout")) {
{
global $_CONFIG;
if (empty($_GET['offset'])) $_GET['offset'] = 0;
- $ADD = "&page=".$_GET['page']."&offset=".$_GET['offset'];
+ $ADD = "&page=".SQL_ESCAPE($_GET['page'])."&offset=".SQL_ESCAPE($_GET['offset']);
if (!empty($_GET['mode'])) $ADD .= "&mode=".SQL_ESCAPE($_GET['mode']);
/* Creates the list of letters and makes them a link. */
{
$OUT = "";
if (empty($_GET['offset'])) $_GET['offset'] = 0;
- $ADD = "&page=".$_GET['page']."&offset=".$_GET['offset'];
- if (!empty($_GET['mode'])) $ADD .= "&mode=".SQL_ESCAPE($_GET['mode']);
+ if (empty($_GET['page'])) $_GET['page'] = 0;
+
+ // Add page and offset
+ $ADD = "&page=".SQL_ESCAPE($_GET['page'])."&offset=".SQL_ESCAPE($_GET['offset']);
+
+ // Add status or mode
+ if (!empty($_GET['status'])) $ADD .= "&mode=".SQL_ESCAPE($_GET['status']);
+ elseif (!empty($_GET['mode'])) $ADD .= "&mode=".SQL_ESCAPE($_GET['mode']);
// Makes order by links..
if ($letter == "front") $letter = _ALL2;
// Add page navigation
function ADD_PAGENAV($PAGES, $offset, $show_form, $colspan,$return=false)
{
- if (!$show_form)
- {
+ if (!$show_form) {
// Empty row
define('__FORM_HEADER', "<TR><TD colspan=\"".$colspan."\" class=\"seperator\"> </TD></TR>");
- }
- else
- {
+ } else {
// Load form for changing number of lines
define('__FORM_HEADER', LOAD_TEMPLATE("admin_list_user_sort_form", true));
}
- if (!$show_form)
- {
+
+ if (!$show_form) {
// Add line with bottom border
define('__FORM_FOOTER', "<TR><TD colspan=\"".__COLSPAN2."\" class=\"seperator bottom2\"> </TD></TR>");
- }
- else
- {
+ } else {
// Add line without bottom border
define('__FORM_FOOTER', "<TR><TD colspan=\"".__COLSPAN2."\" class=\"seperator bottom2\"> </TD></TR>");
}
$OUT = "";
- for ($page = 1; $page <= $PAGES; $page++)
- {
- if (($page == $_GET['page']) || ((empty($_GET['page'])) && ($page == "1")))
- {
+ for ($page = 1; $page <= $PAGES; $page++) {
+ if (($page == $_GET['page']) || ((empty($_GET['page'])) && ($page == "1"))) {
$OUT .= "<STRONG>-";
- }
- else
- {
+ } else {
if (empty($_GET['letter'])) $_GET['letter'] = _ALL2;
if (empty($_GET['sortby'])) $_GET['sortby'] = "userid";
+
+ // Base link
$OUT .= "<A href=\"".URL."/modules.php?module=admin&what=".$GLOBALS['what'];
- if (!empty($_GET['mode'])) $OUT .= "&mode=".SQL_ESCAPE($_GET['mode']);
- $OUT .= "&letter=".$_GET['letter']."&sortby=".$_GET['sortby']."&page=".$page."&offset=".$offset."\">";
+
+ // Add status or mode
+ if (!empty($_GET['status'])) $OUT .= "&mode=".SQL_ESCAPE($_GET['status']);
+ elseif (!empty($_GET['mode'])) $OUT .= "&mode=".SQL_ESCAPE($_GET['mode']);
+
+ // Letter and so on
+ $OUT .= "&letter=".SQL_ESCAPE($_GET['letter'])."&sortby=".SQL_ESCAPE($_GET['sortby'])."&page=".$page."&offset=".$offset."\">";
}
$OUT .= $page;
if (($page == $_GET['page']) || ((empty($_GET['page'])) && ($page == "1")))
return $OUT;
}
//
-function ADMIN_USER_PROFILE_LINK($uid, $title="", $wht="list_user") {
+function ADMIN_USER_PROFILE_LINK ($uid, $title="", $wht="list_user") {
if (($title == "") && ($title != "0")) {
// Set userid as title
$title = $uid;
);
// Do we have extension task?
- if ($type == "EXTENSION") {
+ if (($type == "EXTENSION") && (!GET_EXT_VERSION($infos) == "")) {
// Load extension row template
LOAD_TEMPLATE("admin_overview_list_ext_rows", false, $content);
} else {
unset($DEPTH);
// Ok, add points and send an email to him...
- ADD_POINTS_REFSYSTEM($uid, bigintval($_POST['points']), false, "0", false, "direct");
+ ADD_POINTS_REFSYSTEM("admin_all", $uid, bigintval($_POST['points']), false, "0", false, "direct");
// Prepare content
$content = array(
unset($DEPTH);
// Ok, add points and send an email to him...
- ADD_POINTS_REFSYSTEM(bigintval($_GET['u_id']), bigintval($_POST['points']), false, "0", false, "direct");
+ ADD_POINTS_REFSYSTEM("admin_single", bigintval($_GET['u_id']), bigintval($_POST['points']), false, "0", false, "direct");
// Prepare content
$content = array(
// Pay back points
//* DEBUG: */ echo "PAYBACK:".$sender."<br />\n";
- ADD_POINTS_REFSYSTEM($sender, $totalPoints, true, "0", false,"direct");
+ ADD_POINTS_REFSYSTEM("mail_deleted", $sender, $totalPoints, true, "0", false,"direct");
// Output message
if ($_CONFIG['repay_deleted_mails'] == 'REPAY') {
<?php
-/************************************************************************
- * MXChange v0.2.1 Start: 01/19/2006 *
- * ================ Last change: 01/19/2006 *
- * *
- * -------------------------------------------------------------------- *
- * File : what-list_norefs.php *
- * -------------------------------------------------------------------- *
- * Short description : Show all members w/o a referal *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung : Alle Mitgliederaccounts ohne Werber auflisten *
- * -------------------------------------------------------------------- *
- * *
- * -------------------------------------------------------------------- *
- * 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 ((!defined('__SECURITY')) || (!IS_ADMIN())) {
- $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
- require($INC);
-} elseif ((!EXT_IS_ACTIVE("user")) || (GET_EXT_VERSION("user") == "")) {
- // Not active!
- ADD_FATAL(sprintf(EXTENSION_PROBLEM_NOT_INSTALLED, "user"));
- return;
-}
-
-// Add description as navigation point
-ADD_DESCR("admin", __FILE__);
-
-$MORE = ", userid"; $colspan = "4"; // 27
-if (EXT_IS_ACTIVE("nickname")) { $MORE = ", nickname"; }
-
-if (empty($_GET['letter'])) { $_GET['letter'] = _ALL2; }
-if (empty($_GET['sortby'])) { $_GET['sortby'] = "userid"; }
-if (empty($_GET['page'])) { $_GET['page'] = "1"; }
-
-// Set base URL
-$BASE = "[<A href=\"".URL."/modules.php?module=admin";
-
-$whereStatement = " WHERE refid=0";
-if (($_GET['letter'] != _ALL2) && ($_GET['letter'] != _OTHERS) && (!empty($_GET['letter']))) {
- // List only persons w
- $whereStatement = " WHERE refid=0 AND family LIKE '".$_GET['letter']."%'";
-}
-
-// Fix sorter
-if ($_GET['sortby'] == "family_name") $_GET['sortby'] = "family";
-
-// Construct query
-$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 ".SQL_ESCAPE($_GET['sortby']);
-
-// Start master query
-$result_master = SQL_QUERY($SQL, __FILE__, __LINE__);
-
-// Calculate page count (0.5 fixes a bug with page count)
-$PAGES = round(SQL_NUMROWS($result_master) / $_CONFIG['user_limit'] + 0.5);
-
-if (empty($_GET['page'])) $_GET['page'] = "1";
-if (empty($_GET['offset'])) $_GET['offset'] = $_CONFIG['user_limit'];
-
-// Add limitation to SQL string and run him again
-$SQL .= " LIMIT ".($_GET['offset'] * $_GET['page'] - $_GET['offset']).", ".$_GET['offset'];
-$result = SQL_QUERY($SQL, __FILE__, __LINE__);
-
-$result_user = SQL_QUERY("SELECT emails_sent FROM "._MYSQL_PREFIX."_user_data WHERE status='CONFIRMED'", __FILE__, __LINE__);
-$user_count = SQL_NUMROWS($result_user);
-SQL_FREERESULT($result_user);
-
-if (SQL_NUMROWS($result_master) > 0)
-{
- // We have some (new?) registrations!
- define('__COLSPAN1' , $colspan);
- define('__COLSPAN2' , ($colspan + 2));
- define('__USER_CNT' , $user_count);
- define('__ALPHA_SORT', alpha($_GET['sortby'], $colspan, true));
- define('__SORT_LINKS', SortLinks($_GET['letter'], $_GET['sortby'], $colspan, true));
- define('__TITLE' , ADMIN_LIST_NOREFS_ACCOUNTS);
-
- if ($PAGES > 1) {
- // Add navigation
- define('__PAGE_NAV', ADD_PAGENAV($PAGES, $_CONFIG['user_limit'], true, $colspan, true));
- } else {
- // No page navigation is required
- define('__PAGE_NAV', "");
- }
-
- // Column with nickname when nickname extension is present
- if (EXT_IS_ACTIVE("nickname")) {
- // Nickname extension found
- define('__NICKNAME_TH', " <TD class=\"admin_title bottom2\" align=\"center\">".NICKNAME."</TD>");
- } else {
- // Not found
- define('__NICKNAME_TH', "");
- }
-
- $SW = 2; $OUT = "";
- while (list($uid, $gender, $sname, $fname, $email, $IP, $ref, $status, $emails_sent, $mails_confirmed, $emails_received, $nick) = SQL_FETCHROW($result)) {
- // Get unconfirmed emails
- $LINKS = GET_TOTAL_DATA($uid, "user_links", "id", "userid", true);
-
- // Set link to unconfirmed emails
- if ($LINKS > 0) {
- // Translate value
- $LINKS = TRANSLATE_COMMA($LINKS);
-
- // Add link
- $LINKS = $BASE."&what=list_links&u_id=".$uid."\">".$LINKS."</A>]";
- } // END - if
-
- // Add nickname
- if ((empty($nick)) || ($uid == $nick)) $nick = "---";
-
- // Sent emails
- $SENT = $emails_sent;
- if ($emails_sent > 0) $SENT = $BASE."&what=email_details&u_id=".$uid."\">".TRANSLATE_COMMA($emails_sent)."</A>]";
-
- // 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,
- 'uid' => ADMIN_USER_PROFILE_LINK($uid),
- 'gender' => TRANSLATE_GENDER($gender),
- 'sname' => $sname,
- 'fname' => $fname,
- 'email' => "[<A href=\"".CREATE_EMAIL_LINK($email, "user_data")."\">".$email."</A>]",
- 'addr' => $IP,
- 'ref' => $ref,
- 'status' => TRANSLATE_STATUS($status),
- 'links' => $LINKS,
- 'alinks' => MEMBER_ACTION_LINKS($uid, $status),
- 'nick' => $nick,
- '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);
-
- define('__USER_ROWS', $OUT);
-
- // Load main template
- LOAD_TEMPLATE("admin_list_user");
-
- // Free some memory
- SQL_FREERESULT($result_master);
-} else {
- // No one as registered so far! :-(
- LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_ACCOUNT_NOREFS_404);
-}
-
-// Free memory
-SQL_FREERESULT($result_master);
-
-//
+// DEPRECATED!
?>
);
// Do we have an extension task?
- if ($type == "EXTENSION") {
+ if (($type == "EXTENSION") && (GET_EXT_VERSION($infos) == "")) {
// Load extension row template
LOAD_TEMPLATE("admin_list_task_ext_rows", false, $content);
} else {
// Init title with "all accounts"
$listHeader = ADMIN_ALL_ACCOUNTS;
-if (!empty($_GET['mode'])) {
+if (!empty($_GET['status'])) {
+ // Set title according to the "status"
+ $listHeader = constant(sprintf("ADMIN_LIST_STATUS_%s_ACCOUNTS", strtoupper(SQL_ESCAPE($_GET['status']))));
+} elseif (!empty($_GET['mode'])) {
// Set title according to the "mode"
- $listHeader = constant(sprintf("ADMIN_LIST_%s_ACCOUNTS", strtoupper(SQL_ESCAPE($_GET['mode']))));
-} // END - if
+ $listHeader = constant(sprintf("ADMIN_LIST_MODE_%s_ACCOUNTS", strtoupper(SQL_ESCAPE($_GET['mode']))));
+}
// Remember it
define('__TITLE', $listHeader);
} // END - if
} // END - if
+// Is the extension "country" installed?
+if (EXT_IS_ACTIVE("country")) {
+ // Add country code
+ $MORE .= ", country_code";
+} // END - if
+
// Init unset data (bad that we change $_GET here!)
if (empty($_GET['letter'])) { $_GET['letter'] = _ALL2; }
if (empty($_GET['sortby'])) { $_GET['sortby'] = "userid"; }
$DATA['locked'] = TRANSLATE_COMMA(GET_TOTAL_DATA($uid, "user_points", "locked_points"));
$DATA['lock_timestamp'] = MAKE_DATETIME($DATA['lock_timestamp'], "2");
+ // Is the lock reason not set?
+ if (!isset($DATA['lock_reason'])) $DATA['lock_reason'] = "---";
+
// Nickname inclusion?
if (EXT_IS_ACTIVE("nickname")) {
// Nickname not set or invalid? Then
$DATA['mails_confirmed'] = TRANSLATE_COMMA($DATA['mails_confirmed']);
$DATA['emails_received'] = TRANSLATE_COMMA($DATA['emails_received']);
+ // Is the extension "country" installed?
+ if (EXT_IS_ACTIVE("country")) {
+ // Then overwrite country information
+ $DATA['country'] = COUNTRY_GENERATE_INFO($DATA['country_code']);
+ } elseif ($DATA['country'] == 0) {
+ // Zero ID???
+ $DATA['country'] = "???";
+ }
+
// Load user-details template
LOAD_TEMPLATE("admin_user_details", false, $uid);
} else {
} // END - if
if ($_GET['sortby'] == "family_name") $_GET['sortby'] = "family";
- // Parse the mode parameter
- if (isset($_GET['mode'])) {
+ // Parse the status or mode parameter
+ if (isset($_GET['status'])) {
// Is a WHERE statement already there?
if (!empty($whereStatement)) {
// Then append the status column
- $whereStatement .= sprintf(" AND status='%s'", SQL_ESCAPE(strip_tags(strtoupper($_GET['mode']))));
+ $whereStatement .= sprintf(" AND status='%s'", SQL_ESCAPE(strip_tags(strtoupper($_GET['status']))));
} else {
// Start a new one
- $whereStatement = sprintf(" WHERE status='%s'", SQL_ESCAPE(strip_tags(strtoupper($_GET['mode']))));
+ $whereStatement = sprintf(" WHERE status='%s'", SQL_ESCAPE(strip_tags(strtoupper($_GET['status']))));
}
- } // END - if
+ } elseif (isset($_GET['mode'])) {
+ // Choose what we need to list
+ switch ($_GET['mode']) {
+ case "norefs": // Users w/o refs
+ if (!empty($whereStatement)) {
+ // Add AND statement
+ $whereStatement .= " AND refid=0";
+ } else {
+ // Add WHERE statement
+ $whereStatement = " WHERE refid=0";
+ }
+ break;
+
+ default: // Invalid list mode
+ DEBUG_LOG(__FILE__, __LINE__, sprintf("Invalid list mode %s detected.", SQL_ESCAPE($_GET['mode'])));
+ break;
+ }
+ } // END = if
// Prepare SQL and run it
$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 ".SQL_ESCAPE($_GET['sortby']);
$content['gender'] = TRANSLATE_GENDER($content['gender']);
$content['email'] = "[<A href=\"".CREATE_EMAIL_LINK($content['email'], "user_data")."\">".$content['email']."</A>]";
$content['addr'] = $content['REMOTE_ADDR'];
- $content['status'] = TRANSLATE_STATUS($content['status']);
$content['links'] = $LINKS;
$content['alinks'] = MEMBER_ACTION_LINKS($content['userid'], $content['status']);
$content['points'] = TRANSLATE_COMMA($pointsTotal);
$content['rate'] = TRANSLATE_COMMA($clickRate);
$content['locked'] = TRANSLATE_COMMA(GET_TOTAL_DATA($content['userid'], "user_points", "locked_points"));
$content['lock_timestamp'] = MAKE_DATETIME($content['lock_timestamp'], "2");
+ $content['status'] = TRANSLATE_STATUS($content['status']);
+
+ // Is the lock reason not set?
+ if (!isset($content['lock_reason'])) $content['lock_reason'] = "---";
+
+ // Is the extension "country" installed?
+ if (EXT_IS_ACTIVE("country")) {
+ // Then overwrite country information
+ $content['country'] = COUNTRY_GENERATE_INFO($content['country_code']);
+ } elseif ($content['country'] == 0) {
+ // Zero ID???
+ $content['country'] = "???";
+ }
// Load row template and switch colors
$OUT .= LOAD_TEMPLATE("admin_list_user_row", true, $content);
if ((isset($_POST['ok'])) && (!empty($_POST['points'])))
{
// Ok, add points to used points and send an email to him...
- SUB_POINTS($uid, $_POST['points']);
+ SUB_POINTS("admin_all", $uid, $_POST['points']);
// Prepare content
$content = array(
if ((isset($_POST['ok'])) && (!empty($_POST['points'])))
{
// Ok, add to used points and send an email to him...
- SUB_POINTS(bigintval($_GET['u_id']), $_POST['points']);
+ SUB_POINTS("admin_single", bigintval($_GET['u_id']), $_POST['points']);
// Prepare content
$content = array(
// Add one-time referal bonus over referal system or directly
unset($DEPTH);
- ADD_POINTS_REFSYSTEM($rid, $_CONFIG['points_ref'], true, bigintval($uid), $locked, $_CONFIG['reg_points_mode']);
+ ADD_POINTS_REFSYSTEM("referal_bonus", $rid, $_CONFIG['points_ref'], true, bigintval($uid), $locked, $_CONFIG['reg_points_mode']);
} // END - if
} // END - if
define('PAYOUT_POINTS_VALUE', $PAYOUT);
// Subtract points from member's account
- SUB_POINTS($GLOBALS['userid'], $PAYOUT);
+ SUB_POINTS("payout", $GLOBALS['userid'], $PAYOUT);
// Add entry to his tranfer history
if ($allow == "Y")
} // END - if
// Remove points from account
- SUB_POINTS($GLOBALS['userid'], $_POST['amount']);
+ SUB_POINTS("primera_payout", $GLOBALS['userid'], $_POST['amount']);
// Update primera nickname
$result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET `primera_userid`=%s WHERE userid=%s LIMIT 1",
__FILE__, __LINE__);
// Add points to account *directly* ...
- ADD_POINTS_REFSYSTEM(bigintval($_POST['to_uid']), bigintval($_POST['points']), false, "0", false, "direct");
+ ADD_POINTS_REFSYSTEM("member_transfer", bigintval($_POST['to_uid']), bigintval($_POST['points']), false, "0", false, "direct");
// ... and add it to current user's used points
- SUB_POINTS($GLOBALS['userid'], $_POST['points']);
+ SUB_POINTS("transfer", $GLOBALS['userid'], $_POST['points']);
// First send email to recipient
$msg = LOAD_EMAIL_TEMPLATE("member_transfer_recipient", "", __RECIPIENT_UID);
if ($success) {
// Add it to this amount
unset($DEPTH);
- ADD_POINTS_REFSYSTEM($GLOBALS['userid'], bigintval($_POST['amount']), false, 0, false, "direct");
+ ADD_POINTS_REFSYSTEM("wernis_withdraw", $GLOBALS['userid'], bigintval($_POST['amount']), false, 0, false, "direct");
// Update the user data as well..
$result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET `wernis_userid`=%s WHERE userid=%s LIMIT 1",
$success = WERNIS_EXECUTE_PAYOUT($_POST['wds66_id'], $_POST['amount']);
if ($success) {
// Sub points
- SUB_POINTS($GLOBALS['userid'], $_POST['amount']);
+ SUB_POINTS("wernis_payout", $GLOBALS['userid'], $_POST['amount']);
// Update WDS66 id
$result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET `wernis_userid`=%s WHERE userid=%s LIMIT 1",
// Update used points
$ADD = "";
if ($_CONFIG['order_max_full'] == "ORDER") $ADD = ", mail_orders=mail_orders+1";
- SUB_POINTS($GLOBALS['userid'], $USED);
+ SUB_POINTS("order", $GLOBALS['userid'], $USED);
// Prepare content
$content = array(
// Load our winners...
while ($content = SQL_FETCHARRAY($result_main)) {
// Add points to user's account directly
- ADD_POINTS_REFSYSTEM($content['userid'], $content['points'], false, "0", false, "direct");
+ ADD_POINTS_REFSYSTEM("monthly_beg", $content['userid'], $content['points'], false, "0", false, "direct");
// Translate gender/points
$content['gender'] = TRANSLATE_GENDER($content['gender']);
// Make sure zero points are not mailed
if ($content['points'] > 0) {
// Add points to user's account directly
- ADD_POINTS_REFSYSTEM($content['uid'], $content['points'], false, "0", false, "direct");
+ ADD_POINTS_REFSYSTEM("monthly_bonus", $content['uid'], $content['points'], false, "0", false, "direct");
// Translate gender/points
$content['gender'] = TRANSLATE_GENDER($content['gender']);
// Administrative functions
require_once(PATH."inc/modules/admin/admin-inc.php");
} // END - if
- //* DEBUG: */ ADD_POINTS_REFSYSTEM(36,1000);
+ //* DEBUG: */ ADD_POINTS_REFSYSTEM("test", 36, 1000);
//* DEBUG: */ die();
// Get all values
*
* Dynamic referal system, can also send mails!
*
+ * subject = Subject line, write in lower-case letters and underscore is allowed
* uid = Referal ID wich should receive...
* points = ... xxx points
* send_notify = shall I send the referal an email or not?
* add_mode = Add points only to $uid or also refs? (WARNING! Changing "ref" to "direct"
* for default value will cause no referal will get points ever!!!)
*/
-function ADD_POINTS_REFSYSTEM ($uid, $points, $send_notify=false, $rid="0", $locked=false, $add_mode="ref") {
+function ADD_POINTS_REFSYSTEM ($subject, $uid, $points, $send_notify=false, $rid="0", $locked=false, $add_mode="ref") {
//* DEBUG: */ print "----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n";
global $DEPTH, $_CONFIG, $DATA, $cacheArray;
return;
} // END - if
+ // Add booking record if extension is installed
+ if (EXT_IS_ACTIVE("booking")) {
+ // Add record
+ ADD_BOOKING_RECORD($subject, $uid, $points, "add");
+ } // END - if
+
// Count up referal depth
if (!isset($DEPTH)) {
// Initialialize referal system
if (($ref > 0) && ($points > 0) && ($ref != $uid) && ($add_mode == "ref")) {
// Then let's credit him here...
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},ref={$ref},points={$points} - ADVANCE!<br />\n";
- ADD_POINTS_REFSYSTEM($ref, $points, $send_notify, $ref, $locked);
+ ADD_POINTS_REFSYSTEM(sprintf("%s_ref:%s", $subject, $DEPTH), $ref, $points, $send_notify, $ref, $locked);
} // END - if
} // END - if
} // END - if
// Return status
return $ret;
}
+
// Subtract points from database and mediadata cache
-function SUB_POINTS ($uid, $points) {
+function SUB_POINTS ($subject, $uid, $points) {
// Add points to used points
$result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET `used_points`=`used_points`+%s WHERE userid=%s LIMIT 1",
array($points, bigintval($uid)), __FILE__, __LINE__);
+ // Insert booking record
+ if (EXT_IS_ACTIVE("booking")) {
+ // Add record
+ ADD_BOOKING_RECORD($subject, $uid, $points, "sub");
+ } // END - if
+
// Update mediadata as well
if (GET_EXT_VERSION("mediadata") >= "0.0.4") {
// Update database
MEDIA_UPDATE_ENTRY(array("total_points"), "sub", $points);
} // END - if
}
+
// Update config entries
function UPDATE_CONFIG ($entries, $values, $updateMode="") {
// Do we have multiple entries?
// Rebuild cache
REBUILD_CACHE("config", "config");
}
+
// Creates a new task for updated extension
function CREATE_EXTENSION_UPDATE_TASK ($admin_id, $subject, $notes) {
// Check if task is not there
// Free memory
SQL_FREERESULT($result);
}
+
// Creates a new task for newly installed extension
function CREATE_NEW_EXTENSION_TASK ($admin_id, $subject, $ext) {
// Not installed and do we have created a task for the admin?
if ($uid > 0) {
// User does not exists, pay points back
$points = GET_PAY_POINTS($DATA[5]);
- ADD_POINTS_REFSYSTEM($DATA[1], $points, false, "0", false, "direct");
+ ADD_POINTS_REFSYSTEM("pool_payback", $DATA[1], $points, false, "0", false, "direct");
// Add points together and remove user
$points_BACK[$DATA[1]] += $points;
INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','reflinks','Referal-Links',6,'Y','N');\r
INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','order','Mailbuchung',8,'Y','N');\r
INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','unconfirmed','Unbestätigte Emails',5,'Y','N');\r
+INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','stats','Statistiken', 'Y','N',9);\r
+INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','support','Support ','Y','N',10);\r
+INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('logout','guest','Zum Gastmenü','Y','N',1000);\r
\r
INSERT INTO `mxchange_payments` VALUES (1,10,2.000,'Klick-Mail 10 Sek.',1.000);\r
INSERT INTO `mxchange_payments` VALUES (2,20,10.000,'Klick-Mail 20 Sek.',9.000);\r
INSERT INTO `mxchange_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','updates','Updates prüfen','Prüft, ob eine neue Version oder ein Patch auf dem Server exisitiert. Sie müssen dann die Patches/Updates selber herunterladen und einspielen. Dabei werden keine Daten von Ihrer Installation an uns gesendet!','8');\r
INSERT INTO `mxchange_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','extensions','Erweiterungen','Erweiterungen installieren, updaten, sperren, löschen usw.','8');\r
\r
-INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','stats','Statistiken', 'Y','N',9);\r
-INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','support','Support ','Y','N',10);\r
-INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('logout','guest','Zum Gastmenü','Y','N',1000);\r
-\r
INSERT INTO `mxchange_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','stats','Statistiken','7','Y','N');\r
INSERT INTO `mxchange_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('online',NULL,'Jetzt Online','2','Y','N');\r
INSERT INTO `mxchange_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('admin',NULL,'Administrative Links','3','N','N');\r
INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','reflinks','Referal-Links',6,'Y','N');\r
INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','order','Mailbuchung',8,'Y','N');\r
INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','unconfirmed','Unbestätigte Emails',5,'Y','N');\r
+INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','stats','Statistiken', 'Y','N',9);\r
+INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','support','Support ','Y','N',10);\r
+INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('logout','guest','Zum Gastmenü','Y','N',1000);\r
\r
INSERT INTO `mxchange_payments` VALUES (1,10,2.000,'Klick-Mail 10 Sek.',1.000);\r
INSERT INTO `mxchange_payments` VALUES (2,20,10.000,'Klick-Mail 20 Sek.',9.000);\r
INSERT INTO `mxchange_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','updates','Updates prüfen','Prüft, ob eine neue Version oder ein Patch auf dem Server exisitiert. Sie müssen dann die Patches/Updates selber herunterladen und einspielen. Dabei werden keine Daten von Ihrer Installation an uns gesendet!','8');\r
INSERT INTO `mxchange_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','extensions','Erweiterungen','Erweiterungen installieren, updaten, sperren, löschen usw.','8');\r
\r
-INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','stats','Statistiken', 'Y','N',9);\r
-INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','support','Support ','Y','N',10);\r
-INSERT INTO `mxchange_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('logout','guest','Zum Gastmenü','Y','N',1000);\r
-\r
INSERT INTO `mxchange_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','stats','Statistiken','7','Y','N');\r
INSERT INTO `mxchange_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('online',NULL,'Jetzt Online','2','Y','N');\r
INSERT INTO `mxchange_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('admin',NULL,'Administrative Links','3','N','N');\r
// Add points
unset($DEPTH);
- ADD_POINTS_REFSYSTEM($url_uid, $payment, false, "0", $locked);
+ ADD_POINTS_REFSYSTEM("mailid_okay", $url_uid, $payment, false, "0", $locked);
// Shall I add bonus points for "turbo clickers" ?
if ((GET_EXT_VERSION("bonus") >= "0.2.2") && (function_exists('BONUS_ADD_TURBO_POINTS'))) {
} else {
// Wrong image code! So add points to sender's account
unset($DEPTH);
- ADD_POINTS_REFSYSTEM($sender, $payment, false, 0, false, "direct");
+ ADD_POINTS_REFSYSTEM("mailid_payback", $sender, $payment, false, 0, false, "direct");
// Load template
LOAD_TEMPLATE("mailid_points_failed");
Hier könnten Ihre News stehen. Das Template finden Sie unter
-<EM>{!PATH!}/templates/de/html/member/member_welcome.tpl</EM>
+<EM>{!PATH!}/templates/de/html/member/member_welcome.tpl</EM>.
-<NOSCRIPT>{--LOAD_URL_ERROR_1--}$content{--LOAD_URL_ERROR_2--}</NOSCRIPT>
+<NOSCRIPT>{--LOAD_URL_ERROR_1--}<A href="$content" rel="external" title="$content">$content</A>{--LOAD_URL_ERROR_2--}</NOSCRIPT>
<SCRIPT language="JavaScript" type="text/javascript">
<!--
document.location.href='$content';