|
The "Student of the Month" is awarded to one student for each martial arts school by the school owner or head instructor. The school name and student name will be displayed for that month.
Choose a State/Province/Country \n");
$result = msql("registry","SELECT DISTINCT regionName, regionID
FROM region
ORDER BY regionName");
$num_rows = msql_numrows($result);
print ("
\n
");
} else { /* input regionID */
if (!$schoolCity) {
$result =0;
print("Choose a city \n");
$regionResult = msql("registry", "SELECT regionName FROM region WHERE regionID = $regionID");
$regionName = msql_result($regionResult,0,regionName);
$result = msql("registry","SELECT DISTINCT schoolCity
FROM school
WHERE regionID=$regionID
ORDER BY schoolCity");
$num_rows = msql_numrows($result);
if ($num_rows) {
print (" \n");
$row=0;
while ($row < $num_rows) {
$sCity = msql_result($result,$row,schoolCity);
$ssCity = strtr($sCity," ","_");
print ("
$sCity, $regionName | \n");
$row++;
}
print (" \n");
} else {
print ("Sorry, No schools are registered in $regionName.
If you are a school owner or head instructor, you can list your school and nominate a student for your school.
Just go to Nominate a Student .
");
}
} else { /* input regionID, regionName, schoolCity (with _) */
if (!$schoolKey) {
print ("Choose a school \n");
$regionName = $IEregionName; // Sent as IEregisterName to get around IE bug: ® to register TM
$sCity = strtr($schoolCity,"_"," ");
$query = "SELECT DISTINCT schoolKey, shortName
FROM school
WHERE schoolCity LIKE '$sCity' AND regionID=$regionID
ORDER BY shortName, schoolKey";
$result = msql("registry",$query);
$num_rows = msql_numrows($result);
print (" \n");
$row=0;
while ($row < $num_rows) {
$schoolKey = msql_result($result,$row,schoolKey);
$shortName = msql_result($result,$row,shortName);
$ushortName = strtr($shortName," ","_");
if ($shortName != $previousShortName) {
print ("
$shortName | \n$sCity, $regionName | \n");
}
$row++;
$previousShortName = $shortName;
}
print (" ");
} else { /* input regionID, regionName, schoolCity (with _), schoolKey */
$shortName = strtr($ushortName,"_"," ");
if ($shortName == "") {
$query = "SELECT shortName
FROM school
WHERE schoolKey = $schoolKey";
$shortNameresult = msql("registry",$query);
echo msql_error();
$shortName = msql_result($shortNameresult,shortName);
}
print ("Student of the Month for $shortName\n");
$query = "SELECT *
FROM school_som
WHERE schoolKey = $schoolKey
";
$result = msql("registry",$query);
echo msql_error();
$num_rows = msql_numrows($result);
if ($num_rows) {
$num_rows--;
$student = stripslashes(msql_result($result,$num_rows,student));
$image = msql_result($result,$num_rows,image);
$entryDate = msql_result($result,$num_rows,entryDate);
$comment = stripslashes(msql_result($result,$num_rows,comment));
$field4 = msql_result($result,$num_rows,field4);
$field5 = msql_result($result,$num_rows,field5);
print ("
$student |
");
if ($image != "") { print (" ");}
print ("
Comment: $comment |
");
} ELSE {
print ("Sorry, no student has been nominated for $shortName.
If you are a school owner or head instructor, you can nominate a student for your school.
Just go to Nominate a Student .
");
}
}
}
}
} /* End Search Type */
?>
Search for a Martial Artist by NameEnter a Name
");
} else {
print ("List Search Results for $searchName ...");
$ssearchName = addslashes($searchName);
$searchResult = msql("registry","SELECT lastName, firstName, memberKey, emailAddress
FROM member
WHERE lastName CLIKE '$ssearchName'
OR firstName CLIKE '$ssearchName'
ORDER BY lastName");
$num_rows = msql_numrows($searchResult);
if ($num_rows) {
print ("\n");
$row=0;
while ($row < $num_rows) {
$memberKey = msql_result($searchResult,$row,memberKey);
$lastName = msql_result($searchResult,$row,lastName);
$firstName = msql_result($searchResult,$row,firstName);
if ($status == 2) {
$emailAddress = "mailto:".msql_result($searchResult,$row,emailAddress);
}
else {
$emailAddress = "http://www.tmanglobal.com/maunited/Log-in/Lost_Password/Email/Join/join.html";
}
print ("
$lastName, $firstName | \n
send e-mail | \n");
$row++;
}
print (" \n");
} else {
print ("No Entries found.\n");
}
}
}
print (" ");
?>
|