]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-bank.php
More default values rewritten, UNSIGNED added to many numerical database columns...
[mailer.git] / inc / extensions / ext-bank.php
index 12f02fabf141663f37c3f9029959d787d9537c60..95640968a3c9eb4b84dc35542828f46a99c4c944 100644 (file)
@@ -48,28 +48,28 @@ $EXT_VER_HISTORY = array("0.0");
 
 switch ($EXT_LOAD_MODE)
 {
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
+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 (
 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),
@@ -80,9 +80,9 @@ INDEX (last_tan_stamp)
        $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bank_transfers";
        $SQLs[] = "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,
@@ -95,19 +95,19 @@ INDEX (day_bookkeeping, day_available)
 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
@@ -117,8 +117,8 @@ PRIMARY KEY (id)
        $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bank_tanlist";
        $SQLs[] = "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),
@@ -145,11 +145,11 @@ UNIQUE (account_id, tan)
        $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_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','Kündigen','N','Y', 7)";
+       $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
@@ -188,8 +188,5 @@ default: // Do stuff when extension is loaded
        break;
 }
 
-// Language file prefix
-$EXT_LANG_PREFIX = "bank";
-
 //
 ?>