IPM 2018 Daily BMO Plowing Results - Pain Court - Sept. 18 to 22, 2018

Class 1 Group 1 -- HORSE & MULE PLOWING -- Jointer Plows -- 115 points to qualify
Numbers indicate Position -- FINAL = Final Standings

#!/usr/bin/perl # print "HTTP/1.0 200 Okn"; print "Content-type: text/htmlnn"; #(c)FLATTEXT Database Scripts 1997-2002 use CGI; $query = new CGI; #Script Description #Unique script ID: fxed-9y45 #Created on: 9/4/2002 #Last edited on: 9/4/2002 #Script class: A #STEP A================================ #SCRIPT USAGE #This is FLATTEXT 7.0, released March 1, 2002 #COPYRIGHT NOTICE #FLATTEXT License for Regular Scripts #All FLATTEXT scripts are copyright (c) FLATTEXT Database #Scripts, Inc. 1997-2002. Legally, you must retain the copyright #line inside the script. #A1. The following lines get and process data passed through the URL, do not modify $stringpassed=$ENV{'QUERY_STRING'}; $stringpassed=~s/+/ /g; #STEP B================================ #You MUST modify each of the variables in this this section $Group="1-1"; #B1. PATH to your data file, not the URL of your data file! $data="images/data/daily.tab"; #B2. The URL of this script file in your cgi-bin directory. $thisurl="http://www.plowingmatch.org/plowing/daily.php"; #B3. PATH to the display page. $openinghtml="images/daily.txt"; # $urltonav="http://www.plowingmatch.org/images"; #STEP C================================ $maximumpage=1000; $maximum=1000; #STEP D================================ #You should not need to modify this section at all if (-e "$openinghtml"){ $problem="Can't open template file. Make sure you are referencing the file and not just a directory."; open(OPENING, "$openinghtml") || &security; @wholefile=; close(OPENING); $fulltemplate=join("n",@wholefile); ($templatestart,$templateend)=split(/+++/,$fulltemplate);} else{ $templatestart="$templatetitle"; $templateend="";} $delimiter="t"; #STEP E================================ $Class=$query->param('Class'); $Classwork=lc($Class); $Classwork=~tr/[a-zA-Z0-9 -.,?]/ /cd; if ($Classwork eq "select"){ $Classwork=""; $Class="";} $Classpass="$Class"; $PlowPerson=$query->param('PlowPerson'); $PlowPersonwork=lc($PlowPerson); #E1b. The line below chops characters that cause problems in Perl word searches $PlowPersonwork=~tr/[a-zA-Z0-9 -.,?]/ /cd; if ($PlowPersonwork eq "select"){ $PlowPersonwork=""; $PlowPerson="";} $PlowPersonpass="$PlowPerson"; $County=$query->param('County'); $Countywork=lc($County); $Countywork=~tr/[a-zA-Z0-9 -.,?]/ /cd; if ($Countywork eq "select"){ $Countywork=""; $County="";} $Countypass="$County"; $startitem=$query->param('startitem'); $enditem=$startitem+$maximumpage; ($Classone, $Classtwo, $Classthree, $Classfour, $Classfive, $Classsix, $Classseven)=split(/ /, $Classwork); ($PlowPersonone, $PlowPersontwo, $PlowPersonthree, $PlowPersonfour, $PlowPersonfive, $PlowPersonsix, $PlowPersonseven)=split(/ /, $PlowPersonwork); ($Countyone, $Countytwo, $Countythree, $Countyfour, $Countyfive, $Countysix, $Countyseven)=split(/ /, $Countywork); #STEP G================================ #Do not modify this section #G1. Open datafile and write contents to an array, if can't open report the problem at the security subroutine $problem="Update in progress."; open (FILE, "$data") || &security; @all=; close (FILE); #G2. The line below is required, do not modify #print "Content-type: text/htmlnn"; #G3. Display HTML Header print "$templatestartn"; #G5. Show words user searched for #STEP H================================ #H1. Read each line of the data file, compare with search words foreach $line (@all){ $line=~s/n//g; $loopsaround++; $checkleng=length($line); if ($checkleng<2){next}; $linetemp1=lc($line); ($Class,$PlowPerson,$County,$TUES,$WED,$THURS,$FRI,$FINISH,$skipthisfield)=split (/$delimiter/,$linetemp1); #H9. This line specifies the fields to sort results by #See help databases for patches to allow various kinds of sorts $line="$delimiter$loopsaround$delimiter$line"; #H9.5 This line removes stray leading spaces before sorting your results $line=~s/^ +//; $increcount=0; #H12. Look for matches in field named Class if (($Class =~/b$Classone/ && $Class =~/b$Classtwo/ && $Class =~/b$Classthree/ && $Class =~/b$Classfour/ && $Class =~/b$Classfive/ && $Class=~/b$Classsix/ && $Class=~/b$Classseven/) || !$Classwork) { $increcount++;} #H12. Look for matches in field named PlowPerson if (($PlowPerson =~/b$PlowPersonone/ && $PlowPerson =~/b$PlowPersontwo/ && $PlowPerson =~/b$PlowPersonthree/ && $PlowPerson =~/b$PlowPersonfour/ && $PlowPerson =~/b$PlowPersonfive/ && $PlowPerson=~/b$PlowPersonsix/ && $PlowPerson=~/b$PlowPersonseven/) || !$PlowPersonwork) { $increcount++;} #H12. Look for matches in field named County if (($County =~/b$Countyone/ && $County =~/b$Countytwo/ && $County =~/b$Countythree/ && $County =~/b$Countyfour/ && $County =~/b$Countyfive/ && $County=~/b$Countysix/ && $County=~/b$Countyseven/) || !$Countywork) { $increcount++;} if ($increcount==3){ push (@keepers,$line);}} #STEP J================================ #J1. Sort matches stored in array. #@keepers=sort(@keepers); #J2. Get and display number of matches found $length1=@keepers; #J3. If the number of matches is less than enditem, adjust if ($length1<$enditem){ $enditem=$length1; $displaystat="Y";} #J4. The first field about to display $disstart=$startitem+1; #J5. Show user total number of matches found #if ($length1){ #print "$length1 Matches Found (displaying $disstart to $enditem)

