我们的网站上有一个系统,您可以在其中拥有多个帐户并在每个帐户上赚取积分。您可以在我发现错误的此网页上的帐户之间转移的那些积分。基本上,如果我有一定的账户组合,即第一和第二,它不会让我转账,它只会说“请填写一个数字。”。如果我有第一个和第三个或所有三个,它工作正常。我已经浏览了大约两个小时,但找不到什么不起作用......任何帮助都将不胜感激:D
<?php if($a == "exchange")
{
$GetUserInfo = mysql_query("SELECT * FROM members WHERE id = '$userid'") or die(mysql_error());
$GetUserInfo = mysql_fetch_object($GetUserInfo);
$cols = 1; //determines colspan
$status = 1;
$GetMultipleInfo = mysql_query("SELECT * FROM members WHERE id = '".$GetUserInfo->mult_uid."'") or die(mysql_error());
if(mysql_num_rows($GetMultipleInfo) != 0)
{
++$cols;
++$status;
}
$GetMultipleInfo = mysql_fetch_object($GetMultipleInfo);
$GetAdMultipleInfo = mysql_query("SELECT * FROM members WHERE id = '".$GetUserInfo->mult_admin."'") or die(mysql_error());
if(mysql_num_rows($GetAdMultipleInfo) != 0)
{
++$cols;
$status = ($status == 2 ? 4 : 3);
}
$GetAdMultipleInfo = mysql_fetch_object($GetAdMultipleInfo);
// Sparks Transfer
if (isset($_POST['spartrans']))
{
$order = $_POST['sparrecipients'];
if ($order == 'first')
{
$tpoints2 = $_POST['tpoints2'];
$tpoints3 = $_POST['tpoints3'];
$tpoints = $tpoints2 + $tpoints3;
if ($status == 2)
if ((!is_numeric($tpoints1)) || (!is_numeric($tpoints2)) || empty($tpoints1) || empty($tpoints2))
message("Please fill in with a number.","Enchanted Hogwarts","$PHP_SELF?a=exchange");
elseif ($status == 3)
if ((!is_numeric($tpoints1)) || (!is_numeric($tpoints3)) || empty($tpoints1) || empty($tpoints3))
message("Please fill in with a number.","Enchanted Hogwarts","$PHP_SELF?a=exchange");
elseif ($status == 4)
if ((!is_numeric($tpoints1)) || (!is_numeric($tpoints2)) || (!is_numeric($tpoints3)) || empty($tpoints1) || empty($tpoints2) || empty($tpoints3))
message("Please fill in with a number.","Enchanted Hogwarts","$PHP_SELF?a=exchange");
if ($tpoints2 > $GetMultipleInfo->tpoints)
message("" . getName($GetMultipleInfo->id) . " does not have enough sparks.","Enchanted Hogwarts","$PHP_SELF?a=exchange");
if ($tpoints3 > $GetAdMultipleInfo->tpoints)
message("" . getName($GetAdMultipleInfo->id) . " does not have enough sparks.","Enchanted Hogwarts","$PHP_SELF?a=exchange");
if ($GetUserInfo->mult_uid != 0)
mysql_query("UPDATE members SET tpoints = GREATEST(tpoints - $tpoints2,0) WHERE id = '".$GetMultipleInfo->id."'") or die(mysql_error());
if ($GetUserInfo->mult_admin != 0)
mysql_query("UPDATE members SET tpoints = GREATEST(tpoints - $tpoints3,0) WHERE id = '".$GetAdMultipleInfo->id."'") or die(mysql_error());
mysql_query("UPDATE members SET tpoints = GREATEST(tpoints + $tpoints,0) WHERE id = '$userid'") or die(mysql_error());
message("Successfully transferred $tpoints Sparks to ".getName($userid).".","Enchanted Hogwarts","$PHP_SELF?a=exchange");
}
}
}
?>