#!/usr/bin/perl -w # message.pl # output a message of several lines, # each with specified font size and color # used to put rotating inspirational messages on the BRBC homepage # note: these messages are designed to fit in a width of 400 pixels # author: gregory c. wilcox # date: 3/23/2003 use warnings; use strict; use CGI::Carp qw(fatalsToBrowser); # colors from "RGB Color Values" at # http://www.htmlhelp.com/cgi-bin/color.cgi my $blue = "#00008B"; my $green = "#009900"; my $red = "#FF0000"; my $gold = "#FFD700"; my $yellow = "#FFFF00"; my $orange = "#FF8C00"; my $purple = "#800080"; my $black = "#000000"; # my $violet = "#FF33FF"; # equal-time sexism my $gender = int(rand(2)); my $Subject = $gender ? "She" : "He"; my $Object = $gender ? "He" : "She"; my $subject = $gender ? "she" : "he"; my $SUBJECT = $gender ? "SHE" : "HE"; my $object = $gender ? "her" : "him"; my $possessive = $gender ? "her" : "his"; # vehicles my $lexus = 'Lexus'; my $skidoo = 'Ski-Doo'; my $harley = 'Harley'; my $segway = 'Segway'; my $bicycle = 'BIKE'; # stores my $belk = 'Belk'; my $dillards = 'Dillard\'s'; my $jcpenney = 'JCPenney'; my $sears = 'Sears'; my $proffitts = 'Proffitt\'s'; # people my $einstein = 'Einstein'; my $lance = 'Lance Armstrong'; # companies my $cadbury = 'Cadbury'; # places my $zoo = 'ZOO'; # organizations my $audubon = 'Audubon'; my $wnca = 'WNCA'; # dorky first names # in alphabetical order my @names = ("Adrian", "Alistair", "Bernhard", "Buford", "Byron", "Cecil", "Clive", "Dudley", "Earl", "Elmer", "Gordon", "Harvey", "Henry", "Herbert", "Homer", "Howard", "Hugh", "Jethro", "Julian", "Lamont", "Leroy", "Leslie", "Lester", "Macon", "Malcolm", "Maurice", "Nelson", "Nigel", "Oliver", "Rupert", "Sidney", "Theodore", "Trevor", "Wendell"); my $namenum = int(rand(@names)); my $name = $names[$namenum]; # Fletcher Flyer my $flyer = 'Fletcher Flyer'; my $FLYER = 'FLETCHER FLYER'; my $clickflyer = 'Click here'; my $registerf = 'register'; my $Registerf = 'Register'; my $Registerfnow = 'Register now'; my $signup_flyer = 'sign up'; my $signedup_flyer = 'signed up'; # Hilly Hellacious Hundred my $hilly = 'Hilly Hellacious Hundred'; my $HILLY = 'HILLY HELLACIOUS HUNDRED'; my $shilly = 'Hilly'; my $clickhilly = 'Click here'; my $registerh = 'register'; my $Registerh = 'Register'; my $Registerhnow = 'Register now'; my $signup_hilly = 'sign up'; my $signedup_hilly = 'signed up'; # events my $fatburners = 'Spring All Day Fat Burners'; my $beating = 'Beating the Bounds'; my $tfce = 'The Flattest Century in the East'; # day and date # to get the day of the year, use lisp function day-of-year # (load "d:\\brbc\\cgi-bin\\aa.lsp") # (defun day-of-year (year month day &optional julian-p) ... ) my $day_of_year = (localtime(time()))[7]; # universal time obtained using Lisp function encode-universal-time # (encode-universal-time 0 0 8 20 6 2004) # how is this done in Perl? my $ff_day = 158; my $hhh_day = 242; my $ff_days = $ff_day - $day_of_year - 1; my $hhh_days = $hhh_day - $day_of_year - 1; # variables my $input = 0; # input value my @inputs; # all input values my $query = "0"; # query string: number and optional letter my $debug = 0; # set to 1 for debugging my $message_count; # number of messages my @messages; # list of messages # blinking text my $blink = '
'; # good old original standby messages # use these when no BRBC event is imminent my @standby0 = ( [ "+0", $blue, "" ], [ "+1", $blue, "It's a beautiful day out there." ], [ "+2", $green, "What are you doing inside?" ], [ "+2", $green, "Turn off the computer and" ], [ "+3", $blue, "GO RIDE YOUR BIKE!" ], [ "+0", $blue, "" ], ); my @standby1 = ( [ "+1", $blue, "Bike, bike, that magical wheel." ], [ "+1", $blue, "The more you bike, the better you feel." ], [ "+2", $green, "The better you feel," ], [ "+2", $green, "the more you like." ], [ "+2", $green, "So have some beans, and" ], [ "+3", $blue, "RIDE YOUR BIKE!" ], ); my @standby2 = ( [ "+1", $blue, "The Hindus say that breath is life." ], [ "+2", $green, "When I ride my bicycle up a hill," ], [ "+2", $green, "I breathe like a house afire." ], [ "+2", $blue, "Well then, I must be" ], [ "+3", $blue, "REALLY LIVING!" ], ); my @standby3 = ( [ "+1", $blue, "The dishes are dirty," ], [ "+1", $blue, "the lawn needs mowing," ], [ "+1", $blue, "laundry is piling up, and the house is a mess." ], [ "+2", $green, "This would be a great time to" ], [ "+3", $blue, "GO RIDE YOUR BIKE!" ], ); my @standby4 = ( [ "+1", $blue, "$einstein said mass is equivalent to energy." ], [ "+1", $blue, "I know that when I pedal hard, I lose weight." ], [ "+1", $green, "It doesn't take a genius to see that." ], [ "+2", $green, "All you have to do is" ], [ "+3", $blue, "GO RIDE YOUR BIKE!" ], ); my @standby5 = ( [ "+1", $blue, "$Subject\'s lonely and $subject misses you." ], [ "+1", $blue, "You don't take $object out much anymore." ], [ "+1", $blue, "$Subject likes the way you shift $possessive gears." ], [ "+2", $green, "$SUBJECT NEEDS TO BE USED." ], [ "+3", $blue, "GO RIDE YOUR BIKE!" ], ); my @standby6 = ( [ "+1", $blue, "When you're old and wrinkled and gray," ], [ "+1", $blue, "what will be your biggest regret?" ], [ "+1", $blue, "That you didn't spend enough time" ], [ "+1", $blue, "at the office? Or..." ], [ "+2", $green, "That you never rode a century?" ], [ "+3", $blue, "GO RIDE YOUR BIKE!" ], ); my @standby7 = ( [ "+1", $blue, "I'm always buying stuff for my car." ], [ "+1", $blue, "But what has it given me lately?" ], [ "+2", $green, "Lots of things." ], [ "+1", $green, "Gas bills, insurance bills, repair bills..." ], [ "+1", $blue, "I think I'll just" ], [ "+3", $blue, "GO RIDE MY BIKE!" ], ); my @standby8 = ( [ "+1", $blue, "Yeah, darlin' go make it happen," ], [ "+1", $blue, "Take the world in a love embrace." ], [ "+2", $green, "Ride all of your bikes at once and" ], [ "+3", $blue, "EXPLODE INTO SPACE!" ], ); my @standby9 = ( [ "+1", $blue, "Go ride your bike, go ride your bike." ], [ "+1", $blue, "Go ride your bike, go ride your bike." ], [ "+1", $blue, "Go ride your bike, go ride your bike." ], [ "+2", $green, "Oh, for Pete's sake," ], [ "+3", $blue, "GO RIDE YOUR BIKE!" ], ); my @standby10 = ( [ "+1", $blue, "" ], [ "+1", $blue, "\"Some people like to go out dancing," ], [ "+1", $blue, "And other people like us, we got to work.\"" ], [ "+2", $green, "Me, I just want to" ], [ "+3", $blue, "GO RIDE MY BIKE!" ], ); my @standby11 = ( # [ "+0", $blue, "\"Flights of black horsemen soar over churches," ], [ "+1", $blue, "\"Flights of black horsemen" ], [ "+1", $blue, "soar over churches," ], [ "+1", $blue, "pursued by an army of birds in the rain.\"" ], [ "+2", $green, "I don't know what it means," ], [ "+2", $green, "but it makes me want to" ], [ "+3", $blue, "GO RIDE MY BIKE!" ], ); my @standby12 = ( [ "+1", $blue, "I knew a guy who had all the toys." ], [ "+1", $blue, "A $lexus, a $skidoo, a $harley--even a $segway." ], [ "+1", $blue, "Then one day his wife said" ], [ "+2", $green, "\"Oh, $name. Grow up and" ], [ "+3", $blue, "GO RIDE A $bicycle!\"" ], ); # note: if people object to this one, change the middle lines to: # "Heck, ride it through the ZOO, you animal. Just" my @standby13 = ( [ "+1", $blue, "Ride it on the street. Ride it in the dirt." ], [ "+1", $blue, "Ride it on the trails. Ride it in the mud." ], [ "+2", $green, "Heck, ride it through" ], # [ "+2", $green, "the frickin' $zoo. Just" ], [ "+2", $green, "the $zoo, you animal. Just" ], [ "+3", $blue, "GO RIDE YOUR BIKE!" ], ); my @standby14 = ( [ "+2", $red, "Ride a red bike." ], [ "+2", $gold, "Ride a yellow bike." ], [ "+2", $orange, "Ride an orange bike." ], [ "+2", $purple, "Ride a purple bike." ], [ "+2", $black, "Who cares what color it is?" ], [ "+3", $blue, "GO RIDE YOUR BIKE!" ], ); my @standby15 = ( [ "-2", $green, "Starting out in the granny gear, little cog." ], [ "-1", $green, "Shifting from the little cog to the middle cog." ], [ "+0", $green, "Bumping up the front to the middle ring." ], [ "+1", $green, "Shifting from the middle cog to the big cog." ], [ "+2", $green, "Going for broke in the big ring." ], [ "+1", $blue, "Oh man, we are" ], [ "+3", $blue, "REALLY FLYING!!" ], ); my @standby16 = ( [ "+1", $blue, "Asheville has lots of stores:" ], [ "+1", $blue, "$belk, $dillards, $jcpenney, $sears, $proffitts." ], [ "+1", $blue, "So many stores, you can shop 'til you drop." ], [ "+2", $green, "But why would you want to," ], [ "+2", $green, "when you can" ], [ "+3", $blue, "GO RIDE YOUR BIKE?" ], ); my @standby17 = ( [ "+0", $blue, "" ], [ "+1", $blue, "Please? Please?" ], [ "+1", $blue, "Pretty please with sugar on top?" ], [ "+2", $green, "Oh, won't you PUH-LEEEZ" ], [ "+3", $blue, "GO RIDE YOUR BIKE?" ], ); my @standby18 = ( [ "+3", $blue, "GO RIDE YOUR BIKE!" ], [ "+1", $blue, "" ], [ "+1", $green, "(There's a carton of ice cream" ], [ "+1", $green, "waiting for you in the freezer" ], [ "+1", $green, "when you get back.)" ], [ "+0", $green, "" ], ); my @standby19 = ( [ "+1", $blue, "Funky helmet and goofy glasses -- check." ], [ "+1", $blue, "Garish jersey and mutant gloves -- check." ], [ "+1", $blue, "Dweeby shorts and pointy shoes -- check." ], [ "+2", $green, "Oh good! Now I'm ready to" ], [ "+3", $blue, "GO RIDE MY BIKE!" ], ); my @standby20 = ( [ "+2", $blue, "The sun is shining," ], [ "+2", $blue, "the birds are chirping," ], [ "+1", $blue, "and a gentle breeze is fluttering the leaves." ], [ "+1", $green, "Oh, doesn't it make you want to get out and" ], [ "+3", $blue, "GO RIDE YOUR BIKE?" ], ); my @standby21 = ( [ "+1", $blue, "Tires singing on pavement..." ], [ "+1", $blue, "A 30 mph breeze on a hot day..." ], [ "+2", $blue, "Thighs like tree trunks..." ], [ "+1", $green, "You won't get them by watching TV." ], [ "+1", $green, "No, you really have to" ], [ "+3", $blue, "GO RIDE YOUR BIKE!" ], ); my @standby22 = ( [ "+1", $blue, "Most folks ride to work," ], [ "+1", $blue, "and work to eat." ], [ "+2", $green, "Bicyclists" ], [ "+3", $blue, "RIDE TO EAT," ], [ "+3", $blue, "AND EAT TO RIDE!" ], ); my @standby23 = ( [ "+1", $blue, "Let's see..." ], [ "+1", $blue, "I'm overweight, stressed-out," ], [ "+1", $blue, "depressed, and chronically fatigued." ], [ "+1", $green, "AHA! I must need to" ], [ "+3", $blue, "GO RIDE MY BIKE!" ], ); my @standby24 = ( [ "+1", $blue, '"Road." "Touring." "Randonneur."' ], [ "+1", $blue, '"Mountain." "Hardtail." "Dualie." "Downhill."' ], [ "+1", $blue, '"Hybrid." "City." "Cross." "Cruiser."' ], [ "+1", $blue, '"Cyclocross." "BMX." "Freestyle."' ], [ "+1", $blue, '"Tandem." "Recumbent." "Folding."' ], [ "+1", $green, 'Call it whatever you want. Just' ], [ "+3", $blue, 'GO RIDE YOUR BIKE!' ], ); my @standby25 = ( [ "+1", $green, "Green means go, and" ], [ "+1", $red, "RED MEANS STOP." ], [ "+1", $blue, "It's the law when you drive a car." ], [ "+1", $blue, "It's also the law when you" ], [ "+3", $blue, "RIDE YOUR BIKE!" ], ); my @standby26 = ( [ "+1", $blue, "Here I am stuck at the office again." ], [ "+1", $blue, "If I have to stare at this computer" ], [ "+1", $blue, "for one more minute, I will explode." ], [ "+1", $green, '"Hey boss! I have some errands to run."' ], [ "+2", $blue, "He'll never know if I" ], [ "+3", $blue, "GO RIDE MY BIKE!" ], ); my @standby27 = ( [ "+1", $blue, "$Subject: \"Mt. Mitchell is the highest peak" ], [ "+1", $blue, "in the East. It's a long, tough climb," ], [ "+1", $blue, " but the view is worth it.\"" ], [ "+1", $blue, "$Object: \"Gosh, are you a mountain climber?\"" ], [ "+2", $green, "$Subject: \"No, I just like to" ], [ "+3", $blue, "RIDE MY BIKE!\"" ], ); my @standby28 = ( [ "+1", $blue, '"My tires need air."' ], [ "+1", $blue, '"It\'s too early in the day."' ], [ "+1", $blue, '"Bikes are for kids."' ], [ "+2", $blue, '"I\'m too tired."' ], [ "+1", $green, 'Are you done making excuses?' ], [ "+2", $green, 'Good! Then it\'s time to' ], [ "+3", $blue, 'GO RIDE YOUR BIKE!' ], ); my @standby29 = ( [ "+1", $blue, "\"Almost half the forests that once covered" ], [ "+1", $blue, "the Earth are gone, and deforestation" ], [ "+1", $blue, "continues to expand and accelerate." ], [ "+1", $blue, "The health and quality of remaining" ], [ "+1", $blue, "forests are declining.\" - $audubon" ], [ "+1", $green, "MTBers: while you still can, get out there and" ], [ "+3", $blue, "RIDE YOUR BIKE!" ], ); my @standby30 = ( # these methods do not work in Internet Expl*der # [ "+2", $blue, "" ], # [ "+2", $blue, 'HEY YOU!' ], # [ "+2", $blue, "
HEY YOU!
" ], [ "+2", $blue, "$blink" ], [ "+1", $blue, "Yes, we mean you." ], [ "+1", $green, "Flashing text is a cheap trick." ], [ "+1", $green, "But we'll do whatever it takes to get you to" ], [ "+3", $blue, "GO RIDE YOUR BIKE!" ], ); my @standby31 = ( [ "+1", $blue, "Let's see--when would be a good time" ], [ "+1", $blue, "to go for a long bike ride?" ], [ "+1", $green, "Can't tonight; I'm taking the kids to the game." ], [ "+1", $green, "Saturday I promised to clean the garage." ], [ "+1", $green, "Sunday's out since we'll be gone all day." ], [ "+3", $blue, "How about RIGHT NOW?" ], ); my @standby32 = ( [ "+1", $blue, "A $cadbury survey found that" ], [ "+1", $blue, "half of all women prefer chocolate to sex." ], [ "+1", $green, "But how many of them would rather " ], [ "+3", $blue, "GO RIDE THEIR BIKE?" ], ); my @standby33 = ( [ "+2", $blue, "Things to do this week:" ], [ "+1", $green, "Monday: ride bike. Tuesday: ride bike." ], [ "+1", $green, "Wednesday: ride bike. Thursday: ride bike." ], [ "+1", $green, "Friday: ride bike. Saturday: ride bike." ], [ "+3", $blue, "Sunday: SLEEP!!" ], ); # inspired by the cover story "Having It All", # in the May 2003 issue of Bicycling Magazine my @standby34 = ( [ "+1", $blue, "Want to shed those ten extra pounds," ], [ "+1", $blue, "boost your energy, save money, get super-fit," ], [ "+1", $blue, "eat all you want, and even save the world?" ], [ "+2", $green, "Do one simple thing:" ], [ "+3", $blue, "GO RIDE YOUR BIKE!" ], ); # politically incorrect message # michele, mike, woody and david tate complained about it my @message_iraq = ( [ "+1", $blue, "If everyone rode bicycles instead of driving," ], [ "+1", $blue, "we would not need so much oil." ], [ "+2", $green, "And there would be no war in Iraq." ], [ "+2", $green, "So say a prayer for peace, and" ], [ "+3", $blue, "GO RIDE YOUR BIKE!" ], ); # revised version of message_iraq my @standby35 = ( [ "+1", $blue, "If everyone rode bicycles instead of driving," ], [ "+1", $blue, "we would not need so much oil, and" ], [ "+2", $green, "the air would be much cleaner." ], [ "+2", $green, "So help save the Earth, and" ], [ "+3", $blue, "GO RIDE YOUR BIKE!" ], ); my @standby36 = ( [ "+1", $blue, "\"People wanna know what I'm on." ], [ "+1", $blue, "What am I on?" ], [ "+3", $green, "I'M ON MY BIKE," ], [ "+2", $green, "busting my ass six hours a day." ], [ "+1", $blue, "What are you on?\" --$lance" ], ); my @standby37 = ( [ "+3", $blue, "A BIKE RIDE." ], [ "+1", $green, "Yes, that's it! A simple bike ride." ], [ "+2", $blue, "It's what I love to do," ], [ "+1", $green, "and most days I can't believe they pay me" ], [ "+1", $green, " to do it. A day is not the same without it..." ], [ "+1", $green, " --$lance" ], ); my @standbys = ( \@standby0, \@standby1, \@standby2, \@standby3, \@standby4, \@standby5, \@standby6, \@standby7, \@standby8, \@standby9, \@standby10, \@standby11, \@standby12, \@standby13, \@standby14, \@standby15, \@standby16, \@standby17, \@standby18, \@standby19, \@standby20, \@standby21, \@standby22, \@standby23, \@standby24, \@standby25, \@standby26, \@standby27, \@standby28, \@standby29, \@standby30, \@standby31, \@standby32, \@standby33, \@standby34, \@standby35, \@standby36, \@standby37, \@message_iraq, ); # subtract one to skip message_iraq my $standby_count = scalar(@standbys) - 1; my @flyer0 = ( [ "+2", $green, "What is the $flyer?" ], [ "+1", $green, "a.) A brand of sled" ], [ "+1", $green, "b.) A nonstop train to Raleigh" ], [ "+3", $blue, "c.) A MAJOR NEW EVENT" ], [ "+1", $blue, "from the BRBC." ], [ "+1", $green, "Don't miss it! $Registerfnow!" ], ); my @flyer1 = ( [ "+1", $blue, "100 miles is a long way, so" ], [ "+3", $green, "GO RIDE YOUR BIKE!" ], [ "+1", $blue, "There are only $ff_days days left" ], [ "+1", $blue, "to get ready for the" ], [ "+3", $green, "$flyer!" ], ); my @flyer2 = ( [ "+1", $blue, "Oh my gosh!" ], [ "+2", $green, "What was I thinking?" ], [ "+1", $blue, "I forgot to $registerf for the" ], [ "+3", $green, "$FLYER!" ], ); my @flyer3 = ( [ "+2", $green, "The $fatburners." ], [ "+2", $green, "The $FLYER." ], [ "+2", $green, "The $hilly." ], [ "+1", $green, "How many more reasons do you need to" ], [ "+3", $blue, "GO RIDE YOUR BIKE?" ], ); my @flyer4 = ( [ "+3", $blue, "Better hurry!" ], [ "+1", $green, "Time is running out." ], [ "+1", $green, "Only $ff_days days left to register for the" ], [ "+3", $blue, "$FLYER!" ], ); my @flyer5 = ( [ "+1", $blue, "Sick of smog? You can help! Ride the" ], [ "+3", $green, "$FLYER" ], [ "+1", $blue, "to benefit" ], [ "+3", $green, "$wnca," ], [ "+1", $blue, "working for clean air" ], [ "+1", $blue, "in the Blue Ridge Mountains." ], ); my @flyer6 = ( [ "+1", $blue, "Want a good training ride for the" ], [ "+1", $green, "$hilly?" ], [ "+1", $blue, "Don't forget to $signup_flyer for the" ], [ "+1", $green, "" ], [ "+3", $green, "$FLYER." ], [ "+1", $blue, "(Only $ff_days days left!)" ], [ "+1", $green, "" ], ); my @flyer7 = ( [ "+1", $green, "$Registerfnow for the first inaugural" ], [ "+3", $green, "$FLYER." ], [ "+1", $blue, "Then next year, you can say" ], [ "+1", $blue, "\"Sorry -- you had to be here last year" ], [ "+1", $blue, "to get this snazzy" ], [ "+3", $green, "$flyer cap!" ], ); my @flyer8 = ( [ "+1", $green, "$tfce:" ], [ "+1", $blue, "900 miles away, incredibly easy." ], [ "+1", $green, "The $hilly:" ], [ "+1", $blue, "Right here in Asheville, incredibly hard." ], [ "+3", $green, "The $FLYER:" ], [ "+1", $blue, "Also here in Asheville, just plain incredible!" ], ); my @flyer9 = ( [ "+1", $blue, "First time century rider?" ], [ "+1", $blue, "Then the"], [ "+3", $green, "$FLYER" ], [ "+1", $blue, "was made just for you!" ], [ "+1", $green, "($Registerfnow, though." ], [ "+1", $blue, "It's just $ff_days days away!)" ], ); my @flyer10 = ( [ "+3", $green, "The $flyer:" ], [ "+3", $blue, "250 riders max." ], [ "+1", $blue, "Don't miss out!" ], [ "+2", $green, "$Registerfnow." ], [ "+1", $blue, "(You still have $ff_days days...)" ], ); my @flyer11 = ( [ "+1", $blue, "$Subject: \"Think you'll ride the $shilly this year?\"" ], [ "+1", $green, "$Object: \"No, instead I've $signedup_flyer for the" ], [ "+3", $green, "$FLYER.\"" ], [ "+1", $blue, "$Subject: \"Hah! That ride is for wimps.\"" ], [ "+1", $green, "$Object: \"OK, it's not as hard as the $shilly --" ], [ "+1", $green, "but it's no cakewalk!\"" ], ); my @flyer12 = ( [ "+2", $blue, "$blink" ], [ "+1", $blue, "Yes, we mean you." ], [ "+1", $green, "Flashing text is a cheap trick." ], [ "+1", $green, "But we'll do whatever it takes" ], [ "+1", $green, "to get you to $signup_flyer for the" ], [ "+3", $blue, "$FLYER!" ], ); my @flyer13 = ( [ "+2", $red, "Red bikes, yellow bikes," ], [ "+2", $gold, "orange bikes, green bikes," ], [ "+2", $gold, "blue bikes, purple bikes." ], [ "+1", $black, "You'll see them all, and more, at the" ], [ "+3", $green, "$FLYER!" ], ); my @flyer14 = ( [ "+3", $blue, "IN JUST $ff_days DAYS," ], [ "+1", $green, "the BRBC presents its first major new event" ], [ "+1", $green, "in 24 years!" ], [ "+2", $blue, "WHAT IS IT?" ], [ "+0", $green, "($clickflyer to find out...) " ], ); # my @flyer15 = ( [ "+1", $blue, "So far, most of the riders in the" ], [ "+2", $green, "$flyer" ], [ "+1", $blue, "are in their 40s and 50s." ], [ "+3", $green, "WHERE ARE YOU," ], [ "+3", $green, "YOUNG STUDS?" ], [ "+0", $blue, "(And studettes!)" ], [ "+2", $blue, "$Registerfnow!" ], ); # my @flyer16 = ( [ "+1", $blue, "So far, only four riders in the" ], [ "+2", $green, "$flyer" ], [ "+1", $blue, "are over 60 years old." ], [ "+3", $green, "WHERE ARE YOU," ], [ "+3", $green, "STUDLY SENIORS?" ], [ "+2", $blue, "$Registerfnow!" ], ); my @flyer17 = ( [ "+1", $blue, "" ], [ "+1", $green, "" ], [ "+1", $blue, "" ], [ "+1", $green, "" ], [ "+1", $green, "" ], [ "+1", $green, "" ], ); my @testdate = ( [ "+1", $blue, "Today is day $day_of_year of this year." ], [ "+1", $blue, "The $flyer is on day $ff_day" ], [ "+1", $green, "There are $ff_days days left to register." ], [ "+1", $green, "" ], ); my @flyers = ( \@flyer0, \@flyer1, \@flyer2, \@flyer3, \@flyer4, \@flyer5, \@flyer6, \@flyer7, \@flyer8, \@flyer9, \@flyer10, \@flyer11, \@flyer12, \@flyer13, \@flyer14, # \@flyer15, # \@flyer16, \@flyer17, \@flyer18, \@flyer19, # \@flyer20, \@flyer21, \@flyer22, \@flyer23, # \@flyer24, \@flyer25, \@flyer26, \@flyer27, # \@flyer28, \@flyer29, \@flyer30, \@flyer31, # \@flyer32, \@flyer33, \@flyer34, \@flyer35, ); my $flyer_count = scalar(@flyers); my @hilly0 = ( [ "+1", $green, "What is the" ], [ "+2", $green, "$hilly?" ], [ "+1", $green, "a.) A scary roller-coaster" ], [ "+1", $green, "b.) A motorcycle gang" ], [ "+3", $blue, "c.) THE PREMIER EVENT" ], [ "+1", $blue, "from the BRBC." ], [ "+1", $green, "Don't miss it! $Registerhnow!" ], ); my @hilly1 = ( [ "+1", $blue, "100 miles is a long way, so" ], [ "+3", $green, "GO RIDE YOUR BIKE!" ], [ "+1", $blue, "There are only $hhh_days days left" ], [ "+1", $blue, "to get ready for the" ], [ "+3", $green, "$hilly!" ], ); my @hilly2 = ( [ "+1", $blue, "Oh my gosh!" ], [ "+2", $green, "What was I thinking?" ], [ "+1", $blue, "I forgot to $registerh for the" ], [ "+3", $green, "$HILLY!" ], ); my @hilly3 = ( [ "+2", $green, "The $fatburners." ], [ "+2", $green, "The $flyer." ], [ "+2", $green, "The $HILLY." ], [ "+1", $green, "How many more reasons do you need to" ], [ "+3", $blue, "GO RIDE YOUR BIKE?" ], ); my @hilly4 = ( [ "+3", $blue, "Better hurry!" ], [ "+1", $green, "Time is running out." ], [ "+1", $green, "Only $hhh_days days left to register for the" ], [ "+3", $blue, "$HILLY!" ], ); my @hilly5 = ( [ "+1", $blue, "Support cycling in Western North Carolina!" ], [ "+2", $green, "Ride the" ], [ "+3", $green, "$HILLY" ], [ "+1", $blue, "Your registration fee pays for:" ], [ "+1", $green, "bicycle education, advocacy," ], [ "+1", $green, "road cleanup, trail work, and much more." ], [ "+1", $blue, "Brought to you with a smile by the BRBC." ], ); my @hilly6 = ( [ "+1", $blue, "You've trained all year for it." ], [ "+2", $green, "Are you ready?" ], [ "+1", $green, "Not quite!" ], [ "+1", $blue, "Don't forget to $signup_hilly for the" ], [ "+3", $green, "$HILLY." ], [ "+1", $blue, "(Only $hhh_days days left!)" ], [ "+1", $green, "" ], ); my @hilly7 = ( [ "+1", $green, "$Registerhnow for the" ], [ "+3", $green, "$HILLY." ], [ "+1", $blue, "Then next year, you can say" ], [ "+1", $blue, "\"Sorry -- you had to be here last year" ], [ "+1", $blue, "to get this snazzy" ], [ "+3", $green, "2004 $shilly T-shirt!" ], ); my @hilly8 = ( [ "+1", $green, "$tfce:" ], [ "+1", $blue, "900 miles away, incredibly easy." ], [ "+1", $green, "The $flyer:" ], [ "+1", $blue, "Right here in Asheville, not so easy." ], [ "+3", $green, "The $HILLY:" ], [ "+1", $blue, "Also here in Asheville, just plain hellacious!" ], ); my @hilly9 = ( [ "+1", $blue, "First time century rider?" ], [ "+1", $blue, "Then the"], [ "+3", $green, "$HILLY" ], [ "+1", $blue, "Might not be your cup of tea." ], [ "+1", $green, "Don't say we didn't warn you!" ], ); my @hilly10 = ( [ "+3", $green, "The $hilly:" ], [ "+3", $blue, "Most challenging century ride in the East." ], [ "+1", $blue, "Don't miss out!" ], [ "+2", $green, "$Registerhnow." ], [ "+1", $blue, "(You still have $hhh_days days...)" ], ); my @hilly11 = ( [ "+1", $blue, "$Subject: \"Think you'll ride the $shilly this year?\"" ], [ "+1", $green, "$Object: \"No, I did the $flyer --" ], [ "+1", $green, "that was enough for me.\"" ], [ "+1", $blue, "$Subject: \"Hah! That ride is for wimps.\"" ], [ "+1", $green, "$Object: \"Maybe so, but I made it. Last year," ], [ "+1", $green, "I had to rescue you on Bearwallow Mountain!\"" ], ); my @hilly12 = ( [ "+2", $blue, "$blink" ], [ "+1", $blue, "Yes, we mean you." ], [ "+1", $green, "Flashing text is a cheap trick." ], [ "+1", $green, "But we'll do whatever it takes" ], [ "+1", $green, "to get you to $signup_hilly for the" ], [ "+3", $blue, "$HILLY!" ], ); my @hilly13 = ( [ "+2", $red, "Red bikes, yellow bikes," ], [ "+2", $gold, "orange bikes, green bikes," ], [ "+2", $gold, "blue bikes, purple bikes." ], [ "+1", $black, "You'll see them all, and more, at the" ], [ "+3", $green, "$HILLY!" ], ); my @hilly14 = ( [ "+3", $blue, "IN JUST $hhh_days DAYS," ], [ "+1", $green, "the BRBC presents the premier cycling event" ], [ "+1", $green, "east of the Mississippi!" ], [ "+2", $blue, "WHAT IS IT?" ], [ "+0", $green, "($clickhilly to find out...) " ], ); my @hilly15 = ( [ "+1", $blue, "Typically, most of the riders in the" ], [ "+2", $green, "$hilly" ], [ "+1", $blue, "are in their 40s and 50s." ], [ "+3", $green, "WHERE ARE YOU," ], [ "+3", $green, "YOUNG STUDS?" ], [ "+0", $blue, "(And studettes!)" ], [ "+2", $blue, "$Registerhnow!" ], ); my @hilly16 = ( [ "+1", $blue, "Typically, very few riders in the" ], [ "+2", $green, "$hilly" ], [ "+1", $blue, "are over 60 years old." ], [ "+3", $green, "WHERE ARE YOU," ], [ "+3", $green, "STUDLY SENIORS?" ], [ "+2", $blue, "$Registerhnow!" ], ); my @hilly17 = ( [ "+1", $blue, "" ], [ "+1", $green, "" ], [ "+1", $blue, "" ], [ "+1", $green, "" ], [ "+1", $green, "" ], [ "+1", $green, "" ], ); my @hillys = ( \@hilly0, \@hilly1, \@hilly2, \@hilly3, \@hilly4, \@hilly5, \@hilly6, \@hilly7, \@hilly8, \@hilly9, \@hilly10, \@hilly11, \@hilly12, \@hilly13, \@hilly14, \@hilly15, \@hilly16, # \@hilly17, \@hilly18, \@hilly19, # \@hilly20, \@hilly21, \@hilly22, \@hilly23, # \@hilly24, \@hilly25, \@hilly26, \@hilly27, # \@hilly28, \@hilly29, \@hilly30, \@hilly31, # \@hilly32, \@hilly33, \@hilly34, \@hilly35, ); my $hilly_count = scalar(@hillys); # split the query into input values # input 0 = category # input 1 = types # no keys used here sub split_query { my $index = 0; foreach $input (split("&",$query)) { if ($debug) { print "Input($index) = [$input]