if ($rc) { $err = "Invalid reset code. The code may have expired."; header("Location: {$GLOBALS['SITE_URL']}forgotpwd.php?userid=" . urlencode($u) . "&err=" . urlencode($err)); exit; } } if ($go) { $err = ''; if ($pwd !== $pwd2) { $err = "The passwords you entered don't match."; } else { if (!$pwd) { $err = "You forgot to enter a new password."; } else { // Reset the password list($rc, $e) = ff_setmemberinfo($u, false, false, $pwd); if ($rc) { $err = "{$rc} {$e}"; } } } if (!$err) { $err = "Success"; // Log the person in include_once "loginlogic.php"; list($rc, $err) = log_in($u, $sid); if (!$rc) { header("Location: {$GLOBALS['SITE_URL']}resetpwd.php?u=" . urlencode($u) . "&err=Success"); exit; } }
list($rc, $C_info) = ff_getprojectinfo($C); checkerr($rc, $C_info); if (get_FFC($C_info["bounty"]) != 28500) { checkerr(1, "Bounty on C: {$C_info['bounty']}"); } // Create a developer list($rc, $developer) = ff_createmember('', $secret, "Developer {$now}", "dev-{$now}@gignac.org"); checkerr($rc, $developer); // Get the current donation to the charity list($rc, $charities) = ff_getcharities(); checkerr($rc, $charities); $charity_ids = array_keys($charities); $prefcharity = $charity_ids[0]; $olddonation = $charities[$prefcharity]["current"]; // Set the developer's preferred charity checkerr(ff_setmemberinfo($developer, false, false, false, $prefcharity)); // Submit a solution to B list($rc, $sub_B1) = ff_submitcode($developer, array(array("pathname" => realpath("./test-payout.php"), "filename" => "test-payout.php", "description" => "")), "", $B); checkerr($rc, $sub_B1); // Now decrease the direct bounty on A checkerr(ff_setsponsorship($A, $projectlead, "10000FFC")); // Check that the bounties are what we expect list($rc, $A_info) = ff_getprojectinfo($A); checkerr($rc, $A_info); if (get_FFC($A_info["bounty"]) != 47000) { checkerr(1, "Bounty on A: {$A_info['bounty']}"); } list($rc, $B_info) = ff_getprojectinfo($B); checkerr($rc, $B_info); if (get_FFC($B_info["bounty"]) != 39400) { checkerr(1, "Bounty on B: {$B_info['bounty']}");
ff_deleteprojectdraft($_REQUEST["deldraft"], $username); header("Location: account.php?tab=drafts"); exit; } if (isset($_REQUEST["setprefs"])) { list($rc, $news) = al_getwatches($username, "news"); if ($rc) { print "{$rc} {$news}"; softexit(); } list($rc, $promos) = al_getwatches($username, "promos"); if ($rc) { print "{$rc} {$promos}"; softexit(); } $rc = ff_setmemberinfo($username, false, false, false, $_REQUEST["prefcharity"]); if ($rc[0]) { print "{$rc['0']} {$rc['1']}"; exit; header("Location: account.php?tab=prefs&err=1"); exit; } if (sizeof($news) > 0 != ("{$_REQUEST['news']}" === "1")) { if ($_REQUEST["news"]) { al_createwatch("news", $username); } else { al_destroywatch($news[0]["watchid"]); } } if (sizeof($promos) > 0 != ("{$_REQUEST['promos']}" === "1")) { if ($_REQUEST["promos"]) {