-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')";
- // Guest menu
- $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')";
- break;
-
-case "remove": // Do stuff when removing extension
- // SQL commands to run
- $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='rallye' LIMIT 1";
- $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE what='rallye' 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";
- break;
-
-case "deactivate": // Do stuff when admin deactivates this extension
- // SQL commands to run
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_guest_menu SET visible='Y', locked='Y' WHERE what='rallyes' LIMIT 1";
- $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='Y', locked='Y' WHERE what='rallyes' 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."_rallye_data ADD expired ENUM('Y','N') NOT NULL DEFAULT 'N'";
-
- // Update notes (these will be set as task text!)
- $UPDATE_NOTES = "Ablaufen der Rallyes intergriert.";
- break;
-
- case "0.0.2": // SQL queries for v0.0.2
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_rallye_users ADD curr_points DOUBLE(23,3) NOT NULL DEFAULT '0.000'";
-
- // Update notes (these will be set as task text!)
- $UPDATE_NOTES = "Aktueller {!POINTS!}-Stand wird beachtet.";
- break;
-
- case "0.0.6": // SQL queries for v0.0.6
- // Update notes (these will be set as task text!)
- $UPDATE_NOTES = "Fehler <I>Unknown column 'd.useid' in 'on clause'</I> behoben.";
- break;
-
- case "0.0.7": // SQL queries for v0.0.7
- // Update notes (these will be set as task text!)
- $UPDATE_NOTES = "Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist.";
- break;
-
- case "0.0.8": // SQL queries for v0.0.8
- // Update notes (these will be set as task text!)
- $UPDATE_NOTES = "Fehler <U>Template nicht gefunden</U> behoben und Admin-Formulare ausgelagert";
- break;
-
- case "0.0.9": // SQL queries for v0.0.9
- // Update notes (these will be set as task text!)
- $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist. Und der vorherige Fehler <U>Template nicht gefunden</U> ist endlich beseitigt.";
- break;
-
- case "0.1.0": // SQL queries for v0.2.1
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_rallye_users CHANGE curr_points curr_points DOUBLE(23,5) NOT NULL DEFAULT '0.00000'";
-
- // Update notes (these will be set as task text!)
- $UPDATE_NOTES = "5 Nachkommastellen implementiert.";
- break;
-
- case "0.1.1": // SQL queries for v0.1.1
- // Update notes (these will be set as task text!)
- $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.";
- break;
-
- case "0.1.2": // SQL queries for v0.1.2
- // Update notes (these will be set as task text!)
- $UPDATE_NOTES = "Problem mit Speicherung der Einstellungen beseitigt.";
- break;
-
- case "0.1.3": // SQL queries for v0.1.3
- // Update notes (these will be set as task text!)
- $UPDATE_NOTES = "Anzeigefehler im Gast-/Mitgliedsbereich behoben.";
- break;
-
- case "0.1.4": // SQL queries for v0.1.4
- // Update notes (these will be set as task text!)
- $UPDATE_NOTES = "Admin-Mails korregiert.";
- break;
-
- case "0.1.5": // SQL queries for v0.1.5
- // Update notes (these will be set as task text!)
- $UPDATE_NOTES = "Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist.";
- break;
-
- case "0.1.6": // SQL queries for v0.1.6
- // Update notes (these will be set as task text!)
- $UPDATE_NOTES = "Seit <A href=\"#\">Patch 340</A> überflüssige HTML-Tags entfernt.";
- break;
-
- case "0.1.7": // SQL queries for v0.1.7
- // Update notes (these will be set as task text!)
- $UPDATE_NOTES = "Aktivierte bzw. abgelaufene Rallyes werden nur ausserhalb des CSS-Modus geladen (wenn also nicht css.php aufgerufen wurde)";
- break;
-
- case "0.1.8": // SQL queries for v0.1.8
- // Update notes (these will be set as task text!)
- $UPDATE_NOTES = "Weitere Templates vom Admin-Bereich ausgelagert und Referal-Anazahl in der Mail zur Rallye-Ankündigung repariert.";
- break;
-
- case "0.1.9": // SQL queries for v0.1.9
- // Update notes (these will be set as task text!)
- $UPDATE_NOTES = "Funktion ADMIN_USER_PROFILE_LINK() mit Verlinkung auf Referal-Liste implementiert.";
- break;
-
- case "0.2.0": // SQL queries for v0.2.0
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_rallye_data ADD min_users BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'";
- $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_rallye_data ADD min_prices BIGINT(20) UNSIGNED NOT NULL DEFAULT '3'";
-
- // Update notes (these will be set as task text!)
- $UPDATE_NOTES = "Ablaufen der Rallyes intergriert. Bauen Sie in Ihr Template <STRONG>templates/de/emails/member/member_rallye_notify.tpl</STRONG> folgende zwei Zeilen ein:<br />
-<UL>
- <LI>$DATA[min_users]</LI>
- <LI>$DATA[min_prices]</LI>
-</UL>
-Zudem sollten Sie mindestens folgende Templates (in <STRONG>templates/".GET_LANGUAGE()."/html/guest/</STRONG> !) aktualisieren:<br />
-<UL>
- <LI><STRONG>guest_rallye_footer.tpl</STRONG></LI>
- <LI><STRONG>guest_rallye_header.tpl</STRONG></LI>
-</UL>";
- break;
-
- case "0.2.1": // SQL queries for v0.2.1
- // 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.2.2": // SQL queries for v0.2.2
- // Update notes (these will be set as task text!)
- $UPDATE_NOTES = "Links wegen <STRONG>what=admins_contct</STRONG> geändert.";
- break;
-
- case "0.2.3": // SQL queries for v0.2.3
- // Update notes (these will be set as task text!)
- $UPDATE_NOTES = "HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert.";
- break;