X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fextensions%2Fext-bank.php;h=c8af77f863f8c36eee263d59bb128b7389383a16;hb=4ccc02299e123d24c043c917fb16208d0338f300;hp=1f9d217f89d4759492bd838427551d4d653ea589;hpb=357b2ca133fc1f89db74097955c366cb4bee6996;p=mailer.git diff --git a/inc/extensions/ext-bank.php b/inc/extensions/ext-bank.php index 1f9d217f89..c8af77f863 100644 --- a/inc/extensions/ext-bank.php +++ b/inc/extensions/ext-bank.php @@ -10,7 +10,12 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Ein einfaches Bankaccount * * -------------------------------------------------------------------- * - * * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2008 by Roland Haeder * * For more information visit: http://www.mxchange.org * @@ -33,163 +38,163 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; + $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; require($INC); } // Version number -$EXT_VERSION = "0.0"; - -// Auto-set extension version -if (!isset($EXT_VER)) $EXT_VER = $EXT_VERSION; +EXT_SET_VERSION('0.0'); -// Version history array (add more with , "0.1" and so on) -$EXT_VER_HISTORY = array("0.0"); +// Version history array (add more with , '0.1.0' and so on) +EXT_SET_VER_HISTORY(array('0.0')); switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) - // SQL commands to run - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bank_accounts"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_bank_accounts ( + case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called) + // SQL commands to run + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_accounts`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_accounts` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -uid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -account_created BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -account_locked BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +account_created BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +account_locked BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, locked_reason TINYTEXT, status ENUM('NEW','ACTIVE','LOCKED') NOT NULL DEFAULT 'NEW', -account_balance DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000', +account_balance FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, output_mode ENUM('LOGIN','EMAIL','DISABLED'), pin VARCHAR(50) NOT NULL DEFAULT '', tan_mode ENUM('NORMAL','INDEXED'), tan_list_status ENUM('PENDING','ACTIVE','INVALID','LOCKED') NOT NULL DEFAULT 'PENDING', tan_key VARCHAR(50) NOT NULL DEFAULT '', -month_transfered BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +month_transfered BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, last_tan VARCHAR(5) NOT NULL DEFAULT '00000', -last_tan_stamp BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +last_tan_stamp BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, last_tan_purpose TINYTEXT, account_type ENUM('CHECK','SAVING') NOT NULL DEFAULT 'CHECK', -overdraft_credit DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000', +overdraft_credit FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, PRIMARY KEY (id), UNIQUE KEY (pin), INDEX `uid_type` (uid, account_type), INDEX (account_created), INDEX (account_locked), INDEX (last_tan_stamp) -) TYPE=MyISAM"; - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bank_transfers"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_bank_transfers ( +) TYPE={!_TABLE_TYPE!}"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_transfers`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_transfers` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -to_account_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -from_account_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', -points_amount DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000', +to_account_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +from_account_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +points_amount FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, day_bookkeeping CHAR(4) NOT NULL DEFAULT '0000', day_available CHAR(4) NOT NULL DEFAULT '0000', transfer_purpose TINYTEXT, PRIMARY KEY (id), INDEX (to_account_id, from_account_id), INDEX (day_bookkeeping, day_available) -) TYPE=MyISAM"; - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bank_packages"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_bank_packages ( +) TYPE={!_TABLE_TYPE!}"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_packages`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_packages` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, title VARCHAR(255) NOT NULL DEFAULT '', description TINYTEXT, -account_fee DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000', -free_transfers INT(7) UNSIGNED NOT NULL DEFAULT '0', -transfer_fee DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000', +account_fee FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, +free_transfers INT(7) UNSIGNED NOT NULL DEFAULT 0, +transfer_fee FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, available TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, output_system_mode ENUM('LOGIN','EMAIL','DISABLED'), package_active ENUM('Y','N') NOT NULL DEFAULT 'N', -free_months_no_fee TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', -interest_plus FLOAT(7,5) UNSIGNED NOT NULL DEFAULT '0.00000', -interest_minus FLOAT(7,5) UNSIGNED NOT NULL DEFAULT '0.00000', -first_payment DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000', -free_account_income DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT '0.00000', +free_months_no_fee TINYINT(3) UNSIGNED NOT NULL DEFAULT 0, +interest_plus FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.00000, +interest_minus FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.00000, +first_payment FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, +free_account_income FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, free_account_stuff TINYTEXT null, -tan_lock TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', +tan_lock TINYINT(3) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (id) -) TYPE=MyISAM"; - // free_account_stuff will be a list of columns of the table _bank_packages - // what the member shall get for the specified income. output_system_mode - // must be extended with the mode you get for free: output_system_mode:LOGIN - // should be fine. More than one entry and not DISABLED ;) are not supported. - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bank_tanlist"; - $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_bank_tanlist ( +) TYPE={!_TABLE_TYPE!}"); + // free_account_stuff will be a list of columns of the table _bank_packages + // what the member shall get for the specified income. output_system_mode + // must be extended with the mode you get for free: output_system_mode:LOGIN + // should be fine. More than one entry and not DISABLED ;) are not supported. + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_tanlist`"); + ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_bank_tanlist` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -idx TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', -account_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', +idx TINYINT(3) UNSIGNED NOT NULL DEFAULT 0, +account_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, tan VARCHAR(50) NOT NULL DEFAULT '', used ENUM('Y','N') NOT NULL DEFAULT 'N', PRIMARY KEY (id), UNIQUE (account_id, tan) -) TYPE=MyISAM"; +) TYPE={!_TABLE_TYPE!}"); - // 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)"; + // Admin menu queries + ADD_EXT_SQL("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)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','add_bank_package','Angebotspaket hinzufügen','Neues Angebotspaket erstellen.', 1)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_package','Angebotspakete auflisten','Listet alle erstellten Angebotspakete auf.', 2)"); + ADD_EXT_SQL("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)"); + ADD_EXT_SQL("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)"); + ADD_EXT_SQL("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)"); + ADD_EXT_SQL("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)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('bank','list_bank_account','Konten auflisten','Auflistung aller Konto oder eines auswählbaren Mitglieds.', 7)"); + ADD_EXT_SQL("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)"); + ADD_EXT_SQL("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)"); + ADD_EXT_SQL("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)"); + ADD_EXT_SQL("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)"); + ADD_EXT_SQL("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)"); + ADD_EXT_SQL("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','Einzahlen','N','Y', 3)"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_withdraw','Auszahlen','N','Y', 4)"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_output','Kontoauszug','N','Y', 5)"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_change','Paket wechseln','N','Y', 6)"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_remove','Kündigen','N','Y', 7)"; - break; + // Member menu + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank', NULL, 'Bank-Account','N','Y', 3)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_infos','Angebotspakete','N','Y', 1)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_create','Konto anlegen','N','Y', 2)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_deposit','Auf Konto einzahlen','N','Y', 3)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_withdraw','Vom Konto abheben','N','Y', 4)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_output','Kontoauszug','N','Y', 5)"); + ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('bank','bank_change','Paket wechseln','N','Y', 6)"); + ADD_EXT_SQL("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 - // SQL commands to run - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bank_accounts"; - $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"; - break; + case 'remove': // Do stuff when removing extension + // SQL commands to run + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_accounts`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_transfers`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_packages`"); + ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_tanlist`"); + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='bank'"); + ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='bank'"); + 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"; - break; + case 'activate': // Do stuff when admin activates this extension + // SQL commands to run + ADD_EXT_SQL("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"; - break; + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `action`='bank' LIMIT 8"); + break; -case "update": // Update an extension - switch ($EXT_VER) - { - case "0.0.1": // SQL queries for v0.0.1 - $SQLs[] = ""; + case 'update': // Update an extension + switch ($EXT_VER) + { + case '0.0.1': // SQL queries for v0.0.1 + ADD_EXT_SQL(''); - // Update notes (these will be set as task text!) - $UPDATE_NOTES = ""; + // Update notes (these will be set as task text!) + EXT_SET_UPDATE_NOTES(''); + break; + } break; - } - break; -default: // Do stuff when extension is loaded - break; -} + case 'modify': // When the extension got modified + break; -// Language file prefix -$EXT_LANG_PREFIX = "bank"; + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. + break; + + default: // Do stuff when extension is loaded + break; +} // ?>