From 726f466ac13cdea0576b928068cdbe528dc45b3a Mon Sep 17 00:00:00 2001 From: james Date: Wed, 5 Jan 2005 16:23:11 +0000 Subject: [PATCH] add a province selector switch student registration to use province selector --- common.inc.php | 24 ++++++++++++++++++++++++ register_participants_students.php | 4 +++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/common.inc.php b/common.inc.php index c801f47..fcb6591 100644 --- a/common.inc.php +++ b/common.inc.php @@ -295,6 +295,30 @@ function emit_year_selector($name,$selected="",$min=0,$max=0) echo "\n"; } +function emit_province_selector($name,$selected="") +{ + $q=mysql_query("SELECT * FROM provinces ORDER BY province"); + if(mysql_num_rows($q)==1) + { + $r=mysql_fetch_object($q); + echo ""; + echo i18n($r->province); + } + else + { + echo "\n"; + } + +} function outputStatus($status) diff --git a/register_participants_students.php b/register_participants_students.php index fae1f55..5b52dac 100644 --- a/register_participants_students.php +++ b/register_participants_students.php @@ -219,7 +219,9 @@ else if($newstatus=="complete") echo "\n"; echo "\n"; echo " ".i18n("Address")."address\" />\n"; - echo " ".i18n("Province")."province\" />\n"; + echo " ".i18n("Province").""; + emit_province_selector("province[$x]",$studentinfo->province); + echo "\n"; echo "\n"; echo "\n"; echo " ".i18n("Postal Code")."postalcode\" />\n";