]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-earnings.php
Extension ext-earning continued:
[mailer.git] / inc / modules / member / what-earnings.php
index 3842cd7709a5bf7e8320c144ea74f8f581e82d67..f551ef47b7591c74e7b59193e56a1fa6505a87ab 100644 (file)
@@ -1,111 +1,3 @@
 <?php
-/************************************************************************
- * Mailer v0.2.1-FINAL                                Start: 07/31/2011 *
- * ===================                          Last change: 07/31/2011 *
- *                                                                      *
- * -------------------------------------------------------------------- *
- * File              : what-earnings.php                                *
- * -------------------------------------------------------------------- *
- * Short description : Extra earnings for the user                      *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung  : Zusatzverdienst fuer die Mitglieder              *
- * -------------------------------------------------------------------- *
- * $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();
-} elseif (!isMember()) {
-       redirectToIndexMemberOnlyModule();
-}
-
-// Add description as navigation point
-addYouAreHereLink('member', __FILE__);
-
-// Is the form sent?
-if (isFormSent()) {
-       // Then handle the extra earning request
-       doMemberEarning(
-               postRequestElement('earning_id'),
-               postRequestElement('earning_daily_amount'),
-               postRequestElement('earning_active')
-       );
-} // END - if
-
-// Check for all earnings
-$result = SQL_QUERY_ESC('SELECT
-       d.`earning_id`,
-       d.`earning_group`,
-       d.`earning_name`,
-       u.`earning_active`,
-       UNIX_TIMESTAMP(u.`earning_added`) AS `earning_added`,
-       UNIX_TIMESTAMP(u.`earning_cancelled`) AS `earning_cancelled`,
-       u.`earning_daily_amount`,
-       u.`earning_points`
-FROM
-       `{?_MYSQL_PREFIX?}_earning_data` AS d
-LEFT JOIN
-       `{?_MYSQL_PREFIX?}_user_earning` AS u
-ON
-       d.`earning_id`=u.`earning_id`
-WHERE
-       u.`earning_userid` IS NULL OR
-       u.`earning_userid`=%s
-ORDER BY
-       d.`earning_sorting` ASC',
-       array(
-               getMemberId()
-       ), __FILE__, __LINE__);
-
-// Do we have entries?
-if (SQL_NUMROWS($result) > 0) {
-       // Init output
-       $OUT = '';
-
-       // List all entries
-       while ($content = SQL_FETCHARRAY($result)) {
-               // Do we have user_earning data available?
-               if (is_null($content['earning_active'])) {
-                       // Load row template "open subscription"
-                       $OUT .= loadTemplate('member_earning_' . strtolower($content['earning_group']) . '_form_row', true, $content);
-               } else {
-                       // Load row template "already subscribed"
-                       $OUT .= loadTemplate('member_earning_' . strtolower($content['earning_group']) . '_row', true, $content);
-               }
-       } // END - while
-
-       // Load main template
-       loadTemplate('member_earning', false, $OUT);
-} else {
-       // Display message
-       displayMessage('{--MEMBER_EARNINGS_404--}');
-}
-
-// Free result
-SQL_FREERESULT($result);
-
-// [EOF]
+// @DEPRECATED
 ?>