#!/usr/bin/perl
## Portion Distortion Quiz
require "cgi-lib.pl";
print ("Content-type: text/html\n\n");
&ReadParse;
if ($in{'action'} eq "answer") {
if ($in{'ServingCorrect'} eq "yes") {
&ProcessYes;
} else {
&ProcessNo;
}
}
if ($in{'action'} eq "answerBurn") {
if ($in{'ServingCorrect'} eq "yes") {
&ProcessYesBurn;
} else {
&ProcessNoBurn;
}
} else {
&ProcessQuestion;
}
sub ProcessYes {
$CurrentNumber = "$in{'QuestionNumber'}";
if ($in{'QuestionNumber'} eq "1") {
$Correct = " Correct!";
$Calories = "350";
$FoodServing = "Today's 16 ounce cup of coffee has $Calories calories. This is 305 calories more than a cup of coffee 20 years ago.
Keep in mind that many of today's coffee drinks have a lot of added sugar, milk and syrup which increase the calories. It is best to stick with plain coffee and add your own milk and sweetener or ask for sugar free syrup.";
$AdditionalWording = "Now guess how long you will have to walk in order to burn those extra 305 calories?*";
$Option1 = "2 hours and 15 minutes";
$Option2 = "1 hour and 20 minutes";
$Option3 = "3 hours";
$Gif = "";
$Gif2 = "";
$AdditionalWording1="
";
$Weight = "130-pound";
$PreviousNumber = "1";
$NextNumber = "Next Question";
&YesWording;
}
if ($in{'QuestionNumber'} eq "2") {
$Correct = " Correct!";
$Calories = "500";
$FoodServing = "Today's 5 ounce muffin has $Calories calories. This is 310 calories more than muffin 20 years ago. ";
$AdditionalWording = "Now guess how long you will have to vacuum in order to burn those extra 310 calories?*";
$Option1 = "30 minutes";
$Option2 = "2 hours";
$Option3 = "1 hour and 30 minutes";
$Gif = "";
$Gif2 = "";
$AdditionalWording1="
";
$Weight = "130-pound";
$PreviousNumber = "1";
$NextNumber = "Next Question";
&YesWording;
}
if ($in{'QuestionNumber'} eq "3") {
$Correct = " Correct!";
$Calories = "850";
$FoodServing = "Today, 2 large pizza slices total $Calories calories. This is 350 calories more than pizza 20 years ago.";
$AdditionalWording = "How long will have to play golf (while walking and carrying clubs) in order to burn the extra 350 calories?*";
$Option1 = "3 hours";
$Option2 = "1 hour";
$Option3 = "2 hours";
$Gif = "";
$Gif2 = "";
$AdditionalWording1="
";
$Weight = "160-pound";
$PreviousNumber = "2";
$NextNumber = "Next Question";
&YesWording;
}
if ($in{'QuestionNumber'} eq "4") {
$Correct = " Correct!";
$Calories = "790";
$FoodServing = "Today, a 3 cup chicken Caesar salad has $Calories calories. This is 400 more calories more than Caesar salads 20 years ago.
Ordering dressing on the side and only using half will help cut a lot of calories.";
$AdditionalWording = "How long will have to walk the dog in order to burn the extra 400 calories?*";
$Option1 = "1 hour 20 minutes";
$Option2 = "2 hours";
$Option3 = "3 hours";
$Gif = "";
$Gif2 = "";
$AdditionalWording1="
";
$Weight = "160-pound";
$PreviousNumber = "3";
$NextNumber = "Next Question";
&YesWording;
}
if ($in{'QuestionNumber'} eq "5") {
$Correct = " Correct!";
$Calories = "630";
$FoodServing = "Today, a tub of popcorn has $Calories calories. This is 360 more calories than a portion 20 years ago.";
$AdditionalWording = "How long will have to do water aerobics in order to burn the extra 360 calories?*";
$Option1 = "2 hours";
$Option2 = "30 minutes";
$Option3 = "1 hour and 15 minutes";
$Gif = "";
$Gif2 = "";
$AdditionalWording1="
";
$Weight = "160-pound";
$PreviousNumber = "4";
$NextNumber = "Next Question";
&YesWording;
}
if ($in{'QuestionNumber'} eq "6") {
$Correct = " Correct!";
$Calories = "640";
$FoodServing = "Today, a large piece of cheese cake has about $Calories calories. This is 380 more calories more than regular slices of cheesecake 20 ago.
Desserts are often large enough for two or three people. Order one dessert and share it.";
$AdditionalWording = "How long will have to play tennis in order to burn the extra 380 calories?*";
$Option1 = "3 hours";
$Option2 = "55 minutes";
$Option3 = "15 minutes";
$Gif = "";
$Gif2 = "";
$AdditionalWording1="
";
$Weight = "130-pound";
$PreviousNumber = "5";
$NextNumber = "Next Question";
&YesWording;
}
if ($in{'QuestionNumber'} eq "7") {
$Correct = " Correct!";
$Calories = "275";
$FoodServing = "Today, a large cookie has about $Calories calories. This is 220 more calories more than a cookie 20 years ago.";
$AdditionalWording = "How long will have to wash the car in order to burn the extra 220 calories?*";
$Option1 = "1 hour and 15 minutes";
$Option2 = "30 minutes";
$Option3 = "2 hours and 10 minutes";
$Gif = "";
$Gif2 = "";
$AdditionalWording1="
";
$Weight = "130-pound";
$PreviousNumber = "6";
$NextNumber = "Next Question";
&YesWording;
}
if ($in{'QuestionNumber'} eq "8") {
$Correct = " Correct!";
$Calories = "865";
$FoodServing = "Today, chicken stir fry is often $Calories calories. This is 430 more calories more than a portion of chicken stir fry 20 years ago.
Often restaurant entrees are large enough for two people. Share an entree with a friend or eat half and take the rest home.";
$AdditionalWording = "How long will have to do aerobic dance in order to burn the extra 430 calories?*";
$Option1 = "3 hours";
$Option2 = "1 hour and 5 minutes";
$Option3 = "2 hours and 10 minutes";
$Gif = "";
$Gif2 = "";
$AdditionalWording1="
";
$Weight = "130-pound";
$PreviousNumber = "7";
$NextNumber = "Back to Question 1";
&YesWording;
}
} # end ProcessYes sr
sub YesWording {
print <NHLBI Portion Distortion - Answer to Question Number $in{'QuestionNumber'}
YesHTML
} #end YesWording
sub ProcessYesBurn {
$CurrentNumber = "$in{'QuestionNumber'}";
if ($in{'QuestionNumber'} eq "1") {
$Correct = " Correct!";
$FoodServing = "If you walk approximately 1 hour and 20 minutes, you will burn 305 calories*";
$AdditionalWording = "Go to the next Portion Distortion question.";
$Gif = "";
$Gif2 = "";
$Weight = "130-pound";
$PreviousNumber = "1";
$NextNumber = "Next Question";
&YesWordingBurn;
}
if ($in{'QuestionNumber'} eq "2") {
$Correct = " Correct!";
$FoodServing = "If you vacuum for approximately 1 hour and 30 minutes you will burn 310 calories.*";
$AdditionalWording = " Go to the next Portion Distortion question.";
$Gif = "";
$Gif2 = "";
$Weight = "130-pound";
$PreviousNumber = "1";
$NextNumber = "Next Question";
&YesWordingBurn;
}
if ($in{'QuestionNumber'} eq "3") {
$Correct = " Correct!";
$FoodServing = "If you play golf (while walking and carrying your clubs) for 1 hour, you will burn 350 calories.*";
$AdditionalWording = "Go to the next Portion Distortion question.";
$Gif = "";
$Gif2 = "";
$Weight = "160-pound";
$PreviousNumber = "2";
$NextNumber = "Next Question";
&YesWordingBurn;
}
if ($in{'QuestionNumber'} eq "4") {
$Correct = " Correct!";
$FoodServing = "If you walk the dog for 1 hour and 20 minutes, you will burn 400 calories.*";
$AdditionalWording = "Go to the next Portion Distortion question.";
$Gif = "";
$Gif2 = "";
$Weight = "160-pound";
$PreviousNumber = "3";
$NextNumber = "Next Question";
&YesWordingBurn;
}
if ($in{'QuestionNumber'} eq "5") {
$Correct = " Correct!";
$FoodServing = "If you do water aerobics for 1 hour and 15 minutes, you will burn 360 calories.*";
$AdditionalWording = "Go to the next Portion Distortion question.";
$Gif = "";
$Gif2 = "";
$Weight = "160-pound";
$PreviousNumber = "4";
$NextNumber = "Next Question";
&YesWordingBurn;
}
if ($in{'QuestionNumber'} eq "6") {
$Correct = " Correct!";
$FoodServing = "If you play tennis for 55 minutes, you will burn 380 calories.*";
$AdditionalWording = "Go to the next Portion Distortion question.";
$Gif = "";
$Gif2 = "";
$Weight = "130-pound";
$PreviousNumber = "5";
$NextNumber = "Next Question";
&YesWordingBurn;
}
if ($in{'QuestionNumber'} eq "7") {
$Correct = " Correct!";
$FoodServing = "If you wash the car for 1 hour and 15 minutes, you will burn 220 calories.*";
$AdditionalWording = "Go to the next Portion Distortion question.";
$Gif = "";
$Gif2 = "";
$Weight = "130-pound";
$PreviousNumber = "6";
$NextNumber = "Next Question";
&YesWordingBurn;
}
if ($in{'QuestionNumber'} eq "8") {
$Correct = " Correct!";
$FoodServing = "If you do aerobic dance for 1 hour and 5 minutes, you will burn 430 calories.*";
$AdditionalWording = "
YesBurnHTML
} #end YesWordingBurn
sub ProcessNoBurn {
$CurrentNumber = "$in{'QuestionNumber'}";
if ($in{'QuestionNumber'} eq "1") {
$Correct = " Sorry!";
$FoodServing = "If you walk approximately 1 hour and 20 minutes, you will burn 305 calories*";
$AdditionalWording = "Go to the next Portion Distortion question.";
$Gif = "";
$Gif2 = "";
$Weight = "130-pound";
$PreviousNumber = "1";
$NextNumber = "Next Question";
&NoWordingBurn;
}
if ($in{'QuestionNumber'} eq "2") {
$Correct = " Sorry!";
$FoodServing = "If you vacuum for approximately 1 hour and 30 minutes you will burn 310 calories.*";
$AdditionalWording = " Go to the next Portion Distortion question.";
$Gif = "";
$Gif2 = "";
$Weight = "130-pound";
$PreviousNumber = "1";
$NextNumber = "Next Question";
&NoWordingBurn;
}
if ($in{'QuestionNumber'} eq "3") {
$Correct = " Sorry!";
$FoodServing = "If you play golf (while walking and carrying your clubs) for 1 hour, you will burn 350 calories.*";
$AdditionalWording = "Go to the next Portion Distortion question.";
$Gif = "";
$Gif2 = "";
$Weight = "160-pound";
$PreviousNumber = "2";
$NextNumber = "Next Question";
&NoWordingBurn;
}
if ($in{'QuestionNumber'} eq "4") {
$Correct = " Sorry!";
$FoodServing = "If you walk the dog for 1 hour and 20 minutes, you will burn 400 calories.*";
$AdditionalWording = "Go to the next Portion Distortion question.";
$Gif = "";
$Gif2 = "";
$Weight = "160-pound";
$PreviousNumber = "3";
$NextNumber = "Next Question";
&NoWordingBurn;
}
if ($in{'QuestionNumber'} eq "5") {
$Correct = " Sorry!";
$FoodServing = "If you do water aerobics for 1 hour and 15 minutes, you will burn 360 calories.*";
$AdditionalWording = "Go to the next Portion Distortion question.";
$Gif = "";
$Gif2 = "";
$Weight = "160-pound";
$PreviousNumber = "4";
$NextNumber = "Next Question";
&NoWordingBurn;
}
if ($in{'QuestionNumber'} eq "6") {
$Correct = " Sorry!";
$FoodServing = "If you play tennis for 55 minutes, you will burn 380 calories.*";
$AdditionalWording = "Go to the next Portion Distortion question.";
$Gif = "";
$Gif2 = "";
$Weight = "130-pound";
$PreviousNumber = "5";
$NextNumber = "Next Question";
&NoWordingBurn;
}
if ($in{'QuestionNumber'} eq "7") {
$Correct = " Sorry!";
$FoodServing = "If you wash the car for 1 hour and 15 minutes, you will burn 220 calories.*";
$AdditionalWording = "Go to the next Portion Distortion question.";
$Gif = "";
$Gif2 = "";
$Weight = "130-pound";
$PreviousNumber = "6";
$NextNumber = "Next Question";
&NoWordingBurn;
}
if ($in{'QuestionNumber'} eq "8") {
$Correct = " Sorry!";
$FoodServing = "If you do aerobic dance for 1 hour and 5 minutes, you will burn 430 calories.*";
$AdditionalWording = "
NoBurnHTML
} #end NoWordingBurn
sub ProcessNo {
if ($in{'Servings'} eq "") {
$in{'Servings'} eq "1";
}
if ($in{'QuestionNumber'} eq "1") {
$Correct = " Sorry!";
$Calories = "350";
$FoodServing = "Today's 16 ounce cup of coffee has $Calories calories. This is 305 calories more than a cup of coffee 20 years ago.
Keep in mind that many of today's coffee drinks have a lot of added sugar, milk and syrup which increase the calories. It is best to stick with plain coffee and add your own milk and sweetener or ask for sugar free syrup.";
$AdditionalWording = "Now guess how long you will have to walk in order to burn those extra 305 calories?*";
$Option1 = "2 hours and 15 minutes";
$Option2 = "1 hour and 20 minutes";
$Option3 = "3 hours";
$Gif = "";
$Gif2 = "";
$AdditionalWording1="
";
$Weight = "130-pound";
$NextNumber = "Next Question";
$PreviousNumber = "1";
}
if ($in{'QuestionNumber'} eq "2") {
$Correct = " Sorry!";
$Calories = "500";
$FoodServing = "Today's 5 ounce muffin has $Calories calories. This is 310 calories more than muffin 20 years ago. ";
$AdditionalWording = "Now guess how long you will have to vacuum in order to burn those extra 310 calories?*";
$Option1 = "30 minutes";
$Option2 = "2 hours";
$Option3 = "1 hour and 30 minutes";
$Gif = "";
$Gif2 = "";
$AdditionalWording1="
";
$Weight = "130-pound";
$PreviousNumber = "1";
$NextNumber = "Next Question";
}
if ($in{'QuestionNumber'} eq "3") {
$Correct = " Sorry!";
$Calories = "850";
$FoodServing = "Today, 2 large pizza slices total $Calories calories. This is 350 calories more than pizza 20 years ago.";
$AdditionalWording = "How long will have to play golf (while walking and carrying clubs) in order to burn the extra 350 calories?*";
$Option1 = "3 hours";
$Option2 = "1 hour";
$Option3 = "2 hours";
$Gif = "";
$Gif2 = "";
$AdditionalWording1="
";
$Weight = "160-pound";
$PreviousNumber = "2";
$NextNumber = "Next Question";
}
if ($in{'QuestionNumber'} eq "4") {
$Correct = " Sorry!";
$Calories = "790";
$FoodServing = "Today, a 3 cup chicken Caesar salad has $Calories calories. This is 400 more calories more than Caesar salads 20 years ago.
Ordering dressing on the side and only using half will help cut a lot of calories.";
$AdditionalWording = "How long will have to walk the dog in order to burn the extra 400 calories?*";
$Option1 = "1 hour 20 minutes";
$Option2 = "2 hours";
$Option3 = "3 hours";
$Gif = "";
$Gif2 = "";
$AdditionalWording1="
";
$Weight = "160-pound";
$PreviousNumber = "3";
$NextNumber = "Next Question";
}
if ($in{'QuestionNumber'} eq "5") {
$Correct = " Sorry!";
$Calories = "630";
$FoodServing = "Today, a tub of popcorn has $Calories calories. This is 360 more calories than a portion 20 years ago.";
$AdditionalWording = "How long will have to do water aerobics in order to burn the extra 360 calories?*";
$Option1 = "2 hours";
$Option2 = "30 minutes";
$Option3 = "1 hour and 15 minutes";
$Gif = "";
$Gif2 = "";
$AdditionalWording1="
";
$Weight = "160-pound";
$PreviousNumber = "4";
$NextNumber = "Next Question";
}
if ($in{'QuestionNumber'} eq "6") {
$Correct = " Sorry!";
$Calories = "640";
$FoodServing = "Today, a large piece of cheese cake has about $Calories calories. This is 380 more calories more than regular slices of cheesecake 20 ago.
Desserts are often large enough for two or three people. Order one dessert and share it.";
$AdditionalWording = "How long will have to play tennis in order to burn the extra 380 calories?*";
$Option1 = "3 hours";
$Option2 = "55 minutes";
$Option3 = "15 minutes";
$Gif = "";
$Gif2 = "";
$AdditionalWording1="
";
$Weight = "130-pound";
$PreviousNumber = "5";
$NextNumber = "Next Question";
}
if ($in{'QuestionNumber'} eq "7") {
$Correct = " Sorry!";
$Calories = "275";
$FoodServing = "Today, a large cookie has about $Calories calories. This is 220 more calories more than a cookie 20 years ago.";
$AdditionalWording = "How long will have to wash the car in order to burn the extra 220 calories?*";
$Option1 = "1 hour and 15 minutes";
$Option2 = "30 minutes";
$Option3 = "2 hours and 10 minutes";
$Gif = "";
$Gif2 = "";
$AdditionalWording1="
";
$Weight = "130-pound";
$PreviousNumber = "6";
$NextNumber = "Next Question";
}
if ($in{'QuestionNumber'} eq "8") {
$Correct = " Sorry!";
$Calories = "865";
$FoodServing = "Today, chicken stir fry is often $Calories calories. This is 430 more calories more than a portion of chicken stir fry 20 years ago.
Often restaurant entrees are large enough for two people. Share an entree with a friend or eat half and take the rest home.";
$AdditionalWording = "How long will have to do aerobic dance in order to burn the extra 430 calories?*";
$Option1 = "3 hours";
$Option2 = "1 hour and 5 minutes";
$Option3 = "2 hours and 10 minutes";
$Gif = "";
$Gif2 = "";
$AdditionalWording1="
";
$Weight = "130-pound";
$PreviousNumber = "7";
$NextNumber = "Back to Question 1";
}
print <NHLBI Portion Distortion - Answer to Question Number $in{'QuestionNumber'}
NoHTML
} #end ProcessNo sr
sub ProcessQuestion {
if ($in{'number'} eq "1") {
$FoodGif1 = "Coffee (with whole milk and sugar) ";
$FoodGif2 = "Mocha Coffee (with steamed whole milk and mocha syrup) ";
$FoodName = "Coffee";
$in{'number'} = "1";
$ServingSize1 = "8 ounces, 45 calories";
$ServingSize2 = "??? calories";
$Ask = "A standard cup of coffee 20 years ago was 8 ounces and had 45 calories. How many calories do you think are in today's coffee?";
$Option1 = "100";
$Option2 = "350";
$Option3 = "450";
$Ask1="
";
$NextNumber = "Next Question";
$PreviousNumber = "1";
&QuestionHTML;
}
if ($in{'number'} eq "2") {
$FoodGif1 = "Blueberry Muffin ";
$FoodGif2 = "Blueberry Muffin ";
$FoodName = "Muffin";
$in{'number'} = "2";
$ServingSize1 = "210 calories, 1.5 ounces";
$ServingSize2 = "??? calories";
$Ask = "A muffin 20 years ago was 1.5 ounces and had 210 calories. How many calories do you think are in a muffin today?";
$Option1 = "320";
$Option2 = "400";
$Option3 = "500";
$Ask1="
";
$NextNumber = "Next Question";
$PreviousNumber = "1";
&QuestionHTML;
}
if ($in{'number'} eq "3") {
$FoodGif1 = "2 Pepperoni Pizza slices ";
$FoodGif2 = "2 Large Pepperoni Pizza slices ";
$FoodName = "Pizza";
$in{'number'} = "3";
$ServingSize1 = "500 calories";
$ServingSize2 = "??? calories";
$Ask = "Two slices of pepperoni pizza 20 years ago had 500 calories. How many calories do you think are in today's large pizza slices?";
$Option1 = "1,200";
$Option2 = "850";
$Option3 = "1,000";
$Ask1="
";
$NextNumber = "Next Question";
$PreviousNumber = "2";
&QuestionHTML;
}
if ($in{'number'} eq "4") {
$FoodGif1 = "";
$FoodGif2 = "";
$FoodName = "Chicken Caesar Salad";
$in{'number'} = "4";
$ServingSize1 = "390 calories, 1 1/2 cups";
$ServingSize2 = "??? calories";
$Ask = "A chicken Caesar salad had 390 calories 20 years ago. How many calories do you think are in today's chicken Caesar salad??";
$Option1 = "790";
$Option2 = "520";
$Option3 = "650";
$Ask1="
";
$NextNumber = "Next Question";
$PreviousNumber = "3";
&QuestionHTML;
}
if ($in{'number'} eq "5") {
$FoodGif1 = "";
$FoodGif2 = "";
$FoodName = "Popcorn";
$in{'number'} = "5";
$ServingSize1 = "270 calories, 5 cups";
$ServingSize2 = "??? calories";
$Ask = "A box of popcorn had 270 calories 20 years ago. How many calories do you think are in today's tub of popcorn?";
$Option1 = "520";
$Option2 = "820";
$Option3 = "630";
$Ask1="
";
$NextNumber = "Next Question";
$PreviousNumber = "4";
&QuestionHTML;
}
if ($in{'number'} eq "6") {
$FoodGif1 = "";
$FoodGif2 = "";
$FoodName = "Cheesecake";
$in{'number'} = "6";
$ServingSize1 = "260 calories, 3 ounces";
$ServingSize2 = "??? calories";
$Ask = "A slice of cheesecake was 260 calories 20 years ago. How many calories do you think are in today's large portion of cheesecake?";
$Option1 = "830";
$Option2 = "640";
$Option3 = "900";
$Ask1="
";
$NextNumber = "Next Question";
$PreviousNumber = "5";
&QuestionHTML;
}
if ($in{'number'} eq "7") {
$FoodGif1 = "";
$FoodGif2 = "";
$FoodName = "Chocolate Chip Cookie";
$in{'number'} = "7";
$ServingSize1 = "55 calories, 1 1/2 diameter";
$ServingSize2 = "??? calories";
$Ask = "A cookie was 55 calories 20 years ago. How many calories do you think are in today's large cookies?";
$Option1 = "275";
$Option2 = "100";
$Option3 = "400";
$Ask1="
";
$NextNumber = "Next Question";
$PreviousNumber = "6";
&QuestionHTML;
}
if ($in{'number'} eq "8") {
$FoodGif1 = "";
$FoodGif2 = "";
$FoodName = "Chicken Stir Fry";
$in{'number'} = "8";
$ServingSize1 = "435 calories, 2 cups";
$ServingSize2 = "??? calories";
$Ask = "Chicken stir fry was 435 calories 20 years ago. How many calories do you think are in today's common portion of chicken stir fry?";
$Option1 = "625";
$Option2 = "550";
$Option3 = "865";
$Ask1="
";
$NextNumber = "Back to Question 1";
$PreviousNumber = "7";
&QuestionHTML;
}
} #end ProcessQuestion sr
sub QuestionHTML{
print<
NHLBI Portion Distortion - Answer to Question Number $in{'QuestionNumber'}