X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fguest%2Fwhat-sponsor_reg.php;h=5242b160232c7aede23cb48017dfcb665e252c12;hb=866c5a897dc3f53d16edbebfc5d8736930e5a41d;hp=75af8b376fd92ee24672faab9576be890db7739e;hpb=f55a18dbd4f2312a8812fb3feb3296b350ba269b;p=mailer.git diff --git a/inc/modules/guest/what-sponsor_reg.php b/inc/modules/guest/what-sponsor_reg.php index 75af8b376f..5242b16023 100644 --- a/inc/modules/guest/what-sponsor_reg.php +++ b/inc/modules/guest/what-sponsor_reg.php @@ -14,11 +14,9 @@ * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009, 2010 by Mailer Developer Team * + * 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 * @@ -43,10 +41,10 @@ if (!defined('__SECURITY')) { } // END - if // Add description as navigation point -addMenuDescription('guest', __FILE__); +addYouAreHereLink('guest', __FILE__); if ((!isExtensionActive('sponsor'))) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('sponsor')); + displayMessage('{%pipe,generateExtensionInactiveNotInstalledMessage=sponsor%}'); return; } // END - if @@ -184,7 +182,7 @@ if (isFormSent()) { $formErrors[] = '{--SPONSOR_PASSWORD2_EMPTY--}'; } } - } elseif (strlen(postRequestParameter('pass1')) < getConfig('pass_len')) { + } elseif (strlen(postRequestParameter('pass1')) < getPassLen()) { // Password is to short! $formErrors[] = '{--SPONSOR_PASSWORD_TOO_SHORT--}'; } @@ -208,7 +206,7 @@ if ((isFormSent()) && (count($formErrors) == 0)) { // Calulate points $result = SQL_QUERY_ESC("SELECT - (`pay_rate` * `pay_min_count`) AS points, `pay_min_count` AS pay, `pay_currency` AS curr + (`pay_rate` * `pay_min_count`) AS `points`, `pay_min_count`, `pay_currency` FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` WHERE @@ -223,14 +221,14 @@ LIMIT 1", // Add points to array postRequestParameter('points_amount', $points); postRequestParameter('points_used' , '0.00000'); - postRequestParameter('last_pay' , $pay); - postRequestParameter('last_curr' , $curr); + postRequestParameter('last_payment' , $pay); + postRequestParameter('last_currency', $curr); // Register sponsor but never ever update here! $message = doProcessSponsorFormRequest($messageArray); // Display message - loadTemplate('admin_settings_saved', false, $message); + displayMessage($message); } else { // Check for payment types $result = SQL_QUERY('SELECT @@ -262,17 +260,9 @@ ORDER BY if (count($formErrors) > 0) { // Some found... :-( foreach (array('company','position','tax_ident','surname','family','street_nr1','street_nr2','country','zip','city','phone','fax','cell','email','url') as $entry) { - $content[$entry] = secureString(postRequestParameter($entry)); + $content[$entry] = postRequestParameter($entry); } // END - foreach - // Init gender - foreach (array('m', 'f', 'c') as $gender) { - $content['gender_' . $gender] = ''; - } // END - foreach - - // Check for gender selection - $content['gender_' . strtolower(postRequestParameter('gender'))] = ' selected="selected"'; - // Init receive selection $content['receive_warnings_y'] = ''; $content['receive_warnings_n'] = ''; @@ -283,7 +273,7 @@ ORDER BY // Errors found? if (count($formErrors) > 0) { - $OUT = loadTemplate('admin_settings_saved', true, '{--SPONSOR_REGISTER_SOMETHING_MISSING--}'); + $OUT = displayMessage('{--SPONSOR_REGISTER_SOMETHING_MISSING--}', true); $OUT .= '
    '; foreach ($formErrors as $error) { $OUT .= '
  1. ' . $error . '
  2. '; @@ -295,12 +285,12 @@ ORDER BY $content['form_errors'] = $OUT; // @TODO Maybe a default referal id? - $content['refid'] = 0; + $content['refid'] = 0; // Is the referal id valid? if ((isPostRequestParameterSet('refid')) && (isValidUserId(postRequestParameter('refid')))) { // Transfer referal id - $content['refid'] = bigintval(postRequestParameter('refid')); + $content['refid'] = bigintval(postRequestParameter('refid')); } // END - if } // END - if @@ -308,7 +298,7 @@ ORDER BY loadTemplate('guest_sponsor_reg', false, $content); } else { // Nothing added so far - loadTemplate('admin_settings_saved', false, '{--SPONSOR_PAYMENT_LIST_IS_EMPTY--}'); + displayMessage('{--SPONSOR_PAYMENT_LIST_IS_EMPTY--}'); } // Free memory