- add volutneer position rollover code

This commit is contained in:
dave 2009-01-21 08:24:45 +00:00
parent c2309c0174
commit 65e5bfc0fa

View File

@ -315,6 +315,24 @@
echo "<br />";
echo "<br />";
//volunteer positions
$q=mysql_query("SELECT * FROM volunteer_positions WHERE year='$currentfairyear'");
echo mysql_error();
while($r=mysql_fetch_object($q))
mysql_query("INSERT INTO volunteer_positions(`year`,`name`,`desc`,`meet_place`,`start`,`end`) VALUES (
'$newfairyear',
'".mysql_escape_string($r->name)."',
'".mysql_escape_string($r->desc)."',
'".mysql_escape_string($r->meet_place)."',
'".mysql_escape_string($r->start)."',
'".mysql_escape_string($r->end)."')");
echo "<br />";
echo "<br />";
mysql_query("UPDATE config SET val='$newfairyear' WHERE var='FAIRYEAR' AND year=0");
echo happy(i18n("Fair year has been rolled over from %1 to %2",array($currentfairyear,$newfairyear)));
send_footer();