n"; #} else { #print "Your search found zero records, please try again.

n";} #STEP K================================ #K1. Do some HTML formatting before showing results #K3 Open table for results $totalmatches=@keepers; if ($totalmatches>0){ print "n"; #Display headers of table print "n"; print "n"; print "n"; print "n"; print "n"; print "n"; print "n";} print "n"; #K4. Keep track of results processed on this page foreach $line (@keepers){ #K5. Delete stray hard returns $line=~s/n//g; #K6. Keep track of records displayed $countline1++; #K7. Decide whether or not this record goes on this page if ($countline1>$startitem && $countline1<=$enditem){ #K8. Open each line of sorted array for displaying ($Finish,$loopsaround,$Class,$PlowPerson,$County,$TUES,$WED,$THURS,$FRI,$FINISH,$skipthisfield)=split (/$delimiter/,$line); #print "n"; #------------- Junior Plowing #if (($Class eq "8-1") || ($Class eq "8-2") || ($Class eq "8-3") || ($Class eq "8-4")){ #{print " n";} #-------Regular Plowing #} else { if($Class eq $Group){ if (!Class){ $Class=" "; print "n";} else{ print "n";} if (!$PlowPerson){ $PlowPerson=" "; print "n";} else{ print "n";} if ($TUES<1){$TUES="-";} #if ($TUES eq ""){$TUES="-";} #if ($TUES){ print "n"; if ($WED<1){$WED="-";} #if ($WED eq ""){$WED="-";} print "n"; if ($THURS<1){$THURS="-";} #if ($THURS eq ""){$THURS="-";} print "n"; if ($FRI<1){$FRI="-";} print "n"; if ($FINISH<1){$FINISH="-";} if ($FINISH){ print "n";} else {print "n";} } #>>>>> Deactivate the following Line #print "n"; print "n"; #} #K18. Check password before showing edit and delete snippets #STEP L================================ #L1. If total displayed equals maximum you set, then exit if ($countline1 == $maximum && $maximum){ $problem2="Your search was terminated at $maximum records, please be more specific in your search"; last;} #L2. If script just got to last match then exit program if ($length1 == $countline1){ last;} #L3. If script is at the end of a page then show NEXT button if ($countline1 == $enditem && $displaystat ne "Y" && $maximum>$countline1){ $stopit="Y"; last; } }} print "
$Class  $Class$PlowPerson  $PlowPerson - $County$TUES$WED$THURS$FRI$FINISH$FINISH-
n"; #L4. Display NEXT MATCHES button #if ($stopit eq "Y"){ #print "

n"; #L5. Pass hidden variables so script will know how to display next page #print " n"; #print " n"; #print " n"; #print " n"; #print " n"; #print "
n"; #} #L6. Show problems print "

$problem2n"; #L7. Show credits. If registered, you can delete entire Step L7 #print "

Search Results by FLATTEXT
n"; #L8. If opening.htm was found, show its closing html codes print "$templateendn"; exit; #STEP M================================ sub security{ #M1. This is the subroutine that reports all problems #print "Content-type: text/htmlnn"; print "$templatestartn"; print "
Update in progress

n"; #print "Please correct the following error:

n"; print "$templateendn"; exit; } #This is the last line of the script

2018 Plowing Point Summary

� 2015, ONTARIO PLOWMEN'S ASSOCIATION, International Plowing Match and Rural Expo
188 Nicklin Road, Guelph � Ontario � N1H 7L5 � Canada, Telephone: (519) 767-2928 � (800) 661-7569   FAX: (519) 767-2101
Email: admin@plowingmatch.org  � web: http://www.plowingmatch.org
Web site design by JP Computer Services