]> git.mxchange.org Git - mailer.git/blobdiff - 0.2.1/inc/extensions/ext-bank.php
branched
[mailer.git] / 0.2.1 / inc / extensions / ext-bank.php
diff --git a/0.2.1/inc/extensions/ext-bank.php b/0.2.1/inc/extensions/ext-bank.php
deleted file mode 100644 (file)
index 1781350..0000000
+++ /dev/null
@@ -1,199 +0,0 @@
-<?php
-/************************************************************************
- * MXChange v0.2.1                                    Start: 05/28/2007 *
- * ================                             Last change: 05/31/2007 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : ext-bank.php                                     *
- * -------------------------------------------------------------------- *
- * Short description : A little bank account                            *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Ein einfaches Bankaccount                        *
- * -------------------------------------------------------------------- *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2008 by Roland Haeder                           *
- * For more information visit: http://www.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 *
- * the Free Software Foundation; either version 2 of the License, or    *
- * (at your option) any later version.                                  *
- *                                                                      *
- * This program is distributed in the hope that it will be useful,      *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
- * GNU General Public License for more details.                         *
- *                                                                      *
- * You should have received a copy of the GNU General Public License    *
- * along with this program; if not, write to the Free Software          *
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
- * MA  02110-1301  USA                                                  *
- ************************************************************************/
-
-// Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])))
-{
-       $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;
-
-// Version history array (add more with , "0.1" and so on)
-$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)
-       // SQL commands to run
-       $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_bank_accounts";
-       $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_bank_accounts (
-id bigint(20) not null auto_increment,
-uid bigint(20) not null default '0',
-account_created bigint(20) not null default '0',
-account_locked bigint(20) not null default '0',
-locked_reason tinytext,
-status enum('NEW', 'ACTIVE', 'LOCKED') not null default 'NEW',
-account_balance double(20,5) 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) not null default '0',
-last_tan varchar(5) not null default '00000',
-last_tan_stamp bigint(20) not null default '0',
-last_tan_purpose tinytext,
-account_type enum('CHECK', 'SAVING') not null default 'CHECK',
-overdraft_credit double(20,5) 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 (
-id bigint(20) not null auto_increment,
-to_account_id bigint(20) not null default '0',
-from_account_id bigint(20) not null default '0',
-points_amount double(20,5) 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 (
-id bigint(20) not null auto_increment,
-title varchar(255) not null default '',
-description tinytext,
-account_fee double(20,5) not null default '0.00000',
-free_transfers int(7) not null default '0',
-transfer_fee double(20,5) not null default '0.00000',
-available varchar(8) not null default '19700101',
-output_system_mode enum('LOGIN', 'EMAIL', 'DISABLED'),
-package_active enum('Y', 'N') not null default 'N',
-free_months_no_fee tinyint(3) not null default '0',
-interest_plus float(7,5) not null default '0.00000',
-interest_minus float(7,5) not null default '0.00000',
-first_payment double(20,5) not null default '0.00000',
-free_account_income double(20,5) not null default '0.00000',
-free_account_stuff tinytext null,
-tan_lock tinyint(3) 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 (
-id bigint(20) not null auto_increment,
-idx tinyint(3) not null default '0',
-account_id bigint(20) 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";
-
-       // Admin menu queries
-       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('bank', '', 'Bank-Accounts', 'Verwalten Sie hier alle Bank-Accounts Ihrer Mitglieder, sowie Angebotspakete und &Uuml;berweisungen.', 6)";
-       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('bank', 'add_bank_package', 'Angebotspaket hinzuf&uuml;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 &auml;ndern', 'Nach Auswahl eines Angebotspaketes k&ouml;nnen Sie dieses hier ver&auml;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&auml;ren &Uuml;berarbeitung zuvor heraus, dann k&ouml;nnen Sie in Ruhe dr&uuml;ber nachdenken und Berechnungen anstellen. Freigabe ist hier auch m&ouml;glich.', 4)";
-       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES ('bank', 'del_bank_package', 'Angebotspaket l&ouml;schen', 'Nach Auswahl eines Angebotspaketes k&ouml;nnen Sie mit abschliessender Best&auml;tigung Angebotspakete ganz l&ouml;schen. Bitte beachten Sie, dass dies nur m&ouml;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&uuml;r die Mitglieder an (falls dieses nicht zurecht kommt).', 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 &auml;ndern', '&Auml;ndern Sie hier bestehende Konten, z.B. den Dispositionskredit usw. PINs und TANs sind hier nicht &auml;nderbar! Best&auml;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&ouml;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&ouml;schen', 'L&ouml;schen von Konten mit Best&auml;tigungsmail. Wenn Sie ein Mitglieder-Account l&ouml;schen, so m&uuml;ssen Sie derzeit seine angelegten Konten auch l&ouml;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&ouml;tigen auf, 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&ouml;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', '&Uuml;berweisungen auflisten', 'Nach Auswahl eines Mitgliedes und einem Konto (ben&ouml;tgt JavaScript!) k&ouml;nnen Sie seitenweise die &Uuml;berweisungen durchschauen.', 13)";
-
-       // Member menu
-       $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, visible, locked, sort) VALUES ('bank', '', '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&uuml;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 "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 "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 "update": // Update an extension
-       switch ($EXT_VER)
-       {
-       case "0.0.1": // SQL queries for v0.0.1
-               $SQLs[] = "";
-
-               // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "";
-               break;
-       }
-       break;
-
-default: // Do stuff when extension is loaded
-       break;
-}
-
-// Language file prefix
-$EXT_LANG_PREFIX = "bank";
-
-// Extension is always active?
-$EXT_ALWAYS_ACTIVE = "N";
-
-//
-?>