X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fextensions%2Fext-bank.php;h=43dc0757cdcc76ba93fe96a74f451e48517f649f;hb=985561270461045c64719266ca6b3a795f6cd76a;hp=c9081481e22ae5fd99a317c37f1f1bc50938ab86;hpb=8d0ed5ed9a9ca0e07b9582f2311b44bdcc5a95ea;p=mailer.git diff --git a/inc/extensions/ext-bank.php b/inc/extensions/ext-bank.php index c9081481e2..43dc0757cd 100644 --- a/inc/extensions/ext-bank.php +++ b/inc/extensions/ext-bank.php @@ -17,7 +17,7 @@ * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009 - 2011 by Mailer Developer Team * - * For more information visit: http://www.mxchange.org * + * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -53,7 +53,7 @@ switch (getExtensionMode()) { case 'register': // Do stuff when installation is running // SQL commands to run addDropTableSql('bank_accounts'); - addCreateTableSql('bank_accounts', "( + addCreateTableSql('bank_accounts', " `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `account_created` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -73,14 +73,15 @@ switch (getExtensionMode()) { `account_type` ENUM('CHECK','SAVING') NOT NULL DEFAULT 'CHECK', `overdraft_credit` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, PRIMARY KEY (`id`), -UNIQUE KEY (`pin`), -INDEX `userid_type` (`userid`, `account_type`), +UNIQUE (`pin`), +INDEX `userid_type` (`userid`,`account_type`), INDEX (`account_created`), INDEX (`account_locked`), -INDEX (`last_tan_stamp`) -) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'User bank accounts data'"); +INDEX (`last_tan_stamp`)", + 'User bank accounts data'); + addDropTableSql('bank_transfers'); - addCreateTableSql('bank_transfers', "( + addCreateTableSql('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, @@ -89,11 +90,12 @@ INDEX (`last_tan_stamp`) `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`) -) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Bank user->user transfers'"); +INDEX (`to_account_id`,`from_account_id`), +INDEX (`day_bookkeeping`,`day_available`)", + 'Bank user->user transfers'); + addDropTableSql('bank_packages'); - addCreateTableSql('bank_packages', "( + addCreateTableSql('bank_packages', " `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `title` VARCHAR(255) NOT NULL DEFAULT '', `description` TINYTEXT, @@ -110,22 +112,23 @@ INDEX (`day_bookkeeping`, `day_available`) `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, -PRIMARY KEY (`id`) -) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Bank account packages'"); +PRIMARY KEY (`id`)", + 'Bank account packages'); + // 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. addDropTableSql('bank_tanlist'); - addCreateTableSql('bank_tanlist', "( + addCreateTableSql('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, `tan` VARCHAR(50) NOT NULL DEFAULT '', `used` ENUM('Y','N') NOT NULL DEFAULT 'N', PRIMARY KEY (`id`), -UNIQUE (`account_id`, `tan`) -) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Bank TAN lists per user'"); +UNIQUE (`account_id`,`tan`)", + 'Bank TAN lists per user'); // Admin menu queries addAdminMenuSql('bank', NULL, 'Bank-Accounts', 'Verwalten Sie hier alle Bank-Accounts Ihrer Mitglieder, sowie Angebotspakete und Überweisungen.', 6); @@ -144,14 +147,14 @@ UNIQUE (`account_id`, `tan`) addAdminMenuSql('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 - addMemberMenuSql('bank', NULL, 'Bank-Account', 'N', 'Y', 3); - addMemberMenuSql('bank', 'bank_infos', 'Angebotspakete', 'N', 'Y', 1); - addMemberMenuSql('bank', 'bank_create', 'Konto anlegen', 'N', 'Y', 2); - addMemberMenuSql('bank', 'bank_deposit', 'Auf Konto einzahlen', 'N', 'Y', 3); - addMemberMenuSql('bank', 'bank_withdraw', 'Vom Konto abheben', 'N', 'Y', 4); - addMemberMenuSql('bank', 'bank_output', 'Kontoauszug', 'N', 'Y', 5); - addMemberMenuSql('bank', 'bank_change', 'Paket wechseln', 'N', 'Y', 6); - addMemberMenuSql('bank', 'bank_remove', 'Konto Kündigen', 'N', 'Y', 7); + addMemberMenuSql('bank', NULL, 'Bank-Account', 3); + addMemberMenuSql('bank', 'bank_infos', 'Angebotspakete', 1); + addMemberMenuSql('bank', 'bank_create', 'Konto anlegen', 2); + addMemberMenuSql('bank', 'bank_deposit', 'Auf Konto einzahlen', 3); + addMemberMenuSql('bank', 'bank_withdraw', 'Vom Konto abheben', 4); + addMemberMenuSql('bank', 'bank_output', 'Kontoauszug', 5); + addMemberMenuSql('bank', 'bank_change', 'Paket wechseln', 6); + addMemberMenuSql('bank', 'bank_remove', 'Konto Kündigen', 7); break; case 'remove': // Do stuff when removing extension @@ -166,12 +169,12 @@ UNIQUE (`account_id`, `tan`) case 'activate': // Do stuff when admin activates this extension // SQL commands to run - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='N' WHERE `action`='bank' LIMIT 8"); + addExtensionSql("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 - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N', `locked`='Y' WHERE `action`='bank' LIMIT 8"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N',`locked`='Y' WHERE `action`='bank' LIMIT 8"); break; case 'update': // Update an extension