]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-funcoins.php
Do not rebuild cache if it is already rebuild
[mailer.git] / inc / extensions / ext-funcoins.php
index e60faae3a8d4e691a9c2eb929d8354559897bd21..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,152 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 08/19/2010 *
- * ===================                          Last change: 08/19/2010 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : ext-funcoins.php                                 *
- * -------------------------------------------------------------------- *
- * Short description : Extension for the FunCoins API integration       *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Erweiterung fuer die Integration der             *
- *                     FunCoins-API (FoCo-Ex&#178;)                          *
- * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
- * 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 (!defined('__SECURITY')) {
-       die();
-} // END - if
-
-// Version number
-setThisExtensionVersion('0.0.0');
-
-// Version history array (add more with , '0.0.1' and so on)
-setExtensionVersionHistory(array('0.0.0'));
-
-// This extension is in development (non-productive)
-enableExtensionProductive(false);
-
-switch (getExtensionMode()) {
-       case 'register': // Do stuff when installation is running
-               // This depends on ext-sql_patches
-               addExtensionDependency('sql_patches');
-
-               // SQL commands to run
-               addDropTableSql('user_funcoins');
-               addCreateTableSql('user_funcoins', "
-`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Record identification',
-`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Local userid',
-`funcoins_account` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'FunCoins account',
-`funcoins_amount` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000 COMMENT 'Transfered amount',
-`funcoins_timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Booking timestamp',
-`funcoins_type` ENUM('WITHDRAW','PAYOUT','FAILED') NOT NULL DEFAULT 'FAILED' COMMENT 'Transaction type',
-`funcoins_tan` VARCHAR(255) NULL DEFAULT NULL COMMENT 'TAN from API',
-`funcoins_api_response` TINYTEXT COMMENT 'Clear text API response (only for debugging)',
-`funcoins_api_status` INT(4) NULL DEFAULT NULL COMMENT 'Status code from API',
-PRIMARY KEY (`id`),
-UNIQUE (`funcoins_tan`),
-INDEX (`userid`)",
-                       'Transfered FunCoins per user');
-
-               // Confiuration
-               addConfigAddSql('funcoins_min_payout', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 40000');
-               addConfigAddSql('funcoins_min_withdraw', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 5000');
-               addConfigAddSql('funcoins_api_id', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
-               addConfigAddSql('funcoins_api_password', "VARCHAR(255) NOT NULL DEFAULT ''");
-               addConfigAddSql('funcoins_payout_active', "ENUM ('Y','N') NOT NULL DEFAULT 'Y'");
-               addConfigAddSql('funcoins_withdraw_active', "ENUM ('Y','N') NOT NULL DEFAULT 'Y'");
-               addConfigAddSql('funcoins_payout_factor', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000');
-               addConfigAddSql('funcoins_withdraw_factor', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000');
-               addConfigAddSql('funcoins_payout_fee_percent', 'FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000');
-               addConfigAddSql('funcoins_withdraw_fee_percent', 'FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000');
-               addConfigAddSql('funcoins_payout_fee_fix', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
-               addConfigAddSql('funcoins_withdraw_fee_fix', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
-
-               // Points data
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_points_data` (`subject`, `column_name`, `locked_mode`, `payment_method`) VALUES ('funcoins_withdraw','order_points','LOCKED','DIRECT')");
-
-               // User data
-               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `funcoins_userid` BIGINT(20) NULL DEFAULT NULL");
-
-               // Admin menu
-               addAdminMenuSql('funcoins', NULL, 'FunCoins-Management', 'Konfiguration zur FuCo-Ex&#178; einstellen, Auszahlungen auflisten usw..', 15);
-               addAdminMenuSql('funcoins', 'config_funcoins', 'FuCo-Ex&#178;-Einstellungen', 'Konfiguration zur FuCo-Ex&#178; einstellen.', 1);
-               addAdminMenuSql('funcoins', 'list_funcoins', 'Anfragen auflisten', 'Listet alle FunCoins-Ein- und -Auszahlungsanfragen Ihrer Mitglieder und Sponsoren auf.', 2);
-
-               // Member menu
-               addMemberMenuSql('main', 'funcoins', 'FunCoins-Ein-/Auszahlungen', 11);
-               break;
-
-       case 'remove': // Do stuff when removing extension
-               // SQL commands to run
-               addDropTableSql('user_funcoins');
-               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='funcoins'");
-               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='funcoins' LIMIT 1");
-               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='funcoins_portal' LIMIT 1");
-               break;
-
-       case 'activate': // Do stuff when admin activates this extension
-               // SQL commands to run
-               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='funcoins_portal' LIMIT 1");
-               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='funcoins' LIMIT 1");
-               break;
-
-       case 'deactivate': // Do stuff when admin deactivates this extension
-               // SQL commands to run
-               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='funcoins_portal' LIMIT 1");
-               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='funcoins' LIMIT 1");
-               break;
-
-       case 'update': // Update an extension
-               switch (getCurrentExtensionVersion()) {
-                       case '0.0.1': // SQL queries for v0.0.1
-                               addExtensionSql('');
-
-                               // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes('');
-                               break;
-               } // END - switch
-               break;
-
-       case 'modify': // When the extension got modified
-               break;
-
-       case 'test': // For testing purposes
-               break;
-
-       case 'init': // Do stuff when extension is initialized
-               // Init array
-               $GLOBALS['funcoins_data'] = array();
-               break;
-
-       default: // Unknown extension mode
-               logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName()));
-               break;
-} // END - switch
-
-// [EOF]
+// @DEPRECATED
 ?>