* $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 *
// Is the data valid?
if (!isUserDataValid()) {
// Output message that the userid is not okay
- loadTemplate('admin_settings_saved', false, '{--DOUBLER_USERID_INVALID--}');
+ displayMessage('{--DOUBLER_USERID_INVALID--}');
} // END - if
// Remove any dots and unwanted chars from the points
// So let's continue with probing his points amount
if (($points - getConfig('doubler_left') - postRequestParameter('points') * getConfig('doubler_charge') / 100) >= 0) {
// Enough points are left so let's continue with the doubling process
- // Create doubling "account" width *DOUBLED* points
- SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_doubler` (`userid`, `refid`, `points`, `remote_ip`, `timemark`, `completed`, `is_ref`) VALUES ('%s','%s','%s','".detectRemoteAddr()."', UNIX_TIMESTAMP(), 'N','N')",
+ // Create doubling "account" with *DOUBLED* points
+ SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_doubler` (`userid`, `refid`, `points`, `remote_ip`, `timemark`, `completed`, `is_ref`) VALUES (%s,%s,%s,'%s', UNIX_TIMESTAMP(), 'N','N')",
array(
getUserData('userid'),
- makeDatabaseUserId(determineReferalId()),
- bigintval(postRequestParameter('points') * 2)
+ makeZeroToNull(determineReferalId()),
+ bigintval(postRequestParameter('points') * 2),
+ detectRemoteAddr()
), __FILE__, __LINE__);
// Subtract entered points
// Add second line for the referal but only when userid != refid
if ((isValidUserId(determineReferalId())) && (determineReferalId() != getUserData('userid'))) {
// Okay add a refid line and apply refid percents
- SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_doubler` (`userid`, `refid`, `points`, `remote_ip`, `timemark`, `completed`, `is_ref`) VALUES ('%s',0,'%s','".detectRemoteAddr()."',UNIX_TIMESTAMP(),'N','Y')",
+ SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_doubler` (`userid`, `refid`, `points`, `remote_ip`, `timemark`, `completed`, `is_ref`) VALUES (%s,0,%s,'%s',UNIX_TIMESTAMP(),'N','Y')",
array(
- makeDatabaseUserId(determineReferalId()),
- bigintval(postRequestParameter('points') * 2 * getConfig('doubler_ref') / 100)
+ makeZeroToNull(determineReferalId()),
+ (postRequestParameter('points') * 2 * getConfig('doubler_ref') / 100),
+ detectRemoteAddr()
), __FILE__, __LINE__);
// And that's why we don't want to you more than one referal level of doubler-points. ^^^
} // END - if (isFormSet())
// Shall I check for points immediately?
-if (getConfig('doubler_send_mode') == 'DIRECT') loadInclude('inc/mails/doubler_mails.php');
+if (getConfig('doubler_send_mode') == 'DIRECT') {
+ loadInclude('inc/mails/doubler_mails.php');
+} // END - if
// Output header
loadIncludeOnce('inc/header.php');