"; roll($currentfairyear, $newfairyear, "fundraising", array("type","name","description","system","goal")); echo i18n("Rolling sponsorship levels")."
"; roll($currentfairyear, $newfairyear, "sponsorships_levels", array("level","min","max","description")); echo i18n("Rolling sponsorships")."
"; roll($currentfairyear, $newfairyear, "sponsorships", array("sponsors_id","fundraising_type","value")); //no need to roll status or probability, because we're about to reset them.. mysql_query("UPDATE sponsorships SET status='pending', probability=25 WHERE year='$newfairyear'"); $q=mysql_query("SELECT * FROM sponsorships WHERE year='$newfairyear'"); while($r=mysql_fetch_object($q)) { mysql_query("INSERT INTO sponsors_logs (sponsors_id,dt,users_id,log) VALUES ('$r->sponsors_id',NOW(),'{$_SESSION['auth_user_id']}','Fair year rollover - reset status=pending, probability=25\%')"); } ?>