);
// Check if sponsor already exists
- foreach ($POST as $k=>$v)
+ foreach ($POST as $k => $v)
{
if (!(array_search($k, $SKIPPED) > -1))
{
if ($SAVE)
{
// Default is no force even when a guest want to abuse this force switch
- if ((empty($POST['force'])) || (!IS_ADMIN())) $POST['force'] = "0";
+ if ((empty($POST['force'])) || (!IS_ADMIN())) $POST['force'] = 0;
// SQL and message string is empty by default
$SQL = ""; $MSG = "";
{
// Update his data
$SQL = "UPDATE "._MYSQL_PREFIX."_sponsor_data SET ";
- foreach ($DATA['keys'] as $k=>$v)
+ foreach ($DATA['keys'] as $k => $v)
{
$SQL .= $v."='%s', ";
}
{
// Add all data as hidden data
$OUT = "";
- foreach ($POST as $k=>$v)
+ foreach ($POST as $k => $v)
{
// Do not add 'force' !
if ($k != "force")
global $HTTP_POST_VARS, $_GET, $CONFIG;
$OUT = "";
$FILE = sprintf("%sinc/modules/sponsor/%s.php", PATH, $what);
- if ((file_exists($FILE)) && (is_readable($FILE))) {
+ if (FILE_READABLE($FILE)) {
// Every sponsor action will output nothing directly. It will be written into $OUT!
require_once($FILE);
} else {
$MSG = SPONSOR_ACCOUNT_DATA_NOT_SAVED;
// Check for submitted passwords
- if ((!empty($HTTP_POST_VARS['pass1'])) && (!empty($HTTP_POST_VARS['pass2'])))
+ if ((!empty($_POST['pass1'])) && (!empty($_POST['pass2'])))
{
// Are both passwords the same?
- if ($HTTP_POST_VARS['pass1'] == $HTTP_POST_VARS['pass2'])
+ if ($_POST['pass1'] == $_POST['pass2'])
{
// Okay, then set password and remove pass1 and pass2
- $HTTP_POST_VARS['password'] = md5($HTTP_POST_VARS['pass1']);
+ $_POST['password'] = md5($_POST['pass1']);
}
}
// Prepare SQL string
$SQL = "UPDATE "._MYSQL_PREFIX."_sponsor_data SET";
- foreach ($POST as $key=>$value)
+ foreach ($POST as $key => $value)
{
// Mmmmm, too less security here???
$SQL .= " ".strip_tags($key)."='%s',";