if ("".($_GET['uid'] + 0)."" !== "".$_GET['uid']."") {
if (EXT_IS_ACTIVE("nickname")) {
// Maybe we have found a nickname?
- $result = SQL_QUERY_ESC("SELECT userid, beg_clicks, ref_payout, status, last_online FROM "._MYSQL_PREFIX."_user_data WHERE nickname='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT userid, beg_clicks, ref_payout, status, last_online FROM `"._MYSQL_PREFIX."_user_data` WHERE nickname='%s' LIMIT 1",
array($_GET['uid']), __FILE__, __LINE__);
} else {
// Nickname entered but nickname is not active
}
} else {
// Direct userid
- $result = SQL_QUERY_ESC("SELECT userid, beg_clicks, ref_payout, status, last_online FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT userid, beg_clicks, ref_payout, status, last_online FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array(bigintval($_GET['uid'])), __FILE__, __LINE__);
}
// User id valid and not webmaster's id?
if (($uid > 0) && ($_CONFIG['beg_uid'] != $uid)) {
// Update counter
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET beg_clicks=beg_clicks+1 WHERE userid=%s AND status='CONFIRMED' LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET beg_clicks=beg_clicks+1 WHERE userid=%s AND status='CONFIRMED' LIMIT 1",
array($uid), __FILE__, __LINE__);
// Check for last entry for userid w/o IP number
}
} elseif (($uid == "0") || ($status == "failed")) {
// Inalid or locked account, so let's find out
- $result = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE nickname='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE nickname='%s' LIMIT 1",
array($_GET['uid']), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Locked account
// Check if link is not clicked so far
$result = SQL_QUERY_ESC("SELECT b.points, d.gender, d.surname, d.family, d.status, d.ref_payout
FROM "._MYSQL_PREFIX."_user_birthday AS b
-INNER JOIN "._MYSQL_PREFIX."_user_data AS d
+INNER JOIN `"._MYSQL_PREFIX."_user_data` AS d
ON b.userid=d.userid
WHERE b.userid=%s AND b.chk_value='%s' LIMIT 1",
array($uid, $chk), __FILE__, __LINE__);
$probe_nickname = ((EXT_IS_ACTIVE("nickname")) && (("".round($GLOBALS['refid'])."") != $GLOBALS['refid']));
if ($probe_nickname) {
// Nickname in URL, so load the ID
- $result = SQL_QUERY_ESC("SELECT userid, status FROM "._MYSQL_PREFIX."_user_data WHERE nickname='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT userid, status FROM `"._MYSQL_PREFIX."_user_data` WHERE nickname='%s' LIMIT 1",
array(bigintval($GLOBALS['refid'])), __FILE__, __LINE__);
} else {
// Direct userid entered
- $result = SQL_QUERY_ESC("SELECT userid, status FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT userid, status FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array(bigintval($GLOBALS['refid'])), __FILE__, __LINE__);
}
$probe_nickname = ((EXT_IS_ACTIVE("nickname")) && (("".round($_POST['userid'])."") != $_POST['userid']));
if ($probe_nickname) {
// Nickname in URL, so load the ID
- $result = SQL_QUERY_ESC("SELECT userid, status, password FROM "._MYSQL_PREFIX."_user_data WHERE nickname='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT userid, status, password FROM `"._MYSQL_PREFIX."_user_data` WHERE nickname='%s' LIMIT 1",
array($_POST['userid']), __FILE__, __LINE__);
} else {
// Direct userid entered
- $result = SQL_QUERY_ESC("SELECT userid, status, password FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT userid, status, password FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array(bigintval($_POST['userid'])), __FILE__, __LINE__);
}
// Check for all accounts
$result_inactive = SQL_QUERY_ESC("SELECT DISTINCT d.userid, d.email, d.last_online
-FROM "._MYSQL_PREFIX."_user_data AS d
+FROM `"._MYSQL_PREFIX."_user_data` AS d
WHERE d.status='CONFIRMED' AND d.joined < (UNIX_TIMESTAMP() - %s) AND d.last_online < (UNIX_TIMESTAMP() - %s) AND d.ap_notified < (UNIX_TIMESTAMP() - %s)
".$EXCLUDE_LIST."
ORDER BY d.userid", array($since, $since, $since), __FILE__, __LINE__);
SEND_EMAIL($email, AUTOPURGE_MEMBER_INACTIVE_SUBJECT, $msg);
// Update this account
- $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET ap_notified=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1",
+ $result_update = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET ap_notified=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1",
array(bigintval($uid)), __FILE__, __LINE__);
} // END - while
// here for e.g. excluding holiday users
$time = bigintval($_CONFIG['ap_in_time']);
$result_inactive = SQL_QUERY_ESC("SELECT d.userid, d.email, d.last_online
-FROM "._MYSQL_PREFIX."_user_data AS d
+FROM `"._MYSQL_PREFIX."_user_data` AS d
WHERE status='CONFIRMED' AND joined < (UNIX_TIMESTAMP() - %s) AND last_online < (UNIX_TIMESTAMP() - %s) AND ap_notified < (UNIX_TIMESTAMP() - %s)
".$EXCLUDE_LIST."
ORDER BY userid",
// Okay, check for their sender's
while(list($sender) = SQL_FETCHROW($result_mails)) {
// Check now...
- $fount = SQL_NUMROWS(SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $fount = SQL_NUMROWS(SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array(bigintval($sender)), __FILE__, __LINE__));
if ($found == 0) {
// Okay we found some mails!
// Okay, check for their sender's
while(list($sender) = SQL_FETCHROW($result_mails)) {
// Check now...
- $found = SQL_NUMROWS(SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1", array(bigintval($sender)), __FILE__, __LINE__));
+ $found = SQL_NUMROWS(SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", array(bigintval($sender)), __FILE__, __LINE__));
if ($found == 0) {
// Okay we found some mails!
$result_remove = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_stats WHERE sender=%s", array(bigintval($sender)), __FILE__, __LINE__);
define('SERVER_URL', "http://www.mxchange.org");
// Current SVN revision
-define('CURR_SVN_REVISION', "633");
+define('CURR_SVN_REVISION', "634");
// Take a prime number which is long (if you know a longer one please try it out!)
define('_PRIME', 591623);
$min = bigintval($_CONFIG['doubler_min'] * 2);
$result_total = SQL_QUERY_ESC("SELECT DISTINCT d.id, d.userid, d.points, d.remote_ip, d.timemark
FROM "._MYSQL_PREFIX."_doubler AS d
-LEFT JOIN "._MYSQL_PREFIX."_user_data AS u
+LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS u
ON d.userid=u.userid
WHERE u.status='CONFIRMED' AND d.points <= %s AND d.points >= %s AND d.completed='N' AND d.is_ref='N'
ORDER BY d.timemark", array($DOUBLER_POINTS, $min), __FILE__, __LINE__);
// Check for accounts with limitation
$result_main = SQL_QUERY_ESC("SELECT DISTINCT d.id, d.userid, d.points, d.remote_ip, d.timemark
FROM "._MYSQL_PREFIX."_doubler AS d
-LEFT JOIN "._MYSQL_PREFIX."_user_data AS u
+LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS u
ON d.userid=u.userid
WHERE u.status='CONFIRMED' AND d.points <= %s AND d.points >= %s AND d.completed='N' AND d.is_ref='N'
ORDER BY d.timemark
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','active','Heute Online', 10, 'N','Y')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','active','Heute Online', 10, 'N','Y')";
// Load CSS file?
$EXT_CSS = "Y";
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_guest_menu WHERE what='active' LIMIT 1";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='config_active' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_guest_menu` WHERE what='active' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what='config_active' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='N', locked='N' WHERE what='active' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='N', locked='N' WHERE what='active' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='N', locked='Y' WHERE what='active' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='N', locked='Y' WHERE what='active' LIMIT 1";
break;
case "update": // Update an extension
break;
case "0.0.5": // SQL queries for v0.0.5
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD active_limit BIGINT(20) UNSIGNED NOT NULL DEFAULT 10";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_active','Aktiv-Liste','Einstellungen an der Aktiv-Liste (<STRONG>Heute Online</STRONG> im Gastbereich) vornehmen.', 8)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD active_limit BIGINT(20) UNSIGNED NOT NULL DEFAULT 10";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_active','Aktiv-Liste','Einstellungen an der Aktiv-Liste (<STRONG>Heute Online</STRONG> im Gastbereich) vornehmen.', 8)";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Aktiven-Liste im Gastbereich ist nun einschränkbar.";
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='admins' LIMIT 1";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins', NULL, 'Admin-Management','Administratoren anlegen, löschen oder Passwort/E-Mail Adresse ändern.','1')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_add','Admin hinzufügen','Neuen Admin-Account anlegen','0')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_edit','Admin-Account ändern','Bestehende Admin-Accounts bearbeiten: E-Mail-Adresse, Passwort und/oder Login-Name ändern.','1')";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='admins' LIMIT 1";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins', NULL, 'Admin-Management','Administratoren anlegen, löschen oder Passwort/E-Mail Adresse ändern.','1')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_add','Admin hinzufügen','Neuen Admin-Account anlegen','0')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_edit','Admin-Account ändern','Bestehende Admin-Accounts bearbeiten: E-Mail-Adresse, Passwort und/oder Login-Name ändern.','1')";
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='admins' LIMIT 5";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='admins' LIMIT 5";
$SQLs[] = "DROP TABLE "._MYSQL_PREFIX."_admins_acls";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins DROP default_acl";
break;
switch ($EXT_VER)
{
case "0.2": // SQL queries for v0.2
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_contact','Admin kontaktieren','Kontaktiert einen Admin per Mail oder Nachricht (nur wenn messaging-Erweiterung installiert ist).','2')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_contact','Admin kontaktieren','Kontaktiert einen Admin per Mail oder Nachricht (nur wenn messaging-Erweiterung installiert ist).','2')";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Fügt den Menüpunkt "Admin kontaktieren" hinzu.";
case "0.3": // SQL queries for v0.3
// Add admin menu
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','config_admins','ACL einstellen','Richten Sie Zugriffskontrollzeilen für jeden Admin individuell ein, um ihm nur bestimmte Bereiche des Admin-Bereiches zugänglich zu machen oder zu sperren.','4')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','config_admins','ACL einstellen','Richten Sie Zugriffskontrollzeilen für jeden Admin individuell ein, um ihm nur bestimmte Bereiche des Admin-Bereiches zugänglich zu machen oder zu sperren.','4')";
// Which is the default setting when you create a new admin login?
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD admins_default_acl ENUM('deny','allow') NOT NULL DEFAULT 'deny'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD admins_default_acl ENUM('deny','allow') NOT NULL DEFAULT 'deny'";
// Default is deny everything
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins ADD default_acl ENUM('deny','allow') NOT NULL DEFAULT 'deny'";
KEY (admin_id),
PRIMARY KEY (id)
) TYPE=MyISAM";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_mails','Admin-Mails','Stellen Sie hier ein, welcher Admin welche Mail erhalten soll. Sie können dies (derzeit) jedoch erst, wenn einmal die Mail versendet wurde!','5')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('admins','admins_mails','Admin-Mails','Stellen Sie hier ein, welcher Admin welche Mail erhalten soll. Sie können dies (derzeit) jedoch erst, wenn einmal die Mail versendet wurde!','5')";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Kontrollieren Sie, welche Mails welcher Admin oder alle (admin_id=0) bekommen soll oder im UserLog (admin_id=-1) verzeichnet werden soll. Standartmässig wird weiter an alle versendet.";
break;
case "0.5.6": // SQL queries for v0.5.6
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what='admins_contct' WHERE what='admins_contact' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET what='admins_contct' WHERE what='admins_contact' LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Namenskonflikt zwischen den Erweiterungen <STRONG>admins</STRONG> und (kommender) <STRONG>contact</STRONG>.";
break;
case "0.5.8": // SQL queries for v0.5.8
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what='admins_contct' WHERE what='admins_contact' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET what='admins_contct' WHERE what='admins_contact' LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Ein Punkt in der Versionsnummernliste verhinderte das 0.5.6-Update.";
break;
case "0.6.6": // SQL queries for v0.5.6
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what='admins_contct' WHERE what='admins_contact' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET what='admins_contct' WHERE what='admins_contact' LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Namenskonflikt zwischen den Erweiterungen <STRONG>admins</STRONG> und (kommender) <STRONG>contact</STRONG>.";
break;
case "0.6.9": // SQL queries for v0.6.9
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title = 'Admin-Management' WHERE action = 'admins' AND (what='' OR what IS NULL) LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET title = 'Admin-Management' WHERE action = 'admins' AND (what='' OR what IS NULL) LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Verwaltung nach Management umbenannt.";
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// Remove all other themes
$SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_extensions WHERE ext_name LIKE 'admintheme%'";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET action='stats' WHERE what='usr_online' LIMIT 1";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET action='stats' WHERE what='email_stats' LIMIT 1";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET action='misc' WHERE what='maintenance' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET action='stats' WHERE what='usr_online' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET action='stats' WHERE what='email_stats' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET action='misc' WHERE what='maintenance' LIMIT 1";
break;
case "remove": // Do stuff when removing extension
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// Remove all other menu themes
$SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_extensions WHERE ext_name LIKE 'admintheme%'";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET action='misc' WHERE what='usr_online' LIMIT 1";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET action='stats' WHERE what='email' LIMIT 1";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET action='setup' WHERE what='maintenance' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET action='misc' WHERE what='usr_online' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET action='stats' WHERE what='email' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET action='setup' WHERE what='maintenance' LIMIT 1";
break;
case "remove": // Do stuff when removing extension
{
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus MODIFY data_type ENUM('NEW','QUEUE','SEND') NOT NULL DEFAULT 'NEW'";
}
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what IN('config_autopurge','list_autopurge') LIMIT 2";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data DROP ap_notified";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what IN('config_autopurge','list_autopurge') LIMIT 2";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` DROP ap_notified";
break;
case "activate": // Do stuff when admin activates this extension
switch ($EXT_VER)
{
case "0.1": // SQL queries for v0.1
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD autopurge_inactive ENUM('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD autopurge_unconfirmed ENUM('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_inactive_since BIGINT(20) UNSIGNED NOT NULL DEFAULT '2592000'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_inactive_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '25200'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_unconfirmed_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '432000'";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_autopurge','Auto-Löschung','Automatisch inaktive oder nicht bestätigte Accounts löschen.','12')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_autopurge','Inaktive finden','Lassen Sie sich vor dem täglichen Reset anzeigen, welche Mitglieder als inaktiv erkannt werden und welche gelöscht werden.','10')";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD ap_notified BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD autopurge_inactive ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD autopurge_unconfirmed ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD ap_inactive_since BIGINT(20) UNSIGNED NOT NULL DEFAULT '2592000'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD ap_inactive_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '25200'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD ap_unconfirmed_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '432000'";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_autopurge','Auto-Löschung','Automatisch inaktive oder nicht bestätigte Accounts löschen.','12')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_autopurge','Inaktive finden','Lassen Sie sich vor dem täglichen Reset anzeigen, welche Mitglieder als inaktiv erkannt werden und welche gelöscht werden.','10')";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD ap_notified BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Automatisches Lö:schen von inaktiven bzw. nicht bestätigten Accounts hinzugefügt.";
break;
case "0.1.9": // SQL queries for v0.1.9
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD autopurge_tasks ENUM('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_tasks_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '".($_CONFIG['one_day']*7)."'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD autopurge_tasks ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD ap_tasks_time BIGINT(20) UNSIGNED NOT NULL DEFAULT '".($_CONFIG['one_day']*7)."'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Bereinigung von zu löschenden Aufgaben klappt wieder. Zeitlimit für genanntes kann eingestellt werden (Default = 7 Tage).<br /><br /><U>Bitte aktualisieren Sie auch die Admin-Templates!</U>";
break;
case "0.2.0": // SQL queries for v0.2.0
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_in_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_un_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_tasks_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD ap_in_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD ap_un_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD ap_tasks_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Mail wird bei Löschung von Aufgaben ausgesendet.<br /><br /><U>Bitte aktualisieren Sie auch die Admin-Templates!</U>";
break;
case "0.3.3": // SQL queries for v0.3.3
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_del_mails ENUM('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_dm_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_dm_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '86400'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD ap_del_mails ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD ap_dm_notify ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD ap_dm_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '86400'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Von bereits gelöschten Mitgliedern die Mails löschen integriert.";
) TYPE=MyISAM";
// Admin menu queries
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank', NULL, 'Bank-Accounts','Verwalten Sie hier alle Bank-Accounts Ihrer Mitglieder, sowie Angebotspakete und Überweisungen.', 6)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','add_bank_package','Angebotspaket hinzufügen','Neues Angebotspaket erstellen.', 1)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_package','Angebotspakete auflisten','Listet alle erstellten Angebotspakete auf.', 2)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','edit_bank_package','Angebotspaket ändern','Nach Auswahl eines Angebotspaketes können Sie dieses hier verändern. Bitte beachten Sie, dass Ihre Mitglieder keine Mail dabei erhalten!', 3)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_package','Angebotspaket ent-/sperren','Nehmen Sie Angebotspakete zur temporären Überarbeitung zuvor heraus, dann können Sie in Ruhe drüber nachdenken und Berechnungen anstellen. Freigabe ist hier auch möglich.', 4)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','del_bank_package','Angebotspaket löschen','Nach Auswahl eines Angebotspaketes können Sie mit abschliessender Bestätigung Angebotspakete ganz löschen. Bitte beachten Sie, dass dies nur möglich ist, wenn auch alle Accounts dieses nicht mehr nutzen!', 5)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','add_bank_account','Konto anlegen','Legen Sie hier Konten für die Mitglieder an (falls Ihre Mitglieder nicht zurecht kommen).', 6)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_account','Konten auflisten','Auflistung aller Konto oder eines ausw&auuml;hlbaren Mitglieds.', 7)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','edit_bank_account','Konto ändern','Ändern Sie hier bestehende Konten, z.B. den Dispositionskredit usw. PINs und TANs sind hier nicht änderbar! Bestätigungsmails sind optional versendbar.', 8)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_account','Konto ent-/sperren','Sperren Sie hier Konten bei Bedarf. Auch das Freischalten ist hier möglich. Eine Benachrichtigung per Mail wird dann an das Mitglied ausgesendet.', 9)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','del_bank_account','Konto löschen','Löschen von Konten mit Bestätigungsmail. Wenn Sie ein Mitglieder-Account löschen, so müssen Sie derzeit seine angelegten Konten auch löschen!', 10)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','send_bank_tanlist','TAN-Liste aussenden','Listet zuerst Anfragen von Mitgliedern auf, die eine neue (i)TAN-Liste benötigen, anschliessend kann die Liste dann ausgesendet werden.', 11)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_tanlist','TAN-Liste ent-/sperren','Bestehende TAN-Listen können auf Kundenwunsch hin gesperrt und wieder entsperrt werden. Dies passiert auch, wenn der Kunde x-mal (siehe Angebotspakete) eine verkehrte TAN eingegeben hat. Einzelne TANs sind nicht ent-/sperrbar.', 12)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_trans','Überweisungen auflisten','Nach Auswahl eines Mitgliedes und einem Konto (benötgt JavaScript!) können Sie seitenweise die Überweisungen durchschauen.', 13)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank', NULL, 'Bank-Accounts','Verwalten Sie hier alle Bank-Accounts Ihrer Mitglieder, sowie Angebotspakete und Überweisungen.', 6)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','add_bank_package','Angebotspaket hinzufügen','Neues Angebotspaket erstellen.', 1)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_package','Angebotspakete auflisten','Listet alle erstellten Angebotspakete auf.', 2)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','edit_bank_package','Angebotspaket ändern','Nach Auswahl eines Angebotspaketes können Sie dieses hier verändern. Bitte beachten Sie, dass Ihre Mitglieder keine Mail dabei erhalten!', 3)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_package','Angebotspaket ent-/sperren','Nehmen Sie Angebotspakete zur temporären Überarbeitung zuvor heraus, dann können Sie in Ruhe drüber nachdenken und Berechnungen anstellen. Freigabe ist hier auch möglich.', 4)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','del_bank_package','Angebotspaket löschen','Nach Auswahl eines Angebotspaketes können Sie mit abschliessender Bestätigung Angebotspakete ganz löschen. Bitte beachten Sie, dass dies nur möglich ist, wenn auch alle Accounts dieses nicht mehr nutzen!', 5)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','add_bank_account','Konto anlegen','Legen Sie hier Konten für die Mitglieder an (falls Ihre Mitglieder nicht zurecht kommen).', 6)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_account','Konten auflisten','Auflistung aller Konto oder eines ausw&auuml;hlbaren Mitglieds.', 7)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','edit_bank_account','Konto ändern','Ändern Sie hier bestehende Konten, z.B. den Dispositionskredit usw. PINs und TANs sind hier nicht änderbar! Bestätigungsmails sind optional versendbar.', 8)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_account','Konto ent-/sperren','Sperren Sie hier Konten bei Bedarf. Auch das Freischalten ist hier möglich. Eine Benachrichtigung per Mail wird dann an das Mitglied ausgesendet.', 9)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','del_bank_account','Konto löschen','Löschen von Konten mit Bestätigungsmail. Wenn Sie ein Mitglieder-Account löschen, so müssen Sie derzeit seine angelegten Konten auch löschen!', 10)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','send_bank_tanlist','TAN-Liste aussenden','Listet zuerst Anfragen von Mitgliedern auf, die eine neue (i)TAN-Liste benötigen, anschliessend kann die Liste dann ausgesendet werden.', 11)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','lock_bank_tanlist','TAN-Liste ent-/sperren','Bestehende TAN-Listen können auf Kundenwunsch hin gesperrt und wieder entsperrt werden. Dies passiert auch, wenn der Kunde x-mal (siehe Angebotspakete) eine verkehrte TAN eingegeben hat. Einzelne TANs sind nicht ent-/sperrbar.', 12)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_trans','Überweisungen auflisten','Nach Auswahl eines Mitgliedes und einem Konto (benötgt JavaScript!) können Sie seitenweise die Überweisungen durchschauen.', 13)";
// Member menu
- $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','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','Konto Kündigen','N','Y', 7)";
+ $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','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','Konto Kündigen','N','Y', 7)";
break;
case "remove": // Do stuff when removing extension
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bank_transfers";
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bank_packages";
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bank_tanlist";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='bank' LIMIT 14";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE action='bank' LIMIT 8";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='bank' LIMIT 14";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE action='bank' LIMIT 8";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='N' WHERE action='bank' LIMIT 8";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='Y', locked='N' WHERE action='bank' LIMIT 8";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='N', locked='Y' WHERE action='bank' LIMIT 8";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='N', locked='Y' WHERE action='bank' LIMIT 8";
break;
case "update": // Update an extension
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD birthday_sent VARCHAR(10) NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD birthday_sent VARCHAR(10) NOT NULL DEFAULT 0";
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data DROP birthday_sent";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` DROP birthday_sent";
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_birthday";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='config_birthday' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what='config_birthday' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
break;
case "0.2": // SQL queries for v0.2
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD birthday_points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD birthday_points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_birthday";
$SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_user_birthday (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
KEY(userid),
PRIMARY KEY(id)
) Type=MyISAM";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_birthday','Geburtstagsmails','Stellen Sie hier ein, ob die Mitglieder {!POINTS!} (nicht automatisch) gutgeschrieben kommen sollen oder nicht.', 9)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_birthday','Geburtstagsmails','Stellen Sie hier ein, ob die Mitglieder {!POINTS!} (nicht automatisch) gutgeschrieben kommen sollen oder nicht.', 9)";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Es kann nun eine Gutschrift an die Geburtstagmail angehängt werden. Diese wird erst beim Klick auf einen Bestätigungslink gutgeschrieben.";
break;
case "0.3.6": // SQL queries for v0.3.6
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD birthday_mode ENUM('DIRECT','REF') NOT NULL DEFAULT 'DIRECT'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD birthday_active ENUM('Y','N') NOT NULL DEFAULT 'N'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD birthday_mode ENUM('DIRECT','REF') NOT NULL DEFAULT 'DIRECT'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD birthday_active ENUM('Y','N') NOT NULL DEFAULT 'N'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Vergütungsmodus des Geburtstagsbonus einstellbar.";
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`sort`,`descr`) VALUES ('email','send_bonus','Bonusmail senden',5,'Versenden Sie hier Bonus-Mails an alle Mitglieder oder nur an alle aus einer Kategorie. Es spielt keine Rolle, wie viele Mails bereits versendet worden, Sie können hier immer senden.')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`, `what`, `title`, `sort`, `visible`, `locked`, `counter`) VALUES ('main','bonus','Bonuspunkte',7,'Y','Y', 0)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('email','send_bonus','Bonusmail senden',5,'Versenden Sie hier Bonus-Mails an alle Mitglieder oder nur an alle aus einer Kategorie. Es spielt keine Rolle, wie viele Mails bereits versendet worden, Sie können hier immer senden.')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`, `what`, `title`, `sort`, `visible`, `locked`, `counter`) VALUES ('main','bonus','Bonuspunkte',7,'Y','Y', 0)";
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus";
$SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_bonus (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what IN ('bonus','config_bonus','send_bonus','list_bonus','list_notifications') LIMIT 5";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE what='bonus' LIMIT 1";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_guest_menu WHERE action='bonus' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what IN ('bonus','config_bonus','send_bonus','list_bonus','list_notifications') LIMIT 5";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE what='bonus' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_guest_menu` WHERE action='bonus' LIMIT 1";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_links MODIFY link_type ENUM('NORMAL') NOT NULL DEFAULT 'NORMAL'";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_links DROP bonus_id";
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bonus";
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='N' WHERE what='bonus' LIMIT 1";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='Y', locked='N' WHERE action='bonus' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='Y', locked='N' WHERE what='bonus' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='Y', locked='N' WHERE action='bonus' LIMIT 1";
$SQLs[] = "UPDATE "._MYSQL_PREFIX."_mod_reg SET locked='N', hidden='N', admin_only='N', mem_only='N' WHERE module='show_bonus' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='N', locked='Y' WHERE what='bonus' LIMIT 1";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='N', locked='Y' WHERE action='bonus' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='N', locked='Y' WHERE what='bonus' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='N', locked='Y' WHERE action='bonus' LIMIT 1";
$SQLs[] = "UPDATE "._MYSQL_PREFIX."_mod_reg SET locked='Y' WHERE module='show_bonus' LIMIT 1";
break;
break;
case "0.2.1": // SQL queries for v0.2.1
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='config_bonus' LIMIT 1";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`sort`,`descr`) VALUES VALUES ('setup','config_bonus','Bonus-{!POINTS!}',8,'Richten Sie Bonus-{!POINTS!} ein, die beim x'ten Klick auf die Mail verbucht werden sollen. Beispiele: Der 1. Klick sollte mehr {!POINTS!} zusätzlich bekommen, als der 10. Klick.')";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 10.000";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 100.000";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD login_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".$_CONFIG['one_day']."";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD turbo_rates VARCHAR(255) NOT NULL DEFAULT '50;20;10'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT 10";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what='config_bonus' LIMIT 1";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES VALUES ('setup','config_bonus','Bonus-{!POINTS!}',8,'Richten Sie Bonus-{!POINTS!} ein, die beim x'ten Klick auf die Mail verbucht werden sollen. Beispiele: Der 1. Klick sollte mehr {!POINTS!} zusätzlich bekommen, als der 10. Klick.')";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 10.000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 100.000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD login_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".$_CONFIG['one_day']."";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD turbo_rates VARCHAR(255) NOT NULL DEFAULT '50;20;10'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT 10";
// Use actual month for this update
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_stats ADD bonus_stats ENUM('Y','N') NOT NULL DEFAULT 'N'";
$SQLs[] = "UPDATE "._MYSQL_PREFIX."_extensions SET ext_has_css='Y' WHERE ext_name='bonus' AND ext_has_css='N' LIMIT 1";
break;
case "0.2.3": // SQL queries for v0.2.3
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE what='bonus' LIMIT 1";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`, `what`, `title`, `sort`, `visible`, `locked`, `counter`) VALUES ('main','bonus','Aktiv-Rallye',7,'Y','Y', 0)";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE what='bonus' LIMIT 1";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`, `what`, `title`, `sort`, `visible`, `locked`, `counter`) VALUES ('main','bonus','Aktiv-Rallye',7,'Y','Y', 0)";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Aktiv-Rallye mit Klick-Vergütung hinzugefügt.";
case "0.2.8": // SQL queries for v0.2.8
$SQLs[] = "UPDATE "._MYSQL_PREFIX."_bonus SET timestamp='0' WHERE timestamp='0000000000'";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus_turbo CHANGE points points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` CHANGE turbo_bonus turbo_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` CHANGE login_bonus login_bonus FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "5 Nachkommastellen implementiert";
break;
case "0.3.4": // SQL queries for v0.3.4
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_bonus','Aktiv-Rallye-Teilnehmer','Listet alle Mitglieder auf, die einen Aktiv-Bonus haben und zeigt die derzeit möglichen Gewinner an.', 10)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_bonus','Aktiv-Rallye-Teilnehmer','Listet alle Mitglieder auf, die einen Aktiv-Bonus haben und zeigt die derzeit möglichen Gewinner an.', 10)";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Link <U>Aktiv-Rallye-Teilnehmer</U> hinzugefügt, inklusive manuelle Vorbereitung der Vergütung.";
break;
case "0.3.5": // SQL queries for v0.3.5
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_mode ENUM('UID','JACKPOT','ADD') NOT NULL DEFAULT 'ADD'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_mode ENUM('UID','JACKPOT','ADD') NOT NULL DEFAULT 'ADD'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Der Login-Bonus Aktiv-Bonus (= Klick-Bonus) können nun zuerst von einem Mitgliederaccount (das sollte Ihres sein!), vom Jackpot abgezogen oder einfach dazuadiert werden.";
break;
case "0.4.0": // SQL queries for v0.4.0
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".($_CONFIG['one_day']*7)."";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_lines BIGINT(20) UNSIGNED NOT NULL DEFAULT 10";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".($_CONFIG['one_day']*7)."";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_lines BIGINT(20) UNSIGNED NOT NULL DEFAULT 10";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Automatisches Löschen von Turbo-Bonus-Zeilen ("._MYSQL_PREFIX."_bonus_turbo) und begrenzte Anzahl von Einträgen hinzugefügt.";
break;
case "0.4.4": // SQL queries for v0.4.4
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 15.00000";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_stats FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '5.00000'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_active ENUM('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_stats FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 15.00000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_stats FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '5.00000'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_active ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD bonus_stats FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_stats ADD is_stats ENUM('Y','N') NOT NULL DEFAULT 'N'";
// Update notes (these will be set as task text!)
break;
case "0.4.7": // SQL queries for v0.4.7
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_user_data SET login_bonus=0, turbo_bonus=0,bonus_ref=0,bonus_order=0,bonus_stats=0";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_user_data` SET login_bonus=0, turbo_bonus=0,bonus_ref=0,bonus_order=0,bonus_stats=0";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Die Aktiv-Rallye wurde nicht auf 0 {!POINTS!} gesetzt. Dieser Fehler ist nun behoben. Allerdings ist mit diesem Update auch die Aktiv-Rallye zurückgesetzt worden.";
break;
case "0.6.4": // SQL queries for v0.6.4
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='Aktiv-Rallye' WHERE what='config_bonus' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET title='Aktiv-Rallye' WHERE what='config_bonus' LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Der Menüpunkt "Bonus-{!POINTS!}" unter Einstellungen wird nach "Aktiv-Rallye umbenannt. Und die Aktiv-Rallye konnte aufgrund eines Template-Fehlers nicht gespeichert werden.";
break;
case "0.6.9": // SQL queries for v0.6.9
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_order_yn ENUM('Y','N') NOT NULL DEFAULT 'N'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_ref_yn ENUM('Y','N') NOT NULL DEFAULT 'N'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_stats_yn ENUM('Y','N') NOT NULL DEFAULT 'N'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_login_yn ENUM('Y','N') NOT NULL DEFAULT 'N'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_click_yn ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_order_yn ENUM('Y','N') NOT NULL DEFAULT 'N'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_ref_yn ENUM('Y','N') NOT NULL DEFAULT 'N'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_stats_yn ENUM('Y','N') NOT NULL DEFAULT 'N'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_login_yn ENUM('Y','N') NOT NULL DEFAULT 'N'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_click_yn ENUM('Y','N') NOT NULL DEFAULT 'Y'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Es können nun auch die folgenden Vergütungen bei der Auswertung der monatlichen Aktiv-Rallye mit berücksichtigt werden: Mailbestätigung (war vorher schon), Login-, Mailbuchung, Referal und Statistik-Bonus (100% Klickrate erreicht).";
break;
case "0.7.7": // SQL queries for v0.7.7
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_en_notify ENUM('Y','N') NOT NULL DEFAULT 'N'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_di_notify ENUM('Y','N') NOT NULL DEFAULT 'N'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_new_mem_notify ENUM('Y','N') NOT NULL DEFAULT 'N'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_notify_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD bonus_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_en_notify ENUM('Y','N') NOT NULL DEFAULT 'N'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_di_notify ENUM('Y','N') NOT NULL DEFAULT 'N'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_new_mem_notify ENUM('Y','N') NOT NULL DEFAULT 'N'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_notify_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_notify_wait BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD bonus_ral_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD bonus_ral_en_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD bonus_ral_di_notify BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Optionale automatische Benachrichtigung über aktivierte und/oder deaktivierte Aktiv-Rallye einstellbar.";
break;
case "0.8.2": // SQL queries for v0.8.2
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD bonus_include_own ENUM('Y','N') NOT NULL DEFAULT 'N'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD bonus_include_own ENUM('Y','N') NOT NULL DEFAULT 'N'";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus ADD is_notify ENUM('Y','N') NOT NULL DEFAULT 'N'";
// Update notes (these will be set as task text!)
break;
case "0.8.3": // SQL queries for v0.8.3
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='rals', sort='2', title='Aktiv-Rallye' WHERE what='bonus' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET action='rals', sort='2', title='Aktiv-Rallye' WHERE what='bonus' LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut.";
break;
case "0.8.7": // SQL queries for v0.8.7
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','list_notifications','Benachrichtigungen','Listet alle an die Mitglieder ausgesandten Benachrichtigungen auf.', 10)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','list_notifications','Benachrichtigungen','Listet alle an die Mitglieder ausgesandten Benachrichtigungen auf.', 10)";
// Update notes
$UPDATE_NOTES = "Benachrichtigungsmails für z.B. Bettel- oder Aktiv-Rallye werden nun angezeigt.";
) TYPE=MyISAM COMMENT='Member points booking table'";
// Admin menu
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_booking','Kontoauszug','Einstellungen am Kontoauszug für Mitglieder vornehmen.', 14)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_booking','Kontoauszug','Kontoauszüge aller Ihrer Mitglieder oder eines einzelnen Mitgliedes anzeigen.',10)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_booking','Kontoauszug','Einstellungen am Kontoauszug für Mitglieder vornehmen.', 14)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_booking','Kontoauszug','Kontoauszüge aller Ihrer Mitglieder oder eines einzelnen Mitgliedes anzeigen.',10)";
// Member menu
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','booking','{!POINTS!}-Kontoauszug',5,'Y','Y')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','booking','{!POINTS!}-Kontoauszug',5,'Y','Y')";
break;
case "remove": // Do stuff when removing extension
$SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_user_book`";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE `what` IN ('config_booking','list_booking') LIMIT 2";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE `what`='booking' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE `what` IN ('config_booking','list_booking') LIMIT 2";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE `what`='booking' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_update BIGINT(20) UNSIGNED NOT NULL DEFAULT 3600";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_path VARCHAR(255) NOT NULL DEFAULT 'cache/'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_tested TINYINT(1) UNSIGNED NOT NULL DEFAULT 0";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_cache','Cache-Einstellungen','Update-Interval des Caches usw. können Sie hier ändern.', 9)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD cache_update BIGINT(20) UNSIGNED NOT NULL DEFAULT 3600";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD cache_path VARCHAR(255) NOT NULL DEFAULT 'cache/'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD cache_tested TINYINT(1) UNSIGNED NOT NULL DEFAULT 0";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_cache','Cache-Einstellungen','Update-Interval des Caches usw. können Sie hier ändern.', 9)";
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='config_cache' OR what='cache_stats' LIMIT 2";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what='config_cache' OR what='cache_stats' LIMIT 2";
break;
case "activate": // Do stuff when admin activates this extension
break;
case "0.0.7": // SQL queries for v0.0.7
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD db_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats','cache_stats','DB-Cache','Auf Cache und gesamte Datenbank registrierte Anfragen anzeigen.', 4)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD db_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD cache_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats','cache_stats','DB-Cache','Auf Cache und gesamte Datenbank registrierte Anfragen anzeigen.', 4)";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Hits auf den Cache werden gezählt.";
break;
case "0.1.3": // SQL queries for v0.1.3
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_admins ENUM('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_acls ENUM('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_exts ENUM('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_config ENUM('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_modreg ENUM('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_refdepth ENUM('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_refsys ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD cache_admins ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD cache_acls ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD cache_exts ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD cache_config ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD cache_modreg ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD cache_refdepth ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD cache_refsys ENUM('Y','N') NOT NULL DEFAULT 'Y'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Alle cache-baren Tabellen sind nun einzelnt ein- bzw. ausschaltbar. Falls die eine oder andere ausgelagerte Tabelle also Fehler verursachen sollte, so können Sie diese hier abschalten. Beachten Sie aber bitte, dass dann mehr Abfragen an die Datenbank gestellt wird und dies bedeutend mehr Zeit braucht, als nur die Daten aus einem Datenfeld zu laden, das sich im Speicher aufhält.";
break;
case "0.1.8": // SQL queries for v0.1.8
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_themes ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD cache_themes ENUM('Y','N') NOT NULL DEFAULT 'Y'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Daten von installierten Themes werden nun gecacht.";
break;
case "0.1.9": // SQL queries for v0.1.9
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD cache_admin_menu ENUM('Y','N') NOT NULL DEFAULT 'N'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD cache_admin_menu ENUM('Y','N') NOT NULL DEFAULT 'N'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Administratormenü experimentell gecacht.";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_countries (code, descr, is_active) VALUES ('DE','Deutschland','Y')";
// Admin menu
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('country', NULL, 'Ländercodes verwalten','Stellen Sie hier Ländercodes ein, damit auch internationale Mitglieder sich zu Ihrem {!MT_WORD!} anmelden können.', 8)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('country','list_country','Verwalten','Hinzufügen, Ändern und Löschen von Ländercodes.', 1)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('country', NULL, 'Ländercodes verwalten','Stellen Sie hier Ländercodes ein, damit auch internationale Mitglieder sich zu Ihrem {!MT_WORD!} anmelden können.', 8)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('country','list_country','Verwalten','Hinzufügen, Ändern und Löschen von Ländercodes.', 1)";
// Add entry to user table
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD country_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 1";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD country_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 1";
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_countries";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='country' LIMIT 2";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='country' LIMIT 2";
break;
case "activate": // Do stuff when admin activates this extension
// --- SETTINGS ---
//
// Minimum points to double
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_min FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_min FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000";
// Maximum points to double
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_max FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 10000.00000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_max FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 10000.00000";
// Points left on users account after doubling
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_left BIGINT(20) UNSIGNED NOT NULL DEFAULT 1000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_left BIGINT(20) UNSIGNED NOT NULL DEFAULT 1000";
// Charge for doubling points which goes to the webmaster (shreddered in fact!)
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_charge FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.03000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_charge FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.03000";
// Referal percents
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_ref FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.02000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_ref FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.02000";
// Shall I use the jackpot to take points from? (Y/N, default=Y)
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_jackpot ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_jackpot ENUM('Y','N') NOT NULL DEFAULT 'Y'";
// A user account to take points from (default: 0->none)
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
// Total payed out points from your doublers
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
// Sending mode of mails (immediately/daily reset)
// --> This also means who fast the doubled points will be payed out!
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_send_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'DIRECT'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_send_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'DIRECT'";
// Timeout for entries to be purged (default: one week)
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".($_CONFIG['one_day']*7)."";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".($_CONFIG['one_day']*7)."";
// Number of newest entries to display
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_display_new TINYINT(3) UNSIGNED NOT NULL DEFAULT 10";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_display_new TINYINT(3) UNSIGNED NOT NULL DEFAULT 10";
// Number of entries which will be payed out soon
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_display_pay TINYINT(3) UNSIGNED NOT NULL DEFAULT 10";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_display_pay TINYINT(3) UNSIGNED NOT NULL DEFAULT 10";
// Number of entries which are already payed out
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_display_old TINYINT(3) UNSIGNED NOT NULL DEFAULT 10";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_display_old TINYINT(3) UNSIGNED NOT NULL DEFAULT 10";
// Points used by every member
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD doubler_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD doubler_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
// Counter for usage of the doubler
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_counter BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_counter BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
//
// --- MENU SYSTEMS ---
//
// Admin menu
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler', NULL, '{!POINTS!}-Verdoppler','Einstellungen und Einträge auflisten.', 4)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler','list_doubler','Auflisten','Einträge aus der Verdiensttabelle auflisten', 1)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler','config_doubler','Einstellungen','Prozentuale Gebühr usw. einstellen.', 2)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler', NULL, '{!POINTS!}-Verdoppler','Einstellungen und Einträge auflisten.', 4)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler','list_doubler','Auflisten','Einträge aus der Verdiensttabelle auflisten', 1)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('doubler','config_doubler','Einstellungen','Prozentuale Gebühr usw. einstellen.', 2)";
// Guest menu (informations / default doubler link)
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','doubler','Verdoppeln!',3,'Y','Y')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','doubler','Verdoppeln!',3,'Y','Y')";
// Member menu
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','doubler','Verdoppeln!','Y','Y',7)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','doubler','Verdoppeln!','Y','Y',7)";
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_doubler";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='doubler' LIMIT 3";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_guest_menu WHERE what='doubler' LIMIT 1";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE what='doubler' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='doubler' LIMIT 3";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_guest_menu` WHERE what='doubler' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE what='doubler' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='N' WHERE what='doubler' LIMIT 1";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='Y', locked='N' WHERE what='doubler' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='Y', locked='N' WHERE what='doubler' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='Y', locked='N' WHERE what='doubler' LIMIT 1";
$SQLs[] = "UPDATE "._MYSQL_PREFIX."_mod_reg SET locked='N', hidden='N', admin_only='N', mem_only='N' WHERE module='doubler' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='N', locked='Y' WHERE what='doubler' LIMIT 1";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='N', locked='Y' WHERE what='doubler' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='N', locked='Y' WHERE what='doubler' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='N', locked='Y' WHERE what='doubler' LIMIT 1";
$SQLs[] = "UPDATE "._MYSQL_PREFIX."_mod_reg SET locked='Y' WHERE module='doubler' LIMIT 1";
break;
case "0.0.2": // SQL queries for v0.0.2
// Total used points
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_used FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_used FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Gebühr wird vom Verdoppler-Pott abgezogen.";
case "0.0.4": // SQL queries for v0.0.4
// Shall I use the doubler's account to take points from? (Y/N, default=Y)
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_own ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_own ENUM('Y','N') NOT NULL DEFAULT 'Y'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = POINTS."-Guthaben des Verdopplers kann optional nicht mit einbezogen werden.";
break;
case "0.0.6": // SQL queries for v0.0.6
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_max_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT 1";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_group_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT 1";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD doubler_sent_all ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_max_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT 1";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_group_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT 1";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD doubler_sent_all ENUM('Y','N') NOT NULL DEFAULT 'Y'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Gebührenabzug wird beim Einzahlen abgezogen (wurde von Auszahlung abgezogen) und maximal bei Auszahlung zu kontrollierende Accounts einstellbar.<br />Template <u>admin_config_doubler_pro.tpl</u> ist überflüssig geworden. Bitte löschen Sie dies!";
break;
case "0.1.4": // SQL queries for v0.1.4
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='extras', sort='4' WHERE what='doubler' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET action='extras', sort='4' WHERE what='doubler' LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut.";
) TYPE=MyISAM";
// Add default values to config
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD holiday_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD holiday_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'";
// Add member menu
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','holiday','Urlaubsschaltung','4','Y','Y')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','holiday','Urlaubsschaltung','4','Y','Y')";
// Add admin menus
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, sort, descr) VALUES ('holiday', NULL, 'Urlaubsmanagement','4','Hier können Sie Urlaubsschaltungen Ihrer Mitglieder auflisten oder auch wieder aufheben.')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, sort, descr) VALUES ('holiday','list_holiday','Auflisten','1','Alle Urlaubsschaltungen auflisten.')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, sort, descr) VALUES ('holiday','del_holiday','Urlaub beenden','2','Urlaubsschaltungen aufheben. Geben Sie bitte mehr als nur "Verstoss gegen unsere AGBs" ein!')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, sort, descr) VALUES ('holiday','config_holiday','Einstellungen','3','Maximale Tage für Urlaub usw. einstellen.')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (action, what, title, sort, descr) VALUES ('holiday', NULL, 'Urlaubsmanagement','4','Hier können Sie Urlaubsschaltungen Ihrer Mitglieder auflisten oder auch wieder aufheben.')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (action, what, title, sort, descr) VALUES ('holiday','list_holiday','Auflisten','1','Alle Urlaubsschaltungen auflisten.')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (action, what, title, sort, descr) VALUES ('holiday','del_holiday','Urlaub beenden','2','Urlaubsschaltungen aufheben. Geben Sie bitte mehr als nur "Verstoss gegen unsere AGBs" ein!')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (action, what, title, sort, descr) VALUES ('holiday','config_holiday','Einstellungen','3','Maximale Tage für Urlaub usw. einstellen.')";
// Remove 0 max mails per day
$SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_max_receive WHERE value='0' LIMIT 1";
case "remove": // Do stuff when removing extension
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_holidays";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE what='holiday' LIMIT 1";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='holiday' LIMIT 4";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE what='holiday' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='holiday' LIMIT 4";
$SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_max_receive WHERE value='0' LIMIT 1";
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_max_receive (value, comment) VALUES ('0','Urlaub')";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='N' WHERE what='holiday' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='Y', locked='N' WHERE what='holiday' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='N', locked='Y' WHERE what='holiday' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='N', locked='Y' WHERE what='holiday' LIMIT 1";
break;
case "update": // Update an extension
break;
case "0.1.3": // SQL queries for v0.1.3
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD holiday_active ENUM('Y','N') NOT NULL DEFAULT 'N'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD holiday_active ENUM('Y','N') NOT NULL DEFAULT 'N'";
$SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_max_receive WHERE value='0' LIMIT 1";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD holiday_lock BIGINT(20) UNSIGNED NOT NULL DEFAULT '".($_CONFIG['one_day']*2)."'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD holiday_lock BIGINT(20) UNSIGNED NOT NULL DEFAULT '".($_CONFIG['one_day']*2)."'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Die Mitglieder-Accounts werden nicht mehr gesperrt, sondern nur auf <STRONG>Urlaub</STRONG> geschaltet. Lassen Sie sich nicht davon verwirren, dass sie "freigegeben" sind!";
break;
case "0.1.4": // SQL queries for v0.1.4
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD holiday_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD holiday_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Urlaubsschaltung wird erst Abends um 00:00 Uhr aktiv und nicht durch die Beantragung. Dies kann nun auch auf direkte Umstellung eingestellt werden.";
break;
case "0.1.5": // SQL queries for v0.1.5
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD holiday_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD holiday_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Sicherheitsupdate für die Include-Befehle.";
break;
case "0.1.6": // SQL queries for v0.1.6
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD holiday_activated BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD holiday_activated BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Fehlende Tabellenspalte hinzugefügt.";
break;
case "0.1.9": // SQL queries for v0.1.9
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='account', sort='2', title='In Urlaub' WHERE what='holiday' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET action='account', sort='2', title='In Urlaub' WHERE what='holiday' LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut.";
break;
case "0.2.0": // SQL queries for v0.2.0
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title = 'Urlaubsmanagement' WHERE action = 'holiday' AND (what='' OR what IS NULL) LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET title = 'Urlaubsmanagement' WHERE action = 'holiday' AND (what='' OR what IS NULL) LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut.";
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD html ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD html ENUM('Y','N') NOT NULL DEFAULT 'Y'";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus ADD html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_pool ADD html_msg ENUM('Y','N') NOT NULL DEFAULT 'N'";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','html_mail','HTML-Empfang','3','Y','Y')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','html_mail','HTML-Empfang','3','Y','Y')";
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data DROP html";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` DROP html";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_bonus DROP html_msg";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_pool DROP html_msg";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE what='html_mail' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE what='html_mail' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='N' WHERE what='html_mail' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='Y', locked='N' WHERE what='html_mail' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='N', locked='Y' WHERE what='html_mail' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='N', locked='Y' WHERE what='html_mail' LIMIT 1";
break;
case "update": // Update an extension
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD maintenance ENUM('Y','N') NOT NULL DEFAULT 'N';";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','maintenance','Wartungsmodus','Schalten Sie den Wartungsmodus ein, nur wenn sehr schwerwiegende Fehler vorliegen, die Sie oder mxchange.org nicht schenll genug beheben können.','10')";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD maintenance ENUM('Y','N') NOT NULL DEFAULT 'N';";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','maintenance','Wartungsmodus','Schalten Sie den Wartungsmodus ein, nur wenn sehr schwerwiegende Fehler vorliegen, die Sie oder mxchange.org nicht schenll genug beheben können.','10')";
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='maintenance' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what='maintenance' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
case "remove": // Do stuff when removing extension
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_mediadata";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='config_mediadata' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what='config_mediadata' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
break;
case "0.0.7": // SQL queries for v0.0.7
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mt_start BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mt_stage BIGINT(20) UNSIGNED NOT NULL DEFAULT '500'";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_mediadata','Mediendaten','Stellen Sie allgemeine Einstellungen zu den Mediendaten ein.', 10)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD mt_start BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD mt_stage BIGINT(20) UNSIGNED NOT NULL DEFAULT '500'";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_mediadata','Mediendaten','Stellen Sie allgemeine Einstellungen zu den Mediendaten ein.', 10)";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Start des {!MT_WORD2!} und Anzahl Anmeldungen aufgenommen. (Task #13)<br />
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('mods', NULL, 'Modul-Management','Verwalten Sie die Basis-Module index, login, admin usw.', 4)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('mods','config_mods','Module ändern','Ändern Sie hier die Zugtiffsrechte auf die Module. Was dennoch nicht geht: Mitglied- oder Gastzugriffsrtechte auf Admin-Module bzw. Gastzugriffsrechte auf Mitglieder-Module. Diese sind extra abgesichert.', 1)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('mods','stats_mods','Modul-Statistiken','Sehen Sie sich hier die Statistiken der Module und die damit verknüpften action- und what-Dateien an. Bei einigen Modulen gibt es allerdings keine verknüpften Dateien und somit keine Extra-Statistik.', 2)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('mods', NULL, 'Modul-Management','Verwalten Sie die Basis-Module index, login, admin usw.', 4)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('mods','config_mods','Module ändern','Ändern Sie hier die Zugtiffsrechte auf die Module. Was dennoch nicht geht: Mitglied- oder Gastzugriffsrtechte auf Admin-Module bzw. Gastzugriffsrechte auf Mitglieder-Module. Diese sind extra abgesichert.', 1)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('mods','stats_mods','Modul-Statistiken','Sehen Sie sich hier die Statistiken der Module und die damit verknüpften action- und what-Dateien an. Bei einigen Modulen gibt es allerdings keine verknüpften Dateien und somit keine Extra-Statistik.', 2)";
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='mods' LIMIT 3";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='mods' LIMIT 3";
break;
case "activate": // Do stuff when admin activates this extension
break;
case "0.0.8": // SQL queries for v0.0.8
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title = 'Modul-Management' WHERE action = 'mods' AND (what='' OR what IS NULL) LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET title = 'Modul-Management' WHERE action = 'mods' AND (what='' OR what IS NULL) LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Verwaltung auf Management umgestellt.";
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='newsletter' AND what != 'send_newsletter' LIMIT 3";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE what='newsletter' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='newsletter' AND what != 'send_newsletter' LIMIT 3";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE what='newsletter' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET locked='N', visible='Y' WHERE what='newsletter' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET locked='N', visible='Y' WHERE what='newsletter' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET locked='Y', visible='N' WHERE what='newsletter' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET locked='Y', visible='N' WHERE what='newsletter' LIMIT 1";
break;
case "update": // Update an extension
switch ($EXT_VER)
{
case "0.0.1": // SQL queries for v0.0.1
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter', NULL, 'Newsletter','Einstellungen am Newsletter, Newsletter versenden, Abbestellungen auflisten usw.', 3)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter','list_newsletter','Abbestellungen','Alle Abbestellungen auflisten und bearbeiten.', 2)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter','config_newsletter','Einstellungen','Gebühr zum Abbestellen des Newsletters usw. sind hier einstellbar.', 3)";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET action='newsletter', what='send_newsletter', title='Versenden', sort='1' WHERE what='newsletter' LIMIT 1";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','newsletter','Newsletter-Empfang','N','Y', 10)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD nl_charge FLOAT(10,2) UNSIGNED NOT NULL DEFAULT '5.00'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD nl_receive ENUM('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD nl_until VARCHAR(10) NOT NULL DEFAULT 0";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD nl_timespan VARCHAR(10) NOT NULL DEFAULT 0";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter', NULL, 'Newsletter','Einstellungen am Newsletter, Newsletter versenden, Abbestellungen auflisten usw.', 3)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter','list_newsletter','Abbestellungen','Alle Abbestellungen auflisten und bearbeiten.', 2)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter','config_newsletter','Einstellungen','Gebühr zum Abbestellen des Newsletters usw. sind hier einstellbar.', 3)";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET action='newsletter', what='send_newsletter', title='Versenden', sort='1' WHERE what='newsletter' LIMIT 1";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','newsletter','Newsletter-Empfang','N','Y', 10)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD nl_charge FLOAT(10,2) UNSIGNED NOT NULL DEFAULT '5.00'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD nl_receive ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD nl_until VARCHAR(10) NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD nl_timespan VARCHAR(10) NOT NULL DEFAULT 0";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Vor der eigentlichen Freigabe dieser Erweiterungen habe ich sie versehendlich im Archiv mit auf den Server hochgeladen. Diese Version fügt die bereits angekündigte Funktionalitäten, wie zum Beispiel das Einstellen der Abschaltgebühr.";
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD nickname VARCHAR(255) NOT NULL DEFAULT ''";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD nick_uid ENUM ('nick','uid') NOT NULL DEFAULT 'uid'";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','nickname','Nicknamen','5','Y','Y')";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD nickname VARCHAR(255) NOT NULL DEFAULT ''";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD nick_uid ENUM ('nick','uid') NOT NULL DEFAULT 'uid'";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','nickname','Nicknamen','5','Y','Y')";
// Load CSS file?
$EXT_CSS = "Y";
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE what='nickname' LIMIT 1";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what IN ('config_nickname','list_nickname') LIMIT 2";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE what='nickname' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what IN ('config_nickname','list_nickname') LIMIT 2";
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_nickname_history";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='N' WHERE what='nickname' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='Y', locked='N' WHERE what='nickname' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='N', locked='Y' WHERE what='nickname' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='N', locked='Y' WHERE what='nickname' LIMIT 1";
break;
case "update": // Update an extension
break;
case "0.0.6": // SQL queries for v0.0.6
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD nickname_len TINYINT(3) UNSIGNED NOT NULL DEFAULT '5'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD nickname_pattern VARCHAR(255) NOT NULL DEFAULT 'a-zA-Z0-9_'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD nickname_chars VARCHAR(255) NOT NULL DEFAULT 'a-z, A-Z, 0-9, _'";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_nickname','Nicknamen','Stellen Sie minimale Nicknamenlänge, sowie erlaubte Zeichen hier ein.', 12)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD nickname_len TINYINT(3) UNSIGNED NOT NULL DEFAULT '5'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD nickname_pattern VARCHAR(255) NOT NULL DEFAULT 'a-zA-Z0-9_'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD nickname_chars VARCHAR(255) NOT NULL DEFAULT 'a-z, A-Z, 0-9, _'";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_nickname','Nicknamen','Stellen Sie minimale Nicknamenlänge, sowie erlaubte Zeichen hier ein.', 12)";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Minimale Länge, sowie erlaubte Zeichen sind per Adminbereich änderbar. Setzen Sie als erlaubte Zeichen nur URL-konforme Zeichen ein!";
break;
case "0.1.1": // SQL queries for v0.1.1
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data DROP nick_uid";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` DROP nick_uid";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Auswahlfür Mitglied ob mit Nickname oder User-ID einloggen entfernt.";
break;
case "0.1.6": // SQL queries for v0.1.6
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='extras', sort='2' WHERE what='nickname' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET action='extras', sort='2' WHERE what='nickname' LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut.";
break;
case "0.1.9": // SQL queries for v0.1.9
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_nickname','Nickname-Historie','Listet alle verwendeten Nicknames der Mitglieder auf.', 12)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_nickname','Nickname-Historie','Listet alle verwendeten Nicknames der Mitglieder auf.', 12)";
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_nickname_history";
$SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_nickname_history (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
KEY(userid),
KEY(refid)
) TYPE=MyISAM";
- $SQLs[]="INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','usr_online','Online-Statistik','Eine Liste von derzeit "Online" Usern. Doppelte Einträge könnte auf mangelnden Cookie-Support des Browsers oder auf einen Spider hindeuten.', 1)";
+ $SQLs[]="INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','usr_online','Online-Statistik','Eine Liste von derzeit "Online" Usern. Doppelte Einträge könnte auf mangelnden Cookie-Support des Browsers oder auf einen Spider hindeuten.', 1)";
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_online";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='usr_online' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what='usr_online' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='Y', locked='N' WHERE action='online' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='Y', locked='N' WHERE action='online' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='N', locked='Y' WHERE action='online' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='N', locked='Y' WHERE action='online' LIMIT 1";
break;
case "update": // Update an extension
gain decimal(10,3) NOT NULL DEFAULT '0.000',
PRIMARY KEY(id)
) TYPE=MyISAM";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','optimize','DB optimieren','Führen Sie dies ab und an aus, damit überflüssige Daten aus der Datenbank entfernt werden.','5')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('misc','optimize','DB optimieren','Führen Sie dies ab und an aus, damit überflüssige Daten aus der Datenbank entfernt werden.','5')";
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_optimize_gain";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='optimize' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what='optimize' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='config_order' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what='config_order' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='N' WHERE what='order' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='Y', locked='N' WHERE what='order' LIMIT 1";
$SQLs[] = "UPDATE "._MYSQL_PREFIX."_mod_reg SET locked='N', hidden='N', admin_only='N', mem_only='Y' WHERE module='order' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='N', locked='Y' WHERE what='order' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='N', locked='Y' WHERE what='order' LIMIT 1";
$SQLs[] = "UPDATE "._MYSQL_PREFIX."_mod_reg SET visible='N', locked='Y' WHERE module='order' LIMIT 1";
break;
switch ($EXT_VER)
{
case "0.1": // SQL queries for v0.1
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD order_max_full ENUM('ORDER','MAX') NOT NULL DEFAULT 'MAX'";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, sort, descr) VALUES ('setup','config_order','Mailbuchungsseite','7','Einstellungen am Mailbuchungsformular.')";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD order_max_full ENUM('ORDER','MAX') NOT NULL DEFAULT 'MAX'";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (action, what, title, sort, descr) VALUES ('setup','config_order','Mailbuchungsseite','7','Einstellungen am Mailbuchungsformular.')";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Maximale Mailbuchungen sind nun vom maximalen Empfang abhägig.";
break;
case "0.1.1": // SQL queries for v0.1.1
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='config_order' LIMIT 1";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, sort, descr) VALUES ('setup','config_order','Mailbuchungsseite','7','Einstellungen am Mailbuchungsformular.')";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD mail_orders BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what='config_order' LIMIT 1";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (action, what, title, sort, descr) VALUES ('setup','config_order','Mailbuchungsseite','7','Einstellungen am Mailbuchungsformular.')";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD mail_orders BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Maximale Mailbuchung vervollständigt (Admin-Bereich und im Buchungsformular selber).";
break;
case "0.2.3": // SQL queries for v0.2.3
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD order_min BIGINT(20) UNSIGNED NOT NULL DEFAULT 10";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD order_min BIGINT(20) UNSIGNED NOT NULL DEFAULT 10";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Minimum an Empfänger pro Mailbuchung einstellbar. Standart: 10 Empfänger";
break;
case "0.3.1": // SQL queries for v0.3.1
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD order_select VARCHAR(255) NOT NULL DEFAULT 'userid'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD order_mode ENUM('ASC','DESC') NOT NULL DEFAULT 'DESC'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD order_select VARCHAR(255) NOT NULL DEFAULT 'userid'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD order_mode ENUM('ASC','DESC') NOT NULL DEFAULT 'DESC'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Beworbene URL wird nun getestet.";
break;
case "0.4.6": // SQL queries for v0.4.6
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('order',NULL,'Mailbuchungen',3,'Y','N')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('order','order2','Framekiller-Mails',2,'Y','N')";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='order', sort='1', title='Klick-Mails' WHERE what='order' LIMIT 1";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('order',NULL,'Mailbuchungen',3,'Y','N')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('order','order2','Framekiller-Mails',2,'Y','N')";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET action='order', sort='1', title='Klick-Mails' WHERE what='order' LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut.";
break;
case "0.4.8": // SQL queries for v0.4.8
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='Mailbuchung' WHERE what='config_order' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET title='Mailbuchung' WHERE what='config_order' LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Menüpunkt "Mailbuchungsseite" nach "Mailbuchung" umbenannt und weitere Einstellungen aus Sonstige Einstellungen verschoben.";
break;
case "0.4.9": // SQL queries for v0.4.9
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD repay_deleted_mails ENUM('REPAY','JACKPOT','SHRED') NOT NULL DEFAULT 'REPAY'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD repay_deleted_mails ENUM('REPAY','JACKPOT','SHRED') NOT NULL DEFAULT 'REPAY'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Bei Löschung von Mailbuchungen kann nun global entschieden werden (Einstellungen also), ob die verbliebenen {!POINTS!} wieder gutgeschrieben werden sollen oder in den Jackpot landen.";
if ((isBooleanConstantAndTrue('__DAILY_RESET')) && (isBooleanConstantAndTrue('mxchange_installed')) && (isBooleanConstantAndTrue('mxchange_installed')) && (isBooleanConstantAndTrue('admin_registered')) && (GET_EXT_VERSION("order") >= "0.1.1"))
{
// Reset mail order values
- $result_ext = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_user_data SET mail_orders=0 WHERE mail_orders > 0", __FILE__, __LINE__);
+ $result_ext = SQL_QUERY("UPDATE `"._MYSQL_PREFIX."_user_data` SET mail_orders=0 WHERE mail_orders > 0", __FILE__, __LINE__);
}
break;
}
break;
case "0.0.4": // SQL queries for v0.0.4
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD max_comma TINYINT(3) UNSIGNED NOT NULL DEFAULT '3'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD max_comma TINYINT(3) UNSIGNED NOT NULL DEFAULT '3'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Angezeigte Kommastellen können zwischen 0 und 5 eingestellt werden.";
break;
case "0.1.6": // SQL queries for v0.1.6
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD reject_url VARCHAR(255) NOT NULL DEFAULT '".URL."'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD reject_url VARCHAR(255) NOT NULL DEFAULT '".URL."'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Bei Ablehnung der URL wird jetzt endlich eine Standart-URL eingesetzt, die konfigurierbar ist. Fehler beim Laden der Konfiguration gefunden.";
break;
case "0.1.7": // SQL queries for v0.1.7
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD currency VARCHAR(255) NOT NULL DEFAULT '€'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD currency VARCHAR(255) NOT NULL DEFAULT '€'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Standart-Währung der Gebühren für alle Erweiterungen geltend hinzugefügt.";
break;
case "0.1.9": // SQL queries for v0.1.9
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mailid_error_redirect ENUM('index','reject') NOT NULL DEFAULT 'index'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD mailid_error_redirect ENUM('index','reject') NOT NULL DEFAULT 'index'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Bei fehlerhafter Mail während der Bestätigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden.";
min_points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY(id)
) TYPE=MyISAM";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_payouts','Auszahlungen','Auszahlungsarten einstellen, neu anlegen oder löschen.','15')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('payouts','list_payouts','Anfragen auflisten','Listet alle Auszahlungsanfragen Ihrer Mitglieder auf.','16')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','payout','Auszahlungen','N','N','11')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_payouts','Auszahlungen','Auszahlungsarten einstellen, neu anlegen oder löschen.','15')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('payouts','list_payouts','Anfragen auflisten','Listet alle Auszahlungsanfragen Ihrer Mitglieder auf.','16')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','payout','Auszahlungen','N','N','11')";
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_payouts";
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_payout_types";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='payouts'";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE what='payout' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='payouts'";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE what='payout' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='N' WHERE what='payout' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='Y', locked='N' WHERE what='payout' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='N', locked='Y' WHERE what='payout' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='N', locked='Y' WHERE what='payout' LIMIT 1";
break;
case "update": // Update an extension
switch ($EXT_VER)
{
case "0.1.2": // SQL queries for v0.1.2
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('payouts', NULL, 'Auszahlungsmanagement','Management der Auszahlungsarten.','8')";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET action='payouts', title='Einstellungen' WHERE action='setup' AND what='config_payouts' LIMIT 1";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('payouts', NULL, 'Auszahlungsmanagement','Management der Auszahlungsarten.','8')";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET action='payouts', title='Einstellungen' WHERE action='setup' AND what='config_payouts' LIMIT 1";
break;
case "0.1.3": // SQL queries for v0.1.3
break;
case "0.3.7": // SQL queries for v0.3.7
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title = 'Auszahlungsmanagement' WHERE action = 'payouts' AND (what='' OR what IS NULL) LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET title = 'Auszahlungsmanagement' WHERE action = 'payouts' AND (what='' OR what IS NULL) LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Verwaltung nach Management umgestellt.";
) TYPE=MyISAM";
// Confiuration
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD primera_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT 40000";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD primera_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT 5000";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD primera_api_name VARCHAR(255) NOT NULL DEFAULT ''";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD primera_api_md5 VARCHAR(32) NOT NULL DEFAULT ''";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD primera_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT 40000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD primera_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT 5000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD primera_api_name VARCHAR(255) NOT NULL DEFAULT ''";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD primera_api_md5 VARCHAR(32) NOT NULL DEFAULT ''";
// User data
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD primera_userid VARCHAR(255) NOT NULL DEFAULT ''";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD primera_userid VARCHAR(255) NOT NULL DEFAULT ''";
// Admin menu
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('primera', NULL, 'Primera-Management','Konfiguration zur Primera-API einstellen, Auszahlungen auflisten usw..', 15)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('primera','config_primera','Primera-API-Einstellungen','Konfiguration zur Primera-API einstellen.', 1)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('primera','list_primera','Primera-Anfragen auflisten','Listet alle Primera-Auszahlungsanfragen Ihrer Mitglieder auf.', 2)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('primera', NULL, 'Primera-Management','Konfiguration zur Primera-API einstellen, Auszahlungen auflisten usw..', 15)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('primera','config_primera','Primera-API-Einstellungen','Konfiguration zur Primera-API einstellen.', 1)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('primera','list_primera','Primera-Anfragen auflisten','Listet alle Primera-Auszahlungsanfragen Ihrer Mitglieder auf.', 2)";
// Member menu
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','primera','Primera-Ein-/Auszahlungen','N','N','11')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','primera','Primera-Ein-/Auszahlungen','N','N','11')";
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_primera";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='primera'";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE what='primera' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='primera'";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE what='primera' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='N' WHERE what='primera' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='Y', locked='N' WHERE what='primera' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='N', locked='Y' WHERE what='primera' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='N', locked='Y' WHERE what='primera' LIMIT 1";
break;
case "update": // Update an extension
PRIMARY KEY(id)
) TYPE=MyISAM";
// Admin menu
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye', NULL, 'Rallye-Management','Richten Sie neue Ref-Rallyes ein, die zeitgesteuert anfangen und aufhöhren. Dabei wird alles weitere automatisch geregelt.','9')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','add_rallye','Neue Rallye hinzufügen','Neue Ref-Rallye hinzufügen.','1')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','config_rallye_prices','Preise einrichten','Richten Sie Preise zu den Rallyes ein.','2')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','list_rallyes','Rallyes verwalten','Alle bestehenden Ref-Rallyes auflisten, bearbeiten, stoppen, löschen usw.','3')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye', NULL, 'Rallye-Management','Richten Sie neue Ref-Rallyes ein, die zeitgesteuert anfangen und aufhöhren. Dabei wird alles weitere automatisch geregelt.','9')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','add_rallye','Neue Rallye hinzufügen','Neue Ref-Rallye hinzufügen.','1')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','config_rallye_prices','Preise einrichten','Richten Sie Preise zu den Rallyes ein.','2')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('rallye','list_rallyes','Rallyes verwalten','Alle bestehenden Ref-Rallyes auflisten, bearbeiten, stoppen, löschen usw.','3')";
// Guest menu
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','rallyes','Ref-Rallyes','Y','Y','9')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','rallyes','Ref-Rallyes','Y','Y','9')";
// Member menu
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','rallyes','Ref-Rallyes','Y','Y','9')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','rallyes','Ref-Rallyes','Y','Y','9')";
break;
case "remove": // Do stuff when removing extension
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_rallye_data";
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_rallye_prices";
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_rallye_users";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='rallye' LIMIT 4";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_guest_menu WHERE what='rallyes' LIMIT 1";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE what='rallyes' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='rallye' LIMIT 4";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_guest_menu` WHERE what='rallyes' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE what='rallyes' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='Y', locked='N' WHERE what='rallyes' LIMIT 1";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='N' WHERE what='rallyes' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='Y', locked='N' WHERE what='rallyes' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='Y', locked='N' WHERE what='rallyes' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='N', locked='Y' WHERE what='rallyes' LIMIT 1";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='N', locked='Y' WHERE what='rallyes' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='N', locked='Y' WHERE what='rallyes' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='N', locked='Y' WHERE what='rallyes' LIMIT 1";
break;
case "update": // Update an extension
break;
case "0.3.2": // SQL queries for v0.3.2
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='rals', sort='1', title='Referal-Rallye' WHERE what='rallyes' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET action='rals', sort='1', title='Referal-Rallye' WHERE what='rallyes' LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut.";
KEY (`level`),
KEY (`refid`)
) ENGINE=MyISAM COMMENT='User Referals With Refback'";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','refback','Ref-Back einstellen',4,'N','N')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','refback','Ref-Back einstellen',4,'N','N')";
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_refs";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE what='refback' LIMIT 1";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what IN('config_refback','list_refback') LIMIT 2";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE what='refback' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what IN('config_refback','list_refback') LIMIT 2";
$SQLs[] = "UPDATE "._MYSQL_PREFIX."_refsystem SET level=level-1";
break;
switch ($EXT_VER)
{
case "0.0.1": // SQL queries for v0.0.1
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD refback_enabled ENUM('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD refback_min_perc TINYINT(3) NOT NULL DEFAULT 0";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD refback_max_perc TINYINT(3) NOT NULL DEFAULT 100";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_refback','Refback','Ändern Sie Einstellungen zum Refback, wie z.B. Minium- und Maximum-Prozente, was die Mitglieder einstellen dürfen.',15)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_refback','Refback auflisten','Refback aller Mitglieder auflisten.',15)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD refback_enabled ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD refback_min_perc TINYINT(3) NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD refback_max_perc TINYINT(3) NOT NULL DEFAULT 100";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_refback','Refback','Ändern Sie Einstellungen zum Refback, wie z.B. Minium- und Maximum-Prozente, was die Mitglieder einstellen dürfen.',15)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_refback','Refback auflisten','Refback aller Mitglieder auflisten.',15)";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Refback-System ist nun ein-/ausschaltbar und minimale/maximale Refback-Prozente sind festlegbar.";
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='config_register' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what='config_register' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
$SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_must_register (field_name, field_required) VALUES ('city','Y')";
// Add admin menu
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_register','Pflichtfelder','Stellen Sie hier die Pflichtfelder sowohl im Anmeldeformular, als auch im Mitgliedsbereich unter <STRONG>Profildaten ändern</STRONG> ein.', 12)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_register','Pflichtfelder','Stellen Sie hier die Pflichtfelder sowohl im Anmeldeformular, als auch im Mitgliedsbereich unter <STRONG>Profildaten ändern</STRONG> ein.', 12)";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Einstellbare Pflichtfelder hinzugefügt.";
break;
case "0.4.2": // SQL queries for v0.4.2
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD register_default ENUM('Y','N') NOT NULL DEFAULT 'N'";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what='config_register2' WHERE what='config_reg' LIMIT 1";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD register_default ENUM('Y','N') NOT NULL DEFAULT 'N'";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET what='config_register2' WHERE what='config_reg' LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Bei der Anmeldung kann die Standart-Auswahl zwischen Ja/Nein umgeschaltet werden. Das Ändern des Templates <STRONG>templates/".GET_LANGUAGE()."/html/guest/guest_register.tpl</STRONG> ist nicht mehr nötig.";
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD `removeip_anon_ip` ENUM('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD `removeip_anon_host` ENUM('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD `removeip_anon_ua` ENUM('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD `removeip_anon_ref` ENUM('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD `removeip_admin_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD `removeip_guest_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD `removeip_member_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD `removeip_sponsor_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD `anonymous_ip` ENUM('127.0.0.1','0.0.0.0','RANDOM') NOT NULL DEFAULT '127.0.0.1'";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_removeip','Anonymität/Privatsphähre','Stellen Sie hier ein, ob die IP-Nummer, User-Agent und/oder Referer-Adresse anonymisiert im gesamten Script verwendet werden soll.',15)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `removeip_anon_ip` ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `removeip_anon_host` ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `removeip_anon_ua` ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `removeip_anon_ref` ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `removeip_admin_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `removeip_guest_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `removeip_member_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `removeip_sponsor_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `anonymous_ip` ENUM('127.0.0.1','0.0.0.0','RANDOM') NOT NULL DEFAULT '127.0.0.1'";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_removeip','Anonymität/Privatsphähre','Stellen Sie hier ein, ob die IP-Nummer, User-Agent und/oder Referer-Adresse anonymisiert im gesamten Script verwendet werden soll.',15)";
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='config_removeip' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what='config_removeip' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, sort, descr) VALUES ('repair', NULL, 'Reperaturen','7','Repariert u.a. die Kategorie-Auswahlen der Mitglieder usw.')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, sort, descr) VALUES ('repair','repair_cats','Kategorieauswahlen','1','Repariert die Kategorieauswahlen Ihrer Mitglieder.')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (action, what, title, sort, descr) VALUES ('repair', NULL, 'Reperaturen','7','Repariert u.a. die Kategorie-Auswahlen der Mitglieder usw.')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (action, what, title, sort, descr) VALUES ('repair','repair_cats','Kategorieauswahlen','1','Repariert die Kategorieauswahlen Ihrer Mitglieder.')";
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='repair' LIMIT 5";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='repair' LIMIT 5";
break;
case "activate": // Do stuff when admin activates this extension
switch ($EXT_VER)
{
case "0.1": // SQL queries for v0.1
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, sort, descr) VALUES ('repair','repair_amenu','Admin-Menü', 2, 'Repariert die Gewichtung des Admin-Menü-Systems')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, sort, descr) VALUES ('repair','repair_gmenu','Gast-Menü', 3, 'Repariert die Gewichtung des Gäste-Menü-Systems')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, sort, descr) VALUES ('repair','repair_mmenu','Mitglied-Menü', 4, 'Repariert die Gewichtung des Mitglieder-Menü-Systems')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (action, what, title, sort, descr) VALUES ('repair','repair_amenu','Admin-Menü', 2, 'Repariert die Gewichtung des Admin-Menü-Systems')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (action, what, title, sort, descr) VALUES ('repair','repair_gmenu','Gast-Menü', 3, 'Repariert die Gewichtung des Gäste-Menü-Systems')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (action, what, title, sort, descr) VALUES ('repair','repair_mmenu','Mitglied-Menü', 4, 'Repariert die Gewichtung des Mitglieder-Menü-Systems')";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Fügt ein Menüpunkt zur Reperatur der Gewichtung des Admin-Menüs hinzu.";
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='config_rewrite' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what='config_rewrite' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
break;
case "0.0.9": // SQL queries for v0.0.9
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD rewrite_skip VARCHAR(255) NOT NULL DEFAULT 'login:admin:frametester:mailid'";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_rewrite','Rewrite-Engine','Stellen Sie hier ein, welche Module übersprungen werden sollen, in denen also kein Umschreiben des HTML-Codes stattfinden soll.', 8)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD rewrite_skip VARCHAR(255) NOT NULL DEFAULT 'login:admin:frametester:mailid'";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_rewrite','Rewrite-Engine','Stellen Sie hier ein, welche Module übersprungen werden sollen, in denen also kein Umschreiben des HTML-Codes stattfinden soll.', 8)";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Zu überspringende Module können per Admin-Bereich eingestellt werden.";
//
// Admin menu
//
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor', NULL, 'Sponsorenbereich','Den Sponsorenbereich verwalten. Hier können Sie auch Sonderaktionen seperat deakvieren oder wieder aktivieren, Sponsorenaccounts verwalten usw.', 7)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','add_sponsor','Neuer Sponsor','Neues Sponsorenaccount hinzufügen.', 1)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','unlock_sponsor','Sponsor freischalten','Sponsorenaccounts freigeben / sperren.', 2)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor','Sponsoren auflisten','Listet alle verfügbaren Sponsorenaccounts auf.', 3)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','edit_sponsor','Sponsor ändern','Sponsorenaccount ändern (Grundaten, nicht Freigabe!).', 4)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','lock_sponsor','Sponsor ent-/sperren','Sponsorenaccount sperren und entsperren.', 5)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','del_sponsor','Sponsor löschen','Sponsorenaccount löschen.', 6)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','allow_sponsor_data','Datenverwaltung','Stellen Sie hier ein, welche Daten der Sponsor im Mitgliedsbereich über sicht anzeigen darf und welche nicht.', 7)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_pays','Bestellungen...','Bestellungen der Sponsoren auflisten / bearbeiten.', 8)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_menu','Sponsorenmenü','Das Sponsorenmenü kann hier geändert werden.', 9)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_campaigns','Kampagnen...','Verwaltung aller von Ihren Sponsoren eingerichteten Kampagnen.', 10)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_urls','URL-Verwaltung','Verwaltung (freischalten, sperren, löschen, testen, bearbeiten usw.) von gebuchten URLs.', 11)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_banner','Banner-Verwaltung','Verwaltung (freischalten, sperren, löschen, testen, bearbeiten usw.) von gebuchten Bannern.', 12)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_reg','Sponsor-Aktionen','Alle Sponsor-Aktionen auflisten und verwalten.', 13)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_pay','Buchungspakete','Die Sponsoren können sich {!POINTS!}-Pakete kaufen. Hier können Sie diese verwalten.', 14)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_conv','{!POINTS!} umwandeln...','Mit den vom Sponsor gekauften {!POINTS!} kann er Aktionen buchen. Hier stellen Sie die Umrechnungsrate von {!POINTS!} nach Sponsoraktionen um. Beispiel: 1 {!POINTS!} = 10 Mails.', 15)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','config_sponsor','Einstellungen','Allgemeine Einstellungen am Sponsoring-System.', 16)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('repair','repr_sponsor','Sponsormenü','Gewichtung des Sponsormenüs reparieren.', 5)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor', NULL, 'Sponsorenbereich','Den Sponsorenbereich verwalten. Hier können Sie auch Sonderaktionen seperat deakvieren oder wieder aktivieren, Sponsorenaccounts verwalten usw.', 7)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','add_sponsor','Neuer Sponsor','Neues Sponsorenaccount hinzufügen.', 1)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','unlock_sponsor','Sponsor freischalten','Sponsorenaccounts freigeben / sperren.', 2)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor','Sponsoren auflisten','Listet alle verfügbaren Sponsorenaccounts auf.', 3)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','edit_sponsor','Sponsor ändern','Sponsorenaccount ändern (Grundaten, nicht Freigabe!).', 4)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','lock_sponsor','Sponsor ent-/sperren','Sponsorenaccount sperren und entsperren.', 5)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','del_sponsor','Sponsor löschen','Sponsorenaccount löschen.', 6)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','allow_sponsor_data','Datenverwaltung','Stellen Sie hier ein, welche Daten der Sponsor im Mitgliedsbereich über sicht anzeigen darf und welche nicht.', 7)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_pays','Bestellungen...','Bestellungen der Sponsoren auflisten / bearbeiten.', 8)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_menu','Sponsorenmenü','Das Sponsorenmenü kann hier geändert werden.', 9)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_campaigns','Kampagnen...','Verwaltung aller von Ihren Sponsoren eingerichteten Kampagnen.', 10)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_urls','URL-Verwaltung','Verwaltung (freischalten, sperren, löschen, testen, bearbeiten usw.) von gebuchten URLs.', 11)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_banner','Banner-Verwaltung','Verwaltung (freischalten, sperren, löschen, testen, bearbeiten usw.) von gebuchten Bannern.', 12)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_reg','Sponsor-Aktionen','Alle Sponsor-Aktionen auflisten und verwalten.', 13)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_pay','Buchungspakete','Die Sponsoren können sich {!POINTS!}-Pakete kaufen. Hier können Sie diese verwalten.', 14)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','list_sponsor_conv','{!POINTS!} umwandeln...','Mit den vom Sponsor gekauften {!POINTS!} kann er Aktionen buchen. Hier stellen Sie die Umrechnungsrate von {!POINTS!} nach Sponsoraktionen um. Beispiel: 1 {!POINTS!} = 10 Mails.', 15)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('sponsor','config_sponsor','Einstellungen','Allgemeine Einstellungen am Sponsoring-System.', 16)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('repair','repr_sponsor','Sponsormenü','Gewichtung des Sponsormenüs reparieren.', 5)";
//
// Menu system (still admin menu)
//
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','sponsor_medit','Sponsor-Menü editieren','Hier können Sie das Sponsorenmenü verändern: Positionen verändern, Menütitel ändern usw.', 7)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','sponsor_madd','Sponsor-Menü hinzufügen','Hier können Sie einen neuen Menüpunkt hinzufügen (falls Sie z.B. eigene Sponsoraktionen entwickelt haben oder welche versehendlich gelöscht haben.', 8)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','sponsor_medit','Sponsor-Menü editieren','Hier können Sie das Sponsorenmenü verändern: Positionen verändern, Menütitel ändern usw.', 7)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('menu','sponsor_madd','Sponsor-Menü hinzufügen','Hier können Sie einen neuen Menüpunkt hinzufügen (falls Sie z.B. eigene Sponsoraktionen entwickelt haben oder welche versehendlich gelöscht haben.', 8)";
//
// Guest menu
//
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (action, what, title, sort) VALUES ('sponsor', NULL, 'Sponsoren', 2)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (action, what, title, sort) VALUES ('sponsor','sponsor_reg','Anmeldung', 1)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (action, what, title, sort) VALUES ('sponsor','sponsor_login','Einloggen', 2)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (action, what, title, sort) VALUES ('sponsor','sponsor_infos','Infos/Preise', 3)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (action, what, title, sort) VALUES ('sponsor','sponsor_agb','AGBs', 4)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_guest_menu` (action, what, title, sort) VALUES ('sponsor', NULL, 'Sponsoren', 2)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_guest_menu` (action, what, title, sort) VALUES ('sponsor','sponsor_reg','Anmeldung', 1)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_guest_menu` (action, what, title, sort) VALUES ('sponsor','sponsor_login','Einloggen', 2)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_guest_menu` (action, what, title, sort) VALUES ('sponsor','sponsor_infos','Infos/Preise', 3)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_guest_menu` (action, what, title, sort) VALUES ('sponsor','sponsor_agb','AGBs', 4)";
//
// Member menu
//
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, sort) VALUES ('main','sponsor','Unsere Sponsoren', 8)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (action, what, title, sort) VALUES ('main','sponsor','Unsere Sponsoren', 8)";
//
// Add default menus to sponsor menu
//
//
// General configuration stuff
//
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD sponsor_ref_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD sponsor_min_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1000.00000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD sponsor_ref_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD sponsor_min_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1000.00000";
// Load CSS file
$EXT_CSS = "Y";
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_campaign_assigns";
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_admin_data";
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_sponsor_display_data";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='sponsor' OR what IN('repr_sponsor','sponsor_medit','sponsor_madd') LIMIT 20";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_guest_menu WHERE action='sponsor' LIMIT 5";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE what='sponsor' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='sponsor' OR what IN('repr_sponsor','sponsor_medit','sponsor_madd') LIMIT 20";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_guest_menu` WHERE action='sponsor' LIMIT 5";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE what='sponsor' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='Y', locked='N' WHERE action='sponsor' LIMIT 4";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='N' WHERE what='sponsor' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='Y', locked='N' WHERE action='sponsor' LIMIT 4";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='Y', locked='N' WHERE what='sponsor' LIMIT 1";
$SQLs[] = "UPDATE "._MYSQL_PREFIX."_sponsor_menu SET active='Y' WHERE active='N'";
$SQLs[] = "UPDATE "._MYSQL_PREFIX."_sponsor_registry SET is_active='Y' WHERE is_active='N'";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='N', locked='Y' WHERE action='sponsor' LIMIT 4";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='N', locked='Y' WHERE what='sponsor' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='N', locked='Y' WHERE action='sponsor' LIMIT 4";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='N', locked='Y' WHERE what='sponsor' LIMIT 1";
$SQLs[] = "UPDATE "._MYSQL_PREFIX."_sponsor_menu SET active='N' WHERE active='Y'";
$SQLs[] = "UPDATE "._MYSQL_PREFIX."_sponsor_registry SET is_active='N' WHERE is_active='Y'";
break;
$SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_user_book`";
// Delete admin menu entries
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE
`what`='theme_import' OR
`what`='theme_edit' OR
`what`='config_extensions' OR
LIMIT 13";
// Delete guest menu entries
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_guest_menu WHERE action='themes' LIMIT 1";
+ $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
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE
action='themes' OR
`what`='themes' OR
`what`='stats2' 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
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET action='main' WHERE
action='stats' OR
action='extras' OR
action='rals' OR
// Drop indexes
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_extensions DROP UNIQUE KEY (ext_name)";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins DROP UNIQUE KEY (login)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data DROP INDEX (status)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` DROP INDEX (status)";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_refbanner DROP INDEX (visible)";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_refdepths DROP UNIQUE KEY (level)";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_refsystem DROP INDEX (level)";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_pool DROP INDEX (data_type)";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_mod_reg DROP UNIQUE KEY (module)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admin_menu DROP INDEX (action)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admin_menu DROP INDEX (what)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_admin_menu` DROP INDEX (action)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_admin_menu` DROP INDEX (what)";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system DROP INDEX (task_type)";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system DROP INDEX (status)";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system DROP INDEX (task_created)";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system DROP FULLTEXT (subject)";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system DROP INDEX (subject)";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_extensions DROP INDEX (ext_active)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data DROP INDEX (status)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data DROP FULLTEXT (family)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data DROP INDEX (max_mails)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data DROP INDEX (password)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_guest_menu DROP INDEX (action)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_guest_menu DROP INDEX (what)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_guest_menu DROP INDEX (sort)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_guest_menu DROP INDEX (visible)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_guest_menu DROP INDEX (locked)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_member_menu DROP INDEX (what)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_member_menu DROP INDEX (sort)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_member_menu DROP INDEX (visible)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_member_menu DROP INDEX (locked)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` DROP INDEX (status)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` DROP FULLTEXT (family)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` DROP INDEX (max_mails)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` DROP INDEX (password)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_guest_menu` DROP INDEX (action)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_guest_menu` DROP INDEX (what)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_guest_menu` DROP INDEX (sort)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_guest_menu` DROP INDEX (visible)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_guest_menu` DROP INDEX (locked)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_member_menu` DROP INDEX (what)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_member_menu` DROP INDEX (sort)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_member_menu` DROP INDEX (visible)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_member_menu` DROP INDEX (locked)";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_cats DROP INDEX (visible)";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_cats DROP INDEX (sort)";
break;
switch ($EXT_VER)
{
case "0.0.1": // SQL queries for v0.0.1
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ext_autopurge ENUM('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_extensions','Erweitungsmanagement','Alle Einstellungen am Erweiterungsmanagement.', 10)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD ext_autopurge ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_extensions','Erweitungsmanagement','Alle Einstellungen am Erweiterungsmanagement.', 10)";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Es kann nun bestimmt werden, ob vom Server gelöschte ext-xxx.php erkannt werden sollen und die verknüpften Daten auch aus der Datenbank entfernt werden sollen.";
break;
case "0.0.2": // SQL queries for v0.0.2
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config CHANGE auto_purge auto_purge BIGINT(20) UNSIGNED NOT NULL DEFAULT ".($_CONFIG['one_day']*14)."";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` CHANGE auto_purge auto_purge BIGINT(20) UNSIGNED NOT NULL DEFAULT ".($_CONFIG['one_day']*14)."";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "In der Tabelle <STRONG>"._MYSQL_PREFIX."_config</STRONG> musste die Spalte <STRONG>auto_purge</STRONG> (autom. Löschen von Bestätigungsmails angepasst werden (war auf dem Testsystem auf TINYINT(4) gesetzt.)";
break;
case "0.0.3": // SQL queries for v0.0.3
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD points_word VARCHAR(255) NOT NULL DEFAULT 'Punkte'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD points_word VARCHAR(255) NOT NULL DEFAULT 'Punkte'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Das Wort "Punkte" kann nun per Datenbank geändert werden. Damit können Sie anstelle des Wortes Punkte auch Klammlose oder € schreiben.";
break;
case "0.0.4": // SQL queries for v0.0.4
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mails_page BIGINT(20) UNSIGNED NOT NULL DEFAULT 10";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD mails_page BIGINT(20) UNSIGNED NOT NULL DEFAULT 10";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Anzahl Mails pro Seite in <STRONG>EMail-Details ansehen</STRONG> und <STRONG>EMail-Archiv</STRONG> hinzugefügt.";
break;
case "0.0.5": // SQL queries for v0.0.5
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD index_home VARCHAR(255) NOT NULL DEFAULT 'welcome'";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_home','Home-Seite festlegen','Stellen Sie hier ein, welcher Menüpunkt (what-welcome ist Standart) als Einstiegspunkt in das Menüsystem genutzt werden soll.', 5)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD index_home VARCHAR(255) NOT NULL DEFAULT 'welcome'";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_home','Home-Seite festlegen','Stellen Sie hier ein, welcher Menüpunkt (what-welcome ist Standart) als Einstiegspunkt in das Menüsystem genutzt werden soll.', 5)";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Die what-welcome.php ist derzeit die "Home"-Seite (Eingangsseite). Dies kann nun per Datenbank geändert werden.";
break;
case "0.0.7": // SQL queries for v0.0.7
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD verbose_sql ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD verbose_sql ENUM('Y','N') NOT NULL DEFAULT 'Y'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Die SQL-Anweisungen werden bei eingeschalteter Verbose-Funktion detailiert angezeigt.";
break;
case "0.0.8": // SQL queries for v0.0.8
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD menu_blur_spacer VARCHAR(255) NOT NULL DEFAULT ' <STRONG><BIG>·</BIG></STRONG> '";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD menu_blur_spacer VARCHAR(255) NOT NULL DEFAULT ' <STRONG><BIG>·</BIG></STRONG> '";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Nette Mouse-Hover-Effekte eingebaut (Anleitung <STRONG>MENUE_HOVER.txt</STRONG> zum Patchen der general.css bitte lesen!)";
break;
case "0.0.9": // SQL queries for v0.0.9
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','list_unconfirmed','Unbest. Mails auflisten','Schauen Sie sich hier unbestätigte Maillinks an. Bitte diesen Link nur über dem EMail-Archiv oder EMail-Details aufrufen, direkt aufgerufen bekommen Sie eine Fehlermeldung.', 8)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','list_unconfirmed','Unbest. Mails auflisten','Schauen Sie sich hier unbestätigte Maillinks an. Bitte diesen Link nur über dem EMail-Archiv oder EMail-Details aufrufen, direkt aufgerufen bekommen Sie eine Fehlermeldung.', 8)";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Unbestätigte Maillinks können unter Email-Management -> Unbest. Mails auflisten aufgelistet werden.";
break;
case "0.1.0": // SQL queries for v0.2.1
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD reg_points_mode ENUM('ref','direct') NOT NULL DEFAULT 'ref'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD reg_points_mode ENUM('ref','direct') NOT NULL DEFAULT 'ref'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Soll der einmalige Ref-Bonus über das Referal-System (also alle oberen Refs bekommen auch etwas davon ab) oder direkt dem Werber aufgebucht werden?";
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[] = "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 ".($_CONFIG['one_day']*365)."";
+ $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 ".($_CONFIG['one_day']*365)."";
// 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.";
break;
case "0.1.2": // SQL queries for v0.1.2
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_refid','Standart-Ref-ID','Stellen Sie hier die User-ID ein, die genommen werden soll, wenn der Gast n icht per Referal-Link Ihren Mailtausch aufgerufen hat.', 7)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD def_refid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_refid','Standart-Ref-ID','Stellen Sie hier die User-ID ein, die genommen werden soll, wenn der Gast n icht per Referal-Link Ihren Mailtausch aufgerufen hat.', 7)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD def_refid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Standart Referal-ID kann per Admin-Bereich eingestellt werden (war vorher nur in modules.php und index.php direkt eingebbar.)";
break;
case "0.1.3": // SQL queries for v0.1.3
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD refid_target ENUM('register','index') NOT NULL DEFAULT 'register'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD refid_target ENUM('register','index') NOT NULL DEFAULT 'register'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Auf welche Seite soll der Ref-Link zeigen? Eingangsseite oder Anmeldeformular?";
break;
case "0.1.4": // SQL queries for v0.1.4
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD default_theme VARCHAR(255) NOT NULL DEFAULT '".GET_CURR_THEME()."'";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='theme' LIMIT 3";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme', NULL, 'Themes','Verwalten Sie hier alle Designs (Themes) Ihres Mailtausch-Scriptes.', 8)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_import','Importieren','Es wird das Verzeichnis "theme" nach neuen Ordnern durchsucht und anschliessend in die Datenbank gesperrt aufgenommen.', 1)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_edit','Modifizieren','Ändern Sie Titel, Freigaben usw. an den Themes. Sie können bis auf das Standart-Theme "default" auch Themes aus der Datenbank entfernen. Vorher sollten Sie es jedoch vom Server löschen, damit es niht erneut importiert werden kann.', 2)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',4,'Y','N')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',3,'Y','N')";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD default_theme VARCHAR(255) NOT NULL DEFAULT '".GET_CURR_THEME()."'";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='theme' LIMIT 3";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme', NULL, 'Themes','Verwalten Sie hier alle Designs (Themes) Ihres Mailtausch-Scriptes.', 8)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_import','Importieren','Es wird das Verzeichnis "theme" nach neuen Ordnern durchsucht und anschliessend in die Datenbank gesperrt aufgenommen.', 1)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_edit','Modifizieren','Ändern Sie Titel, Freigaben usw. an den Themes. Sie können bis auf das Standart-Theme "default" auch Themes aus der Datenbank entfernen. Vorher sollten Sie es jedoch vom Server löschen, damit es niht erneut importiert werden kann.', 2)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',4,'Y','N')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',3,'Y','N')";
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_themes";
$SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_themes (
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
break;
case "0.1.6": // SQL queries for v0.1.6
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD enable_title_deco ENUM('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD title_left VARCHAR(10) NOT NULL DEFAULT '[--'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD title_middle VARCHAR(10) NOT NULL DEFAULT '-'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD title_right VARCHAR(10) NOT NULL DEFAULT '--]'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD enable_mod_title ENUM('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD enable_what_title ENUM('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_title','Seitentitel ändern','De-/aktivieren Sie hier die Dekorationen, sowie Modul-Titel und what-Titel im Seitentitel.', 8)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD enable_title_deco ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD title_left VARCHAR(10) NOT NULL DEFAULT '[--'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD title_middle VARCHAR(10) NOT NULL DEFAULT '-'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD title_right VARCHAR(10) NOT NULL DEFAULT '--]'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD enable_mod_title ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD enable_what_title ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_title','Seitentitel ändern','De-/aktivieren Sie hier die Dekorationen, sowie Modul-Titel und what-Titel im Seitentitel.', 8)";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Dekorationen des Seitentiteles lassen sich ein- und ausschalten und selber definieren; Modul-Titel und Titel der <STRONG>what</STRONG>-Dateien kann hinzugefügt werden.";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_payments CHANGE payment payment FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_payments CHANGE price price FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE used_points used_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` CHANGE used_points used_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_points CHANGE points points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_points CHANGE locked_points locked_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
break;
case "0.2.1": // SQL queries for v0.2.1
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD css_php ENUM('DIRECT','FILE') NOT NULL DEFAULT 'FILE'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD css_php ENUM('DIRECT','FILE') NOT NULL DEFAULT 'FILE'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Ausgabe der CSS-Dateien entweder per css.php oder sie sind direkt eingebunden.";
break;
case "0.2.3": // SQL queries for v0.2.3
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD guest_menu ENUM('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD member_menu ENUM('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD youre_here ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD guest_menu ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD member_menu ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD youre_here ENUM('Y','N') NOT NULL DEFAULT 'Y'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Gast- und Mitgliedsmenüs lassen sich getrennt voneinander abschalten.";
// Switch to JPEG format
$auto_type = "jpg";
}
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD img_type ENUM('jpg','png') NOT NULL DEFAULT '".$auto_type."'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD img_type ENUM('jpg','png') NOT NULL DEFAULT '".$auto_type."'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Generierung des Mailbestätigungscodes hängt davon ab, ob die PHP-Funktion <U>imagecreatefromjpeg()</U> und das JPEG-Bild vorhanden sind oder nicht.";
break;
case "0.2.5": // SQL queries for v0.2.5
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE receive_mails receive_mails BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE max_mails max_mails BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` CHANGE receive_mails receive_mails BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` CHANGE max_mails max_mails BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Spalten <U>max_mails</U> und <U>receive_mails</U> auf BIGINT(20) gesetzt.";
break;
case "0.2.6": // SQL queries for v0.2.6
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','sub_points','{!POINTS!} abziehen','Allen oder einem Mitglied {!POINTS!} abziehen.', 8)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','sub_points','{!POINTS!} abziehen','Allen oder einem Mitglied {!POINTS!} abziehen.', 8)";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Abzug von {!POINTS!} nun möglich.";
break;
case "0.2.7": // SQL queries for v0.2.7
- $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[] = "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";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "<OL>
break;
case "0.2.8": // SQL queries for v0.2.8
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD last_login VARCHAR(10) NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD last_login VARCHAR(10) NOT NULL DEFAULT 0";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Letzter Login wird gespeichert, Cache wird bei installierter Cache-Erweiterung bei Sprachenänderung aufgefrischt.";
break;
case "0.2.9": // SQL queries for v0.2.9
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mt_word VARCHAR(255) NOT NULL DEFAULT 'Mailtausch'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mt_word2 VARCHAR(255) NOT NULL DEFAULT 'Mailtausches'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD mt_word3 VARCHAR(255) NOT NULL DEFAULT 'Mailtauscher'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD mt_word VARCHAR(255) NOT NULL DEFAULT 'Mailtausch'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD mt_word2 VARCHAR(255) NOT NULL DEFAULT 'Mailtausches'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD mt_word3 VARCHAR(255) NOT NULL DEFAULT 'Mailtauscher'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Wörter <STRONG>Mailtausch</STRONG>, <STRONG>Mailtausches</STRONG> und <STRONG>Mailtauscher</STRONG> sind austauschbar.";
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.";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_themes ADD UNIQUE KEY (theme_path)";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_themes ADD INDEX (theme_active)";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins ADD UNIQUE KEY (login)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD INDEX (status)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD INDEX (status)";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_refbanner ADD INDEX (visible)";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_refdepths ADD UNIQUE KEY (level)";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_refsystem ADD INDEX (level)";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_pool ADD INDEX (data_type)";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_mod_reg ADD UNIQUE KEY (module)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admin_menu ADD INDEX (action)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admin_menu ADD INDEX (what)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_admin_menu` ADD INDEX (action)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_admin_menu` ADD INDEX (what)";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system ADD INDEX (task_type)";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system ADD INDEX (status)";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system ADD INDEX (task_created)";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system ADD FULLTEXT (subject)";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_task_system ADD INDEX (subject)";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_extensions ADD INDEX (ext_active)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD INDEX (status)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD FULLTEXT (family)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD INDEX (max_mails)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD INDEX (password)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_guest_menu ADD INDEX (action)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_guest_menu ADD INDEX (what)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_guest_menu ADD INDEX (sort)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_guest_menu ADD INDEX (visible)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_guest_menu ADD INDEX (locked)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_member_menu ADD INDEX (what)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_member_menu ADD INDEX (sort)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_member_menu ADD INDEX (visible)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_member_menu ADD INDEX (locked)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD INDEX (status)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD FULLTEXT (family)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD INDEX (max_mails)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD INDEX (password)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_guest_menu` ADD INDEX (action)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_guest_menu` ADD INDEX (what)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_guest_menu` ADD INDEX (sort)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_guest_menu` ADD INDEX (visible)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_guest_menu` ADD INDEX (locked)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_member_menu` ADD INDEX (what)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_member_menu` ADD INDEX (sort)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_member_menu` ADD INDEX (visible)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_member_menu` ADD INDEX (locked)";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_cats ADD INDEX (visible)";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_cats ADD INDEX (sort)";
PRIMARY KEY(id)
) TYPE=MyISAM";
// Which menu do you like?
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD admin_menu ENUM('NEW','OLD') NOT NULL DEFAULT 'OLD'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD admin_menu ENUM('NEW','OLD') NOT NULL DEFAULT 'OLD'";
// Insert menus
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_admin','Adminmenü','Diverse Einstellungen am Adminmenü vornehmen.', 9)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_admin','Adminmenü','Diverse Einstellungen am Adminmenü vornehmen.', 9)";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Logische Bereiche (Logical Areas = LAs) eingeführt. Dadurch wird das immer stärker anwachsende Admin-Menü in grosse Hauptgruppen unterteilt, wodurch ein Auffinden von Menüpunkten verbessert wird.";
case "0.3.3": // SQL queries for v0.3.3
// Switch of the "intelligent menu sorter" when you want to have a fixed menu structure...
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD admin_menu_sorter ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD admin_menu_sorter ENUM('Y','N') NOT NULL DEFAULT 'Y'";
// The statistics table
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admin_menu_stats";
case "0.3.5": // SQL queries for v0.3.5
// List accounts with no referal
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('stats',NULL,'Statistiken',4,'Y','N')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('stats','stats2','Framekiller-Mails',2,'Y','N')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('extras',NULL,'Extras',5,'Y','N')";
- $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[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('stats',NULL,'Statistiken',4,'Y','N')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('stats','stats2','Framekiller-Mails',2,'Y','N')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('extras',NULL,'Extras',5,'Y','N')";
+ $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";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut.";
break;
case "0.3.6": // SQL queries for v0.3.6
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD salt_length TINYINT(3) UNSIGNED NOT NULL DEFAULT '9'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD pass_scramble VARCHAR(255) NOT NULL DEFAULT ''";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data MODIFY password VARCHAR(255) NOT NULL DEFAULT ''";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data MODIFY user_hash VARCHAR(255) NOT NULL DEFAULT ''";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD salt_length TINYINT(3) UNSIGNED NOT NULL DEFAULT '9'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD pass_scramble VARCHAR(255) NOT NULL DEFAULT ''";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` MODIFY password VARCHAR(255) NOT NULL DEFAULT ''";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` MODIFY user_hash VARCHAR(255) NOT NULL DEFAULT ''";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins MODIFY password VARCHAR(255) NOT NULL DEFAULT ''";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD rand_no BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD file_hash VARCHAR(255) NOT NULL DEFAULT ''";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD master_salt VARCHAR(255) NOT NULL DEFAULT ''";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_config SET rand_no=(ROUND(RAND() * 99999) + 100000) WHERE config=0 LIMIT 1";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD rand_no BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD file_hash VARCHAR(255) NOT NULL DEFAULT ''";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD master_salt VARCHAR(255) NOT NULL DEFAULT ''";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_config` SET rand_no=(ROUND(RAND() * 99999) + 100000) WHERE config=0 LIMIT 1";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_mod_reg ADD has_menu ENUM('Y','N') NOT NULL DEFAULT 'N'";
$SQLs[] = "UPDATE "._MYSQL_PREFIX."_mod_reg SET has_menu='Y' WHERE module='admin' OR module='index' OR module='login' LIMIT 3";
break;
case "0.3.8": // SQL queries for v0.3.8
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admin_menu CHANGE descr descr MEDIUMTEXT NULL";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_admin_menu` CHANGE descr descr MEDIUMTEXT NULL";
$SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_pool CHANGE `text` `text` LONGTEXT NOT NULL";
// Update notes (these will be set as task text!)
break;
case "0.3.9": // SQL queries for v0.3.9
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET descr = REPLACE(descr, '--POINTS--','!POINTS!') WHERE descr LIKE '%--POINTS--%'";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET descr = REPLACE(descr, '--POINTS--','!POINTS!') WHERE descr LIKE '%--POINTS--%'";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET title = REPLACE(title, '--POINTS--','!POINTS!') WHERE title LIKE '%--POINTS--%'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Beschreibungstexte für Admin-Menüs können länger sein. Diverse Fixes.";
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."_config` ADD `proxy_port` INT(5) UNSIGNED NOT NULL DEFAULT 0";
$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `proxy_username` VARCHAR(255) NOT NULL DEFAULT ''";
$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `proxy_password` VARCHAR(255) NOT NULL DEFAULT ''";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_proxy','Proxy-Einstellungen','Sollte Ihr Webserver sich hinter einem Proxy befinden, so können Sie hier MXChange so konfigurieren, dass es Updates durch diesen hindurch sucht!', 15)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_proxy','Proxy-Einstellungen','Sollte Ihr Webserver sich hinter einem Proxy befinden, so können Sie hier MXChange so konfigurieren, dass es Updates durch diesen hindurch sucht!', 15)";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Proxy-Einstellungen hinzugefügt.";
$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`)";
break;
case "0.4.5": // SQL queries for v0.4.5
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD last_month CHAR(2) NOT NULL DEFAULT '00'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD last_week CHAR(2) NOT NULL DEFAULT '00'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD last_month CHAR(2) NOT NULL DEFAULT '00'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD last_week CHAR(2) NOT NULL DEFAULT '00'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Täglichen/wöchentlichen/monatlichen Reset verbessert.";
break;
case "0.4.6": // SQL queries for v0.4.6
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD gender ENUM ('M','F') NOT NULL DEFAULT 'M'";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_user_data SET gender=sex WHERE sex != 'M'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data DROP sex";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD gender ENUM ('M','F') NOT NULL DEFAULT 'M'";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_user_data` SET gender=sex WHERE sex != 'M'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` DROP sex";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Offensives Wort "Sex" gegen "Gender" ausgetauscht.";
break;
case "0.4.7": // SQL queries for v0.4.7
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD login_failtures BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD last_failture TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD login_failtures BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD last_failture TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Fehlgeschlagene Login-Versuche werden nun mitgezählt und der letzte vermerkt.";
break;
case "0.4.9": // SQL queries for v0.4.9
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE `user_hash` `user_hash` VARCHAR(255) NULL DEFAULT NULL";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_user_data SET user_hash=NULL WHERE user_hash IS NOT NULL AND status='CONFIRMED'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` CHANGE `user_hash` `user_hash` VARCHAR(255) NULL DEFAULT NULL";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_user_data` SET user_hash=NULL WHERE user_hash IS NOT NULL AND status='CONFIRMED'";
$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD UNIQUE (`user_hash`)";
// Update notes (these will be set as task text!)
break;
case "0.5.1": // SQL queries for v0.5.1
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_member_menu DROP `descr`";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_member_menu` DROP `descr`";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Beschreibungsspalte von Mitgliedsmenü entfernt, welche ohnehin nicht genutzt wird.";
break;
case "0.5.3": // SQL queries for v0.5.3
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD session_save_path VARCHAR(255) NOT NULL DEFAULT ''";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_session','Session-Einstellungen','Ändern Sie hier den Speicherpfad für Sessiondateien (Sitzungsdateien) ab, falls die Standart-Einstellung bei Ihrem Hoster zu Problem führen sollte.', 16)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD session_save_path VARCHAR(255) NOT NULL DEFAULT ''";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_session','Session-Einstellungen','Ändern Sie hier den Speicherpfad für Sessiondateien (Sitzungsdateien) ab, falls die Standart-Einstellung bei Ihrem Hoster zu Problem führen sollte.', 16)";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Session-Speicherpfad konfigurierbar. Beispielsweise ist dies bei all-inkl.com nötig.";
break;
case "0.5.4": // SQL queries for v0.5.4
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','reflist','Ref-Übersicht',5,'Y','N')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','reflist','Ref-Übersicht',5,'Y','N')";
// Depends on refback extension
$EXT_UPDATE_DEPENDS = "refback";
break;
case "0.5.5": // SQL queries for v0.5.5
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD show_points_unconfirmed ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD show_points_unconfirmed ENUM('Y','N') NOT NULL DEFAULT 'Y'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Anzeige der {!POINTS!} unter den unbestätigten Mails kann nun optional abgeschaltet werden.";
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";
+ $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.";
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, sort, descr) VALUES ('task', NULL, 'Aufgaben-Management','1','Erweitertes Aufgaben-Management zur leichten verwaltung der vom System erzeugten Aufgaben.')";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, sort, descr) VALUES ('task','list_task','Aufgaben auflisten','1','Alle Ihnen zugewiesenen Aufgaben auflisten (keine Updates).')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (action, what, title, sort, descr) VALUES ('task', NULL, 'Aufgaben-Management','1','Erweitertes Aufgaben-Management zur leichten verwaltung der vom System erzeugten Aufgaben.')";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (action, what, title, sort, descr) VALUES ('task','list_task','Aufgaben auflisten','1','Alle Ihnen zugewiesenen Aufgaben auflisten (keine Updates).')";
$SQLs[] = "UPDATE "._MYSQL_PREFIX."_task_system SET status='SOLVED' WHERE status='CLOSED'";
// Enable CSS file?
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='task' LIMIT 2";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='task' LIMIT 2";
break;
case "activate": // Do stuff when admin activates this extension
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_check','Prüfen','Nach neuen Themes suchen bzw. nach Updates zu den Themes suchen.', 3)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_check','Prüfen','Nach neuen Themes suchen bzw. nach Updates zu den Themes suchen.', 3)";
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='theme_check' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what='theme_check' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
{
case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
// SQL commands to run
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','top10','TOP-10','Y','Y', 7)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_top10','TOP-10 Listen','Stellen Sie hier ein, wie lang die TOP-Listen sein sollen, also wie viele Plätze angezeigt werden sollen.', 8)";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD top10_max TINYINT(3) UNSIGNED NOT NULL DEFAULT 10";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','top10','TOP-10','Y','Y', 7)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_top10','TOP-10 Listen','Stellen Sie hier ein, wie lang die TOP-Listen sein sollen, also wie viele Plätze angezeigt werden sollen.', 8)";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD top10_max TINYINT(3) UNSIGNED NOT NULL DEFAULT 10";
// Load CSS file?
$EXT_CSS = "Y";
case "remove": // Do stuff when removing extension
// SQL commands to run
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_guest_menu WHERE what='top10' LIMIT 1";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='config_top10' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_guest_menu` WHERE what='top10' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE what='config_top10' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='Y', locked='N' WHERE what='top10' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='Y', locked='N' WHERE what='top10' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='N', locked='Y' WHERE what='top10' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='N', locked='Y' WHERE what='top10' LIMIT 1";
break;
case "update": // Update an extension
) Type=MyISAM";
// Admin menu
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer', NULL, '{!POINTS!}-Transfer','Verwalten Sie hier die {!POINTS!}-Transaktionen zwischen Ihren Mitgliedern.', 7)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','list_transfer','Auflisten','Hier bekommen Sie alle ein- und ausgehende Transaktionen aufgelistet.', 1)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','config_transfer','Einstellungen','Stellen Sie ein, wie viele Transaktionen aufgelistet werden sollen und wie alt diese werden dürfen. Die evtl. installierte autopurge-Erweiterung kann dann automatisch die veralteten Transktionen löschen.', 2)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','del_transfer','Manuell löschen','Hier können Sie - abgesehen von der automatischen Löschung - Transaktionen selber löschen. Bitte beachten Sie, dass immer aus- und eingehende Transaktionen gleichzeitig gelöscht werden.', 3)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer', NULL, '{!POINTS!}-Transfer','Verwalten Sie hier die {!POINTS!}-Transaktionen zwischen Ihren Mitgliedern.', 7)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','list_transfer','Auflisten','Hier bekommen Sie alle ein- und ausgehende Transaktionen aufgelistet.', 1)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','config_transfer','Einstellungen','Stellen Sie ein, wie viele Transaktionen aufgelistet werden sollen und wie alt diese werden dürfen. Die evtl. installierte autopurge-Erweiterung kann dann automatisch die veralteten Transktionen löschen.', 2)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','del_transfer','Manuell löschen','Hier können Sie - abgesehen von der automatischen Löschung - Transaktionen selber löschen. Bitte beachten Sie, dass immer aus- und eingehende Transaktionen gleichzeitig gelöscht werden.', 3)";
// Member menu
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','transfer','{!POINTS!}-Transfer','Y','Y', 5)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','transfer','{!POINTS!}-Transfer','Y','Y', 5)";
// Add config values
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '50'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_age BIGINT(20) UNSIGNED NOT NULL DEFAULT '".($_CONFIG['one_day']*28)."'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '".$_CONFIG['one_day']."'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_balance BIGINT(20) UNSIGNED NOT NULL DEFAULT 100";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD transfer_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 5";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD transfer_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '50'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD transfer_age BIGINT(20) UNSIGNED NOT NULL DEFAULT '".($_CONFIG['one_day']*28)."'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD transfer_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '".$_CONFIG['one_day']."'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD transfer_balance BIGINT(20) UNSIGNED NOT NULL DEFAULT 100";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD transfer_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 5";
// Add row(s) to user's data
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD opt_in ENUM('Y','N') NOT NULL DEFAULT 'N'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD opt_in ENUM('Y','N') NOT NULL DEFAULT 'N'";
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_transfers_in";
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_transfers_out";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='transfer' LIMIT 4";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE what='transfer' LIMIT 1";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data DROP opt_in";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='transfer' LIMIT 4";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE what='transfer' LIMIT 1";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` DROP opt_in";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='N' WHERE what='transfer' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='Y', locked='N' WHERE what='transfer' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='N' WHERE what='transfer' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='Y', locked='N' WHERE what='transfer' LIMIT 1";
break;
case "update": // Update an extension
break;
case "0.0.5": // SQL queries for v0.0.5
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD ap_transfer ENUM('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD ap_transfer ENUM('Y','N') NOT NULL DEFAULT 'Y'";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Link <I>Auflisten</LI> im Admin-Bereich hatte das eingeloggte Mitglied und nicht den eingeloggten Admin abgefragt. Automatisches Löschen von veraltete Einträgen kann unabhängig von der autopurge-Erweiterung de-/aktiviert werden. Bitte aktualisieren Sie auch die beiden Admin-Templates!";
break;
case "0.2.5": // SQL queries for v0.2.5
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='extras', sort='5' WHERE what='transfer' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET action='extras', sort='5' WHERE what='transfer' LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Mitgliedsmenü komplett geändert.";
$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD `lock_reason` TINYTEXT";
$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD `lock_timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00'";
$SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `user_delete_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".($_CONFIG['one_day'] * 30)."";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_user_del','Löschungen auflisten','Listet die Löschungen von Usern auf.', 9)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_user_del','Löschungen auflisten','Listet die Löschungen von Usern auf.', 9)";
$SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_user_del`";
$SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_user_del` (
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
) TYPE=MyISAM";
// Confiuration
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT '40000'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT '5000'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_api_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_api_md5 VARCHAR(32) NOT NULL DEFAULT ''";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_api_url VARCHAR(255) NOT NULL DEFAULT 'http://www.wds66.com/api/'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_refid VARCHAR(6) NOT NULL DEFAULT ''";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT '40000'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT '5000'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_api_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_api_md5 VARCHAR(32) NOT NULL DEFAULT ''";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_api_url VARCHAR(255) NOT NULL DEFAULT 'http://www.wds66.com/api/'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_refid VARCHAR(6) NOT NULL DEFAULT ''";
// User data
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD wernis_userid VARCHAR(6) NOT NULL DEFAULT ''";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD wernis_userid VARCHAR(6) NOT NULL DEFAULT ''";
// Admin menu
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis', NULL, 'Wernis-Management','Konfiguration zur WDS66-API einstellen, Auszahlungen auflisten usw..', 15)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis','config_wernis','WDS66-API-Einstellungen','Konfiguration zur WDS66-API einstellen.', 1)";
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis','list_wernis','Wernis-Anfragen auflisten','Listet alle Wernis-Auszahlungsanfragen Ihrer Mitglieder auf.', 2)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis', NULL, 'Wernis-Management','Konfiguration zur WDS66-API einstellen, Auszahlungen auflisten usw..', 15)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis','config_wernis','WDS66-API-Einstellungen','Konfiguration zur WDS66-API einstellen.', 1)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('wernis','list_wernis','Wernis-Anfragen auflisten','Listet alle Wernis-Auszahlungsanfragen Ihrer Mitglieder auf.', 2)";
// Member menu
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','wernis','Wernis-Ein-/Auszahlungen','N','N', 11)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','wernis','Wernis-Ein-/Auszahlungen','N','N', 11)";
// Guest menu
- $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','wernis_portal','WDS66-News','N','N', 7)";
+ $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','wernis_portal','WDS66-News','N','N', 7)";
break;
case "remove": // Do stuff when removing extension
// SQL commands to run
$SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_wernis";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='wernis'";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE what='wernis' LIMIT 1";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_guest_menu WHERE what='wernis_portal' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='wernis'";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE what='wernis' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_guest_menu` WHERE what='wernis_portal' LIMIT 1";
break;
case "activate": // Do stuff when admin activates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='Y', locked='N' WHERE what='wernis' LIMIT 1";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='N' WHERE what='wernis' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='Y', locked='N' WHERE what='wernis' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='Y', locked='N' WHERE what='wernis' LIMIT 1";
break;
case "deactivate": // Do stuff when admin deactivates this extension
// SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='N', locked='Y' WHERE what='wernis' LIMIT 1";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='N', locked='Y' WHERE what='wernis' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='N', locked='Y' WHERE what='wernis' LIMIT 1";
+ $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='N', locked='Y' WHERE what='wernis' LIMIT 1";
break;
case "update": // Update an extension
switch ($EXT_VER)
{
case "0.0.1": // SQL queries for v0.0.1
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_payout_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_withdraw_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_payout_factor FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_withdraw_factor FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_payout_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_withdraw_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_payout_fee_fix BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_withdraw_fee_fix BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_payout_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_withdraw_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_payout_factor FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_withdraw_factor FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_payout_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_withdraw_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_payout_fee_fix BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_withdraw_fee_fix BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Ein-/Auszahlungsfunktion getrennt ein- und ausschaltbar, sowie mit Umrechungsfaktoren {!POINTS!}->Wernis versehen. Prozentualer Abzug als "Betreibergebühr hinzugefügt, was z.B. für Wechselstuben interessant ist.";
break;
case "0.0.2": // SQL queries for v0.0.2
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_pass_md5 VARCHAR(32) NOT NULL DEFAULT ''";
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD wernis_pass_md5 VARCHAR(32) NOT NULL DEFAULT ''";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Auszahlunsfunktion an die neue API 0.2-BETA angepasst. Demnach muss Ihr Wernis-Passwort beim Auszahlen benutzt werden und in Ihrem {!MT_WORD!} als MD5-Hash gespeichert werden.";
// @DEPRECATED Try to rewrite the if() condition
if ($template == "member_support_form") {
// Support request of a member
- $result = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array($GLOBALS['userid']), __FILE__, __LINE__);
// Is content an array?
return;
} else {
// Load email address
- $result_email = SQL_QUERY_ESC("SELECT email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1", array(bigintval($TO)), __FILE__, __LINE__);
+ $result_email = SQL_QUERY_ESC("SELECT email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", array(bigintval($TO)), __FILE__, __LINE__);
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):numRows=".SQL_NUMROWS($result_email)."<br />\n";
// Does the user exist?
if (EXT_IS_ACTIVE("nickname")) {
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):NICKNAME!<br />\n";
// Load nickname
- $result = SQL_QUERY_ESC("SELECT surname, family, gender, email, nickname FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT surname, family, gender, email, nickname FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array(bigintval($UID)), __FILE__, __LINE__);
} else {
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):NO-NICK!<br />\n";
/// Load normal data
- $result = SQL_QUERY_ESC("SELECT surname, family, gender, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT surname, family, gender, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array(bigintval($UID)), __FILE__, __LINE__);
}
// Begin with all users in level one
$result_direct = SQL_QUERY("SELECT u.userid
-FROM "._MYSQL_PREFIX."_user_data AS u
+FROM `"._MYSQL_PREFIX."_user_data` AS u
WHERE u.refid=0
ORDER BY u.userid ASC", __FILE__, __LINE__);
$scrambleString = genScrambleString(40);
// ... and store it there for future usage
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET pass_scramble='%s' WHERE config=0 LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_config` SET pass_scramble='%s' WHERE config=0 LIMIT 1",
array($scrambleString), __FILE__, __LINE__);
// Also remember it in config
$masterSalt = scrambleString(substr(generateHash(GEN_PASS(mt_rand(128, 256))), 0, -40));
// ... and store it there for future usage
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET master_salt='%s' WHERE config=0 LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_config` SET master_salt='%s' WHERE config=0 LIMIT 1",
array($masterSalt), __FILE__, __LINE__);
// Also remember it in config
//* DEBUG: */ die("Secret-Key: ".$secretKey."<br>Cookie: ".get_session('u_hash')."<br>Test: ".$test);
// Write $file_hash to database
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET file_hash='%s' WHERE config=0 LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_config` SET file_hash='%s' WHERE config=0 LIMIT 1",
array($file_hash), __FILE__, __LINE__);
// Also create .htaccess file
{
global $jackpot;
// Check if he has locked points or not
- $result = SQL_QUERY_ESC("SELECT ref_payout FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT ref_payout FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array(bigintval($uid)), __FILE__, __LINE__);
list($payout) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
// Is begging rallye active?
if ($_CONFIG['beg_rallye'] == "Y") {
// Add points to rallye account
- SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET beg_points=beg_points+%s WHERE userid=%s LIMIT 1",
+ SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET beg_points=beg_points+%s WHERE userid=%s LIMIT 1",
array($points, $uid), __FILE__, __LINE__);
} else {
// Add points to account
}
// Add points to his account directly
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET turbo_bonus=turbo_bonus+".$points." WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET turbo_bonus=turbo_bonus+".$points." WHERE userid=%s LIMIT 1",
array(bigintval($uid)), __FILE__, __LINE__);
// Rember this whole data for displaying ranking list
function NICKNAME_IS_ACTIVE($uidNick)
{
$ret = false;
- $result = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE (userid=%s AND userid > 0) OR nickname='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE (userid=%s AND userid > 0) OR nickname='%s' LIMIT 1",
array(bigintval($uidNick), $uidNick), __FILE__, __LINE__);
// Check existence of nickname
$ret = "";
// Search for non-empty nickname
- $result = SQL_QUERY_ESC("SELECT nickname FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s AND nickname != '' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT nickname FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s AND nickname != '' LIMIT 1",
array(bigintval($userid)), __FILE__, __LINE__);
// Found?
array(bigintval($id)), __FILE__, __LINE__);
// Do a snapshot off all user refs
- $result_user = SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE status='CONFIRMED' ORDER BY userid", __FILE__, __LINE__);
+ $result_user = SQL_QUERY("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE status='CONFIRMED' ORDER BY userid", __FILE__, __LINE__);
// Transfer all neccessary data to the global $DATA array
$DATA['uid_cnt'] = SQL_NUMROWS($result_user);
// Add userid and his ref count to table
$result_ref = SQL_QUERY_ESC("SELECT DISTINCT SUM(p.points)
FROM "._MYSQL_PREFIX."_user_points AS p
-LEFT JOIN "._MYSQL_PREFIX."_user_data AS d
+LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS d
ON p.userid=d.userid
WHERE d.status='CONFIRMED' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND p.ref_depth=1 AND p.points > 0 AND d.userid=%s",
array($_CONFIG['ref_payout'], bigintval($uid)), __FILE__, __LINE__);
// Points of ref's
$result_ref = SQL_QUERY_ESC("SELECT DISTINCT p.points FROM "._MYSQL_PREFIX."_user_points AS p
-LEFT JOIN "._MYSQL_PREFIX."_user_data AS d
+LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS d
ON p.userid=d.userid
WHERE d.userid=%s AND d.status='CONFIRMED' AND p.ref_depth=1 AND d.max_mails > 0 AND d.mails_confirmed >= %s
LIMIT 1", array(bigintval($uid), $_CONFIG['ref_payout']), __FILE__, __LINE__);
$uid_string = implode(",", $uids_array['uid']);
// Load users
- $result = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid IN(%s) AND status='CONFIRMED' ORDER BY userid LIMIT %s",
+ $result = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid IN(%s) AND status='CONFIRMED' ORDER BY userid LIMIT %s",
array($uid_string, count($uids_array)), __FILE__, __LINE__);
$ret = "";
while (list($u, $gender, $surname, $family, $email) = SQL_FETCHROW($result))
// Points of ref's
$result_ref = SQL_QUERY_ESC("SELECT DISTINCT SUM(p.points)
FROM "._MYSQL_PREFIX."_user_points AS p
-LEFT JOIN "._MYSQL_PREFIX."_user_data AS d
+LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS d
ON p.userid=d.userid
WHERE d.status='CONFIRMED' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND p.ref_depth=1 AND p.points > 0 AND d.userid=%s",
array($_CONFIG['ref_payout'], bigintval($uid)), __FILE__, __LINE__);
// Check status
// active = 1: account is still confirmed
// active = 0: account is deleted or locked
- $result_active = SQL_QUERY_ESC("SELECT COUNT(userid) FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s AND status='CONFIRMED' LIMIT 1",
+ $result_active = SQL_QUERY_ESC("SELECT COUNT(userid) FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s AND status='CONFIRMED' LIMIT 1",
array(bigintval($DATA['uid'][$idx])), __FILE__, __LINE__);
list($active) = SQL_FETCHROW($result_active);
SQL_FREERESULT($result_active);
$old = 0; $minus = 0;
// Check for his referal
- $result_refid = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE refid=%s ORDER BY userid ASC",
+ $result_refid = SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE refid=%s ORDER BY userid ASC",
array(bigintval($uid)), __FILE__, __LINE__);
// When no entry was updated then we have to create it here
// Get refs from database
$result = SQL_QUERY_ESC("SELECT r.id, r.refid, r.refback, r.points, d.status".$ADD."
FROM "._MYSQL_PREFIX."_user_refs AS r
-LEFT JOIN "._MYSQL_PREFIX."_user_data AS d
+LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS d
ON r.refid=d.userid
WHERE r.userid=%s AND r.level=%s
ORDER BY r.refid ASC",
SURFBAR_NOTIFY_USER("low_points", $content);
// Update last notified
- SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET surfbar_low_notified=NOW() WHERE userid=%s LIMIT 1",
+ SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET surfbar_low_notified=NOW() WHERE userid=%s LIMIT 1",
array($uid), __FILE__, __LINE__);
} // END - if
} // END - foreach
// Get all userid except logged in one
$result = SQL_QUERY_ESC("SELECT u.userid, UNIX_TIMESTAMP(d.surfbar_low_notified) AS notified
FROM "._MYSQL_PREFIX."_surfbar_urls AS u
-INNER JOIN "._MYSQL_PREFIX."_user_data AS d
+INNER JOIN `"._MYSQL_PREFIX."_user_data` AS d
ON u.userid=d.userid
WHERE u.userid NOT IN (%s,0) AND u.status='ACTIVE'
GROUP BY u.userid
// Get all userid
$result = SQL_QUERY("SELECT u.userid, UNIX_TIMESTAMP(d.surfbar_low_notified) AS notified
FROM "._MYSQL_PREFIX."_surfbar_urls AS u
-INNER JOIN "._MYSQL_PREFIX."_user_data AS d
+INNER JOIN `"._MYSQL_PREFIX."_user_data` AS d
ON u.userid=d.userid
WHERE u.status='ACTIVE'
GROUP BY u.userid
// Check for all accounts
$SQLs[] = "SELECT DISTINCT d.userid, d.email, d.last_online
-FROM "._MYSQL_PREFIX."_user_data AS d
+FROM `"._MYSQL_PREFIX."_user_data` AS d
WHERE d.status='CONFIRMED' AND d.joined < (UNIX_TIMESTAMP() - ".$since.") AND d.last_online < (UNIX_TIMESTAMP() - ".$since.") AND d.ap_notified < (UNIX_TIMESTAMP() - ".$since.")
".$EXCLUDE_LIST."
ORDER BY d.userid";
if (GET_EXT_VERSION("sql_patches") >= "0.3.4") {
// Check for accounts without referal
- $SQLs[] = "SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE refid='0' ORDER BY userid";
+ $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_user&mode=norefs";
$cacheInstance->storeExtensionVersion("sql_patches");
// Load all modules and their data
- $result = SQL_QUERY("SELECT * FROM "._MYSQL_PREFIX."_config ORDER BY config ASC", __FILE__, __LINE__);
+ $result = SQL_QUERY("SELECT * FROM `"._MYSQL_PREFIX."_config` ORDER BY config ASC", __FILE__, __LINE__);
while ($data = SQL_FETCHARRAY($result)) {
// Add row to cache file
$cacheInstance->addRow($data);
$SQL = ""; $MODE = "";
// Shall I sent activation or deactivation mail?
-$SQL = "SELECT userid, email FROM "._MYSQL_PREFIX."_user_data WHERE (beg_ral_notify ";
+$SQL = "SELECT userid, email FROM `"._MYSQL_PREFIX."_user_data` WHERE (beg_ral_notify ";
switch ($_CONFIG['beg_rallye'])
{
case 'Y': // Begging rallye is activated
SEND_EMAIL($uid, HAPPY_BIRTHDAY, $msg);
// Remember him that he has received a birthday mail
- $result_bd = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET birthday_sent=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1",
+ $result_bd = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET birthday_sent=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1",
array(bigintval($uid)), __FILE__, __LINE__);
}
$SQL = ""; $MODE = "";
// Shall I sent activation or deactivation mail?
-$SQL = "SELECT userid, email FROM "._MYSQL_PREFIX."_user_data WHERE (bonus_ral_notify ";
+$SQL = "SELECT userid, email FROM `"._MYSQL_PREFIX."_user_data` WHERE (bonus_ral_notify ";
switch ($_CONFIG['bonus_active'])
{
case 'Y': // Active rallye is activated
} // END - if
// Build main menu
- $result_main = SQL_QUERY("SELECT action, title, descr FROM "._MYSQL_PREFIX."_admin_menu WHERE (what='' OR what IS NULL) ORDER BY sort, id DESC", __FILE__, __LINE__);
+ $result_main = SQL_QUERY("SELECT action, title, descr FROM `"._MYSQL_PREFIX."_admin_menu` WHERE (what='' OR what IS NULL) ORDER BY sort, id DESC", __FILE__, __LINE__);
if (SQL_NUMROWS($result_main) > 0)
{
$OUT = "<TABLE border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"admin_menu_main\">
}
$OUT .= "</NOBR></TD>
</TR>\n";
- $result_what = SQL_QUERY_ESC("SELECT what, title, descr FROM "._MYSQL_PREFIX."_admin_menu WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort, id DESC",
+ $result_what = SQL_QUERY_ESC("SELECT what, title, descr FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort, id DESC",
array($menu), __FILE__, __LINE__);
if ((SQL_NUMROWS($result_what) > 0) && ($act == $menu))
{
function ADD_MEMBER_SELECTION_BOX ($def="0", $add_all=false, $return=false, $none=false, $field="userid")
{
// Output selection form with all confirmed user accounts listed
- $result = SQL_QUERY("SELECT userid, surname, family FROM "._MYSQL_PREFIX."_user_data ORDER BY userid", __FILE__, __LINE__);
+ $result = SQL_QUERY("SELECT userid, surname, family FROM `"._MYSQL_PREFIX."_user_data` ORDER BY userid", __FILE__, __LINE__);
$OUT = "";
// USe this only for adding points (e.g. adding refs really makes no sence ;-) )
function ADMIN_MENU_SELECTION($MODE, $default="", $defid="") {
$wht = "what != ''";
if ($MODE == "action") $wht = "(what='' OR what IS NULL) AND action !='login'";
- $result = SQL_QUERY_ESC("SELECT %s, title FROM "._MYSQL_PREFIX."_admin_menu WHERE ".$wht." ORDER BY sort",
+ $result = SQL_QUERY_ESC("SELECT %s, title FROM `"._MYSQL_PREFIX."_admin_menu` WHERE ".$wht." ORDER BY sort",
array($MODE), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// Load menu as selection
} // END - if
if ($uid > 0) {
- $result_user = SQL_QUERY_ESC("SELECT gender, surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result_user = SQL_QUERY_ESC("SELECT gender, surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array(bigintval($uid)), __FILE__, __LINE__);
if (SQL_NUMROWS($result_user) == 1) {
list($gender, $sname, $fname, $email) = SQL_FETCHROW($result_user);
if (EXT_IS_ACTIVE("wernis")) {
// Extension is installed so let him send a notification to the user
$result_pay = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_user_wernis WHERE userid=%s AND wernis_timestamp=%s LIMIT 1",
- array(bigintval($uid), bigintval($created)), __FILE__, __LINE__);
+ array(bigintval($uid), bigintval($created)), __FILE__, __LINE__);
list($pid) = SQL_FETCHROW($result_pay);
SQL_FREERESULT($result_pay);
break;
case "NL_UNSUBSCRIBE": // Newsletter unsubscriptions
- $result = SQL_QUERY_ESC("SELECT nl_timespan FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
- array(bigintval($uid)), __FILE__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT nl_timespan FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
+ array(bigintval($uid)), __FILE__, __LINE__);
list($span) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
// Add points to all accounts
if ((isset($_POST['ok'])) && ($_POST['points'] > 0)) {
define('__POINTS_VALUE', $_POST['points']);
- $result_main = SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE status='CONFIRMED' ORDER BY userid", __FILE__, __LINE__);
+ $result_main = SQL_QUERY("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE status='CONFIRMED' ORDER BY userid", __FILE__, __LINE__);
while (list($uid) = SQL_FETCHROW($result_main)) {
// User ID found in URL so we use this give him some credits
- $result = SQL_QUERY_ESC("SELECT surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s AND status='CONFIRMED' LIMIT 1",
- array(bigintval($uid)), __FILE__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s AND status='CONFIRMED' LIMIT 1",
+ array(bigintval($uid)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Selected user does exist
list($sname, $fname, $email) = SQL_FETCHROW($result);
}
} elseif (!empty($_GET['u_id'])) {
// User ID found in URL so we use this give him some credits
- $result = SQL_QUERY_ESC("SELECT surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s AND status='CONFIRMED' LIMIT 1",
- array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s AND status='CONFIRMED' LIMIT 1",
+ array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Selected user does exist
list($sname, $fname, $email) = SQL_FETCHROW($result);
$menus = array(); $titles = array(); $below = array();
// Get all available main menus
- $result = SQL_QUERY("SELECT action, title, sort FROM "._MYSQL_PREFIX."_admin_menu WHERE (what='' OR what IS NULL) ORDER BY sort", __FILE__, __LINE__);
+ $result = SQL_QUERY("SELECT action, title, sort FROM `"._MYSQL_PREFIX."_admin_menu` WHERE (what='' OR what IS NULL) ORDER BY sort", __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0)
{
// Read menu structure
// Load sub menus :)
foreach ($menus as $key_main => $value_main)
{
- $result = SQL_QUERY_ESC("SELECT what, title, sort FROM "._MYSQL_PREFIX."_admin_menu WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort",
+ $result = SQL_QUERY_ESC("SELECT what, title, sort FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort",
array($value_main), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0)
{
if (!empty($_POST['menu']))
{
// Add sub menu
- $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('%s','%s','%s','%s','%s')",
+ $result = SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('%s','%s','%s','%s','%s')",
array(
$_POST['menu'],
$_POST['name'],
else
{
// Add main menu
- $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, title, descr, sort) VALUES ('%s','%s','%s','%s')",
+ $result = SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (action, title, descr, sort) VALUES ('%s','%s','%s','%s')",
array(
$_POST['name'],
$_POST['title'],
if ($confirm == 1)
{
$cnt++;
- $result = SQL_QUERY_ESC("SELECT title, action, what, descr FROM "._MYSQL_PREFIX."_admin_menu WHERE ".$AND." AND id=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT title, action, what, descr FROM `"._MYSQL_PREFIX."_admin_menu` WHERE ".$AND." AND id=%s LIMIT 1",
array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1)
{
if ($confirm == 1)
{
$cnt++;
- $result = SQL_QUERY_ESC("SELECT title FROM "._MYSQL_PREFIX."_admin_menu WHERE ".$AND." AND id=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT title FROM `"._MYSQL_PREFIX."_admin_menu` WHERE ".$AND." AND id=%s LIMIT 1",
array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1)
{
$sel = bigintval($sel);
// Update entry
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admin_menu SET
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_admin_menu` SET
title='%s',
action='%s',
what='%s',
case "del": // Delete menu
foreach ($_POST['sel'] as $sel => $menu) {
- $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE ".$AND." AND id=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE ".$AND." AND id=%s LIMIT 1",
array(bigintval($sel)), __FILE__, __LINE__);
CACHE_PURGE_ADMIN_MENU(0, "", "", $AND);
} // END - foreach
// Get IDs
if (!empty($_GET['w'])) {
// Sub menus selected
- $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_admin_menu WHERE action='%s' AND sort='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='%s' AND sort='%s' LIMIT 1",
array($_GET['act'], bigintval($_GET['tid'])), __FILE__, __LINE__);
list($tid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
- $result = SQL_QUERY("SELECT id FROM "._MYSQL_PREFIX."_admin_menu WHERE action='%s' AND sort='%s' LIMIT 1",
+ $result = SQL_QUERY("SELECT id FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='%s' AND sort='%s' LIMIT 1",
array($_GET['act'], bigintval($_GET['fid'])), __FILE__, __LINE__);
list($fid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
else
{
// Main menu selected
- $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_admin_menu WHERE (what='' OR what IS NULL) AND sort='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_admin_menu` WHERE (what='' OR what IS NULL) AND sort='%s' LIMIT 1",
array(bigintval($_GET['tid'])), __FILE__, __LINE__);
list($tid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
- $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_admin_menu WHERE (what='' OR what IS NULL) AND sort='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_admin_menu` WHERE (what='' OR what IS NULL) AND sort='%s' LIMIT 1",
array(bigintval($_GET['fid'])), __FILE__, __LINE__);
list($fid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
if ((!empty($tid)) && (!empty($fid)))
{
// Sort menu
- $result_sort = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admin_menu SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+ $result_sort = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_admin_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
array(bigintval($_GET['tid']), bigintval($fid)), __FILE__, __LINE__);
- $result_sort = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admin_menu SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+ $result_sort = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_admin_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
array(bigintval($_GET['fid']), bigintval($tid)), __FILE__, __LINE__);
CACHE_PURGE_ADMIN_MENU(0, "", "", $AND);
}
if (!empty($SUB))
{
// Sub menus of a main menu
- $result = SQL_QUERY_ESC("SELECT id, action, what, title, sort FROM "._MYSQL_PREFIX."_admin_menu WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort ASC",
+ $result = SQL_QUERY_ESC("SELECT id, action, what, title, sort FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort ASC",
array($SUB), __FILE__, __LINE__);
}
else
{
// Main menus
- $result = SQL_QUERY("SELECT id, action, what, title, sort FROM "._MYSQL_PREFIX."_admin_menu WHERE (what='' OR what IS NULL) ORDER BY sort ASC", __FILE__, __LINE__);
+ $result = SQL_QUERY("SELECT id, action, what, title, sort FROM `"._MYSQL_PREFIX."_admin_menu` WHERE (what='' OR what IS NULL) ORDER BY sort ASC", __FILE__, __LINE__);
}
$max = SQL_NUMROWS($result);
if ($max > 0)
ADD_DESCR ("admin", basename(__FILE__));
// Check for accounts
-$result = SQL_QUERY("SELECT userid, gender, surname, family, email, REMOTE_ADDR, refid, user_hash FROM "._MYSQL_PREFIX."_user_data WHERE status='UNCONFIRMED' ORDER BY userid", __FILE__, __LINE__);
+$result = SQL_QUERY("SELECT userid, gender, surname, family, email, REMOTE_ADDR, refid, user_hash
+FROM `"._MYSQL_PREFIX."_user_data`
+WHERE status='UNCONFIRMED'
+ORDER BY userid ASC", __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0) {
// We have some (new?) registrations!
switch ($_GET['sub'])
{
case "points":
- $SQL[] = "UPDATE "._MYSQL_PREFIX."_config SET points_register='".$_POST['points_register']."', points_ref='".$_POST['points_ref']."' WHERE config=0 LIMIT 1";
+ $SQL[] = "UPDATE `"._MYSQL_PREFIX."_config` SET points_register='".$_POST['points_register']."', points_ref='".$_POST['points_ref']."' WHERE config=0 LIMIT 1";
break;
case "ref":
case "settings":
$REF = bigintval($_POST['ref_payout']);
- $SQL[] = sprintf("UPDATE "._MYSQL_PREFIX."_config SET
+ $SQL[] = sprintf("UPDATE `"._MYSQL_PREFIX."_config` SET
allow_direct_pay='%s',
reg_points_mode='%s',
ref_payout='%s'
if (($_CONFIG['ref_payout'] == 0) && ($_POST['ref_payout'] > 0))
{
// Update account's ref_payout for "must-confirm"
- $SQL[] = sprintf("UPDATE "._MYSQL_PREFIX."_user_data SET ref_payout=(%s - mails_confirmed)
+ $SQL[] = sprintf("UPDATE `"._MYSQL_PREFIX."_user_data` SET ref_payout=(%s - mails_confirmed)
WHERE mails_confirmed < %s", $REF, $REF);
}
elseif (($_CONFIG['ref_payout'] > 0) && ($_POST['ref_payout'] == 0))
{
// Update account's ref_payout for "not-must-confirm"
- $SQL[] = "UPDATE "._MYSQL_PREFIX."_user_data SET ref_payout=0 WHERE ref_payout > 0";
+ $SQL[] = "UPDATE `"._MYSQL_PREFIX."_user_data` SET ref_payout=0 WHERE ref_payout > 0";
$SQL[] = "UPDATE "._MYSQL_PREFIX."_user_points SET points=points+locked_points WHERE locked_points>0";
$SQL[] = "UPDATE "._MYSQL_PREFIX."_user_points SET locked_points=0 WHERE locked_points>0";
}
// User exists..
if ((isset($_POST['ok'])) || ((isset($_POST['del'])) && (!empty($_POST['reason'])))) {
// Delete users account
- $result_user = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
- array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
+ $result_user = SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
+ array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
if (SQL_NUMROWS($result_user) == 1) {
// Free memory
SQL_FREERESULT($result_user);
ADD_MEMBER_SELECTION_BOX();
} else {
// Realy want to delete?
- $result = SQL_QUERY_ESC("SELECT email, surname, family FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
- array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT email, surname, family FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
+ array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load data
list ($email, $sname, $fname) = SQL_FETCHROW($result);
$result_main = false;
if (isset($_GET['u_id'])) {
// 0 1 2 3 4 5 6 7 8 9 10 11
- $result_main = SQL_QUERY_ESC("SELECT gender, surname, family, street_nr, zip, city, country, email, birth_day, birth_month, birth_year, max_mails FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
- array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
+ $result_main = SQL_QUERY_ESC("SELECT gender, surname, family, street_nr, zip, city, country, email, birth_day, birth_month, birth_year, max_mails
+FROM `"._MYSQL_PREFIX."_user_data`
+WHERE userid=%s
+LIMIT 1",
+ array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
}
if ((SQL_NUMROWS($result_main) == 1) || (empty($_GET['u_id'])))
if ($PASS)
{
// We have to add the following things: birthday and max receive mails
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET
gender='%s',
surname='%s',
family='%s',
$menus = array(); $titles = array(); $below = array();
// Get all available main menus
- $result = SQL_QUERY("SELECT action, title, sort FROM "._MYSQL_PREFIX."_guest_menu WHERE (what='' OR what IS NULL) ORDER BY sort", __FILE__, __LINE__);
+ $result = SQL_QUERY("SELECT action, title, sort FROM `"._MYSQL_PREFIX."_guest_menu` WHERE (what='' OR what IS NULL) ORDER BY sort", __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0)
{
// Read menu structure
// Insert new menu entry
if (!empty($_POST['menu']))
{
- $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_guest_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('%s','%s','%s','%s','%s','%s')",
+ $result = SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('%s','%s','%s','%s','%s','%s')",
array(
$_POST['menu'],
$_POST['name'],
}
else
{
- $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_guest_menu (action, title, sort, visible, locked) VALUES ('%s','%s','%s','%s','%s')",
+ $result = SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_guest_menu` (action, title, sort, visible, locked) VALUES ('%s','%s','%s','%s','%s')",
array(
$_POST['name'],
$_POST['title'],
if ($confirm == 1)
{
$cnt++;
- $result = SQL_QUERY_ESC("SELECT title, action, what FROM "._MYSQL_PREFIX."_guest_menu WHERE ".$AND." AND id=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT title, action, what FROM `"._MYSQL_PREFIX."_guest_menu` WHERE ".$AND." AND id=%s LIMIT 1",
array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1)
{
if ($confirm == 1)
{
$cnt++;
- $result = SQL_QUERY_ESC("SELECT title FROM "._MYSQL_PREFIX."_guest_menu WHERE ".$AND." AND id=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT title FROM `"._MYSQL_PREFIX."_guest_menu` WHERE ".$AND." AND id=%s LIMIT 1",
array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1)
{
$sel = bigintval($sel);
// Update entry
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_guest_menu SET title='%s', action='%s', what='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_guest_menu` SET title='%s', action='%s', what='%s' WHERE ".$AND." AND id=%s LIMIT 1",
array($menu, $_POST['sel_action'][$sel], $_POST['sel_what'][$sel], $sel),__FILE__, __LINE__);
}
LOAD_TEMPLATE("admin_settings_saved", false, SAVING_DONE);
foreach ($_POST['sel'] as $sel => $menu)
{
// Delete enty
- $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_guest_menu WHERE ".$AND." AND id=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_guest_menu` WHERE ".$AND." AND id=%s LIMIT 1",
array(bigintval($sel)), __FILE__, __LINE__);
}
LOAD_TEMPLATE("admin_settings_saved", false, SAVING_DONE);
$sel = bigintval($sel);
// Update entry
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='%s', locked='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_guest_menu` SET visible='%s', locked='%s' WHERE ".$AND." AND id=%s LIMIT 1",
array($_POST['visible'][$sel], $_POST['locked'][$sel], $sel), __FILE__, __LINE__);
}
LOAD_TEMPLATE("admin_settings_saved", false, SAVING_DONE);
if ($confirm == 1)
{
$cnt++;
- $result = SQL_QUERY_ESC("SELECT title, visible, locked FROM "._MYSQL_PREFIX."_guest_menu WHERE ".$AND." AND id=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT title, visible, locked FROM `"._MYSQL_PREFIX."_guest_menu` WHERE ".$AND." AND id=%s LIMIT 1",
array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1)
{
// Get IDs
if (!empty($_GET['w'])) {
// Sub menus selected
- $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_guest_menu WHERE action='%s' AND sort='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_guest_menu` WHERE action='%s' AND sort='%s' LIMIT 1",
array($_GET['act'], bigintval($_GET['tid'])), __FILE__, __LINE__);
list($tid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
- $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_guest_menu WHERE action='%s' AND sort='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_guest_menu` WHERE action='%s' AND sort='%s' LIMIT 1",
array($_GET['act'], bigintval($_GET['fid'])), __FILE__, __LINE__);
list($fid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
} else {
// Main menu selected
- $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_guest_menu WHERE (what='' OR what IS NULL) AND sort='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_guest_menu` WHERE (what='' OR what IS NULL) AND sort='%s' LIMIT 1",
array(bigintval($_GET['tid'])), __FILE__, __LINE__);
list($tid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
- $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_guest_menu WHERE (what='' OR what IS NULL) AND sort='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_guest_menu` WHERE (what='' OR what IS NULL) AND sort='%s' LIMIT 1",
array(bigintval($_GET['fid'])), __FILE__, __LINE__);
list($fid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
if ((!empty($tid)) && (!empty($fid))) {
// Sort menu
- $result_sort = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_guest_menu SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+ $result_sort = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_guest_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
array(bigintval($_GET['tid']), bigintval($fid)), __FILE__, __LINE__);
- $result_sort = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_guest_menu SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+ $result_sort = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_guest_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
array(bigintval($_GET['fid']), bigintval($tid)), __FILE__, __LINE__);
} // END - if
} // END - if
// By default list menus
if (empty($SUB)) {
// List only main menus
- $result = SQL_QUERY("SELECT id, action, what, title, sort FROM "._MYSQL_PREFIX."_guest_menu WHERE (what='' OR what IS NULL) ORDER BY sort ASC", __FILE__, __LINE__);
+ $result = SQL_QUERY("SELECT id, action, what, title, sort FROM `"._MYSQL_PREFIX."_guest_menu` WHERE (what='' OR what IS NULL) ORDER BY sort ASC", __FILE__, __LINE__);
} else {
// List sub menus
- $result = SQL_QUERY_ESC("SELECT id, action, what, title, sort FROM "._MYSQL_PREFIX."_guest_menu WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort ASC",
+ $result = SQL_QUERY_ESC("SELECT id, action, what, title, sort FROM `"._MYSQL_PREFIX."_guest_menu` WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort ASC",
array($SUB), __FILE__, __LINE__);
}
// Check for all accounts
$result = SQL_QUERY_ESC("SELECT DISTINCT d.userid, d.gender, d.surname, d.family, d.email, d.joined, d.last_online, d.ap_notified
-FROM "._MYSQL_PREFIX."_user_data AS d
+FROM `"._MYSQL_PREFIX."_user_data` AS d
WHERE d.status='CONFIRMED' AND d.joined < (UNIX_TIMESTAMP() - %s) AND d.last_online < (UNIX_TIMESTAMP() - %s) AND d.ap_notified < (UNIX_TIMESTAMP() - %s)
".$EXCLUDE_LIST."
ORDER BY d.userid", array($_CONFIG['ap_inactive_since'], $_CONFIG['ap_inactive_since'], $_CONFIG['ap_inactive_since']), __FILE__, __LINE__);
if (!empty($_GET['u_id'])) {
// Check if the user already exists
- $result = SQL_QUERY_ESC("SELECT surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Loads surname, family's name and the email address
ADD_DESCR("admin", __FILE__);
// Start listing holiday requests
-$result = SQL_QUERY("SELECT h.id, h.userid, h.holiday_start, h.holiday_end, h.comments, d.status, d.last_online FROM "._MYSQL_PREFIX."_user_holidays AS h, "._MYSQL_PREFIX."_user_data AS d WHERE h.userid=d.userid ORDER BY h.userid", __FILE__, __LINE__);
+$result = SQL_QUERY("SELECT h.id, h.userid, h.holiday_start, h.holiday_end, h.comments, d.status, d.last_online
+FROM "._MYSQL_PREFIX."_user_holidays AS h
+LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS d
+ON h.userid=d.userid
+ORDER BY h.userid", __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0)
{
if (!empty($_GET['u_id'])) {
// Check if the user already exists
- $result = SQL_QUERY_ESC("SELECT surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
// Is there an entry?
{
// Update database...
// First user's account
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET nl_until='".time()."+nl_timespan', nl_receive='N', nl_timespan='0' WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET nl_until='".time()."+nl_timespan', nl_receive='N', nl_timespan='0' WHERE userid=%s LIMIT 1",
array(bigintval($_POST['uid'])), __FILE__, __LINE__);
// Next the task system...
{
// First let's get the member's ID
$result = SQL_QUERY_ESC("SELECT userid, target_account, payout_total, payout_timestamp, password FROM "._MYSQL_PREFIX."_user_payouts WHERE id=%s LIMIT 1",
- array($_GET['pid']), __FILE__, __LINE__);
+ array($_GET['pid']), __FILE__, __LINE__);
list($uid, $tuid, $points, $tstamp, $tpass) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
if (empty($_GET['task']) && (!empty($uid)) && ($uid > 0)) {
// Get task ID from database
$result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_task_system WHERE userid=%s AND task_type='PAYOUT_REQUEST' AND task_created='".$tstamp."' LIMIT 1",
- array(bigintval($uid)), __FILE__, __LINE__);
+ array(bigintval($uid)), __FILE__, __LINE__);
list($task) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
if (empty($task)) $task = 0;
if ((!empty($task)) && (!empty($uid)) && ($uid > 0)) {
// Load user's data
- $result = SQL_QUERY_ESC("SELECT email, gender, surname, family FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
- array(bigintval($uid)), __FILE__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT email, gender, surname, family FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
+ array(bigintval($uid)), __FILE__, __LINE__);
list($email, $gender, $surname, $family) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
$uid = bigintval($_GET['u_id']);
// Check if the user already exists
- $result_user = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result_user = SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array($uid), __FILE__, __LINE__);
// User found?
ORDER BY level ASC", __FILE__, __LINE__);
} else {
// Loads surname, family's name and the email address
- $result = SQL_QUERY_ESC("SELECT COUNT(*) FROM "._MYSQL_PREFIX."_user_data WHERE refid=%s",
+ $result = SQL_QUERY_ESC("SELECT COUNT(*) FROM `"._MYSQL_PREFIX."_user_data` WHERE refid=%s",
array($uid), __FILE__, __LINE__);
- $result_lck = SQL_QUERY_ESC("SELECT COUNT(*) FROM "._MYSQL_PREFIX."_user_data WHERE refid=%s AND status != 'CONFIRMED' ORDER BY userid",
+ $result_lck = SQL_QUERY_ESC("SELECT COUNT(*) FROM `"._MYSQL_PREFIX."_user_data` WHERE refid=%s AND status != 'CONFIRMED' ORDER BY userid",
array($uid), __FILE__, __LINE__);
$menge = SQL_RESULT($result , 0, 0);
$menge_lck = SQL_RESULT($result_lck, 0, 0);
SQL_FREERESULT($result_lck);
// Query for refs
- $result_levels = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email, status, joined FROM "._MYSQL_PREFIX."_user_data WHERE refid=%s ORDER BY userid ASC",
+ $result_levels = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email, status, joined FROM `"._MYSQL_PREFIX."_user_data` WHERE refid=%s ORDER BY userid ASC",
array($uid), __FILE__, __LINE__);
// Output info message
// Do we have levels?
if (SQL_NUMROWS($result_refs) > 0) {
// Loads surname, family's name and the email address
- $result = SQL_QUERY_ESC("SELECT COUNT(*) FROM "._MYSQL_PREFIX."_user_data WHERE refid=%s",
+ $result = SQL_QUERY_ESC("SELECT COUNT(*) FROM `"._MYSQL_PREFIX."_user_data` WHERE refid=%s",
array($uid), __FILE__, __LINE__);
- $result_lck = SQL_QUERY_ESC("SELECT COUNT(*) FROM "._MYSQL_PREFIX."_user_data WHERE refid=%s AND status != 'CONFIRMED' ORDER BY userid",
+ $result_lck = SQL_QUERY_ESC("SELECT COUNT(*) FROM `"._MYSQL_PREFIX."_user_data` WHERE refid=%s AND status != 'CONFIRMED' ORDER BY userid",
array($uid), __FILE__, __LINE__);
$menge = SQL_RESULT($result , 0, 0);
$menge_lck = SQL_RESULT($result_lck, 0, 0);
$OUT_REFS = ""; $SW = 2;
while (list($refid) = SQL_FETCHROW($result_refs)) {
// Query for data
- $result_user = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email, status, joined FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result_user = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email, status, joined FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array($refid), __FILE__, __LINE__);
// Is the data there?
$data = SQL_FETCHARRAY($result_user);
// Check for referals
- $result_cnt = SQL_QUERY_ESC("SELECT COUNT(userid) FROM "._MYSQL_PREFIX."_user_data WHERE refid=%s",
+ $result_cnt = SQL_QUERY_ESC("SELECT COUNT(userid) FROM `"._MYSQL_PREFIX."_user_data` WHERE refid=%s",
array($refid), __FILE__, __LINE__);
// Load refs
$OUT .= LOAD_TEMPLATE("admin_list_refs_level", true, $levels);
} else {
// Check for referals
- $result_refs = SQL_QUERY_ESC("SELECT COUNT(userid) FROM "._MYSQL_PREFIX."_user_data WHERE refid=%s",
+ $result_refs = SQL_QUERY_ESC("SELECT COUNT(userid) FROM `"._MYSQL_PREFIX."_user_data` WHERE refid=%s",
array(bigintval($levels['userid'])), __FILE__, __LINE__);
$refs_cnt = SQL_RESULT($result_refs, 0, 0);
SQL_FREERESULT($result_refs);
//
$result = SQL_QUERY_ESC("SELECT DISTINCT l.userid, u.status, u.surname, u.family, u.gender, u.email
FROM "._MYSQL_PREFIX."_user_links AS l
-LEFT JOIN "._MYSQL_PREFIX."_user_data AS u
+LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS u
ON l.userid=u.userid
WHERE l.%s='%s' ORDER BY l.userid LIMIT %s",
- array($col, $ID, bigintval($max)),__FILE__, __LINE__);
+ array($col, $ID, bigintval($max)),__FILE__, __LINE__);
$unconfirmed = SQL_NUMROWS($result);
define('__LIST_UNCO_UNCONFIRMED', $unconfirmed);
$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__);
+ $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);
// Is a userid set?
if (!empty($_GET['u_id'])) {
// Load user's data
- $result_user = SQL_QUERY_ESC("SELECT status, gender, surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result_user = SQL_QUERY_ESC("SELECT status, gender, surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
$ACT = false;
if (SQL_NUMROWS($result_user) == 1) {
// Ok, lock the account!
if (GET_EXT_VERSION("user") >= "0.3.5") {
// Lock with reason
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET status='LOCKED',lock_reason='%s',lock_timestamp=NOW() WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET status='LOCKED',lock_reason='%s',lock_timestamp=NOW() WHERE userid=%s LIMIT 1",
array($_POST['reason'], bigintval($_GET['u_id'])), __FILE__, __LINE__);
} else {
// Lock with no lock reason saved
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET status='LOCKED' WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET status='LOCKED' WHERE userid=%s LIMIT 1",
array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
}
// Ok, unlock the account!
if (GET_EXT_VERSION("user") >= "0.3.5") {
// Reset lock reason as well
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET status='CONFIRMED',lock_reason='',lock_timestamp='0000-00-00 00:00' WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET status='CONFIRMED',lock_reason='',lock_timestamp='0000-00-00 00:00' WHERE userid=%s LIMIT 1",
array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
} else {
// No lock reason to reset
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET status='CONFIRMED' WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET status='CONFIRMED' WHERE userid=%s LIMIT 1",
array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
}
// Do not lock him...
$URL = URL."/modules.php?module=admin&what=list_user&u_id=".bigintval($_GET['u_id']);
} else {
- $result = SQL_QUERY_ESC("SELECT email, surname, family FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT email, surname, family FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
// Entry found?
$menus = array(); $titles = array(); $below = array();
// Get all available main menus
- $result = SQL_QUERY("SELECT action, title, sort FROM "._MYSQL_PREFIX."_member_menu WHERE (what='' OR what IS NULL) ORDER BY sort", __FILE__, __LINE__);
+ $result = SQL_QUERY("SELECT action, title, sort FROM `"._MYSQL_PREFIX."_member_menu` WHERE (what='' OR what IS NULL) ORDER BY sort", __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0)
{
// Read menu structure
// Load sub menus :)
foreach ($menus as $key_main => $value_main)
{
- $result = SQL_QUERY_ESC("SELECT what, title, sort FROM "._MYSQL_PREFIX."_member_menu WHERE action='%s' AND what != '' ORDER BY sort",
+ $result = SQL_QUERY_ESC("SELECT what, title, sort FROM `"._MYSQL_PREFIX."_member_menu` WHERE action='%s' AND what != '' ORDER BY sort",
array($value_main), __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0)
{
// Insert new menu entry
if (!empty($_POST['menu']))
{
- $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('%s','%s','%s','%s','%s','%s')",
+ $result = SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('%s','%s','%s','%s','%s','%s')",
array(
$_POST['menu'],
$_POST['name'],
}
else
{
- $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`title`,`visible`,`locked`,`sort`) VALUES ('%s','%s','%s','%s','%s')",
+ $result = SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_member_menu` (`action`,`title`,`visible`,`locked`,`sort`) VALUES ('%s','%s','%s','%s','%s')",
array(
$_POST['name'],
$_POST['title'],
if ($confirm == 1)
{
$cnt++;
- $result = SQL_QUERY_ESC("SELECT title, action, what FROM "._MYSQL_PREFIX."_member_menu WHERE ".$AND." AND id=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT title, action, what FROM `"._MYSQL_PREFIX."_member_menu` WHERE ".$AND." AND id=%s LIMIT 1",
array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1)
{
if ($confirm == 1)
{
$cnt++;
- $result = SQL_QUERY_ESC("SELECT title FROM "._MYSQL_PREFIX."_member_menu WHERE ".$AND." AND id=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT title FROM `"._MYSQL_PREFIX."_member_menu` WHERE ".$AND." AND id=%s LIMIT 1",
array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1)
{
if ($confirm == 1)
{
$cnt++;
- $result = SQL_QUERY_ESC("SELECT title, visible, locked FROM "._MYSQL_PREFIX."_member_menu WHERE ".$AND." AND id=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT title, visible, locked FROM `"._MYSQL_PREFIX."_member_menu` WHERE ".$AND." AND id=%s LIMIT 1",
array(bigintval($sel)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1)
{
switch ($_POST['ok'])
{
case "edit": // Edit menu
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_member_menu SET title='%s', action='%s', what='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_member_menu` SET title='%s', action='%s', what='%s' WHERE ".$AND." AND id=%s LIMIT 1",
array($menu, $_POST['sel_act'][$sel], $_POST['sel_what'][$sel], $sel), __FILE__, __LINE__);
break;
case "del": // Delete menu
- $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE ".$AND." AND id=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_member_menu` WHERE ".$AND." AND id=%s LIMIT 1",
array($sel), __FILE__, __LINE__);
break;
case "status": // Change status of menus
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_member_menu SET visible='%s', locked='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='%s', locked='%s' WHERE ".$AND." AND id=%s LIMIT 1",
array($_POST['visible'][$sel], $_POST['locked'][$sel], $sel), __FILE__, __LINE__);
break;
}
// Get IDs
if (!empty($_GET['w'])) {
// Sub menus selected
- $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_member_menu WHERE action='%s' AND sort='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_member_menu` WHERE action='%s' AND sort='%s' LIMIT 1",
array(bigintval($_GET['act']), bigintval($_GET['tid'])), __FILE__, __LINE__);
list($tid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
- $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_member_menu WHERE action='%s' AND sort='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_member_menu` WHERE action='%s' AND sort='%s' LIMIT 1",
array(bigintval($_GET['act']), bigintval($_GET['fid'])), __FILE__, __LINE__);
list($fid) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
} else {
// Main menu selected
- $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_member_menu WHERE (what='' OR what IS NULL) AND sort='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_member_menu` WHERE (what='' OR what IS NULL) AND sort='%s' LIMIT 1",
array(bigintval($_GET['tid'])), __FILE__, __LINE__);
list($tid) = SQL_FETCHROW($result);
- $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_member_menu WHERE (what='' OR what IS NULL) AND sort='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_member_menu` WHERE (what='' OR what IS NULL) AND sort='%s' LIMIT 1",
array(bigintval($_GET['fid'])), __FILE__, __LINE__);
list($fid) = SQL_FETCHROW($result);
}
if ((!empty($tid)) && (!empty($fid))) {
// Sort menu
- $result_sort = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_member_menu SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+ $result_sort = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_member_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
array(bigintval($_GET['tid']), bigintval($fid)), __FILE__, __LINE__);
- $result_sort = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_member_menu SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+ $result_sort = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_member_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
array(bigintval($_GET['fid']), bigintval($tid)), __FILE__, __LINE__);
} // END - -fi
}
if (!empty($SUB))
{
// Edit sub menus
- $result = SQL_QUERY("SELECT id, action, what, title, sort FROM "._MYSQL_PREFIX."_member_menu WHERE ".$AND." AND what != '' AND what IS NOT NULL ORDER BY sort ASC", __FILE__, __LINE__);
+ $result = SQL_QUERY("SELECT id, action, what, title, sort FROM `"._MYSQL_PREFIX."_member_menu` WHERE ".$AND." AND what != '' AND what IS NOT NULL ORDER BY sort ASC", __FILE__, __LINE__);
}
else
{
// Edit main menus
- $result = SQL_QUERY("SELECT id, action, what, title, sort FROM "._MYSQL_PREFIX."_member_menu WHERE (what='' OR what IS NULL) ORDER BY sort ASC", __FILE__, __LINE__);
+ $result = SQL_QUERY("SELECT id, action, what, title, sort FROM `"._MYSQL_PREFIX."_member_menu` WHERE (what='' OR what IS NULL) ORDER BY sort ASC", __FILE__, __LINE__);
}
$max = SQL_NUMROWS($result);
if ($max > 0)
$ACTIONS = array();
// First fix all main menus (what="")...
-$result_fix = SQL_QUERY("SELECT id, action FROM "._MYSQL_PREFIX."_admin_menu WHERE (what='' OR what IS NULL) AND action != 'logout' ORDER BY sort ASC", __FILE__, __LINE__);
+$result_fix = SQL_QUERY("SELECT id, action FROM `"._MYSQL_PREFIX."_admin_menu` WHERE (what='' OR what IS NULL) AND action != 'logout' ORDER BY sort ASC", __FILE__, __LINE__);
$cnt = 0; $REP = 0;
while(list($id, $act) = SQL_FETCHROW($result_fix)) {
// Store act value for later usage in sorting sub menus
$ACTIONS[] = $act;
// Fix weight
- $result_sort = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admin_menu SET sort=%s WHERE id=%s LIMIT 1",
+ $result_sort = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_admin_menu` SET sort=%s WHERE id=%s LIMIT 1",
array($cnt, $id), __FILE__, __LINE__);
$REP += SQL_AFFECTEDROWS();
}
// Set logout weight to 999
-$result_sort = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_admin_menu SET sort='999' WHERE action='logout' AND (what='' OR what IS NULL) LIMIT 1", __FILE__, __LINE__);
+$result_sort = SQL_QUERY("UPDATE `"._MYSQL_PREFIX."_admin_menu` SET sort='999' WHERE action='logout' AND (what='' OR what IS NULL) LIMIT 1", __FILE__, __LINE__);
// Now sort every each menu
foreach ($ACTIONS as $act) {
- $result_fix = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_admin_menu WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort",
+ $result_fix = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_admin_menu` WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort",
array($act), __FILE__, __LINE__);
$cnt = 1;
while (list($id) = SQL_FETCHROW($result_fix)) {
// Fix weight
- $result_sort = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admin_menu SET sort=%s WHERE id=%s LIMIT 1",
+ $result_sort = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_admin_menu` SET sort=%s WHERE id=%s LIMIT 1",
array($cnt, $id), __FILE__, __LINE__);
$REP += SQL_AFFECTEDROWS();
$REMOVED = 0; // Nothing is removed for now... ;-)
while (list($uid) = SQL_FETCHROW($result))
{
- $result_user = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result_user = SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array(bigintval($uid)), __FILE__, __LINE__);
if (SQL_NUMROWS($result_user) == 0)
{
$ACTIONS = array();
// First fix all main menus (what="")...
-$result_fix = SQL_QUERY("SELECT id, action FROM "._MYSQL_PREFIX."_guest_menu WHERE (what='' OR what IS NULL) AND action != 'logout' ORDER BY sort ASC", __FILE__, __LINE__);
+$result_fix = SQL_QUERY("SELECT id, action FROM `"._MYSQL_PREFIX."_guest_menu` WHERE (what='' OR what IS NULL) AND action != 'logout' ORDER BY sort ASC", __FILE__, __LINE__);
$cnt = 0; $REP = 0;
while(list($id, $act) = SQL_FETCHROW($result_fix))
{
$ACTIONS[] = $act;
// Fix weight
- $result_sort = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_guest_menu SET sort='".$cnt."' WHERE id='".$id."' LIMIT 1", __FILE__, __LINE__);
+ $result_sort = SQL_QUERY("UPDATE `"._MYSQL_PREFIX."_guest_menu` SET sort='".$cnt."' WHERE id='".$id."' LIMIT 1", __FILE__, __LINE__);
$REP += SQL_AFFECTEDROWS();
// Count one up
$cnt++;
}
// Set logout weight to 999
-$result_sort = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_guest_menu SET sort='999' WHERE action='logout' AND (what='' OR what IS NULL) LIMIT 1", __FILE__, __LINE__);
+$result_sort = SQL_QUERY("UPDATE `"._MYSQL_PREFIX."_guest_menu` SET sort='999' WHERE action='logout' AND (what='' OR what IS NULL) LIMIT 1", __FILE__, __LINE__);
// Now sort every each menu
foreach ($ACTIONS as $act) {
- $result_fix = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_guest_menu WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort",
+ $result_fix = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_guest_menu` WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort",
array($act), __FILE__, __LINE__);
$cnt = 1;
while (list($id) = SQL_FETCHROW($result_fix)) {
// Fix weight
- $result_sort = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_guest_menu SET sort=%s WHERE id=%s LIMIT 1",
+ $result_sort = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_guest_menu` SET sort=%s WHERE id=%s LIMIT 1",
array($cnt, $id), __FILE__, __LINE__);
$REP += SQL_AFFECTEDROWS();
$ACTIONS = array();
// First fix all main menus (what="")...
-$result_fix = SQL_QUERY("SELECT id, action FROM "._MYSQL_PREFIX."_member_menu WHERE (what='' OR what IS NULL) AND action != 'logout' ORDER BY sort ASC", __FILE__, __LINE__);
+$result_fix = SQL_QUERY("SELECT id, action FROM `"._MYSQL_PREFIX."_member_menu` WHERE (what='' OR what IS NULL) AND action != 'logout' ORDER BY sort ASC", __FILE__, __LINE__);
$cnt = 0; $REP = 0;
while(list($id, $act) = SQL_FETCHROW($result_fix)) {
// Store action value for later usage in sorting sub menus
$ACTIONS[] = $act;
// Fix weight
- $result_sort = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_member_menu SET sort=%s WHERE id=%s LIMIT 1",
+ $result_sort = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_member_menu` SET sort=%s WHERE id=%s LIMIT 1",
array($cnt, $id), __FILE__, __LINE__);
$REP += SQL_AFFECTEDROWS();
$cnt++;
}
// Set logout weight to 999
-$result_sort = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_member_menu SET sort='999' WHERE action='logout' AND (what='' OR what IS NULL) LIMIT 1", __FILE__, __LINE__);
+$result_sort = SQL_QUERY("UPDATE `"._MYSQL_PREFIX."_member_menu` SET sort='999' WHERE action='logout' AND (what='' OR what IS NULL) LIMIT 1", __FILE__, __LINE__);
// Now sort every each menu
foreach ($ACTIONS as $act) {
- $result_fix = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_member_menu WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort",
+ $result_fix = SQL_QUERY_ESC("SELECT id FROM `"._MYSQL_PREFIX."_member_menu` WHERE action='%s' AND what != '' AND what IS NOT NULL ORDER BY sort",
array($act), __FILE__, __LINE__);
$cnt = 1;
while (list($id) = SQL_FETCHROW($result_fix)) {
// Fix weight
- $result_sort = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_member_menu SET sort=%s WHERE id=%s LIMIT 1",
+ $result_sort = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_member_menu` SET sort=%s WHERE id=%s LIMIT 1",
array($cnt, $id), __FILE__, __LINE__);
$REP += SQL_AFFECTEDROWS();
// Add description as navigation point
ADD_DESCR("admin", __FILE__);
-if (isset($_POST['ok']))
-{
- $result = SQL_QUERY("SELECT userid, email FROM "._MYSQL_PREFIX."_user_data WHERE status='CONFIRMED' AND nl_receive='Y' ORDER BY userid", __FILE__, __LINE__);
- if (SQL_NUMROWS($result) > 0)
- {
+if (isset($_POST['ok'])) {
+ $result = SQL_QUERY("SELECT userid, email
+FROM `"._MYSQL_PREFIX."_user_data`
+WHERE status='CONFIRMED' AND nl_receive='Y'
+ORDER BY userid ASC", __FILE__, __LINE__);
+ if (SQL_NUMROWS($result) > 0) {
// Members are available so we can send out the newsletter!
- while (list($id, $email) = SQL_FETCHROW($result))
- {
+ while (list($id, $email) = SQL_FETCHROW($result)) {
// Construct mail...
$template = "newsletter";
// Check for extension and sending-mode
- if (!EXT_IS_ACTIVE("html_mail", true) && ($_POST['mode'] == "html"))
- {
+ if (!EXT_IS_ACTIVE("html_mail", true) && ($_POST['mode'] == "html")) {
// Set mode to text mode
$_POST['mode'] == "text";
- }
- elseif ($_POST['mode'] == "html")
- {
+ } elseif ($_POST['mode'] == "html") {
// Set HTML templates
$template = "newsletter_html";
}
// Output message
LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_NL_SEND_DONE);
}
-}
- else
-{
+} else {
// Copy data into constants for the template and load it
define('_DATESTAMP', MAKE_DATETIME(time(), "3"));
- if (EXT_IS_ACTIVE("html_mail"))
- {
+ if (EXT_IS_ACTIVE("html_mail")) {
// Load template with HTML mode
LOAD_TEMPLATE("admin_newsletter");
- }
- else
- {
+ } else {
// Load template with only text mode
LOAD_TEMPLATE("admin_newsletter_nohtml");
}
define('__POINTS_VALUE', $_POST['points']);
if ((isset($_POST['ok'])) && ($_POST['points'] > 0))
{
- $result_main = SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE status='CONFIRMED' ORDER BY userid", __FILE__, __LINE__);
+ $result_main = SQL_QUERY("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE status='CONFIRMED' ORDER BY userid", __FILE__, __LINE__);
while (list($uid) = SQL_FETCHROW($result_main))
{
// User ID found in URL so we use this give him some credits
- $result = SQL_QUERY_ESC("SELECT surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s AND status='CONFIRMED' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s AND status='CONFIRMED' LIMIT 1",
array(bigintval($uid)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1)
{
elseif (!empty($_GET['u_id']))
{
// User ID found in URL so we use this give him some credits
- $result = SQL_QUERY_ESC("SELECT surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s AND status='CONFIRMED' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s AND status='CONFIRMED' LIMIT 1",
array(bigintval($_GET['u_id'])),__FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1)
{
// Check for bonus extension version >= 0.4.4 for the order bonus
if ((GET_EXT_VERSION("bonus") >= "0.4.4") && ($_CONFIG['bonus_active'] == "Y")) {
// Add points directly
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET bonus_order=bonus_order+".$_CONFIG['bonus_order']." WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET bonus_order=bonus_order+".$_CONFIG['bonus_order']." WHERE userid=%s LIMIT 1",
array(bigintval($DATA['sender'])), __FILE__, __LINE__);
// Subtract bonus points from system
// Is a user id given?
if ((isset($_GET['u_id'])) && (bigintval($_GET['u_id']) > 0)) {
// Load user data and display it
- $result = SQL_QUERY_ESC("SELECT surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array(bigintval($_GET['u_id'])), __FILE__, __LINE__);
// Is a user account found?
} // END - if
// Get theme from profile
- $result = SQL_QUERY_ESC("SELECT curr_theme".$ADD." FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT curr_theme".$ADD." FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array($GLOBALS['userid']), __FILE__, __LINE__);
// Load data
$uid = 0;
// Search for an unconfirmed or confirmed account
- $result = SQL_QUERY_ESC("SELECT userid, email, refid FROM "._MYSQL_PREFIX."_user_data WHERE user_hash='%s' AND (status='UNCONFIRMED' OR status='CONFIRMED') LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT userid, email, refid FROM `"._MYSQL_PREFIX."_user_data` WHERE user_hash='%s' AND (status='UNCONFIRMED' OR status='CONFIRMED') LIMIT 1",
array($_GET['hash']), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Ok, he want's to confirm now so we load some data
list ($uid, $email, $rid) = SQL_FETCHROW($result);
// Unlock his account (but only when it is on UNCONFIRMED!)
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET status='CONFIRMED', ref_payout=%s, user_hash=NULL WHERE user_hash='%s' AND status='UNCONFIRMED' LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET status='CONFIRMED', ref_payout=%s, user_hash=NULL WHERE user_hash='%s' AND status='UNCONFIRMED' LIMIT 1",
array($_CONFIG['ref_payout'], $_GET['hash']), __FILE__, __LINE__);
if (SQL_AFFECTEDROWS() == 1) {
$msg = LOAD_EMAIL_TEMPLATE("confirm-member", array('points' => $_CONFIG['points_register']), bigintval($uid));
// Maybe he got "referaled"?
if (($rid > 0) && ($rid != $uid)) {
// Select the referal userid
- $result = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array(bigintval($rid)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Update ref counter...
// If version matches add ref bonus to refid's account
if ((GET_EXT_VERSION("bonus") >= "0.4.4") && ($_CONFIG['bonus_active'] == "Y")) {
// Add points (directly only!)
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET bonus_ref=bonus_ref+%s WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET bonus_ref=bonus_ref+%s WHERE userid=%s LIMIT 1",
array($_CONFIG['bonus_ref'], bigintval($rid)), __FILE__, __LINE__);
// Subtract points from system
elseif ((isset($_POST['ok'])) && (!empty($_POST['email'])))
{
// Confirmation link requested 0 1 2
- $result = SQL_QUERY_ESC("SELECT userid, status, user_hash FROM "._MYSQL_PREFIX."_user_data WHERE email='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT userid, status, user_hash FROM `"._MYSQL_PREFIX."_user_data` WHERE email='%s' LIMIT 1",
array($_POST['email']), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1)
{
$password = ""; $uid2 = ""; $dmy = "";
if ($probe_nickname === true) {
// Nickname entered
- $result = SQL_QUERY_ESC("SELECT userid, password, last_online".$LAST." FROM "._MYSQL_PREFIX."_user_data WHERE nickname='%s' AND status='CONFIRMED' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT userid, password, last_online".$LAST." FROM `"._MYSQL_PREFIX."_user_data` WHERE nickname='%s' AND status='CONFIRMED' LIMIT 1",
array($uid), __FILE__, __LINE__);
list($uid2, $password, $online, $login) = SQL_FETCHROW($result);
if (!empty($uid2)) $uid = bigintval($uid2);
} else {
// Direct userid entered
- $result = SQL_QUERY_ESC("SELECT userid, password, last_online".$LAST." FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s AND status='CONFIRMED' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT userid, password, last_online".$LAST." FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s AND status='CONFIRMED' LIMIT 1",
array($uid, $hash), __FILE__, __LINE__);
list($uid2, $password, $online, $login) = SQL_FETCHROW($result);
}
$hash = generateHash($_POST['password']);
// ... and update database
- SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET password='%s' WHERE userid=%s AND status='CONFIRMED' LIMIT 1",
+ SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET password='%s' WHERE userid=%s AND status='CONFIRMED' LIMIT 1",
array($hash, $uid), __FILE__, __LINE__);
// No login bonus by default
if ($login) {
// Update database records
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET total_logins=total_logins+1".$ADD." WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET total_logins=total_logins+1".$ADD." WHERE userid=%s LIMIT 1",
array($uid), __FILE__, __LINE__);
if (SQL_AFFECTEDROWS() == 1) {
// Procedure to checking for login data
}
} elseif (GET_EXT_VERSION("sql_patches") >= "0.4.7") {
// Update failture counter
- SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET login_failtures=login_failtures+1,last_failture=NOW() WHERE userid=%s LIMIT 1",
+ SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET login_failtures=login_failtures+1,last_failture=NOW() WHERE userid=%s LIMIT 1",
array($uid), __FILE__, __LINE__);
// Wrong password!
}
} elseif ((($probe_nickname) && (!empty($uid2))) || ($uid2 == $uid)) {
// Other account status?
- $result = SQL_QUERY_ESC("SELECT status FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT status FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array($uid), __FILE__, __LINE__);
// Entry found?
$probe_nickname = ((EXT_IS_ACTIVE("nickname")) && (("".round($_POST['id'])."") != $_POST['id']));
if ($probe_nickname) {
// Nickname entered
- $result = SQL_QUERY_ESC("SELECT userid, status FROM "._MYSQL_PREFIX."_user_data WHERE nickname='%s' OR email='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT userid, status FROM `"._MYSQL_PREFIX."_user_data` WHERE nickname='%s' OR email='%s' LIMIT 1",
array($uid, $_POST['email']), __FILE__, __LINE__);
} else {
// Direct userid entered
- $result = SQL_QUERY_ESC("SELECT userid, status FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s OR email='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT userid, status FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s OR email='%s' LIMIT 1",
array(bigintval($uid), $_POST['email']), __FILE__, __LINE__);
}
if ($status == "CONFIRMED") {
// Ooppps, this was missing! ;-) We should update the database...
$NEW_PASS = GEN_PASS();
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET password='%s' WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET password='%s' WHERE userid=%s LIMIT 1",
array(generateHash($NEW_PASS), $uid), __FILE__, __LINE__);
// Prepare data and message for email
}
// User who can receive mails
-$result_max = SQL_QUERY("SELECT COUNT(max_mails) FROM "._MYSQL_PREFIX."_user_data WHERE status='CONFIRMED' AND max_mails > 0", __FILE__, __LINE__);
+$result_max = SQL_QUERY("SELECT COUNT(max_mails) FROM `"._MYSQL_PREFIX."_user_data` WHERE status='CONFIRMED' AND max_mails > 0", __FILE__, __LINE__);
list($dummy) = SQL_FETCHROW($result_max);
SQL_FREERESULT($result_max);
define('user_max_mails', $dummy);
// Users who can receive mails today
-$result_rec = SQL_QUERY("SELECT COUNT(receive_mails) FROM "._MYSQL_PREFIX."_user_data WHERE status='CONFIRMED' AND receive_mails > 0", __FILE__, __LINE__);
+$result_rec = SQL_QUERY("SELECT COUNT(receive_mails) FROM `"._MYSQL_PREFIX."_user_data` WHERE status='CONFIRMED' AND receive_mails > 0", __FILE__, __LINE__);
list($dummy) = SQL_FETCHROW($result_rec);
SQL_FREERESULT($result_rec);
define('user_max_rec', $dummy);
// Total referal link clicks, total logins
$result = SQL_QUERY("SELECT DISTINCT SUM(d.ref_clicks), SUM(d.total_logins)
-FROM "._MYSQL_PREFIX."_user_data AS d", __FILE__, __LINE__);
+FROM `"._MYSQL_PREFIX."_user_data` AS d", __FILE__, __LINE__);
list($ref, $logins) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
if (EXT_IS_ACTIVE("beg")) {
// Clicks on beg links
- $result = SQL_QUERY("SELECT SUM(beg_clicks) FROM "._MYSQL_PREFIX."_user_data WHERE beg_clicks>0", __FILE__, __LINE__);
+ $result = SQL_QUERY("SELECT SUM(beg_clicks) FROM `"._MYSQL_PREFIX."_user_data` WHERE beg_clicks>0", __FILE__, __LINE__);
list($extra) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
if (empty($extra)) $extra = 0;
// Total holiday requests
$result = SQL_QUERY("SELECT DISTINCT COUNT(h.userid)
FROM "._MYSQL_PREFIX."_user_holidays AS h
-LEFT JOIN "._MYSQL_PREFIX."_user_data AS d
+LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS d
ON h.userid=d.userid
WHERE d.holiday_active='Y'",
__FILE__, __LINE__);
// Statistics for points transfers
$result = SQL_QUERY("SELECT DISTINCT COUNT(t.id), SUM(t.points)
FROM "._MYSQL_PREFIX."_user_transfers_in AS t
-LEFT JOIN "._MYSQL_PREFIX."_user_data AS d
+LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS d
ON t.userid=d.userid",
__FILE__, __LINE__);
list($count_in, $points_in) = SQL_FETCHROW($result);
$result = SQL_QUERY("SELECT DISTINCT COUNT(t.id), SUM(t.points)
FROM "._MYSQL_PREFIX."_user_transfers_out AS t
-LEFT JOIN "._MYSQL_PREFIX."_user_data AS d
+LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS d
ON t.userid=d.userid",
__FILE__, __LINE__);
list($count_out, $points_out) = SQL_FETCHROW($result);
$_POST['refid'] = 0;
if ($GLOBALS['refid'] > 0) {
// Test if the refid is valid
- $result = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array(bigintval($GLOBALS['refid'])), __FILE__, __LINE__);
// Userid found?
// Check for IP timeout?
if ($_CONFIG['ip_timeout'] > 0) {
// Check his IP number
- $result = SQL_QUERY_ESC("SELECT joined, last_update FROM "._MYSQL_PREFIX."_user_data WHERE REMOTE_ADDR='%s' AND (joined > (UNIX_TIMESTAMP() - %s) OR last_update > (UNIX_TIMESTAMP() - %s)) LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT joined, last_update FROM `"._MYSQL_PREFIX."_user_data` WHERE REMOTE_ADDR='%s' AND (joined > (UNIX_TIMESTAMP() - %s) OR last_update > (UNIX_TIMESTAMP() - %s)) LIMIT 1",
array(GET_REMOTE_ADDR(), $_CONFIG['ip_timeout'], $_CONFIG['ip_timeout']), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Same IP in timeout range and different email address entered... Eat this, faker! ;-)
// Create user's account... //
//////////////////////////////
//
- $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_user_data (gender, surname, family, street_nr,%s, zip, city, email, birth_day, birth_month, birth_year, password, max_mails, receive_mails, refid, status, user_hash, REMOTE_ADDR, joined, last_update".$ADD1.")
+ $result = SQL_QUERY_ESC("INSERT INTO `"._MYSQL_PREFIX."_user_data` (gender, surname, family, street_nr,%s, zip, city, email, birth_day, birth_month, birth_year, password, max_mails, receive_mails, refid, status, user_hash, REMOTE_ADDR, joined, last_update".$ADD1.")
VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONFIRMED','%s','%s', UNIX_TIMESTAMP(), UNIX_TIMESTAMP()".$ADD2.")",
array(
$countryRow,
{
case "MEMBERS": // Statistics about your members
// Members yesterday / today online
- $ymem = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE last_online >= ".START_YDAY." AND last_online < ".START_TDAY." AND status='CONFIRMED'", __FILE__, __LINE__));
- $tmem = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE last_online >= ".START_TDAY." AND status='CONFIRMED'", __FILE__, __LINE__));
+ $ymem = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE last_online >= ".START_YDAY." AND last_online < ".START_TDAY." AND status='CONFIRMED'", __FILE__, __LINE__));
+ $tmem = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE last_online >= ".START_TDAY." AND status='CONFIRMED'", __FILE__, __LINE__));
// Yesterday / today registered
- $yreg = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE joined >= ".START_YDAY." AND joined < ".START_TDAY, __FILE__, __LINE__));
- $treg = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE joined >= ".START_TDAY, __FILE__, __LINE__));
+ $yreg = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE joined >= ".START_YDAY." AND joined < ".START_TDAY, __FILE__, __LINE__));
+ $treg = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE joined >= ".START_TDAY, __FILE__, __LINE__));
// Only males / females
- $male = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE gender='M' AND status='CONFIRMED'", __FILE__, __LINE__));
- $female = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE gender='F' AND status='CONFIRMED'", __FILE__, __LINE__));
+ $male = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE gender='M' AND status='CONFIRMED'", __FILE__, __LINE__));
+ $female = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE gender='F' AND status='CONFIRMED'", __FILE__, __LINE__));
// Unconfirmed accounts
- $unconfirmed = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE status != 'CONFIRMED'", __FILE__, __LINE__));
+ $unconfirmed = SQL_NUMROWS(SQL_QUERY("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE status != 'CONFIRMED'", __FILE__, __LINE__));
// Total members
$total = $male + $female;
for ($idx = 1; $idx < 13; $idx++)
{
$month = $idx; if ($idx < 10) $month = "0".$idx;
- $months[$month] = SQL_NUMROWS(SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE birth_month=%s AND status='CONFIRMED'",
+ $months[$month] = SQL_NUMROWS(SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE birth_month=%s AND status='CONFIRMED'",
array(bigintval($month)), __FILE__, __LINE__));
}
case "MODULES": // TOP10 module clicks
$AND = "";
if (!IS_ADMIN()) $AND = " AND locked='N' AND visible='Y'";
- $guest_t10 = SQL_QUERY("SELECT counter, title FROM "._MYSQL_PREFIX."_guest_menu WHERE counter > 0".$AND." ORDER BY counter DESC LIMIT 0,10", __FILE__, __LINE__);
- $mem_t10 = SQL_QUERY("SELECT counter, title FROM "._MYSQL_PREFIX."_member_menu WHERE counter > 0".$AND." ORDER BY counter DESC LIMIT 0,10", __FILE__, __LINE__);
+ $guest_t10 = SQL_QUERY("SELECT counter, title FROM `"._MYSQL_PREFIX."_guest_menu` WHERE counter > 0".$AND." ORDER BY counter DESC LIMIT 0,10", __FILE__, __LINE__);
+ $mem_t10 = SQL_QUERY("SELECT counter, title FROM `"._MYSQL_PREFIX."_member_menu` WHERE counter > 0".$AND." ORDER BY counter DESC LIMIT 0,10", __FILE__, __LINE__);
if ((SQL_NUMROWS($guest_t10) > 0) || (SQL_NUMROWS($mem_t10) > 0))
{
// Output header
//// TOP earners
$result = SQL_QUERY_ESC("SELECT DISTINCT p.userid, d.".$ADD.", (SUM(p.points) - d.used_points) AS tpoints, d.last_online
FROM "._MYSQL_PREFIX."_user_points AS p
-LEFT JOIN "._MYSQL_PREFIX."_user_data AS d
+LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS d
ON p.userid=d.userid
WHERE p.points > 0 AND d.status='CONFIRMED'
GROUP BY p.userid
//// TOP referal "hunter"
$result = SQL_QUERY_ESC("SELECT DISTINCT r.userid, d.".$ADD.", SUM(r.counter) AS refs, d.last_online
FROM "._MYSQL_PREFIX."_refsystem AS r
-LEFT JOIN "._MYSQL_PREFIX."_user_data AS d
+LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS d
ON r.userid=d.userid
WHERE r.counter > 0 AND d.status='CONFIRMED'
GROUP BY r.userid
}
// Run SQL command
-$result = SQL_QUERY_ESC("SELECT ".$data.", beg_clicks FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1", array($uid), __FILE__, __LINE__);
+$result = SQL_QUERY_ESC("SELECT ".$data.", beg_clicks
+FROM `"._MYSQL_PREFIX."_user_data`
+WHERE userid=%s
+LIMIT 1", array($uid), __FILE__, __LINE__);
list($uid, $clicks) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
if (isset($_POST['ok']))
{
// Save settings
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET html='%s' WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET html='%s' WHERE userid=%s LIMIT 1",
array($_POST['html'], $GLOBALS['userid']), __FILE__, __LINE__);
LOAD_TEMPLATE("admin_settings_saved", false, MEMBER_SETTINGS_SAVED);
}
else
{
// Load template for changing settings
- $result = SQL_QUERY_ESC("SELECT html FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT html FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array($GLOBALS['userid']), __FILE__, __LINE__);
list($mode) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
if (EXT_IS_ACTIVE("country", true))
{
// New way 0 1 2 3 4 5 6 7 8 9 10 11 12 13
- $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country_code, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country_code, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array(UID_VALUE), __FILE__, __LINE__);
}
else
{
// Old way 0 1 2 3 4 5 6 7 8 9 10 11 12 13
- $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array(UID_VALUE), __FILE__, __LINE__);
}
$DATA = SQL_FETCHROW($result);
if (EXT_IS_ACTIVE("country", true)) {
// New way 0 1 2 3 4 5 6 7 8 9 10 11 12 13
$result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country_code, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update
-FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array(UID_VALUE), __FILE__, __LINE__);
} else {
// Old way 0 1 2 3 4 5 6 7 8 9 10 11 12 13
$result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update
-FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array(UID_VALUE), __FILE__, __LINE__);
}
case "save": // Save entered data
// Load old email / password: 0 1 2
- $result = SQL_QUERY_ESC("SELECT email, password, last_update FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT email, password, last_update FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array(UID_VALUE), __FILE__, __LINE__);
$DATA = SQL_FETCHROW($result);
SQL_FREERESULT($result);
if (EXT_IS_ACTIVE("country"))
{
// New way
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET
gender='%s', surname='%s', family='%s',
street_nr='%s',
country_code=%s, zip=%s, city='%s',
else
{
// Old way
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET
gender='%s', surname='%s', family='%s',
street_nr='%s',
country='%s', zip=%s, city='%s',
break;
case "notify": // Switch off notfication
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET notified='N', last_update=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET notified='N', last_update=UNIX_TIMESTAMP() WHERE userid=%s LIMIT 1",
array($GLOBALS['userid']), __FILE__, __LINE__);
$URL = URL."/modules.php?module=login&what=welcome&msg=".urlencode(PROFILE_UPDATED);
break;
ADD_DESCR("member", __FILE__);
// Load status
-$result = SQL_QUERY_ESC("SELECT nl_receive, nl_until, nl_timespan FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+$result = SQL_QUERY_ESC("SELECT nl_receive, nl_until, nl_timespan FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array($GLOBALS['userid']), __FILE__, __LINE__);
list($status, $until, $span) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
if ((isset($_POST['ok'])) && ($status == "Y") && ($span == "0"))
{
// Save request
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET nl_timespan='".($_CONFIG['one_day'] * 30)."' WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET nl_timespan='".($_CONFIG['one_day'] * 30)."' WHERE userid=%s LIMIT 1",
array($GLOBALS['userid']), __FILE__, __LINE__);
// Load admin message
if ($VALID) {
// Look for nickname in database (we only need just one entry so don't worry about the "LIMIT 1" !
- $result = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE nickname='%s' AND userid != '%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE nickname='%s' AND userid != '%s' LIMIT 1",
array($_POST['nickname'], $GLOBALS['userid']), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 0) {
// Nickname not in use, so set it now
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET nickname='%s' WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET nickname='%s' WHERE userid=%s LIMIT 1",
array($_POST['nickname'], $GLOBALS['userid']), __FILE__, __LINE__);
$content = NICKNAME_SAVED;
} else {
// Check for userids
$result = SQL_QUERY_ESC("SELECT DISTINCT c.userid FROM "._MYSQL_PREFIX."_user_cats AS c
-LEFT JOIN "._MYSQL_PREFIX."_user_data AS d
+LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS d
ON c.userid=d.userid
WHERE c.cat_id=%s AND c.userid != '%s' AND d.status='CONFIRMED' AND d.receive_mails > 0".$ADD."
ORDER BY d.%s %s",
$MAX_SEND = count($TEST);
// Update receiver list
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET receive_mails=receive_mails-1 WHERE userid IN (%s) LIMIT %s",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET receive_mails=receive_mails-1 WHERE userid IN (%s) LIMIT %s",
array(str_replace(";", ", ", $RECEIVER), $MAX_SEND), __FILE__, __LINE__);
// Is calculated max receivers larger than wanted receivers then reset it
$HOL_ACTIVE = false;
if ($HOLIDAY) {
// Check user's holiday status
- $result_holiday = SQL_QUERY_ESC("SELECT DISTINCT d.userid FROM "._MYSQL_PREFIX."_user_data AS d
+ $result_holiday = SQL_QUERY_ESC("SELECT DISTINCT d.userid FROM `"._MYSQL_PREFIX."_user_data` AS d
LEFT JOIN "._MYSQL_PREFIX."_user_holidays AS h
ON d.userid=h.userid
WHERE d.userid=%s AND d.receive_mails > 0 AND d.status='CONFIRMED' AND d.holiday_active='Y'
if (!$HOL_ACTIVE) {
// Check if the user want's to receive mails?
- $result_ver = SQL_QUERY_ESC("SELECT zip FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s".$HTML." AND receive_mails > 0 AND status='CONFIRMED' LIMIT 1",
+ $result_ver = SQL_QUERY_ESC("SELECT zip FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s".$HTML." AND receive_mails > 0 AND status='CONFIRMED' LIMIT 1",
array(bigintval($ucat)), __FILE__, __LINE__);
if ((SQL_NUMROWS($result_ver) == 1) && (!empty($_POST['zip'])) && ($_CONFIG['order_multi_page'] == "Y")) {
// Put rows to constant for the main template
define('__REF_LEVEL_ROWS', $OUT);
-$result = SQL_QUERY_ESC("SELECT used_points, ref_payout FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
- array($GLOBALS['userid']), __FILE__, __LINE__);
+$result = SQL_QUERY_ESC("SELECT used_points, ref_payout FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
+ array($GLOBALS['userid']), __FILE__, __LINE__);
list($USED, $PAY) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
if (GET_EXT_VERSION("user") >= "0.1.4") {
$ADD = ", emails_sent, emails_received";
}
- $result = SQL_QUERY_ESC("SELECT mails_confirmed".$ADD." FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT mails_confirmed".$ADD." FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__);
list($CONFIRMED, $SENT, $RECEIVED) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
if (GET_EXT_VERSION("bonus") >= "0.4.4") $ADD = ", bonus_ref, bonus_order, bonus_stats";
// Load data
- $result = SQL_QUERY_ESC("SELECT login_bonus, turbo_bonus".$ADD." FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
- array($GLOBALS['userid']), __FILE__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT login_bonus, turbo_bonus".$ADD." FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
+ array($GLOBALS['userid']), __FILE__, __LINE__);
// We don't add this points now. This will be done after each month
list($login, $turbo, $ref, $order, $stats) = SQL_FETCHROW($result);
$content['refid'] = bigintval($_CONFIG['primera_refid']);
// Get Primus id
- $result = SQL_QUERY_ESC("SELECT primera_userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT primera_userid FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array($GLOBALS['userid']), __FILE__, __LINE__);
// Are there some entries?
// Get Primera id
$content['primus_nickname'] = "";
- $result = SQL_QUERY_ESC("SELECT primera_userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT primera_userid FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array($GLOBALS['userid']), __FILE__, __LINE__);
// Are there some entries?
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",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET `primera_userid`=%s WHERE userid=%s LIMIT 1",
array($_POST['primus_nickname'], $GLOBALS['userid']), __FILE__, __LINE__);
// All done!
ADD_DESCR("member", __FILE__);
// Load current referal clicks
-$result = SQL_QUERY_ESC("SELECT ref_clicks FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+$result = SQL_QUERY_ESC("SELECT ref_clicks FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array($GLOBALS['userid']), __FILE__, __LINE__);
list($c) = SQL_FETCHROW($result);
if (!empty($_POST['member_theme'])) {
// Save theme to member's profile
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET curr_theme='%s' WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET curr_theme='%s' WHERE userid=%s LIMIT 1",
array($_POST['member_theme'], $GLOBALS['userid']), __FILE__, __LINE__);
// Set new theme for guests
ADD_DESCR("member", __FILE__);
// Load data
-$result = SQL_QUERY_ESC("SELECT opt_in FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+$result = SQL_QUERY_ESC("SELECT opt_in FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array($GLOBALS['userid']), __FILE__, __LINE__);
list($opt_in) = SQL_FETCHROW($result);
$nick = true;
}
// Re-check receivers and own personal data
- $result = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email".$ADD." FROM "._MYSQL_PREFIX."_user_data WHERE userid IN ('%s','%s') AND status='CONFIRMED' ORDER BY userid LIMIT 2",
+ $result = SQL_QUERY_ESC("SELECT userid, gender, surname, family, email".$ADD." FROM `"._MYSQL_PREFIX."_user_data` WHERE userid IN ('%s','%s') AND status='CONFIRMED' ORDER BY userid LIMIT 2",
array($GLOBALS['userid'], bigintval($_POST['to_uid'])), __FILE__, __LINE__);
$valid_data = (SQL_NUMROWS($result) == 2);
if (EXT_IS_ACTIVE("nickname"))
{
// Load userid and nickname
- $result = SQL_QUERY_ESC("SELECT userid, nickname FROM "._MYSQL_PREFIX."_user_data WHERE status='CONFIRMED' AND opt_in='Y' AND userid != '%s' ORDER BY userid",
+ $result = SQL_QUERY_ESC("SELECT userid, nickname FROM `"._MYSQL_PREFIX."_user_data` WHERE status='CONFIRMED' AND opt_in='Y' AND userid != '%s' ORDER BY userid",
array($GLOBALS['userid']), __FILE__, __LINE__);
}
else
{
// Load only userid
- $result = SQL_QUERY_ESC("SELECT userid, userid FROM "._MYSQL_PREFIX."_user_data WHERE status='CONFIRMED' AND opt_in='Y' AND userid != '%s' ORDER BY userid",
+ $result = SQL_QUERY_ESC("SELECT userid, userid FROM `"._MYSQL_PREFIX."_user_data` WHERE status='CONFIRMED' AND opt_in='Y' AND userid != '%s' ORDER BY userid",
array($GLOBALS['userid']), __FILE__, __LINE__);
}
if (SQL_NUMROWS($result) > 0)
if (isset($_POST['ok'])) {
// Save settings
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET opt_in='%s' WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET opt_in='%s' WHERE userid=%s LIMIT 1",
array($_POST['opt_in'], $GLOBALS['userid']), __FILE__, __LINE__);
// Rember for next switch() command
LOAD_TEMPLATE("member_welcome_header");
// Chedk if he is returning from a profile update notification
-$result = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE notified='Y' AND userid=%s LIMIT 1",
- array($GLOBALS['userid']), __FILE__, __LINE__);
+$result = SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE notified='Y' AND userid=%s LIMIT 1",
+ array($GLOBALS['userid']), __FILE__, __LINE__);
-if ((SQL_NUMROWS($result) == 1) && (EXT_IS_ACTIVE("profile")))
-{
+if ((SQL_NUMROWS($result) == 1) && (EXT_IS_ACTIVE("profile"))) {
// Yes, he is so let's place him his wanted buttons
LOAD_TEMPLATE("profile-update");
-}
- else
-{
+} else {
// Load the template below this default data
LOAD_TEMPLATE("member_welcome");
}
$content['wds66_id'] = 0;
// Get WDS66 id
- $result = SQL_QUERY_ESC("SELECT wernis_userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT wernis_userid FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array($GLOBALS['userid']), __FILE__, __LINE__);
// Are there some entries?
// Get WDS66 id
$content['wds66_id'] = "";
- $result = SQL_QUERY_ESC("SELECT wernis_userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT wernis_userid FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array($GLOBALS['userid']), __FILE__, __LINE__);
// Are there some entries?
WERNIS_ADD_FEES_TO_ARRAY($content);
// Get WDS66 id
- $result = SQL_QUERY_ESC("SELECT wernis_userid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT wernis_userid FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array($GLOBALS['userid']), __FILE__, __LINE__);
// Are there some entries?
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",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET `wernis_userid`=%s WHERE userid=%s LIMIT 1",
array(bigintval($_POST['wds66_id']), $GLOBALS['userid']), __FILE__, __LINE__);
// All done!
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",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET `wernis_userid`=%s WHERE userid=%s LIMIT 1",
array(bigintval($_POST['wds66_id']), $GLOBALS['userid']), __FILE__, __LINE__);
// All done!
// Finally is the entry valid?
if (SQL_AFFECTEDROWS() == 1) {
// Load personal data...
- $result = SQL_QUERY_ESC("SELECT gender, surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT gender, surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array($GLOBALS['userid']), __FILE__, __LINE__);
list($gender, $sname, $fname, $email) = SQL_FETCHROW($result);
SQL_FREERESULT($result);
} // END - while
// Reset accounts
- $result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_user_data SET beg_points=0.00000 WHERE beg_points > 0", __FILE__, __LINE__);
+ $result = SQL_QUERY("UPDATE `"._MYSQL_PREFIX."_user_data` SET beg_points=0.00000 WHERE beg_points > 0", __FILE__, __LINE__);
} // END - if
// Free memory
if ($_CONFIG['last_month'] != $curr)
{
// Check for unsubscribed members
- $result = SQL_QUERY("SELECT userid, nl_until FROM "._MYSQL_PREFIX."_user_data WHERE nl_receive='N' ORDER BY userid", __FILE__, __LINE__);
+ $result = SQL_QUERY("SELECT userid, nl_until FROM `"._MYSQL_PREFIX."_user_data` WHERE nl_receive='N' ORDER BY userid", __FILE__, __LINE__);
if (SQL_NUMROWS($result) > 0)
{
// Some unsubscriptions are found so we reset them to receive newsletters
while(list($uid, $until) = SQL_FETCHROW($result))
{
// Update account
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET nl_receive='Y', nl_until='0' WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET nl_receive='Y', nl_until='0' WHERE userid=%s LIMIT 1",
array(bigintval($uid)), __FILE__, __LINE__);
// Send email to him
function SEARCH_EMAIL_USERTAB($email)
{
$ret = false;
- $result = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE email LIKE '{PER}%s{PER}' LIMIT 1", array($email), __FILE__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE email LIKE '{PER}%s{PER}' LIMIT 1", array($email), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) $ret = true;
SQL_FREERESULT($result);
return $ret;
if ((!empty($GLOBALS['userid'])) && (isSessionVariableSet('u_hash')) && (isSessionVariableSet('lifetime')) && (defined('COOKIE_PATH')))
{
// Cookies are set with values, but are they valid?
- $result = SQL_QUERY_ESC("SELECT password, status, last_module, last_online FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT password, status, last_module, last_online FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array($GLOBALS['userid']), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1)
{
$newl = time() + bigintval(get_session('lifetime'));
// Load last module and last online time
- $result = SQL_QUERY_ESC("SELECT last_module, last_online FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__);
+ $result = SQL_QUERY_ESC("SELECT last_module, last_online FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load last module and online time
list($mod, $onl) = SQL_FETCHROW($result);
} // END - if
// Update last module / online time
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET last_module='%s', last_online=UNIX_TIMESTAMP(), REMOTE_ADDR='%s' WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET last_module='%s', last_online=UNIX_TIMESTAMP(), REMOTE_ADDR='%s' WHERE userid=%s LIMIT 1",
array($GLOBALS['what'], GET_REMOTE_ADDR(), $GLOBALS['userid']), __FILE__, __LINE__);
}
} else {
global $_CONFIG, $DATA;
// Load hash
- $result_main = SQL_QUERY_ESC("SELECT password FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s AND status='CONFIRMED' LIMIT 1",
+ $result_main = SQL_QUERY_ESC("SELECT password FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s AND status='CONFIRMED' LIMIT 1",
array($GLOBALS['userid']), __FILE__, __LINE__);
if (SQL_NUMROWS($result_main) == 1) {
// Load hash from database
$hash = generatePassString($hashDB);
if (($hash == get_session('u_hash')) || ($_POST['pass1'] == $_POST['pass2'])) {
// Load user's data
- $result = SQL_QUERY_ESC("SELECT gender, surname, family, street_nr, country, zip, city, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s AND password='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT gender, surname, family, street_nr, country, zip, city, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s AND password='%s' LIMIT 1",
array($GLOBALS['userid'], $hashDB), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load the data
if ($locked) $data = "locked_points";
// Check user account
- $result_user = SQL_QUERY_ESC("SELECT refid, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s AND status='CONFIRMED' LIMIT 1",
+ $result_user = SQL_QUERY_ESC("SELECT refid, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s AND status='CONFIRMED' LIMIT 1",
array(bigintval($uid)), __FILE__, __LINE__);
//* DEBUG: */ print __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):uid={$uid},numRows=".SQL_NUMROWS($result_user).",points={$points}<br />\n";
} // END - if
// Check for his referal
- $result = SQL_QUERY_ESC("SELECT refid FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT refid FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array(bigintval($uid)), __FILE__, __LINE__);
// Load refid
// Activate exchange (DEPERECATED???)
function activateExchange() {
global $_CONFIG;
- $result = SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE status='CONFIRMED' AND max_mails > 0", __FILE__, __LINE__);
+ $result = SQL_QUERY("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE status='CONFIRMED' AND max_mails > 0", __FILE__, __LINE__);
if (SQL_NUMROWS($result) >= $_CONFIG['activate_xchange'])
{
// Free memory
// Activate System
$SQLs = array(
"UPDATE "._MYSQL_PREFIX."_mod_reg SET locked='N', hidden='N', mem_only='Y' WHERE module='order' LIMIT 1",
- "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='N' WHERE what='order' OR what='unconfirmed' LIMIT 2",
- "UPDATE "._MYSQL_PREFIX."_config SET activate_xchange='0' WHERE config=0 LIMIT 1"
+ "UPDATE `"._MYSQL_PREFIX."_member_menu` SET visible='Y', locked='N' WHERE what='order' OR what='unconfirmed' LIMIT 2",
+ "UPDATE `"._MYSQL_PREFIX."_config` SET activate_xchange='0' WHERE config=0 LIMIT 1"
);
// Run SQLs
$points = 0;
$result = SQL_QUERY_ESC("SELECT (SUM(p.points) - d.used_points) AS points
FROM "._MYSQL_PREFIX."_user_points AS p
-LEFT JOIN "._MYSQL_PREFIX."_user_data AS d
+LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS d
ON p.userid=d.userid
WHERE p.userid=%s", array(bigintval($uid)), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
SEND_EMAIL($uid, ADMIN_DEL_ACCOUNT, $msg);
// Ok, delete the account!
- $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__);
+ $result = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__);
}
//
function META_DESCRIPTION ($mod, $wht) {
} // END - if
} elseif ((!EXT_IS_ACTIVE("cache")) || (!isset($cacheArray['config'][$no]))) {
// Load config from DB
- $result_config = SQL_QUERY_ESC("SELECT * FROM "._MYSQL_PREFIX."_config WHERE config=%d LIMIT 1",
+ $result_config = SQL_QUERY_ESC("SELECT * FROM `"._MYSQL_PREFIX."_config` WHERE config=%d LIMIT 1",
array(bigintval($no)), __FILE__, __LINE__);
// Get config from database
// Subtract points from database and mediadata cache
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",
+ $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
// Run database update
//* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "entries={$entries}");
- SQL_QUERY("UPDATE "._MYSQL_PREFIX."_config SET ".$entries." WHERE config=0 LIMIT 1", __FILE__, __LINE__);
+ SQL_QUERY("UPDATE `"._MYSQL_PREFIX."_config` SET ".$entries." WHERE config=0 LIMIT 1", __FILE__, __LINE__);
// Get affected rows
$affectedRows = SQL_AFFECTEDROWS();
if ((EXT_IS_ACTIVE("html_mail")) && ($mode == "html")) {
// Only include HTML receivers
- $result = SQL_QUERY_ESC("SELECT d.userid FROM "._MYSQL_PREFIX."_user_data AS d ".$CAT_TABS." WHERE d.status='CONFIRMED' AND d.html='Y'".$CAT_WHERE." ORDER BY d.%s %s LIMIT %s",
+ $result = SQL_QUERY_ESC("SELECT d.userid FROM `"._MYSQL_PREFIX."_user_data` AS d ".$CAT_TABS." WHERE d.status='CONFIRMED' AND d.html='Y'".$CAT_WHERE." ORDER BY d.%s %s LIMIT %s",
array($cat, $_CONFIG['order_select'], $_CONFIG['order_mode'], $receiver), __FILE__, __LINE__);
} else {
// Include all
- $result = SQL_QUERY_ESC("SELECT d.userid FROM "._MYSQL_PREFIX."_user_data AS d ".$CAT_TABS." WHERE d.status='CONFIRMED'".$CAT_WHERE." ORDER BY d.%s %s LIMIT %s",
+ $result = SQL_QUERY_ESC("SELECT d.userid FROM `"._MYSQL_PREFIX."_user_data` AS d ".$CAT_TABS." WHERE d.status='CONFIRMED'".$CAT_WHERE." ORDER BY d.%s %s LIMIT %s",
array($cat, $_CONFIG['order_select'], $_CONFIG['order_mode'], $receiver), __FILE__, __LINE__);
}
FROM "._MYSQL_PREFIX."_user_refs AS ur
LEFT JOIN "._MYSQL_PREFIX."_user_points AS up
ON ur.refid=up.userid AND ur.level=0
-LEFT JOIN "._MYSQL_PREFIX."_user_data AS ud
+LEFT JOIN `"._MYSQL_PREFIX."_user_data` AS ud
ON ur.refid=ud.userid
WHERE ur.userid=%s AND ur.level=%s
ORDER BY ur.refid ASC",
foreach ($RECEIVERS as $key => $uid) {
// Load personal data
//* DEBUG: */ echo "*L:".__LINE__."/".$uid."*<br />";
- $result_user = SQL_QUERY_ESC("SELECT surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result_user = SQL_QUERY_ESC("SELECT surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array(bigintval($uid)), __FILE__, __LINE__);
// Is his data available?
if (GET_EXT_VERSION("user") >= "0.1.4") {
// Update mails received for receiver
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET emails_received=emails_received+1 WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET emails_received=emails_received+1 WHERE userid=%s LIMIT 1",
array(bigintval($uid)), __FILE__, __LINE__);
} // END - if
// We can now send mails to them...
foreach ($RECEIVERS as $key => $uid) {
// Lookup user ID
- $result_user = SQL_QUERY_ESC("SELECT gender, surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result_user = SQL_QUERY_ESC("SELECT gender, surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array(bigintval($uid)), __FILE__, __LINE__);
// Is his data available?
SEND_EMAIL($email, $DATA[2], $msg, $HTML);
// Count sent mails...
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET emails_sent=emails_sent+1 WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET emails_sent=emails_sent+1 WHERE userid=%s LIMIT 1",
array(bigintval($DATA[1])), __FILE__, __LINE__);
if (GET_EXT_VERSION("user") >= "0.1.4") {
// Update mails received for receiver
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET emails_received=emails_received+1 WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET emails_received=emails_received+1 WHERE userid=%s LIMIT 1",
array(bigintval($uid)), __FILE__, __LINE__);
} // END - if
SEND_ADMIN_NOTIFICATION(ADMIN_SUBJ_SEND_DONE, "done-admin", $content, $uid);
// Get sender's data
- $result_sender = SQL_QUERY_ESC("SELECT surname, family, email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result_sender = SQL_QUERY_ESC("SELECT surname, family, email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array(bigintval($DATA[1])), __FILE__, __LINE__);
// Is the sender found?
);
// We have to pay back some points to the sender (we add them directly :-P)
- $result = SQL_QUERY_ESC("SELECT email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s AND status='CONFIRMED' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s AND status='CONFIRMED' LIMIT 1",
array(bigintval($uid)), __FILE__, __LINE__);
$DATA[10] = $PB; $DATA[11] = $cnt_back[$uid];
SEND_EMAIL($DATA[1], PROFILE_OUTDATED, $msg);
// Update profile data
- $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET last_profile_sent=UNIX_TIMESTAMP(), notified='Y' WHERE userid=%s LIMIT 1",
+ $result_update = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET last_profile_sent=UNIX_TIMESTAMP(), notified='Y' WHERE userid=%s LIMIT 1",
array(bigintval($DATA[0])), __FILE__, __LINE__);
}
}
//* DEBUG: */ echo basename(__FILE__)."<br />\n";
// Reset accounts
-$result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_user_data SET beg_points=0.00000 WHERE beg_points > 0",
+$result = SQL_QUERY("UPDATE `"._MYSQL_PREFIX."_user_data` SET beg_points=0.00000 WHERE beg_points > 0",
__FILE__, __LINE__);
//
BONUS_PURGE_EXPIRED_TURBO_BONUS();
// Reset accounts
-$result = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_user_data SET turbo_bonus=0, login_bonus=0, bonus_order=0, bonus_stats=0, bonus_ref=0",
+$result = SQL_QUERY("UPDATE `"._MYSQL_PREFIX."_user_data` SET turbo_bonus=0, login_bonus=0, bonus_order=0, bonus_stats=0, bonus_ref=0",
__FILE__, __LINE__);
//
// Update user profiles
if (GET_EXT_VERSION("order") >= "0.1.1") {
// Latest version
- $result_daily = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_user_data SET receive_mails=max_mails, mail_orders=0 WHERE receive_mails != max_mails", __FILE__, __LINE__);
+ $result_daily = SQL_QUERY("UPDATE `"._MYSQL_PREFIX."_user_data` SET receive_mails=max_mails, mail_orders=0 WHERE receive_mails != max_mails", __FILE__, __LINE__);
} else {
// Obsolete version
- $result_daily = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_user_data SET receive_mails=max_mails WHERE receive_mails != max_mails", __FILE__, __LINE__);
+ $result_daily = SQL_QUERY("UPDATE `"._MYSQL_PREFIX."_user_data` SET receive_mails=max_mails WHERE receive_mails != max_mails", __FILE__, __LINE__);
}
// Transfer points from locked_points to points
-$result_daily = SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE ref_payout=0 AND status='CONFIRMED' ORDER BY userid", __FILE__, __LINE__);
+$result_daily = SQL_QUERY("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE ref_payout=0 AND status='CONFIRMED' ORDER BY userid", __FILE__, __LINE__);
//* DEBUG: */ echo basename(__FILE__).":payout=0;daily|numRows=".SQL_NUMROWS($result_daily)."<br />\n";
if (SQL_NUMROWS($result_daily) > 0)
SEND_EMAIL($uid, HOLIDAY_MEMBER_ACTIVATED, $msg);
// Update account
- $result_update = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET holiday_active='Y'
+ $result_update = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET holiday_active='Y'
WHERE userid=%s LIMIT 1", array(bigintval($uid)), __FILE__, __LINE__);
}
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
* MA 02110-1301 USA *
************************************************************************/
-/*
+
print "<pre>";
debug_print_backtrace();
die("</pre>");
-*/
+
echo "<HTML>
<HEAD>
<TITLE>Protected file ".basename($_SERVER['PHP_SELF'])." - ACCESS DENIED!</TITLE>
// We found some mail orders...
while(list($id, $uid, $subj, $stamp, $clicks, $url) = SQL_FETCHROW($result_bonus)) {
// Add points
- $result_points = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET bonus_stats=bonus_stats+%s WHERE userid=%s LIMIT 1",
+ $result_points = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET bonus_stats=bonus_stats+%s WHERE userid=%s LIMIT 1",
array($_CONFIG['bonus_stats'], bigintval($uid)), __FILE__, __LINE__);
// Prepare array
// Is the cookie set?
if (isSessionVariableSet('lead_uid')) {
// Is the user-account unlocked and valid?
- $result = SQL_QUERY_ESC("SELECT email FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s AND status='CONFIRMED' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT email FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s AND status='CONFIRMED' LIMIT 1",
array(bigintval(get_session('lead_uid'))), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Secure the ID number
$EXTRA_TITLE = COMPILE_CODE($EXTRA_TITLE);
// Is the user's ID unlocked?
- $result = SQL_QUERY_ESC("SELECT status, gender, surname, family FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT status, gender, surname, family FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array($url_uid), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
list($status, $gender, $sname, $fname) = SQL_FETCHROW($result);
if ($ltype == "BONUS") $sender = 0;
// Is the user's ID unlocked?
- $result = SQL_QUERY_ESC("SELECT status, gender, surname, family, ref_payout FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT status, gender, surname, family, ref_payout FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array($url_uid), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load data
if ($status == "CONFIRMED") {
// Update last activity
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET last_online=UNIX_TIMESTAMP(), last_module='mailid_top' WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET last_online=UNIX_TIMESTAMP(), last_module='mailid_top' WHERE userid=%s LIMIT 1",
array($url_uid), __FILE__, __LINE__);
// User has confirmed his account so we can procede...
// Only when user extension = v0.1.2: Update mails-confirmed counter
if (GET_EXT_VERSION("user") >= "0.1.2") {
// Update counter
- SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET mails_confirmed=mails_confirmed + 1 WHERE userid=%s LIMIT 1",
+ SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET mails_confirmed=mails_confirmed + 1 WHERE userid=%s LIMIT 1",
array($url_uid), __FILE__, __LINE__);
// Update random confirmed as well?
if (GET_EXT_VERSION("user") >= "0.3.4") {
// Update second counter
- SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET rand_confirmed=rand_confirmed + 1 WHERE userid=%s LIMIT 1",
+ SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET rand_confirmed=rand_confirmed + 1 WHERE userid=%s LIMIT 1",
array($url_uid), __FILE__, __LINE__);
} // END - if
} // END - if
} // END - if
// Count down ref_payout value
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET ref_payout=ref_payout-1 WHERE userid=%s AND ref_payout > 0 LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET ref_payout=ref_payout-1 WHERE userid=%s AND ref_payout > 0 LIMIT 1",
array($url_uid), __FILE__, __LINE__);
// Add points
// Check if logged in
if (IS_MEMBER()) {
// Is still logged in so we welcome him with his name
- $result = SQL_QUERY_ESC("SELECT surname, family FROM "._MYSQL_PREFIX."_user_data WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT surname, family FROM `"._MYSQL_PREFIX."_user_data` WHERE userid=%s LIMIT 1",
array($GLOBALS['userid']), __FILE__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load surname and family's name and build the username
if ($ref != "".($ref + 0)."") {
if (EXT_IS_ACTIVE("nickname")) {
// Nickname in URL, so load the ID
- $result = SQL_QUERY_ESC("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE nickname='%s' LIMIT 1",
+ $result = SQL_QUERY_ESC("SELECT userid FROM `"._MYSQL_PREFIX."_user_data` WHERE nickname='%s' LIMIT 1",
array($ref), __FILE__, __LINE__);
// Load userid
// Is the refid valid?
if ($ref > 0) {
// Update ref counter
- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET ref_clicks=ref_clicks+1 WHERE userid=%s LIMIT 1",
+ $result = SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET ref_clicks=ref_clicks+1 WHERE userid=%s LIMIT 1",
array(bigintval($ref)), __FILE__, __LINE__);
} // END - if
} else {
if (!empty($t)) {
// Check for data
$result = SQL_QUERY_ESC("SELECT DISTINCT d.gender, d.surname, d.family, b.level, b.points
-FROM "._MYSQL_PREFIX."_user_data AS d
+FROM `"._MYSQL_PREFIX."_user_data` AS d
RIGHT JOIN "._MYSQL_PREFIX."_bonus_turbo AS b
ON d.userid=b.userid
WHERE d.status='CONFIRMED' AND d.userid=%s AND b.%s=%s