inc/modules/admin/action-coupon.php svneol=native#text/plain
inc/modules/admin/action-doubler.php svneol=native#text/plain
inc/modules/admin/action-email.php svneol=native#text/plain
+inc/modules/admin/action-funcoins.php svneol=native#text/plain
inc/modules/admin/action-grade.php svneol=native#text/plain
inc/modules/admin/action-holiday.php svneol=native#text/plain
inc/modules/admin/action-login.php svneol=native#text/plain
<?php
/************************************************************************
- * Mailer v0.2.1-FINAL Start: 19/08/2010 *
- * =================== Last change: 19/08/2010 *
+ * 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 ( *
+ * FunCoins-API (FoCo-Ex²) *
* -------------------------------------------------------------------- *
* $Revision:: $ *
* $Date:: $ *
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',
+`fucoins_tan` VARCHAR(255) NOT NULL DEFAULT '' 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(32) 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² einstellen, Auszahlungen auflisten usw..', 15);
+ addAdminMenuSql('funcoins', 'config_funcoins', 'FuCo-Ex²-Einstellungen', 'Konfiguration zur FuCo-Ex² einstellen.', 1);
+ addAdminMenuSql('funcoins', 'list_funcoins', 'Anfragen auflisten', 'Listet alle FunCoinsein- 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
break;
case 'init': // Do stuff when extension is initialized
+ // Init array
+ $GLOBALS['funcoins_data'] = array();
break;
default: // Unknown extension mode
`wernis_type` ENUM('IN','OUT','FAILED') NOT NULL DEFAULT 'FAILED',
`wernis_api_message` TINYTEXT,
`wernis_api_status` VARCHAR(255) NULL DEFAULT NULL,
-PRIMARY KEY (`id`)
+PRIMARY KEY (`id`),
INDEX (`userid`)",
'Transfered Wernis per user');
addConfigAddSql('wernis_api_url', "VARCHAR(255) NOT NULL DEFAULT 'http://www.wds66.com/api/'");
// User data
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD wernis_userid VARCHAR(6) NOT NULL DEFAULT ''");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `wernis_userid` VARCHAR(6) NOT NULL DEFAULT ''");
// Admin menu
addAdminMenuSql('wernis', NULL, 'Wernis-Management', 'Konfiguration zur WDS66-API einstellen, Auszahlungen auflisten usw..', 15);
addAdminMenuSql('wernis', 'config_wernis', 'WDS66-API-Einstellungen', 'Konfiguration zur WDS66-API einstellen.', 1);
- addAdminMenuSql('wernis', 'list_wernis', 'Wernis-Anfragen auflisten', 'Listet alle Wernis-Auszahlungsanfragen Ihrer Mitglieder auf.', 2);
+ addAdminMenuSql('wernis', 'list_wernis', 'Anfragen auflisten', 'Listet alle Wernis-Ein- und -auszahlungsanfragen Ihrer Mitglieder und Sponsoren auf.', 2);
// Member menu
addMemberMenuSql('main', 'wernis', 'Wernis-Ein-/Auszahlungen', 11);
--- /dev/null
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL Start: 07/15/2011 *
+ * =================== Last change: 07/15/2011 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : action-funcoins.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Menu for ext-funcoins management *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Menue fuer Management von ext-funcoins *
+ * -------------------------------------------------------------------- *
+ * $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')) || (!isAdmin())) {
+ die();
+} // END - if
+
+// Add description as navigation point
+addYouAreHereLink('admin', __FILE__);
+
+// Load the include file
+$inc = sprintf("inc/modules/admin/what-%s.php", getWhat());
+if (isIncludeReadable($inc)) {
+ // Ok, we finally load the admin action module
+ loadInclude($inc);
+} else {
+ addFatalMessage(__FILE__, __LINE__, '{--ADMIN_WHAT_404--}');
+}
+
+// [EOF]
+?>
<td align="center" class="{%template,ColorSwitch%}"><strong>{--TOTAL_REFERALS--}:</strong></td>
</tr>
<tr>
- <td align="center" class="right {%template,ColorSwitch%} bottom">{%pipe,getTotalPoints,translateComma=$content[userid]%} {?POINTS?}</td>
+ <td align="center" class="right {%template,ColorSwitch%} bottom">{%pipe,getTotalPoints,translateComma=$content[userid]%}</td>
<td align="center" class="right {%template,ColorSwitch%} bottom">$content[emails_sent]</td>
<td align="center" class="right {%template,ColorSwitch%} bottom">{%pipe,translateComma=$content[click_rate]%}%</td>
- <td align="center" class="right {%template,ColorSwitch%} bottom">{%pipe,translateComma=$content[locked_points]%} {?POINTS?}</td>
+ <td align="center" class="right {%template,ColorSwitch%} bottom">{%pipe,translateComma=$content[locked_points]%}</td>
<td align="center" class="{%template,ColorSwitch%} bottom">$content[refs]</td>
</tr>
<tr>
+<div class="para">
Wichtige Ereignisse wie das Registrieren des betreffenden Mitgliederaccounts,
Änderungen an den Interessen, Aktualisierung der Profildaten,
fehlgeschlagene Loginversuche, Zusenden eines neuen Passwortes und vieles mehr
werden mit dieser Erweiterung für eine einstellbare Dauer in der Datenbank
gespeichert und dem jeweiligen Mitglied einsehbar im Mitgliederaccount zur
Verfügung gestellt.
+</div>