-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
- // Drop tables
- $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`";
-
- // Remove menus
- $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";
-
- // Unregister filter
- UNREGISTER_FILTER('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', true, $dry_run);
- 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='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
- 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 FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000";
-
- // 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 <em>Unknown column 'd.useid' in 'on clause'</em> 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 FLOAT(23,5) UNSIGNED 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;