if (isDebugModeEnabled()) {
// In debug mode we want to display the mail instead of sending it away so we can debug this part
outputHtml('<pre>
-Headers : ' . encodeEntities(utf8_decode(trim($mailHeader))) . '
-To : ' . encodeEntities(utf8_decode($toEmail)) . '
-Subject : ' . encodeEntities(utf8_decode($subject)) . '
-Message : ' . encodeEntities(utf8_decode($message)) . '
+Headers : ' . htmlentities(utf8_decode(trim($mailHeader))) . '
+To : ' . htmlentities(utf8_decode($toEmail)) . '
+Subject : ' . htmlentities(utf8_decode($subject)) . '
+Message : ' . htmlentities(utf8_decode($message)) . '
</pre>');
// This is always fine
// Some security stuff...
if (!defined('__SECURITY')) {
die();
-}
+} // END - if
//
function handleSponsorRequest ($postData, $update=false, $messageArray=array(), $RET_STATUS=false) {
$UPDATE = false;
$skip = false;
$ALREADY = false;
- $ret = "unused";
+ $ret = 'unused';
// Skip these entries
$SKIPPED = array(
$DATA['values'][] = detectRemoteAddr();
}
+ // Search the entry
+ $key = array_search('force', $DATA['keys']);
+
+ // Remove force from both arrays
+ unset($DATA['keys'][$key]);
+ unset($DATA['values'][$key]);
+
// Implode all data into strings
$keyArray = implode('`, `' , $DATA['keys']);
$valueArray = str_repeat("%s', '", count($DATA['values']) - 1);
// Run SQL command
$result = SQL_QUERY_ESC($sql, $DATA['values'], __FUNCTION__, __LINE__);
} // END - if
-
- // Output message
- if (($update === true) && (isAdmin())) {
- loadTemplate('admin_settings_saved', false, $message);
- } // END - if
} else {
// Error found!
$message = getMessageFromIndexedArray('{--SPONSOR_DATA_NOT_SAVED--}', 'failed', $messageArray);
loadTemplate('admin_settings_saved', false, $message);
}
- // Shall we return the status?
- if ($RET_STATUS === true) return $ret;
+ // Always return the status
+ return $ret;
}
//
$ret = getMessage($constantName);
} else {
// Not found!
+ /* DEBUG: */ debug_report_bug(__FUNCTION__, __LINE__, sprintf("Unknown status %s detected.", $status));
logDebugMessage(__FUNCTION__, __LINE__, sprintf("Unknown status %s detected.", $status));
$ret = getMaskedMessage('ACCOUNT_STATUS_UNKNOWN_STATUS', $status);
}
+
+ // Return status
return $ret;
}
return $GLOBALS['index_home'];
}
+// "Getter" for one_day
+function getOneDay () {
+ // Do we have cache?
+ if (!isset($GLOBALS['one_day'])) {
+ // Determine it
+ $GLOBALS['one_day'] = getConfig('ONE_DAY');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS['one_day'];
+}
+
// Checks wether proxy configuration is used
function isProxyUsed () {
// Do we have cache?
<div align="center">
-<form accept-charset="utf-8" action="{%url=modules.php?module=admin&what=add_sponsor&force=1%}" method="post">
+<form accept-charset="utf-8" action="{%url=modules.php?module=admin&what=add_sponsor%}" method="post">
<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed">
<tr>
<td class="admin_title bottom" align="center">
<tr>
<td align="center" class="admin_footer">
$content[hidden]
+ <input type="hidden" name="force" value="1" />
<input type="submit" name="ok" class="admin_submit" value="{--ADD_SPONSOR--}" />
</td>
</tr>