]> git.mxchange.org Git - mailer.git/commitdiff
Extension ext-primera is now deprecated (see ticket #8's last comment)
authorRoland Häder <roland@mxchange.org>
Fri, 15 Jun 2012 19:00:15 +0000 (19:00 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 15 Jun 2012 19:00:15 +0000 (19:00 +0000)
16 files changed:
.gitattributes
inc/classes/primera_api.class.php [new file with mode: 0644]
inc/extensions/ext-primera.php
inc/language/primera_de.php
inc/libs/primera_functions.php
inc/modules/admin/action-primera.php
inc/modules/admin/what-config_primera.php
inc/modules/admin/what-list_primera.php
inc/modules/member/what-primera.php
templates/de/html/admin/admin_config_primera.tpl
templates/de/html/admin/admin_list_primera_main.tpl
templates/de/html/admin/admin_list_primera_row.tpl
templates/de/html/ext/ext_primera.tpl
templates/de/html/member/member_primera_mode_list.tpl
templates/de/html/member/member_primera_mode_list_row.tpl
templates/de/html/member/member_primera_mode_pay.tpl

index c2146ca33da54b1b88ac16ef8e7f754da9f8bd66..3abddf37b7b7ed6486801889b3005b7cda1d107e 100644 (file)
@@ -93,6 +93,7 @@ inc/cache/_compiled/html/.htaccess svneol=native#text/plain
 inc/callback-functions.php svneol=native#text/plain
 inc/classes/.htaccess svneol=native#text/plain
 inc/classes/cachesystem.class.php svneol=native#text/plain
+inc/classes/primera_api.class.php svneol=native#text/plain
 inc/classes/rdf.class.php svneol=native#text/plain
 inc/classes/resolver.class.php svneol=native#text/plain
 inc/code-functions.php svneol=native#text/plain
diff --git a/inc/classes/primera_api.class.php b/inc/classes/primera_api.class.php
new file mode 100644 (file)
index 0000000..c91d81e
--- /dev/null
@@ -0,0 +1,238 @@
+<?php
+/**
+ * PrimeraApi
+ * -------------------------------------------
+ * Mit dieser Klasse ist ein einfacher Primeratransfer von Ihrem Account
+ * zu dem Account eines bei Primusportal.de registrierten Mitglieds m�glich.
+ *
+ *------------------ Aenderungen durch Roland Haeder 09.08.2008 ----------------
+ * Klasse umbenannt nach PrimeraApi, damit sie in das Framework besser passt.
+ * Zudem sind alle oeffentlichen Attribute nun privat, der Konstruktor hat den
+ * neuen "magischen" Namen __construct() und "normale" Konstanten sind nach
+ * Klassenkonstanten umbenannt. Unsinnige else-Bloecke sind noch umgewandelt.
+ * Methodennamen fangen nun immer mit einem kleinen Buchstaben an. Zudem sind
+ * die Methoden Pay,Query und Parse umbenannt.
+ *------------------ Aenderungen durch Roland Haeder 09.08.2008 ----------------
+ *
+ * Die Einbindung des Interfaces geschieht folgenderma�en:
+ *  1. Einbindung der Klasse in Ihr PHP-Auszahlungsskript:
+ *     CODE:
+ *       require_once( "PFAD/ZU/DER/KLASSE/PrimeraApi.class.php" );
+ *       $PPUsername = "username"; // Ihr Username bei Primusportal
+ *       $PPPassword = "passwort"; // Ihr Passwort bei Primusportal
+ *
+ *       $Interface = new PrimeraApi($PPUsername, $PPPassword);
+ *  2. Durchf�hren einer Auszahlung:
+ *     CODE:
+ *       $Status = $Interface->payPrimera($PayReceiver, $PayAmount, $PayDescription);
+ *
+ *     Wobei $PayReicer der Username des Empf�ngers bei
+ *     Primusportal.de ist. $PayAmount ist der gerundete( !! ) Betrag an Primera,
+ *     die der Empf�nger erhalten soll. $PayDescription ist eine von Ihnen
+ *     festgelegte kurze Beschreibung. Die L�nge dieses Textes darf 100 Zeichen
+ *     nicht �berschreiten. Beispiel:
+ *       $status = $Interface->payPrimera("garbage", 10000, "Auszahlung IhreSeite.de - id: 12345");
+ *  3. �berpr�fung des Status (R�ckgabecode):
+ *     CODE:
+ *       if (!$status) {
+ *         // Ein Fehler ist aufgetreten
+ *     // Fehlerbehandlung hier einf�gen...
+ *       }else {
+ *         // Auszahlung erfolgreich durchgef�hrt
+ *         // F�hren Sie hier Ihre Datenbankabfragen durch, um die Auszahlung zu
+ *         // best�tigen...
+ *       }
+ *
+ *     Die komplette R�ckgabe des Interfaces wird als assoziatives Array in der Klassen-
+ *     variable __data gespeichert:
+ *     __data => array('status' => R�ckgabecode (PI_DONE, PI_SENDER_ERROR, ...),
+ *                     "statustext" => Status in Worten (z.B.: "Transaktion erfolgreich durchgef�hrt"),
+ *                     ")
+ *
+ *
+ * @author             Andreas Schmidt <xxgarbagexx@web.de>
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @version            1.0 - beta
+ * @copyright  (c) 2007 by Primusportal.de
+ * @copyright  (c) 2008 by Roland Haeder
+ * @copyright  2009, 2010 by Mailer Developer Team
+ */
+class PrimeraApi {
+       /**
+        * Fehler - Interfacebenutzer
+        */
+       const PI_ERROR = -1;
+
+       /**
+        * Statuscode f�r erfolgreich ausgef�hrte Transaktion
+        */
+       const PI_DONE = 200;
+
+       /**
+        * Fehler - User existiert nicht oder ist gesperrt
+        */
+       const PI_RECEIVER_ERROR = 301;
+
+       /**
+        * Sender-Account Fehler (User nicht existent, gesperrt, ...)
+        */
+       const PI_SENDER_ERROR = 401;
+
+       /**
+        * Betrag fehler
+        */
+       const PI_AMOUNT_ERROR = 501;
+
+       /**
+        * Zu wenig Primera
+        */
+       const PI_TOO_LESS_PRIMERA = 502;
+
+       /**
+        * User nicht aktiv oder existiert nicht
+        */
+       const PI_USER_CHECK_ERROR = 601;
+
+       /**
+        * User aktiv
+        */
+       const PI_USER_CHECK_OK = 602;
+
+       /**
+        * Primerastand erfolgreich geholt
+        */
+       const PI_GET_PRIMERA_DONE = 701;
+
+       /**
+        * URL f�r das Interface auf dem Primusserver:
+        */
+       var $host = 'http://www.primusportal.de';
+       var $path = '/transfer.interface.2.0.php';
+
+       var $errno = '0';
+       var $err = '';
+
+       var $separator = ':';
+
+       var $username = '';
+       var $password = '';
+
+       var $data = array();
+
+       var $headers = '';
+
+       /**
+        * Konstruktor
+        */
+       function PrimeraApi ($PPUsername, $PPPassword) {
+               // Set data
+               $this->username = $PPUsername;
+               $this->password = $PPPassword;
+       }
+
+       /**
+        * Anfrage senden und R�ckgabecode in Variable speichern
+        */
+       function queryApi ( $data = array() ) {
+               // Base64-encode username and password hash
+               $data['PrimusInterface_Username'] = base64_encode($this->username);
+               $data['PrimusInterface_Password'] = base64_encode($this->password);
+
+               // Send POST request
+               $return = sendPostRequest($this->host.$this->path, $data);
+
+               // Convert the array into a full string
+               $returnStr = implode(chr(10), $return);
+
+               // Extract the real content, strip header away
+               $content = explode('<!-- return-start -->', $returnStr);
+
+               // Store headers away for debugging
+               $this->headers = $content[0];
+
+               // Return the content
+               return $content[1];
+       }
+
+       /**
+        * Funktion parst die R�ckgabe vom Transferskript:
+        */
+       function parseContent ( $content ) {
+               $x = explode(chr(10), $content);
+               $return = array();
+               foreach ($x as $currentLine) {
+                       $line_exploded = explode(':', $currentLine,2);
+                       if (count($line_exploded) > 1) {
+                               $return[$line_exploded[0]] = $line_exploded[1];
+                       }
+               }
+               return $return;
+       }
+
+       /**
+        * @param int/string $Receiver UserID / Username des Empf�ngers
+        * @param int $Amount Betrag in ganzzahligen Primera
+        * @param string $Description Beschreibung (Sichtbar in Einzelauflistung)
+        */
+       function payPrimera ($Receiver, $Amount, $Description = '') {
+               $valid = false;
+               $postData = array('PrimusInterface_Action' => 'Pay',
+                       'PrimusInterface_Receiver' => base64_encode($Receiver),
+                       'PrimusInterface_Amount' => base64_encode($Amount),
+                       'PrimusInterface_Description' => base64_encode($Description) );
+
+               $postReturn = $this->parseContent( $this->queryApi($postData) );
+
+               $this->data = $postReturn;
+               if ($postReturn['status'] == '200') {
+                       $valid = true;
+               }
+               return $valid;
+       }
+
+       /**
+        * �berpr�ft den Status eines Primus-Users
+        * - existiert der User
+        * - ist er aktiv
+        * @param string/int $User Userid / Username
+        */
+       function CheckPrimusUser($User) {
+               $valid = false;
+               $postData = array('PrimusInterface_Action'=> 'CheckPrimusUser',
+                       'PrimusInterface_CheckPrimusUser' => $User);
+
+               $postReturn = $this->parseContent( $this->queryApi($postData) );
+
+               $this->data = $postReturn;
+
+               if ($postReturn['status'] == self::PI_USER_CHECK_OK) {
+                       $valid = true;
+               }
+               return $valid;
+       }
+
+       /**
+        * Die Funktion liefer den aktuellen Primerastand
+        */
+       function getPrimera() {
+               $primera = false;
+               $postData = array( 'PrimusInterface_Action' => 'GetPrimera' );
+               $postReturn = $this->parseContent( $this->queryApi($postData) );
+
+               $this->data = $postReturn;
+               if ($postReturn['status'] == self::PI_GET_PRIMERA_DONE) {
+                       $primera = $postReturn['primera'];
+               }
+               return $primera;
+       }
+
+       /**
+        * Getter fuer data
+        */
+       function getData () {
+               return $this->data;
+       }
+}
+
+// [EOF]
+?>
index fc54a62b9b18ab3cb4c5e94fc2dacb8582c870f3..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,129 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 09/09/2008 *
- * ===================                          Last change: 09/09/2008 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : ext-primera.php                                  *
- * -------------------------------------------------------------------- *
- * Short description : Payout extension                                 *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Auszahlung-Erweiterung                           *
- * -------------------------------------------------------------------- *
- * $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://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 of this extension
-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
-               // SQL commands to run
-               addDropTableSql('user_primera');
-               addCreateTableSql('user_primera', "
-`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-`primera_account` VARCHAR(255) NOT NULL DEFAULT '',
-`primera_amount` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
-`primera_timestamp` VARCHAR(10) NOT NULL DEFAULT 0,
-`primera_type` ENUM('WITHDRAW','PAYOUT','FAILED') NOT NULL DEFAULT 'FAILED',
-`primera_api_message` TINYTEXT,
-`primera_api_status` VARCHAR(255) NULL DEFAULT NULL,
-PRIMARY KEY (`id`),
-INDEX (`userid`)",
-                       'Transfers in Primera');
-
-               // Configuration
-               addConfigAddSql('primera_min_payout', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 40000');
-               addConfigAddSql('primera_min_withdraw', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 5000');
-               addConfigAddSql('primera_api_name', "VARCHAR(255) NOT NULL DEFAULT ''");
-               addConfigAddSql('primera_api_md5', "VARCHAR(32) NOT NULL DEFAULT ''");
-               addConfigAddSql('primera_refid', "VARCHAR(255) NOT NULL DEFAULT ''");
-
-               // User data
-               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `primera_nickname` VARCHAR(255) NOT NULL DEFAULT ''");
-
-               // Admin menu
-               addAdminMenuSql('primera', NULL, 'Primera-Management', 'Konfiguration zur Primera-API einstellen, Auszahlungen auflisten usw..', 15);
-               addAdminMenuSql('primera', 'config_primera', 'Primera-API-Einstellungen', 'Konfiguration zur Primera-API einstellen.', 1);
-               addAdminMenuSql('primera', 'list_primera', 'Primera-Anfragen auflisten', 'Listet alle Primera-Auszahlungsanfragen Ihrer Mitglieder auf.', 2);
-
-               // Member menu
-               addMemberMenuSql('main', 'primera', 'Primera-Ein-/Auszahlungen', 11);
-               break;
-
-       case 'remove': // Do stuff when removing extension
-               // SQL commands to run
-               addDropTableSql('user_primera');
-               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='primera'");
-               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='primera'");
-               break;
-
-       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 `what`='primera' LIMIT 1");
-               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 `what`='primera' LIMIT 1");
-               break;
-
-       case 'update': // Update an extension
-               switch (getCurrentExtensionVersion()) {
-                       case '0.0.1': // SQL queries for v0.0.1
-                               // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes('');
-                               break;
-               } // END - if
-               break;
-
-       case 'modify': // When the extension got modified
-               break;
-
-       case 'test': // For testing purposes
-               break;
-
-       case 'init': // Do stuff when extension is initialized
-               break;
-
-       default: // Unknown extension mode
-               logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName()));
-               break;
-} // END - if
-
-// [EOF]
+// @DEPRECATED
 ?>
index ef8e866f7a1d0dc675dd8ed30577b0a98b58383c..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,124 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 04/11/2004 *
- * ===================                          Last change: 08/12/2004 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : primera_de.php                                   *
- * -------------------------------------------------------------------- *
- * Short description : German langugage support                         *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Deutsche Sprachunterstuetzung                    *
- * -------------------------------------------------------------------- *
- * $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://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
-
-// Language definitions
-addMessages(array(
-       'ADMIN_TASK_LIST_PRIMERA_ALL' => "Alle Primera-Ein-/Auszahlungen",
-       'ADMIN_TASK_LIST_PRIMERA_ALL_TITLE' => "Listet alle Primera-Ein- und Auszahlungen auf.",
-       'ADMIN_CONFIG_PRIMERA_TITLE' => "Einstellungen zum Primus-Portal:",
-       'ADMIN_CONFIG_PRIMERA_MIN_PAYOUT' => "Minimumguthaben f&uuml;r Auszahlungen.",
-       'ADMIN_CONFIG_PRIMERA_MIN_WITHDRAW' => "Minimumguthaben f&uuml;r Einzahlungen.",
-       'ADMIN_CONFIG_PRIMERA_API_NAME' => "Primus-Nickname",
-       'ADMIN_CONFIG_PRIMERA_API_MD5' => "Primera-Passwort (Wird als MD5-Hash gespeichert)",
-       'ADMIN_CONFIG_PRIMERA_REFID' => "Primus-Referral-Id (???)",
-       'ADMIN_CONFIG_PRIMERA_NOTE' => "<a href=\"http://www.primusportal.de/r/Quix0r\" target=\"_blank\">Hier</a> k&ouml;nnen Sie sich ein Primus-Portal-Account holen. <strong>Geben Sie immer Ihren Usernamen von Primus-Portal ein und &uuml;berpr&uuml;fen Sie diesen mehrmals! Er wird zum &Uuml;berweisen von Primera ben&ouml;tigt.",
-       'ADMIN_PRIMERA_NO_TRANSFERS' => "Derzeit keine Primera transferiert.",
-       'ADMIN_PRIMERA_ACCOUNT' => "Account bei Primus-Portal",
-       'ADMIN_PRIMERA_TRANSFERED' => "Primera transferiert",
-       'ADMIN_PRIMERA_TIMESTAMP' => "Zeitpunkt &Uuml;berweisung",
-       'ADMIN_PRIMERA_TYPE' => "&Uuml;berweisungsrichtung",
-       'ADMIN_PRIMERA_API_MESSAGE' => "Nachricht von Primus-API",
-       'ADMIN_PRIMERA_API_STATUS' => "Status von Primus-API",
-       'MEMBER_PRIMERA_MODE_WITHDRAW' => "Primera einzahlen",
-       'MEMBER_PRIMERA_MODE_PAYOUT' => "Primera auszahlen",
-       'PRIMERA_STATUS_UNKNWOWN' => "Primera-Typ <span class=\"data\">%s</span> unbekannt.",
-       'PRIMERA_STATUS_WITHDRAW' => "Einzahlung von Primus",
-       'PRIMERA_STATUS_PAYOUT' => "Auszahlung an Primus",
-       'PRIMERA_STATUS_FAILED' => "Fehlgeschlagen",
-       'PRIMERA_TIMESTAMP' => "Buchungszeitmarke",
-       'PRIMERA_ACCOUNT' => "Primus-Portal",
-       'PRIMERA_TOTAL_PRIMERA' => "Gesamt &uuml;berwiesen",
-       'MEMBER_PRIMERA_LIST_PRIMERA' => "&Uuml;berweisungsliste von/an Primus-Portal",
-       'ADMIN_LIST_PRIMERA_TITLTE' => "Alle Transaktionen von und zum Primus-Portal auflisten:",
-       'ADMIN_LIST_PRIMERA_FOOTER' => "Es sollte hier ein Hinweis eingebaut werden.",
-
-// API messages
-       'PRIMERA_API_REQUEST_DATA_INVALID' => "Interner Fehler: Abfragedaten sind defekt.",
-       'PRIMERA_API_REQUEST_DATA_MISSING' => "Interner Fehler: Abfragedaten sind nicht komplett.",
-       'PRIMERA_API_REQUEST_ERROR' => "Abfragefehler: <span class=\"data\">%s</span>",
-       'PRIMERA_API_REQUEST_FAILED' => "Unbekannter Fehler <span class=\"data\">%s</span> von API erhalten! Bitte im [<a href=\"http://bugs.mxchange.org\" target=\"_blank\" title=\"Direktlink zum Bug-Tracker\">Bug-Tracker posten</a>], den Fehlercode nennen und wie es dazu gekommen ist.",
-       'PRIMERA_API_REQUEST_FAILED_AUTH' => "Authorisierung an API fehlgeschlagen! Bitte Primera-Nickname und Passwort &uuml;berpr&uuml;fen. [<a href=\"http://www.primusportal.de/\" target=\"_blank\" title=\"Direkt zum Primus-Exportaccount\">Hier</a>] direkt zum Primera-Account. Sie ben&ouml;tigen Ihren Usernamen und Passwort.",
-       'PRIMERA_API_REQUEST_FAILED_USER' => "Useraccount nicht gefunden oder Primera-Passwort ist ung&uuml;ltig.",
-       'PRIMERA_API_REQUEST_FAILED_OWN' => "&Uuml;berweisung an eigenes Account nicht m&ouml;glich.",
-       'PRIMERA_API_REQUEST_FAILED_AMOUNT' => "Konto weist nicht gen&uuml;gend Deckung auf.",
-       'PRIMERA_API_REQUEST_FAILED_API_AMOUNT' => "Primera-Account weist nicht gen&uuml;gend Deckung auf.",
-       'PRIMERA_API_PURPOSE_WITHDRAW' => "Einzahlung auf {?MAIN_TITLE?} ({?URL?}), id: <span class=\"data\">%s</span>",
-       'PRIMERA_API_PURPOSE_PAYOUT' => "Auszahlung von {?MAIN_TITLE?} ({?URL?}), id: <span class=\"data\">%s</span>",
-
-// Error messages
-       'PRIMERA_ERROR_STATUS' => "Fehler-Status <span class=\"data\">%s</span> erhalten.",
-       'PRIMERA_UNKNOWN_ERROR' => "Unbekannter Fehler aufgetreten.",
-
-// Member messages
-       'MEMBER_PRIMERA_NO_ACCOUNT' => "Noch kein Primus-Account? Hier entlang.",
-       'MEMBER_PRIMERA_API_DATA_MISSING' => "Diese Funktion kann derzeit nicht genutzt werden, da wir sie noch einrichten m&uuml;ssen.",
-       'MEMBER_PRIMERA_MIN_PAYOUT_PAYOUT' => "Sie haben nicht gen&uuml;gend Primera zum Auszahlen! Mindestens: <span class=\"data\">{%config,translateComma=primera_min_payout%}</span> Primera.",
-       'MEMBER_PRIMERA_WITHDRAW_TITLE' => "Primera bei {?MAIN_TITLE?} einzahlen:",
-       'MEMBER_PRIMERA_WITHDRAW_POINTS_ACCOUNT' => "Primera hier im Account:",
-       'MEMBER_PRIMERA_WITHDRAW_MIN_POINTS' => "Mindest einzuzahlendes Primera-Guthaben:",
-       'MEMBER_PRIMERA_WITHDRAW_SUBMIT' => "Primera jetzt einzahlen",
-       'MEMBER_PRIMERA_WITHDRAW_NOTE' => "Ihr Primera-Passwort wird bei {?MAIN_TITLE?} nicht gespeichert. Bitte bei Primera-Betrag nur gerade Betr&auml;ge eingeben! Ihr Primera-Account sollte ausreichend Deckung aufweisen.",
-       'MEMBER_PRIMERA_PAYOUT_TITLE' => "Primera auf Ihr Portal-Account auszahlen",
-       'MEMBER_PRIMERA_PAYOUT_POINTS' => "Auszahlf&auml;higes Primera-Guthaben",
-       'MEMBER_PRIMERA_PAYOUT_MIN_POINTS' => "Mindestens auszuzahlendes Primera-Guthaben",
-       'MEMBER_PRIMERA_PAYOUT_SUBMIT' => "Auszahlung durchf&uuml;hren",
-       'MEMBER_PRIMERA_PAYOUT_NOTE' => "Ihr Primera-Passwort wird bei {?MAIN_TITLE?} nicht gespeichert. Bitte bei Primera-Betrag nur gerade Betr&auml;ge eingeben! &Uuml;berpr&uuml;fen Sie vor dem Absenden Ihren Primus-Usernamen.",
-       'MEMBER_PRIMERA_NICKNAME' => "Username bei Primus-Portal: [<a href=\"http://www.primusportal.de/lost_password.php\" target=\"_blank\">Vergessen?</a>]",
-       'MEMBER_PRIMERA_PASSWORD' => "Primera-Passwort (nicht Accountpasswort!): [<a href=\"http://www.primusportal.de/lost_password.php\" target=\"_blank\">Vergessen?</a>]",
-       'MEMBER_PRIMERA_AMOUNT' => "Zu &uuml;berweisenden Betrag eingeben:",
-       'MEMBER_PRIMERA_MODE_INVALID' => "Ung&uuml;ltiger Modus <span class=\"data\">%s</span> erkannt! Bitte links im Men&uuml; fortfahren.",
-       'MEMBER_PRIMERA_EMPTY_USERNAME' => "Sie haben Ihren Primus-Usernamen nicht eingegeben.",
-       'MEMBER_PRIMERA_EMPTY_PASSWORD' => "Sieh haben kein Primera-Passwort eingegeben.",
-       'MEMBER_PRIMERA_EMPTY_AMOUNT' => "Sie haben keine zu &uuml;berweisende Betrag angegeben.",
-       'MEMBER_PRIMERA_INVALID_USERNAME' => "Bitte nur Zahlen f&uuml;r den Primus-Usernamen eingeben.",
-       'MEMBER_PRIMERA_INVALID_AMOUNT' => "Bitte nur Zahlen f&uuml;r den zu &uuml;berweisenden Betrag eingeben.",
-       'MEMBER_PRIMERA_AMOUNT_SMALLER_MIN' => "Bitte geben Sie mindestens <span class=\"data\">{%config,translateComma=primera_min_payout%}</span> Primera an.",
-       'MEMBER_PRIMERA_WITHDRAW_FAILED' => "Die Einzahlung hat nicht geklappt! R&uuml;ckmeldung f&uuml;r den Support: <span class=\"data\">%s</span>.",
-       'MEMBER_PRIMERA_WITHDRAW_DONE' => "Einzahlung auf Ihr {?MAIN_TITLE?} Konto erfolgreich abgeschlossen. :-)",
-       'MEMBER_PRIMERA_PAYPOUT_FAILED' => "Die Auszahlung hat nicht geklappt! R&uuml;ckmeldung f&uuml;r den Support: <span class=\"data\">%s</span>.",
-       'MEMBER_PRIMERA_PAYOUT_DONE' => "Auszahlung auf Primus-Portal erfolgreich abgeschlossen. :-)",
-       'MEMBER_PRIMERA_PAYOUT_POINTS_DEPLETED' => "Sie k&ouml;nnen nicht <span class=\"data\">%s</span> Primera auszahlen, da Sie nur <span class=\"data\">%s</span> &uuml;brig haben.",
-       'MEMBER_PRIMERA_STATUS' => "&Uuml;berweisungsart",
-));
-
-// [EOF]
+// @DEPRECATED
 ?>
index 9adf85660da902ad58776ae32d0354e909665679..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,280 +1,3 @@
 <?php
-/**
- * PrimeraApi
- * -------------------------------------------
- * Mit dieser Klasse ist ein einfacher Primeratransfer von Ihrem Account
- * zu dem Account eines bei Primusportal.de registrierten Mitglieds m�glich.
- *
- *------------------ Aenderungen durch Roland Haeder 09.08.2008 ----------------
- * Klasse umbenannt nach PrimeraApi, damit sie in das Framework besser passt.
- * Zudem sind alle oeffentlichen Attribute nun privat, der Konstruktor hat den
- * neuen "magischen" Namen __construct() und "normale" Konstanten sind nach
- * Klassenkonstanten umbenannt. Unsinnige else-Bloecke sind noch umgewandelt.
- * Methodennamen fangen nun immer mit einem kleinen Buchstaben an. Zudem sind
- * die Methoden Pay,Query und Parse umbenannt.
- *------------------ Aenderungen durch Roland Haeder 09.08.2008 ----------------
- *
- * Die Einbindung des Interfaces geschieht folgenderma�en:
- *  1. Einbindung der Klasse in Ihr PHP-Auszahlungsskript:
- *     CODE:
- *       require_once( "PFAD/ZU/DER/KLASSE/PrimeraApi.class.php" );
- *       $PPUsername = "username"; // Ihr Username bei Primusportal
- *       $PPPassword = "passwort"; // Ihr Passwort bei Primusportal
- *
- *       $Interface = new PrimeraApi($PPUsername, $PPPassword);
- *  2. Durchf�hren einer Auszahlung:
- *     CODE:
- *       $Status = $Interface->payPrimera($PayReceiver, $PayAmount, $PayDescription);
- *
- *     Wobei $PayReicer der Username des Empf�ngers bei
- *     Primusportal.de ist. $PayAmount ist der gerundete( !! ) Betrag an Primera,
- *     die der Empf�nger erhalten soll. $PayDescription ist eine von Ihnen
- *     festgelegte kurze Beschreibung. Die L�nge dieses Textes darf 100 Zeichen
- *     nicht �berschreiten. Beispiel:
- *       $status = $Interface->payPrimera("garbage", 10000, "Auszahlung IhreSeite.de - id: 12345");
- *  3. �berpr�fung des Status (R�ckgabecode):
- *     CODE:
- *       if (!$status) {
- *         // Ein Fehler ist aufgetreten
- *     // Fehlerbehandlung hier einf�gen...
- *       }else {
- *         // Auszahlung erfolgreich durchgef�hrt
- *         // F�hren Sie hier Ihre Datenbankabfragen durch, um die Auszahlung zu
- *         // best�tigen...
- *       }
- *
- *     Die komplette R�ckgabe des Interfaces wird als assoziatives Array in der Klassen-
- *     variable __data gespeichert:
- *     __data => array('status' => R�ckgabecode (PI_DONE, PI_SENDER_ERROR, ...),
- *                     "statustext" => Status in Worten (z.B.: "Transaktion erfolgreich durchgef�hrt"),
- *                     ")
- *
- *
- * @author             Andreas Schmidt <xxgarbagexx@web.de>
- * @author             Roland Haeder <webmaster@ship-simu.org>
- * @version            1.0 - beta
- * @copyright  (c) 2007 by Primusportal.de
- * @copyright  (c) 2008 by Roland Haeder
- * @copyright  2009, 2010 by Mailer Developer Team
- */
-class PrimeraApi {
-       /**
-        * Fehler - Interfacebenutzer
-        */
-       const PI_ERROR = -1;
-
-       /**
-        * Statuscode f�r erfolgreich ausgef�hrte Transaktion
-        */
-       const PI_DONE = 200;
-
-       /**
-        * Fehler - User existiert nicht oder ist gesperrt
-        */
-       const PI_RECEIVER_ERROR = 301;
-
-       /**
-        * Sender-Account Fehler (User nicht existent, gesperrt, ...)
-        */
-       const PI_SENDER_ERROR = 401;
-
-       /**
-        * Betrag fehler
-        */
-       const PI_AMOUNT_ERROR = 501;
-
-       /**
-        * Zu wenig Primera
-        */
-       const PI_TOO_LESS_PRIMERA = 502;
-
-       /**
-        * User nicht aktiv oder existiert nicht
-        */
-       const PI_USER_CHECK_ERROR = 601;
-
-       /**
-        * User aktiv
-        */
-       const PI_USER_CHECK_OK = 602;
-
-       /**
-        * Primerastand erfolgreich geholt
-        */
-       const PI_GET_PRIMERA_DONE = 701;
-
-       /**
-        * URL f�r das Interface auf dem Primusserver:
-        */
-       var $host = "http://www.primusportal.de";
-       var $path = "/transfer.interface.2.0.php";
-
-       var $errno = '0';
-       var $err = '';
-
-       var $separator = ':';
-
-       var $username = '';
-       var $password = '';
-
-       var $data = array();
-
-       var $headers = '';
-
-       /**
-        * Konstruktor
-        */
-       function PrimeraApi ($PPUsername, $PPPassword) {
-               // Set data
-               $this->username = $PPUsername;
-               $this->password = $PPPassword;
-       }
-
-       /**
-        * Anfrage senden und R�ckgabecode in Variable speichern
-        */
-       function queryApi ( $data = array() ) {
-               // Base64-encode username and password hash
-               $data['PrimusInterface_Username'] = base64_encode($this->username);
-               $data['PrimusInterface_Password'] = base64_encode($this->password);
-
-               // Send POST request
-               $return = sendPostRequest($this->host.$this->path, $data);
-
-               // Convert the array into a full string
-               $returnStr = implode("\n", $return);
-
-               // Extract the real content, strip header away
-               $content = explode('<!-- return-start -->', $returnStr);
-
-               // Store headers away for debugging
-               $this->headers = $content[0];
-
-               // Return the content
-               return $content[1];
-       }
-
-       /**
-        * Funktion parst die R�ckgabe vom Transferskript:
-        */
-       function parseContent ( $content ) {
-               $x = explode("\n", $content);
-               $return = array();
-               foreach ($x as $currentLine) {
-                       $line_exploded = explode(':', $currentLine,2);
-                       if (count($line_exploded) > 1) {
-                               $return[$line_exploded[0]] = $line_exploded[1];
-                       }
-               }
-               return $return;
-       }
-
-       /**
-        * @param int/string $Receiver UserID / Username des Empf�ngers
-        * @param int $Amount Betrag in ganzzahligen Primera
-        * @param string $Description Beschreibung (Sichtbar in Einzelauflistung)
-        */
-       function payPrimera ($Receiver, $Amount, $Description = '') {
-               $valid = false;
-               $postData = array('PrimusInterface_Action' => 'Pay',
-                       'PrimusInterface_Receiver' => base64_encode($Receiver),
-                       'PrimusInterface_Amount' => base64_encode($Amount),
-                       'PrimusInterface_Description' => base64_encode($Description) );
-
-               $postReturn = $this->parseContent( $this->queryApi($postData) );
-
-               $this->data = $postReturn;
-               if ($postReturn['status'] == '200') {
-                       $valid = true;
-               }
-               return $valid;
-       }
-
-       /**
-        * �berpr�ft den Status eines Primus-Users
-        * - existiert der User
-        * - ist er aktiv
-        * @param string/int $User Userid / Username
-        */
-       function CheckPrimusUser($User) {
-               $valid = false;
-               $postData = array('PrimusInterface_Action'=> 'CheckPrimusUser',
-                       'PrimusInterface_CheckPrimusUser' => $User);
-
-               $postReturn = $this->parseContent( $this->queryApi($postData) );
-
-               $this->data = $postReturn;
-
-               if ($postReturn['status'] == self::PI_USER_CHECK_OK) {
-                       $valid = true;
-               }
-               return $valid;
-       }
-
-       /**
-        * Die Funktion liefer den aktuellen Primerastand
-        */
-       function getPrimera() {
-               $primera = false;
-               $postData = array( 'PrimusInterface_Action' => 'GetPrimera' );
-               $postReturn = $this->parseContent( $this->queryApi($postData) );
-
-               $this->data = $postReturn;
-               if ($postReturn['status'] == self::PI_GET_PRIMERA_DONE) {
-                       $primera = $postReturn['primera'];
-               }
-               return $primera;
-       }
-       /**
-        * Getter fuer data
-        */
-       function getData () {
-               return $this->data;
-       }
-}
-
-// Function to test the Primera API by getting the amount. If the returned value
-// is not false the API data is valid, else invalid
-function testPrimeraApi () {
-       // Get new instance
-       $api = new PrimeraApi(postRequestElement('primera_api_name'), postRequestElement('primera_api_md5'));
-
-       // Was that fine?
-       return ($api->getPrimera() !== false);
-}
-
-// Execute the withdraw of a sponsor only!
-function executePrimeraWithdraw ($primusNick, $userMd5, $amount) {
-       // Is the sponsor extension installed?
-       if (!isExtensionActive('sponsor')) {
-               // No, abort here
-               return false;
-       } elseif (!isSponsor()) {
-               // No sponsor, not allowed to withdraw!
-               return false;
-       }
-
-       // Get new instance
-       $api = new PrimeraApi($primusNick, $userMd5);
-
-       // Prepare purpose
-       eval('$purpose = "' . doFinalCompilation(getMaskedMessage('PRIMERA_API_PURPOSE_WITHDRAW', getSession('sponsorid')), true) . '";');
-
-       // Pay the Primera
-       return $api->payPrimera($primusNick, $amount, $purpose);
-}
-
-// Execute the payout
-function executePrimeraPayout ($primusNick, $userMd5, $amount) {
-       // Get new instance
-       $api = new PrimeraApi(getConfig('primera_api_name'), getConfig('primera_api_md5'));
-
-       // Prepare purpose
-       eval('$purpose = "' . doFinalCompilation(getMaskedMessage('PRIMERA_API_PURPOSE_PAYOUT', getMemberId()), true) . '";');
-
-       // Pay the Primera
-       return $api->payPrimera($primusNick, $amount, $purpose);
-}
-
-// [EOF]
+// @DEPRECATED
 ?>
index b437bc1dd972e14800944a6570cd06e72a6c04c6..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,56 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 09/09/2008 *
- * ===================                          Last change: 09/09/2008 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : action-primera.php                               *
- * -------------------------------------------------------------------- *
- * Short description : Main admin menu for Primera                      *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Hauptadminmenue fuer Primera                     *
- * -------------------------------------------------------------------- *
- * $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://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
-       loadIncludeOnce($inc);
-} else {
-       addFatalMessage(__FILE__, __LINE__, '{--ADMIN_WHAT_404--}');
-}
-
-// [EOF]
+// @DEPRECATED
 ?>
index 9518d07a31b5602ec19960cceec05df4f6972676..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,71 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 09/09/2008 *
- * ===================                          Last change: 09/09/2008 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : what-config_primera.php                          *
- * -------------------------------------------------------------------- *
- * Short description : Configure primera sub-system                     *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Auszahlungensarten editieren                     *
- * -------------------------------------------------------------------- *
- * $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://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__);
-
-if (isFormSent()) {
-       // First merge temporarily the new API data into the current config
-       mergeConfig(postRequestArray());
-
-       // Is the password set?
-       if (isPostRequestElementSet('password')) {
-               // Then hash and remove it
-               setPostRequestElement('primera_api_md5', md5(postRequestElement('password')));
-               unsetPostRequestElement('password');
-       } // END - if
-
-       // Let's test the API first (hold your horses here, cowboy! Thank you. :) )
-       if (testPrimeraApi()) {
-               // Save settings
-               adminSaveSettingsFromPostData();
-       } else {
-               // Failed to test the API!
-               displayMessage(GET_PRIMERA_ERROR_MESSAGE());
-       }
-}  else {
-       // Load template
-       loadTemplate('admin_config_primera');
-}
-
-// [EOF]
+// @DEPRECATED
 ?>
index 502a07c846a638e61debed114a2838ca2082fd48..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,92 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 09/09/2008 *
- * ===================                          Last change: 09/09/2008 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : what-list_primera.php                            *
- * -------------------------------------------------------------------- *
- * Short description : List member's primera requests                   *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Auflistung der Wernis-Anfragen                   *
- * -------------------------------------------------------------------- *
- * $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://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__);
-
-// Check for entries
-$result = SQL_QUERY('SELECT
-       `id`,
-       `userid`,
-       `primera_account`,
-       `primera_amount`,
-       `primera_timestamp`,
-       `primera_type`,
-       `primera_api_message`,
-       `primera_api_status`
-FROM
-       `{?_MYSQL_PREFIX?}_user_primera`
-ORDER BY
-       `primera_timestamp` DESC,
-       `id` DESC',
-       __FILE__, __LINE__);
-
-// Are there some entries to display?
-if (!SQL_HASZERONUMS($result)) {
-       // List all entries
-       $OUT = '';
-       while ($content = SQL_FETCHARRAY($result)) {
-               // Translate some data and add color
-               $content['primera_timestamp'] = generateDateTime($content['primera_timestamp'], 2);
-
-               // Fix empty message and status
-               if (empty($content['primera_api_status'])) {
-                       // Needs to be fixed to 'OK'
-                       $content['primera_api_status']  = 'OK';
-               } // END - if
-
-               // Append it and switch colors
-               $OUT .= loadTemplate('admin_list_primera_row', true, $content);
-       } // END - while
-
-       // Load main template
-       loadTemplate('admin_list_primera_main', false, $OUT);
-} else {
-       // Nothing to display!
-       displayMessage('{--ADMIN_PRIMERA_NO_TRANSFERS--}');
-}
-
-// Free the result
-SQL_FREERESULT($result);
-
-// [EOF]
+// @DEPRECATED
 ?>
index d044bbd7e29d8f78b40e03d9e8aa476124e329d0..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,192 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 09/09/2008 *
- * ===================                          Last change: 09/09/2008 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : what-primera.php                                 *
- * -------------------------------------------------------------------- *
- * Short description : Wernis requests                                  *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Auszahlungsanfragen                              *
- * -------------------------------------------------------------------- *
- * $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://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();
-} elseif (!isMember()) {
-       // User is not logged in
-       redirectToIndexMemberOnlyModule();
-}
-
-// Add description as navigation point
-addYouAreHereLink('member', __FILE__);
-
-if ((!isExtensionActive('primera')) && (!isAdmin())) {
-       // Extension 'primera' is not activated
-       displayMessage('{%pipe,generateExtensionInactiveNotInstalledMessage=primera%}');
-       return;
-} // END - if
-
-// Check if the admin has entered the data
-if ((getConfig('primera_api_name') == '') || (getConfig('primera_api_md5') == '')) {
-       // Something important is missing...
-       displayMessage('{--MEMBER_PRIMERA_API_DATA_MISSING--}');
-       return;
-} // END - if
-
-// Init the content array and points
-$content = array();
-$points = false;
-
-// Is the mode set (payout only)
-if (!isGetRequestElementSet('do')) {
-       // Is there an id?
-       if ((!empty($content['primera_nickname'])) && (!isGetRequestElementSet('do'))) {
-               // Then list all entries
-               setGetRequestElement('do', 'list');
-
-               // And load all rows!
-               $result = SQL_QUERY_ESC("SELECT `id`,`primera_account`,`primera_amount`,`primera_timestamp`,`primera_type` FROM `{?_MYSQL_PREFIX?}_user_primera` WHERE `userid`=%s ORDER BY `primera_timestamp` DESC",
-                       array(getMemberId()), __FILE__, __LINE__);
-
-               // Load all rows
-               $content['rows'] = '';
-               while ($data = SQL_FETCHARRAY($result)) {
-                       // Prepare data for output
-                       $rowContent['primera_timestamp'] = generateDateTime($data['primera_timestamp'], 2);
-
-                       // Load row template
-                       $content['rows'] .= loadTemplate('member_primera_mode_list_row', true, $rowContent);
-               } // END - while
-
-               // Free result
-               SQL_FREERESULT($result);
-       } else {
-               // Mode pay
-               setGetRequestElement('do', 'pay');
-       }
-} // END - if
-
-if (getRequestElement('do') == 'pay') {
-       // Get total points and check if the user can request a payout
-       $points = getTotalPoints(getMemberId());
-
-       // No dots here...
-       $points = explode('.', $points);
-       $points = bigintval($points[0]);
-
-       // Remove the registration fee
-       $points = $points - getPointsRegister();
-
-       // Is this enougth for a payout?
-       if ($points < getConfig('primera_min_payout')) {
-               // No, then abort here
-               displayMessage('{--MEMBER_PRIMERA_MIN_PAYOUT_PAYOUT--}');
-               return;
-       } // END - if
-
-       // Add points to content array
-       $content['points'] = $points;
-} else {
-       // Invalid mode!
-       displayMessage('{%message,MEMBER_PRIMERA_MODE_INVALID=' . getRequestElement('do') . '%}');
-       return;
-}
-
-// Is the formular sent?
-if ((isFormSent()) && (isGetRequestElementSet('do'))) {
-       // Check input data depending on the mode and execute the requested mode
-       switch (getRequestElement('do')) {
-               case 'pay': // Payout this exchange -> Primus
-                       // Is the user id and password set?
-                       if (!isPostRequestElementSet('primera_nickname')) {
-                               // Nothing entered in Primus nickname
-                               displayMessage('{--MEMBER_PRIMERA_EMPTY_USERNAME--}');
-                       } elseif (!isPostRequestElementSet('primera_password')) {
-                               // Nothing entered in Primera password
-                               displayMessage('{--MEMBER_PRIMERA_EMPTY_PASSWORD--}');
-                       } elseif (!isPostRequestElementSet('amount')) {
-                               // Nothing entered in amount
-                               displayMessage('{--MEMBER_PRIMERA_EMPTY_AMOUNT--}');
-                       } elseif (postRequestElement('amount') != bigintval(postRequestElement('amount'))) {
-                               // Only numbers in amount!
-                               displayMessage('{--MEMBER_PRIMERA_INVALID_AMOUNT--}');
-                       } elseif (postRequestElement('amount') < getConfig('primera_min_payout')) {
-                               // Not enougth entered!
-                               displayMessage('{--MEMBER_PRIMERA_AMOUNT_SMALLER_MIN--}');
-                       } elseif (postRequestElement('amount') > $points) {
-                               // Not enougth points left!
-                               displayMessage(sprintf(getMessage('MEMBER_PRIMERA_PAYOUT_POINTS_DEPLETED'), bigintval(postRequestElement('amount')), bigintval($points)));
-                       } else {
-                               // All is fine here so do the payout
-                               $success = executePrimeraPayout(postRequestElement('primera_nickname'), md5(postRequestElement('primera_password')), postRequestElement('amount'));
-                               if ($success) {
-                                       // Default is locked!
-                                       $locked = true;
-
-                                       // Shall I 'pay' the referral points imidiately?
-                                       if (getConfig('ref_payout') == '0') {
-                                               // Yes, 'pay' it now
-                                               $locked = false;
-                                       } // END - if
-
-                                       // Subtract points from account and ignore return status
-                                       subtractPoints('primera_payout', getMemberId(), postRequestElement('amount'));
-
-                                       // Update primera nickname
-                                       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `primera_nickname`=%s WHERE `userid`=%s LIMIT 1",
-                                               array(postRequestElement('primera_nickname'), getMemberId()), __FILE__, __LINE__);
-
-                                       // All done!
-                                       displayMessage('{--MEMBER_PRIMERA_PAYOUT_DONE--}');
-                                       return;
-                               } elseif ((GET_PRIMERA_ERROR_CODE() == 'user_failed') || (GET_PRIMERA_ERROR_CODE() == 'own_failed') || (GET_PRIMERA_ERROR_CODE() == 'amount_failed') || (GET_PRIMERA_ERROR_CODE() == 'api_amount_failed')) {
-                                       // Wrong login data
-                                       displayMessage(GET_PRIMERA_ERROR_MESSAGE());
-                               } else {
-                                       // Something went wrong
-                                       displayMessage('{%message,MEMBER_PRIMERA_PAYOUT_FAILED=' . GET_PRIMERA_ERROR_MESSAGE() . '%}');
-                               }
-                       }
-                       break;
-
-               default: // Invalid mode!
-                       logDebugMessage(__FILE__, __LINE__, sprintf("Invalid mode %s detected.", getRequestElement('do')));
-                       displayMessage('{%message,MEMBER_PRIMERA_MODE_INVALID=' . getRequestElement('do') . '%}');
-                       return;
-       }
-} // END - if
-
-// Prepare mode for template name
-$mode = sprintf("member_primera_mode_%s", getRequestElement('do'));
-
-// Load the template
-loadTemplate($mode, false, $content);
-
-//
+// @DEPRECATED
 ?>
index 0ee5ecf70988c6dc5a6d7e41ba028fc35d25b550..11f5d85d80b1ca4d16cf4c19e14af24e5ec2a60f 100644 (file)
@@ -1,53 +1 @@
-<div align="center">
-<form accept-charset="UTF-8" action="{%url=modules.php?module=admin&amp;what=config_primera%}" method="post">
-<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
-       <tr>
-               <td colspan="2" align="center" class="table_header bottom">
-                       <strong>{--ADMIN_CONFIG_PRIMERA_TITLE--}</strong>
-               </td>
-       </tr>
-       <tr>
-               <td width="300" align="right">{--ADMIN_CONFIG_PRIMERA_API_NAME--}:</td>
-               <td width="270">
-                       <input type="text" class="form_field" name="primera_api_name" value="{?primera_api_name?}" size="10" maxlength="255" />
-               </td>
-       </tr>
-       <tr>
-               <td width="300" align="right">{--ADMIN_CONFIG_PRIMERA_API_MD5--}:</td>
-               <td width="270">
-                       <input type="password" class="form_field" name="password" size="20" maxlength="255" />
-               </td>
-       </tr>
-       <tr>
-               <td width="300" align="right">{--ADMIN_CONFIG_PRIMERA_REFID--}:</td>
-               <td width="270">
-                       <input type="text" class="form_field" name="primera_refid" value="{?primera_refid?}" size="10" maxlength="255" />
-               </td>
-       </tr>
-       <tr>
-               <td width="300" align="right">{--ADMIN_CONFIG_PRIMERA_MIN_PAYOUT--}:</td>
-               <td width="270">
-                       <input type="text" class="form_field" name="primera_min_payout" value="{?primera_min_payout?}" size="5" maxlength="20" />
-                       Wernis
-               </td>
-       </tr>
-       <tr>
-               <td class="bottom" width="300" align="right">{--ADMIN_CONFIG_PRIMERA_MIN_WITHDRAW--}:</td>
-               <td class="bottom" width="270">
-                       <input type="text" class="form_field" name="primera_min_withdraw" value="{?primera_min_withdraw?}" size="5" maxlength="20" />
-                       Wernis
-               </td>
-       </tr>
-       <tr>
-               <td colspan="2" class="table_footer">
-                       <input type="reset" class="form_reset" value="{--CLEAR_FORM--}" />
-                       <input type="submit" class="form_submit" name="ok" value="{--SAVE_SETTINGS--}" />
-               </td>
-       </tr>
-</table>
-</form>
-
-<div class="notice">
-       {--ADMIN_CONFIG_PRIMERA_NOTE--}
-</div>
-</div>
+<!-- @DEPRECATED //-->
index 17f5ae699d4bff296b3731a12a1f543fbcde3668..11f5d85d80b1ca4d16cf4c19e14af24e5ec2a60f 100644 (file)
@@ -1,25 +1 @@
-<div align="center">
-<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
-<tr>
-       <td colspan="8" class="table_header" align="center">
-               <strong>{--ADMIN_LIST_PRIMERA_TITLE--}</strong>
-       </td>
-</tr>
-<tr>
-       <td class="header_column bottom right" align="center" width="60"><strong>{--ID_SELECT--}</strong></td>
-       <td class="header_column bottom right" align="center" width="90"><strong>{--_USERID--}</strong></td>
-       <td class="header_column bottom right" align="center"><strong>{--ADMIN_PRIMERA_ACCOUNT--}</strong></td>
-       <td class="header_column bottom right" align="center"><strong>{--ADMIN_PRIMERA_TRANSFERED--}</strong></td>
-       <td class="header_column bottom right" align="center" width="160"><strong>{--ADMIN_PRIMERA_TIMESTAMP--}</strong></td>
-       <td class="header_column bottom right" align="center" width="160"><strong>{--ADMIN_PRIMERA_TYPE--}</strong></td>
-       <td class="header_column bottom right" align="center" width="160"><strong>{--ADMIN_PRIMERA_API_MESSAGE--}</strong></td>
-       <td class="header_column bottom" align="center" width="160"><strong>{--ADMIN_PRIMERA_API_STATUS--}</strong></td>
-</tr>
-$content
-<tr>
-       <td colspan="8" class="table_footer">
-               {--ADMIN_LIST_PRIMERA_FOOTER--}
-       </td>
-</tr>
-</table>
-</div>
+<!-- @DEPRECATED //-->
index 317989df3cd087e78100a702dfbb1ffc99920c71..11f5d85d80b1ca4d16cf4c19e14af24e5ec2a60f 100644 (file)
@@ -1,10 +1 @@
-<tr>
-       <td class="{%template,ColorSwitch%} primera_type_$content[raw_type] bottom right">$content[id]</td>
-       <td class="{%template,ColorSwitch%} primera_type_$content[raw_type] bottom right">{%pipe,generateUserProfileLink=$content[userid]%}</td>
-       <td class="{%template,ColorSwitch%} primera_type_$content[raw_type] bottom right">$content[primera_account]</td>
-       <td class="{%template,ColorSwitch%} primera_type_$content[raw_type] bottom right">{%pipe,translateComma=$content[primera_amount]%}</td>
-       <td class="{%template,ColorSwitch%} primera_type_$content[raw_type] bottom right">$content[primera_timestamp]</td>
-       <td class="{%template,ColorSwitch%} primera_type_$content[raw_type] bottom right" align="center">{%pipe,PRIMERA_TRANSFER_STATUS=$content[primera_type]%}</td>
-       <td class="{%template,ColorSwitch%} primera_type_$content[raw_type] bottom right" align="center">{%pipe,fixEmptyContentToDashes=$content[primera_api_message]%}</td>
-       <td class="{%template,ColorSwitch%} primera_type_$content[raw_type] bottom" align="center">$content[primera_api_status]</td>
-</tr>
+<!-- @DEPRECATED //-->
index 4558fb26d2d8fed6895ed7381ee036d3c2e49219..26a01f3ee36016f12e9c2a2b33567a34f960f614 100644 (file)
@@ -1,10 +1,14 @@
-Mit dieser Erweiterung k&ouml;nnen Sie Ihren Mitgliedern eine Auszahlung
-ihrer Internet-W&auml;hrung <a href="http://www.primusportal.de/r/Quix0r"
- target="_blank">Primera</a> auf ihr Primera-Account &uuml;berweisen
-lassen. Sie als Primera-Anbieter brauchen dazu selbstverst&auml;ndlich
-ein Primera-Account. Mehr dazu auf <a href="http://www.primusportal.de/r/Quix0r"
- target="_blank">www.primusportal.de</a>. Wenn Sie m&ouml;chten, k&ouml;nnen Sie
-auch ganz zu Primera wechseln. Dazu geben Sie unter <a target="_blank"
- href="{OPEN_CONFIG}URL{CLOSE_CONFIG}/modules.php?module=admin&amp;what=config_other">Sonstige
-Einstellungen</a>, &quot;W&auml;hrung Ihres {OPEN_CONFIG}mt_word2{CLOSE_CONFIG}&quot;
-einfach das Wort <strong>Primera</strong> ein.
+<div class="para">
+       Mit dieser Erweiterung k&ouml;nnen Sie Ihren Mitgliedern eine Auszahlung
+       ihrer Internet-W&auml;hrung <a href="http://www.primusportal.de/r/Quix0r"
+        target="_blank" rel="external">Primera</a> auf ihr Primera-Account
+       &uuml;berweisen lassen. Sie als Primera-Anbieter brauchen dazu
+       selbstverst&auml;ndlich ein Primera-Account. Mehr dazu auf
+       <a target="_blank" rel="external"
+        href="http://www.primusportal.de/r/Quix0r">www.primusportal.de</a>. Wenn
+       Sie m&ouml;chten, k&ouml;nnen Sie auch ganz zu Primera wechseln. Dazu
+       geben Sie unter <a target="_blank" rel="external"
+        href="{OPEN_CONFIG}URL{CLOSE_CONFIG}/modules.php?module=admin&amp;what=config_other">Sonstige
+       Einstellungen</a>, &quot;W&auml;hrung Ihres
+       {OPEN_CONFIG}mt_word2{CLOSE_CONFIG}&quot; einfach das Wort <strong>Primera</strong> ein.
+</div>
index 0d254c574eb564f19cc336a56ab798574b545a3c..11f5d85d80b1ca4d16cf4c19e14af24e5ec2a60f 100644 (file)
@@ -1,21 +1 @@
-<div align="center">
-<table border="0" cellspacing="0" cellpadding="0" width="680" class="table dashed" align="center">
-       <tr>
-               <td colspan="4" align="center" class="table_header bottom">
-                       <strong>{--MEMBER_PRIMERA_LIST_PRIMERA--}</strong>
-               </td>
-       </tr>
-       <tr>
-               <td width="180" align="center" class="header_column bottom right"><strong>{--PRIMERA_TOTAL_PRIMERA--}</strong></td>
-               <td width="130" align="center" class="header_column bottom right"><strong>{--PRIMERA_ACCOUNT--}</strong></td>
-               <td width="150" align="center" class="header_column bottom right"><strong>{--PRIMERA_TIMESTAMP--}</strong></td>
-               <td width="120" align="center" class="header_column bottom"><strong>{--MEMBER_PRIMERA_STATUS--}</strong></td>
-       </tr>
-       $content[rows]
-       <tr>
-               <td colspan="4" class="table_footer" align="center">
-                       <a href="{%url=modules.php?module=login&amp;what=primera&amp;do=choose%}">{--MEMBER_PRIMERA_MODE_CHOOSE2--}</a>
-               </td>
-       </tr>
-</table>
-</div>
+<!-- @DEPRECATED //-->
index db70d7e4a04cdf71f0c6ae3b86ccbfd7b9cffc83..11f5d85d80b1ca4d16cf4c19e14af24e5ec2a60f 100644 (file)
@@ -1,6 +1 @@
-<tr>
-       <td align="center" class="{%template,ColorSwitch%} primera_type_$content[raw_type] bottom right">{%pipe,translateComma=$content[primera_amount]%} Primera</td>
-       <td align="center" class="{%template,ColorSwitch%} primera_type_$content[raw_type] bottom right">$content[primera_account]</td>
-       <td align="center" class="{%template,ColorSwitch%} primera_type_$content[raw_type] bottom right">$content[primera_timestamp]</td>
-       <td align="center" class="{%template,ColorSwitch%} primera_type_$content[raw_type] bottom">{%pipe,PRIMERA_TRANSFER_STATUS=$content[primera_type]%}</td>
-</tr>
+<!-- @DEPRECATED //-->
index d379b92629d8a8eaeafb0d4362bfb656e7b2c6e8..11f5d85d80b1ca4d16cf4c19e14af24e5ec2a60f 100644 (file)
@@ -1,41 +1 @@
-<div align="center">
-<form accept-charset="UTF-8" action="{%url=modules.php?module=login&amp;what=primera&amp;do=pay%}" method="post">
-<table border="0" cellspacing="0" cellpadding="0" width="440" class="table dashed">
-       <tr>
-               <td colspan="2" align="center" class="table_header bottom">
-                       <strong>{--MEMBER_PRIMERA_PAYOUT_TITLE--}</strong>
-               </td>
-       </tr>
-       <tr>
-               <td class="bottom" height="25" align="right">{--MEMBER_PRIMERA_PAYOUT_POINTS--}</td>
-               <td class="bottom"><strong>$content[points]</strong> Primera</td>
-       </tr>
-       <tr>
-               <td class="bottom" height="25" align="right">{--MEMBER_PRIMERA_PAYOUT_MIN_POINTS--}</td>
-               <td class="bottom"><strong>{%config,translateComma=primera_min_payout%}</strong> Primera</td>
-       </tr>
-       <tr>
-               <td height="35" align="right">{--MEMBER_PRIMERA_NICKNAME--}</td>
-               <td><input type="text" class="form_field" name="primera_nickname" size="10" maxlength="255" value="{%user,primera_nickname%}" /></td>
-       </tr>
-       <tr>
-               <td height="35" align="right">{--MEMBER_PRIMERA_PASSWORD--}</td>
-               <td><input type="password" class="form_field" name="primera_password" size="10" maxlength="255" /></td>
-       </tr>
-       <tr>
-               <td height="35" align="right">{--MEMBER_PRIMERA_AMOUNT--}</td>
-               <td><input type="text" class="form_field" name="amount" size="10" maxlength="255" /></td>
-       </tr>
-       <tr>
-               <td colspan="2" align="center" class="table_footer">
-                       <input type="reset" class="form_reset" value="{--CLEAR_FORM--}" />
-                       <input type="submit" class="form_submit" name="ok" value="{--MEMBER_PRIMERA_PAYOUT_SUBMIT--}" />
-               </td>
-       </tr>
-</table>
-</form>
-
-<div class="notice">
-       {--MEMBER_PRIMERA_PAYOUT_NOTE--}
-</div>
-</div>
+<!-- @DEPRECATED //-->