also prevent it in .htacces. You may want to add this to one of your files in /etc...
[mailer.git] / doubler.php
index 5d4c3ce0924416621b04c9b03805f5e65a03ffa2..c1b3b91a6ede2251280abda4083589d942a6fec9 100644 (file)
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Punkteverdoppler                                 *
  * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2016 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -45,8 +40,8 @@ $GLOBALS['__start_time'] = microtime(TRUE);
 $GLOBALS['__module']      = 'doubler';
 $GLOBALS['__output_mode'] = '0';
 
-// Load the required file(s)
-require('inc/config-global.php');
+// Initialize application
+require('inc/init.php');
 
 // Set content type
 setContentType('text/html');
@@ -76,7 +71,7 @@ if (isFormSent()) {
                }
 
                // Is the data valid?
-               if (!isUserDataValid()) {
+               if (!isValidUserData()) {
                        // Output message that the userid is not okay
                        displayMessage('{--DOUBLER_USERID_INVALID--}');
                } // END - if
@@ -88,7 +83,7 @@ if (isFormSent()) {
                $probe_points = ((postRequestElement('points') >= getDoublerMin()) && (postRequestElement('points') <= getDoublerMax()));
 
                // Check all together
-               if ((isUserDataValid()) && (getUserData('password') == generateHash(postRequestElement('password'), substr(getUserData('password'), 0, -40))) && (getUserData('status') == 'CONFIRMED') && ($probe_points)) {
+               if ((isValidUserData()) && (getUserData('password') == generateHash(postRequestElement('password'), substr(getUserData('password'), 0, -40))) && (getUserData('status') == 'CONFIRMED') && ($probe_points)) {
                        // Nickname resolved to a unique userid or direct userid entered by the member
                        $GLOBALS['local_doubler_userid'] = getUserData('userid');
 
@@ -177,9 +172,9 @@ if (getDoublerSendMode() == 'DIRECT') {
 } // END - if
 
 // Output header
-loadIncludeOnce('inc/header.php');
+loadPageHeader();
 
-if (isUserDataValid()) {
+if (isValidUserData()) {
        // Transfer userid/nickname to constant
        $content['refid'] = getUserData('userid');
 } else {
@@ -206,7 +201,7 @@ $content['payout_history'] = generateDoublerTable(0, 'Y', 'N', 'DESC');
 loadTemplate('doubler_index', FALSE, $content);
 
 // Output footer
-loadIncludeOnce('inc/footer.php');
+loadPageFooter();
 
 // [EOF]
 ?>